From: "Richard W.M. Jones" <rjones@redhat.com>
To: Kashyap Chamarthy <kchamart@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Cubietruck: cannot create KVM guests: "kvm_init_vcpu failed: Invalid argument"
Date: Tue, 9 Dec 2014 11:25:43 +0000 [thread overview]
Message-ID: <20141209112543.GZ15695@redhat.com> (raw)
In-Reply-To: <20141209105031.GA13012@tesla.redhat.com>
On Tue, Dec 09, 2014 at 11:50:31AM +0100, Kashyap Chamarthy wrote:
> Booting a minimal KVM guest throws the below error on Cubietruck:
>
> "kvm_init_vcpu failed: Invalid argument"
>
> More context and an easy reproducer in this QEMU bug[1] for Fedora.
>
> Context quoting Rich Jones from comment #2:
>
> "For some reason I thought this had been fixed upstream, but
> now that I've finally got my CT working again, I see that I
> am still carrying that patch in my custom qemu.
>
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index 5ce7350..04d69d1 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -858,7 +858,7 @@ static void cortex_a15_initfn(Object *obj)
> set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS);
> set_feature(&cpu->env, ARM_FEATURE_CBAR_RO);
> set_feature(&cpu->env, ARM_FEATURE_LPAE);
> - cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A15;
> + cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A7;
> cpu->midr = 0x412fc0f1;
> cpu->reset_fpsid = 0x410430f0;
> cpu->mvfr0 = 0x10110222;
>
> So that's the answer really, it's a qemu bug. Actually it looks as
> if qemu contains some code to try to get the host CPU type, but it
> doesn't work, or maybe we need to pass a -cpu option ..."
Kashyap,
Can you try modifying src/launch-direct.c to see if we can pass
-cpu cortex-a7
and if that fixes the problem?
If that does solve the problem, the question becomes how to detect the
right CPU (either cortex-a7, cortex-a15, cortex-a57, ...) This
information isn't easily available to libguestfs AFAIK.
I really think that qemu should just "do the right thing" though.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
next prev parent reply other threads:[~2014-12-09 11:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 10:50 [Qemu-devel] Cubietruck: cannot create KVM guests: "kvm_init_vcpu failed: Invalid argument" Kashyap Chamarthy
2014-12-09 10:53 ` Peter Maydell
2014-12-09 11:27 ` Richard W.M. Jones
2014-12-09 12:15 ` Kashyap Chamarthy
2014-12-09 16:48 ` Kashyap Chamarthy
2014-12-09 11:25 ` Richard W.M. Jones [this message]
2014-12-09 11:42 ` Peter Maydell
2014-12-09 12:33 ` Dr. David Alan Gilbert
2014-12-09 13:48 ` Peter Maydell
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=20141209112543.GZ15695@redhat.com \
--to=rjones@redhat.com \
--cc=kchamart@redhat.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).