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

Re: [libvirt] [PATCH] Add debug messages for CPU incompatibility



On Tue, Jan 12, 2010 at 03:25:44PM +0100, Jiri Denemark wrote:
> When comparing incompatible CPUs, the reason for this incompatibility is
> logged as a debug message.
> 
> Signed-off-by: Jiri Denemark <jdenemar redhat com>
> ---
>  src/cpu/cpu_x86.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
> index 7c50261..50c03ad 100644
> --- a/src/cpu/cpu_x86.c
> +++ b/src/cpu/cpu_x86.c
> @@ -755,8 +755,10 @@ x86Compute(virCPUDefPtr host,
>              }
>          }
>  
> -        if (!found)
> +        if (!found) {
> +            VIR_DEBUG("CPU arch %s does not match host arch", cpu->arch);
>              return VIR_CPU_COMPARE_INCOMPATIBLE;
> +        }
>      }
>  
>      if ((map = x86LoadMap()) == NULL)
> @@ -796,6 +798,8 @@ x86Compute(virCPUDefPtr host,
>                                cpuid1->function);
>  
>          if (cpuid2 != NULL && x86cpuidMatchAny(cpuid2, cpuid1)) {
> +            VIR_DEBUG("Host CPU provides forbidden features in CPUID function 0x%x",
> +                      cpuid1->function);
>              ret = VIR_CPU_COMPARE_INCOMPATIBLE;
>              goto out;
>          }
> @@ -803,6 +807,7 @@ x86Compute(virCPUDefPtr host,
>  
>      result = x86ModelCompare(host_model, cpu_require);
>      if (result == SUBSET || result == UNRELATED) {
> +        VIR_DEBUG0("Host CPU does not provide all required features");
>          ret = VIR_CPU_COMPARE_INCOMPATIBLE;
>          goto out;
>      }
> @@ -819,6 +824,7 @@ x86Compute(virCPUDefPtr host,
>      if (ret == VIR_CPU_COMPARE_SUPERSET
>          && cpu->type == VIR_CPU_TYPE_GUEST
>          && cpu->match == VIR_CPU_MATCH_STRICT) {
> +        VIR_DEBUG0("Host CPU does not strictly match guest CPU");
>          ret = VIR_CPU_COMPARE_INCOMPATIBLE;
>          goto out;
>      }

ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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