[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 8/8] xen/x86: Additional SMAP modes to work around buggy 32bit PV guests
>>> On 24.06.15 at 18:31, <andrew.cooper3@xxxxxxxxxx> wrote: > @@ -784,6 +791,11 @@ unsigned long pv_guest_cr4_to_real_cr4(const struct vcpu > *v) > if ( v->domain->arch.vtsc ) > cr4 |= X86_CR4_TSD; > > + /* Disable SMAP behind unaware 32bit PV guests. */ > + if ( (smap_mode == smap_mode_compat) && is_pv_32bit_vcpu(v) && > + ((v->arch.pv_vcpu.ctrlreg[4] & X86_CR4_SMAP) == 0) ) > + cr4 &= ~X86_CR4_SMAP; There's actually another problem here: The function you modify is used by paravirt_ctxt_switch_to(). Obviously you will want to make sure to re-enable SMAP when switching away from the guest, and not only at the point you finally switch to a suitable other non-idle vCPU. And then there's the question whether the above fixup wouldn't better be deferred until compat_restore_all_guest, minimizing the "damage" to Xen? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |