x86-64-irq-cpustat.patch
PATCH 5/5 x86-64-irq-cpustat.patch
Use fixed size data types in irq_cpustat and check it properly for softirqs before vmresume.
Signed-off-by Arun Sharma <[email protected]>
xen/arch/x86/x86_64/entry.S +3 -3
@@ -242,10 +242,10 @@ cli # tests must not race interrupts /*test_softirqs:*/ movq EDOMAIN_processor(%rbx),%rax -#if 0 shl $6,%rax # sizeof(irq_cpustat) == 64 - test %rcx,SYMBOL_NAME(irq_stat)(%rax,1) -#endif + leaq SYMBOL_NAME(irq_stat)(%rip), %rdx + addq %rdx,%rax + testl %ecx,(%rax) jnz vmx_process_softirqs vmx_restore_all_guest:
xen/include/asm-x86/hardirq.h +4 -4
@@ -5,10 +5,10 @@#include <xen/cache.h> typedef struct { -unsigned int __softirq_pending; -unsigned int __local_irq_count; -unsigned int __nmi_count; -unsigned long idle_timestamp; +u32 __softirq_pending; +u32 __local_irq_count; +u32 __nmi_count; +u64 idle_timestamp; } __cacheline_aligned irq_cpustat_t;#include <xen/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */