From: Rob Landley <rob@landley.net>
To: Dushyant Bansal <cs5070214@cse.iitd.ac.in>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb
Date: Sun, 23 Jan 2011 16:21:47 -0600 [thread overview]
Message-ID: <4D3CA9FB.6030606@landley.net> (raw)
In-Reply-To: <4D3C86F3.8030409@cse.iitd.ac.in>
On 01/23/2011 01:52 PM, Dushyant Bansal wrote:
>
>> Those are board emulations. Does it have a 440 _cpu_ emulation?
>>
>> ./qemu-system-ppc -cpu ? | grep 440
>>
> This is the output.
> PowerPC 440-Xilinx PVR 7ff21910
>
> Is this right for my requirement?
I have no idea? Sounds worth a try...
> This is qemu version 0.13.50. And, it seems this support has been added
> recently. It is missing in qemu version 0.12.5.
> I have one more query. You said 440 was supported in kvm.
KVM runs on powerpc systems, including PPC 440.
KVM doesn't do CPU emulation, it does CPU virtualization. IT can't do
PowerPC on an x86 host, it does PowerPC on a PowerPC host. (It only
uses QEMU to attach I/O devices to the virtual CPUs the hardware
provides. It needs a CPU that can do nested page tables, things like
the Intel VT extensions.)
So KVM can run PowerPC 440 code when running on a PowerPC 440 host.
That's where the Bamboo board emulation came from: somebody was running
KVM on a PowerPC 440 host, and wanted a board emulation for the virtual
systems to do I/O through.
> But kvm also
> uses qemu as its userspace component. So, 440 was supported through kvm
> kernel module?
KVM just uses the QEMU code to attach virtual I/O devices to a CPU
context that's provided by the hardware.
So in order to get KVM to emulate a PowerPC 440, you have to run it on a
PowerPC 440 host. (If you do so, QEMU will happily emulate a bamboo
board for it.)
I suspect the problem is that the kernel's actual bamboo drivers have
inline assembly instructions snippets, and QEMU isn't emulating those
instructions.
Note that the powerpc 440 is mostly a subset of normal 32 bit powerpc
(um, 405?). Specifically, powerpc 440 userspace code should run on a
full-fledged PPC just fine, at least with software floating point. It's
the protected mode instructions (mmu management and such) that differ,
stuff that only really happens in the kernel.
My fuzzy understanding is that the 440 happened when IBM tried to strip
down the PowerPC for the embedded market, mostly by removing several
instructions. (So 405 code won't run on it, but 440 code will mostly
run on a 405, except for the priviledged instructions which of course
are all wildly different, but that should only get used inside the
kernel. Don't ask me about floating point.)
Motorola did the same thing by the way, except they removed a DIFFERENT
set of instructions so the two were incompatible. You can find traces
of that in kernel under "arch/powerpc/platforms/8xx" if you're curious,
but I think that died even before they spun off Freescale. (Maybe it
just doesn't get used on Linux? They tried to revive it as the
"PowerQUIC" SOC line a few years ago but I dunno if it went anywhere.)
Of course wikipedia will have an opinion. (A subset of it might even be
correct, who knows? It's the best source of anecdotal evidence on the net.)
http://en.wikipedia.org/wiki/List_of_PowerPC_processors
Rob
next prev parent reply other threads:[~2011-01-23 22:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 12:59 [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb Dushyant Bansal
2011-01-23 18:42 ` Rob Landley
2011-01-23 19:01 ` Dushyant Bansal
2011-01-23 19:21 ` Rob Landley
2011-01-23 19:52 ` Dushyant Bansal
2011-01-23 22:21 ` Rob Landley [this message]
2011-01-23 19:52 ` Andreas Färber
2011-01-23 20:08 ` Dushyant Bansal
2011-01-23 21:00 ` Edgar E. Iglesias
2011-01-23 22:11 ` Alexander Graf
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=4D3CA9FB.6030606@landley.net \
--to=rob@landley.net \
--cc=cs5070214@cse.iitd.ac.in \
--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).