[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/19] check: Only test pvpanic when it is compiled i
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 14/19] check: Only test pvpanic when it is compiled in |
Date: |
Wed, 22 Aug 2018 10:07:46 +0200 |
It was not possible to compile out pvpanic. Use the same trick
than applesmc.
Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
---
hw/misc/pvpanic.c | 11 -----------
include/hw/misc/pvpanic.h | 11 ++++++++++-
tests/Makefile.include | 4 ++--
3 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index b26250dec9..9d8961ba0c 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -99,17 +99,6 @@ static void pvpanic_isa_realizefn(DeviceState *dev, Error
**errp)
isa_register_ioport(d, &s->io, s->ioport);
}
-#define PVPANIC_IOPORT_PROP "ioport"
-
-uint16_t pvpanic_port(void)
-{
- Object *o = object_resolve_path_type("", TYPE_PVPANIC, NULL);
- if (!o) {
- return 0;
- }
- return object_property_get_uint(o, PVPANIC_IOPORT_PROP, NULL);
-}
-
static Property pvpanic_isa_properties[] = {
DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicState, ioport, 0x505),
DEFINE_PROP_END_OF_LIST(),
diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h
index 36a54e270c..1ee071a703 100644
--- a/include/hw/misc/pvpanic.h
+++ b/include/hw/misc/pvpanic.h
@@ -16,6 +16,15 @@
#define TYPE_PVPANIC "pvpanic"
-uint16_t pvpanic_port(void);
+#define PVPANIC_IOPORT_PROP "ioport"
+
+static inline uint16_t pvpanic_port(void)
+{
+ Object *o = object_resolve_path_type("", TYPE_PVPANIC, NULL);
+ if (!o) {
+ return 0;
+ }
+ return object_property_get_uint(o, PVPANIC_IOPORT_PROP, NULL);
+}
#endif
diff --git a/tests/Makefile.include b/tests/Makefile.include
index da153ac566..5d50bf1074 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -276,8 +276,8 @@ check-qtest-i386-$(CONFIG_VMXNET3_PCI) +=
tests/vmxnet3-test$(EXESUF)
gcov-files-i386-$(CONFIG_VMXNET3_PCI) += hw/net/vmxnet3.c
gcov-files-i386-y += hw/net/net_rx_pkt.c
gcov-files-i386-y += hw/net/net_tx_pkt.c
-check-qtest-i386-y += tests/pvpanic-test$(EXESUF)
-gcov-files-i386-y += i386-softmmu/hw/misc/pvpanic.c
+check-qtest-i386-$(CONFIG_PVPANIC) += tests/pvpanic-test$(EXESUF)
+gcov-files-i386-$(CONFIG_PVPANIC) += i386-softmmu/hw/misc/pvpanic.c
check-qtest-i386-$(CONFIG_I82801B11) += tests/i82801b11-test$(EXESUF)
gcov-files-i386-$(CONFIG_I82801B11) += hw/pci-bridge/i82801b11.c
check-qtest-i386-$(CONFIG_IOH3420) += tests/ioh3420-test$(EXESUF)
--
2.17.1
- [Qemu-devel] [PULL 03/19] check: Only test eepro100 when it is compiled in, (continued)
- [Qemu-devel] [PULL 03/19] check: Only test eepro100 when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 04/19] check: Only test pcnet when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 08/19] check: Only test hda when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 07/19] check: Only test ac97 when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 06/19] check: Only test es1370 when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 09/19] check: Only test ipack when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 11/19] check: Only test i82801b11 when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 12/19] check: Only test sdhci when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 05/19] check: Only test rtl8139 when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 10/19] check: Only test ioh3420 when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 14/19] check: Only test pvpanic when it is compiled in,
Juan Quintela <=
- [Qemu-devel] [PULL 13/19] check: Only test wdt_ib700 when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 16/19] check: Only test usb-ohci when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 15/19] check: Only test nvme when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 17/19] check: Only test usb-uhci devices when they are compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 18/19] check: Only test usb-ehci when it is compiled in, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 19/19] check: Only test tpm devices when they are compiled in, Juan Quintela, 2018/08/22
- Re: [Qemu-devel] [PULL 00/19] Be able to disable several devices, Peter Maydell, 2018/08/24