KVM: s390: vsie: support 64-bit-SCAO
Let's provide the 64-bit-SCAO facility to guest 2, so he can set up a SCA for guest 3 that has a 64 bit address. Please note that we already require the 64 bit SCAO for our vsie implementation, in order to forward the SCA directly (by pinning the page). Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
committed by
Christian Borntraeger
parent
588438cba0
commit
19c439b564
@ -99,6 +99,7 @@ struct kvm_s390_vm_cpu_machine {
|
|||||||
#define KVM_S390_VM_CPU_FEAT_NR_BITS 1024
|
#define KVM_S390_VM_CPU_FEAT_NR_BITS 1024
|
||||||
#define KVM_S390_VM_CPU_FEAT_ESOP 0
|
#define KVM_S390_VM_CPU_FEAT_ESOP 0
|
||||||
#define KVM_S390_VM_CPU_FEAT_SIEF2 1
|
#define KVM_S390_VM_CPU_FEAT_SIEF2 1
|
||||||
|
#define KVM_S390_VM_CPU_FEAT_64BSCAO 2
|
||||||
struct kvm_s390_vm_cpu_feat {
|
struct kvm_s390_vm_cpu_feat {
|
||||||
__u64 feat[16];
|
__u64 feat[16];
|
||||||
};
|
};
|
||||||
|
@ -265,6 +265,8 @@ static void kvm_s390_cpu_feat_init(void)
|
|||||||
!test_facility(3))
|
!test_facility(3))
|
||||||
return;
|
return;
|
||||||
allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIEF2);
|
allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIEF2);
|
||||||
|
if (sclp.has_64bscao)
|
||||||
|
allow_cpu_feat(KVM_S390_VM_CPU_FEAT_64BSCAO);
|
||||||
}
|
}
|
||||||
|
|
||||||
int kvm_arch_init(void *opaque)
|
int kvm_arch_init(void *opaque)
|
||||||
|
@ -449,6 +449,8 @@ static void unpin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
|
|||||||
hpa = (u64) scb_s->scaoh << 32 | scb_s->scaol;
|
hpa = (u64) scb_s->scaoh << 32 | scb_s->scaol;
|
||||||
if (hpa) {
|
if (hpa) {
|
||||||
gpa = scb_o->scaol & ~0xfUL;
|
gpa = scb_o->scaol & ~0xfUL;
|
||||||
|
if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_64BSCAO))
|
||||||
|
gpa |= (u64) scb_o->scaoh << 32;
|
||||||
unpin_guest_page(vcpu->kvm, gpa, hpa);
|
unpin_guest_page(vcpu->kvm, gpa, hpa);
|
||||||
scb_s->scaol = 0;
|
scb_s->scaol = 0;
|
||||||
scb_s->scaoh = 0;
|
scb_s->scaoh = 0;
|
||||||
@ -499,6 +501,8 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
gpa = scb_o->scaol & ~0xfUL;
|
gpa = scb_o->scaol & ~0xfUL;
|
||||||
|
if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_64BSCAO))
|
||||||
|
gpa |= (u64) scb_o->scaoh << 32;
|
||||||
if (gpa) {
|
if (gpa) {
|
||||||
if (!(gpa & ~0x1fffUL))
|
if (!(gpa & ~0x1fffUL))
|
||||||
rc = set_validity_icpt(scb_s, 0x0038U);
|
rc = set_validity_icpt(scb_s, 0x0038U);
|
||||||
|
Reference in New Issue
Block a user