diff mbox

[13/13] target-i386: Postpone cpuid_level update to realize time

Message ID 1354784817-1340-14-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Dec. 6, 2012, 9:06 a.m. UTC
From: Igor Mammedov <imammedo@redhat.com>

Delay capping cpuid_level to 7 to realize time so property setters
for cpuid_7_0_ebx_features and "level" could be used in any order/time
between x86_cpu_initfn() and x86_cpu_realize().

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-i386/cpu.c |    3 ---
 1 Datei geändert, 3 Zeilen entfernt(-)

Comments

Eduardo Habkost Dec. 7, 2012, 5:57 p.m. UTC | #1
On Thu, Dec 06, 2012 at 10:06:57AM +0100, Andreas Färber wrote:
[...]
> ---
>  target-i386/cpu.c |    3 ---
>  1 Datei geändert, 3 Zeilen entfernt(-)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index a631ae9..f56aa0d 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1381,9 +1381,6 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
>          if (kvm_check_features_against_host(x86_cpu_def) && enforce_cpuid)
>              goto error;
>      }
> -    if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
> -        x86_cpu_def->level = 7;
> -    }
>      return 0;
>  
>  error:

NACK. A patch chunk is missing. I will resend the fixed version, just in
case.
Andreas Färber Dec. 7, 2012, 6:18 p.m. UTC | #2
Am 07.12.2012 18:57, schrieb Eduardo Habkost:
> On Thu, Dec 06, 2012 at 10:06:57AM +0100, Andreas Färber wrote:
> [...]
>> ---
>>  target-i386/cpu.c |    3 ---
>>  1 Datei geändert, 3 Zeilen entfernt(-)
>>
>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
>> index a631ae9..f56aa0d 100644
>> --- a/target-i386/cpu.c
>> +++ b/target-i386/cpu.c
>> @@ -1381,9 +1381,6 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
>>          if (kvm_check_features_against_host(x86_cpu_def) && enforce_cpuid)
>>              goto error;
>>      }
>> -    if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
>> -        x86_cpu_def->level = 7;
>> -    }
>>      return 0;
>>  
>>  error:
> 
> NACK. A patch chunk is missing. I will resend the fixed version, just in
> case.

Uh, mismerge... thanks for noticing! Fixed.

https://github.com/afaerber/qemu-cpu/commits/qom-cpu

Andreas
diff mbox

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index a631ae9..f56aa0d 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1381,9 +1381,6 @@  static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
         if (kvm_check_features_against_host(x86_cpu_def) && enforce_cpuid)
             goto error;
     }
-    if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
-        x86_cpu_def->level = 7;
-    }
     return 0;
 
 error: