From: Igor Mammedov <imammedo@redhat.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, peterx@redhat.com
Subject: [kvm-unit-tests PATCH v4 1/5] x86: resize id_map[] elements to u32
Date: Fri, 25 Jul 2025 11:54:25 +0200 [thread overview]
Message-ID: <20250725095429.1691734-2-imammedo@redhat.com> (raw)
In-Reply-To: <20250725095429.1691734-1-imammedo@redhat.com>
currently item size is u8, which would truncate APIC IDs that are
greater than 255.
Make it u32 so that it cna hold x2apic IDs as well.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
lib/x86/apic.h | 2 +-
lib/x86/apic.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/x86/apic.h b/lib/x86/apic.h
index cac6eab1..a76b1138 100644
--- a/lib/x86/apic.h
+++ b/lib/x86/apic.h
@@ -8,7 +8,7 @@
#include "processor.h"
#include "smp.h"
-extern u8 id_map[MAX_TEST_CPUS];
+extern u32 id_map[MAX_TEST_CPUS];
typedef struct {
uint8_t vector;
diff --git a/lib/x86/apic.c b/lib/x86/apic.c
index 0d151476..c538fb5f 100644
--- a/lib/x86/apic.c
+++ b/lib/x86/apic.c
@@ -9,7 +9,7 @@
static void *g_apic = (void *)APIC_DEFAULT_PHYS_BASE;
static void *g_ioapic = (void *)IO_APIC_DEFAULT_PHYS_BASE;
-u8 id_map[MAX_TEST_CPUS];
+u32 id_map[MAX_TEST_CPUS];
struct apic_ops {
u32 (*reg_read)(unsigned reg);
--
2.47.1
next prev parent reply other threads:[~2025-07-25 9:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 9:54 [kvm-unit-tests PATCH v4 0/5] x86: add HPET counter tests Igor Mammedov
2025-07-25 9:54 ` Igor Mammedov [this message]
2025-07-30 20:39 ` [kvm-unit-tests PATCH v4 1/5] x86: resize id_map[] elements to u32 Peter Xu
2025-07-25 9:54 ` [kvm-unit-tests PATCH v4 2/5] x86: fix APs with APIC ID more that 255 not showing in id_map Igor Mammedov
2025-07-30 20:40 ` Peter Xu
2025-07-25 9:54 ` [kvm-unit-tests PATCH v4 3/5] x86: move USERBASE to 32Mb in smap/pku/pks tests Igor Mammedov
2025-07-30 20:56 ` Peter Xu
2025-07-31 8:58 ` Igor Mammedov
2025-07-25 9:54 ` [kvm-unit-tests PATCH v4 4/5] x86: bump number of max cpus to 1024 Igor Mammedov
2025-07-30 20:56 ` Peter Xu
2025-07-25 9:54 ` [kvm-unit-tests PATCH v4 5/5] x86: add HPET counter read micro benchmark and enable/disable torture tests Igor Mammedov
2025-07-30 21:00 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250725095429.1691734-2-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).