x86: Allow xapic ID writes to silently fail
PATCH 1/1 x86: Allow xapic ID writes to silently fail
From: Nadav Amit <[email protected]>
According to Intel SDM: "Some processors permit software to modify the APIC ID. However, the ability of software to modify the APIC ID is processor model specific."
Allow this behavior not to cause failures.
--- x86/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
x86/apic.c +1 -1
@@ -210,7 +210,7 @@ static void __test_apic_id(void * unused) newid = (id +1 ) <<24 ;report ("writeable xapic id" , !test_for_exception (GP_VECTOR , do_write_apic_id, &newid) && - id +1 ==apic_id ()); + (id ==apic_id () || id +1 ==apic_id ()));if (!enable_x2apic ()) goto out;
Signature · 1 line
2.19.1
Quoted 20 lines · On 24/04/19 23:22, [email protected] wrote:
From: Nadav Amit <[email protected]>
According to Intel SDM: "Some processors permit software to modify the APIC ID. However, the ability of software to modify the APIC ID is processor model specific."
Allow this behavior not to cause failures.
Cc Sean Christopherson <[email protected]>Signed-off-by Nadav Amit <[email protected]>--- x86/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)x86/apic.c +0
-0
x86/apic.c static void __test_apic_id(void * unused) · line 216
Quoted 8 lines
x86/apic.c +1
-1@@ -210,7 +210,7 @@ static void __test_apic_id(void * unused) newid = (id +1 ) <<24 ;report ("writeable xapic id" , !test_for_exception (GP_VECTOR , do_write_apic_id, &newid) && - id +1 ==apic_id ()); + (id ==apic_id () || id +1 ==apic_id ()));if (!enable_x2apic ()) goto out;
Queued, thanks.
Paolo
Quoted 28 lines · Paolo Bonzini
Quoted 25 lines · On 24/04/19 23:22, [email protected] wrote:
From: Nadav Amit <[email protected]>
According to Intel SDM: "Some processors permit software to modify the APIC ID. However, the ability of software to modify the APIC ID is processor model specific."
Allow this behavior not to cause failures.
Cc Sean Christopherson <[email protected]>Signed-off-by Nadav Amit <[email protected]>---
x86/apic.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)x86/apic.c +1
-1@@ -210,7 +210,7 @@ static void __test_apic_id(void * unused) newid = (id +1 ) <<24 ;report ("writeable xapic id" , !test_for_exception (GP_VECTOR , do_write_apic_id, &newid) && - id +1 ==apic_id ()); + (id ==apic_id () || id +1 ==apic_id ()));
Quoted 4 lines
x86/apic.c static void __test_apic_id(void * unused) · line 216
Quoted 2 lines
x86/apic.c +0
-0if (!enable_x2apic ()) goto out;Queued, thanks.
Thanks. Silly question - when you say “queued”, what do you mean exactly?
In other words, when will it be reflected on the kvm-unit-tests repository? I want to send a few more fixes, but I lost track which ones I sent, so I want to rebase first.
Paolo Bonzini
maintainerQuoted 6 lines · Nadav Amit
Quoted 1 line
Queued, thanks.
Thanks. Silly question - when you say “queued”, what do you mean exactly?
In other words, when will it be reflected on the kvm-unit-tests repository? I want to send a few more fixes, but I lost track which ones I sent, so I want to rebase first.
Usually very soon (an hour or two), in this case I am travelling so it will appear in about a week. I have pushed what I have to a "next" branch. These are the commits from you:
x86: Fix wrong test for 5-level page-table
x86: Remove INIT deassert
x86: Fix allowed IA32_VMX_VMCS_ENUM values
x86: Wait for self IPI
x86: Initialize vmcs_root
x86: Allow xapic ID writes to silently fail
Thanks,
Paolo