From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Wei Liu" <wl@xen.org>,
"Anthony PERARD" <anthony.perard@citrix.com>,
"Juergen Gross" <jgross@suse.com>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/hvm: don't expose XENFEAT_hvm_pirqs by default
Date: Wed, 10 Jan 2024 12:34:33 +0100 [thread overview]
Message-ID: <ZZ6AyeAdOZ9Dx-AK@macbook> (raw)
In-Reply-To: <238b79f5-0510-4306-9c32-19dade08e819@suse.com>
On Wed, Jan 10, 2024 at 11:26:02AM +0100, Jan Beulich wrote:
> On 10.01.2024 10:53, Roger Pau Monne wrote:
> > The HVM pirq feature allows routing interrupts from both physical and emulated
> > devices over event channels, this was done a performance improvement. However
> > its usage is fully undocumented, and the only reference implementation is in
> > Linux. It defeats the purpose of local APIC hardware virtualization, because
> > when using it interrupts avoid the usage of the local APIC altogether.
>
> So without sufficient APIC acceleration, isn't this arranging for degraded
> performance then? IOW should the new default perhaps be dependent on the
> degree of APIC acceleration?
Maybe, I certainly have no figures, but given the feature is not
working as expected I don't think we should block disabling it on
performance reasons. Reliability should always be first to
performance.
> > It has also been reported to not work properly with certain devices, at least
> > when using some AMD GPUs Linux attempts to route interrupts over event
> > channels, but Xen doesn't correctly detect such routing, which leads to the
> > hypervisor complaining with:
> >
> > (XEN) d15v0: Unsupported MSI delivery mode 7 for Dom15
> >
> > When MSIs are attempted to be routed over event channels the entry delivery
> > mode is set to ExtINT, but Xen doesn't detect such routing and attempts to
> > inject the interrupt following the native MSI path, and the ExtINT delivery
> > mode is not supported.
>
> Shouldn't this be properly addressed nevertheless?
There's no documentation at all about how the HVM PIRQ interface, so
every time I had to deal with it I had to guess and reverse engineer
how it's supposed to work.
> The way it's described
> it sounds as if MSI wouldn't work at all this way; I can't spot why the
> issue would only be "with certain devices". Yet that in turn doesn't look
> to be very likely - pass-through use cases, in particular SR-IOV ones,
> would certainly have noticed.
I think it has to do with when/how the MSI is updated. I can't repro
myself, which makes fixing even more complicated.
TBH, I think the feature is simply broken, and I don't feel like
spending more time fixing it. The fact that it was added in the first
place, and enabled by default was IMO a mistake.
If someone is willing to fix the issue, I'm fine with that, but I
certainly don't want to spend more time fixing issues for an
undocumented feature, the more that going forward such feature is
likely to be even less relevant with hardware APIC virtualization
being more widely available.
FWIW, this patch has an issue in libxl with PV guests, so will need to
send v2.
Thanks, Roger.
next prev parent reply other threads:[~2024-01-10 11:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 9:53 [PATCH] x86/hvm: don't expose XENFEAT_hvm_pirqs by default Roger Pau Monne
2024-01-10 10:26 ` Jan Beulich
2024-01-10 11:34 ` Roger Pau Monné [this message]
2024-01-10 13:47 ` Xenia Ragiadakou
2024-01-10 15:21 ` Roger Pau Monné
2024-01-11 8:04 ` Xenia Ragiadakou
2024-01-10 15:20 ` Andrew Cooper
2024-01-11 17:47 ` David Woodhouse
2024-01-12 11:05 ` Roger Pau Monné
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=ZZ6AyeAdOZ9Dx-AK@macbook \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=marmarek@invisiblethingslab.com \
--cc=wl@xen.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.