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

[Xen-changelog] [xen-unstable] hvm: Remove hvm-specific NMI flag and use generic flag instead.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1189074662 -3600
# Node ID 4b5f3a0877377970e17153e9c5487326caa9dfd3
# Parent  dd230a032a8d4e933f47b41c85da254c6a51f91c
hvm: Remove hvm-specific NMI flag and use generic flag instead.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domctl.c          |    6 +-----
 xen/arch/x86/hvm/irq.c         |    4 ++--
 xen/arch/x86/hvm/vioapic.c     |    2 +-
 xen/arch/x86/hvm/vlapic.c      |    2 +-
 xen/arch/x86/traps.c           |    2 +-
 xen/include/asm-x86/hvm/vcpu.h |    3 ---
 6 files changed, 6 insertions(+), 13 deletions(-)

diff -r dd230a032a8d -r 4b5f3a087737 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Thu Sep 06 11:23:43 2007 +0100
+++ b/xen/arch/x86/domctl.c     Thu Sep 06 11:31:02 2007 +0100
@@ -508,12 +508,8 @@ long arch_do_domctl(
         {
         case XEN_DOMCTL_SENDTRIGGER_NMI:
         {
-            ret = -ENOSYS;
-            if ( !is_hvm_domain(d) )
-                break;
-
             ret = 0;
-            if ( !test_and_set_bool(v->arch.hvm_vcpu.nmi_pending) )
+            if ( !test_and_set_bool(v->nmi_pending) )
                 vcpu_kick(v);
         }
         break;
diff -r dd230a032a8d -r 4b5f3a087737 xen/arch/x86/hvm/irq.c
--- a/xen/arch/x86/hvm/irq.c    Thu Sep 06 11:23:43 2007 +0100
+++ b/xen/arch/x86/hvm/irq.c    Thu Sep 06 11:31:02 2007 +0100
@@ -289,7 +289,7 @@ enum hvm_intack hvm_vcpu_has_pending_irq
 {
     struct hvm_domain *plat = &v->domain->arch.hvm_domain;
 
-    if ( unlikely(v->arch.hvm_vcpu.nmi_pending) )
+    if ( unlikely(v->nmi_pending) )
         return hvm_intack_nmi;
 
     if ( vlapic_has_interrupt(v) != -1 )
@@ -306,7 +306,7 @@ int hvm_vcpu_ack_pending_irq(struct vcpu
     switch ( type )
     {
     case hvm_intack_nmi:
-        return test_and_clear_bool(v->arch.hvm_vcpu.nmi_pending);
+        return test_and_clear_bool(v->nmi_pending);
     case hvm_intack_lapic:
         return ((*vector = cpu_get_apic_interrupt(v)) != -1);
     case hvm_intack_pic:
diff -r dd230a032a8d -r 4b5f3a087737 xen/arch/x86/hvm/vioapic.c
--- a/xen/arch/x86/hvm/vioapic.c        Thu Sep 06 11:23:43 2007 +0100
+++ b/xen/arch/x86/hvm/vioapic.c        Thu Sep 06 11:31:02 2007 +0100
@@ -391,7 +391,7 @@ static void vioapic_deliver(struct hvm_h
                 continue;
             deliver_bitmask &= ~(1 << bit);
             if ( ((v = vioapic_domain(vioapic)->vcpu[bit]) != NULL) &&
-                 !test_and_set_bool(v->arch.hvm_vcpu.nmi_pending) )
+                 !test_and_set_bool(v->nmi_pending) )
                 vcpu_kick(v);
         }
         break;
diff -r dd230a032a8d -r 4b5f3a087737 xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Thu Sep 06 11:23:43 2007 +0100
+++ b/xen/arch/x86/hvm/vlapic.c Thu Sep 06 11:31:02 2007 +0100
@@ -294,7 +294,7 @@ static int vlapic_accept_irq(struct vcpu
         break;
 
     case APIC_DM_NMI:
-        if ( !test_and_set_bool(v->arch.hvm_vcpu.nmi_pending) )
+        if ( !test_and_set_bool(v->nmi_pending) )
             vcpu_kick(v);
         break;
 
diff -r dd230a032a8d -r 4b5f3a087737 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Sep 06 11:23:43 2007 +0100
+++ b/xen/arch/x86/traps.c      Thu Sep 06 11:31:02 2007 +0100
@@ -1890,7 +1890,7 @@ static void nmi_dom0_report(unsigned int
 
     set_bit(reason_idx, nmi_reason(d));
 
-    if ( !xchg(&v->nmi_pending, 1) )
+    if ( !test_and_set_bool(v->nmi_pending) )
         raise_softirq(NMI_SOFTIRQ); /* not safe to wake up a vcpu here */
 }
 
diff -r dd230a032a8d -r 4b5f3a087737 xen/include/asm-x86/hvm/vcpu.h
--- a/xen/include/asm-x86/hvm/vcpu.h    Thu Sep 06 11:23:43 2007 +0100
+++ b/xen/include/asm-x86/hvm/vcpu.h    Thu Sep 06 11:31:02 2007 +0100
@@ -46,9 +46,6 @@ struct hvm_vcpu {
     s64                 cache_tsc_offset;
     u64                 guest_time;
 
-    /* Is an NMI pending for delivery to this VCPU core? */
-    bool_t              nmi_pending; /* NB. integrate flag with save/restore */
-
     /* Lock and list for virtual platform timers. */
     spinlock_t          tm_lock;
     struct list_head    tm_list;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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