Re: expose host CPU features to guests

Avi Kivity
2007-09-05T19:34:45Z

Anthony Liguori wrote:
> On Wed, 2007-09-05 at 20:45 +0300, danken-atKUWr5tajBWk0Htik3J/w@public.gmane.org wrote:
>
>> Hi,
>>
>> It's a pity not to use a host CPU feature if it is available. This patch
>> exposes host CPU features to guests. It allows fine-tuning the presented
>> features from the command-line.
>>
>> The code could use some serious clean ups, but I think it is interesting
>> enough right now. I'd be happy to hear your opinion and suggestions.
>> The diff are done against qemu cvs. I tried it with kvm, but I thinkg it
>> should be useful also for kqemu.
>>
>
> I like this idea but I have some suggestions about the general approach.
> I think instead of defining another machine type, it would be better to
> just have a command line option like -cpuid that took a comma separate
> string of features with "all" meaning all features that the host has.
>
>

I think qemu-cvs has a -cpu option for non-x86 which could be used for
this. Agree machine types are the wrong approach.

> I also think it would be nicer to use cpuid() directly instead of
> attempting to parse /proc/cpuinfo.
>

Yes.

--
Any sufficiently difficult bug is indistinguishable from a feature.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/