All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] x86: Allow xapic ID writes to silently fail
@ 2019-04-24 21:22 nadav.amit
  2019-04-30 19:13 ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: nadav.amit @ 2019-04-24 21:22 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, Nadav Amit, Sean Christopherson

From: Nadav Amit <nadav.amit@gmail.com>

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 <sean.j.christopherson@intel.com>
Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
 x86/apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/apic.c b/x86/apic.c
index d1ed5ea..6772f3f 100644
--- a/x86/apic.c
+++ b/x86/apic.c
@@ -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;
-- 
2.19.1


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

* Re: [kvm-unit-tests PATCH] x86: Allow xapic ID writes to silently fail
  2019-04-24 21:22 [kvm-unit-tests PATCH] x86: Allow xapic ID writes to silently fail nadav.amit
@ 2019-04-30 19:13 ` Paolo Bonzini
  2019-04-30 19:34   ` Nadav Amit
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2019-04-30 19:13 UTC (permalink / raw)
  To: nadav.amit; +Cc: kvm, Sean Christopherson

On 24/04/19 23:22, nadav.amit@gmail.com wrote:
> From: Nadav Amit <nadav.amit@gmail.com>
> 
> 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 <sean.j.christopherson@intel.com>
> Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
> ---
>  x86/apic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/apic.c b/x86/apic.c
> index d1ed5ea..6772f3f 100644
> --- a/x86/apic.c
> +++ b/x86/apic.c
> @@ -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

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

* Re: [kvm-unit-tests PATCH] x86: Allow xapic ID writes to silently fail
  2019-04-30 19:13 ` Paolo Bonzini
@ 2019-04-30 19:34   ` Nadav Amit
  2019-04-30 20:09     ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Nadav Amit @ 2019-04-30 19:34 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm list, Sean Christopherson

> On Apr 30, 2019, at 12:13 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> On 24/04/19 23:22, nadav.amit@gmail.com wrote:
>> From: Nadav Amit <nadav.amit@gmail.com>
>> 
>> 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 <sean.j.christopherson@intel.com>
>> Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
>> ---
>> x86/apic.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/x86/apic.c b/x86/apic.c
>> index d1ed5ea..6772f3f 100644
>> --- a/x86/apic.c
>> +++ b/x86/apic.c
>> @@ -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.

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.


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

* Re: [kvm-unit-tests PATCH] x86: Allow xapic ID writes to silently fail
  2019-04-30 19:34   ` Nadav Amit
@ 2019-04-30 20:09     ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2019-04-30 20:09 UTC (permalink / raw)
  To: Nadav Amit; +Cc: kvm list, Sean Christopherson

On 30/04/19 21:34, Nadav Amit wrote:
>> 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

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

end of thread, other threads:[~2019-04-30 20:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 21:22 [kvm-unit-tests PATCH] x86: Allow xapic ID writes to silently fail nadav.amit
2019-04-30 19:13 ` Paolo Bonzini
2019-04-30 19:34   ` Nadav Amit
2019-04-30 20:09     ` 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.