qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] expose host CPU features to guests: Take 3


From: Fabrice Bellard
Subject: Re: [Qemu-devel] expose host CPU features to guests: Take 3
Date: Tue, 25 Sep 2007 11:29:54 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1

andrzej zaborowski wrote:
Hi,

On 24/09/2007, Dan Kenigsberg <address@hidden> wrote:

As with previous "Takes" of this patch, its purpose is to expose host
CPU features to guests. It proved rather helpful to KVM in various
benchmarks, and it should similarly speed kqemu up. Note that it does
not extend the set of emulated opcodes, only exposes what's supported by
the host CPU.

Another purpose for "Take 2" is to add the -cpu option to the x86
architecture, similarly to that of other architectures.
-cpu 486, pentium, pentium2 and pentium3 are supported in addition to
finer-grained features such as -cpu pentium,-mmx . As in Take 1,
-cpu host exposes host features to guest.

This patch exposes the requested CPU also right after RESET command, and
not only in CPUID.

Please let me know if you have more suggestions,

Dan.
>>[...]
I haven't really read through the rest of your code but this piece
appears to be outside any #ifdef/#endif so it will only build on x86.

Regards

A few remarks:

1) I cannot accept GPL code in target-i386, so the code from the Linux kernel must be removed or rewritten.

2) cpuid is already defined in kqemu.c, so it would be better to use it (I consider this is not a blocking point though).

3) For the future, I suggest that the function cpu_xxx_register() is removed and that the parameter xxx_def_t is added to cpu_xxx_init().

Rationale: I see no point in initializing a CPU without specifying its exact model and I am not sure that cpu_xxx_register() can be called once some code is executed.

Regards,

Fabrice.




reply via email to

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