diff options
Diffstat (limited to 'arch/powerpc/kernel/asm-offsets.c')
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 4554dc2fe857..52c7ad78242e 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -116,6 +116,9 @@ int main(void) | |||
116 | #ifdef CONFIG_KVM_BOOK3S_32_HANDLER | 116 | #ifdef CONFIG_KVM_BOOK3S_32_HANDLER |
117 | DEFINE(THREAD_KVM_SVCPU, offsetof(struct thread_struct, kvm_shadow_vcpu)); | 117 | DEFINE(THREAD_KVM_SVCPU, offsetof(struct thread_struct, kvm_shadow_vcpu)); |
118 | #endif | 118 | #endif |
119 | #ifdef CONFIG_KVM_BOOKE_HV | ||
120 | DEFINE(THREAD_KVM_VCPU, offsetof(struct thread_struct, kvm_vcpu)); | ||
121 | #endif | ||
119 | 122 | ||
120 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); | 123 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); |
121 | DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); | 124 | DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); |
@@ -383,6 +386,7 @@ int main(void) | |||
383 | #ifdef CONFIG_KVM | 386 | #ifdef CONFIG_KVM |
384 | DEFINE(VCPU_HOST_STACK, offsetof(struct kvm_vcpu, arch.host_stack)); | 387 | DEFINE(VCPU_HOST_STACK, offsetof(struct kvm_vcpu, arch.host_stack)); |
385 | DEFINE(VCPU_HOST_PID, offsetof(struct kvm_vcpu, arch.host_pid)); | 388 | DEFINE(VCPU_HOST_PID, offsetof(struct kvm_vcpu, arch.host_pid)); |
389 | DEFINE(VCPU_GUEST_PID, offsetof(struct kvm_vcpu, arch.pid)); | ||
386 | DEFINE(VCPU_GPRS, offsetof(struct kvm_vcpu, arch.gpr)); | 390 | DEFINE(VCPU_GPRS, offsetof(struct kvm_vcpu, arch.gpr)); |
387 | DEFINE(VCPU_VRSAVE, offsetof(struct kvm_vcpu, arch.vrsave)); | 391 | DEFINE(VCPU_VRSAVE, offsetof(struct kvm_vcpu, arch.vrsave)); |
388 | DEFINE(VCPU_FPRS, offsetof(struct kvm_vcpu, arch.fpr)); | 392 | DEFINE(VCPU_FPRS, offsetof(struct kvm_vcpu, arch.fpr)); |
@@ -425,9 +429,11 @@ int main(void) | |||
425 | DEFINE(VCPU_SHARED_MAS4, offsetof(struct kvm_vcpu_arch_shared, mas4)); | 429 | DEFINE(VCPU_SHARED_MAS4, offsetof(struct kvm_vcpu_arch_shared, mas4)); |
426 | DEFINE(VCPU_SHARED_MAS6, offsetof(struct kvm_vcpu_arch_shared, mas6)); | 430 | DEFINE(VCPU_SHARED_MAS6, offsetof(struct kvm_vcpu_arch_shared, mas6)); |
427 | 431 | ||
432 | DEFINE(VCPU_KVM, offsetof(struct kvm_vcpu, kvm)); | ||
433 | DEFINE(KVM_LPID, offsetof(struct kvm, arch.lpid)); | ||
434 | |||
428 | /* book3s */ | 435 | /* book3s */ |
429 | #ifdef CONFIG_KVM_BOOK3S_64_HV | 436 | #ifdef CONFIG_KVM_BOOK3S_64_HV |
430 | DEFINE(KVM_LPID, offsetof(struct kvm, arch.lpid)); | ||
431 | DEFINE(KVM_SDR1, offsetof(struct kvm, arch.sdr1)); | 437 | DEFINE(KVM_SDR1, offsetof(struct kvm, arch.sdr1)); |
432 | DEFINE(KVM_HOST_LPID, offsetof(struct kvm, arch.host_lpid)); | 438 | DEFINE(KVM_HOST_LPID, offsetof(struct kvm, arch.host_lpid)); |
433 | DEFINE(KVM_HOST_LPCR, offsetof(struct kvm, arch.host_lpcr)); | 439 | DEFINE(KVM_HOST_LPCR, offsetof(struct kvm, arch.host_lpcr)); |
@@ -440,9 +446,9 @@ int main(void) | |||
440 | DEFINE(KVM_VRMA_SLB_V, offsetof(struct kvm, arch.vrma_slb_v)); | 446 | DEFINE(KVM_VRMA_SLB_V, offsetof(struct kvm, arch.vrma_slb_v)); |
441 | DEFINE(VCPU_DSISR, offsetof(struct kvm_vcpu, arch.shregs.dsisr)); | 447 | DEFINE(VCPU_DSISR, offsetof(struct kvm_vcpu, arch.shregs.dsisr)); |
442 | DEFINE(VCPU_DAR, offsetof(struct kvm_vcpu, arch.shregs.dar)); | 448 | DEFINE(VCPU_DAR, offsetof(struct kvm_vcpu, arch.shregs.dar)); |
449 | DEFINE(VCPU_VPA, offsetof(struct kvm_vcpu, arch.vpa.pinned_addr)); | ||
443 | #endif | 450 | #endif |
444 | #ifdef CONFIG_PPC_BOOK3S | 451 | #ifdef CONFIG_PPC_BOOK3S |
445 | DEFINE(VCPU_KVM, offsetof(struct kvm_vcpu, kvm)); | ||
446 | DEFINE(VCPU_VCPUID, offsetof(struct kvm_vcpu, vcpu_id)); | 452 | DEFINE(VCPU_VCPUID, offsetof(struct kvm_vcpu, vcpu_id)); |
447 | DEFINE(VCPU_PURR, offsetof(struct kvm_vcpu, arch.purr)); | 453 | DEFINE(VCPU_PURR, offsetof(struct kvm_vcpu, arch.purr)); |
448 | DEFINE(VCPU_SPURR, offsetof(struct kvm_vcpu, arch.spurr)); | 454 | DEFINE(VCPU_SPURR, offsetof(struct kvm_vcpu, arch.spurr)); |
@@ -457,7 +463,6 @@ int main(void) | |||
457 | DEFINE(VCPU_PENDING_EXC, offsetof(struct kvm_vcpu, arch.pending_exceptions)); | 463 | DEFINE(VCPU_PENDING_EXC, offsetof(struct kvm_vcpu, arch.pending_exceptions)); |
458 | DEFINE(VCPU_CEDED, offsetof(struct kvm_vcpu, arch.ceded)); | 464 | DEFINE(VCPU_CEDED, offsetof(struct kvm_vcpu, arch.ceded)); |
459 | DEFINE(VCPU_PRODDED, offsetof(struct kvm_vcpu, arch.prodded)); | 465 | DEFINE(VCPU_PRODDED, offsetof(struct kvm_vcpu, arch.prodded)); |
460 | DEFINE(VCPU_VPA, offsetof(struct kvm_vcpu, arch.vpa)); | ||
461 | DEFINE(VCPU_MMCR, offsetof(struct kvm_vcpu, arch.mmcr)); | 466 | DEFINE(VCPU_MMCR, offsetof(struct kvm_vcpu, arch.mmcr)); |
462 | DEFINE(VCPU_PMC, offsetof(struct kvm_vcpu, arch.pmc)); | 467 | DEFINE(VCPU_PMC, offsetof(struct kvm_vcpu, arch.pmc)); |
463 | DEFINE(VCPU_SLB, offsetof(struct kvm_vcpu, arch.slb)); | 468 | DEFINE(VCPU_SLB, offsetof(struct kvm_vcpu, arch.slb)); |
@@ -533,6 +538,8 @@ int main(void) | |||
533 | HSTATE_FIELD(HSTATE_NAPPING, napping); | 538 | HSTATE_FIELD(HSTATE_NAPPING, napping); |
534 | 539 | ||
535 | #ifdef CONFIG_KVM_BOOK3S_64_HV | 540 | #ifdef CONFIG_KVM_BOOK3S_64_HV |
541 | HSTATE_FIELD(HSTATE_HWTHREAD_REQ, hwthread_req); | ||
542 | HSTATE_FIELD(HSTATE_HWTHREAD_STATE, hwthread_state); | ||
536 | HSTATE_FIELD(HSTATE_KVM_VCPU, kvm_vcpu); | 543 | HSTATE_FIELD(HSTATE_KVM_VCPU, kvm_vcpu); |
537 | HSTATE_FIELD(HSTATE_KVM_VCORE, kvm_vcore); | 544 | HSTATE_FIELD(HSTATE_KVM_VCORE, kvm_vcore); |
538 | HSTATE_FIELD(HSTATE_XICS_PHYS, xics_phys); | 545 | HSTATE_FIELD(HSTATE_XICS_PHYS, xics_phys); |
@@ -593,6 +600,12 @@ int main(void) | |||
593 | DEFINE(VCPU_HOST_SPEFSCR, offsetof(struct kvm_vcpu, arch.host_spefscr)); | 600 | DEFINE(VCPU_HOST_SPEFSCR, offsetof(struct kvm_vcpu, arch.host_spefscr)); |
594 | #endif | 601 | #endif |
595 | 602 | ||
603 | #ifdef CONFIG_KVM_BOOKE_HV | ||
604 | DEFINE(VCPU_HOST_MAS4, offsetof(struct kvm_vcpu, arch.host_mas4)); | ||
605 | DEFINE(VCPU_HOST_MAS6, offsetof(struct kvm_vcpu, arch.host_mas6)); | ||
606 | DEFINE(VCPU_EPLC, offsetof(struct kvm_vcpu, arch.eplc)); | ||
607 | #endif | ||
608 | |||
596 | #ifdef CONFIG_KVM_EXIT_TIMING | 609 | #ifdef CONFIG_KVM_EXIT_TIMING |
597 | DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu, | 610 | DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu, |
598 | arch.timing_exit.tv32.tbu)); | 611 | arch.timing_exit.tv32.tbu)); |