[Android-virt] [PATCH] Fix Cross-compiling with KVM support for ARM

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

 



On 09.02.2012, at 19:56, Christoffer Dall wrote:

> The kvm_has_gsi_routing function complains about missing KVM_CAP_IRQ_ROUTING
> definition.
> 
> Moving the function inside the appropriate ifdef's fixes this.
> 
> Signed-off-by: Antonios Motakis <a.motakis at virtualopensystems.com>
> Signed-off-by: Christoffer Dall <c.dall at virtualopensystems.com>

This looks wrong. Why is it a problem with cross compiling? Are you using the wrong headers?


Alex

> ---
> kvm-all.c |   20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 7d4e544..c73a617 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -833,6 +833,16 @@ int kvm_irqchip_commit_routes(KVMState *s)
>     return kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
> }
> 
> +int kvm_has_gsi_routing(void)
> +{
> +    return kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING);
> +}
> +
> +int kvm_allows_irq0_override(void)
> +{
> +    return !kvm_enabled() || !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
> +}
> +
> #else /* !KVM_CAP_IRQ_ROUTING */
> 
> static void kvm_init_irq_routing(KVMState *s)
> @@ -1304,16 +1314,6 @@ int kvm_has_many_ioeventfds(void)
>     return kvm_state->many_ioeventfds;
> }
> 
> -int kvm_has_gsi_routing(void)
> -{
> -    return kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING);
> -}
> -
> -int kvm_allows_irq0_override(void)
> -{
> -    return !kvm_enabled() || !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
> -}
> -
> void kvm_setup_guest_memory(void *start, size_t size)
> {
>     if (!kvm_has_sync_mmu()) {
> 
> _______________________________________________
> Android-virt mailing list
> Android-virt at lists.cs.columbia.edu
> https://lists.cs.columbia.edu/cucslists/listinfo/android-virt




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux