qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Removal of some target CPU macros


From: Paul Brook
Subject: Re: [Qemu-devel] Removal of some target CPU macros
Date: Wed, 7 Nov 2007 23:37:10 +0000
User-agent: KMail/1.9.7

> I can check the hypervisor feature is not present, for emulating PowerPC
> 620 on a target that would have hypervisor emulation support. But I
> cannot do as if the CPU do not have the feature if it's actually
> available. The PowerPC 64 target emulates PowerPC 64 without the
> hypervisor feature, which actually do not exist but looks like a G5
> machine when running Linux on it. If the emulator has the hypervisor
> feature enabled, I need an hypervisor software to boot and manage the
> machine

I agree with this much.

>  There is nothing in the CPU that would allow me to
> make it run "as if the hypervisor mode do not exists".

So add one. It obviously exists conceptually, because that's what the 
non-hypervisor qemu emulates.

> The only possible runtime solution would be to
> duplicate every defined 64 bits CPU to define one model supporting
> hypervisor feature and another acting as this feature do not exist (the
> register definitions / access rights are not the same, and are defined
> at CPU instanciation time, adding run-time checks there would cost a
> lot...) and hope run-time checks won't cost too much.

As I mentioned earlier, from looking at all the occurrences of TARGET_PPC64H 
I'd expect the runtime overhead to be minimal, if it's measurable at all.

I'm not sure what you're getting at about flags being defined at instantiation 
time. That's the same whether you have two binaries or one.

Duplicating the CPU definitions should also be fairly trivial. You're 
effectively already doing it when you build the separate ppc64 and ppc64h 
binaries. I find it hard to believe it would be hard to do the same 
transformation at runtime.

Paul




reply via email to

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