qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c
Date: Wed, 12 Nov 2008 16:53:10 -0600
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

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 via email to

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