OSDN Git Service

s390x: protvirt: Inhibit balloon when switching to protected mode
authorJanosch Frank <frankja@linux.ibm.com>
Thu, 19 Mar 2020 13:19:10 +0000 (09:19 -0400)
committerCornelia Huck <cohuck@redhat.com>
Wed, 29 Apr 2020 12:31:31 +0000 (14:31 +0200)
commitb1697f63fd8f8201b1447bb55f595830b9cbde31
tree1c34a04f5b43f02f7e14cb715d9a20087727e9f0
parent0141e1b47707d90f5bd9d252da064ebdaca698a6
s390x: protvirt: Inhibit balloon when switching to protected mode

Ballooning in protected VMs can only be done when the guest shares the
pages it gives to the host. If pages are not shared, the integrity
checks will fail once those pages have been altered and are given back
to the guest.

As we currently do not yet have a solution for this we will continue
like this:

1. We block ballooning now in QEMU (with this patch).

2. Later we will provide a change to virtio that removes the blocker
and adds VIRTIO_F_IOMMU_PLATFORM automatically by QEMU when doing the
protvirt switch. This is OK, as the balloon driver in Linux (the only
supported guest) will refuse to work with the IOMMU_PLATFORM feature
bit set.

3. Later, we can fix the guest balloon driver to accept the IOMMU
feature bit and correctly exercise sharing and unsharing of balloon
pages.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200319131921.2367-6-frankja@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/s390x/s390-virtio-ccw.c