linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] VGIC early initialization initiated by user-space
@ 2014-12-04  9:48 Eric Auger
  2014-12-04  9:48 ` [PATCH v2 1/4] KVM: arm/arm64: vgic: vgic_init_maps returns -ENODEV when no online vcpu Eric Auger
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Eric Auger @ 2014-12-04  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

Since the advent of dynamic initialization of VGIC, this latter is
initialized very late, on the first vcpu run. This initialization
could be initiated much earlier by the user-space, as soon as it has
set the requested dimensioning parameters: number of IRQs, number of
vCPUs, base addresses.

One motivation behind being able to initialize the VGIC sooner is
related to the setup of IRQ injection in VFIO use case. The VFIO
signaling, especially when used along with irqfd must be set *after*
vgic initialization to prevent any virtual IRQ injection before
vgic initialization. If virtual IRQ injection occurs before the VGIC
init, the IRQ cannot be injected and subsequent injection is blocked
due to VFIO completion mechanism (unmask/mask or forward/unforward).

The series includes the following patch files:
[1] changes the error returned by vgic_init_maps when no online vcpu
    can be found
[2] adds a new entry to the VGIC KVM device that allows
    the user to manually request the VGIC init:
    - a new KVM_DEV_ARM_VGIC_GRP_CTRL group is introduced.
    - its first attribute is KVM_DEV_ARM_VGIC_CTRL_INIT
[3] prevents the user-space from creating a new vcpu while the vgic
    already is initialized
[4] prevents the user-space from changing VGIC base addresses if the
    vgic is already initialized

- can be found at:
  http://git.linaro.org/people/eric.auger/linux.git,
  branch 3.18-rc7-vgic-early-init-MLv2

v1 -> v2:
- 1, 3, 4 patch files added
- some rewording in vgic device documentation

Eric Auger (4):
  KVM: arm/arm64: vgic: vgic_init_maps returns -ENODEV when no online
    vcpu
  KVM: arm/arm64: vgic: add init entry to VGIC KVM device
  KVM: arm/arm64: check vgic_initialized before VCPU creation
  KVM: arm/arm64: vgic: check vgic_initialized in
    KVM_DEV_ARM_VGIC_GRP_ADDR

 Documentation/virtual/kvm/devices/arm-vgic.txt | 13 +++++++++++++
 arch/arm/include/uapi/asm/kvm.h                |  2 ++
 arch/arm/kvm/arm.c                             |  5 +++++
 arch/arm64/include/uapi/asm/kvm.h              |  2 ++
 virt/kvm/arm/vgic.c                            | 19 +++++++++++++++++--
 5 files changed, 39 insertions(+), 2 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-04 10:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04  9:48 [PATCH v2 0/4] VGIC early initialization initiated by user-space Eric Auger
2014-12-04  9:48 ` [PATCH v2 1/4] KVM: arm/arm64: vgic: vgic_init_maps returns -ENODEV when no online vcpu Eric Auger
2014-12-04  9:48 ` [PATCH v2 2/4] KVM: arm/arm64: vgic: add init entry to VGIC KVM device Eric Auger
2014-12-04  9:48 ` [PATCH v2 3/4] KVM: arm/arm64: check vgic_initialized before VCPU creation Eric Auger
2014-12-04  9:48 ` [PATCH v2 4/4] KVM: arm/arm64: vgic: check vgic_initialized in KVM_DEV_ARM_VGIC_GRP_ADDR Eric Auger
2014-12-04 10:54 ` [PATCH v2 0/4] VGIC early initialization initiated by user-space Christoffer Dall

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).