* [PATCH 2/4] powerpc/asm-offset: Remove unused KVM_RADIX macros
2022-09-13 7:40 [PATCH 0/4] Remove unused macros from asm-offset Disha Goel
2022-09-13 7:40 ` [PATCH 1/4] powerpc/asm-offset: Remove unused KVM_TLB_SETS macros Disha Goel
@ 2022-09-13 7:40 ` Disha Goel
2022-09-13 7:40 ` [PATCH 3/4] powerpc/kvm: Remove unused macros from asm-offset Disha Goel
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Disha Goel @ 2022-09-13 7:40 UTC (permalink / raw)
To: mpe; +Cc: atrajeev, kjain, npiggin, maddy, disgoel, linuxppc-dev
Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix
guest support from P7/8 path") removed the radix guest
support from P7/8 path since the P9 path now supports of
all the supported radix guest. But missed to remove
KVM_RADIX from the asm-offset. Patch fixes by removing it.
Fixes: 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path")
Signed-off-by: Disha Goel <disgoel@linux.vnet.ibm.com>
---
arch/powerpc/kernel/asm-offsets.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index d5d9c1dcef1c..88a329d74d23 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -424,7 +424,6 @@ int main(void)
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);
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/4] powerpc/kvm: Remove unused macros from asm-offset
2022-09-13 7:40 [PATCH 0/4] Remove unused macros from asm-offset Disha Goel
2022-09-13 7:40 ` [PATCH 1/4] powerpc/asm-offset: Remove unused KVM_TLB_SETS macros Disha Goel
2022-09-13 7:40 ` [PATCH 2/4] powerpc/asm-offset: Remove unused KVM_RADIX macros Disha Goel
@ 2022-09-13 7:40 ` Disha Goel
2022-09-13 7:40 ` [PATCH 4/4] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers Disha Goel
2022-09-13 8:15 ` [PATCH 0/4] Remove unused macros from asm-offset Christophe Leroy
4 siblings, 0 replies; 7+ messages in thread
From: Disha Goel @ 2022-09-13 7:40 UTC (permalink / raw)
To: mpe; +Cc: atrajeev, kjain, npiggin, maddy, disgoel, linuxppc-dev
Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1
support from P7/8 path") moved code path for the kvm guest entry/exit
for p7/8 from aseembly to C. But the patch missed to remove the
asm-offset macro definitions which were used in the assembly files
and now they are un-used. Patch fixes by removing those.
Fixes: fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path")
Signed-off-by: Disha Goel <disgoel@linux.vnet.ibm.com>
---
arch/powerpc/kernel/asm-offsets.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 88a329d74d23..90235288cc1a 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -430,7 +430,6 @@ int main(void)
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
@@ -447,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);
@@ -484,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);
@@ -580,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);
@@ -670,17 +661,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* [PATCH 4/4] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers
2022-09-13 7:40 [PATCH 0/4] Remove unused macros from asm-offset Disha Goel
` (2 preceding siblings ...)
2022-09-13 7:40 ` [PATCH 3/4] powerpc/kvm: Remove unused macros from asm-offset Disha Goel
@ 2022-09-13 7:40 ` Disha Goel
2022-09-13 8:15 ` [PATCH 0/4] Remove unused macros from asm-offset Christophe Leroy
4 siblings, 0 replies; 7+ messages in thread
From: Disha Goel @ 2022-09-13 7:40 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
HSTATE/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 +-
arch/powerpc/kernel/asm-offsets.c | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
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;
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 90235288cc1a..95744e7c056d 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -583,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]);
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread