[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 5/6] x86/msr: update domain policy on CPUID policy changes



On Fri, 2017-10-13 at 16:25 +0100, Andrew Cooper wrote:
> On 13/10/17 13:35, Sergey Dyasli wrote:
> > diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> > index 205b4cb685..7e6b15f8d7 100644
> > --- a/xen/arch/x86/hvm/hvm.c
> > +++ b/xen/arch/x86/hvm/hvm.c
> > @@ -928,9 +928,8 @@ const char *hvm_efer_valid(const struct vcpu *v, 
> > uint64_t value,
> >          X86_CR0_CD | X86_CR0_PG)))
> >  
> >  /* These bits in CR4 can be set by the guest. */
> > -unsigned long hvm_cr4_guest_valid_bits(const struct vcpu *v, bool restore)
> > +unsigned long hvm_cr4_domain_valid_bits(const struct domain *d, bool 
> > restore)
> >  {
> > -    const struct domain *d = v->domain;
> >      const struct cpuid_policy *p;
> >      bool mce, vmxe;
> >  
> > @@ -963,6 +962,11 @@ unsigned long hvm_cr4_guest_valid_bits(const struct 
> > vcpu *v, bool restore)
> >              (p->feat.pku      ? X86_CR4_PKE               : 0));
> >  }
> >  
> > +unsigned long hvm_cr4_guest_valid_bits(const struct vcpu *v, bool restore)
> 
> I'd split this change out into a separate patch and change the existing
> guest valid bits to taking a domain *.
> 
> It needed to take vcpu in the past because of the old cpuid
> infrastructure, but it doesn't need to any more because of the
> domain-wide struct cpuid policy.

That was one of possibilities so I really needed a mainteiner's opinion
on this. Thanks for providing one!

-- 
Thanks,
Sergey
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.