qemu-devel
[Top][All Lists]
Advanced

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]