[libvirt] [PATCH 0/3] Remove deprecated pc-0.x machine types and related hacks

These have been on the deprecation list since a year now, so it's time to finally remove the pc-0.x machine types. We then can also remove some compatibility hacks in the devices, i.e. the "use_broken_id" in ac97 and "command_serr_enable" in PCI devices. Note that there is also the "rombar" property of the PCI devices which is now not required for the x86 machine types anymore. But it seems to me like this is still used by various people to bypass the ROM loading for PCI devices in certain cases, so I did not remove that property here yet. Thomas Huth (3): hw/i386: Remove the deprecated machines 0.12 up to 0.15 hw/audio: Remove the "use_broken_id" hack from the AC97 device hw/pci: Remove the "command_serr_enable" property hw/audio/ac97.c | 9 ----- hw/i386/pc_piix.c | 82 ------------------------------------------- hw/pci/pci.c | 6 +--- include/hw/pci/pci.h | 3 -- qemu-deprecated.texi | 2 +- tests/cpu-plug-test.c | 6 +--- 6 files changed, 3 insertions(+), 105 deletions(-) -- 2.18.1

They can't be used reliable for live-migration anymore (see https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg04516.html for details) and have been marked as deprecated since QEMU v4.0, so time to remove them now. And while we're at it, mark the remaining pc-1.x machine types as deprecated now, too, so that we finally only have "pc-i440fx" and "pc-q35" machine types left (apart from the non-versioned "isapc" and "microvm") once we removed them in a couple of releases. Signed-off-by: Thomas Huth <thuth@redhat.com> --- hw/i386/pc_piix.c | 82 ------------------------------------------- qemu-deprecated.texi | 2 +- tests/cpu-plug-test.c | 6 +--- 3 files changed, 2 insertions(+), 88 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1bd70d1abb..59ac9d82c9 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -364,12 +364,6 @@ static void pc_compat_1_2(MachineState *machine) x86_cpu_change_kvm_default("kvm-pv-eoi", NULL); } -/* PC compat function for pc-0.12 and pc-0.13 */ -static void pc_compat_0_13(MachineState *machine) -{ - pc_compat_1_2(machine); -} - static void pc_init_isa(MachineState *machine) { pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, TYPE_I440FX_PCI_DEVICE); @@ -800,82 +794,6 @@ DEFINE_I440FX_MACHINE(v1_0, "pc-1.0", pc_compat_1_2, pc_i440fx_1_0_machine_options); -static void pc_i440fx_0_15_machine_options(MachineClass *m) -{ - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.15") - }; - - pc_i440fx_1_0_machine_options(m); - m->hw_version = "0.15"; - m->deprecation_reason = "use a newer machine type instead"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); -} - -DEFINE_I440FX_MACHINE(v0_15, "pc-0.15", pc_compat_1_2, - pc_i440fx_0_15_machine_options); - - -static void pc_i440fx_0_14_machine_options(MachineClass *m) -{ - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.14") - { "virtio-blk-pci", "event_idx", "off" }, - { "virtio-serial-pci", "event_idx", "off" }, - { "virtio-net-pci", "event_idx", "off" }, - { "virtio-balloon-pci", "event_idx", "off" }, - { "qxl", "revision", "2" }, - { "qxl-vga", "revision", "2" }, - }; - - pc_i440fx_0_15_machine_options(m); - m->hw_version = "0.14"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); -} - -DEFINE_I440FX_MACHINE(v0_14, "pc-0.14", pc_compat_1_2, - pc_i440fx_0_14_machine_options); - -static void pc_i440fx_0_13_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.13") - { TYPE_PCI_DEVICE, "command_serr_enable", "off" }, - { "AC97", "use_broken_id", "1" }, - { "virtio-9p-pci", "vectors", "0" }, - { "VGA", "rombar", "0" }, - { "vmware-svga", "rombar", "0" }, - }; - - pc_i440fx_0_14_machine_options(m); - m->hw_version = "0.13"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); - pcmc->kvmclock_enabled = false; -} - -DEFINE_I440FX_MACHINE(v0_13, "pc-0.13", pc_compat_0_13, - pc_i440fx_0_13_machine_options); - -static void pc_i440fx_0_12_machine_options(MachineClass *m) -{ - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.12") - { "virtio-serial-pci", "max_ports", "1" }, - { "virtio-serial-pci", "vectors", "0" }, - { "usb-mouse", "serial", "1" }, - { "usb-tablet", "serial", "1" }, - { "usb-kbd", "serial", "1" }, - }; - - pc_i440fx_0_13_machine_options(m); - m->hw_version = "0.12"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); -} - -DEFINE_I440FX_MACHINE(v0_12, "pc-0.12", pc_compat_0_13, - pc_i440fx_0_12_machine_options); - typedef struct { uint16_t gpu_device_id; uint16_t pch_device_id; diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index e407cc085e..2850f9a520 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -261,7 +261,7 @@ The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or @section System emulator machines -@subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0) +@subsection pc-1.0, pc-1.1, pc-1.2 and pc-1.3 (since 5.0) These machine types are very old and likely can not be used for live migration from old QEMU versions anymore. A newer machine type should be used instead. diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c index 30e514bbfb..e8ffbbce4b 100644 --- a/tests/cpu-plug-test.c +++ b/tests/cpu-plug-test.c @@ -148,11 +148,7 @@ static void add_pc_test_case(const char *mname) (strcmp(mname, "pc-1.3") == 0) || (strcmp(mname, "pc-1.2") == 0) || (strcmp(mname, "pc-1.1") == 0) || - (strcmp(mname, "pc-1.0") == 0) || - (strcmp(mname, "pc-0.15") == 0) || - (strcmp(mname, "pc-0.14") == 0) || - (strcmp(mname, "pc-0.13") == 0) || - (strcmp(mname, "pc-0.12") == 0)) { + (strcmp(mname, "pc-1.0") == 0)) { path = g_strdup_printf("cpu-plug/%s/init/%ux%ux%u&maxcpus=%u", mname, data->sockets, data->cores, data->threads, data->maxcpus); -- 2.18.1

On 12/5/19 10:06 AM, Thomas Huth wrote:
They can't be used reliable for live-migration anymore (see https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg04516.html for details) and have been marked as deprecated since QEMU v4.0, so time to remove them now.
And while we're at it, mark the remaining pc-1.x machine types as deprecated now, too, so that we finally only have "pc-i440fx" and "pc-q35" machine types left (apart from the non-versioned "isapc" and "microvm") once we removed them in a couple of releases.
Did you mean s/removed/remove/ ? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

On 05/12/2019 23.00, Eric Blake wrote:
On 12/5/19 10:06 AM, Thomas Huth wrote:
They can't be used reliable for live-migration anymore (see https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg04516.html for details) and have been marked as deprecated since QEMU v4.0, so time to remove them now.
And while we're at it, mark the remaining pc-1.x machine types as deprecated now, too, so that we finally only have "pc-i440fx" and "pc-q35" machine types left (apart from the non-versioned "isapc" and "microvm") once we removed them in a couple of releases.
Did you mean s/removed/remove/ ?
Yes :-) Thomas

