Skip to contentSkip to conversation

RISC-V: KVM: Optimize comments in kvm_riscv_vcpu_isa_disable_allowed

PATCH In review Chao Du 3 participants 3 messages Feb 21, 2025 – Mar 20, 2025

Subsystems (3)
lore
Share & tools
lore

Chao Du

author
#0 lore raw

PATCH v2 1/1 RISC-V: KVM: Optimize comments in kvm_riscv_vcpu_isa_disable_allowed

The comments for EXT_SVADE are a bit confusing. Optimize it to make it more clear.

---
 arch/riscv/kvm/vcpu_onereg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kvm/vcpu_onereg.c +1 -1
index f6d27b59c641..43ee8e33ba23 100644
@@ -203,7 +203,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext)
 	case KVM_RISCV_ISA_EXT_SVADE:
 		/*
 		 * The henvcfg.ADUE is read-only zero if menvcfg.ADUE is zero.
-		 * Svade is not allowed to disable when the platform use Svade.
+		 * Svade can't be disabled unless we support Svadu.
 		 */
 		return arch_has_hw_pte_young();
 	default:
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 2 lines · Chao Du

The comments for EXT_SVADE are a bit confusing. Optimize it to make it more clear.

nit: s/Optimize it to make it more clear./Clarify it./

Quoted 21 lines
---
 arch/riscv/kvm/vcpu_onereg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kvm/vcpu_onereg.c +1 -1
index f6d27b59c641..43ee8e33ba23 100644
@@ -203,7 +203,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext)
 	case KVM_RISCV_ISA_EXT_SVADE:
 		/*
 		 * The henvcfg.ADUE is read-only zero if menvcfg.ADUE is zero.
-		 * Svade is not allowed to disable when the platform use Svade.
+		 * Svade can't be disabled unless we support Svadu.
 		 */
 		return arch_has_hw_pte_young();
 	default:
Signature · 1 line
2.34.1

Otherwise,

maintainer
#2 lore raw
In reply to Chao Du
Quoted 5 lines · Chao Du

The comments for EXT_SVADE are a bit confusing. Optimize it to make it more clear.

Queued this patch for Linux-6.15.
I have taken care of Drew's comment.

Regards,
Anup

Quoted 20 lines
---
 arch/riscv/kvm/vcpu_onereg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kvm/vcpu_onereg.c +1 -2
index f6d27b59c641..43ee8e33ba23 100644
@@ -203,7 +203,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext)
        case KVM_RISCV_ISA_EXT_SVADE:
                /*
                 * The henvcfg.ADUE is read-only zero if menvcfg.ADUE is zero.
-                * Svade is not allowed to disable when the platform use Svade.
+                * Svade can't be disabled unless we support Svadu.
                 */
                return arch_has_hw_pte_young();
        default:
--

2.34.1