* [PATCH v2 0/2] Remove unused macros from asm-offset
@ 2022-09-16 10:57 Disha Goel
2022-09-16 10:57 ` [PATCH v2 1/2] powerpc/kvm: " Disha Goel
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Disha Goel @ 2022-09-16 10:57 UTC (permalink / raw)
To: mpe; +Cc: atrajeev, kjain, npiggin, maddy, disgoel, linuxppc-dev
The kvm code was refactored to convert some of kvm assembly routines to C.
This includes commits which moved code path for the kvm guest entry/exit
for p7/8 from aseembly to C. As part of the code changes, usage of some of
the macros were removed. But definitions still exist in the assembly files.
Commits are listed below:
Commit 2e1ae9cd56f8 ("KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU")
Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path")
Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path")
Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C")
Many of the asm-offset macro definitions were missed to remove. This patchset
fixes by removing the unused macro definitions.
Patch1 removes a set of unused kvm vcpu and hstate macros from the
asm-offset.c
Patch2 removes unused host_mmcr references for MMCR3/SIER2/SIER3
Changelog:
v1 -> v2:
Merge all the macro removal part from asm-offset.c file into a single patch
as suggested by Christophe Leroy.
Link to patchset v1:
http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220913074025.132160-2-disgoel@linux.vnet.ibm.com/
Link to the script used to get unused macro:
https://github.com/maddy-kerneldev/scripts/blob/master/check_asm-offset.sh
Link to linux-ci job result:
https://github.com/disgoel/linux-ci/actions?query=branch%3Akvmmacro.v2
Disha Goel (1):
powerpc/kvm: Remove unused macros from asm-offset
Kajol Jain (1):
powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers
arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +-
arch/powerpc/kernel/asm-offsets.c | 25 -----------------------
2 files changed, 1 insertion(+), 26 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 1/2] powerpc/kvm: Remove unused macros from asm-offset 2022-09-16 10:57 [PATCH v2 0/2] Remove unused macros from asm-offset Disha Goel @ 2022-09-16 10:57 ` Disha Goel 2022-09-20 8:11 ` Nicholas Piggin 2022-09-16 10:57 ` [PATCH v2 2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers Disha Goel ` (2 subsequent siblings) 3 siblings, 1 reply; 7+ messages in thread From: Disha Goel @ 2022-09-16 10:57 UTC (permalink / raw) To: mpe; +Cc: atrajeev, kjain, npiggin, maddy, disgoel, linuxppc-dev The kvm code was refactored to convert some of kvm assembly routines to C. This includes commits which moved code path for the kvm guest entry/exit for p7/8 from aseembly to C. As part of the code changes, usage of some of the macros were removed. But definitions still exist in the assembly files. Commits are listed below: Commit 2e1ae9cd56f8 ("KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU") Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path") Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") Many of the asm-offset macro definitions were missed to remove. Patch fixes by removing the unused macros. Signed-off-by: Disha Goel <disgoel@linux.vnet.ibm.com> --- arch/powerpc/kernel/asm-offsets.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 8c10f536e478..95744e7c056d 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -418,21 +418,18 @@ int main(void) /* book3s */ #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE - OFFSET(KVM_TLB_SETS, kvm, arch.tlb_sets); OFFSET(KVM_SDR1, kvm, arch.sdr1); OFFSET(KVM_HOST_LPID, kvm, arch.host_lpid); OFFSET(KVM_HOST_LPCR, kvm, arch.host_lpcr); OFFSET(KVM_HOST_SDR1, kvm, arch.host_sdr1); OFFSET(KVM_ENABLED_HCALLS, kvm, arch.enabled_hcalls); OFFSET(KVM_VRMA_SLB_V, kvm, arch.vrma_slb_v); - OFFSET(KVM_RADIX, kvm, arch.radix); OFFSET(KVM_SECURE_GUEST, kvm, arch.secure_guest); OFFSET(VCPU_DSISR, kvm_vcpu, arch.shregs.dsisr); OFFSET(VCPU_DAR, kvm_vcpu, arch.shregs.dar); OFFSET(VCPU_VPA, kvm_vcpu, arch.vpa.pinned_addr); OFFSET(VCPU_VPA_DIRTY, kvm_vcpu, arch.vpa.dirty); OFFSET(VCPU_HEIR, kvm_vcpu, arch.emul_inst); - OFFSET(VCPU_NESTED, kvm_vcpu, arch.nested); OFFSET(VCPU_CPU, kvm_vcpu, cpu); OFFSET(VCPU_THREAD_CPU, kvm_vcpu, arch.thread_cpu); #endif @@ -449,16 +446,12 @@ int main(void) OFFSET(VCPU_DABRX, kvm_vcpu, arch.dabrx); OFFSET(VCPU_DAWR0, kvm_vcpu, arch.dawr0); OFFSET(VCPU_DAWRX0, kvm_vcpu, arch.dawrx0); - OFFSET(VCPU_DAWR1, kvm_vcpu, arch.dawr1); - OFFSET(VCPU_DAWRX1, kvm_vcpu, arch.dawrx1); OFFSET(VCPU_CIABR, kvm_vcpu, arch.ciabr); OFFSET(VCPU_HFLAGS, kvm_vcpu, arch.hflags); OFFSET(VCPU_DEC_EXPIRES, kvm_vcpu, arch.dec_expires); OFFSET(VCPU_PENDING_EXC, kvm_vcpu, arch.pending_exceptions); OFFSET(VCPU_CEDED, kvm_vcpu, arch.ceded); OFFSET(VCPU_PRODDED, kvm_vcpu, arch.prodded); - OFFSET(VCPU_IRQ_PENDING, kvm_vcpu, arch.irq_pending); - OFFSET(VCPU_DBELL_REQ, kvm_vcpu, arch.doorbell_request); OFFSET(VCPU_MMCR, kvm_vcpu, arch.mmcr); OFFSET(VCPU_MMCRA, kvm_vcpu, arch.mmcra); OFFSET(VCPU_MMCRS, kvm_vcpu, arch.mmcrs); @@ -486,8 +479,6 @@ int main(void) OFFSET(VCPU_TCSCR, kvm_vcpu, arch.tcscr); OFFSET(VCPU_ACOP, kvm_vcpu, arch.acop); OFFSET(VCPU_WORT, kvm_vcpu, arch.wort); - OFFSET(VCPU_TID, kvm_vcpu, arch.tid); - OFFSET(VCPU_PSSCR, kvm_vcpu, arch.psscr); OFFSET(VCPU_HFSCR, kvm_vcpu, arch.hfscr); OFFSET(VCORE_ENTRY_EXIT, kvmppc_vcore, entry_exit_map); OFFSET(VCORE_IN_GUEST, kvmppc_vcore, in_guest); @@ -582,8 +573,6 @@ int main(void) HSTATE_FIELD(HSTATE_HWTHREAD_STATE, hwthread_state); HSTATE_FIELD(HSTATE_KVM_VCPU, kvm_vcpu); HSTATE_FIELD(HSTATE_KVM_VCORE, kvm_vcore); - HSTATE_FIELD(HSTATE_XIVE_TIMA_PHYS, xive_tima_phys); - HSTATE_FIELD(HSTATE_XIVE_TIMA_VIRT, xive_tima_virt); HSTATE_FIELD(HSTATE_HOST_IPI, host_ipi); HSTATE_FIELD(HSTATE_PTID, ptid); HSTATE_FIELD(HSTATE_FAKE_SUSPEND, fake_suspend); @@ -594,9 +583,6 @@ int main(void) HSTATE_FIELD(HSTATE_SDAR, host_mmcr[4]); HSTATE_FIELD(HSTATE_MMCR2, host_mmcr[5]); HSTATE_FIELD(HSTATE_SIER, host_mmcr[6]); - HSTATE_FIELD(HSTATE_MMCR3, host_mmcr[7]); - HSTATE_FIELD(HSTATE_SIER2, host_mmcr[8]); - HSTATE_FIELD(HSTATE_SIER3, host_mmcr[9]); HSTATE_FIELD(HSTATE_PMC1, host_pmc[0]); HSTATE_FIELD(HSTATE_PMC2, host_pmc[1]); HSTATE_FIELD(HSTATE_PMC3, host_pmc[2]); @@ -672,17 +658,6 @@ int main(void) OFFSET(VCPU_HOST_MAS6, kvm_vcpu, arch.host_mas6); #endif -#ifdef CONFIG_KVM_XICS - DEFINE(VCPU_XIVE_SAVED_STATE, offsetof(struct kvm_vcpu, - arch.xive_saved_state)); - DEFINE(VCPU_XIVE_CAM_WORD, offsetof(struct kvm_vcpu, - arch.xive_cam_word)); - DEFINE(VCPU_XIVE_PUSHED, offsetof(struct kvm_vcpu, arch.xive_pushed)); - DEFINE(VCPU_XIVE_ESC_ON, offsetof(struct kvm_vcpu, arch.xive_esc_on)); - DEFINE(VCPU_XIVE_ESC_RADDR, offsetof(struct kvm_vcpu, arch.xive_esc_raddr)); - DEFINE(VCPU_XIVE_ESC_VADDR, offsetof(struct kvm_vcpu, arch.xive_esc_vaddr)); -#endif - #ifdef CONFIG_KVM_EXIT_TIMING OFFSET(VCPU_TIMING_EXIT_TBU, kvm_vcpu, arch.timing_exit.tv32.tbu); OFFSET(VCPU_TIMING_EXIT_TBL, kvm_vcpu, arch.timing_exit.tv32.tbl); -- 2.31.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] powerpc/kvm: Remove unused macros from asm-offset 2022-09-16 10:57 ` [PATCH v2 1/2] powerpc/kvm: " Disha Goel @ 2022-09-20 8:11 ` Nicholas Piggin 0 siblings, 0 replies; 7+ messages in thread From: Nicholas Piggin @ 2022-09-20 8:11 UTC (permalink / raw) To: Disha Goel, mpe; +Cc: kjain, atrajeev, maddy, linuxppc-dev On Fri Sep 16, 2022 at 8:57 PM AEST, Disha Goel wrote: > The kvm code was refactored to convert some of kvm assembly routines to C. > This includes commits which moved code path for the kvm guest entry/exit > for p7/8 from aseembly to C. As part of the code changes, usage of some of > the macros were removed. But definitions still exist in the assembly files. > Commits are listed below: > > Commit 2e1ae9cd56f8 ("KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU") > Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path") > Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") > Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") > > Many of the asm-offset macro definitions were missed to remove. Patch > fixes by removing the unused macros. > > Signed-off-by: Disha Goel <disgoel@linux.vnet.ibm.com> Thanks, good cleanup. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> > --- > arch/powerpc/kernel/asm-offsets.c | 25 ------------------------- > 1 file changed, 25 deletions(-) > > diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c > index 8c10f536e478..95744e7c056d 100644 > --- a/arch/powerpc/kernel/asm-offsets.c > +++ b/arch/powerpc/kernel/asm-offsets.c > @@ -418,21 +418,18 @@ int main(void) > > /* book3s */ > #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE > - OFFSET(KVM_TLB_SETS, kvm, arch.tlb_sets); > OFFSET(KVM_SDR1, kvm, arch.sdr1); > OFFSET(KVM_HOST_LPID, kvm, arch.host_lpid); > OFFSET(KVM_HOST_LPCR, kvm, arch.host_lpcr); > OFFSET(KVM_HOST_SDR1, kvm, arch.host_sdr1); > OFFSET(KVM_ENABLED_HCALLS, kvm, arch.enabled_hcalls); > OFFSET(KVM_VRMA_SLB_V, kvm, arch.vrma_slb_v); > - OFFSET(KVM_RADIX, kvm, arch.radix); > OFFSET(KVM_SECURE_GUEST, kvm, arch.secure_guest); > OFFSET(VCPU_DSISR, kvm_vcpu, arch.shregs.dsisr); > OFFSET(VCPU_DAR, kvm_vcpu, arch.shregs.dar); > OFFSET(VCPU_VPA, kvm_vcpu, arch.vpa.pinned_addr); > OFFSET(VCPU_VPA_DIRTY, kvm_vcpu, arch.vpa.dirty); > OFFSET(VCPU_HEIR, kvm_vcpu, arch.emul_inst); > - OFFSET(VCPU_NESTED, kvm_vcpu, arch.nested); > OFFSET(VCPU_CPU, kvm_vcpu, cpu); > OFFSET(VCPU_THREAD_CPU, kvm_vcpu, arch.thread_cpu); > #endif > @@ -449,16 +446,12 @@ int main(void) > OFFSET(VCPU_DABRX, kvm_vcpu, arch.dabrx); > OFFSET(VCPU_DAWR0, kvm_vcpu, arch.dawr0); > OFFSET(VCPU_DAWRX0, kvm_vcpu, arch.dawrx0); > - OFFSET(VCPU_DAWR1, kvm_vcpu, arch.dawr1); > - OFFSET(VCPU_DAWRX1, kvm_vcpu, arch.dawrx1); > OFFSET(VCPU_CIABR, kvm_vcpu, arch.ciabr); > OFFSET(VCPU_HFLAGS, kvm_vcpu, arch.hflags); > OFFSET(VCPU_DEC_EXPIRES, kvm_vcpu, arch.dec_expires); > OFFSET(VCPU_PENDING_EXC, kvm_vcpu, arch.pending_exceptions); > OFFSET(VCPU_CEDED, kvm_vcpu, arch.ceded); > OFFSET(VCPU_PRODDED, kvm_vcpu, arch.prodded); > - OFFSET(VCPU_IRQ_PENDING, kvm_vcpu, arch.irq_pending); > - OFFSET(VCPU_DBELL_REQ, kvm_vcpu, arch.doorbell_request); > OFFSET(VCPU_MMCR, kvm_vcpu, arch.mmcr); > OFFSET(VCPU_MMCRA, kvm_vcpu, arch.mmcra); > OFFSET(VCPU_MMCRS, kvm_vcpu, arch.mmcrs); > @@ -486,8 +479,6 @@ int main(void) > OFFSET(VCPU_TCSCR, kvm_vcpu, arch.tcscr); > OFFSET(VCPU_ACOP, kvm_vcpu, arch.acop); > OFFSET(VCPU_WORT, kvm_vcpu, arch.wort); > - OFFSET(VCPU_TID, kvm_vcpu, arch.tid); > - OFFSET(VCPU_PSSCR, kvm_vcpu, arch.psscr); > OFFSET(VCPU_HFSCR, kvm_vcpu, arch.hfscr); > OFFSET(VCORE_ENTRY_EXIT, kvmppc_vcore, entry_exit_map); > OFFSET(VCORE_IN_GUEST, kvmppc_vcore, in_guest); > @@ -582,8 +573,6 @@ int main(void) > HSTATE_FIELD(HSTATE_HWTHREAD_STATE, hwthread_state); > HSTATE_FIELD(HSTATE_KVM_VCPU, kvm_vcpu); > HSTATE_FIELD(HSTATE_KVM_VCORE, kvm_vcore); > - HSTATE_FIELD(HSTATE_XIVE_TIMA_PHYS, xive_tima_phys); > - HSTATE_FIELD(HSTATE_XIVE_TIMA_VIRT, xive_tima_virt); > HSTATE_FIELD(HSTATE_HOST_IPI, host_ipi); > HSTATE_FIELD(HSTATE_PTID, ptid); > HSTATE_FIELD(HSTATE_FAKE_SUSPEND, fake_suspend); > @@ -594,9 +583,6 @@ int main(void) > HSTATE_FIELD(HSTATE_SDAR, host_mmcr[4]); > HSTATE_FIELD(HSTATE_MMCR2, host_mmcr[5]); > HSTATE_FIELD(HSTATE_SIER, host_mmcr[6]); > - HSTATE_FIELD(HSTATE_MMCR3, host_mmcr[7]); > - HSTATE_FIELD(HSTATE_SIER2, host_mmcr[8]); > - HSTATE_FIELD(HSTATE_SIER3, host_mmcr[9]); > HSTATE_FIELD(HSTATE_PMC1, host_pmc[0]); > HSTATE_FIELD(HSTATE_PMC2, host_pmc[1]); > HSTATE_FIELD(HSTATE_PMC3, host_pmc[2]); > @@ -672,17 +658,6 @@ int main(void) > OFFSET(VCPU_HOST_MAS6, kvm_vcpu, arch.host_mas6); > #endif > > -#ifdef CONFIG_KVM_XICS > - DEFINE(VCPU_XIVE_SAVED_STATE, offsetof(struct kvm_vcpu, > - arch.xive_saved_state)); > - DEFINE(VCPU_XIVE_CAM_WORD, offsetof(struct kvm_vcpu, > - arch.xive_cam_word)); > - DEFINE(VCPU_XIVE_PUSHED, offsetof(struct kvm_vcpu, arch.xive_pushed)); > - DEFINE(VCPU_XIVE_ESC_ON, offsetof(struct kvm_vcpu, arch.xive_esc_on)); > - DEFINE(VCPU_XIVE_ESC_RADDR, offsetof(struct kvm_vcpu, arch.xive_esc_raddr)); > - DEFINE(VCPU_XIVE_ESC_VADDR, offsetof(struct kvm_vcpu, arch.xive_esc_vaddr)); > -#endif > - > #ifdef CONFIG_KVM_EXIT_TIMING > OFFSET(VCPU_TIMING_EXIT_TBU, kvm_vcpu, arch.timing_exit.tv32.tbu); > OFFSET(VCPU_TIMING_EXIT_TBL, kvm_vcpu, arch.timing_exit.tv32.tbl); > -- > 2.31.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers 2022-09-16 10:57 [PATCH v2 0/2] Remove unused macros from asm-offset Disha Goel 2022-09-16 10:57 ` [PATCH v2 1/2] powerpc/kvm: " Disha Goel @ 2022-09-16 10:57 ` Disha Goel 2022-09-20 8:15 ` Nicholas Piggin 2022-10-17 5:56 ` [PATCH v2 0/2] Remove unused macros from asm-offset Athira Rajeev 2022-11-30 9:23 ` Michael Ellerman 3 siblings, 1 reply; 7+ messages in thread From: Disha Goel @ 2022-09-16 10:57 UTC (permalink / raw) To: mpe; +Cc: atrajeev, kjain, npiggin, maddy, disgoel, linuxppc-dev From: Kajol Jain" <kjain@linux.ibm.com> Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") removed the PMU save/restore functions from assembly code and implemented these functions in C, for power9 and later platforms. After the code refactoring, Performance Monitoring Unit (PMU) registers became part of "p9_host_os_sprs" structure and now this structure is used to save/restore pmu host registers, for power9 and later platfroms. But we still have old unused registers references. Patch removes unused host_mmcr references for Monitor Mode Control Register 3 (MMCR3)/ Sampled Instruction Event Register 2 (SIER2)/ SIER3 registers from "struct kvmppc_host_state". Fixes: 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") Signed-off-by: Kajol Jain <kjain@linux.ibm.com> --- arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc/include/asm/kvm_book3s_asm.h index c8882d9b86c2..a36797938620 100644 --- a/arch/powerpc/include/asm/kvm_book3s_asm.h +++ b/arch/powerpc/include/asm/kvm_book3s_asm.h @@ -105,7 +105,7 @@ struct kvmppc_host_state { void __iomem *xive_tima_virt; u32 saved_xirr; u64 dabr; - u64 host_mmcr[10]; /* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER, MMCR3, SIER2/3 */ + u64 host_mmcr[7]; /* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER */ u32 host_pmc[8]; u64 host_purr; u64 host_spurr; -- 2.31.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers 2022-09-16 10:57 ` [PATCH v2 2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers Disha Goel @ 2022-09-20 8:15 ` Nicholas Piggin 0 siblings, 0 replies; 7+ messages in thread From: Nicholas Piggin @ 2022-09-20 8:15 UTC (permalink / raw) To: Disha Goel, mpe; +Cc: kjain, atrajeev, maddy, linuxppc-dev On Fri Sep 16, 2022 at 8:57 PM AEST, Disha Goel wrote: > From: Kajol Jain" <kjain@linux.ibm.com> > > Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore > in C") removed the PMU save/restore functions from assembly code and > implemented these functions in C, for power9 and later platforms. > > After the code refactoring, Performance Monitoring Unit (PMU) registers > became part of "p9_host_os_sprs" structure and now this structure is > used to save/restore pmu host registers, for power9 and later platfroms. > But we still have old unused registers references. Patch removes unused > host_mmcr references for Monitor Mode Control Register 3 (MMCR3)/ > Sampled Instruction Event Register 2 (SIER2)/ SIER3 registers from > "struct kvmppc_host_state". > > Fixes: 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") > Signed-off-by: Kajol Jain <kjain@linux.ibm.com> And it was increased from 7 to 10 with 5752fe0b811bb which added the POWER10 registers, so that makes sense to go back to 7 in the POWER8 path. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> > --- > arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc/include/asm/kvm_book3s_asm.h > index c8882d9b86c2..a36797938620 100644 > --- a/arch/powerpc/include/asm/kvm_book3s_asm.h > +++ b/arch/powerpc/include/asm/kvm_book3s_asm.h > @@ -105,7 +105,7 @@ struct kvmppc_host_state { > void __iomem *xive_tima_virt; > u32 saved_xirr; > u64 dabr; > - u64 host_mmcr[10]; /* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER, MMCR3, SIER2/3 */ > + u64 host_mmcr[7]; /* MMCR 0,1,A, SIAR, SDAR, MMCR2, SIER */ > u32 host_pmc[8]; > u64 host_purr; > u64 host_spurr; > -- > 2.31.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] Remove unused macros from asm-offset 2022-09-16 10:57 [PATCH v2 0/2] Remove unused macros from asm-offset Disha Goel 2022-09-16 10:57 ` [PATCH v2 1/2] powerpc/kvm: " Disha Goel 2022-09-16 10:57 ` [PATCH v2 2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers Disha Goel @ 2022-10-17 5:56 ` Athira Rajeev 2022-11-30 9:23 ` Michael Ellerman 3 siblings, 0 replies; 7+ messages in thread From: Athira Rajeev @ 2022-10-17 5:56 UTC (permalink / raw) To: Disha Goel; +Cc: Madhavan Srinivasan, linuxppc-dev, Nicholas Piggin, Kajol Jain > On 16-Sep-2022, at 4:27 PM, Disha Goel <disgoel@linux.vnet.ibm.com> wrote: > > The kvm code was refactored to convert some of kvm assembly routines to C. > This includes commits which moved code path for the kvm guest entry/exit > for p7/8 from aseembly to C. As part of the code changes, usage of some of > the macros were removed. But definitions still exist in the assembly files. > Commits are listed below: > > Commit 2e1ae9cd56f8 ("KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU") > Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path") > Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") > Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") > > Many of the asm-offset macro definitions were missed to remove. This patchset > fixes by removing the unused macro definitions. > For the patchset, Reviewed-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Thanks Athira > Patch1 removes a set of unused kvm vcpu and hstate macros from the > asm-offset.c > > Patch2 removes unused host_mmcr references for MMCR3/SIER2/SIER3 > > Changelog: > v1 -> v2: > Merge all the macro removal part from asm-offset.c file into a single patch > as suggested by Christophe Leroy. > > Link to patchset v1: > http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220913074025.132160-2-disgoel@linux.vnet.ibm.com/ > > Link to the script used to get unused macro: > https://github.com/maddy-kerneldev/scripts/blob/master/check_asm-offset.sh > > Link to linux-ci job result: > https://github.com/disgoel/linux-ci/actions?query=branch%3Akvmmacro.v2 > > Disha Goel (1): > powerpc/kvm: Remove unused macros from asm-offset > > Kajol Jain (1): > powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers > > arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- > arch/powerpc/kernel/asm-offsets.c | 25 ----------------------- > 2 files changed, 1 insertion(+), 26 deletions(-) > > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] Remove unused macros from asm-offset 2022-09-16 10:57 [PATCH v2 0/2] Remove unused macros from asm-offset Disha Goel ` (2 preceding siblings ...) 2022-10-17 5:56 ` [PATCH v2 0/2] Remove unused macros from asm-offset Athira Rajeev @ 2022-11-30 9:23 ` Michael Ellerman 3 siblings, 0 replies; 7+ messages in thread From: Michael Ellerman @ 2022-11-30 9:23 UTC (permalink / raw) To: mpe, Disha Goel; +Cc: kjain, atrajeev, maddy, linuxppc-dev, npiggin On Fri, 16 Sep 2022 16:27:34 +0530, Disha Goel wrote: > The kvm code was refactored to convert some of kvm assembly routines to C. > This includes commits which moved code path for the kvm guest entry/exit > for p7/8 from aseembly to C. As part of the code changes, usage of some of > the macros were removed. But definitions still exist in the assembly files. > Commits are listed below: > > Commit 2e1ae9cd56f8 ("KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU") > Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path") > Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") > Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") > > [...] Applied to powerpc/next. [1/2] powerpc/kvm: Remove unused macros from asm-offset https://git.kernel.org/powerpc/c/2223552256dfc48435e0699dbe1e9b8d2cd56b06 [2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers https://git.kernel.org/powerpc/c/4ac9d3187cc7ccba25f76a3faef3e08a366f77b9 cheers ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-30 9:38 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-09-16 10:57 [PATCH v2 0/2] Remove unused macros from asm-offset Disha Goel 2022-09-16 10:57 ` [PATCH v2 1/2] powerpc/kvm: " Disha Goel 2022-09-20 8:11 ` Nicholas Piggin 2022-09-16 10:57 ` [PATCH v2 2/2] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers Disha Goel 2022-09-20 8:15 ` Nicholas Piggin 2022-10-17 5:56 ` [PATCH v2 0/2] Remove unused macros from asm-offset Athira Rajeev 2022-11-30 9:23 ` Michael Ellerman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).