ppc/spapr_hcall: Implement H_RANDOM hypercall
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 31 repliesIn review
- v1 RFC1 patch 4 repliesSuperseded
Changes in v2 from the cover letter
- Added Michael's patch for setting up the device tree information
- After discussing this hypercall with some people at KVM forum 2015, I've now reworked the code to use the RngBackend of QEMU instead of using /dev/random directly.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | spapr: Add support for hwrng when availablehw/ include/ target-ppc/ +1 more | +27 | 20 replies | |
| 2/2 | ppc/spapr_hcall: Implement H_RANDOM hypercall in QEMUhw/ hw/ include/ | +109 | 11 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [Qemu-devel] [PATCH v2 0/2] ppc/spapr_hcall: Implement H_RANDOM hypercall
The H_RANDOM sPAPR hypercall is used to pass high-quality random numbers to guests (similar to virtio-rnd). Since the Linux guest kernels already support this hypercall, we should provide this interface in QEMU, too, in case virtio-rnd is not available in the guest yet.
First patch is an older patch by Michael Ellerman which sets up the device tree for this interface (which is already used when KVM in the host kernel supports the H_RANDOM hypercall). The second patch then implements the hypercall for plain QEMU, too, by using the RngBackends of QEMU.
Note: Since I do not have access to the SPAPR spec, I figured out the calling conventions of the hypercall by looking at the way the Linux kernel is using this call to retriev random data. So there might be some bugs or missing pieces here... - if you spot something, please tell me!
v2:
- Added Michael's patch for setting up the device tree information
- After discussing this hypercall with some people at KVM forum 2015, I've now reworked the code to use the RngBackend of QEMU instead of using /dev/random directly.
Michael Ellerman (1):
spapr: Add support for hwrng when available
Thomas Huth (1):
ppc/spapr_hcall: Implement H_RANDOM hypercall in QEMU
hw/ppc/spapr.c | 50 +++++++++++++++++++++++++++++++-- hw/ppc/spapr_hcall.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/hw/ppc/spapr.h | 3 ++ target-ppc/kvm.c | 5 ++++ target-ppc/kvm_ppc.h | 5 ++++ 5 files changed, 135 insertions(+), 3 deletions(-)
Signature · 1 line
1.8.3.1