Skip to contentSkip to conversation

vga: make stdvga the global default

PATCH In review Gerd Hoffmann 4 participants 15 messages Jul 5, 2018 – Jul 12, 2018

lore
Share & tools
lore
#0 lore raw

v2 cover vga: make stdvga the global default

Gerd Hoffmann (2):
vga: set default_display for all machines using cirrus.
vga: don't pick cirrus by default

 hw/alpha/dp264.c     | 1 +
 hw/i386/pc_piix.c    | 2 +-
 hw/mips/mips_malta.c | 1 +
 hw/mips/mips_r4k.c   | 1 +
 vl.c                 | 2 --
 5 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH v2 1/2 vga: set default_display for all machines using cirrus.

Explicitly set MachineClass->default_display to "cirrus" for all machine types (alpha, mips, old i386 versions) which use cirrus today, so they don't depend on cirrus being the default display device.

---
 hw/alpha/dp264.c     | 1 +
 hw/i386/pc_piix.c    | 2 +-
 hw/mips/mips_malta.c | 1 +
 hw/mips/mips_r4k.c   | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)
hw/alpha/dp264.c +1 -0
index 80b987f7fb..668e6d099f 100644
@@ -182,6 +182,7 @@ static void clipper_machine_init(MachineClass *mc)
     mc->max_cpus = 4;
     mc->is_default = 1;
     mc->default_cpu_type = ALPHA_CPU_TYPE_NAME("ev67");
+    mc->default_display = "cirrus";
 }
 
 DEFINE_MACHINE("clipper", clipper_machine_init)
hw/i386/pc_piix.c +1 -1
index dc09466b3e..bcf866ee34 100644
@@ -566,7 +566,7 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m)
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_2_2_machine_options(m);
     m->hw_version = "2.1.0";
-    m->default_display = NULL;
+    m->default_display = "cirrus";
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_1);
     pcmc->smbios_uuid_encoded = false;
     pcmc->enforce_aligned_dimm = false;
hw/mips/mips_malta.c +1 -0
index 3467451482..998971c53a 100644
@@ -1242,6 +1242,7 @@ static void mips_malta_machine_init(MachineClass *mc)
     mc->block_default_type = IF_IDE;
     mc->max_cpus = 16;
     mc->is_default = 1;
+    mc->default_display = "cirrus";
 #ifdef TARGET_MIPS64
     mc->default_cpu_type = MIPS_CPU_TYPE_NAME("20Kc");
 #else
hw/mips/mips_r4k.c +1 -0
index d5725d0555..c4c7ee8aa5 100644
@@ -295,6 +295,7 @@ static void mips_machine_init(MachineClass *mc)
     mc->desc = "mips r4k platform";
     mc->init = mips_r4k_init;
     mc->block_default_type = IF_IDE;
+    mc->default_display = "cirrus";
 #ifdef TARGET_MIPS64
     mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
 #else
Signature · 1 line
2.9.3
#3 lore raw

PATCH v2 2/2 vga: don't pick cirrus by default

In reply to Gerd Hoffmann

Now that all machines which need cirrus explicitly select it qemu doesn't need to consider it as default display any more. Drop it.

With this patch applied all ppc machine types will use "std" as default display, no matter whenever cirrus-vga is compiled in or not.

Fixes 29f9cef39e ppc: Include vga cirrus card into the compiling process
---
 vl.c | 2 --
 1 file changed, 2 deletions(-)