On 12/5/19 5:06 PM, Thomas Huth wrote:
They can't be used reliable for live-migration anymore (see https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg04516.html
"reliably"? I'd keep the reference, but also paste Paolo's 7 lines here. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
for details) and have been marked as deprecated since QEMU v4.0, so time to remove them now.
And while we're at it, mark the remaining pc-1.x machine types as deprecated now, too, so that we finally only have "pc-i440fx" and "pc-q35" machine types left (apart from the non-versioned "isapc" and "microvm") once we removed them in a couple of releases.
Signed-off-by: Thomas Huth <thuth@redhat.com> --- hw/i386/pc_piix.c | 82 ------------------------------------------- qemu-deprecated.texi | 2 +- tests/cpu-plug-test.c | 6 +--- 3 files changed, 2 insertions(+), 88 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1bd70d1abb..59ac9d82c9 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -364,12 +364,6 @@ static void pc_compat_1_2(MachineState *machine) x86_cpu_change_kvm_default("kvm-pv-eoi", NULL); }
-/* PC compat function for pc-0.12 and pc-0.13 */ -static void pc_compat_0_13(MachineState *machine) -{ - pc_compat_1_2(machine); -} - static void pc_init_isa(MachineState *machine) { pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, TYPE_I440FX_PCI_DEVICE); @@ -800,82 +794,6 @@ DEFINE_I440FX_MACHINE(v1_0, "pc-1.0", pc_compat_1_2, pc_i440fx_1_0_machine_options);
-static void pc_i440fx_0_15_machine_options(MachineClass *m) -{ - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.15") - }; - - pc_i440fx_1_0_machine_options(m); - m->hw_version = "0.15"; - m->deprecation_reason = "use a newer machine type instead"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); -} - -DEFINE_I440FX_MACHINE(v0_15, "pc-0.15", pc_compat_1_2, - pc_i440fx_0_15_machine_options); - - -static void pc_i440fx_0_14_machine_options(MachineClass *m) -{ - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.14") - { "virtio-blk-pci", "event_idx", "off" }, - { "virtio-serial-pci", "event_idx", "off" }, - { "virtio-net-pci", "event_idx", "off" }, - { "virtio-balloon-pci", "event_idx", "off" }, - { "qxl", "revision", "2" }, - { "qxl-vga", "revision", "2" }, - }; - - pc_i440fx_0_15_machine_options(m); - m->hw_version = "0.14"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); -} - -DEFINE_I440FX_MACHINE(v0_14, "pc-0.14", pc_compat_1_2, - pc_i440fx_0_14_machine_options); - -static void pc_i440fx_0_13_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.13") - { TYPE_PCI_DEVICE, "command_serr_enable", "off" }, - { "AC97", "use_broken_id", "1" }, - { "virtio-9p-pci", "vectors", "0" }, - { "VGA", "rombar", "0" }, - { "vmware-svga", "rombar", "0" }, - }; - - pc_i440fx_0_14_machine_options(m); - m->hw_version = "0.13"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); - pcmc->kvmclock_enabled = false; -} - -DEFINE_I440FX_MACHINE(v0_13, "pc-0.13", pc_compat_0_13, - pc_i440fx_0_13_machine_options); - -static void pc_i440fx_0_12_machine_options(MachineClass *m) -{ - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.12") - { "virtio-serial-pci", "max_ports", "1" }, - { "virtio-serial-pci", "vectors", "0" }, - { "usb-mouse", "serial", "1" }, - { "usb-tablet", "serial", "1" }, - { "usb-kbd", "serial", "1" }, - }; - - pc_i440fx_0_13_machine_options(m); - m->hw_version = "0.12"; - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); -} - -DEFINE_I440FX_MACHINE(v0_12, "pc-0.12", pc_compat_0_13, - pc_i440fx_0_12_machine_options); - typedef struct { uint16_t gpu_device_id; uint16_t pch_device_id; diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index e407cc085e..2850f9a520 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -261,7 +261,7 @@ The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
@section System emulator machines
-@subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0) +@subsection pc-1.0, pc-1.1, pc-1.2 and pc-1.3 (since 5.0)
These machine types are very old and likely can not be used for live migration from old QEMU versions anymore. A newer machine type should be used instead. diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c index 30e514bbfb..e8ffbbce4b 100644 --- a/tests/cpu-plug-test.c +++ b/tests/cpu-plug-test.c @@ -148,11 +148,7 @@ static void add_pc_test_case(const char *mname) (strcmp(mname, "pc-1.3") == 0) || (strcmp(mname, "pc-1.2") == 0) || (strcmp(mname, "pc-1.1") == 0) || - (strcmp(mname, "pc-1.0") == 0) || - (strcmp(mname, "pc-0.15") == 0) || - (strcmp(mname, "pc-0.14") == 0) || - (strcmp(mname, "pc-0.13") == 0) || - (strcmp(mname, "pc-0.12") == 0)) { + (strcmp(mname, "pc-1.0") == 0)) { path = g_strdup_printf("cpu-plug/%s/init/%ux%ux%u&maxcpus=%u", mname, data->sockets, data->cores, data->threads, data->maxcpus);

Now that the old pc-0.x machine types are gone, we do not need the "use_broken_id" hack anymore. Signed-off-by: Thomas Huth <thuth@redhat.com> --- hw/audio/ac97.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index a136b97f68..78cda88333 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -161,7 +161,6 @@ typedef struct AC97BusMasterRegs { typedef struct AC97LinkState { PCIDevice dev; QEMUSoundCard card; - uint32_t use_broken_id; uint32_t glob_cnt; uint32_t glob_sta; uint32_t cas; @@ -1373,13 +1372,6 @@ static void ac97_realize(PCIDevice *dev, Error **errp) c[PCI_BASE_ADDRESS_0 + 6] = 0x00; c[PCI_BASE_ADDRESS_0 + 7] = 0x00; - if (s->use_broken_id) { - c[PCI_SUBSYSTEM_VENDOR_ID] = 0x86; - c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x80; - c[PCI_SUBSYSTEM_ID] = 0x00; - c[PCI_SUBSYSTEM_ID + 1] = 0x00; - } - c[PCI_INTERRUPT_LINE] = 0x00; /* intr_ln interrupt line rw */ c[PCI_INTERRUPT_PIN] = 0x01; /* intr_pn interrupt pin ro */ @@ -1411,7 +1403,6 @@ static int ac97_init (PCIBus *bus) static Property ac97_properties[] = { DEFINE_AUDIO_PROPERTIES(AC97LinkState, card), - DEFINE_PROP_UINT32 ("use_broken_id", AC97LinkState, use_broken_id, 0), DEFINE_PROP_END_OF_LIST (), }; -- 2.18.1

On 12/5/19 5:06 PM, Thomas Huth wrote:
Now that the old pc-0.x machine types are gone, we do not need the "use_broken_id" hack anymore.
Signed-off-by: Thomas Huth <thuth@redhat.com> --- hw/audio/ac97.c | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index a136b97f68..78cda88333 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -161,7 +161,6 @@ typedef struct AC97BusMasterRegs { typedef struct AC97LinkState { PCIDevice dev; QEMUSoundCard card; - uint32_t use_broken_id; uint32_t glob_cnt; uint32_t glob_sta; uint32_t cas; @@ -1373,13 +1372,6 @@ static void ac97_realize(PCIDevice *dev, Error **errp) c[PCI_BASE_ADDRESS_0 + 6] = 0x00; c[PCI_BASE_ADDRESS_0 + 7] = 0x00;
- if (s->use_broken_id) { - c[PCI_SUBSYSTEM_VENDOR_ID] = 0x86; - c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x80; - c[PCI_SUBSYSTEM_ID] = 0x00; - c[PCI_SUBSYSTEM_ID + 1] = 0x00; - } - c[PCI_INTERRUPT_LINE] = 0x00; /* intr_ln interrupt line rw */ c[PCI_INTERRUPT_PIN] = 0x01; /* intr_pn interrupt pin ro */
@@ -1411,7 +1403,6 @@ static int ac97_init (PCIBus *bus)
static Property ac97_properties[] = { DEFINE_AUDIO_PROPERTIES(AC97LinkState, card), - DEFINE_PROP_UINT32 ("use_broken_id", AC97LinkState, use_broken_id, 0), DEFINE_PROP_END_OF_LIST (), };
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Now that the old pc-0.x machine types have been removed, this config knob is not required anymore. Signed-off-by: Thomas Huth <thuth@redhat.com> --- hw/pci/pci.c | 6 +----- include/hw/pci/pci.h | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index cbc7a32568..e3d310365d 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -69,8 +69,6 @@ static Property pci_props[] = { DEFINE_PROP_UINT32("rombar", PCIDevice, rom_bar, 1), DEFINE_PROP_BIT("multifunction", PCIDevice, cap_present, QEMU_PCI_CAP_MULTIFUNCTION_BITNR, false), - DEFINE_PROP_BIT("command_serr_enable", PCIDevice, cap_present, - QEMU_PCI_CAP_SERR_BITNR, true), DEFINE_PROP_BIT("x-pcie-lnksta-dllla", PCIDevice, cap_present, QEMU_PCIE_LNKSTA_DLLLA_BITNR, true), DEFINE_PROP_BIT("x-pcie-extcap-init", PCIDevice, cap_present, @@ -751,9 +749,7 @@ static void pci_init_wmask(PCIDevice *dev) pci_set_word(dev->wmask + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INTX_DISABLE); - if (dev->cap_present & QEMU_PCI_CAP_SERR) { - pci_word_test_and_set_mask(dev->wmask + PCI_COMMAND, PCI_COMMAND_SERR); - } + pci_word_test_and_set_mask(dev->wmask + PCI_COMMAND, PCI_COMMAND_SERR); memset(dev->wmask + PCI_CONFIG_HEADER_SIZE, 0xff, config_size - PCI_CONFIG_HEADER_SIZE); diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index db75c6dfd0..5b6ebd15c6 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -174,9 +174,6 @@ enum { #define QEMU_PCI_CAP_MULTIFUNCTION_BITNR 3 QEMU_PCI_CAP_MULTIFUNCTION = (1 << QEMU_PCI_CAP_MULTIFUNCTION_BITNR), - /* command register SERR bit enabled */ -#define QEMU_PCI_CAP_SERR_BITNR 4 - QEMU_PCI_CAP_SERR = (1 << QEMU_PCI_CAP_SERR_BITNR), /* Standard hot plug controller. */ #define QEMU_PCI_SHPC_BITNR 5 QEMU_PCI_CAP_SHPC = (1 << QEMU_PCI_SHPC_BITNR), -- 2.18.1

On 05/12/19 17:06, Thomas Huth wrote:
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index db75c6dfd0..5b6ebd15c6 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -174,9 +174,6 @@ enum { #define QEMU_PCI_CAP_MULTIFUNCTION_BITNR 3 QEMU_PCI_CAP_MULTIFUNCTION = (1 << QEMU_PCI_CAP_MULTIFUNCTION_BITNR),
- /* command register SERR bit enabled */ -#define QEMU_PCI_CAP_SERR_BITNR 4 - QEMU_PCI_CAP_SERR = (1 << QEMU_PCI_CAP_SERR_BITNR), /* Standard hot plug controller. */ #define QEMU_PCI_SHPC_BITNR 5 QEMU_PCI_CAP_SHPC = (1 << QEMU_PCI_SHPC_BITNR),
I think it's okay to keep this enum. Paolo

Thomas Huth <thuth@redhat.com> writes:
These have been on the deprecation list since a year now, so it's time to finally remove the pc-0.x machine types.
We then can also remove some compatibility hacks in the devices, i.e. the "use_broken_id" in ac97 and "command_serr_enable" in PCI devices.
Note that there is also the "rombar" property of the PCI devices which is now not required for the x86 machine types anymore. But it seems to me like this is still used by various people to bypass the ROM loading for PCI devices in certain cases, so I did not remove that property here yet.
With this series applied: $ git-grep pc-0 hw/display/vga-pci.c: /* compatibility with pc-0.13 and older */ hw/display/vga.c: /* With pc-0.12 and below we map both the PCI BAR and the fixed VBE region, hw/display/vmware_vga.c: /* compatibility with pc-0.13 and older */ hw/i386/pc_piix.c:/* PC compat function

On 06/12/2019 07.49, Markus Armbruster wrote:
Thomas Huth <thuth@redhat.com> writes:
These have been on the deprecation list since a year now, so it's time to finally remove the pc-0.x machine types.
We then can also remove some compatibility hacks in the devices, i.e. the "use_broken_id" in ac97 and "command_serr_enable" in PCI devices.
Note that there is also the "rombar" property of the PCI devices which is now not required for the x86 machine types anymore. But it seems to me like this is still used by various people to bypass the ROM loading for PCI devices in certain cases, so I did not remove that property here yet.
With this series applied:
$ git-grep pc-0 hw/display/vga-pci.c: /* compatibility with pc-0.13 and older */ hw/display/vga.c: /* With pc-0.12 and below we map both the PCI BAR and the fixed VBE region, hw/display/vmware_vga.c: /* compatibility with pc-0.13 and older */
These are the "rombar" hacks that I've mentioned above. The question is whether we want to remove them or whether I should just adjust the comments?
hw/i386/pc_piix.c:/* PC compat function
Right, the comment still needs to be adjusted. Thomas

$ git-grep pc-0 hw/display/vga-pci.c: /* compatibility with pc-0.13 and older */ hw/display/vga.c: /* With pc-0.12 and below we map both the PCI BAR and the fixed VBE region, hw/display/vmware_vga.c: /* compatibility with pc-0.13 and older */
These are the "rombar" hacks that I've mentioned above. The question is whether we want to remove them or whether I should just adjust the comments?
Hmm. All that cruft ... vga maps the framebuffer @ 0xe0000000 with rombar=off. It's an alias of the pci memory bar. rombar=off is basically a flag for "really old firmware" here, vgabios used to have that address hardcoded, a decade ago. We fixed that roughly the same timeframe where we switched to seabios, which in turn allowed us to place the vgabios in the pci rom bar (instead of copying it to 0xa000 in guest ram). Which is probably the reason why we have only one switch for both. I don't expect anyone actually sets the rombar property for vga devices (it's more common for NICs, for network boot tweaks), so I guess we can get away with simply dropping the hacks in vga-pci.c and vmware_vga.c. The comment in vga.c is not fully correct though, isa-vga needs that too, so we have to keep vga_init_vbe for the time being ... cheers, Gerd
participants (6)
-
Eric Blake
-
Gerd Hoffmann
-
Markus Armbruster
-
Paolo Bonzini
-
Philippe Mathieu-Daudé
-
Thomas Huth