From: eric.auger@linaro.org (Eric Auger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/7] KVM: api: introduce KVM_IRQ_ROUTING_EXTENDED_MSI
Date: Mon, 13 Jul 2015 11:25:23 +0200 [thread overview]
Message-ID: <55A38403.8080409@linaro.org> (raw)
In-Reply-To: <55A04A72.4010205@arm.com>
Hi Andre,
On 07/11/2015 12:42 AM, Andre Przywara wrote:
> On 09/07/15 09:22, Eric Auger wrote:
>> On ARM, the MSI msg (address and data) comes along with
>> out-of-band device ID information. The device ID encodes the
>> device that writes the MSI msg. Let's convey the device id in
>> kvm_irq_routing_msi and use a new routing entry type to
>> indicate the devid is populated.
>>
>> Signed-off-by: Eric Auger <eric.auger@linaro.org>
>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
>
> Just some forward looking statement: If this gets based on top of my ITS
> emulation v2 series,
yes this is my intent
the documentation should state that the new
> KVM_CAP_MSI_DEVID capability tells userland about the need to provide
> the device ID.
I will add this note
Thanks!
Eric
>
> Cheers,
> Andre.
>
>>
>> ---
>>
>> v1 -> v2:
>> - devid id passed in kvm_irq_routing_msi instead of in
>> kvm_irq_routing_entry
>>
>> RFC -> PATCH
>> - remove kvm_irq_routing_extended_msi and use union instead
>> ---
>> Documentation/virtual/kvm/api.txt | 10 +++++++++-
>> include/uapi/linux/kvm.h | 6 +++++-
>> 2 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
>> index bea8de7..3d920cd 100644
>> --- a/Documentation/virtual/kvm/api.txt
>> +++ b/Documentation/virtual/kvm/api.txt
>> @@ -1453,6 +1453,7 @@ struct kvm_irq_routing_entry {
>> #define KVM_IRQ_ROUTING_IRQCHIP 1
>> #define KVM_IRQ_ROUTING_MSI 2
>> #define KVM_IRQ_ROUTING_S390_ADAPTER 3
>> +#define KVM_IRQ_ROUTING_EXTENDED_MSI 4
>>
>> No flags are specified so far, the corresponding field must be set to zero.
>>
>> @@ -1465,9 +1466,16 @@ struct kvm_irq_routing_msi {
>> __u32 address_lo;
>> __u32 address_hi;
>> __u32 data;
>> - __u32 pad;
>> + union {
>> + __u32 pad;
>> + __u32 devid;
>> + };
>> };
>>
>> +for KVM_IRQ_ROUTING_EXTENDED_MSI routing entry type, the kvm_irq_routing_msi
>> +routing entry is used and devid is populated with the device ID that wrote
>> +the MSI message. For PCI, this is usually a BFD identifier in the lower 16 bits.
>> +
>> struct kvm_irq_routing_s390_adapter {
>> __u64 ind_addr;
>> __u64 summary_addr;
>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>> index 9a261e5..39ec164 100644
>> --- a/include/uapi/linux/kvm.h
>> +++ b/include/uapi/linux/kvm.h
>> @@ -829,7 +829,10 @@ struct kvm_irq_routing_msi {
>> __u32 address_lo;
>> __u32 address_hi;
>> __u32 data;
>> - __u32 pad;
>> + union {
>> + __u32 pad;
>> + __u32 devid;
>> + };
>> };
>>
>> struct kvm_irq_routing_s390_adapter {
>> @@ -844,6 +847,7 @@ struct kvm_irq_routing_s390_adapter {
>> #define KVM_IRQ_ROUTING_IRQCHIP 1
>> #define KVM_IRQ_ROUTING_MSI 2
>> #define KVM_IRQ_ROUTING_S390_ADAPTER 3
>> +#define KVM_IRQ_ROUTING_EXTENDED_MSI 4
>>
>> struct kvm_irq_routing_entry {
>> __u32 gsi;
>>
>
next prev parent reply other threads:[~2015-07-13 9:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 8:22 [PATCH v2 0/7] KVM: arm/arm64: gsi routing support Eric Auger
2015-07-09 8:22 ` [PATCH v2 1/7] KVM: api: introduce KVM_IRQ_ROUTING_EXTENDED_MSI Eric Auger
2015-07-10 22:42 ` Andre Przywara
2015-07-13 9:25 ` Eric Auger [this message]
2015-07-09 8:22 ` [PATCH v2 2/7] KVM: kvm_host: add devid in kvm_kernel_irq_routing_entry Eric Auger
2015-07-09 8:22 ` [PATCH v2 3/7] KVM: irqchip: convey devid to kvm_set_msi Eric Auger
2015-07-10 23:15 ` Andre Przywara
2015-07-17 7:27 ` Pavel Fedin
2015-07-17 10:09 ` Paolo Bonzini
2015-07-17 10:21 ` Pavel Fedin
2015-07-18 18:39 ` Eric Auger
2015-07-09 8:22 ` [PATCH v2 4/7] KVM: arm/arm64: enable irqchip routing Eric Auger
2015-07-10 23:15 ` Andre Przywara
2015-07-13 9:58 ` Eric Auger
2015-07-15 7:29 ` Pavel Fedin
2015-07-09 8:22 ` [PATCH v2 5/7] KVM: arm/arm64: build a default routing table Eric Auger
2015-07-09 8:22 ` [PATCH v2 6/7] KVM: arm/arm64: enable MSI routing Eric Auger
2015-07-10 23:16 ` Andre Przywara
2015-07-09 8:22 ` [PATCH v2 7/7] KVM: arm: implement kvm_set_msi by gsi direct mapping Eric Auger
2015-07-10 23:17 ` Andre Przywara
2015-07-31 12:59 ` Eric Auger
2015-08-02 20:23 ` Andre Przywara
2015-08-03 9:11 ` Eric Auger
2015-07-09 14:37 ` [PATCH v2 0/7] KVM: arm/arm64: gsi routing support Pavel Fedin
2015-07-09 15:25 ` Andre Przywara
2015-07-09 15:52 ` Pavel Fedin
2015-07-09 17:11 ` Eric Auger
2015-07-09 18:08 ` Pavel Fedin
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=55A38403.8080409@linaro.org \
--to=eric.auger@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).