qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	"Lan, Tianyu" <tianyu.lan@intel.com>,
	Igor Mammedov <imammedo@redhat.com>, Peter Xu <peterx@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 4/4] kvm: support MSI_X2APIC capability
Date: Mon, 9 May 2016 17:08:28 +0200	[thread overview]
Message-ID: <20160509150828.GA12472@potion> (raw)
In-Reply-To: <572DF5C8.7070105@web.de>

2016-05-07 16:03+0200, Jan Kiszka:
> On 2016-05-06 22:53, Radim Krčmář wrote:
>> The capability alows us to express x2APIC destinations.
> 
> "allows"

Thanks. :)

> Will the possibility to create >254 CPUs be indirectly coupled to this
> capability, or should userland check for it explicitly then?

Yes, for now, so I would prefer if userspace checked explicitly.
Greater amount of VCPUs needs to be checked with KVM_CAP_MAX_VCPUS, but
it's not guaranteed that all kernels with maximum above 255 will have
KVM_CAP_MSI_X2APIC as there are other methods of sending an interrupt.

> Will the kernel handle the case gracefully that AMD CPUs will report the
> capability as well, although there is no x2APIC (at least so far) with
> those CPU types, and we still inject MSI messages with that flag set
> (just to double-check if the case was thought through)?

Yes, it's perfectly backward compatible.  We allowed x2APIC on emulated
AMD cpus in the past and this just extends the address space to 32 bits.
Maybe the capability should be called MSI_EXTENDED?

(I though about using the same GSI type and just using those upper bits
 + notifiing QEMU with a capability, but userspace could have passed
 garbage in those bits, so it had non-zero risk.)

  reply	other threads:[~2016-05-09 15:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 20:53 [Qemu-devel] [RFC 0/4] APIC, IOMMU, KVM: add x2APIC interface Radim Krčmář
2016-05-06 20:53 ` [Qemu-devel] [PATCH 1/4] apic: add deliver_msi to APICCommonClass Radim Krčmář
2016-05-07 13:50   ` Jan Kiszka
2016-05-13 17:17   ` Eduardo Habkost
2016-05-06 20:53 ` [Qemu-devel] [PATCH 2/4] intel_iommu: use deliver_msi APIC callback Radim Krčmář
2016-05-13 17:33   ` Eduardo Habkost
2016-05-17 13:09     ` Paolo Bonzini
2016-05-17 13:53       ` Eduardo Habkost
2016-05-17 16:43         ` Paolo Bonzini
2016-05-06 20:53 ` [Qemu-devel] [PATCH 3/4] linux_headers: add MSI_X2APIC Radim Krčmář
2016-05-09  7:20   ` Peter Xu
2016-05-06 20:53 ` [Qemu-devel] [PATCH 4/4] kvm: support MSI_X2APIC capability Radim Krčmář
2016-05-07 14:03   ` Jan Kiszka
2016-05-09 15:08     ` Radim Krčmář [this message]
2016-05-17 13:13   ` Paolo Bonzini
2016-05-09  5:36 ` [Qemu-devel] [RFC 0/4] APIC, IOMMU, KVM: add x2APIC interface Peter Xu
2016-05-09 14:35   ` Radim Krčmář
2016-05-10  8:07     ` 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=20160509150828.GA12472@potion \
    --to=rkrcmar@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --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).