summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.h
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2011-07-24 10:48:22 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-07-24 10:48:21 +0200
commit092670cd90eb88c33661de21f1b4ee08d2597171 (patch)
tree2960d3ef459eccd0c2a7d0e2a77fad9bdb2437f2 /arch/s390/kvm/kvm-s390.h
parent598841ca9919d008b520114d8a4378c4ce4e40a1 (diff)
downloadop-kernel-dev-092670cd90eb88c33661de21f1b4ee08d2597171.zip
op-kernel-dev-092670cd90eb88c33661de21f1b4ee08d2597171.tar.gz
[S390] Use gmap translation for accessing guest memory
This patch removes kvm-s390 internal assumption of a linear mapping of guest address space to user space. Previously, guest memory was translated to user addresses using a fixed offset (gmsor). The new code uses gmap_fault to resolve guest addresses. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.h')
-rw-r--r--arch/s390/kvm/kvm-s390.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
index 65e2201..63e5190 100644
--- a/arch/s390/kvm/kvm-s390.h
+++ b/arch/s390/kvm/kvm-s390.h
@@ -58,31 +58,8 @@ int kvm_s390_inject_vcpu(struct kvm_vcpu *vcpu,
int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code);
int kvm_s390_inject_sigp_stop(struct kvm_vcpu *vcpu, int action);
-static inline long kvm_s390_vcpu_get_memsize(struct kvm_vcpu *vcpu)
-{
- return vcpu->arch.sie_block->gmslm
- - vcpu->arch.sie_block->gmsor
- - VIRTIODESCSPACE + 1ul;
-}
-
static inline void kvm_s390_vcpu_set_mem(struct kvm_vcpu *vcpu)
{
- int idx;
- struct kvm_memory_slot *mem;
- struct kvm_memslots *memslots;
-
- idx = srcu_read_lock(&vcpu->kvm->srcu);
- memslots = kvm_memslots(vcpu->kvm);
-
- mem = &memslots->memslots[0];
-
- vcpu->arch.sie_block->gmsor = mem->userspace_addr;
- vcpu->arch.sie_block->gmslm =
- mem->userspace_addr +
- (mem->npages << PAGE_SHIFT) +
- VIRTIODESCSPACE - 1ul;
-
- srcu_read_unlock(&vcpu->kvm->srcu, idx);
}
/* implemented in priv.c */
OpenPOWER on IntegriCloud