s390x/tod-kvm: don't save/restore the TOD in PV guests
commit38621181ae3cbec62e3490fbc14f6ac01642d07a
authorNico Boehr <nrb@linux.ibm.com>
Wed, 12 Oct 2022 12:32:29 +0000 (12 14:32 +0200)
committerThomas Huth <thuth@redhat.com>
Thu, 27 Oct 2022 07:09:50 +0000 (27 09:09 +0200)
tree254b0c01e430f97e1677fe0a33482c62b3592fbc
parentd001a81256d1291319e13711f73d1f436beb81af
s390x/tod-kvm: don't save/restore the TOD in PV guests

Under PV, the guest's TOD clock is under control of the ultravisor and the
hypervisor cannot change it.

With upcoming kernel changes[1], the Linux kernel will reject QEMU's
request to adjust the guest's clock in this case, so don't attempt to set
the clock.

This avoids the following warning message on save/restore of a PV guest:

warning: Unable to set KVM guest TOD clock: Operation not supported

[1] https://lore.kernel.org/all/20221011160712.928239-2-nrb@linux.ibm.com/

Fixes: c3347ed0d2ee ("s390x: protvirt: Support unpack facility")
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Message-Id: <20221012123229.1196007-1-nrb@linux.ibm.com>
[thuth: Add curly braces]
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/s390x/tod-kvm.c