qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v4 2/6] target-arm: move gicv3_class_name from mac


From: Auger Eric
Subject: Re: [Qemu-devel] [RFC v4 2/6] target-arm: move gicv3_class_name from machine to kvm_arm.h
Date: Sun, 10 Jul 2016 22:17:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

Hi
On 06/07/2016 11:46, Eric Auger wrote:
> Machine.c contains code related to migration. Let's move
> gicv3_class_name to kvm_arm.h instead.
> 
> Signed-off-by: Eric Auger <address@hidden>
> Suggested-by: Peter Maydell <address@hidden>
> 
> ---
> 
> v4: creation
> ---
>  target-arm/kvm_arm.h | 16 +++++++++++++++-
>  target-arm/machine.c | 16 ----------------
>  2 files changed, 15 insertions(+), 17 deletions(-)
> 
> diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
> index 544e404..4fb6d15 100644
> --- a/target-arm/kvm_arm.h
> +++ b/target-arm/kvm_arm.h
> @@ -223,7 +223,21 @@ static inline const char *gic_class_name(void)
>   *
>   * Returns: class name to use
>   */
> -const char *gicv3_class_name(void);
> +static inline const char *gicv3_class_name(void)
> +{
> +    if (kvm_irqchip_in_kernel()) {
> +#ifdef TARGET_AARCH64
> +        return "kvm-arm-gicv3";
> +#else
> +        error_report("KVM GICv3 acceleration is not supported on this "
> +                     "platform");
this fails to compile without adding
#include "qemu/error-report.h"

I will correct this on the next version.

Sorry for the oversight.

Best Regards

Eric
> +#endif
> +    } else {
> +        return "arm-gicv3";
> +    }
> +
> +    exit(1);
> +}
>  
>  /**
>   * kvm_arm_handle_debug:
> diff --git a/target-arm/machine.c b/target-arm/machine.c
> index 2dbeb82..d90943b 100644
> --- a/target-arm/machine.c
> +++ b/target-arm/machine.c
> @@ -331,19 +331,3 @@ const VMStateDescription vmstate_arm_cpu = {
>          NULL
>      }
>  };
> -
> -const char *gicv3_class_name(void)
> -{
> -    if (kvm_irqchip_in_kernel()) {
> -#ifdef TARGET_AARCH64
> -        return "kvm-arm-gicv3";
> -#else
> -        error_report("KVM GICv3 acceleration is not supported on this "
> -                     "platform");
> -#endif
> -    } else {
> -        return "arm-gicv3";
> -    }
> -
> -    exit(1);
> -}
> 



reply via email to

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