[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 10/33] spapr/vio: deprecate the "irq" property
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 10/33] spapr/vio: deprecate the "irq" property |
Date: |
Tue, 12 Jun 2018 16:44:40 +1000 |
From: Cédric Le Goater <address@hidden>
VIO devices have an "irq" property that can be used by the sPAPR IRQ
allocator as an IRQ number hint. But it is not set in QEMU nor in
libvirt. It brings unnecessary complexity to the underlying layers
managing the IRQ number space and it is in full opposition with the
new static IRQ allocator we want to introduce in sPAPR.
Let's deprecate it to simplify the spapr_irq_alloc routine in the
future.
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
[dwg: Check qtest_enabled() to suppress bogus warnings from make check]
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_vio.c | 22 +++++++++++++++++++++-
qemu-doc.texi | 12 ++++++++++--
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 472dd6f33a..4555c648a8 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -22,6 +22,7 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
+#include "qapi/visitor.h"
#include "hw/hw.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
@@ -32,6 +33,7 @@
#include "sysemu/kvm.h"
#include "sysemu/device_tree.h"
#include "kvm_ppc.h"
+#include "sysemu/qtest.h"
#include "hw/ppc/spapr.h"
#include "hw/ppc/spapr_vio.h"
@@ -41,8 +43,26 @@
#include <libfdt.h>
+static void spapr_vio_getset_irq(Object *obj, Visitor *v, const char *name,
+ void *opaque, Error **errp)
+{
+ Property *prop = opaque;
+ uint32_t *ptr = qdev_get_prop_ptr(DEVICE(obj), prop);
+
+ if (!qtest_enabled()) {
+ warn_report(TYPE_VIO_SPAPR_DEVICE " '%s' property is deprecated",
name);
+ }
+ visit_type_uint32(v, name, ptr, errp);
+}
+
+static const PropertyInfo spapr_vio_irq_propinfo = {
+ .name = "irq",
+ .get = spapr_vio_getset_irq,
+ .set = spapr_vio_getset_irq,
+};
+
static Property spapr_vio_props[] = {
- DEFINE_PROP_UINT32("irq", VIOsPAPRDevice, irq, 0), \
+ DEFINE_PROP("irq", VIOsPAPRDevice, irq, spapr_vio_irq_propinfo, uint32_t),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 9aff6b4ea9..cd05760cac 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -2958,13 +2958,21 @@ support page sizes < 4096 any longer.
@section System emulator machines
address@hidden Block device options
address@hidden Device options
address@hidden "backing": "" (since 2.12.0)
address@hidden Block device options
+
address@hidden "backing": "" (since 2.12.0)
In order to prevent QEMU from automatically opening an image's backing
chain, use ``"backing": null'' instead.
address@hidden vio-spapr-device device options
+
address@hidden "irq": "" (since 3.0.0)
+
+The ``irq'' property is obsoleted.
+
@node Supported build platforms
@appendix Supported build platforms
--
2.17.1
- [Qemu-ppc] [PULL 00/33] ppc-for-3.0 queue 20180612, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 01/33] ppc440_pcix: Fix a typo in setting a register (Coverity CID1390577), David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 02/33] macio: add trace-events to timer device, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 03/33] uninorth: remove token register from uninorth device, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 07/33] prep: fix keyboard for the 40p machine, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 11/33] osdep: powerpc64 align memory to allow 2MB radix THP page tables, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 10/33] spapr/vio: deprecate the "irq" property,
David Gibson <=
- [Qemu-ppc] [PULL 13/33] MAINTAINERS: Add entries for the MOS6522 VIA device, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 09/33] target/ppc: Allow privileged access to SPR_PCR, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 04/33] hw/ppc/spapr_drc: Replace error_setg(&error_abort) by error_report() + abort(), David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 06/33] 40p: remove pci_allow_0_address = true from 40p machine class, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 05/33] target/ppc: Use proper logging function for possible guest errors, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 08/33] target/ppc: Factor out the parsing in kvmppc_get_cpu_characteristics(), David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 16/33] ppc: remove obsolete macio_init() definition from mac.h, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 15/33] ppc: remove obsolete pci_pmac_init() definitions from mac.h, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 17/33] ppc: add missing FW_CFG_PPC_NVRAM_FLAT definition, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 14/33] hw/misc/mos6522: Add trailing '\n' to qemu_log() calls, David Gibson, 2018/06/12