8a474dcd07
- Include upstream patches targeted for the next stable release (bug fixes only) block-io-fix-bdrv_co_do_copy_on_readv.patch compat-disable-edid-on-correct-virtio-gp.patch target-ppc-Fix-rlwinm-on-ppc64.patch vhost-correctly-turn-on-VIRTIO_F_IOMMU_P.patch - s390x Protected Virtualization support - start and control guest in secure mode. (note: binary patch from patch series dropped since for s390x we rebuild the patched binary anyways) (bsc#1167075 jsc#SLE-7407) s390-sclp-improve-special-wait-psw-logic.patch s390x-Add-missing-vcpu-reset-functions.patch s390x-Add-SIDA-memory-ops.patch s390x-Add-unpack-facility-feature-to-GA1.patch s390x-Beautify-diag308-handling.patch s390x-Don-t-do-a-normal-reset-on-the-ini.patch s390x-ipl-Consolidate-iplb-validity-chec.patch s390x-kvm-Make-kvm_sclp_service_call-voi.patch s390x-Move-clear-reset.patch s390x-Move-diagnose-308-subcodes-and-rcs.patch s390x-Move-initial-reset.patch s390x-Move-reset-normal-to-shared-reset-.patch s390x-protvirt-Add-migration-blocker.patch s390x-protvirt-Disable-address-checks-fo.patch s390x-protvirt-Handle-SIGP-store-status-.patch s390x-protvirt-Inhibit-balloon-when-swit.patch s390x-protvirt-KVM-intercept-changes.patch s390x-protvirt-Move-diag-308-data-over-S.patch s390x-protvirt-Move-IO-control-structure.patch s390x-protvirt-Move-STSI-data-over-SIDAD.patch s390x-protvirt-SCLP-interpretation.patch s390x-protvirt-Set-guest-IPL-PSW.patch s390x-protvirt-Support-unpack-facility.patch Sync-pv.patch OBS-URL: https://build.opensuse.org/request/show/787000 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=538
46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
From: Janosch Frank <frankja@linux.ibm.com>
|
|
Date: Tue, 23 Jul 2019 13:17:32 +0200
|
|
Subject: s390x: protvirt: Set guest IPL PSW
|
|
|
|
References: bsc#1167075
|
|
|
|
Handling of CPU reset and setting of the IPL psw from guest storage at
|
|
offset 0 is done by a Ultravisor call. Let's only fetch it if
|
|
necessary.
|
|
|
|
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
|
|
Reviewed-by: Thomas Huth <thuth@redhat.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>
|
|
(cherry picked from commit e8686d9849f1625f4f4b28403f0555181b72d1b6)
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
target/s390x/cpu.c | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
|
|
index 479f1978c974722ceeb72ac5fb32..6da0c3f15530310fba5f609b8c7f 100644
|
|
--- a/target/s390x/cpu.c
|
|
+++ b/target/s390x/cpu.c
|
|
@@ -77,8 +77,16 @@ static bool s390_cpu_has_work(CPUState *cs)
|
|
static void s390_cpu_load_normal(CPUState *s)
|
|
{
|
|
S390CPU *cpu = S390_CPU(s);
|
|
- cpu->env.psw.addr = ldl_phys(s->as, 4) & PSW_MASK_ESA_ADDR;
|
|
- cpu->env.psw.mask = PSW_MASK_32 | PSW_MASK_64;
|
|
+ if (!s390_is_pv()) {
|
|
+ cpu->env.psw.addr = ldl_phys(s->as, 4) & PSW_MASK_ESA_ADDR;
|
|
+ cpu->env.psw.mask = PSW_MASK_32 | PSW_MASK_64;
|
|
+ } else {
|
|
+ /*
|
|
+ * Firmware requires us to set the load state before we set
|
|
+ * the cpu to operating on protected guests.
|
|
+ */
|
|
+ s390_cpu_set_state(S390_CPU_STATE_LOAD, cpu);
|
|
+ }
|
|
s390_cpu_set_state(S390_CPU_STATE_OPERATING, cpu);
|
|
}
|
|
#endif
|