All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@linaro.org>
To: Pavel Fedin <p.fedin@samsung.com>,
	'Andre Przywara' <andre.przywara@arm.com>,
	linux-arm-kernel@lists.infradead.org
Cc: eric.auger@st.com, kvm@vger.kernel.org,
	'Marc Zyngier' <Marc.Zyngier@arm.com>,
	pbonzini@redhat.com, kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v2 0/7] KVM: arm/arm64: gsi routing support
Date: Thu, 09 Jul 2015 19:11:25 +0200	[thread overview]
Message-ID: <559EAB3D.2080205@linaro.org> (raw)
In-Reply-To: <026801d0ba5f$43a79520$caf6bf60$@samsung.com>

Hi Pavel, Andre,
On 07/09/2015 05:52 PM, Pavel Fedin wrote:
>  Hi!
> 
>>> 3. KVM_SET_GSI_ROUTING - we use KVM_IRQ_ROUTING_EXTENDED_MSI plus devid
>>
>> Here we already have a type field with some users, so lets piggy-back on
>> this.
> 
>  We already have 'flags' there too.
> 
>> Both ioctl extensions are coupled with a per-VM capability to let
>> userland know that it needs to provide a device ID.
> 
>> Using flags on its own (without an explicit capability) is what I
>> opposed against, not flags in general.
> 
>  Ok, and in your next respin you'll add the capability, correct? So that we will finally have all
> pieces in place.
> 
>> In case of KVM_SET_GSI_ROUTING it just seems awkward
>> to me to use a flag when a different type would do as well.
> 
>  Well, MSI vs "Extended MSI" are even not different types really. It's just MSI which has devid. And
> we *ALREADY* have VALID_DEVID flag.
> 
>> But after all, I don't have a strong opinion on that matter, so if
>> others prefer using a flag I am also fine with that.
> 
>  So, ok, to be short... My vote is for flag, because it's already there and it keeps up with the
> style we already have. Eric, this is my final statement about it. It's up to you to accept or
> ignore. In qemu code flag is a little bit nicer because it's just stored in a variable and helps to
> avoid several if-else's (however small ones). Compare:
Well personally I prefer the type thing and I don't see much difference
at userspace level anyway. But I am not this kind of hyperspace
architect guy. So, since there is no consensus here, I would say let's
wait for formal reviews of our maintainers and I will align.

The v2 update is not the outcome of a consensus so I made arbitrary
decisions to progress & fix bugs and I hope this eventually works with
ITS ;-)

Best Regards

Eric
> --- cut ---
>     kroute.gsi = virq;
>     kroute.type = KVM_IRQ_ROUTING_MSI;
>     kroute.u.msi.address_lo = (uint32_t)msg.address;
>     kroute.u.msi.address_hi = msg.address >> 32;
>     kroute.u.msi.data = le32_to_cpu(msg.data);
>     kroute.flags = kvm_msi_flags;
>     if (kroute.flags & KVM_MSI_VALID_DEVID) {
>         kroute.u.msi.devid = (pci_bus_num(dev->bus) << 8) | dev->devfn;
>     }
> --- cut ---
> and:
> --- cut ---
>     kroute.gsi = virq;
>     if (use_extended_msi) {
>         kroute.u.msi.devid = (pci_bus_num(dev->bus) << 8) | dev->devfn;
>         kroute.type = KVM_IRQ_ROUTING_EXTENDED_MSI;
>     } else {
>         kroute.type = KVM_IRQ_ROUTING_MSI;
>     }
>     kroute.u.msi.address_lo = (uint32_t)msg.address;
>     kroute.u.msi.address_hi = msg.address >> 32;
>     kroute.u.msi.data = le32_to_cpu(msg.data);
>     kroute.flags = kvm_msi_flags;
> --- cut ---
> 
> Kind regards,
> Pavel Fedin
> Expert Engineer
> Samsung Electronics Research center Russia
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: eric.auger@linaro.org (Eric Auger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/7] KVM: arm/arm64: gsi routing support
Date: Thu, 09 Jul 2015 19:11:25 +0200	[thread overview]
Message-ID: <559EAB3D.2080205@linaro.org> (raw)
In-Reply-To: <026801d0ba5f$43a79520$caf6bf60$@samsung.com>

Hi Pavel, Andre,
On 07/09/2015 05:52 PM, Pavel Fedin wrote:
>  Hi!
> 
>>> 3. KVM_SET_GSI_ROUTING - we use KVM_IRQ_ROUTING_EXTENDED_MSI plus devid
>>
>> Here we already have a type field with some users, so lets piggy-back on
>> this.
> 
>  We already have 'flags' there too.
> 
>> Both ioctl extensions are coupled with a per-VM capability to let
>> userland know that it needs to provide a device ID.
> 
>> Using flags on its own (without an explicit capability) is what I
>> opposed against, not flags in general.
> 
>  Ok, and in your next respin you'll add the capability, correct? So that we will finally have all
> pieces in place.
> 
>> In case of KVM_SET_GSI_ROUTING it just seems awkward
>> to me to use a flag when a different type would do as well.
> 
>  Well, MSI vs "Extended MSI" are even not different types really. It's just MSI which has devid. And
> we *ALREADY* have VALID_DEVID flag.
> 
>> But after all, I don't have a strong opinion on that matter, so if
>> others prefer using a flag I am also fine with that.
> 
>  So, ok, to be short... My vote is for flag, because it's already there and it keeps up with the
> style we already have. Eric, this is my final statement about it. It's up to you to accept or
> ignore. In qemu code flag is a little bit nicer because it's just stored in a variable and helps to
> avoid several if-else's (however small ones). Compare:
Well personally I prefer the type thing and I don't see much difference
at userspace level anyway. But I am not this kind of hyperspace
architect guy. So, since there is no consensus here, I would say let's
wait for formal reviews of our maintainers and I will align.

