[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qom-cpu 7/9] target-i386: Use FeatureWord loop o
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH qom-cpu 7/9] target-i386: Use FeatureWord loop on filter_features_for_kvm() |
Date: |
Fri, 03 May 2013 09:01:59 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/22/2013 01:00 PM, Eduardo Habkost wrote:
> Instead of open-coding the filtering code for each feature word, change
> the existing code to use the feature_word_info array, that have exactly
> the same CPUID eax/ecx/register values for each feature word.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> target-i386/cpu.c | 24 +++++++-----------------
> 1 file changed, 7 insertions(+), 17 deletions(-)
>
> + for (w = 0; w < FEATURE_WORDS; w++) {
> + FeatureWordInfo *wi = &feature_word_info[w];
> + env->features[w] &= kvm_arch_get_supported_cpuid(s, wi->cpuid_eax,
> + wi->cpuid_ecx,
> + wi->cpuid_reg);
Indentation is unusual, but the resulting alignment is nicer than having
'wi->' flush under 's'. I would have written the call in four lines
instead of 3, but that's not essential.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH qom-cpu 7/9] target-i386: Use FeatureWord loop on filter_features_for_kvm(),
Eric Blake <=