From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, "Eduardo Habkost" <ehabkost@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"Jose R . Ziviani" <jziviani@suse.de>,
John Snow <jsnow@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) VGA devices
Date: Fri, 19 Nov 2021 12:10:27 +0100 [thread overview]
Message-ID: <031e8bff-5140-a3ee-99ae-da3136b5954f@redhat.com> (raw)
In-Reply-To: <a77cae42-bedd-8380-f7ab-22bc99c6ccfb@redhat.com>
On 19/11/2021 11.17, Philippe Mathieu-Daudé wrote:
> On 11/19/21 10:58, Thomas Huth wrote:
>> On 19/11/2021 10.49, Philippe Mathieu-Daudé wrote:
>>> On 11/19/21 09:21, Mark Cave-Ayland wrote:
>>>> On 18/11/2021 19:20, Philippe Mathieu-Daudé wrote:
>>>>
>>>>> Commit 7852a77f598 fixed creating multiple TYPE_ISA_VGA devices,
>>>>> generalize the fix to all VGA devices.
>>>>>
>>>>> See https://gitlab.com/qemu-project/qemu/-/issues/44
>>>>>
>>>>> Philippe Mathieu-Daudé (2):
>>>>> hw/display: Add Error* handle to vga_common_init()
>>>>> hw/display: Do not allow multiple identical VGA devices
>>>>>
>>>>> hw/display/vga_int.h | 2 +-
>>>>> hw/display/ati.c | 4 +++-
>>>>> hw/display/cirrus_vga.c | 4 +++-
>>>>> hw/display/cirrus_vga_isa.c | 4 +++-
>>>>> hw/display/qxl.c | 4 +++-
>>>>> hw/display/vga-isa-mm.c | 3 ++-
>>>>> hw/display/vga-isa.c | 11 ++---------
>>>>> hw/display/vga-pci.c | 8 ++++++--
>>>>> hw/display/vga.c | 17 ++++++++++++++++-
>>>>> hw/display/virtio-vga.c | 4 +++-
>>>>> hw/display/vmware_vga.c | 2 +-
>>>>> 11 files changed, 43 insertions(+), 20 deletions(-)
>>>>
>>>> Hi Phil,
>>>>
>>>> I don't think this is correct for non-ISA devices: for example years ago
>>>> I had a PC running Windows 98SE with 2 identical PCI graphics cards
>>>> configured in dual-head mode.
>>>>
>>>> IIRC the BIOS would bring up the first graphics card and configure it to
>>>> use the legacy ISA VGA ioports for compatibility, and then once the main
>>>> OS drivers loaded both cards were switched to PCI mode and configured
>>>> using the BARs as normal.
>>>
>>> The problem here is QEMU technical debt, not the hardware.
>>>
>>> When vga_common_init() calls memory_region_init_ram_nomigrate()
>>> with obj=NULL, "vga.vram" is registered as a QOM singleton.
>>>
>>> Updating it would
>>> 1/ require non-QOM devices to be QOM'ified
>>
>> So sounds like that's the right way to go here.
>>
>>> and 2/ break migration unless using HPFM which I don't master.
>>
>> What's HPFM?
>
> Hocus Pocus Freakin' Magic
LOL, ok, thanks, TIL.
Anyway, IMHO I'd rather fix this issue by properly QOM'ifying the
vga-isa-mm.c code and breaking migration here (who's migrating such old ISA
devices anyway?) instead of introducing more kludges
that might cause other trouble (see also
https://gitlab.com/qemu-project/qemu/-/issues/733 ).
Thomas
prev parent reply other threads:[~2021-11-19 11:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 19:20 [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) VGA devices Philippe Mathieu-Daudé
2021-11-18 19:20 ` [PATCH-for-6.2 1/2] hw/display: Add Error* handle to vga_common_init() Philippe Mathieu-Daudé
2021-11-18 19:20 ` [PATCH-for-6.2 2/2] hw/display: Do not allow multiple identical VGA devices Philippe Mathieu-Daudé
2021-11-19 9:20 ` Paolo Bonzini
2021-11-19 9:42 ` Philippe Mathieu-Daudé
2021-11-19 10:10 ` Daniel P. Berrangé
2021-11-19 8:21 ` [PATCH-for-6.2 0/2] hw/display: Do not allow multiple (identical) " Mark Cave-Ayland
2021-11-19 9:49 ` Philippe Mathieu-Daudé
2021-11-19 9:58 ` Thomas Huth
2021-11-19 10:17 ` Philippe Mathieu-Daudé
2021-11-19 11:10 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=031e8bff-5140-a3ee-99ae-da3136b5954f@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jsnow@redhat.com \
--cc=jziviani@suse.de \
--cc=kraxel@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).