qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology &


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH for-1.4 qom-cpu 8/9 v6] target-i386: Topology & APIC ID utility functions
Date: Wed, 23 Jan 2013 20:49:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

Am 23.01.2013 18:58, schrieb Eduardo Habkost:
> This introduces utility functions for the APIC ID calculation, based on:
>   Intel® 64 Architecture Processor Topology Enumeration
>   
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 
> The code should be also compatible with AMD's "Extended Method" described at:
>   AMD CPUID Specification (Publication #25481)
>   Section 3: Multiple Core Calcuation
> as long as:
>  - nr_threads is set to 1;
>  - OFFSET_IDX is assumed to be 0;
>  - CPUID Fn8000_0008_ECX[ApicIdCoreIdSize[3:0]] is set to apicid_core_width().
> 
> Unit tests included. The code is still not being used anywhere. It will be 
> used
> by the the next patch.

(I would drop this reference to "next patch" when applying.)
> 
> Signed-off-by: Eduardo Habkost <address@hidden>
[...]
> diff --git a/tests/Makefile b/tests/Makefile
> index d86e95a..4b98d4f 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -45,6 +45,10 @@ gcov-files-test-aio-$(CONFIG_WIN32) = aio-win32.c
>  gcov-files-test-aio-$(CONFIG_POSIX) = aio-posix.c
>  check-unit-y += tests/test-thread-pool$(EXESUF)
>  gcov-files-test-thread-pool-y = thread-pool.c
> +check-unit-y += tests/test-x86-cpuid$(EXESUF)
> +# all code tested by test-x86-cpuid is inside topology.h,
> +# so add the test file itself to the gcov list
> +gcov-files-test-x86-cpuid-y = tests/test-x86-cpuid.c
>  
>  check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
>  

With patch 7/9 dropped I am more comfortable with the test integration.

I wonder however whether the gcov line is correct - won't this screw up
the statistics so that it's better to drop that line and to add
hw/pc_piix.c or target-i386/cpu.c in 9/9 instead? Blue?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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