diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2008-11-05 10:36:18 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:52:22 -0500 |
commit | db93f5745d836f81cef0b4101a7c2685eeb55efb (patch) | |
tree | 970b0dfc93dbbe25eb988b008bbbeffd866f3f23 /arch/powerpc/kernel/asm-offsets.c | |
parent | 5cbb5106f50b4515815cd32cf944958c0d4da83f (diff) |
KVM: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor
This patch doesn't yet move all 44x-specific data into the new structure, but
is the first step down that path. In the future we may also want to create a
struct kvm_vcpu_booke.
Based on patch from Liu Yu <yu.liu@freescale.com>.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kernel/asm-offsets.c')
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 0264c97e02b5..393c7f36a1e8 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -23,9 +23,6 @@ | |||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/suspend.h> | 24 | #include <linux/suspend.h> |
25 | #include <linux/hrtimer.h> | 25 | #include <linux/hrtimer.h> |
26 | #ifdef CONFIG_KVM | ||
27 | #include <linux/kvm_host.h> | ||
28 | #endif | ||
29 | #ifdef CONFIG_PPC64 | 26 | #ifdef CONFIG_PPC64 |
30 | #include <linux/time.h> | 27 | #include <linux/time.h> |
31 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
@@ -51,6 +48,9 @@ | |||
51 | #ifdef CONFIG_PPC_ISERIES | 48 | #ifdef CONFIG_PPC_ISERIES |
52 | #include <asm/iseries/alpaca.h> | 49 | #include <asm/iseries/alpaca.h> |
53 | #endif | 50 | #endif |
51 | #ifdef CONFIG_KVM | ||
52 | #include <asm/kvm_44x.h> | ||
53 | #endif | ||
54 | 54 | ||
55 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) | 55 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
56 | #include "head_booke.h" | 56 | #include "head_booke.h" |
@@ -359,10 +359,14 @@ int main(void) | |||
359 | #ifdef CONFIG_KVM | 359 | #ifdef CONFIG_KVM |
360 | DEFINE(TLBE_BYTES, sizeof(struct kvmppc_44x_tlbe)); | 360 | DEFINE(TLBE_BYTES, sizeof(struct kvmppc_44x_tlbe)); |
361 | 361 | ||
362 | DEFINE(VCPU_TO_44X, offsetof(struct kvmppc_vcpu_44x, vcpu)); | ||
363 | DEFINE(VCPU44x_SHADOW_TLB, | ||
364 | offsetof(struct kvmppc_vcpu_44x, shadow_tlb)); | ||
365 | DEFINE(VCPU44x_SHADOW_MOD, | ||
366 | offsetof(struct kvmppc_vcpu_44x, shadow_tlb_mod)); | ||
367 | |||
362 | DEFINE(VCPU_HOST_STACK, offsetof(struct kvm_vcpu, arch.host_stack)); | 368 | DEFINE(VCPU_HOST_STACK, offsetof(struct kvm_vcpu, arch.host_stack)); |
363 | DEFINE(VCPU_HOST_PID, offsetof(struct kvm_vcpu, arch.host_pid)); | 369 | DEFINE(VCPU_HOST_PID, offsetof(struct kvm_vcpu, arch.host_pid)); |
364 | DEFINE(VCPU_SHADOW_TLB, offsetof(struct kvm_vcpu, arch.shadow_tlb)); | ||
365 | DEFINE(VCPU_SHADOW_MOD, offsetof(struct kvm_vcpu, arch.shadow_tlb_mod)); | ||
366 | DEFINE(VCPU_GPRS, offsetof(struct kvm_vcpu, arch.gpr)); | 370 | DEFINE(VCPU_GPRS, offsetof(struct kvm_vcpu, arch.gpr)); |
367 | DEFINE(VCPU_LR, offsetof(struct kvm_vcpu, arch.lr)); | 371 | DEFINE(VCPU_LR, offsetof(struct kvm_vcpu, arch.lr)); |
368 | DEFINE(VCPU_CR, offsetof(struct kvm_vcpu, arch.cr)); | 372 | DEFINE(VCPU_CR, offsetof(struct kvm_vcpu, arch.cr)); |