From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: eduardo@habkost.net, thuth@redhat.com, quintela@redhat.com,
mst@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [PATCH 3/3] x86: Switch to q35 as the default machine type
Date: Tue, 15 Feb 2022 18:29:46 +0000 [thread overview]
Message-ID: <YgvxGimmjuRQ+2VV@work-vm> (raw)
In-Reply-To: <YgvtLmoJcv+ZSW1S@redhat.com>
* Daniel P. Berrangé (berrange@redhat.com) wrote:
> On Tue, Feb 15, 2022 at 04:25:33PM +0000, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> >
> > The 'q35' machine type series has been around for a few years now, and
> > is getting heavily used downstream without many problems; lets flip
> > to using it as the default.
>
> I don't think I'd claim 'without many problems'. In RHEL while 'q35'
> is recommended, it explicitly isn't the default because it would havbe
> created compatibility problems for applications. Every non-trivial
> application needs to make code changes to cope with 'q35' if they're
> using 'i440fx' today. Apps that Red Hat ships, either in RHEL or as
> add-on products, have been updated, but it was certainly not painfree
> and took considerable time for OpenStack at least. I worry about how
> ready the broader QEMU consumers are to work with 'q35' as an opt-in,
> let alone as a default.
How many of these consumers do all of:
a) Don't specify the machine type
b) and try and do hotplug etc
> PCI is the really big ticket item here. If keeping the same command
> line none of the PCI devices added will be hotpluggable because
> they'll all be put in the root complex as integrated end points,
> whether PCI or PCIe devices.
>
> To allow for hot-unplug, any cold plugged PCIe devices need to be
> placed in unique pcie-root-port (one root port per device). The
> PCI devices meanwhile have to be put into a pci-bridge, which is
> in turn plugged into a pcie-to-pci-bridge. QEMU doesn't do this
> placement by default so nothing is hot-unpluggable.
>
> To allow for hot-plug, it is needed to pre-create many pcie-root-port
> devices - one for each device to be plugged.
I'm tempted to modify q35 to create a bunch of root ports by default
and then tweak the placement to pick them; that would have no effect
on libvirt users but would make simple command line use easy again.
> Libvirt tried to make this a little easier by putting cold plugged
> devices into a place that allows them to be hot-unplugged.
>
> On the libvirt side, there's also the need to know about sata vs
> ide. That ones fun because at the QEMU level we still refer to it
> as 'ide' throughout, even though q35 is implementing sata.
>
> There was one other notable difference that impacted apps, but I
> can't remember what it was offhand.
There be dragons, but I can't remember where :-)
>
> > While it is of course newer and shinier than it's old i440fx cousin,
> > the main reasons are:
>
> s/newer and shinier/slightly less ancient and obsolete/ ;-P
>
> > * PCIe support
> > * No default floppy or IDE
> > * More modern defaults for NIC
> > * Better OVMF support
>
> These are fine reasons for recommending apps to prefer use of 'q35'
> on an opt-in basis.
>
> Given the semantic differences from 'i440fx', changing the default
> machine type has effects that are equivalent to breaking command
> line syntax compatibility, which is something we've always tried
> to avoid.
I'm not sure where to draw the line; it's always been legal for
new versions of machine types to have different slightly different
behaviour; for example it would be reasonable for a new version to use
up a PCIe bus slot/address that was previously unused and thus break
your command line that was trying to stuff another device in there.
To my mind, as long as -M pc puts everything back the way it was, I
wasn't too worried about that breakage.
Dave
> Regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2022-02-15 18:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 16:25 [PATCH 0/3] x86: Switch over to q35 as the default machine type Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests Dr. David Alan Gilbert (git)
2022-02-17 8:04 ` Thomas Huth
2022-02-17 8:18 ` Michael S. Tsirkin
2022-02-15 16:25 ` [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests Dr. David Alan Gilbert (git)
2022-02-17 8:09 ` Thomas Huth
2022-02-17 8:18 ` Michael S. Tsirkin
2022-02-15 16:25 ` [PATCH 3/3] x86: Switch to q35 as the default machine type Dr. David Alan Gilbert (git)
2022-02-15 18:13 ` Daniel P. Berrangé
2022-02-15 18:29 ` Dr. David Alan Gilbert [this message]
2022-02-16 10:58 ` Gerd Hoffmann
2022-02-16 11:01 ` Dr. David Alan Gilbert
2022-02-16 11:23 ` Daniel P. Berrangé
2022-02-16 11:24 ` Thomas Huth
2022-02-16 17:40 ` Dr. David Alan Gilbert
2022-02-16 17:48 ` Daniel P. Berrangé
2022-02-16 17:57 ` Dr. David Alan Gilbert
2022-02-17 7:46 ` Thomas Huth
2022-02-17 7:52 ` Michael S. Tsirkin
2022-02-17 9:29 ` Daniel P. Berrangé
2022-02-17 9:43 ` Dr. David Alan Gilbert
2022-02-17 7:57 ` Thomas Huth
2022-02-17 8:08 ` Gerd Hoffmann
2022-02-17 8:17 ` Michael S. Tsirkin
2022-02-17 9:16 ` Daniel P. Berrangé
2022-02-17 9:35 ` Igor Mammedov
2022-02-17 9:19 ` Kashyap Chamarthy
2022-02-15 16:25 ` [PATCH 0/3] x86: Switch over " Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests Dr. David Alan Gilbert (git)
2022-02-15 16:25 ` [PATCH 3/3] x86: Switch to q35 as the default machine type Dr. David Alan Gilbert (git)
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=YgvxGimmjuRQ+2VV@work-vm \
--to=dgilbert@redhat.com \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=thuth@redhat.com \
/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).