qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Fabrice Bellard <fabrice@bellard.org>
Cc: Carsten Otte <cotte@de.ibm.com>,
	Paul Brook <paul@codesourcery.com>,
	qemu-devel@nongnu.org, kvm-devel <kvm@vger.kernel.org>,
	Hollis Blanchard <hollisb@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c
Date: Wed, 12 Nov 2008 16:53:10 -0600	[thread overview]
Message-ID: <491B5E56.9010500@us.ibm.com> (raw)
In-Reply-To: <491B5D33.7060601@bellard.org>

Fabrice Bellard wrote:
> I suggest to go even further: there should be a way in QEMU to define
> CPUs which do not rely on the dynamic translator and this choice should
> be doable at runtime (i.e. not with a bunch of #ifdefs as you may do
> it). This way you could not only plug KVM CPUs without having the
> equivalent TCG one, but also CPUs from other sources (i.e. the x86
> interpreter of malc, or the cycle accurate PTLsim x86 emulator).
>   

Today, we do this with KVM support without any ifdefs (what's in SVN 
right now).  We leave the TCG and the KVM state in CPUState, and then 
just use the appropriate cpu_exec() loop to run depending on the CPU type.

We could go a step further and split out the core x86 CPU state from 
CPUX86State, and then introduce a CPUTCGState and CPUKVMState that both 
include CPUX86State but that seems like a lot of churn for little gain 
(KVM just adds two more fields to CPUX86State).

What I'm trying to do with this patch, is make it possible to get rid of 
the TCG code altogether for targets that only support KVM and not TCG 
(ia64, s390, etc).

How I'll eventually get rid of it is not with #ifdefs, but by just not 
compiling in all the TCG code, cpu-exec.c, exec.c and instead just 
compiling in a kvm-exec.c or something like that.

Regards,

Anthony Liguori

> Fabrice.
>
>   

  reply	other threads:[~2008-11-12 22:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 22:10 [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c Anthony Liguori
2008-11-12 22:48 ` Fabrice Bellard
2008-11-12 22:53   ` Anthony Liguori [this message]
2008-11-13 13:51 ` andrzej zaborowski
2008-11-13 16:18   ` Anthony Liguori
2008-11-14  3:12     ` andrzej zaborowski
2008-11-14  3:18       ` Anthony Liguori
2008-11-14 13:45         ` andrzej zaborowski
2008-11-14  4:03 ` Jamie Lokier
2008-11-14  9:58   ` Avi Kivity
2008-11-14 13:23     ` Jamie Lokier
2008-11-16 13:07       ` Avi Kivity
2008-11-17  3:57         ` Jamie Lokier
2008-11-14 13:58   ` Anthony Liguori
2008-11-14 14:07   ` Anthony Liguori
2008-11-14 23:13     ` Jamie Lokier
2008-11-14 23:20       ` Anthony Liguori

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=491B5E56.9010500@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=fabrice@bellard.org \
    --cc=hollisb@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=paul@codesourcery.com \
    --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).