[libvirt] [PATCH 4/4] cpu: Allow fine tuning of "host-model" cpu

Peter Krempa pkrempa at redhat.com
Tue Jul 16 09:07:24 UTC 2013


On 07/16/13 10:45, Jiri Denemark wrote:
> On Mon, Jul 15, 2013 at 18:24:47 +0200, Peter Krempa wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=799354
>>
>> Until now, the "host-model" cpu mode couldn't be influenced. This patch
>> allows to use the <feature> elements to either enable or disable
>> specific CPU flags. This can be used to force flags that can be emulated
>> even if the host CPU doesn't support them.
> ...
>> diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
>> index 928a67b..ec99106 100644
>> --- a/src/cpu/cpu_x86.c
>> +++ b/src/cpu/cpu_x86.c

...

>> @@ -1748,11 +1783,11 @@ x86Update(virCPUDefPtr guest,
>>           return x86UpdateCustom(guest, host);
>>
>>       case VIR_CPU_MODE_HOST_MODEL:
>> +        return x86UpdateHostModel(guest, host);
>> +
>> +
>
> Too many empty lines :-)

Right. I fixed this.

>
>>       case VIR_CPU_MODE_HOST_PASSTHROUGH:
>> -        if (guest->mode == VIR_CPU_MODE_HOST_MODEL)
>> -            guest->match = VIR_CPU_MATCH_EXACT;
>> -        else
>> -            guest->match = VIR_CPU_MATCH_MINIMUM;
>> +        guest->match = VIR_CPU_MATCH_MINIMUM;
>>           virCPUDefFreeModel(guest);
>>           return virCPUDefCopyModel(guest, host, true);
>
> ACK

And pushed the series. Thanks for the review.

>
> Jirka
>

Peter




More information about the libvir-list mailing list