Commit ffe129ec authored by Bharat Bhushan's avatar Bharat Bhushan Committed by Alexander Graf

KVM: PPC: booke: use vcpu reference from thread_struct

Like other places, use thread_struct to get vcpu reference.
Signed-off-by: default avatarBharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent dd92d6f2
...@@ -919,8 +919,6 @@ ...@@ -919,8 +919,6 @@
#define SPRN_SPRG_RSCRATCH_DBG SPRN_SPRG9 #define SPRN_SPRG_RSCRATCH_DBG SPRN_SPRG9
#define SPRN_SPRG_WSCRATCH_DBG SPRN_SPRG9 #define SPRN_SPRG_WSCRATCH_DBG SPRN_SPRG9
#endif #endif
#define SPRN_SPRG_RVCPU SPRN_SPRG1
#define SPRN_SPRG_WVCPU SPRN_SPRG1
#endif #endif
#ifdef CONFIG_8xx #ifdef CONFIG_8xx
......
...@@ -117,7 +117,7 @@ int main(void) ...@@ -117,7 +117,7 @@ int main(void)
#ifdef CONFIG_KVM_BOOK3S_32_HANDLER #ifdef CONFIG_KVM_BOOK3S_32_HANDLER
DEFINE(THREAD_KVM_SVCPU, offsetof(struct thread_struct, kvm_shadow_vcpu)); DEFINE(THREAD_KVM_SVCPU, offsetof(struct thread_struct, kvm_shadow_vcpu));
#endif #endif
#ifdef CONFIG_KVM_BOOKE_HV #if defined(CONFIG_KVM) && defined(CONFIG_BOOKE)
DEFINE(THREAD_KVM_VCPU, offsetof(struct thread_struct, kvm_vcpu)); DEFINE(THREAD_KVM_VCPU, offsetof(struct thread_struct, kvm_vcpu));
#endif #endif
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
_GLOBAL(kvmppc_handler_\ivor_nr) _GLOBAL(kvmppc_handler_\ivor_nr)
/* Get pointer to vcpu and record exit number. */ /* Get pointer to vcpu and record exit number. */
mtspr \scratch , r4 mtspr \scratch , r4
mfspr r4, SPRN_SPRG_RVCPU mfspr r4, SPRN_SPRG_THREAD
lwz r4, THREAD_KVM_VCPU(r4)
stw r3, VCPU_GPR(R3)(r4) stw r3, VCPU_GPR(R3)(r4)
stw r5, VCPU_GPR(R5)(r4) stw r5, VCPU_GPR(R5)(r4)
stw r6, VCPU_GPR(R6)(r4) stw r6, VCPU_GPR(R6)(r4)
...@@ -402,9 +403,6 @@ lightweight_exit: ...@@ -402,9 +403,6 @@ lightweight_exit:
lwz r8, kvmppc_booke_handlers@l(r8) lwz r8, kvmppc_booke_handlers@l(r8)
mtspr SPRN_IVPR, r8 mtspr SPRN_IVPR, r8
/* Save vcpu pointer for the exception handlers. */
mtspr SPRN_SPRG_WVCPU, r4
lwz r5, VCPU_SHARED(r4) lwz r5, VCPU_SHARED(r4)
/* Can't switch the stack pointer until after IVPR is switched, /* Can't switch the stack pointer until after IVPR is switched,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment