[Top][All Lists]

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

Re: [Qemu-devel] aarch64 & gdb: warning: while parsing target descriptio

From: Peter Maydell
Subject: Re: [Qemu-devel] aarch64 & gdb: warning: while parsing target description (at line 1): Could not load XML document "arm-core.xml"
Date: Thu, 7 Aug 2014 13:03:45 +0100

On 7 August 2014 12:43, Richard W.M. Jones <address@hidden> wrote:
> On Thu, Aug 07, 2014 at 12:35:27PM +0100, Peter Maydell wrote:
>> On 7 August 2014 12:29, Richard W.M. Jones <address@hidden> wrote:
>> > On Thu, Aug 07, 2014 at 12:18:49PM +0100, Peter Maydell wrote:
>> >> you didn't select a 32 bit CPU either explicitly or by default
>> >> on the QEMU command line? Note that '-machine type=virt'
>> >> defaults to a Cortex-A15 even in qemu-softmmu-aarch64
>> >> (this is unfortunate but fallout from the fact that we started
>> >> the virt model with the A15. Maybe we should make it not
>> >> have a default and require a CPU specification...)
>> >
>> > Yes, this is indeed the case.  It also explains why I could get TCG
>> > working at all until I added -cpu cortex-a57.  Now it is working.
>> >
>> > I really think this choice of cpu_model = "cortex-a15" for -M virt is
>> > a poor one.  It should always default to something working.
>> cortex-a15 *does* work, it's just a 32 bit CPU. It will function
>> exactly the same as if you asked for an A15 in qemu-system-arm.
>> Obviously if you try to feed it an AArch64 kernel it will behave
>> the same way as if you'd tried to boot an AArch64 kernel on
>> A15 hardware, so don't do that.
> Can't a 32 bit kernel run on -cpu cortex-a5x?  (I've not tried.)

No, because at the moment our AArch64 TCG implementation
(and the way we configure KVM) assumes that the highest
exception level is running AArch64. We might fix this eventually,

>> > Currently libguestfs has to pass -cpu host when KVM is detected, and
>> > -cpu cortex-a57 otherwise.  However we cannot be sure that KVM is 100%
>> > working and that we won't fall back to TCG, which means the -cpu
>> > parameter could be wrong and we would fail to launch the appliance.
>> > Having the correct defaults would prevent this unnecessary failure.
>> This isn't possible, I'm afraid. TCG will never support "-cpu host",
>> and whether any particular specific CPU type is supported by
>> the kernel for KVM depends on the host hardware. (We don't
>> want to default to "-cpu host if KVM" because it means defaulting
>> to "migration won't work".)
> We use -cpu host on KVM in order to avoid parsing /proc/cpuinfo to
> find the right CPU model and flags.  Parsing /proc/cpuinfo is a
> minefield because it differs on every architecture, and even within
> architectures.
> Note libguestfs doesn't care about migration at all.  We do care that
> we can reliably run our appliance.

Yes, so -cpu host is a good choice for you. It's just not something
I want to make the default in QEMU itself, where we have more
than just the libguestfs use case to consider.

> What we really want is -cpu best-possible-and-don't-fail.

The difficulty here is that there is no good definition of
"best" because ARM CPUs come from a variety of different
manufacturers and with various different possible configurations.
Also, even if we could define a "best" CPU, it's quite possible
that your guest kernel wouldn't run on it (either now or in the
future when new CPUs get added).

-- PMM

reply via email to

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