summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-04-30 22:07:26 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-04-30 22:07:26 +0200
commite9c16c78503dd0482b876761d60a3d2f50ac4d86 (patch)
tree8e2adfa13c9ce4e8e7ac7e4848aa64dd50798ebe /arch/x86/kvm/x86.c
parent2b3eaf815ca930b1dbc11fb1ebd773e510947c0f (diff)
downloadlwn-e9c16c78503dd0482b876761d60a3d2f50ac4d86.tar.gz
lwn-e9c16c78503dd0482b876761d60a3d2f50ac4d86.zip
KVM: x86: use direct accessors for RIP and RSP
Use specific inline functions for RIP and RSP instead of going through kvm_register_read and kvm_register_write, which are quite a mouthful. kvm_rsp_read and kvm_rsp_write did not exist, so add them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b352a7c137cd..dc621f73e96b 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -8290,7 +8290,7 @@ static void __get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
regs->rdx = kvm_rdx_read(vcpu);
regs->rsi = kvm_rsi_read(vcpu);
regs->rdi = kvm_rdi_read(vcpu);
- regs->rsp = kvm_register_read(vcpu, VCPU_REGS_RSP);
+ regs->rsp = kvm_rsp_read(vcpu);
regs->rbp = kvm_rbp_read(vcpu);
#ifdef CONFIG_X86_64
regs->r8 = kvm_r8_read(vcpu);
@@ -8326,7 +8326,7 @@ static void __set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
kvm_rdx_write(vcpu, regs->rdx);
kvm_rsi_write(vcpu, regs->rsi);
kvm_rdi_write(vcpu, regs->rdi);
- kvm_register_write(vcpu, VCPU_REGS_RSP, regs->rsp);
+ kvm_rsp_write(vcpu, regs->rsp);
kvm_rbp_write(vcpu, regs->rbp);
#ifdef CONFIG_X86_64
kvm_r8_write(vcpu, regs->r8);