On Tue, Dec 09, 2014 at 11:27:02AM +0000, Richard W.M. Jones wrote: > On Tue, Dec 09, 2014 at 10:53:41AM +0000, Peter Maydell wrote: > > On 9 December 2014 at 10:50, Kashyap Chamarthy <kcham...@redhat.com> 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; > > > > This is obviously a bogus patch -- this is the initfn > > for Cortex-A15 so telling it to be a Cortex-A7 is wrong > > (and would break working setups on A15 hosts). > > Yes, I definitely was not proposing this as a serious patch! In my > copy of qemu it has "HACK" in all capital letters in the summary ... > > > > 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 ..." > > > > Yes, you need to pass a -cpu option. For KVM on ARM, you > > always need to either: > > * pass a -cpu option matching the host CPU > > * pass "-cpu host" > > > > The CubieTruck is a Cortex-A7, which we don't have specific > > support for in QEMU, so you will need "-cpu host". > > Kashyap ^^ can you try this? Should be a trivial one-liner change > in src/launch-direct.c.
Yeah, libguestfs build in progress on Cubietruck (it's slow), will test. -- /kashyap