vl.c +0 -2
index 16b913f9d5..117e4e6879 100644
@@ -4475,8 +4475,6 @@ int main(int argc, char **argv, char **envp)
     if (default_vga) {
         if (machine_class->default_display) {
             vga_model = machine_class->default_display;
-        } else if (vga_interface_available(VGA_CIRRUS)) {
-            vga_model = "cirrus";
         } else if (vga_interface_available(VGA_STD)) {
             vga_model = "std";
         }
Signature · 1 line
2.9.3
#4 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

Quoted 8 lines · Gerd Hoffmann

Now that all machines which need cirrus explicitly select it qemu doesn't need to consider it as default display any more. Drop it.

With this patch applied all ppc machine types will use "std" as default display, no matter whenever cirrus-vga is compiled in or not.

Fixes 29f9cef39e ppc: Include vga cirrus card into the compiling process

Do we have a list of all machine-types with default_display==NULL that would be affected by this? For reference, this will affect the machines in the following binaries:

default-configs/alpha-softmmu.mak:CONFIG_VGA_CIRRUS=y default-configs/i386-softmmu.mak:CONFIG_VGA_CIRRUS=y default-configs/mips-softmmu-common.mak:CONFIG_VGA_CIRRUS=y default-configs/ppc-softmmu.mak:CONFIG_VGA_CIRRUS=y default-configs/x86_64-softmmu.mak:CONFIG_VGA_CIRRUS=y

Quoted 20 lines
---
 vl.c | 2 --
 1 file changed, 2 deletions(-)
vl.c +0 -2
index 16b913f9d5..117e4e6879 100644
@@ -4475,8 +4475,6 @@ int main(int argc, char **argv, char **envp)
     if (default_vga) {
         if (machine_class->default_display) {
             vga_model = machine_class->default_display;
-        } else if (vga_interface_available(VGA_CIRRUS)) {
-            vga_model = "cirrus";
         } else if (vga_interface_available(VGA_STD)) {
             vga_model = "std";
         }
Signature · 1 line
2.9.3
Signature · 1 line
Eduardo
Reviewed-by on v2 1/2
#2 lore raw

Re: [Qemu-devel] [PATCH v2 1/2] vga: set default_display for all machines using cirrus.

In reply to Gerd Hoffmann
Quoted 5 lines · Gerd Hoffmann

Explicitly set MachineClass->default_display to "cirrus" for all machine types (alpha, mips, old i386 versions) which use cirrus today, so they don't depend on cirrus being the default display device.

Signature · 1 line
Eduardo
#5 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

In reply to Eduardo Habkost
Quoted 2 lines · Eduardo Habkost

Do we have a list of all machine-types with default_display==NULL that would be affected by this?

There are not many which use the default vga thing in the first place. Workflow is this:

(1) vl.c calls select_vgahw(vga_model) after setting vga_model.
(2) select_hw() sets vga_interface_type.
(3) isa_vga_init() and pci_vga_init() look at vga_interface_type.

Checking where either vga_interface_type or *_vga_init() is used doesn't yield many places:

# find -name "*.[ch]" | xargs egrep '((isa|pci)_vga_init|vga_interface_type)'
./hw/alpha/dp264.c:    pci_vga_init(pci_bus);
./hw/i386/pc.c:        PCIDevice *pcidev = pci_vga_init(pci_bus);
./hw/i386/pc.c:        ISADevice *isadev = isa_vga_init(isa_bus);
./hw/isa/isa-bus.c:ISADevice *isa_vga_init(ISABus *bus)
./hw/isa/isa-bus.c:    switch (vga_interface_type) {
./hw/mips/mips_malta.c:    pci_vga_init(pci_bus);
./hw/mips/mips_r4k.c:    isa_vga_init(isa_bus);
./hw/pci/pci.c:PCIDevice *pci_vga_init(PCIBus *bus)
./hw/pci/pci.c:    switch (vga_interface_type) {
./hw/ppc/mac_newworld.c:    pci_vga_init(pci_bus);
./hw/ppc/mac_oldworld.c:    pci_vga_init(pci_bus);
./hw/ppc/spapr.c:    switch (vga_interface_type) {
./hw/ppc/spapr.c:        return pci_vga_init(pci_bus) != NULL;
./hw/ppc/prep.c:    pci_vga_init(pci_bus);
./hw/ppc/prep.c:        pci_vga_init(pci_bus);
./hw/sparc/sun4m.c:        if (vga_interface_type == VGA_CG3) {
./include/hw/isa/isa.h:ISADevice *isa_vga_init(ISABus *bus);
./include/hw/pci/pci.h:PCIDevice *pci_vga_init(PCIBus *bus);
./include/sysemu/sysemu.h:extern int vga_interface_type;
./include/sysemu/sysemu.h:#define xenfb_enabled (vga_interface_type == VGA_XENFB)
./vl.c:int vga_interface_type = VGA_NONE;
./vl.c:    assert(vga_interface_type == VGA_NONE);
./vl.c:            vga_interface_type = t;
./vl.c:        vga_interface_type = VGA_DEVICE;

So it is alpha, mips, i386, ppc.

Also some hits vl.c, headers and isa/pci code.
Xen and sparc check for something which is never picked as default, so no worries here.

cheers,
Gerd

#6 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

Quoted 40 lines · Gerd Hoffmann
Quoted 2 lines · Eduardo Habkost

Do we have a list of all machine-types with default_display==NULL that would be affected by this?

There are not many which use the default vga thing in the first place. Workflow is this:

(1) vl.c calls select_vgahw(vga_model) after setting vga_model.
(2) select_hw() sets vga_interface_type.
(3) isa_vga_init() and pci_vga_init() look at vga_interface_type.

Checking where either vga_interface_type or *_vga_init() is used doesn't yield many places:

# find -name "*.[ch]" | xargs egrep '((isa|pci)_vga_init|vga_interface_type)'
./hw/alpha/dp264.c:    pci_vga_init(pci_bus);
./hw/i386/pc.c:        PCIDevice *pcidev = pci_vga_init(pci_bus);
./hw/i386/pc.c:        ISADevice *isadev = isa_vga_init(isa_bus);
./hw/isa/isa-bus.c:ISADevice *isa_vga_init(ISABus *bus)
./hw/isa/isa-bus.c:    switch (vga_interface_type) {
./hw/mips/mips_malta.c:    pci_vga_init(pci_bus);
./hw/mips/mips_r4k.c:    isa_vga_init(isa_bus);
./hw/pci/pci.c:PCIDevice *pci_vga_init(PCIBus *bus)
./hw/pci/pci.c:    switch (vga_interface_type) {
./hw/ppc/mac_newworld.c:    pci_vga_init(pci_bus);
./hw/ppc/mac_oldworld.c:    pci_vga_init(pci_bus);
./hw/ppc/spapr.c:    switch (vga_interface_type) {
./hw/ppc/spapr.c:        return pci_vga_init(pci_bus) != NULL;
./hw/ppc/prep.c:    pci_vga_init(pci_bus);
./hw/ppc/prep.c:        pci_vga_init(pci_bus);
./hw/sparc/sun4m.c:        if (vga_interface_type == VGA_CG3) {
./include/hw/isa/isa.h:ISADevice *isa_vga_init(ISABus *bus);
./include/hw/pci/pci.h:PCIDevice *pci_vga_init(PCIBus *bus);
./include/sysemu/sysemu.h:extern int vga_interface_type;
./include/sysemu/sysemu.h:#define xenfb_enabled (vga_interface_type == VGA_XENFB)
./vl.c:int vga_interface_type = VGA_NONE;
./vl.c:    assert(vga_interface_type == VGA_NONE);
./vl.c:            vga_interface_type = t;
./vl.c:        vga_interface_type = VGA_DEVICE;
Quoted 1 line

So it is alpha, mips, i386, ppc.

Right, and all of them have both CONFIG_VGA_CIRRUS and CONFIG_VGA_PCI enabled. This means all of them will be affected by this patch if they have any machines with default_display==NULL.

At least on x86 we still have a few machines with default_display==NULL: isapc, xenpv, xenfv. We need to fix them before we apply this patch.

I didn't check alpha/mips/ppc yet.

Signature · 1 line
Eduardo
#7 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

Quoted 48 lines · Eduardo Habkost
Quoted 40 lines · Gerd Hoffmann
Quoted 2 lines · Eduardo Habkost

Do we have a list of all machine-types with default_display==NULL that would be affected by this?

There are not many which use the default vga thing in the first place. Workflow is this:

(1) vl.c calls select_vgahw(vga_model) after setting vga_model.
(2) select_hw() sets vga_interface_type.
(3) isa_vga_init() and pci_vga_init() look at vga_interface_type.

Checking where either vga_interface_type or *_vga_init() is used doesn't yield many places:

# find -name "*.[ch]" | xargs egrep '((isa|pci)_vga_init|vga_interface_type)'
./hw/alpha/dp264.c:    pci_vga_init(pci_bus);
./hw/i386/pc.c:        PCIDevice *pcidev = pci_vga_init(pci_bus);
./hw/i386/pc.c:        ISADevice *isadev = isa_vga_init(isa_bus);
./hw/isa/isa-bus.c:ISADevice *isa_vga_init(ISABus *bus)
./hw/isa/isa-bus.c:    switch (vga_interface_type) {
./hw/mips/mips_malta.c:    pci_vga_init(pci_bus);
./hw/mips/mips_r4k.c:    isa_vga_init(isa_bus);
./hw/pci/pci.c:PCIDevice *pci_vga_init(PCIBus *bus)
./hw/pci/pci.c:    switch (vga_interface_type) {
./hw/ppc/mac_newworld.c:    pci_vga_init(pci_bus);
./hw/ppc/mac_oldworld.c:    pci_vga_init(pci_bus);
./hw/ppc/spapr.c:    switch (vga_interface_type) {
./hw/ppc/spapr.c:        return pci_vga_init(pci_bus) != NULL;
./hw/ppc/prep.c:    pci_vga_init(pci_bus);
./hw/ppc/prep.c:        pci_vga_init(pci_bus);
./hw/sparc/sun4m.c:        if (vga_interface_type == VGA_CG3) {
./include/hw/isa/isa.h:ISADevice *isa_vga_init(ISABus *bus);
./include/hw/pci/pci.h:PCIDevice *pci_vga_init(PCIBus *bus);
./include/sysemu/sysemu.h:extern int vga_interface_type;
./include/sysemu/sysemu.h:#define xenfb_enabled (vga_interface_type == VGA_XENFB)
./vl.c:int vga_interface_type = VGA_NONE;
./vl.c:    assert(vga_interface_type == VGA_NONE);
./vl.c:            vga_interface_type = t;
./vl.c:        vga_interface_type = VGA_DEVICE;
Quoted 1 line

So it is alpha, mips, i386, ppc.

Right, and all of them have both CONFIG_VGA_CIRRUS and CONFIG_VGA_PCI enabled. This means all of them will be affected by this patch if they have any machines with default_display==NULL.

Quoted 5 lines

At least on x86 we still have a few machines with default_display==NULL: isapc, xenpv, xenfv. We need to fix them before we apply this patch.

I didn't check alpha/mips/ppc yet.

List of machines with default_display==NULL on those architectures:

alpha:
none empty machine

mips:
mipssim MIPS MIPSsim platform
none empty machine

ppc*:

bamboo               bamboo
mpc8544ds            mpc8544ds
none                 empty machine
powernv              IBM PowerNV (Non-Virtualized)
ppce500              generic paravirt e500 platform
ref405ep             ref405ep
sam460ex             aCube Sam460ex
taihu                taihu
virtex-ml507         Xilinx Virtex ML507 reference design

x86_64:

isapc                ISA-only PC
none                 empty machine
xenfv                Xen Fully-virtualized PC
xenpv                Xen Para-virtualized PC

Tested on qemu.git master after applying this series. List generated by hacking machine_parse(), so some machines may be missing if they are disabled at build time.

Signature · 1 line
Eduardo
#8 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

Hi,

Am 2018-07-09 23:23, schrieb Eduardo Habkost:

Quoted 21 lines

List of machines with default_display==NULL on those architectures:

alpha:
none empty machine

mips:
mipssim MIPS MIPSsim platform
none empty machine

ppc*:

bamboo               bamboo
mpc8544ds            mpc8544ds
none                 empty machine
powernv              IBM PowerNV (Non-Virtualized)
ppce500              generic paravirt e500 platform
ref405ep             ref405ep
sam460ex             aCube Sam460ex
taihu                taihu
virtex-ml507         Xilinx Virtex ML507 reference design
Quoted 5 lines

x86_64:

isapc                ISA-only PC
none                 empty machine
xenfv                Xen Fully-virtualized PC
xenpv                Xen Para-virtualized PC

Which of these machines really require the Cirrus? The xen ones look like that they can deal with std. The isapc is should probably stay at the Cirrus.

Also the "none" seems to be a false-positive. I suppose they mean "empty", i.e., no graphics card at all?

And at least the ppc ones can be canceled out, they should work with std, the new default (expect the sam460ex which goes an own route for now).

What is the indented target release for the patch?

If the patch is applied to 3.1 then I think there is enough time to fix issues caused by the patch. Additionally, a warning could be put in the ChangeLog for 3.0 that in 3.1 that the default mode will be std unless machines define an own default. This is should be enough time for people to complain or to fix things.

If the patch is to be applied to 3.0 then all non-ppc ones need to be reconsidered.

The "important" ppc machines have been fixed already. I can do the remaining if this is wanted.

Bye
Sebastian

#9 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

Quoted 30 lines · Sebastian Bauer

Hi,

Am 2018-07-09 23:23, schrieb Eduardo Habkost:

Quoted 21 lines

List of machines with default_display==NULL on those architectures:

alpha:
none empty machine

mips:
mipssim MIPS MIPSsim platform
none empty machine

ppc*:

bamboo               bamboo
mpc8544ds            mpc8544ds
none                 empty machine
powernv              IBM PowerNV (Non-Virtualized)
ppce500              generic paravirt e500 platform
ref405ep             ref405ep
sam460ex             aCube Sam460ex
taihu                taihu
virtex-ml507         Xilinx Virtex ML507 reference design
Quoted 5 lines

x86_64:

isapc                ISA-only PC
none                 empty machine
xenfv                Xen Fully-virtualized PC
xenpv                Xen Para-virtualized PC
Quoted 6 lines

Which of these machines really require the Cirrus? The xen ones look like that they can deal with std. The isapc is should probably stay at the Cirrus.

Also the "none" seems to be a false-positive. I suppose they mean "empty", i.e., no graphics card at all?

"none" looked like a false positive when I first looked, but now I think it's not. Shouldn't it set default_display="none"?

Quoted 3 lines

And at least the ppc ones can be canceled out, they should work with std, the new default (expect the sam460ex which goes an own route for now).

If machines prefer "std", they should set default_display="std" explicitly.

Quoted 2 lines

What is the indented target release for the patch?

I'm not convinced this patch is appropriate for 3.0. If we have remaining bugs they should be fixed by setting default_display explicitly on the affected machines.

Quoted 6 lines

If the patch is applied to 3.1 then I think there is enough time to fix issues caused by the patch. Additionally, a warning could be put in the ChangeLog for 3.0 that in 3.1 that the default mode will be std unless machines define an own default. This is should be enough time for people to complain or to fix things.

I don't think we will really make user-visible changes: we can simply work to keep existing behavior, but the difference is that this will be implemented by setting default_display explicitly on all machines.

Quoted 6 lines

If the patch is to be applied to 3.0 then all non-ppc ones need to be reconsidered.

The "important" ppc machines have been fixed already. I can do the remaining if this is wanted.

This part worries me: do we have other machines that are broken right now?

Signature · 1 line
Eduardo
#10 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

Am 2018-07-11 17:48, schrieb Eduardo Habkost:

Quoted 2 lines

"none" looked like a false positive when I first looked, but now I think it's not. Shouldn't it set default_display="none"?

I think that there is some other logic burried that these machine doesn't get a graphics display. But overall it is indeed not clearly defined.

But see below.

Quoted 9 lines
Quoted 5 lines

If the patch is applied to 3.1 then I think there is enough time to fix issues caused by the patch. Additionally, a warning could be put in the ChangeLog for 3.0 that in 3.1 that the default mode will be std unless machines define an own default. This is should be enough time for people to complain or to fix things.

I don't think we will really make user-visible changes: we can simply work to keep existing behavior, but the difference is that this will be implemented by setting default_display explicitly on all machines.

Even if all machines were using explicit default settings the patch will affect machines that are not inside the QEMU tree. If the patch is to be applied as it is these are affected. To warn users (or devs in this case) about this, an entry in the ChangeLog would be appropriate.

Quoted 6 lines
Quoted 4 lines

If the patch is to be applied to 3.0 then all non-ppc ones need to be reconsidered.
The "important" ppc machines have been fixed already. I can do the remaining if this is wanted.

This part worries me: do we have other machines that are broken right now?

I don't know which of them are broken or how this can be elaborated, but they are potentially affected. For instance, the sam460ex platform doesn't care about this setting, I can say that it is not broken. Other platforms like the mac apparently were broken (and fixed in the meantime). It is hard to tell which of them are really broken without someone that knows the platform trying it and telling it. 'Make check' did catch only one single case. It could also be that nobody cares about other affected machines.

Overall I think the patch is an improvement over the previous state as preferring the Cirrus doesn't make much sense if most machines don't prefer it. The more I think over it, the more I think that the concept needs further fine-tuning though (not necessarily in this patch).

If OTOH it would become a requirement for machines to set a default display then this fallback logic could removed. Instead, qemu could simply bailout on machines that define no default display (including "none") and also bailout when the requested default display is not available. This would be checkable by 'make check'. I still think that the most common value can be a default (strictly bailing out when it is not available unlike it is done now), but this is a matter of taste I guess.

Bye
Sebastian

#11 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] vga: don't pick cirrus by default

Quoted 22 lines · Sebastian Bauer

Am 2018-07-11 17:48, schrieb Eduardo Habkost:

Quoted 2 lines

"none" looked like a false positive when I first looked, but now I think it's not. Shouldn't it set default_display="none"?

I think that there is some other logic burried that these machine doesn't get a graphics display. But overall it is indeed not clearly defined.

But see below.

Quoted 8 lines
Quoted 8 lines

If the patch is applied to 3.1 then I think there is enough time to fix
issues caused by the patch. Additionally, a warning could be put in the
ChangeLog for 3.0 that in 3.1 that the default mode will be std unless machines define an own default. This is should be enough time for people to
complain or to fix things.

Quoted 4 lines

I don't think we will really make user-visible changes: we can simply work to keep existing behavior, but the difference is that this will be implemented by setting default_display explicitly on all machines.

Quoted 4 lines

Even if all machines were using explicit default settings the patch will affect machines that are not inside the QEMU tree. If the patch is to be applied as it is these are affected. To warn users (or devs in this case) about this, an entry in the ChangeLog would be appropriate.

What do you mean by "machines that are not inside the QEMU tree"? MachineClass registration is not an API for external use.

Quoted 17 lines
Quoted 8 lines
Quoted 6 lines

If the patch is to be applied to 3.0 then all non-ppc ones need to be reconsidered.
The "important" ppc machines have been fixed already. I can do the remaining
if this is wanted.

This part worries me: do we have other machines that are broken right now?

I don't know which of them are broken or how this can be elaborated, but they are potentially affected. For instance, the sam460ex platform doesn't care about this setting, I can say that it is not broken. Other platforms like the mac apparently were broken (and fixed in the meantime). It is hard to tell which of them are really broken without someone that knows the platform trying it and telling it. 'Make check' did catch only one single case. It could also be that nobody cares about other affected machines.

Quoted 4 lines

Overall I think the patch is an improvement over the previous state as preferring the Cirrus doesn't make much sense if most machines don't prefer it. The more I think over it, the more I think that the concept needs further fine-tuning though (not necessarily in this patch).

I'm not sure yet if most machines with default_display==NULL don't want Cirrus. I'm also unsure if any of the machines from that list will break if we start using VGA by default.

Quoted 6 lines

If OTOH it would become a requirement for machines to set a default display then this fallback logic could removed. Instead, qemu could simply bailout on machines that define no default display (including "none") and also bailout when the requested default display is not available. This would be checkable by 'make check'. [...]

This is the solution I would like to see implemented.

Quoted 3 lines

[...] I still think that the most common value can be a
default (strictly bailing out when it is not available unlike it is done now), but this is a matter of taste I guess.

This is doable too, if we have a clear consensus on what would be a reasonable default on TYPE_MACHINE. Personally I prefer the default on TYPE_MACHINE to be "none".

Signature · 1 line
Eduardo
#12 lore raw

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] vga: don't pick cirrus by default

Quoted 48 lines · Eduardo Habkost
Quoted 22 lines · Sebastian Bauer

Am 2018-07-11 17:48, schrieb Eduardo Habkost:

Quoted 2 lines

"none" looked like a false positive when I first looked, but now I think it's not. Shouldn't it set default_display="none"?

I think that there is some other logic burried that these machine doesn't get a graphics display. But overall it is indeed not clearly defined.

But see below.

Quoted 8 lines
Quoted 8 lines

If the patch is applied to 3.1 then I think there is enough time to fix
issues caused by the patch. Additionally, a warning could be put in the
ChangeLog for 3.0 that in 3.1 that the default mode will be std unless machines define an own default. This is should be enough time for people to
complain or to fix things.

Quoted 4 lines

I don't think we will really make user-visible changes: we can simply work to keep existing behavior, but the difference is that this will be implemented by setting default_display explicitly on all machines.

Quoted 4 lines

Even if all machines were using explicit default settings the patch will affect machines that are not inside the QEMU tree. If the patch is to be applied as it is these are affected. To warn users (or devs in this case) about this, an entry in the ChangeLog would be appropriate.

What do you mean by "machines that are not inside the QEMU tree"? MachineClass registration is not an API for external use.

Quoted 17 lines
Quoted 8 lines
Quoted 6 lines

If the patch is to be applied to 3.0 then all non-ppc ones need to be reconsidered.
The "important" ppc machines have been fixed already. I can do the remaining
if this is wanted.

This part worries me: do we have other machines that are broken right now?

I don't know which of them are broken or how this can be elaborated, but they are potentially affected. For instance, the sam460ex platform doesn't care about this setting, I can say that it is not broken. Other platforms like the mac apparently were broken (and fixed in the meantime). It is hard to tell which of them are really broken without someone that knows the platform trying it and telling it. 'Make check' did catch only one single case. It could also be that nobody cares about other affected machines.

Quoted 8 lines
Quoted 4 lines

Overall I think the patch is an improvement over the previous state as preferring the Cirrus doesn't make much sense if most machines don't prefer it. The more I think over it, the more I think that the concept needs further fine-tuning though (not necessarily in this patch).

I'm not sure yet if most machines with default_display==NULL don't want Cirrus. I'm also unsure if any of the machines from that list will break if we start using VGA by default.

I think most machines with default_display == NULL simply do not want any graphic cards at all. So we likely document that default_display == NULL means no graphic card, and fix the machines that have other assumptions if necessary.

Quoted 7 lines
Quoted 3 lines

[...] I still think that the most common value can be a
default (strictly bailing out when it is not available unlike it is done now), but this is a matter of taste I guess.

This is doable too, if we have a clear consensus on what would be a reasonable default on TYPE_MACHINE. Personally I prefer the default on TYPE_MACHINE to be "none".

Yes, please, no magic default hardware for all machines. That will only cause confusion and problems in the future. People who add new boards will keep forgetting to set a value in their new boards and then you later wonder whether that was on purpose or by accident ==> If there is no default display set, this should simply mean "no display".

Thomas

#13 lore raw

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] vga: don't pick cirrus by default

Hi,

Am 2018-07-12 06:57, schrieb Thomas Huth:

Quoted 8 lines
Quoted 3 lines

This is doable too, if we have a clear consensus on what would be a reasonable default on TYPE_MACHINE. Personally I prefer the default on TYPE_MACHINE to be "none".

Yes, please, no magic default hardware for all machines. That will only cause confusion and problems in the future. People who add new boards will keep forgetting to set a value in their new boards and then you later wonder whether that was on purpose or by accident ==> If there is no default display set, this should simply mean "no display".

Sounds reasonable. Let me know if I should do it or if Gerd like to continue as he did the initial patch.

Bye
Sebastian

#14 lore raw

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] vga: don't pick cirrus by default

In reply to Thomas Huth
Quoted 54 lines · Thomas Huth
Quoted 53 lines · Eduardo Habkost
Quoted 22 lines · Sebastian Bauer

Am 2018-07-11 17:48, schrieb Eduardo Habkost:

Quoted 2 lines

"none" looked like a false positive when I first looked, but now I think it's not. Shouldn't it set default_display="none"?

I think that there is some other logic burried that these machine doesn't get a graphics display. But overall it is indeed not clearly defined.

But see below.

Quoted 8 lines
Quoted 8 lines

If the patch is applied to 3.1 then I think there is enough time to fix
issues caused by the patch. Additionally, a warning could be put in the
ChangeLog for 3.0 that in 3.1 that the default mode will be std unless machines define an own default. This is should be enough time for people to
complain or to fix things.

Quoted 4 lines

I don't think we will really make user-visible changes: we can simply work to keep existing behavior, but the difference is that this will be implemented by setting default_display explicitly on all machines.

Quoted 4 lines

Even if all machines were using explicit default settings the patch will affect machines that are not inside the QEMU tree. If the patch is to be applied as it is these are affected. To warn users (or devs in this case) about this, an entry in the ChangeLog would be appropriate.

What do you mean by "machines that are not inside the QEMU tree"? MachineClass registration is not an API for external use.

Quoted 21 lines
Quoted 8 lines
Quoted 6 lines

If the patch is to be applied to 3.0 then all non-ppc ones need to be reconsidered.
The "important" ppc machines have been fixed already. I can do the remaining
if this is wanted.

This part worries me: do we have other machines that are broken right now?

I don't know which of them are broken or how this can be elaborated, but they are potentially affected. For instance, the sam460ex platform doesn't care about this setting, I can say that it is not broken. Other platforms like the mac apparently were broken (and fixed in the meantime). It is hard to tell which of them are really broken without someone that knows the platform trying it and telling it. 'Make check' did catch only one single case. It could also be that nobody cares about other affected machines.

Overall I think the patch is an improvement over the previous state as preferring the Cirrus doesn't make much sense if most machines don't prefer it. The more I think over it, the more I think that the concept needs further fine-tuning though (not necessarily in this patch).

Quoted 8 lines
Quoted 3 lines

I'm not sure yet if most machines with default_display==NULL don't want Cirrus. I'm also unsure if any of the machines from that list will break if we start using VGA by default.

I think most machines with default_display == NULL simply do not want any graphic cards at all. So we likely document that default_display == NULL means no graphic card, and fix the machines that have other assumptions if necessary.

We already have a value meaning "no graphics card": "none".

But like with the "cirrus" and "vga" options, I also don't know if any of the existing machines with default_display==NULL will break if we start using "none" by default.

Quoted 9 lines
Quoted 8 lines
Quoted 4 lines

[...] I still think that the most common value can be a
default (strictly bailing out when it is not available unlike it is done now), but this is a matter of taste I guess.

This is doable too, if we have a clear consensus on what would be a reasonable default on TYPE_MACHINE. Personally I prefer the default on TYPE_MACHINE to be "none".

Quoted 5 lines

Yes, please, no magic default hardware for all machines. That will only cause confusion and problems in the future. People who add new boards will keep forgetting to set a value in their new boards and then you later wonder whether that was on purpose or by accident ==> If there is no default display set, this should simply mean "no display".

Agreed.

Signature · 1 line
Eduardo