[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/29] i440fx: a qom property for i440FX state
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 16/29] i440fx: a qom property for i440FX state |
Date: |
Thu, 1 Nov 2012 08:04:18 -0500 |
Signed-off-by: Michael Roth <address@hidden>
---
hw/piix_pci.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index a4c32aa..563ded6 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -32,6 +32,8 @@
#include "xen.h"
#include "qidl.h"
+QIDL_ENABLE()
+
/*
* I440FX chipset data sheet.
* http://download.intel.com/design/chipsets/datashts/29054901.pdf
@@ -241,6 +243,23 @@ static int i440fx_pcihost_initfn(SysBusDevice *dev)
return 0;
}
+static void i440fx_get_state(Object *obj, Visitor *v, void *opaque,
+ const char *name, Error **errp)
+{
+ PCIDevice *pci = PCI_DEVICE(obj);
+ PCII440FXState *s = DO_UPCAST(PCII440FXState, dev, pci);
+ QIDL_VISIT_TYPE(PCII440FXState, v, &s, name, errp);
+}
+
+static void i440fx_set_state(Object *obj, Visitor *v, void *opaque,
+ const char *name, Error **errp)
+{
+ PCIDevice *pci = PCI_DEVICE(obj);
+ PCII440FXState *s = DO_UPCAST(PCII440FXState, dev, pci);
+ QIDL_VISIT_TYPE(PCII440FXState, v, &s, name, errp);
+ i440fx_post_load(s, -1);
+}
+
static int i440fx_initfn(PCIDevice *dev)
{
PCII440FXState *d = DO_UPCAST(PCII440FXState, dev, dev);
@@ -248,6 +267,11 @@ static int i440fx_initfn(PCIDevice *dev)
d->dev.config[I440FX_SMRAM] = 0x02;
cpu_smm_register(&i440fx_set_smm, d);
+
+ object_property_add(OBJECT(d), "state", "PCII440FXState",
+ i440fx_get_state, i440fx_set_state, NULL, NULL, NULL);
+ QIDL_SCHEMA_ADD_LINK(PCII440FXState, OBJECT(d), "state_schema", NULL);
+
return 0;
}
--
1.7.9.5
- [Qemu-devel] [PATCH 09/29] pci: add qom property for PCIBus instances, (continued)
- [Qemu-devel] [PATCH 09/29] pci: add qom property for PCIBus instances, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 07/29] pci: qidl_declare PCIDevice + PCIBus, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 05/29] rtc: use qidl-generated properties, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 21/29] pci_bridge_dev: qidl_declare PCIBridgeDev, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 17/29] piix3: qidl_declare PIIX3State, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 25/29] ide: add qom property for isa-ide state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 18/29] piix3: add qom property for PIIX3 state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 19/29] shpc: qidl_declare SHPCDevice, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 24/29] ide: qidl_declare ISAIDEState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 16/29] i440fx: a qom property for i440FX state,
Michael Roth <=
- [Qemu-devel] [PATCH 12/29] cirrus: add qom property for cirrus-vga state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 20/29] pci_bridge: qidl_declare PCIBridge, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 11/29] cirrus: qidl_declare PCICirrusVGAState + CirrusVGAState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 28/29] hpet: qidl_declare HPETState + HPETTimer, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 03/29] isa: qidl_declare ISADevice, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 08/29] pci: use qidl_declare'd properties for TYPE_PCI_DEVICE, Michael Roth, 2012/11/01