Skip to contentSkip to conversation

RISC-V: KVM: Fix csr_write -> csr_set for HVIEN PMU overflow bit

PATCH Applied Michael Neuling 3 participants 3 messages Nov 27, 2024 – Jan 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 RISC-V: KVM: Fix csr_write -> csr_set for HVIEN PMU overflow bit

This doesn't cause a problem currently as HVIEN isn't used elsewhere yet. Found by inspection.

Fixes 16b0bde9a37c ("RISC-V: KVM: Add perf sampling support for guests")

---
v2:
Added Fixes tag
Added Reviews
No code change

---
 arch/riscv/kvm/aia.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kvm/aia.c +1 -1
index 2967d305c4..9f3b527596 100644
@@ -552,7 +552,7 @@ void kvm_riscv_aia_enable(void)
 	csr_set(CSR_HIE, BIT(IRQ_S_GEXT));
 	/* Enable IRQ filtering for overflow interrupt only if sscofpmf is present */
 	if (__riscv_isa_extension_available(NULL, RISCV_ISA_EXT_SSCOFPMF))
-		csr_write(CSR_HVIEN, BIT(IRQ_PMU_OVF));
+		csr_set(CSR_HVIEN, BIT(IRQ_PMU_OVF));
 }
 
 void kvm_riscv_aia_disable(void)
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 8 lines · Michael Neuling

This doesn't cause a problem currently as HVIEN isn't used elsewhere yet. Found by inspection.

Fixes 16b0bde9a37c ("RISC-V: KVM: Add perf sampling support for guests")

Queued for 6.13-rcX fixes

Regards,
Anup

Quoted 25 lines

---
v2:
Added Fixes tag
Added Reviews
No code change

---
 arch/riscv/kvm/aia.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kvm/aia.c +1 -2
index 2967d305c4..9f3b527596 100644
@@ -552,7 +552,7 @@ void kvm_riscv_aia_enable(void)
        csr_set(CSR_HIE, BIT(IRQ_S_GEXT));
        /* Enable IRQ filtering for overflow interrupt only if sscofpmf is present */
        if (__riscv_isa_extension_available(NULL, RISCV_ISA_EXT_SSCOFPMF))
-               csr_write(CSR_HVIEN, BIT(IRQ_PMU_OVF));
+               csr_set(CSR_HVIEN, BIT(IRQ_PMU_OVF));
 }
 
 void kvm_riscv_aia_disable(void)
--

2.34.1

Signature · 3 lines
kvm-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kvm-riscv
#2 lore raw
In reply to Michael Neuling
This patch was applied to riscv/linux.git (fixes) by Anup Patel <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (fixes)
by Anup Patel <[email protected]>:

Quoted 9 lines · On Wed, 27 Nov 2024 04:18:40 +0000 you wrote:

This doesn't cause a problem currently as HVIEN isn't used elsewhere yet. Found by inspection.

Fixes 16b0bde9a37c ("RISC-V: KVM: Add perf sampling support for guests")

[...]

Here is the summary with links:
- [v2] RISC-V: KVM: Fix csr_write -> csr_set for HVIEN PMU overflow bit

    https://git.kernel.org/riscv/c/ea6398a5af81

You are awesome, thank you!

Signature · 9 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



-- 
kvm-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kvm-riscv