From: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
To: Jan Beulich <jbeulich@suse.com>,
Grygorii Strashko <grygorii_strashko@epam.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Jason Andryuk" <jason.andryuk@amd.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [XEN][PATCH] x86/hvm: vlapic: fix RO bits emulation in LVTx regs
Date: Fri, 26 Sep 2025 13:12:20 +0200 [thread overview]
Message-ID: <DD2OQUPHOOV8.2IYRM1EKH35Y6@amd.com> (raw)
In-Reply-To: <67dd3659-916b-4e64-afe2-e13fdc8d31f0@suse.com>
On Fri Sep 26, 2025 at 12:52 PM CEST, Jan Beulich wrote:
> On 26.09.2025 12:38, Grygorii Strashko wrote:
>> On 26.09.25 11:17, Jan Beulich wrote:
>>> On 25.09.2025 21:55, Grygorii Strashko wrote:
>>>> From: Grygorii Strashko <grygorii_strashko@epam.com>
>>>>
>>>> The LAPIC LVTx registers have two RO bits:
>>>> - all: Delivery Status (DS) bit 12
>>>> - LINT0/LINT1: Remote IRR Flag (RIR) bit 14.
>>>> This bit is reserved for other LVTx regs with RAZ/WI access type (MMIO), while
>>>> WRMSR (guest_wrmsr_x2apic()) has appropiate checks for reserved bits
>>>> (MBZ access type).
>>>
>>> Question is what the behavior is for writing the r/o (but not reserved) bits.
>>> I wasn't able to find any statement in the SDM.
>>
>> Me too. Usually RO/WI on most HW.
>> For example, LAPIC MMIO "Write" will be ignored (WRMSR will trigger exception).
>
> My remark was specifically about WRMSR, and what you say here contradicts ...
Not quite what you're asking, but writing to the X2APIC_ID register does trigger
#GP(0), so one would hope writing to RO bits triggers an exception too rather
than being WI when mixed with RW bits in a register.
Now again, it might not in order to avoid #GP(0) on a race.
Definitely worth running a silly test with wrmsr_safe() to make sure. I could
see real hardware going either way.
Cheers,
Alejandro
next prev parent reply other threads:[~2025-09-26 11:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 19:55 [XEN][PATCH] x86/hvm: vlapic: fix RO bits emulation in LVTx regs Grygorii Strashko
2025-09-26 8:17 ` Jan Beulich
2025-09-26 10:38 ` Grygorii Strashko
2025-09-26 10:52 ` Jan Beulich
2025-09-26 11:12 ` Alejandro Vallejo [this message]
2025-09-26 12:28 ` Grygorii Strashko
2025-09-26 11:34 ` Grygorii Strashko
2025-09-26 12:00 ` 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=DD2OQUPHOOV8.2IYRM1EKH35Y6@amd.com \
--to=alejandro.garciavallejo@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=grygorii_strashko@epam.com \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.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 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.