From: Wanpeng Li <wanpengli@xxxxxxxxxxx> Adds pv ipis out-of-bounds acess testing. Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx> Cc: Liran Alon <liran.alon@xxxxxxxxxx> Signed-off-by: Wanpeng Li <wanpengli@xxxxxxxxxxx> --- x86/apic.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/x86/apic.c b/x86/apic.c index c976e8d..460d7a5 100644 --- a/x86/apic.c +++ b/x86/apic.c @@ -566,6 +566,15 @@ static void test_apic_change_mode(void) report("TMCCT should stay at zero", !apic_read(APIC_TMCCT)); } +void test_pv_ipi() +{ + unsigned int nr = 10, ret; + unsigned long p1 = 0xFFFFFFFF, p2 = 0, p3 = 0xFFFFFFFF, p4 = 0x0; + + asm volatile("vmcall" : "=a"(ret) :"a"(nr), "b"(p1), "c"(p2), "d"(p3), "S"(p4)); + report("PV IPIs testing", !ret); +} + int main(void) { setup_vm(); @@ -581,6 +590,7 @@ int main(void) test_self_ipi(); test_physical_broadcast(); + test_pv_ipi(); test_sti_nmi(); test_multiple_nmi(); -- 2.7.4