Skip to content

KVM: PPC: Book3S HV: Nested guest state sanitising changes

Fabiano Rosas kvm-ppc linuxppc-dev 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 0 repliesNew
  2. v52 patches 3 repliesSuperseded
  3. v42 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v32 patches8 repliesSuperseded
v21 patch2 repliesSuperseded

Changes in v6 from the cover letter

- patch 2 now reads the instruction earlier at the nested exit handler to allow the guest to retry if the load fails.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: PPC: Book3S HV: Sanitise vcpu registers in nested patharch/powerpc/kvm/book3s_hv_nested.c+46 -480 replies
2/2KVM: PPC: Book3S HV: Stop forwarding all HFUs to L1arch/powerpc/kvm/book3s_hv.c arch/powerpc/kvm/book3s_hv_nested.c+36 -60 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchNicholas Piggin
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/2] KVM: PPC: Book3S HV: Nested guest state sanitising changes

This series aims to stop contaminating the l2_hv structure with bits that might have come from L1 state.

Patch 1 makes l2_hv read-only (mostly). It is now only changed when we explicitly want to pass information to L1.

Patch 2 makes sure that L1 is not forwarded HFU interrupts when the host has decided to disable any facilities (theoretical for now, since HFSCR bits are always the same between L1/Ln).

Changes since v5:

- patch 2 now reads the instruction earlier at the nested exit handler to allow the guest to retry if the load fails.

v5:

- moved setting of the Cause bits under BOOK3S_INTERRUPT_H_FAC_UNAVAIL.

https://lkml.kernel.org/r/[email protected]

v4:

- now passing lpcr separately into load_l2_hv_regs to solve the conflict with commit a19b70abc69a ("KVM: PPC: Book3S HV: Nested move LPCR sanitising to sanitise_hv_regs");

- patch 2 now forwards a HEAI instead of injecting a Program.

https://lkml.kernel.org/r/[email protected]

v3:

- removed the sanitise functions;
- moved the entry code into a new load_l2_hv_regs and the exit code into the existing save_hv_return_state;
- new patch: removes the cause bits when L0 has disabled the corresponding facility.

https://lkml.kernel.org/r/[email protected]

v2:

- made the change more generic, not only applies to hfscr anymore;
- sanitisation is now done directly on the vcpu struct, l2_hv is left unchanged.

https://lkml.kernel.org/r/[email protected]

v1:
https://lkml.kernel.org/r/[email protected]

Fabiano Rosas (2):
KVM: PPC: Book3S HV: Sanitise vcpu registers in nested path
KVM: PPC: Book3S HV: Stop forwarding all HFUs to L1

 arch/powerpc/kvm/book3s_hv.c        |  13 ++++
 arch/powerpc/kvm/book3s_hv_nested.c | 117 ++++++++++++++++------------
 2 files changed, 79 insertions(+), 51 deletions(-)
Signature · 1 line
2.29.2