kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Andre Przywara <andre.przywara@arm.com>,
	Christoffer Dall <christoffer.dall@linaro.org>
Cc: Eric Auger <eric.auger@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: Re: [PATCH v4 01/12] KVM: extend struct kvm_msi to hold a 32-bit device ID
Date: Wed, 25 May 2016 17:16:54 +0100	[thread overview]
Message-ID: <5745CFF6.6070001@arm.com> (raw)
In-Reply-To: <e520a5a8-b259-27f3-f33c-f87e008f1c6f@arm.com>

On 25/05/16 16:55, Andre Przywara wrote:
> Hi Christoffer,
> 
> On 03/04/16 10:15, Christoffer Dall wrote:
>> On Sat, Mar 26, 2016 at 02:13:59AM +0000, Andre Przywara wrote:
>>> The ARM GICv3 ITS MSI controller requires a device ID to be able to
>>> assign the proper interrupt vector. On real hardware, this ID is
>>> sampled from the bus. To be able to emulate an ITS controller, extend
>>> the KVM MSI interface to let userspace provide such a device ID. For
>>> PCI devices, the device ID is simply the 16-bit bus-device-function
>>> triplet, which should be easily available to the userland tool.
>>>
>>> Also there is a new KVM capability which advertises whether the
>>> current VM requires a device ID to be set along with the MSI data.
>>> This flag is still reported as not available everywhere, later we will
>>> enable it when ITS emulation is used.
>>>
>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>> Reviewed-by: Eric Auger <eric.auger@linaro.org>
>>> ---
>>>  Documentation/virtual/kvm/api.txt | 12 ++++++++++--
>>>  include/uapi/linux/kvm.h          |  5 ++++-
>>>  2 files changed, 14 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
>>> index cb2ef0b..8f7351d 100644
>>> --- a/Documentation/virtual/kvm/api.txt
>>> +++ b/Documentation/virtual/kvm/api.txt
>>> @@ -2163,10 +2163,18 @@ struct kvm_msi {
>>>  	__u32 address_hi;
>>>  	__u32 data;
>>>  	__u32 flags;
>>> -	__u8  pad[16];
>>> +	__u32 devid;
>>
>> Are we imposing any unfortunate restrictions for other architectures by
>> using a u32 over a u64 for the device ID?
> 
> Mmmh, good point. I guess not only for other architectures, but also for
> the future in general.
> 
> Are there any objections against increasing this to a u64?

I'm not sure this is really necessary. A PCI RID is 16bit, and expanding
it to 32bit is already making quite a bit of space for further extension.

Also, some architecture might be unhappy of having a 64bit quantity that
is not 64bit aligned...

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2016-05-25 16:16 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-26  2:13 [PATCH v4 00/12] KVM: arm64: GICv3 ITS emulation Andre Przywara
2016-03-26  2:13 ` [PATCH v4 01/12] KVM: extend struct kvm_msi to hold a 32-bit device ID Andre Przywara
2016-04-03  9:15   ` Christoffer Dall
2016-05-25 15:55     ` Andre Przywara
2016-05-25 16:16       ` Marc Zyngier [this message]
2016-05-31 13:05         ` Christoffer Dall
2016-05-05 17:55   ` Chalamarla, Tirumalesh
2016-03-26  2:14 ` [PATCH v4 02/12] KVM: arm/arm64: extend arch CAP checks to allow per-VM capabilities Andre Przywara
2016-04-03 10:08   ` Christoffer Dall
2016-04-05 12:48   ` Eric Auger
2016-05-05 18:00   ` Chalamarla, Tirumalesh
2016-03-26  2:14 ` [PATCH v4 03/12] KVM: arm64: Introduce new MMIO region for the ITS base address Andre Przywara
2016-04-03 10:08   ` Christoffer Dall
2016-04-05 12:47     ` Eric Auger
2016-04-07 13:44   ` Marc Zyngier
2016-05-05 18:08   ` Chalamarla, Tirumalesh
2016-05-09 15:47     ` Marc Zyngier
2016-05-09 16:53       ` Chalamarla, Tirumalesh
2016-05-09 17:09         ` Marc Zyngier
2016-03-26  2:14 ` [PATCH v4 04/12] KVM: arm64: handle ITS related GICv3 redistributor registers Andre Przywara
2016-04-03 10:08   ` Christoffer Dall
2016-04-05 12:55     ` Eric Auger
2016-04-05 15:17   ` Eric Auger
2016-04-07 13:54   ` Marc Zyngier
2016-04-07 13:58     ` Marc Zyngier
2016-05-05 18:06       ` Chalamarla, Tirumalesh
2016-03-26  2:14 ` [PATCH v4 05/12] KVM: arm64: introduce ITS emulation file with stub functions Andre Przywara
2016-04-05 16:03   ` Eric Auger
2016-04-07 14:04   ` Marc Zyngier
2016-04-07 14:08     ` Eric Auger
2016-04-07 14:48       ` Marc Zyngier
2016-04-07 15:09         ` Eric Auger
2016-04-07 15:19           ` Marc Zyngier
2016-03-26  2:14 ` [PATCH v4 06/12] KVM: arm64: implement basic ITS register handlers Andre Przywara
2016-04-03 10:08   ` Christoffer Dall
2016-04-06  9:36   ` Eric Auger
2016-05-25 13:49     ` Andre Przywara
2016-04-07 14:35   ` Marc Zyngier
2016-05-25 11:37     ` Andre Przywara
2016-05-26  9:10       ` Marc Zyngier
2016-06-03 15:42         ` Andre Przywara
2016-06-03 16:54           ` Marc Zyngier
2016-05-05 18:51   ` Chalamarla, Tirumalesh
2016-03-26  2:14 ` [PATCH v4 07/12] KVM: arm64: add data structures to model ITS interrupt translation Andre Przywara
2016-04-06  9:53   ` Eric Auger
2016-03-26  2:14 ` [PATCH v4 08/12] KVM: arm64: connect LPIs to the VGIC emulation Andre Przywara
2016-04-06 12:00   ` Eric Auger
2016-05-05 18:59   ` Chalamarla, Tirumalesh
2016-03-26  2:14 ` [PATCH v4 09/12] KVM: arm64: sync LPI configuration and pending tables Andre Przywara
2016-04-06 13:41   ` Eric Auger
2016-06-03 14:17     ` Andre Przywara
2016-03-26  2:14 ` [PATCH v4 10/12] KVM: arm64: implement ITS command queue command handlers Andre Przywara
2016-05-05 19:12   ` Chalamarla, Tirumalesh
2016-05-25 14:34     ` Andre Przywara
2016-03-26  2:14 ` [PATCH v4 11/12] KVM: arm64: implement MSI injection in ITS emulation Andre Przywara
2016-03-26  2:14 ` [PATCH v4 12/12] KVM: arm64: enable ITS emulation as a virtual MSI controller Andre Przywara
2016-06-03  4:26 ` [PATCH v4 00/12] KVM: arm64: GICv3 ITS emulation Bharat Bhushan
2016-06-03 14:32   ` Andre Przywara
2016-06-06  5:29     ` Bharat Bhushan
2016-06-07  8:02       ` Christoffer Dall

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=5745CFF6.6070001@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=eric.auger@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --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).