debuggers.hg
changeset 15863:4b5f3a087737
hvm: Remove hvm-specific NMI flag and use generic flag instead.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Thu Sep 06 11:31:02 2007 +0100 (2007-09-06) |
parents | dd230a032a8d |
children | 447db1235adf |
files | xen/arch/x86/domctl.c xen/arch/x86/hvm/irq.c xen/arch/x86/hvm/vioapic.c xen/arch/x86/hvm/vlapic.c xen/arch/x86/traps.c xen/include/asm-x86/hvm/vcpu.h |
line diff
1.1 --- a/xen/arch/x86/domctl.c Thu Sep 06 11:23:43 2007 +0100 1.2 +++ b/xen/arch/x86/domctl.c Thu Sep 06 11:31:02 2007 +0100 1.3 @@ -508,12 +508,8 @@ long arch_do_domctl( 1.4 { 1.5 case XEN_DOMCTL_SENDTRIGGER_NMI: 1.6 { 1.7 - ret = -ENOSYS; 1.8 - if ( !is_hvm_domain(d) ) 1.9 - break; 1.10 - 1.11 ret = 0; 1.12 - if ( !test_and_set_bool(v->arch.hvm_vcpu.nmi_pending) ) 1.13 + if ( !test_and_set_bool(v->nmi_pending) ) 1.14 vcpu_kick(v); 1.15 } 1.16 break;
2.1 --- a/xen/arch/x86/hvm/irq.c Thu Sep 06 11:23:43 2007 +0100 2.2 +++ b/xen/arch/x86/hvm/irq.c Thu Sep 06 11:31:02 2007 +0100 2.3 @@ -289,7 +289,7 @@ enum hvm_intack hvm_vcpu_has_pending_irq 2.4 { 2.5 struct hvm_domain *plat = &v->domain->arch.hvm_domain; 2.6 2.7 - if ( unlikely(v->arch.hvm_vcpu.nmi_pending) ) 2.8 + if ( unlikely(v->nmi_pending) ) 2.9 return hvm_intack_nmi; 2.10 2.11 if ( vlapic_has_interrupt(v) != -1 ) 2.12 @@ -306,7 +306,7 @@ int hvm_vcpu_ack_pending_irq(struct vcpu 2.13 switch ( type ) 2.14 { 2.15 case hvm_intack_nmi: 2.16 - return test_and_clear_bool(v->arch.hvm_vcpu.nmi_pending); 2.17 + return test_and_clear_bool(v->nmi_pending); 2.18 case hvm_intack_lapic: 2.19 return ((*vector = cpu_get_apic_interrupt(v)) != -1); 2.20 case hvm_intack_pic:
3.1 --- a/xen/arch/x86/hvm/vioapic.c Thu Sep 06 11:23:43 2007 +0100 3.2 +++ b/xen/arch/x86/hvm/vioapic.c Thu Sep 06 11:31:02 2007 +0100 3.3 @@ -391,7 +391,7 @@ static void vioapic_deliver(struct hvm_h 3.4 continue; 3.5 deliver_bitmask &= ~(1 << bit); 3.6 if ( ((v = vioapic_domain(vioapic)->vcpu[bit]) != NULL) && 3.7 - !test_and_set_bool(v->arch.hvm_vcpu.nmi_pending) ) 3.8 + !test_and_set_bool(v->nmi_pending) ) 3.9 vcpu_kick(v); 3.10 } 3.11 break;
4.1 --- a/xen/arch/x86/hvm/vlapic.c Thu Sep 06 11:23:43 2007 +0100 4.2 +++ b/xen/arch/x86/hvm/vlapic.c Thu Sep 06 11:31:02 2007 +0100 4.3 @@ -294,7 +294,7 @@ static int vlapic_accept_irq(struct vcpu 4.4 break; 4.5 4.6 case APIC_DM_NMI: 4.7 - if ( !test_and_set_bool(v->arch.hvm_vcpu.nmi_pending) ) 4.8 + if ( !test_and_set_bool(v->nmi_pending) ) 4.9 vcpu_kick(v); 4.10 break; 4.11
5.1 --- a/xen/arch/x86/traps.c Thu Sep 06 11:23:43 2007 +0100 5.2 +++ b/xen/arch/x86/traps.c Thu Sep 06 11:31:02 2007 +0100 5.3 @@ -1890,7 +1890,7 @@ static void nmi_dom0_report(unsigned int 5.4 5.5 set_bit(reason_idx, nmi_reason(d)); 5.6 5.7 - if ( !xchg(&v->nmi_pending, 1) ) 5.8 + if ( !test_and_set_bool(v->nmi_pending) ) 5.9 raise_softirq(NMI_SOFTIRQ); /* not safe to wake up a vcpu here */ 5.10 } 5.11
6.1 --- a/xen/include/asm-x86/hvm/vcpu.h Thu Sep 06 11:23:43 2007 +0100 6.2 +++ b/xen/include/asm-x86/hvm/vcpu.h Thu Sep 06 11:31:02 2007 +0100 6.3 @@ -46,9 +46,6 @@ struct hvm_vcpu { 6.4 s64 cache_tsc_offset; 6.5 u64 guest_time; 6.6 6.7 - /* Is an NMI pending for delivery to this VCPU core? */ 6.8 - bool_t nmi_pending; /* NB. integrate flag with save/restore */ 6.9 - 6.10 /* Lock and list for virtual platform timers. */ 6.11 spinlock_t tm_lock; 6.12 struct list_head tm_list;