[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 4/6] Introduce irqchip type specification for
From: |
Pavel Fedin |
Subject: |
Re: [Qemu-devel] [PATCH v7 4/6] Introduce irqchip type specification for KVM |
Date: |
Sun, 26 Jul 2015 16:46:42 +0300 |
Hello!
> > This patch introduces kernel_irqchip_type member in Machine class, which
> > is passed to kvm_arch_irqchip_create. Machine models which can use vGIC
> > now use it in order to supply correct GIC type for KVM capability
> > verification. The variable is defined as int in order to be
> > architecture-agnostic for potential future uses by other architectures.
>
> This doesn't look right. The board model should just create
> the GIC device that it wants, and it should be the job of
> the GIC device itself to coordinate with the kvm.c code
> if it has to do so to pass the right kind of irqchip type.
Unfortunately, this is how qemu is designed. kvm_irqchip_create() is called
long before machine model's init code (machvirt_init() in our case) is called.
So, if we want to check for the right thing, we have to know it before machine
model actually starts to instantiate its components.
I don't see how to change this in a more or less simple way. This routine,
except capability testing, does one more important thing on old kernels. There
it actually creates vGICv2 using KVM_CREATE_IRQCHIP ioctl. And, on non-ARM
architectures, this ioctl also works, and this is the only place where creation
is done.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
- Re: [Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3, (continued)
[Qemu-devel] [PATCH v7 1/6] Merge memory_region_init_reservation() into memory_region_init_io(), Pavel Fedin, 2015/07/24
[Qemu-devel] [PATCH v7 6/6] Add gicversion option to virt machine, Pavel Fedin, 2015/07/24
[Qemu-devel] [PATCH v7 4/6] Introduce irqchip type specification for KVM, Pavel Fedin, 2015/07/24
[Qemu-devel] [PATCH v7 2/6] Implement GIC-500 base class, Pavel Fedin, 2015/07/24
[Qemu-devel] [PATCH v7 3/6] Extract some reusable vGIC code, Pavel Fedin, 2015/07/24