[PW_SID:1123066] RISC-V: KVM: Inject instruction access fault on unmapped guest fetch#2238
[PW_SID:1123066] RISC-V: KVM: Inject instruction access fault on unmapped guest fetch#2238linux-riscv-bot wants to merge 1 commit into
Conversation
When an instruction guest-page-fault targets a GPA that is not backed by any memslot, KVM has no MMIO emulation path for the fetch. Load and store guest-page faults can be routed through MMIO emulation, but an instruction fetch has no data payload or access size for userspace to complete in the same way. Treat this case as an architectural access fault in the guest. On bare metal, fetching from an inaccessible physical address raises an instruction access fault for the supervisor to handle through its trap vector. Reflect EXC_INST_ACCESS back to the guest so the guest observes the same class of exception rather than leaving the fetch as a host-handled condition. stval contains the virtual address of the portion of the instruction that caused the fault, while sepc points to the beginning of the instruction. Signed-off-by: Qingwei Hu <qingwei.hu@bytedance.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
|
Patch 1: "RISC-V: KVM: Inject instruction access fault on unmapped guest fetch" |
PR for series 1123066 applied to workflow__riscv__fixes
Name: RISC-V: KVM: Inject instruction access fault on unmapped guest fetch
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1123066
Version: 1