diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-11-09 08:53:04 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-11-11 03:59:05 -0500 |
commit | b1b0393c3c58c0e96c7c44e2e98baa252d6c6813 (patch) | |
tree | b7bc27bb02ed050f4b09916e5479336ebc13ae42 /hw/misc/pvpanic.c | |
parent | a3a929083b03c839b3c87c461769e605ec79b0a7 (diff) | |
download | qemu-b1b0393c3c58c0e96c7c44e2e98baa252d6c6813.zip qemu-b1b0393c3c58c0e96c7c44e2e98baa252d6c6813.tar.gz qemu-b1b0393c3c58c0e96c7c44e2e98baa252d6c6813.tar.bz2 |
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: 7dc58deea79a ("pvpanic: implement crashloaded event handling")
Reported-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/misc/pvpanic.c')
-rw-r--r-- | hw/misc/pvpanic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index 598d547..35d6797 100644 --- a/hw/misc/pvpanic.c +++ b/hw/misc/pvpanic.c @@ -61,12 +61,14 @@ struct PVPanicState { MemoryRegion io; uint16_t ioport; + uint8_t events; }; /* return supported events on read */ static uint64_t pvpanic_ioport_read(void *opaque, hwaddr addr, unsigned size) { - return PVPANIC_PANICKED; + PVPanicState *pvp = opaque; + return pvp->events; } static void pvpanic_ioport_write(void *opaque, hwaddr addr, uint64_t val, @@ -112,6 +114,7 @@ static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp) static Property pvpanic_isa_properties[] = { DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicState, ioport, 0x505), + DEFINE_PROP_UINT8("events", PVPanicState, events, PVPANIC_PANICKED | PVPANIC_CRASHLOADED), DEFINE_PROP_END_OF_LIST(), }; |