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

[Xen-devel] [PATCH] x86/HVM: adjust hvm_interrupt_blocked()



First of all, hvm_intsrc_mce was not considered here at all, yet nothing
blocks #MC (other than an already in-progress #MC, but dealing with this
is not the purpose of this patch).

Additionally STI-shadow only blocks maskable interrupts, but not NMI.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3771,19 +3771,24 @@ enum hvm_intblk hvm_interrupt_blocked(st
             return intr;
     }
 
-    if ( (intack.source != hvm_intsrc_nmi) &&
-         !(guest_cpu_user_regs()->eflags & X86_EFLAGS_IF) )
-        return hvm_intblk_rflags_ie;
+    if ( intack.source == hvm_intsrc_mce )
+        return hvm_intblk_none;
 
     intr_shadow = hvm_funcs.get_interrupt_shadow(v);
 
-    if ( intr_shadow & (HVM_INTR_SHADOW_STI|HVM_INTR_SHADOW_MOV_SS) )
+    if ( intr_shadow & HVM_INTR_SHADOW_MOV_SS )
         return hvm_intblk_shadow;
 
     if ( intack.source == hvm_intsrc_nmi )
         return ((intr_shadow & HVM_INTR_SHADOW_NMI) ?
                 hvm_intblk_nmi_iret : hvm_intblk_none);
 
+    if ( intr_shadow & HVM_INTR_SHADOW_STI )
+        return hvm_intblk_shadow;
+
+    if ( !(guest_cpu_user_regs()->eflags & X86_EFLAGS_IF) )
+        return hvm_intblk_rflags_ie;
+
     if ( intack.source == hvm_intsrc_lapic )
     {
         uint32_t tpr = vlapic_get_reg(vcpu_vlapic(v), APIC_TASKPRI) & 0xF0;





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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