diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2018-01-18 09:56:27 +0100 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2018-01-22 11:22:30 +0100 |
commit | b073c87517d4d348c7bac0f0b35e8e83e6354d82 (patch) | |
tree | 4c00978328434618b9f2378350f9807b369a0a16 /target/s390x/machine.c | |
parent | 9cbb636270b4df6f0a548e5c34b895330db5df8b (diff) | |
download | qemu-b073c87517d4d348c7bac0f0b35e8e83e6354d82.zip qemu-b073c87517d4d348c7bac0f0b35e8e83e6354d82.tar.gz qemu-b073c87517d4d348c7bac0f0b35e8e83e6354d82.tar.bz2 |
s390x/kvm: Handle bpb feature
We need to handle the bpb control on reset and migration. Normally
stfle.82 is transparent (and the normal guest part works without
hypervisor activity). To prevent any issues we require full
host kernel support for this feature.
Cc: qemu-stable@nongnu.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <20180118085628.40798-3-borntraeger@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
[CH: 'Branch Prediction Blocking' -> 'Branch prediction blocking']
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/machine.c')
-rw-r--r-- | target/s390x/machine.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/s390x/machine.c b/target/s390x/machine.c index b78f326..84b4928 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -194,6 +194,22 @@ const VMStateDescription vmstate_gscb = { } }; +static bool bpbc_needed(void *opaque) +{ + return s390_has_feat(S390_FEAT_BPB); +} + +const VMStateDescription vmstate_bpbc = { + .name = "cpu/bpbc", + .version_id = 1, + .minimum_version_id = 1, + .needed = bpbc_needed, + .fields = (VMStateField[]) { + VMSTATE_BOOL(env.bpbc, S390CPU), + VMSTATE_END_OF_LIST() + } +}; + const VMStateDescription vmstate_s390_cpu = { .name = "cpu", .post_load = cpu_post_load, @@ -228,6 +244,7 @@ const VMStateDescription vmstate_s390_cpu = { &vmstate_riccb, &vmstate_exval, &vmstate_gscb, + &vmstate_bpbc, NULL }, }; |