Thread (40 messages) 40 messages, 3 authors, 2024-09-18

Re: [PATCH 11/18] KVM: x86: Pass the instruction length on memory fault user-space exits

From: Nicolas Saenz Julienne <hidden>
Date: 2024-09-16 15:53:52
Also in: kvm, linux-doc, linux-hyperv, linux-trace-kernel, lkml

On Fri Sep 13, 2024 at 7:11 PM UTC, Sean Christopherson wrote:
On Sun, Jun 09, 2024, Nicolas Saenz Julienne wrote:
quoted
In order to simplify Hyper-V VSM secure memory intercept generation in
user-space (it avoids the need of implementing an x86 instruction
decoder and the actual decoding). Pass the instruction length being run
at the time of the guest exit as part of the memory fault exit
information.
Why does userspace need the instruction length, but not the associated code stream?
Since the fault already provides the GPA it's trivial to read it from
the VMM. Then again, now that I've dug deeper into the RWX memory
attributes's edge cases, this doesn't always work. For example when
getting a fault during a page walk (the CPU being unable to access the
page that contains the next GPTE due to it being marked non-readable by
a memattr). The fault exit GPA will not point to the code stream.

I will rework/rethink this once I have the complete memattrs story.

Thanks,
Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help