qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for KVMis
Date: Fri, 24 Jul 2015 10:10:51 +0100

On 24 July 2015 at 08:44, Pavel Fedin <address@hidden> wrote:
>  Thanks for pointing at it, my guess was correct, i have verified
> it by myself. Looks like i cannot use KVM definitions outside of
> KVM-only code. And simple #include <linux/kvm.h> will not help
> because this will not compile on non-Linux hosts. I will look for
> another solution.

Yep, that's right. You have a couple of choices:
(1) make sure the KVM definitions are only used in KVM-specific
source files. This is how we handle KVM_DEV_TYPE_ARM_VGIC_V2,
for instance.
(2) provide QEMU versions of the constants in target-arm/kvm-consts.h.
This is how we handle KVM_ARM_TARGET_* (which in non-KVM-specific
code are always referred to using the QEMU_KVM_ARM_TARGET_*
names which exist on all hosts.)

Following how the existing GICv2 code handles this is probably
a good approach.

thanks
-- PMM



reply via email to

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