Skip to contentSkip to conversation

KVM: s390: vsie: simplify < 8k address checks

PATCH David Hildenbrand 1 participant 1 message May 8, 2018 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 34 lines · Christian Borntraeger
Quoted 31 lines · Christian Borntraeger
Quoted 28 lines · David Hildenbrand
Quoted 8 lines · Heiko Carstens
Quoted 7 lines · David Hildenbrand

This makes it certainly more readable.

---
 arch/s390/kvm/vsie.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Quoted 13 lines

arch/s390/kvm/vsie.c static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) · line 560

Quoted 10 lines
arch/s390/kvm/vsie.c +1 -1
index 969882b54266..7c51a9dc0ec8 100644
@@ -557,7 +557,7 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
 	if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_64BSCAO))
 		gpa |= (u64) READ_ONCE(scb_o->scaoh) << 32;
 	if (gpa) {
-		if (!(gpa & ~0x1fffUL))
+		if (gpa < 8192)

2 * PAGE_SIZE, please. That's how it is done on various other places too.

Christian, does the documentation use the wording "lowcore" or "8192" / 8k?

If it is lowcore, I agree to use 2 * PAGE_SIZE. If not, I prefer it to directly match documentation.

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Anyhow, I leave this decision to Janosch and Christian. Thanks for having alook!

prefix area and reverse prefix area.
In fact what we check here is actually the reversed prefix area so for completeness we would need an additional check.

We seem to check both for SCA so we are good for SCA.

I remember that this check only had to be performed for the SCA.

I'll resend, using PAGE_SIZE * 2 then. Thanks!

Signature · 3 lines
Thanks,

David / dhildenb