[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: fix logical ANDs used to mask bitfields.
# HG changeset patch # User Tim Deegan <tim@xxxxxxx> # Date 1334146233 -3600 # Node ID 2badbf64a582ed62f39ca465c189f759c67350c8 # Parent ff880458e0c0fc4dadb23700665a4d2118ccad00 x86: fix logical ANDs used to mask bitfields. Signed-off-by: Tim Deegan <tim@xxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> Committed-by: Tim Deegan <tim@xxxxxxx> --- diff -r ff880458e0c0 -r 2badbf64a582 xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Wed Apr 11 13:10:33 2012 +0100 +++ b/xen/arch/x86/hvm/svm/svm.c Wed Apr 11 13:10:33 2012 +0100 @@ -752,7 +752,7 @@ static void svm_lwp_interrupt(struct cpu ack_APIC_irq(); vlapic_set_irq( vcpu_vlapic(curr), - (curr->arch.hvm_svm.guest_lwp_cfg >> 40) && 0xff, + (curr->arch.hvm_svm.guest_lwp_cfg >> 40) & 0xff, 0); } diff -r ff880458e0c0 -r 2badbf64a582 xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Wed Apr 11 13:10:33 2012 +0100 +++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Apr 11 13:10:33 2012 +0100 @@ -1382,7 +1382,7 @@ void vmx_inject_extint(int trap) if ( nestedhvm_vcpu_in_guestmode(v) ) { pin_based_cntrl = __get_vvmcs(vcpu_nestedhvm(v).nv_vvmcx, PIN_BASED_VM_EXEC_CONTROL); - if ( pin_based_cntrl && PIN_BASED_EXT_INTR_MASK ) { + if ( pin_based_cntrl & PIN_BASED_EXT_INTR_MASK ) { nvmx_enqueue_n2_exceptions (v, INTR_INFO_VALID_MASK | (X86_EVENTTYPE_EXT_INTR<<8) | trap, HVM_DELIVER_NO_ERROR_CODE); @@ -1401,7 +1401,7 @@ void vmx_inject_nmi(void) if ( nestedhvm_vcpu_in_guestmode(v) ) { pin_based_cntrl = __get_vvmcs(vcpu_nestedhvm(v).nv_vvmcx, PIN_BASED_VM_EXEC_CONTROL); - if ( pin_based_cntrl && PIN_BASED_NMI_EXITING ) { + if ( pin_based_cntrl & PIN_BASED_NMI_EXITING ) { nvmx_enqueue_n2_exceptions (v, INTR_INFO_VALID_MASK | (X86_EVENTTYPE_NMI<<8) | TRAP_nmi, HVM_DELIVER_NO_ERROR_CODE); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |