lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ae63d79-ff54-8a4f-8438-16ce5ae22ca0@redhat.com>
Date:	Wed, 13 Jul 2016 17:30:30 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Radim Krčmář <rkrcmar@...hat.com>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	"Lan, Tianyu" <tianyu.lan@...el.com>,
	Igor Mammedov <imammedo@...hat.com>,
	Jan Kiszka <jan.kiszka@....de>, Peter Xu <peterx@...hat.com>,
	Yang Zhang <yang.zhang.wz@...il.com>
Subject: Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic
 broadcast quirk



On 13/07/2016 17:14, Radim Krčmář wrote:
> 2016-07-13 10:38+0200, Paolo Bonzini:
>> On 12/07/2016 22:09, Radim Krčmář wrote:
>>> @@ -619,14 +619,17 @@ static bool kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda)
>>>  /* KVM APIC implementation has two quirks
>>>   *  - dest always begins at 0 while xAPIC MDA has offset 24,
>>>   *  - IOxAPIC messages have to be delivered (directly) to x2APIC.
>>> + *
>>> + * The broadcast quirk can be disabled with KVM_CAP_X2APIC_API.
>>
>> --verbose version:
>>
>>  /* KVM APIC implementation has two quirks
>> - *  - dest always begins at 0 while xAPIC MDA has offset 24,
>> - *  - IOxAPIC messages have to be delivered (directly) to x2APIC.
>> + *  - dest always begins at 0 while xAPIC MDA has offset 24.  This is
>> + *    just a quirk in the API and is not problematic.
>>   *
>> - * The broadcast quirk can be disabled with KVM_CAP_X2APIC_API.
>> + *  - in-kernel IOAPIC messages have to be delivered directly to
>> + *    x2APIC, because the kernel does not support interrupt remapping.
>> + *    In order to support broadcast without interrupt remapping, x2APIC
>> + *    rewrites the destination of non-IPI messages (and also of IPIs sent
>> + *    from xAPIC-mode LAPICs) from APIC_BROADCAST to X2APIC_BROADCAST.
> 
> KVM doesn't do the operation in parentheses since 394457a928e0 ("KVM:
> x86: some apic broadcast modes does not work").
> 
> Following patches added only !ipi case (I already regret posting them).
> 
>> + *
>> + * The broadcast quirk can be disabled with KVM_CAP_X2APIC_API.  This is
>> + * important when userspace wants to use x2APIC-format MSIs, because
>> + * APIC_BROADCAST (0xff) is a legal route for "cluster 0, CPUs 0-7".
>>   */
>>
>> Sounds good?
> 
> Except that one bit.  (Code alone really can't explain the what happens
> here.)
> 

Ok, will fix both bits tomorrow and repush to kvm/queue.  Then test,
push to kvm/next, and pass the tree to you.

Thanks!

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