qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] expose host CPU features to guests: Take 3
Date: Tue, 25 Sep 2007 11:29:54 +0200	[thread overview]
Message-ID: <46F8D512.5030905@bellard.org> (raw)
In-Reply-To: <fb249edb0709241828pb6b9fd4v1d1d8d4a3495f040@mail.gmail.com>

andrzej zaborowski wrote:
> Hi,
> 
> On 24/09/2007, Dan Kenigsberg <danken@qumranet.com> 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.

  parent reply	other threads:[~2007-09-25  9:30 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 17:45 [Qemu-devel] expose host CPU features to guests danken
2007-09-05 19:26 ` [Qemu-devel] Re: [kvm-devel] " Anthony Liguori
2007-09-05 19:34   ` Avi Kivity
2007-09-05 19:44     ` Daniel P. Berrange
2007-09-06  0:30       ` Paul Brook
2007-09-06  8:46         ` Avi Kivity
2007-09-07 10:47   ` Jamie Lokier
2007-09-09  7:51     ` [kvm-devel] [Qemu-devel] " Avi Kivity
2007-09-09 12:47       ` Jamie Lokier
2007-09-09 12:55         ` Avi Kivity
2007-09-09 13:07           ` Jamie Lokier
2007-09-09 13:14             ` Avi Kivity
2007-09-09 15:25             ` Paul Brook
2007-09-09 15:29               ` Avi Kivity
2007-09-09 15:47                 ` Jamie Lokier
2007-09-09 16:12                 ` Paul Brook
2007-09-09 16:38                   ` Avi Kivity
2007-09-10 16:53                   ` Jamie Lokier
2007-09-10  7:40 ` [Qemu-devel] expose host CPU features to guests: Take 2 Dan Kenigsberg
2007-09-10 11:47   ` Natalia Portillo
2007-09-10 12:01     ` Dan Kenigsberg
2007-09-07 16:18       ` Natalia Portillo
2007-09-11 19:48         ` Luke -Jr
2007-09-10 17:16       ` Jamie Lokier
2007-09-24 17:41   ` [Qemu-devel] expose host CPU features to guests: Take 3 Dan Kenigsberg
2007-09-25  1:28     ` andrzej zaborowski
2007-09-25  8:48       ` [kvm-devel] " Dan Kenigsberg
2007-09-25  9:01         ` Avi Kivity
2007-09-25  9:19           ` J. Mayer
2007-09-25  9:31             ` Avi Kivity
2007-09-25 10:40               ` Avi Kivity
2007-09-25 11:09                 ` J. Mayer
2007-09-25 11:36                   ` Avi Kivity
2007-09-25 12:05                     ` Fabrice Bellard
2007-09-25 13:07                     ` Jocelyn Mayer
2007-09-25 13:12                       ` Avi Kivity
2007-09-25 13:27                       ` Dan Kenigsberg
2007-09-25 15:54                       ` Jamie Lokier
2007-09-25 16:15                         ` Avi Kivity
2007-09-25 12:51               ` Paul Brook
2007-09-25 13:13                 ` Avi Kivity
2007-09-25  9:29       ` Fabrice Bellard [this message]
2007-10-07 12:38     ` [Qemu-devel] x86 -cpu option: Take 4 Dan Kenigsberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46F8D512.5030905@bellard.org \
    --to=fabrice@bellard.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).