[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 04/11] x86: Fix calculation of %dr6/7 reserved bits
On Mon, Jun 04, 2018 at 02:59:08PM +0100, Andrew Cooper wrote: > diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c > index 10415e6..7fddae1 100644 > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -977,6 +977,7 @@ unsigned long hvm_cr4_guest_valid_bits(const struct > domain *d, bool restore) > > static int hvm_load_cpu_ctxt(struct domain *d, hvm_domain_context_t *h) > { > + const struct cpuid_policy *cp = d->arch.cpuid; > int vcpuid; > struct vcpu *v; > struct hvm_hw_cpu ctxt; > @@ -1154,8 +1155,8 @@ static int hvm_load_cpu_ctxt(struct domain *d, > hvm_domain_context_t *h) > v->arch.debugreg[1] = ctxt.dr1; > v->arch.debugreg[2] = ctxt.dr2; > v->arch.debugreg[3] = ctxt.dr3; > - v->arch.debugreg[6] = ctxt.dr6; > - v->arch.debugreg[7] = ctxt.dr7; > + v->arch.debugreg[6] = adjust_dr6_rsvd(ctxt.dr6, cp->feat.rtm); > + v->arch.debugreg[7] = adjust_dr7_rsvd(ctxt.dr7, cp->feat.rtm); I don't know much, but if the value in dr6/dr7 is changed from the one in the provided context, won't the guest experience issues? Won't it be better to plain refuse to load a context that has unsupported DR6/7 values? Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |