summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/priv.c
diff options
context:
space:
mode:
authorNico Boehr <nrb@linux.ibm.com>2022-10-20 16:31:58 +0200
committerJanosch Frank <frankja@linux.ibm.com>2022-10-26 14:27:41 +0200
commitb99f4512197acc10f63b5fb462c088c2f62b5120 (patch)
tree6026d1875a7d91a22a842bc25c24bac3ce11b131 /arch/s390/kvm/priv.c
parentfe0ef00304639cae82df7c9ad6a15286bd5f876e (diff)
downloadlinux-stable-b99f4512197acc10f63b5fb462c088c2f62b5120.tar.gz
linux-stable-b99f4512197acc10f63b5fb462c088c2f62b5120.tar.bz2
linux-stable-b99f4512197acc10f63b5fb462c088c2f62b5120.zip
KVM: s390: sida: sort out physical vs virtual pointers usage
All callers of the sida_origin() macro actually expected a virtual address, so rename it to sida_addr() and hand out a virtual address. At some places, the macro wasn't used, potentially creating problems if the sida size ever becomes nonzero (not currently the case), so let's start using it everywhere now while at it. Signed-off-by: Nico Boehr <nrb@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20221020143159.294605-5-nrb@linux.ibm.com Message-Id: <20221020143159.294605-5-nrb@linux.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'arch/s390/kvm/priv.c')
-rw-r--r--arch/s390/kvm/priv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 3335fa09b6f1..9f8a192bd750 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -924,8 +924,7 @@ static int handle_stsi(struct kvm_vcpu *vcpu)
return -EREMOTE;
}
if (kvm_s390_pv_cpu_is_protected(vcpu)) {
- memcpy((void *)sida_origin(vcpu->arch.sie_block), (void *)mem,
- PAGE_SIZE);
+ memcpy(sida_addr(vcpu->arch.sie_block), (void *)mem, PAGE_SIZE);
rc = 0;
} else {
rc = write_guest(vcpu, operand2, ar, (void *)mem, PAGE_SIZE);