linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Zhang <yang.zhang.wz@gmail.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Lan, Tianyu" <tianyu.lan@intel.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Jan Kiszka <jan.kiszka@web.de>, Peter Xu <peterx@redhat.com>
Subject: Re: [PATCH v2 11/13] KVM: x86: add KVM_CAP_X2APIC_API
Date: Mon, 11 Jul 2016 18:33:49 +0800	[thread overview]
Message-ID: <813844d3-d644-a213-23b1-4d6648e8a8f4@gmail.com> (raw)
In-Reply-To: <f91ce05e-40a3-eca7-2772-f3b4b9a75eea@redhat.com>

On 2016/7/11 17:17, Paolo Bonzini wrote:
>
>
> On 11/07/2016 10:56, Yang Zhang wrote:
>> On 2016/7/11 15:44, Paolo Bonzini wrote:
>>>
>>>
>>> On 11/07/2016 08:06, Yang Zhang wrote:
>>>>> Changes to MSI addresses follow the format used by interrupt remapping
>>>>> unit.
>>>>> The upper address word, that used to be 0, contains upper 24 bits of
>>>>> the LAPIC
>>>>> address in its upper 24 bits.  Lower 8 bits are reserved as 0.
>>>>> Using the upper address word is not backward-compatible either as we
>>>>> didn't
>>>>> check that userspace zeroed the word.  Reserved bits are still not
>>>>> explicitly
>>>>
>>>> Does this means we cannot migrate the VM from KVM_CAP_X2APIC_API enabled
>>>> host to the disable host even VM doesn't have more than 255 VCPUs?
>>>
>>> Yes, but that's why KVM_CAP_X2APIC_API is enabled manually.  The idea is
>>> that QEMU will not use KVM_CAP_X2APIC_API except on the newest machine
>>> type.
>>
>> Thanks for confirmation. And when the KVM_CAP_X2APIC_API will be enabled
>> in Qemu?
>
> It could be 2.7 or 2.8.
>
>>>
>>> If interrupt remapping is on, KVM_CAP_X2APIC_API is needed even with 8
>>> VCPUs, I think.  Otherwise KVM will believe that 0xff is "broadcast"
>>> rather than "cluster 0, CPUs 0-7".
>>
>> If interrupt remapping is using, what 0xff means is relying on which
>> mode the destination CPU is in. I think there is no KVM_CAP_X2APIC_API
>> needed since interrupt remapping table gives all the information.
>
> If you have EIM 0xff never means broadcast, but KVM sees a 0xff in the
> interrupt route or KVM_SIGNAL_MSI argument and translates it into a
> broadcast.

I see your point. I thought there would be a new irq router(like 
KVM_IRQ_ROUTING_IR) to handle all interrupts after turn on IR and 
KVM_CAP_X2APIC_API would be dropped. So we will continue to use 
KVM_IRQ_ROUTING_IRQCHIP and KVM_IRQ_ROUTING_MSI for interrupt from IR, 
right?

-- 
best regards
yang

  reply	other threads:[~2016-07-11 10:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07 17:15 [PATCH v2 00/13] KVM: x86: break the xAPIC barrier Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 01/13] KVM: x86: bump KVM_SOFT_MAX_VCPUS to 240 Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 02/13] KVM: x86: add kvm_apic_map_get_dest_lapic Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 03/13] KVM: x86: use physical LAPIC array for logical x2APIC Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 04/13] KVM: x86: dynamic kvm_apic_map Radim Krčmář
2016-07-11  6:07   ` Yang Zhang
2016-07-11  7:43     ` Paolo Bonzini
2016-07-11 10:14       ` Yang Zhang
2016-07-11 13:48         ` Radim Krčmář
2016-07-11 14:14           ` Paolo Bonzini
2016-07-11 15:52             ` Radim Krčmář
2016-07-11 16:04               ` Paolo Bonzini
2016-07-12  3:27               ` Yang Zhang
2016-07-07 17:15 ` [PATCH v2 05/13] KVM: x86: use generic function for MSI parsing Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 06/13] KVM: x86: use hardware-compatible format for APIC ID register Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 07/13] KVM: x86: reset APIC ID when enabling LAPIC Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 08/13] KVM: VMX: optimize APIC ID read with APICv Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 09/13] KVM: x86: reset lapic base in kvm_lapic_reset Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 10/13] KVM: pass struct kvm to kvm_set_routing_entry Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 11/13] KVM: x86: add KVM_CAP_X2APIC_API Radim Krčmář
2016-07-11  6:06   ` Yang Zhang
2016-07-11  7:44     ` Paolo Bonzini
2016-07-11  8:56       ` Yang Zhang
2016-07-11  9:17         ` Paolo Bonzini
2016-07-11 10:33           ` Yang Zhang [this message]
2016-07-11 10:40             ` Paolo Bonzini
2016-07-07 17:15 ` [PATCH v2 12/13] KVM: x86: bump MAX_VCPUS to 288 Radim Krčmář
2016-07-07 17:15 ` [PATCH v2 13/13] KVM: x86: bump KVM_MAX_VCPU_ID to 1023 Radim Krčmář
2016-07-08 10:00 ` [PATCH v2 00/13] KVM: x86: break the xAPIC barrier Paolo Bonzini
2016-07-08 16:29 ` Radim Krčmář
2016-07-08 16:30   ` Paolo Bonzini

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=813844d3-d644-a213-23b1-4d6648e8a8f4@gmail.com \
    --to=yang.zhang.wz@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tianyu.lan@intel.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).