[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-next v3 09/12] x86/domain: move PV specific code to pv/domain.c
>>> On 26.04.17 at 17:54, <wei.liu2@xxxxxxxxxx> wrote: > --- a/xen/include/asm-x86/domain.h > +++ b/xen/include/asm-x86/domain.h > @@ -655,6 +655,9 @@ static inline void pv_inject_page_fault(int errcode, > unsigned long cr2) > pv_inject_event(&event); > } > > +void paravirt_ctxt_switch_from(struct vcpu *v); > +void paravirt_ctxt_switch_to(struct vcpu *v); I think these would better go ... > --- /dev/null > +++ b/xen/include/asm-x86/pv/domain.h > @@ -0,0 +1,57 @@ > +/* > + * pv/domain.h > + * > + * PV guest interface definitions > + * > + * Copyright (C) 2017 Wei Liu <wei.liu2@xxxxxxxxxx> > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms and conditions of the GNU General Public > + * License, version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * General Public License for more details. > + * > + * You should have received a copy of the GNU General Public > + * License along with this program; If not, see > <http://www.gnu.org/licenses/>. > + */ > + > +#ifndef __X86_PV_DOMAIN_H__ > +#define __X86_PV_DOMAIN_H__ > + > +#ifdef CONFIG_PV > + > +void pv_vcpu_destroy(struct vcpu *v); > +int pv_vcpu_initialise(struct vcpu *v); > +void pv_domain_destroy(struct domain *d); > +int pv_domain_initialise(struct domain *d, unsigned int domcr_flags, > + struct xen_arch_domainconfig *config); > + > +#else /* !CONFIG_PV */ > + > +#include <xen/errno.h> > + > +static inline void pv_vcpu_destroy(struct vcpu *v) {} > +static inline int pv_vcpu_initialise(struct vcpu *v) { return -EOPNOTSUPP; } > +static inline void pv_domain_destroy(struct domain *d) {} > +static inline int pv_domain_initialise(struct domain *d, > + unsigned int domcr_flags, > + struct xen_arch_domainconfig *config); > +{ > + return -EOPNOTSUPP; > +} > +#endif /* CONFIG_PV */ ... here. The idle domain is a PV one after all, just that we'll always need it even with CONFIG_PV off. Also pv/domain.c needs to include this new header - as pointed out before, both producer and consumer(s) need to see the same declarations. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |