mirror of https://gitee.com/openkylin/linux.git
KVM: s390: Fixes for 5.10
- do not reset the global diag318 data for per-cpu reset - do not mark memory as protected too early -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJfrTFxAAoJEBF7vIC1phx8cXIP/R0KKTjBqUnJR3NekJhT1Cwl I+/fHgMVHmcT0A9loPF8ISwEbJTyQZS2DUol5Cro9VzwZgrlYlXGIpBsXhS0WlTf +nGCl9J9tifNL50cNeme91Tu8Lvh87LLyo45fr+w5cPOSK/iPDnGkbgMj+KKx1ZX UzVtsMv07l0Ue0ya1uYv3mW2LIy5p2ant5VsdYFAK4qdsZXYM/AiXsOmYdNbEZUM Twegn1lLVYeukqs8CBCxVtM3wXvm2bA/QgbSfkPj8lQtoJLxuejOYUALHld4sYn0 zz3j/O+cKaUPCf0qFj/yBDVeCgqGNMOyN9Nwn9/3Im3ih3nK2p2c8A7bJNknsMm+ 9ZoilYObQbWPv3Os+p+9bPr6EtvtCbrfIJuab61e2nxdK5tP8gKAQKtoUBSOnZPp 26twv9hANLjfjjTW7awWEOshiRi2+T5BPT3WS9fRYxX6khIURuaSW/Nf5lh4mGnT Jb3T5wHPdAgZ8B4Z7xGh/I8gQ7FLCTxVykscyKkdd0QDJB7zuT/TcyIjod4x8nW0 FROw6rKBY3YX22j77bvlB8T9Sy/IYhdAsnp7oQDKrEBGsk/+GwByOEnUqHXZPf1e VdxHSSdcTg0LYv69aOCADRWOLzIeK+FO3DMpBnGQAvI/GCKnMWp1Isih+JVFxagi JcrPnteiDJ2YS5MQlrE3 =wewY -----END PGP SIGNATURE----- Merge tag 'kvm-s390-master-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master KVM: s390: Fixes for 5.10 - do not reset the global diag318 data for per-cpu reset - do not mark memory as protected too early
This commit is contained in:
commit
d4d3c84d77
|
@ -2312,7 +2312,7 @@ static int kvm_s390_handle_pv(struct kvm *kvm, struct kvm_pv_cmd *cmd)
|
|||
struct kvm_s390_pv_unp unp = {};
|
||||
|
||||
r = -EINVAL;
|
||||
if (!kvm_s390_pv_is_protected(kvm))
|
||||
if (!kvm_s390_pv_is_protected(kvm) || !mm_is_protected(kvm->mm))
|
||||
break;
|
||||
|
||||
r = -EFAULT;
|
||||
|
@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu)
|
|||
vcpu->arch.sie_block->pp = 0;
|
||||
vcpu->arch.sie_block->fpf &= ~FPF_BPBC;
|
||||
vcpu->arch.sie_block->todpr = 0;
|
||||
vcpu->arch.sie_block->cpnc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu)
|
|||
|
||||
regs->etoken = 0;
|
||||
regs->etoken_extension = 0;
|
||||
regs->diag318 = 0;
|
||||
}
|
||||
|
||||
int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
|
||||
|
|
|
@ -208,7 +208,6 @@ int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc)
|
|||
return -EIO;
|
||||
}
|
||||
kvm->arch.gmap->guest_handle = uvcb.guest_handle;
|
||||
atomic_set(&kvm->mm->context.is_protected, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -228,6 +227,8 @@ int kvm_s390_pv_set_sec_parms(struct kvm *kvm, void *hdr, u64 length, u16 *rc,
|
|||
*rrc = uvcb.header.rrc;
|
||||
KVM_UV_EVENT(kvm, 3, "PROTVIRT VM SET PARMS: rc %x rrc %x",
|
||||
*rc, *rrc);
|
||||
if (!cc)
|
||||
atomic_set(&kvm->mm->context.is_protected, 1);
|
||||
return cc ? -EINVAL : 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2690,6 +2690,8 @@ static const struct mm_walk_ops reset_acc_walk_ops = {
|
|||
#include <linux/sched/mm.h>
|
||||
void s390_reset_acc(struct mm_struct *mm)
|
||||
{
|
||||
if (!mm_is_protected(mm))
|
||||
return;
|
||||
/*
|
||||
* we might be called during
|
||||
* reset: we walk the pages and clear
|
||||
|
|
Loading…
Reference in New Issue