From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] x86/msi: Allow writes to registers on the same page as MSI-X table
Date: Fri, 18 Nov 2022 14:00:23 +0100 [thread overview]
Message-ID: <Y3eB5+GEQ36X9LnR@mail-itl> (raw)
In-Reply-To: <9d034957-822c-74ba-9aea-0944cc456870@suse.com>
[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]
On Fri, Nov 18, 2022 at 01:33:39PM +0100, Jan Beulich wrote:
> On 18.11.2022 13:19, Marek Marczykowski-Górecki wrote:
> > On Fri, Nov 18, 2022 at 08:20:14AM +0100, Jan Beulich wrote:
> >> On 17.11.2022 18:31, Marek Marczykowski-Górecki wrote:
> >>> On Thu, Nov 17, 2022 at 05:34:36PM +0100, Jan Beulich wrote:
> >>>> Which in turn raises the question: Do you need to handle reads
> >>>> in the new code in the first place?
> >>>
> >>> The page not being mapped is also the reason why I do need to handle
> >>> reads too.
> >>
> >> Just for my own clarity: You mean "not mapped to qemu" here?
> >
> > No, to the HVM domain (in p2m). Xen (outside of MSI-X specific code for
> > HVM) doesn't know where those reads should be from.
>
> Hmm, I was expecting them to be mapped r/o to the guest, but perhaps I'm
> misremembering. Clearly both ept_p2m_type_to_flags() and
> p2m_type_to_flags() take mmio_ro_ranges into consideration, which is
> what I was basing my understanding on (without having looked at other
> places in detail).
Qemu doesn't map the page (using xc_domain_memory_mapping()) where MSI-X
table lives. I tried to modify this part, but it resulted in EPT
violation on write attempt (and my emulation code wasn't called at all).
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-11-18 13:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 19:20 [PATCH 1/2] x86/msi: passthrough all MSI-X vector ctrl writes to device model Marek Marczykowski-Górecki
2022-11-14 19:21 ` [PATCH 2/2] x86/msi: Allow writes to registers on the same page as MSI-X table Marek Marczykowski-Górecki
2022-11-17 16:34 ` Jan Beulich
2022-11-17 17:31 ` Marek Marczykowski-Górecki
2022-11-18 7:20 ` Jan Beulich
2022-11-18 12:19 ` Marek Marczykowski-Górecki
2022-11-18 12:33 ` Jan Beulich
2022-11-18 13:00 ` Marek Marczykowski-Górecki [this message]
2022-11-18 13:07 ` Jan Beulich
2022-11-15 9:36 ` [PATCH 1/2] x86/msi: passthrough all MSI-X vector ctrl writes to device model Jan Beulich
2022-11-15 11:37 ` Marek Marczykowski-Górecki
2022-11-15 13:54 ` Jan Beulich
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=Y3eB5+GEQ36X9LnR@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.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.