From: Igor Mammedov <imammedo@redhat.com>
To: Chuck Zmudzinski <brchuckz@netscape.net>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Bernhard Beschow" <shentey@gmail.com>,
qemu-devel@nongnu.org,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Paul Durrant" <paul@xen.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
xen-devel@lists.xenproject.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Anthony Perard" <anthony.perard@citrix.com>,
"Thomas Huth" <thuth@redhat.com>,
"Eric Auger" <eric.auger@redhat.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Peter Xu" <peterx@redhat.com>
Subject: Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru
Date: Tue, 17 Jan 2023 12:04:16 +0100 [thread overview]
Message-ID: <20230117120416.0aa041d6@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <fce262ea-e0d5-d670-787c-62d91b040739@netscape.net>
On Mon, 16 Jan 2023 13:00:53 -0500
Chuck Zmudzinski <brchuckz@netscape.net> wrote:
> On 1/16/23 10:33, Igor Mammedov wrote:
> > On Fri, 13 Jan 2023 16:31:26 -0500
> > Chuck Zmudzinski <brchuckz@aol.com> wrote:
> >
> >> On 1/13/23 4:33 AM, Igor Mammedov wrote:
> >> > On Thu, 12 Jan 2023 23:14:26 -0500
> >> > Chuck Zmudzinski <brchuckz@aol.com> wrote:
> >> >
> >> >> On 1/12/23 6:03 PM, Michael S. Tsirkin wrote:
> >> >> > On Thu, Jan 12, 2023 at 10:55:25PM +0000, Bernhard Beschow wrote:
> >> >> >> I think the change Michael suggests is very minimalistic: Move the if
> >> >> >> condition around xen_igd_reserve_slot() into the function itself and
> >> >> >> always call it there unconditionally -- basically turning three lines
> >> >> >> into one. Since xen_igd_reserve_slot() seems very problem specific,
> >> >> >> Michael further suggests to rename it to something more general. All
> >> >> >> in all no big changes required.
> >> >> >
> >> >> > yes, exactly.
> >> >> >
> >> >>
> >> >> OK, got it. I can do that along with the other suggestions.
> >> >
> >> > have you considered instead of reservation, putting a slot check in device model
> >> > and if it's intel igd being passed through, fail at realize time if it can't take
> >> > required slot (with a error directing user to fix command line)?
> >>
> >> Yes, but the core pci code currently already fails at realize time
> >> with a useful error message if the user tries to use slot 2 for the
> >> igd, because of the xen platform device which has slot 2. The user
> >> can fix this without patching qemu, but having the user fix it on
> >> the command line is not the best way to solve the problem, primarily
> >> because the user would need to hotplug the xen platform device via a
> >> command line option instead of having the xen platform device added by
> >> pc_xen_hvm_init functions almost immediately after creating the pci
> >> bus, and that delay in adding the xen platform device degrades
> >> startup performance of the guest.
> >>
> >> > That could be less complicated than dealing with slot reservations at the cost of
> >> > being less convenient.
> >>
> >> And also a cost of reduced startup performance
> >
> > Could you clarify how it affects performance (and how much).
> > (as I see, setup done at board_init time is roughly the same
> > as with '-device foo' CLI options, modulo time needed to parse
> > options which should be negligible. and both ways are done before
> > guest runs)
>
> I preface my answer by saying there is a v9, but you don't
> need to look at that. I will answer all your questions here.
>
> I am going by what I observe on the main HDMI display with the
> different approaches. With the approach of not patching Qemu
> to fix this, which requires adding the Xen platform device a
> little later, the length of time it takes to fully load the
> guest is increased. I also noticed with Linux guests that use
> the grub bootoader, the grub vga driver cannot display the
> grub boot menu at the native resolution of the display, which
> in the tested case is 1920x1080, when the Xen platform device
> is added via a command line option instead of by the
> pc_xen_hvm_init_pci fucntion in pc_piix.c, but with this patch
> to Qemu, the grub menu is displayed at the full, 1920x1080
> native resolution of the display. Once the guest fully loads,
> there is no noticeable difference in performance. It is mainly
> a degradation in startup performance, not performance once
> the guest OS is fully loaded.
Looking at igd-assign.txt, it recommends to add IGD using '-device' CLI
option, and actually drop at least graphics defaults explicitly.
So it is expected to work fine even when IGD is constructed with
'-device'.
Could you provide full CLI current xen starts QEMU with and then
a CLI you used (with explicit -device for IGD) that leads
to reduced performance?
CCing vfio folks who might have an idea what could be wrong based
on vfio experience.
next prev parent reply other threads:[~2023-01-17 11:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a09d2427397621eaecee4c46b33507a99cc5f161.1673334040.git.brchuckz.ref@aol.com>
2023-01-10 7:08 ` [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru Chuck Zmudzinski
2023-01-10 8:16 ` Michael S. Tsirkin
2023-01-10 13:09 ` Chuck Zmudzinski
2023-01-11 15:40 ` Chuck Zmudzinski
2023-01-12 19:18 ` Bernhard Beschow
2023-01-12 20:11 ` Chuck Zmudzinski
2023-01-12 22:55 ` Bernhard Beschow
2023-01-12 23:03 ` Michael S. Tsirkin
2023-01-13 4:14 ` Chuck Zmudzinski
2023-01-13 9:33 ` Igor Mammedov
2023-01-13 21:31 ` Chuck Zmudzinski
2023-01-16 15:33 ` Igor Mammedov
2023-01-16 18:00 ` Chuck Zmudzinski
2023-01-17 10:35 ` Igor Mammedov
2023-01-17 14:43 ` Chuck Zmudzinski
2023-01-20 15:53 ` Igor Mammedov
2023-01-17 14:50 ` Chuck Zmudzinski
2023-01-20 16:01 ` Igor Mammedov
2023-01-20 19:50 ` Chuck Zmudzinski
2023-01-17 11:04 ` Igor Mammedov [this message]
2023-01-18 0:15 ` Chuck Zmudzinski
2023-01-18 4:27 ` Alex Williamson
2023-01-18 22:39 ` Chuck Zmudzinski
2023-01-20 16:57 ` Stefano Stabellini
2023-01-20 19:26 ` Chuck Zmudzinski
2023-01-14 2:55 ` Chuck Zmudzinski
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=20230117120416.0aa041d6@imammedo.users.ipa.redhat.com \
--to=imammedo@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=brchuckz@netscape.net \
--cc=eduardo@habkost.net \
--cc=eric.auger@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shentey@gmail.com \
--cc=sstabellini@kernel.org \
--cc=thuth@redhat.com \
--cc=xen-devel@lists.xenproject.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).