...
...
36
36
37
Linux guest support was merged into the 6.13-rc1 kernel:
37
Linux guest support was merged into the 6.13-rc1 kernel:
38
https://git.kernel.org/torvalds/c/205032724226
38
https://git.kernel.org/torvalds/c/205032724226
39
39
40
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
40
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
41
Reviewed-by: Paul Durrant <paul@xen.org>
41
---
42
---
42
This is basically unchanged since the last time the structure was
43
v6:
43
changed in July, apart from fairly trivial cosmetic changes and now
44
• Rebase for DEFINE_PROP_END_OF_LIST removal and sysemu→system
44
importing the header file from Linux.
45
rename.
45
46
46
47
v5:
47
v5:
48
• Trivial simplification to AML generation.
48
• Trivial simplification to AML generation.
49
• Import vmclock-abi.h from Linux now the guest support is merged.
49
• Import vmclock-abi.h from Linux now the guest support is merged.
50
50
...
...
58
v2:
58
v2:
59
• Change esterror/maxerror fields to nanoseconds.
59
• Change esterror/maxerror fields to nanoseconds.
60
• Change to officially assigned AMZNC10C ACPI HID.
60
• Change to officially assigned AMZNC10C ACPI HID.
61
• Fix little-endian handling of fields in update.
61
• Fix little-endian handling of fields in update.
62
62
63
63
hw/acpi/Kconfig | 5 +
64
hw/acpi/Kconfig | 5 +
64
hw/acpi/meson.build | 1 +
65
hw/acpi/meson.build | 1 +
65
hw/acpi/vmclock.c | 184 +++++++++++++++++++
66
hw/acpi/vmclock.c | 179 ++++++++++++++++++
66
hw/i386/Kconfig | 1 +
67
hw/i386/Kconfig | 1 +
67
hw/i386/acpi-build.c | 10 +-
68
hw/i386/acpi-build.c | 10 +-
68
include/hw/acpi/vmclock.h | 34 ++++
69
include/hw/acpi/vmclock.h | 34 ++++
69
include/standard-headers/linux/vmclock-abi.h | 182 ++++++++++++++++++
70
include/standard-headers/linux/vmclock-abi.h | 182 +++++++++++++++++++
70
scripts/update-linux-headers.sh | 1 +
71
scripts/update-linux-headers.sh | 1 +
71
8 files changed, 417 insertions(+), 1 deletion(-)
72
8 files changed, 412 insertions(+), 1 deletion(-)
72
create mode 100644 hw/acpi/vmclock.c
73
create mode 100644 hw/acpi/vmclock.c
73
create mode 100644 include/hw/acpi/vmclock.h
74
create mode 100644 include/hw/acpi/vmclock.h
74
create mode 100644 include/standard-headers/linux/vmclock-abi.h
75
create mode 100644 include/standard-headers/linux/vmclock-abi.h
75
76
76
diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
77
diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
...
...
127
+#include "hw/acpi/vmclock.h"
128
+#include "hw/acpi/vmclock.h"
128
+#include "hw/nvram/fw_cfg.h"
129
+#include "hw/nvram/fw_cfg.h"
129
+#include "hw/qdev-properties.h"
130
+#include "hw/qdev-properties.h"
130
+#include "hw/qdev-properties-system.h"
131
+#include "hw/qdev-properties-system.h"
131
+#include "migration/vmstate.h"
132
+#include "migration/vmstate.h"
132
+#include "sysemu/reset.h"
133
+#include "system/reset.h"
133
+
134
+
134
+#include "standard-headers/linux/vmclock-abi.h"
135
+#include "standard-headers/linux/vmclock-abi.h"
135
+
136
+
136
+void vmclock_build_acpi(VmclockState *vms, GArray *table_data,
137
+void vmclock_build_acpi(VmclockState *vms, GArray *table_data,
137
+ BIOSLinker *linker, const char *oem_id)
138
+ BIOSLinker *linker, const char *oem_id)
...
...
261
+ qemu_register_reset(vmclock_handle_reset, vms);
262
+ qemu_register_reset(vmclock_handle_reset, vms);
262
+
263
+
263
+ vmclock_update_guest(vms);
264
+ vmclock_update_guest(vms);
264
+}
265
+}
265
+
266
+
266
+static Property vmclock_device_properties[] = {
267
+ DEFINE_PROP_END_OF_LIST(),
268
+};
269
+
270
+static void vmclock_device_class_init(ObjectClass *klass, void *data)
267
+static void vmclock_device_class_init(ObjectClass *klass, void *data)
271
+{
268
+{
272
+ DeviceClass *dc = DEVICE_CLASS(klass);
269
+ DeviceClass *dc = DEVICE_CLASS(klass);
273
+
270
+
274
+ dc->vmsd = &vmstate_vmclock;
271
+ dc->vmsd = &vmstate_vmclock;
275
+ dc->realize = vmclock_realize;
272
+ dc->realize = vmclock_realize;
276
+ device_class_set_props(dc, vmclock_device_properties);
277
+ dc->hotpluggable = false;
273
+ dc->hotpluggable = false;
278
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
274
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
279
+}
275
+}
280
+
276
+
281
+static const TypeInfo vmclock_device_info = {
277
+static const TypeInfo vmclock_device_info = {
...
...
306
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
302
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
307
index XXXXXXX..XXXXXXX 100644
303
index XXXXXXX..XXXXXXX 100644
308
--- a/hw/i386/acpi-build.c
304
--- a/hw/i386/acpi-build.c
309
+++ b/hw/i386/acpi-build.c
305
+++ b/hw/i386/acpi-build.c
310
@@ -XXX,XX +XXX,XX @@
306
@@ -XXX,XX +XXX,XX @@
311
#include "sysemu/tpm.h"
307
#include "system/tpm.h"
312
#include "hw/acpi/tpm.h"
308
#include "hw/acpi/tpm.h"
313
#include "hw/acpi/vmgenid.h"
309
#include "hw/acpi/vmgenid.h"
314
+#include "hw/acpi/vmclock.h"
310
+#include "hw/acpi/vmclock.h"
315
#include "hw/acpi/erst.h"
311
#include "hw/acpi/erst.h"
316
#include "hw/acpi/piix4.h"
312
#include "hw/acpi/piix4.h"
317
#include "sysemu/tpm_backend.h"
313
#include "system/tpm_backend.h"
318
@@ -XXX,XX +XXX,XX @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
314
@@ -XXX,XX +XXX,XX @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
319
uint8_t *u;
315
uint8_t *u;
320
GArray *tables_blob = tables->table_data;
316
GArray *tables_blob = tables->table_data;
321
AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL };
317
AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL };
322
- Object *vmgenid_dev;
318
- Object *vmgenid_dev;
...
...
diff view generated by jsdifflib