x86/hyperv: Use correct macro in checking SynIC timer support
PATCH 1/2 x86/hyperv: Use correct macro in checking SynIC timer support
This commit fixes 69d4bf751641520f5b2d8e3f160c63c8966fcd8b. stimer_supported() should use HV_X64_MSR_SYNTIMER_AVAILABLE instead of HV_X64_MSR_SYNIC_AVAILABLE.
From 3e31f7d2b7bfc92ff710e3061b32301f96862b8b Mon Sep 17 00:00:00 2001
From: Metin Kaya <[email protected]>
Date: Wed, 22 Dec 2021 18:22:28 +0000
Subject: [kvm-unit-tests PATCH 1/2] x86/hyperv: Use correct macro in checking
SynIC timer support
This commit fixes 69d4bf751641520f5b2d8e3f160c63c8966fcd8b. stimer_supported() should use HV_X64_MSR_SYNTIMER_AVAILABLE instead of HV_X64_MSR_SYNIC_AVAILABLE.
--- x86/hyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
x86/hyperv.h +1 -1
@@ -190,7 +190,7 @@ static inline bool synic_supported(void)static inline bool stimer_supported (void ) { -return cpuid (HYPERV_CPUID_FEATURES ).a &HV_X64_MSR_SYNIC_AVAILABLE ; +return cpuid (HYPERV_CPUID_FEATURES ).a &HV_X64_MSR_SYNTIMER_AVAILABLE ; }static inline bool hv_time_ref_counter_supported (void )
Signature · 1 line
2.32.0
Quoted 11 lines · Metin
This commit fixes
69d4bf751641520f5b2d8e3f160c63c8966fcd8b.stimer_supported()should useHV_X64_MSR_SYNTIMER_AVAILABLEinstead of HV_X64_MSR_SYNIC_AVAILABLE. From3e31f7d2b7bfc92ff710e3061b32301f96862b8bMon Sep 17 00:00:00 2001
From: Metin Kaya <[email protected]>
Date: Wed, 22 Dec 2021 18:22:28 +0000
Subject: [kvm-unit-tests PATCH 1/2] x86/hyperv: Use correct macro in checking
SynIC timer supportThis commit fixes
69d4bf751641520f5b2d8e3f160c63c8966fcd8b.stimer_supported()should useHV_X64_MSR_SYNTIMER_AVAILABLEinstead ofHV_X64_MSR_SYNIC_AVAILABLE.
Quoted 10 lines
Signed-off-by Metin Kaya <[email protected]>--- x86/hyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)x86/hyperv.h +0
-0
x86/hyperv.h static inline bool synic_supported(void) · line 194
Quoted 6 lines
x86/hyperv.h +1
-1@@ -190,7 +190,7 @@ static inline bool synic_supported(void)static inline bool stimer_supported (void ) { -return cpuid (HYPERV_CPUID_FEATURES ).a &HV_X64_MSR_SYNIC_AVAILABLE ; +return cpuid (HYPERV_CPUID_FEATURES ).a &HV_X64_MSR_SYNTIMER_AVAILABLE ; }
Unrelated to the change but I'd suggest renaming stimer_supported() to hv_stimer_supported() and synic_supported() to hv_synic_supported().
x86/hyperv.h static inline bool synic_supported(void) · line 196
Quoted 2 lines
x86/hyperv.h +0
-0static inline bool hv_time_ref_counter_supported (void )
Signature · 1 line
Vitaly
Kaya, Metin
Reviewed-by Vitaly KuznetsovThanks, Vitaly. Will send another patch for it.
________________________________________
From: Vitaly Kuznetsov <[email protected]>
Sent: 04 January 2022 16:32
To: Kaya, Metin
Cc: [email protected]
Subject: RE: [EXTERNAL] [kvm-unit-tests PATCH 1/2] x86/hyperv: Use correct macro in checking SynIC timer support
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 11 lines · Metin
This commit fixes
69d4bf751641520f5b2d8e3f160c63c8966fcd8b.stimer_supported()should useHV_X64_MSR_SYNTIMER_AVAILABLEinstead of HV_X64_MSR_SYNIC_AVAILABLE. From3e31f7d2b7bfc92ff710e3061b32301f96862b8bMon Sep 17 00:00:00 2001
From: Metin Kaya <[email protected]>
Date: Wed, 22 Dec 2021 18:22:28 +0000
Subject: [kvm-unit-tests PATCH 1/2] x86/hyperv: Use correct macro in checking
SynIC timer supportThis commit fixes
69d4bf751641520f5b2d8e3f160c63c8966fcd8b.stimer_supported()should useHV_X64_MSR_SYNTIMER_AVAILABLEinstead ofHV_X64_MSR_SYNIC_AVAILABLE.
Quoted 10 lines
Signed-off-by Metin Kaya <[email protected]>--- x86/hyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)x86/hyperv.h +0
-0
x86/hyperv.h static inline bool synic_supported(void) · line 194
Quoted 6 lines
x86/hyperv.h +1
-1@@ -190,7 +190,7 @@ static inline bool synic_supported(void)static inline bool stimer_supported (void ) { -return cpuid (HYPERV_CPUID_FEATURES ).a &HV_X64_MSR_SYNIC_AVAILABLE ; +return cpuid (HYPERV_CPUID_FEATURES ).a &HV_X64_MSR_SYNTIMER_AVAILABLE ; }
Unrelated to the change but I'd suggest renaming stimer_supported() to hv_stimer_supported() and synic_supported() to hv_synic_supported().
x86/hyperv.h static inline bool synic_supported(void) · line 196
Quoted 2 lines
x86/hyperv.h +0
-0static inline bool hv_time_ref_counter_supported (void )
--
Vitaly