* [PATCH] x86/cpuid: Fix APIC bit clearing
@ 2020-07-29 16:33 fam
2020-07-29 17:12 ` Roger Pau Monné
2020-07-29 18:04 ` Andrew Cooper
0 siblings, 2 replies; 3+ messages in thread
From: fam @ 2020-07-29 16:33 UTC (permalink / raw)
To: xen-devel
Cc: fam, Wei Liu, Andrew Cooper, Jan Beulich, famzheng, Roger Pau Monné
From: Fam Zheng <famzheng@amazon.com>
The bug is obvious here, other places in this function used
"cpufeat_mask" correctly.
Signed-off-by: Fam Zheng <famzheng@amazon.com>
Fixes: 46df8a65 ("x86/cpuid: Effectively remove pv_cpuid() and hvm_cpuid()")
---
xen/arch/x86/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 6a4a787b68..63a03ef1e5 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -1057,7 +1057,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
{
/* Fast-forward MSR_APIC_BASE.EN. */
if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
- res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+ res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
/*
* PSE36 is not supported in shadow mode. This bit should be
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/cpuid: Fix APIC bit clearing
2020-07-29 16:33 [PATCH] x86/cpuid: Fix APIC bit clearing fam
@ 2020-07-29 17:12 ` Roger Pau Monné
2020-07-29 18:04 ` Andrew Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Roger Pau Monné @ 2020-07-29 17:12 UTC (permalink / raw)
To: fam; +Cc: famzheng, xen-devel, Jan Beulich, Wei Liu, Andrew Cooper
On Wed, Jul 29, 2020 at 05:33:41PM +0100, fam@euphon.net wrote:
> From: Fam Zheng <famzheng@amazon.com>
>
> The bug is obvious here, other places in this function used
> "cpufeat_mask" correctly.
>
> Signed-off-by: Fam Zheng <famzheng@amazon.com>
> Fixes: 46df8a65 ("x86/cpuid: Effectively remove pv_cpuid() and hvm_cpuid()")
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/cpuid: Fix APIC bit clearing
2020-07-29 16:33 [PATCH] x86/cpuid: Fix APIC bit clearing fam
2020-07-29 17:12 ` Roger Pau Monné
@ 2020-07-29 18:04 ` Andrew Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2020-07-29 18:04 UTC (permalink / raw)
To: fam, xen-devel; +Cc: famzheng, Jan Beulich, Wei Liu, Roger Pau Monné
On 29/07/2020 17:33, fam@euphon.net wrote:
> From: Fam Zheng <famzheng@amazon.com>
>
> The bug is obvious here, other places in this function used
> "cpufeat_mask" correctly.
>
> Signed-off-by: Fam Zheng <famzheng@amazon.com>
> Fixes: 46df8a65 ("x86/cpuid: Effectively remove pv_cpuid() and hvm_cpuid()")
> ---
> xen/arch/x86/cpuid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
> index 6a4a787b68..63a03ef1e5 100644
> --- a/xen/arch/x86/cpuid.c
> +++ b/xen/arch/x86/cpuid.c
> @@ -1057,7 +1057,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
> {
> /* Fast-forward MSR_APIC_BASE.EN. */
> if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
> - res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
> + res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
>
> /*
> * PSE36 is not supported in shadow mode. This bit should be
Oops. Good spot.
However, the Fixes you identify was just code movement. The bug was
actually introduced in b648feff8ea2c9bff250b4b262704fb100b1f9cf two
years earlier.
I've tweaked the Fixes line and committed.
~Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-30 4:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 16:33 [PATCH] x86/cpuid: Fix APIC bit clearing fam
2020-07-29 17:12 ` Roger Pau Monné
2020-07-29 18:04 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.