The v2 update is not the outcome of a consensus so I made arbitrary
decisions to progress & fix bugs and I hope this eventually works with
ITS ;-)

Best Regards

Eric
> --- cut ---
>     kroute.gsi = virq;
>     kroute.type = KVM_IRQ_ROUTING_MSI;
>     kroute.u.msi.address_lo = (uint32_t)msg.address;
>     kroute.u.msi.address_hi = msg.address >> 32;
>     kroute.u.msi.data = le32_to_cpu(msg.data);
>     kroute.flags = kvm_msi_flags;
>     if (kroute.flags & KVM_MSI_VALID_DEVID) {
>         kroute.u.msi.devid = (pci_bus_num(dev->bus) << 8) | dev->devfn;
>     }
> --- cut ---
> and:
> --- cut ---
>     kroute.gsi = virq;
>     if (use_extended_msi) {
>         kroute.u.msi.devid = (pci_bus_num(dev->bus) << 8) | dev->devfn;
>         kroute.type = KVM_IRQ_ROUTING_EXTENDED_MSI;
>     } else {
>         kroute.type = KVM_IRQ_ROUTING_MSI;
>     }
>     kroute.u.msi.address_lo = (uint32_t)msg.address;
>     kroute.u.msi.address_hi = msg.address >> 32;
>     kroute.u.msi.data = le32_to_cpu(msg.data);
>     kroute.flags = kvm_msi_flags;
> --- cut ---
> 
> Kind regards,
> Pavel Fedin
> Expert Engineer
> Samsung Electronics Research center Russia
> 
> 

  reply	other threads:[~2015-07-09 17:11 UTC|newest]

Thread overview: 56+ 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 ` Eric Auger
2015-07-09  8:22 ` [PATCH v2 1/7] KVM: api: introduce KVM_IRQ_ROUTING_EXTENDED_MSI Eric Auger
2015-07-09  8:22   ` Eric Auger
2015-07-10 22:42   ` Andre Przywara
2015-07-10 22:42     ` Andre Przywara
2015-07-13  9:25     ` Eric Auger
2015-07-13  9:25       ` Eric Auger
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   ` Eric Auger
2015-07-09  8:22 ` [PATCH v2 3/7] KVM: irqchip: convey devid to kvm_set_msi Eric Auger
2015-07-09  8:22   ` Eric Auger
2015-07-10 23:15   ` Andre Przywara
2015-07-10 23:15     ` Andre Przywara
2015-07-17  7:27   ` Pavel Fedin
2015-07-17  7:27     ` Pavel Fedin
2015-07-17 10:09     ` Paolo Bonzini
2015-07-17 10:09       ` Paolo Bonzini
2015-07-17 10:21       ` Pavel Fedin
2015-07-17 10:21         ` Pavel Fedin
2015-07-18 18:39         ` Eric Auger
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-09  8:22   ` Eric Auger
2015-07-10 23:15   ` Andre Przywara
2015-07-10 23:15     ` Andre Przywara
2015-07-13  9:58     ` Eric Auger
2015-07-13  9:58       ` Eric Auger
2015-07-15  7:29       ` Pavel Fedin
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   ` Eric Auger
2015-07-09  8:22 ` [PATCH v2 6/7] KVM: arm/arm64: enable MSI routing Eric Auger
2015-07-09  8:22   ` Eric Auger
2015-07-10 23:16   ` Andre Przywara
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-09  8:22   ` Eric Auger
2015-07-10 23:17   ` Andre Przywara
2015-07-10 23:17     ` Andre Przywara
2015-07-31 12:59     ` Eric Auger
2015-07-31 12:59       ` Eric Auger
2015-08-02 20:23       ` Andre Przywara
2015-08-02 20:23         ` Andre Przywara
2015-08-03  9:11         ` Eric Auger
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 14:37   ` Pavel Fedin
2015-07-09 15:25   ` Andre Przywara
2015-07-09 15:25     ` Andre Przywara
2015-07-09 15:52     ` Pavel Fedin
2015-07-09 15:52       ` Pavel Fedin
2015-07-09 17:11       ` Eric Auger [this message]
2015-07-09 17:11         ` Eric Auger
2015-07-09 18:08         ` Pavel Fedin
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=559EAB3D.2080205@linaro.org \
    --to=eric.auger@linaro.org \
    --cc=Marc.Zyngier@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=eric.auger@st.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=p.fedin@samsung.com \
    --cc=pbonzini@redhat.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 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.