All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] x86: ioapic: Run physical destination mode test iff cpu_count() > 1
@ 2020-04-23 19:50 Sean Christopherson
  2020-04-23 19:56 ` Nitesh Narayan Lal
  2020-05-04 16:33 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Sean Christopherson @ 2020-04-23 19:50 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, Nitesh Narayan Lal, Sean Christopherson

Make test_ioapic_physical_destination_mode() depending on having at
least two CPUs as it sets ->dest_id to '1', i.e. expects CPU0 and CPU1
to exist.  This analysis is backed up by the fact that the test was
originally gated by cpu_count() > 1.

Fixes: dcf27dc5b5499 ("x86: Fix the logical destination mode test")
Cc: Nitesh Narayan Lal <nitesh@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 x86/ioapic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x86/ioapic.c b/x86/ioapic.c
index 3106531..f315e4b 100644
--- a/x86/ioapic.c
+++ b/x86/ioapic.c
@@ -504,7 +504,8 @@ int main(void)
 	test_ioapic_level_tmr(true);
 	test_ioapic_edge_tmr(true);
 
-	test_ioapic_physical_destination_mode();
+	if (cpu_count() > 1)
+		test_ioapic_physical_destination_mode();
 	if (cpu_count() > 3)
 		test_ioapic_logical_destination_mode();
 
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: ioapic: Run physical destination mode test iff cpu_count() > 1
  2020-04-23 19:50 [kvm-unit-tests PATCH] x86: ioapic: Run physical destination mode test iff cpu_count() > 1 Sean Christopherson
@ 2020-04-23 19:56 ` Nitesh Narayan Lal
  2020-05-04 16:33 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Nitesh Narayan Lal @ 2020-04-23 19:56 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm


[-- Attachment #1.1: Type: text/plain, Size: 1063 bytes --]


On 4/23/20 3:50 PM, Sean Christopherson wrote:
> Make test_ioapic_physical_destination_mode() depending on having at
> least two CPUs as it sets ->dest_id to '1', i.e. expects CPU0 and CPU1
> to exist.  This analysis is backed up by the fact that the test was
> originally gated by cpu_count() > 1.
>
> Fixes: dcf27dc5b5499 ("x86: Fix the logical destination mode test")
> Cc: Nitesh Narayan Lal <nitesh@redhat.com>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
>  x86/ioapic.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/x86/ioapic.c b/x86/ioapic.c
> index 3106531..f315e4b 100644
> --- a/x86/ioapic.c
> +++ b/x86/ioapic.c
> @@ -504,7 +504,8 @@ int main(void)
>  	test_ioapic_level_tmr(true);
>  	test_ioapic_edge_tmr(true);
>  
> -	test_ioapic_physical_destination_mode();
> +	if (cpu_count() > 1)
> +		test_ioapic_physical_destination_mode();
>  	if (cpu_count() > 3)
>  		test_ioapic_logical_destination_mode();
>  

Thank you Sean for fixing this.

-- 
Nitesh


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: ioapic: Run physical destination mode test iff cpu_count() > 1
  2020-04-23 19:50 [kvm-unit-tests PATCH] x86: ioapic: Run physical destination mode test iff cpu_count() > 1 Sean Christopherson
  2020-04-23 19:56 ` Nitesh Narayan Lal
@ 2020-05-04 16:33 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-05-04 16:33 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: kvm, Nitesh Narayan Lal

On 23/04/20 21:50, Sean Christopherson wrote:
> Make test_ioapic_physical_destination_mode() depending on having at
> least two CPUs as it sets ->dest_id to '1', i.e. expects CPU0 and CPU1
> to exist.  This analysis is backed up by the fact that the test was
> originally gated by cpu_count() > 1.
> 
> Fixes: dcf27dc5b5499 ("x86: Fix the logical destination mode test")
> Cc: Nitesh Narayan Lal <nitesh@redhat.com>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
>  x86/ioapic.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/x86/ioapic.c b/x86/ioapic.c
> index 3106531..f315e4b 100644
> --- a/x86/ioapic.c
> +++ b/x86/ioapic.c
> @@ -504,7 +504,8 @@ int main(void)
>  	test_ioapic_level_tmr(true);
>  	test_ioapic_edge_tmr(true);
>  
> -	test_ioapic_physical_destination_mode();
> +	if (cpu_count() > 1)
> +		test_ioapic_physical_destination_mode();
>  	if (cpu_count() > 3)
>  		test_ioapic_logical_destination_mode();
>  
> 

Queued, thanks.

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-04 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 19:50 [kvm-unit-tests PATCH] x86: ioapic: Run physical destination mode test iff cpu_count() > 1 Sean Christopherson
2020-04-23 19:56 ` Nitesh Narayan Lal
2020-05-04 16:33 ` Paolo Bonzini

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.