summaryrefslogtreecommitdiffstats
path: root/target/s390x/kvm.c
diff options
context:
space:
mode:
authorJanosch Frank2020-03-23 09:36:06 +0100
committerCornelia Huck2020-04-29 14:30:54 +0200
commitc3347ed0d2ee42a7dcf7bfe7f9c3884a9596727a (patch)
treef53ebc5ea6b896de2b8b63cbd34eac6941611737 /target/s390x/kvm.c
parents390x: Move diagnose 308 subcodes and rcs into ipl.h (diff)
downloadqemu-c3347ed0d2ee42a7dcf7bfe7f9c3884a9596727a.tar.gz
qemu-c3347ed0d2ee42a7dcf7bfe7f9c3884a9596727a.tar.xz
qemu-c3347ed0d2ee42a7dcf7bfe7f9c3884a9596727a.zip
s390x: protvirt: Support unpack facility
The unpack facility provides the means to setup a protected guest. A protected guest cannot be introspected by the hypervisor or any user/administrator of the machine it is running on. Protected guests are encrypted at rest and need a special boot mechanism via diag308 subcode 8 and 10. Code 8 sets the PV specific IPLB which is retained separately from those set via code 5. Code 10 is used to unpack the VM into protected memory, verify its integrity and start it. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Co-developed-by: Christian Borntraeger <borntraeger@de.ibm.com> [Changes to machine] Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20200323083606.24520-1-frankja@linux.ibm.com> [CH: fixed up KVM_PV_VM_ -> KVM_PV_] Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/kvm.c')
-rw-r--r--target/s390x/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 7f7ebab842..b2b14bde2b 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -321,6 +321,11 @@ void kvm_s390_set_max_pagesize(uint64_t pagesize, Error **errp)
cap_hpage_1m = 1;
}
+int kvm_s390_get_hpage_1m(void)
+{
+ return cap_hpage_1m;
+}
+
static void ccw_machine_class_foreach(ObjectClass *oc, void *opaque)
{
MachineClass *mc = MACHINE_CLASS(oc);