Skip to content

spapr: Nested TCG is TCG only

Fabiano Rosas qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3spapr: Ignore nested KVM hypercalls when not running TCGhw/ppc/spapr_hcall.c+9 -13 replies
2/3spapr: Move hypercall_register_softmmuhw/ppc/spapr_hcall.c+25 -250 replies
3/3spapr: Move nested KVM hypercalls under a TCG only config.hw/ppc/spapr_hcall.c+13 -72 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] spapr: Nested TCG is TCG only

In a KVM-only scenario that does not support nested KVM, a well written guest would never try to call nested KVM hypercalls. However, if a buggy or malicious guest calls the nested KVM API even without nested KVM support, the L0 would redirect the hypercalls into QEMU. Previously this would have caused an H_FUNCTION return for every call, but now that QEMU knows about the nested KVM API, it tries to service the calls. This is incorrect because the spapr virtual hypervisor implementation of the nested KVM API depends on the first level guest to be emulated by TCG.

So add guards against that and move the whole code under CONFIG_TCG.

Fabiano Rosas (3):
spapr: Ignore nested KVM hypercalls when not running TCG
spapr: Move hypercall_register_softmmu
spapr: Move nested KVM hypercalls under a TCG only config.

 hw/ppc/spapr_hcall.c | 76 ++++++++++++++++++++++++++------------------
 1 file changed, 45 insertions(+), 31 deletions(-)
Signature · 1 line
2.34.1