From: kaf24@localhost.localdomain Date: Fri, 26 Jan 2007 17:33:58 +0000 (+0000) Subject: Don't clobber vcpu flags when getting vcpu context. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15371^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8536211db6656ac55bb97a84870a3efdf878bb46;p=xen.git Don't clobber vcpu flags when getting vcpu context. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 36b0b3b4d0..e3c28e6c0b 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -410,7 +410,6 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) #else #define c(fld) (c.nat->fld) #endif - unsigned long flags; if ( !IS_COMPAT(v->domain) ) memcpy(c.nat, &v->arch.guest_context, sizeof(*c.nat)); @@ -444,12 +443,11 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) c(user_regs.eflags |= v->arch.iopl << 12); } - flags = 0; + c(flags &= ~(VGCF_i387_valid|VGCF_in_kernel)); if ( test_bit(_VCPUF_fpu_initialised, &v->vcpu_flags) ) - flags |= VGCF_i387_valid; + c(flags |= VGCF_i387_valid); if ( guest_kernel_mode(v, &v->arch.guest_context.user_regs) ) - flags |= VGCF_in_kernel; - c(flags = flags); + c(flags |= VGCF_in_kernel); if ( !IS_COMPAT(v->domain) ) c.nat->ctrlreg[3] = xen_pfn_to_cr3(pagetable_get_pfn(v->arch.guest_table));