* [Qemu-devel] [PATCH v5] hw/intc/arm_gic: Initialize the vgic in the realize function
@ 2015-03-11 17:17 ` Eric Auger
0 siblings, 0 replies; 4+ messages in thread
From: Eric Auger @ 2015-03-11 17:17 UTC (permalink / raw)
To: eric.auger, eric.auger, qemu-devel, peter.maydell
Cc: kvmarm, christoffer.dall, patches
This patch forces vgic initialization in the vgic realize function.
It uses a new group/attribute that allows such operation:
KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT
This earlier initialization allows, for example, to setup VFIO
signaling and irqfd after vgic initialization, on a reset notifier.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
v4 -> v5:
- add a comment to clarify what the new gic accesses aim at
- header sync removed. The series becomes a singleton.
v1 -> v2:
- The init is not mandated to be done in a machine init done notifier
anymore since only the number of vcpus and number of IRQs must be
known at init time.
---
hw/intc/arm_gic_kvm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index 1ad3eb0..0d20750 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -573,6 +573,13 @@ static void kvm_arm_gic_realize(DeviceState *dev, Error **errp)
kvm_gic_access(s, KVM_DEV_ARM_VGIC_GRP_NR_IRQS, 0, 0, &numirqs, 1);
}
+ /* Tell the kernel to complete VGIC initialization now */
+ if (kvm_gic_supports_attr(s, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_VGIC_CTRL_INIT)) {
+ kvm_gic_access(s, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_VGIC_CTRL_INIT, 0, 0, 1);
+ }
+
/* Distributor */
memory_region_init_reservation(&s->iomem, OBJECT(s),
"kvm-gic_dist", 0x1000);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v5] hw/intc/arm_gic: Initialize the vgic in the realize function
@ 2015-03-11 17:17 ` Eric Auger
0 siblings, 0 replies; 4+ messages in thread
From: Eric Auger @ 2015-03-11 17:17 UTC (permalink / raw)
To: eric.auger, eric.auger, qemu-devel, peter.maydell; +Cc: kvmarm, patches
This patch forces vgic initialization in the vgic realize function.
It uses a new group/attribute that allows such operation:
KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT
This earlier initialization allows, for example, to setup VFIO
signaling and irqfd after vgic initialization, on a reset notifier.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
v4 -> v5:
- add a comment to clarify what the new gic accesses aim at
- header sync removed. The series becomes a singleton.
v1 -> v2:
- The init is not mandated to be done in a machine init done notifier
anymore since only the number of vcpus and number of IRQs must be
known at init time.
---
hw/intc/arm_gic_kvm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index 1ad3eb0..0d20750 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -573,6 +573,13 @@ static void kvm_arm_gic_realize(DeviceState *dev, Error **errp)
kvm_gic_access(s, KVM_DEV_ARM_VGIC_GRP_NR_IRQS, 0, 0, &numirqs, 1);
}
+ /* Tell the kernel to complete VGIC initialization now */
+ if (kvm_gic_supports_attr(s, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_VGIC_CTRL_INIT)) {
+ kvm_gic_access(s, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_VGIC_CTRL_INIT, 0, 0, 1);
+ }
+
/* Distributor */
memory_region_init_reservation(&s->iomem, OBJECT(s),
"kvm-gic_dist", 0x1000);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v5] hw/intc/arm_gic: Initialize the vgic in the realize function
2015-03-11 17:17 ` Eric Auger
@ 2015-03-12 14:04 ` Peter Maydell
-1 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-03-12 14:04 UTC (permalink / raw)
To: Eric Auger
Cc: Patch Tracking, eric.auger, QEMU Developers, Christoffer Dall, kvmarm
On 11 March 2015 at 17:17, Eric Auger <eric.auger@linaro.org> wrote:
> This patch forces vgic initialization in the vgic realize function.
> It uses a new group/attribute that allows such operation:
> KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT
>
> This earlier initialization allows, for example, to setup VFIO
> signaling and irqfd after vgic initialization, on a reset notifier.
>
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5] hw/intc/arm_gic: Initialize the vgic in the realize function
@ 2015-03-12 14:04 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-03-12 14:04 UTC (permalink / raw)
To: Eric Auger; +Cc: Patch Tracking, eric.auger, QEMU Developers, kvmarm
On 11 March 2015 at 17:17, Eric Auger <eric.auger@linaro.org> wrote:
> This patch forces vgic initialization in the vgic realize function.
> It uses a new group/attribute that allows such operation:
> KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT
>
> This earlier initialization allows, for example, to setup VFIO
> signaling and irqfd after vgic initialization, on a reset notifier.
>
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-12 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 17:17 [Qemu-devel] [PATCH v5] hw/intc/arm_gic: Initialize the vgic in the realize function Eric Auger
2015-03-11 17:17 ` Eric Auger
2015-03-12 14:04 ` [Qemu-devel] " Peter Maydell
2015-03-12 14:04 ` Peter Maydell
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.