pvpanic: Advertise the PVPANIC_CRASHLOADED event support

Advertise both types of events as supported when the guest OS
queries the pvpanic device.  Currently only PVPANIC_PANICKED is
exposed; PVPANIC_CRASHLOADED must also be advertised, but only on
new machine types.

Fixes: 7dc58deea7 ("pvpanic: implement crashloaded event handling")
Reported-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-11-09 08:53:04 -05:00
parent a3a929083b
commit b1b0393c3c
3 changed files with 6 additions and 2 deletions

View file

@ -20,7 +20,7 @@ static void test_panic(void)
qts = qtest_init("-device pvpanic");
val = qtest_inb(qts, 0x505);
g_assert_cmpuint(val, ==, 1);
g_assert_cmpuint(val, ==, 3);
qtest_outb(qts, 0x505, 0x1);