hw/i386/pc: Remove deprecated 4.0 machines
cover hw/i386/pc: Remove deprecated 4.0 machines
1 y.o. dust Thomas asked me to rebase & post:
The versioned 'pc' and 'q35' machines up to 4.0 been marked as deprecated two releases ago, and are older than 6 years, so according to our support policy we can remove them.
Based-on: <[email protected]>
"hw/i386/pc: Remove deprecated 3.1 machines"
Philippe Mathieu-Daudé (6):
hw/i386/pc: Remove deprecated pc-q35-4.0[.1] and pc-i440fx-4.0
machines
system/hostmem: Remove HostMemoryBackend::use_canonical_path field hw/i386/pc: Remove pc_compat_4_0[] array hw/core/machine: Remove the hw_compat_4_0[] array hw/virtio: Remove VirtIOBalloon::qemu_4_0_config_size field hw/rtc/pl031: : Remove PL031State::migrate_tick_offset field
qapi/qom.json | 8 +------ include/hw/core/boards.h | 3 --- include/hw/i386/pc.h | 3 --- include/hw/rtc/pl031.h | 1 - include/hw/virtio/virtio-balloon.h | 1 - include/system/hostmem.h | 2 +- backends/hostmem.c | 34 ------------------------------ hw/core/machine.c | 12 ----------- hw/i386/pc.c | 3 --- hw/i386/pc_piix.c | 11 ---------- hw/i386/pc_q35.c | 25 ---------------------- hw/rtc/pl031.c | 22 ------------------- hw/virtio/virtio-balloon.c | 5 ----- qemu-options.hx | 10 --------- 14 files changed, 2 insertions(+), 138 deletions(-)
Signature · 1 line
2.52.0
PATCH 1/6 hw/i386/pc: Remove deprecated pc-q35-4.0[.1] and pc-i440fx-4.0 machines
These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") they can now be removed.
--- hw/i386/pc_piix.c | 11 ----------- hw/i386/pc_q35.c | 25 ------------------------- 2 files changed, 36 deletions(-)
hw/i386/pc_piix.c +0 -11
@@ -644,17 +644,6 @@ static void pc_i440fx_machine_4_1_options(MachineClass *m)DEFINE_I440FX_MACHINE (4 ,1 ); -static void pc_i440fx_machine_4_0_options (MachineClass *m) -{ -PCMachineClass *pcmc =PC_MACHINE_CLASS (m); -pc_i440fx_machine_4_1_options (m); - pcmc->default_cpu_version =CPU_VERSION_LEGACY ; -compat_props_add (m->compat_props, hw_compat_4_0, hw_compat_4_0_len); -compat_props_add (m->compat_props, pc_compat_4_0, pc_compat_4_0_len); -} - -DEFINE_I440FX_MACHINE (4 ,0 ); -#ifdef CONFIG_XEN static void xenfv_machine_4_2_options (MachineClass *m) {
hw/i386/pc_q35.c +0 -25
@@ -575,28 +575,3 @@ static void pc_q35_machine_4_1_options(MachineClass *m) }DEFINE_Q35_MACHINE (4 ,1 ); - -static void pc_q35_machine_4_0_1_options (MachineClass *m) -{ -PCMachineClass *pcmc =PC_MACHINE_CLASS (m); -pc_q35_machine_4_1_options (m); - pcmc->default_cpu_version =CPU_VERSION_LEGACY ; -/* -* This is the default machine for the 4.0-stable branch. It is basically -* a 4.0 that doesn't use split irqchip by default. It MUST hence apply the -* 4.0 compat props. -*/ -compat_props_add (m->compat_props, hw_compat_4_0, hw_compat_4_0_len); -compat_props_add (m->compat_props, pc_compat_4_0, pc_compat_4_0_len); -} - -DEFINE_Q35_MACHINE_BUGFIX (4 ,0 ,1 ); - -static void pc_q35_machine_4_0_options (MachineClass *m) -{ -pc_q35_machine_4_0_1_options (m); - m->default_kernel_irqchip_split = true; -/* Compat props are applied by the 4.0.1 machine */ -} - -DEFINE_Q35_MACHINE (4 ,0 );
Signature · 1 line
2.52.0
Re: [PATCH 1/6] hw/i386/pc: Remove deprecated pc-q35-4.0[.1] and pc-i440fx-4.0 machines
Quoted 10 lines · Philippe Mathieu-Daudé
These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit
ce80c4fa6ff"docs: document special exception for machine type deprecation & removal") they can now be removed.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i386/pc_piix.c | 11 ----------- hw/i386/pc_q35.c | 25 ------------------------- 2 files changed, 36 deletions(-)
PATCH 2/6 system/hostmem: Remove HostMemoryBackend::use_canonical_path field
In reply to Philippe Mathieu-DaudéThe HostMemoryBackend::use_canonical_path boolean was only set in the hw_compat_3_1[] array, via the 'x-use-canonical-path-for-ramblock-id=true' property. We removed all machines using that array, but the comment added in commit 8db0b20415c ("machine: add missing doc for memory-backend option") requested to not remove this property "as long as 4.0 and older machine types exists". Previous commit removed the last machines in this range, we can now remove that property and all the code around it.
--- qapi/qom.json | 8 +------- include/system/hostmem.h | 2 +- backends/hostmem.c | 34 ---------------------------------- qemu-options.hx | 10 ---------- 4 files changed, 2 insertions(+), 52 deletions(-)
qapi/qom.json +1 -7
@@ -660,11 +660,6 @@ # # @size: size of the memory region in bytes # -# @x-use-canonical-path-for-ramblock-id: if true, the canonical path -# is used for ramblock-id. Disable this for 4.0 machine types or -# older to allow migration with newer QEMU versions. -# (default: false generally, but true for machine types <= 4.0) -# # .. note:: prealloc=true and reserve=false cannot be set at the same # time. With reserve=true, the behavior depends on the operating # system: for example, Linux will not reserve swap space for shared
@@ -683,8 +678,7 @@ '*prealloc-context': 'str', '*share': 'bool', '*reserve': 'bool', - 'size': 'size', - '*x-use-canonical-path-for-ramblock-id': 'bool' } } + 'size': 'size' } } ## # @MemoryBackendFileProperties:
include/system/hostmem.h +1 -1
@@ -74,7 +74,7 @@ struct HostMemoryBackend {/* protected */ uint64_t size; -bool merge, dump, use_canonical_path; +bool merge, dump;bool prealloc, is_mapped, share, reserve;bool guest_memfd, aligned;uint32_t prealloc_threads;
backends/hostmem.c +0 -34
@@ -40,10 +40,6 @@ QEMU_BUILD_BUG_ON(HOST_MEM_POLICY_INTERLEAVE != MPOL_INTERLEAVE);char *host_memory_backend_get_name (HostMemoryBackend *backend) { -if (!backend->use_canonical_path) { -return g_strdup (object_get_canonical_path_component (OBJECT (backend))); - } -return object_get_canonical_path (OBJECT (backend)); }
@@ -484,23 +480,6 @@ static void host_memory_backend_set_reserve(Object *o, bool value, Error **errp) }#endif /* CONFIG_LINUX */ -static bool -host_memory_backend_get_use_canonical_path (Object *obj,Error **errp) -{ -HostMemoryBackend *backend =MEMORY_BACKEND (obj); - -return backend->use_canonical_path; -} - -static void -host_memory_backend_set_use_canonical_path (Object *obj,bool value, -Error **errp) -{ -HostMemoryBackend *backend =MEMORY_BACKEND (obj); - - backend->use_canonical_path = value; -} -static void host_memory_backend_class_init (ObjectClass *oc,const void *data) {
@@ -563,19 +542,6 @@ host_memory_backend_class_init(ObjectClass *oc, const void *data)object_class_property_set_description (oc,"reserve" ,"Reserve swap space (or huge pages) if applicable" );#endif /* CONFIG_LINUX */ -/* -* Do not delete/rename option. This option must be considered stable -* (as if it didn't have the 'x-' prefix including deprecation period) as -* long as 4.0 and older machine types exists. -* Option will be used by upper layers to override (disable) canonical path -* for ramblock-id set by compat properties on old machine types ( <= 4.0), -* to keep migration working when backend is used for main RAM with -* -machine memory-backend= option (main RAM historically used prefix-less -* ramblock-id). -*/ -object_class_property_add_bool (oc,"x-use-canonical-path-for-ramblock-id" , - host_memory_backend_get_use_canonical_path, - host_memory_backend_set_use_canonical_path); }static const TypeInfo host_memory_backend_info = {
qemu-options.hx +0 -10
@@ -137,16 +137,6 @@ SRST * as backend id one shall use value of 'default-ram-id', advertised by machine type (available via ``query-machines`` QMP command), if migration to/from old QEMU (<5.0) is expected. - * for machine types 4.0 and older, user shall - use ``x-use-canonical-path-for-ramblock-id=off`` backend option - if migration to/from old QEMU (<5.0) is expected. - - For example: - :: - - -object memory-backend-ram,id=pc.ram,size=512M,x-use-canonical-path-for-ramblock-id=off - -machine memory-backend=pc.ram - -m 512M ``cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.interleave-granularity=granularity]`` Define a CXL Fixed Memory Window (CFMW).
Signature · 1 line
2.52.0
Re: [PATCH 2/6] system/hostmem: Remove HostMemoryBackend::use_canonical_path field
Quoted 63 lines · Philippe Mathieu-Daudé
The
HostMemoryBackend::use_canonical_pathboolean was only set in the hw_compat_3_1[] array, via the 'x-use-canonical-path-for-ramblock-id=true' property. We removed all machines using that array, but the comment added in commit8db0b20415c("machine: add missing doc for memory-backend option") requested to not remove this property "as long as 4.0 and older machine types exists". Previous commit removed the last machines in this range, we can now remove that property and all the code around it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- qapi/qom.json | 8 +------- include/system/hostmem.h | 2 +- backends/hostmem.c | 34 ---------------------------------- qemu-options.hx | 10 ---------- 4 files changed, 2 insertions(+), 52 deletions(-)qapi/qom.json +1
-7@@ -660,11 +660,6 @@ # # @size: size of the memory region in bytes # -# @x-use-canonical-path-for-ramblock-id: if true, the canonical path -# is used for ramblock-id. Disable this for 4.0 machine types or -# older to allow migration with newer QEMU versions. -# (default: false generally, but true for machine types <= 4.0) -# # .. note:: prealloc=true and reserve=false cannot be set at the same # time. With reserve=true, the behavior depends on the operating # system: for example, Linux will not reserve swap space for shared@@ -683,8 +678,7 @@ '*prealloc-context': 'str', '*share': 'bool', '*reserve': 'bool', - 'size': 'size', - '*x-use-canonical-path-for-ramblock-id': 'bool' } } + 'size': 'size' } } ## # @MemoryBackendFileProperties:include/system/hostmem.h +1
-1@@ -74,7 +74,7 @@ struct HostMemoryBackend {/* protected */ uint64_t size; -bool merge, dump, use_canonical_path; +bool merge, dump;bool prealloc, is_mapped, share, reserve;bool guest_memfd, aligned;uint32_t prealloc_threads;backends/hostmem.c +0
-0
backends/hostmem.c QEMU_BUILD_BUG_ON(HOST_MEM_POLICY_INTERLEAVE != MPOL_INTERLEAVE); · line 45
Quoted 6 lines
backends/hostmem.c +0
-3@@ -40,10 +40,6 @@ QEMU_BUILD_BUG_ON(HOST_MEM_POLICY_INTERLEAVE != MPOL_INTERLEAVE);char *host_memory_backend_get_name (HostMemoryBackend *backend) { -if (!backend->use_canonical_path) { -return g_strdup (object_get_canonical_path_component (OBJECT (backend))); - }
I'm a little bit confused by this one here. If I've got that right, the flag was set to "true" for the old QEMU machines <= 3.1, and it is set to false by default for new machines? If so, shouldn't we rather always use the above return and remove the one below instead?
Quoted 28 lines
backends/hostmem.c +0
-17return object_get_canonical_path (OBJECT (backend)); }@@ -484,23 +480,6 @@ static void host_memory_backend_set_reserve(Object *o, bool value, Error **errp) }#endif /* CONFIG_LINUX */ -static bool -host_memory_backend_get_use_canonical_path (Object *obj,Error **errp) -{ -HostMemoryBackend *backend =MEMORY_BACKEND (obj); - -return backend->use_canonical_path; -} - -static void -host_memory_backend_set_use_canonical_path (Object *obj,bool value, -Error **errp) -{ -HostMemoryBackend *backend =MEMORY_BACKEND (obj); - - backend->use_canonical_path = value; -} -static void host_memory_backend_class_init (ObjectClass *oc,const void *data) {
backends/hostmem.c host_memory_backend_class_init(ObjectClass *oc, const void *data) · line 569
Quoted 7 lines
backends/hostmem.c +0
-4@@ -563,19 +542,6 @@ host_memory_backend_class_init(ObjectClass *oc, const void *data)object_class_property_set_description (oc,"reserve" ,"Reserve swap space (or huge pages) if applicable" );#endif /* CONFIG_LINUX */ -/* -* Do not delete/rename option. This option must be considered stable -* (as if it didn't have the 'x-' prefix including deprecation period) as -* long as 4.0 and older machine types exists.
By the way, this option seems to be used by libvirt - we should maybe make sure that its removal does not break libvirt by accident...?
Thomas
Re: [PATCH 2/6] system/hostmem: Remove HostMemoryBackend::use_canonical_path field
Quoted 36 lines · Thomas Huth via Devel
Quoted 28 lines · Philippe Mathieu-Daudé
The
HostMemoryBackend::use_canonical_pathboolean was only set in the hw_compat_3_1[] array, via the 'x-use-canonical-path-for-ramblock-id=true' property. We removed all machines using that array, but the comment added in commit8db0b20415c("machine: add missing doc for memory-backend option") requested to not remove this property "as long as 4.0 and older machine types exists". Previous commit removed the last machines in this range, we can now remove that property and all the code around it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
qapi/qom.json | 8 +-------include/system/hostmem.h| 2 +-
backends/hostmem.c | 34 ---------------------------------- qemu-options.hx | 10 ----------4 files changed, 2 insertions(+), 52 deletions(-)backends/hostmem.c +0
-2@@ -563,19 +542,6 @@ host_memory_backend_class_init(ObjectClass *oc, const void *data) object_class_property_set_description(oc, "reserve", "Reserve swap space (or huge pages) if applicable"); #endif /* CONFIG_LINUX */ - /* -* Do not delete/rename option. This option must be considered Quoted 4 lines
stable
- * (as if it didn't have the 'x-' prefix including deprecation period) as
- * long as 4.0 and older machine types exists.By the way, this option seems to be used by libvirt - we should maybe make sure that its removal does not break libvirt by accident...?
Quoted 2 lines
Thomas
Thanks Thomas for raising this. Libvirt only sets this to false, it never set it to true. And we have a code that detects whether this attribute is present. IIUC false is the default (and after these patches the behaviour will remain as the same as with 'false' set). So ACK from libvirt's POV.
Michal
PATCH 3/6 hw/i386/pc: Remove pc_compat_4_0[] array
In reply to Philippe Mathieu-DaudéThe pc_compat_4_0[] array was only used by the pc-q35-4.0, pc-q35-4.0.1 and pc-i440fx-4.0 machines, which got removed. Remove it.
--- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 3 --- 2 files changed, 6 deletions(-)
include/hw/i386/pc.h +0 -3
@@ -268,9 +268,6 @@ extern const size_t pc_compat_4_2_len;extern GlobalProperty pc_compat_4_1[];extern const size_t pc_compat_4_1_len; -extern GlobalProperty pc_compat_4_0[]; -extern const size_t pc_compat_4_0_len; -#define DEFINE_PC_MACHINE (suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, \ const void *data) \
hw/i386/pc.c +0 -3
@@ -186,9 +186,6 @@ const size_t pc_compat_4_2_len = G_N_ELEMENTS(pc_compat_4_2);GlobalProperty pc_compat_4_1[] = {};const size_t pc_compat_4_1_len =G_N_ELEMENTS (pc_compat_4_1); -GlobalProperty pc_compat_4_0[] = {}; -const size_t pc_compat_4_0_len =G_N_ELEMENTS (pc_compat_4_0); -/* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
Signature · 1 line
2.52.0
Re: [PATCH 3/6] hw/i386/pc: Remove pc_compat_4_0[] array
Quoted 29 lines · Philippe Mathieu-Daudé
The pc_compat_4_0[] array was only used by the pc-q35-4.0, pc-q35-4.0.1 and pc-i440fx-4.0 machines, which got removed. Remove it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 3 --- 2 files changed, 6 deletions(-)include/hw/i386/pc.h +0
-3@@ -268,9 +268,6 @@ extern const size_t pc_compat_4_2_len;extern GlobalProperty pc_compat_4_1[];extern const size_t pc_compat_4_1_len; -extern GlobalProperty pc_compat_4_0[]; -extern const size_t pc_compat_4_0_len; -#define DEFINE_PC_MACHINE (suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, \ const void *data) \hw/i386/pc.c +0
-0
hw/i386/pc.c const size_t pc_compat_4_2_len = G_N_ELEMENTS(pc_compat_4_2); · line 190
Quoted 5 lines
hw/i386/pc.c +0
-2@@ -186,9 +186,6 @@ const size_t pc_compat_4_2_len = G_N_ELEMENTS(pc_compat_4_2);GlobalProperty pc_compat_4_1[] = {};const size_t pc_compat_4_1_len =G_N_ELEMENTS (pc_compat_4_1); -GlobalProperty pc_compat_4_0[] = {}; -const size_t pc_compat_4_0_len =G_N_ELEMENTS (pc_compat_4_0);
PATCH 4/6 hw/core/machine: Remove the hw_compat_4_0[] array
In reply to Philippe Mathieu-DaudéThe hw_compat_4_0[] array was only used by the pc-q35-4.0 and pc-i440fx-4.0 machines, which got removed. Remove it.
--- include/hw/core/boards.h | 3 --- hw/core/machine.c | 12 ------------ 2 files changed, 15 deletions(-)
include/hw/core/boards.h +0 -3
@@ -864,7 +864,4 @@ extern const size_t hw_compat_4_2_len;extern GlobalProperty hw_compat_4_1[];extern const size_t hw_compat_4_1_len; -extern GlobalProperty hw_compat_4_0[]; -extern const size_t hw_compat_4_0_len; -#endif
hw/core/machine.c +0 -12
@@ -209,18 +209,6 @@ GlobalProperty hw_compat_4_1[] = { };const size_t hw_compat_4_1_len =G_N_ELEMENTS (hw_compat_4_1); -GlobalProperty hw_compat_4_0[] = { - {"VGA" ,"edid" ,"false" }, - {"secondary-vga" ,"edid" ,"false" }, - {"bochs-display" ,"edid" ,"false" }, - {"virtio-vga" ,"edid" ,"false" }, - {"virtio-gpu-device" ,"edid" ,"false" }, - {"virtio-device" ,"use-started" ,"false" }, - {"virtio-balloon-device" ,"qemu-4-0-config-size" ,"true" }, - {"pl031" ,"migrate-tick-offset" ,"false" }, -}; -const size_t hw_compat_4_0_len =G_N_ELEMENTS (hw_compat_4_0); -MachineState *current_machine;static char *machine_get_kernel (Object *obj,Error **errp)
Signature · 1 line
2.52.0
Re: [PATCH 4/6] hw/core/machine: Remove the hw_compat_4_0[] array
Quoted 30 lines · Philippe Mathieu-Daudé
The hw_compat_4_0[] array was only used by the pc-q35-4.0 and pc-i440fx-4.0 machines, which got removed. Remove it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/core/boards.h | 3 --- hw/core/machine.c | 12 ------------ 2 files changed, 15 deletions(-)include/hw/core/boards.h +0
-3@@ -864,7 +864,4 @@ extern const size_t hw_compat_4_2_len;extern GlobalProperty hw_compat_4_1[];extern const size_t hw_compat_4_1_len; -extern GlobalProperty hw_compat_4_0[]; -extern const size_t hw_compat_4_0_len; -#endif hw/core/machine.c +0
-1@@ -209,18 +209,6 @@ GlobalProperty hw_compat_4_1[] = { };const size_t hw_compat_4_1_len =G_N_ELEMENTS (hw_compat_4_1); -GlobalProperty hw_compat_4_0[] = {
hw/core/machine.c GlobalProperty hw_compat_4_1[] = { · line 222
Quoted 10 lines
hw/core/machine.c +0
-10- { "VGA", "edid", "false" }, - { "secondary-vga", "edid", "false" }, - { "bochs-display", "edid", "false" }, - { "virtio-vga", "edid", "false" }, - { "virtio-gpu-device", "edid", "false" }, - { "virtio-device", "use-started", "false" }, - { "virtio-balloon-device", "qemu-4-0-config-size", "true" }, - { "pl031", "migrate-tick-offset", "false" }, -}; -const size_t hw_compat_4_0_len =G_N_ELEMENTS (hw_compat_4_0);
PATCH 5/6 hw/virtio: Remove VirtIOBalloon::qemu_4_0_config_size field
In reply to Philippe Mathieu-DaudéThe VirtIOBalloon::qemu_4_0_config_size boolean was only set in the hw_compat_4_0[] array, via the 'qemu-4-0-config-size=true' property. We removed all machines using that array, lets remove that property.
--- include/hw/virtio/virtio-balloon.h | 1 - hw/virtio/virtio-balloon.c | 5 ----- 2 files changed, 6 deletions(-)
include/hw/virtio/virtio-balloon.h +0 -1
@@ -70,7 +70,6 @@ struct VirtIOBalloon {int64_t stats_poll_interval;uint32_t host_features; -bool qemu_4_0_config_size;uint32_t poison_val;/* State of the resettable container */
hw/virtio/virtio-balloon.c +0 -5
@@ -708,9 +708,6 @@ static size_t virtio_balloon_config_size(VirtIOBalloon *s) {uint64_t features = s->host_features; -if (s->qemu_4_0_config_size) { -return sizeof (struct virtio_balloon_config ); - }if (virtio_has_feature (features,VIRTIO_BALLOON_F_PAGE_POISON )) {return sizeof (struct virtio_balloon_config ); }
@@ -1054,8 +1051,6 @@ static const Property virtio_balloon_properties[] = {* is disabled, resulting in QEMU 3.1 migration incompatibility. This * property retains this quirk for QEMU 4.1 machine types. */ -DEFINE_PROP_BOOL ("qemu-4-0-config-size" , VirtIOBalloon, - qemu_4_0_config_size, false), DEFINE_PROP_LINK("iothread", VirtIOBalloon, iothread, TYPE_IOTHREAD, IOThread *), };
Signature · 1 line
2.52.0
Re: [PATCH 5/6] hw/virtio: Remove VirtIOBalloon::qemu_4_0_config_size field
Quoted 10 lines · Philippe Mathieu-Daudé
The
VirtIOBalloon::qemu_4_0_config_sizeboolean was only set in the hw_compat_4_0[] array, via the 'qemu-4-0-config-size=true' property. We removed all machines using that array, lets remove that property.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/virtio/virtio-balloon.h | 1 - hw/virtio/virtio-balloon.c | 5 ----- 2 files changed, 6 deletions(-)
PATCH 6/6 hw/rtc/pl031: : Remove PL031State::migrate_tick_offset field
In reply to Philippe Mathieu-DaudéThe PL031State::migrate_tick_offset boolean was only set in the hw_compat_4_0[] array, via the 'migrate-tick-offset=false' property. We removed all machines using that array, lets remove that property, along with the pl031_properties[] array which is now empty.
--- include/hw/rtc/pl031.h | 1 - hw/rtc/pl031.c | 22 ---------------------- 2 files changed, 23 deletions(-)
include/hw/rtc/pl031.h +0 -1
@@ -36,7 +36,6 @@ struct PL031State {uint32_t tick_offset_vmstate;uint32_t tick_offset;bool tick_offset_migrated; -bool migrate_tick_offset;uint32_t mr;uint32_t lr;
hw/rtc/pl031.c +0 -22
@@ -278,18 +278,10 @@ static int pl031_tick_offset_post_load(void *opaque, int version_id)return 0 ; } -static bool pl031_tick_offset_needed (void *opaque) -{ -PL031State *s = opaque; - -return s->migrate_tick_offset; -} -static const VMStateDescription vmstate_pl031_tick_offset = { .name ="pl031/tick-offset" , .version_id =1 , .minimum_version_id =1 , - .needed = pl031_tick_offset_needed, .post_load = pl031_tick_offset_post_load, .fields = (const VMStateField []) {VMSTATE_UINT32 (tick_offset, PL031State),
@@ -319,25 +311,11 @@ static const VMStateDescription vmstate_pl031 = { } }; -static const Property pl031_properties[] = { -/* -* True to correctly migrate the tick offset of the RTC. False to -* obtain backward migration compatibility with older QEMU versions, -* at the expense of the guest RTC going backwards compared with the -* host RTC when the VM is saved/restored if using -rtc host. -* (Even if set to 'true' older QEMU can migrate forward to newer QEMU; -* 'false' also permits newer QEMU to migrate to older QEMU.) -*/ -DEFINE_PROP_BOOL ("migrate-tick-offset" , - PL031State, migrate_tick_offset, true), -}; -static void pl031_class_init (ObjectClass *klass,const void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_pl031; -device_class_set_props (dc, pl031_properties); }static const TypeInfo pl031_info = {
Signature · 1 line
2.52.0
Re: [PATCH 6/6] hw/rtc/pl031: : Remove PL031State::migrate_tick_offset field
Quoted 11 lines · Philippe Mathieu-Daudé
The
PL031State::migrate_tick_offsetboolean was only set in the hw_compat_4_0[] array, via the 'migrate-tick-offset=false' property. We removed all machines using that array, lets remove that property, along with the pl031_properties[] array which is now empty.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/rtc/pl031.h | 1 - hw/rtc/pl031.c | 22 ---------------------- 2 files changed, 23 deletions(-)
Quoted 4 lines · Philippe Mathieu-Daudé
Philippe Mathieu-Daudé (6):
hw/i386/pc: Remove deprecated pc-q35-4.0[.1] and pc-i440fx-4.0
machines
system/hostmem: RemoveHostMemoryBackend::use_canonical_pathfield
Except patch #2, series queued via hw-misc, thanks.
Quoted 4 lines
hw/i386/pc: Remove pc_compat_4_0[] array hw/core/machine: Remove the hw_compat_4_0[] array hw/virtio: Remove
VirtIOBalloon::qemu_4_0_config_sizefield hw/rtc/pl031: : RemovePL031State::migrate_tick_offsetfield