[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 06/10] hw/misc/vmcoreinfo: Move vmstate_vmcoreinfo[] around
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 06/10] hw/misc/vmcoreinfo: Move vmstate_vmcoreinfo[] around |
Date: |
Thu, 19 Dec 2024 16:38:53 +0100 |
In order to simplify the next commit,
move vmstate_vmcoreinfo[] around.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/misc/vmcoreinfo.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c
index 093bede655e..55f9d437a94 100644
--- a/hw/misc/vmcoreinfo.c
+++ b/hw/misc/vmcoreinfo.c
@@ -18,6 +18,20 @@
#include "migration/vmstate.h"
#include "hw/misc/vmcoreinfo.h"
+static const VMStateDescription vmstate_vmcoreinfo = {
+ .name = "vmcoreinfo",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (const VMStateField[]) {
+ VMSTATE_BOOL(has_vmcoreinfo, VMCoreInfoState),
+ VMSTATE_UINT16(vmcoreinfo.host_format, VMCoreInfoState),
+ VMSTATE_UINT16(vmcoreinfo.guest_format, VMCoreInfoState),
+ VMSTATE_UINT32(vmcoreinfo.size, VMCoreInfoState),
+ VMSTATE_UINT64(vmcoreinfo.paddr, VMCoreInfoState),
+ VMSTATE_END_OF_LIST()
+ },
+};
+
static void fw_cfg_vmci_write(void *opaque, off_t offset, size_t len)
{
VMCoreInfoState *s = opaque;
@@ -70,20 +84,6 @@ static void vmcoreinfo_realize(DeviceState *dev, Error
**errp)
vmcoreinfo_state = s;
}
-static const VMStateDescription vmstate_vmcoreinfo = {
- .name = "vmcoreinfo",
- .version_id = 1,
- .minimum_version_id = 1,
- .fields = (const VMStateField[]) {
- VMSTATE_BOOL(has_vmcoreinfo, VMCoreInfoState),
- VMSTATE_UINT16(vmcoreinfo.host_format, VMCoreInfoState),
- VMSTATE_UINT16(vmcoreinfo.guest_format, VMCoreInfoState),
- VMSTATE_UINT32(vmcoreinfo.size, VMCoreInfoState),
- VMSTATE_UINT64(vmcoreinfo.paddr, VMCoreInfoState),
- VMSTATE_END_OF_LIST()
- },
-};
-
static void vmcoreinfo_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
--
2.47.1
- [RFC PATCH 09/10] hw/misc/vmcoreinfo: Deprecate '-device vmcoreinfo', (continued)
- [RFC PATCH 09/10] hw/misc/vmcoreinfo: Deprecate '-device vmcoreinfo', Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 05/10] hw/misc/vmcoreinfo: Convert to three-phase reset interface, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 07/10] hw/misc/vmcoreinfo: Factor vmcoreinfo_device_realize() out, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 02/10] hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque', Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 08/10] hw/misc/vmcoreinfo: Implement 'vmcore-info' object, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH-for-10.2 10/10] hw/misc/vmcoreinfo: Remove legacy '-device vmcoreinfo', Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 06/10] hw/misc/vmcoreinfo: Move vmstate_vmcoreinfo[] around,
Philippe Mathieu-Daudé <=
- Re: [RFC PATCH 00/10] hw/misc/vmcoreinfo: Convert from QDev to plain Object, Daniel P . Berrangé, 2024/12/19