aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2020-04-23 12:50:50 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2020-05-04 12:33:27 -0400
commitdd3974c00f423165d9022a10f5769e1b9a213f3a (patch)
tree10264fd605537c11b8d7c422086a9f077ac0bc81
parent3652250b7cc28b54ac997062882f97058f2a8488 (diff)
downloadkvm-unit-tests-dd3974c00f423165d9022a10f5769e1b9a213f3a.tar.gz
x86: ioapic: Run physical destination mode test iff cpu_count() > 1
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> Message-Id: <20200423195050.26310-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--x86/ioapic.c3
1 files changed, 2 insertions, 1 deletions
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();