* [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup()
@ 2024-12-27 9:44 Thorsten Blum
2025-01-02 8:32 ` Nikunj A Dadhania
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thorsten Blum @ 2024-12-27 9:44 UTC (permalink / raw)
To: Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Cc: Thorsten Blum, kvm, linux-kernel
Remove hard-coded strings by using the str_enabled_disabled() helper
function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/x86/kvm/svm/sev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 943bd074a5d3..87ed8cde68a7 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -3051,11 +3051,11 @@ void __init sev_hardware_setup(void)
min_sev_asid, max_sev_asid);
if (boot_cpu_has(X86_FEATURE_SEV_ES))
pr_info("SEV-ES %s (ASIDs %u - %u)\n",
- sev_es_supported ? "enabled" : "disabled",
+ str_enabled_disabled(sev_es_supported),
min_sev_asid > 1 ? 1 : 0, min_sev_asid - 1);
if (boot_cpu_has(X86_FEATURE_SEV_SNP))
pr_info("SEV-SNP %s (ASIDs %u - %u)\n",
- sev_snp_supported ? "enabled" : "disabled",
+ str_enabled_disabled(sev_snp_supported),
min_sev_asid > 1 ? 1 : 0, min_sev_asid - 1);
sev_enabled = sev_supported;
--
2.47.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup()
2024-12-27 9:44 [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup() Thorsten Blum
@ 2025-01-02 8:32 ` Nikunj A Dadhania
2025-01-02 14:57 ` Paluri, PavanKumar
2025-01-09 19:47 ` Sean Christopherson
2 siblings, 0 replies; 4+ messages in thread
From: Nikunj A Dadhania @ 2025-01-02 8:32 UTC (permalink / raw)
To: Thorsten Blum, Sean Christopherson, Paolo Bonzini,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin
Cc: kvm, linux-kernel
On 12/27/2024 3:14 PM, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_enabled_disabled() helper
> function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Looks good to me.
Reviewed-by: Nikunj A Dadhania <nikunj@amd.com>
> ---
> arch/x86/kvm/svm/sev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> index 943bd074a5d3..87ed8cde68a7 100644
> --- a/arch/x86/kvm/svm/sev.c
> +++ b/arch/x86/kvm/svm/sev.c
> @@ -3051,11 +3051,11 @@ void __init sev_hardware_setup(void)
> min_sev_asid, max_sev_asid);
> if (boot_cpu_has(X86_FEATURE_SEV_ES))
> pr_info("SEV-ES %s (ASIDs %u - %u)\n",
> - sev_es_supported ? "enabled" : "disabled",
> + str_enabled_disabled(sev_es_supported),
> min_sev_asid > 1 ? 1 : 0, min_sev_asid - 1);
> if (boot_cpu_has(X86_FEATURE_SEV_SNP))
> pr_info("SEV-SNP %s (ASIDs %u - %u)\n",
> - sev_snp_supported ? "enabled" : "disabled",
> + str_enabled_disabled(sev_snp_supported),
> min_sev_asid > 1 ? 1 : 0, min_sev_asid - 1);
>
> sev_enabled = sev_supported;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup()
2024-12-27 9:44 [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup() Thorsten Blum
2025-01-02 8:32 ` Nikunj A Dadhania
@ 2025-01-02 14:57 ` Paluri, PavanKumar
2025-01-09 19:47 ` Sean Christopherson
2 siblings, 0 replies; 4+ messages in thread
From: Paluri, PavanKumar @ 2025-01-02 14:57 UTC (permalink / raw)
To: Thorsten Blum, Sean Christopherson, Paolo Bonzini,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, Paluri, PavanKumar (Pavan Kumar)
Cc: kvm, linux-kernel
On 12/27/2024 3:44 AM, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_enabled_disabled() helper
> function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
LGTM.
Reviewed-by: Pavan Kumar Paluri <papaluri@amd.com>
> ---
> arch/x86/kvm/svm/sev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> index 943bd074a5d3..87ed8cde68a7 100644
> --- a/arch/x86/kvm/svm/sev.c
> +++ b/arch/x86/kvm/svm/sev.c
> @@ -3051,11 +3051,11 @@ void __init sev_hardware_setup(void)
> min_sev_asid, max_sev_asid);
> if (boot_cpu_has(X86_FEATURE_SEV_ES))
> pr_info("SEV-ES %s (ASIDs %u - %u)\n",
> - sev_es_supported ? "enabled" : "disabled",
> + str_enabled_disabled(sev_es_supported),
> min_sev_asid > 1 ? 1 : 0, min_sev_asid - 1);
> if (boot_cpu_has(X86_FEATURE_SEV_SNP))
> pr_info("SEV-SNP %s (ASIDs %u - %u)\n",
> - sev_snp_supported ? "enabled" : "disabled",
> + str_enabled_disabled(sev_snp_supported),
> min_sev_asid > 1 ? 1 : 0, min_sev_asid - 1);
>
> sev_enabled = sev_supported;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup()
2024-12-27 9:44 [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup() Thorsten Blum
2025-01-02 8:32 ` Nikunj A Dadhania
2025-01-02 14:57 ` Paluri, PavanKumar
@ 2025-01-09 19:47 ` Sean Christopherson
2 siblings, 0 replies; 4+ messages in thread
From: Sean Christopherson @ 2025-01-09 19:47 UTC (permalink / raw)
To: Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, Thorsten Blum
Cc: kvm, linux-kernel
On Fri, 27 Dec 2024 10:44:51 +0100, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_enabled_disabled() helper
> function.
Applied to kvm-x86 svm, thanks!
[1/1] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup()
https://github.com/kvm-x86/linux/commit/800173cf7560
--
https://github.com/kvm-x86/linux/tree/next
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-09 19:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27 9:44 [PATCH] KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup() Thorsten Blum
2025-01-02 8:32 ` Nikunj A Dadhania
2025-01-02 14:57 ` Paluri, PavanKumar
2025-01-09 19:47 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox