qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] PSCI with mach-virt


From: Giridhar Maruthy
Subject: Re: [Qemu-devel] PSCI with mach-virt
Date: Wed, 23 Oct 2013 11:58:23 +0530

Hi Peter,

I did compare with kvmtool and found that the below fix boots SMP in
mach-virt with qemu.

diff --git a/target-arm/kvm.c b/target-arm/kvm.c
index b92e00d..28b8e2b 100644
--- a/target-arm/kvm.c
+++ b/target-arm/kvm.c
@@ -82,6 +82,7 @@ int kvm_arch_init_vcpu(CPUState *cs)

     init.target = KVM_ARM_TARGET_CORTEX_A15;
     memset(init.features, 0, sizeof(init.features));
+    init.features[0] = (!!(kvm_arch_vcpu_id(cs)) << KVM_ARM_VCPU_POWER_OFF);
     ret = kvm_vcpu_ioctl(cs, KVM_ARM_VCPU_INIT, &init);
     if (ret) {
         return ret;


Thanks,
Giridhar


On 22 October 2013 10:00, Giridhar Maruthy <address@hidden> wrote:
> Thanks Peter, I will look into it.
>
> Giridhar
>
> On 21 October 2013 19:26, Peter Maydell <address@hidden> wrote:
>> On 21 October 2013 14:47, Giridhar Maruthy <address@hidden> wrote:
>>> Hi,
>>>
>>> I am using mach-virt in qemu on a kvm enabled host.
>>>
>>> With 2 cpus, the guest fails to boot the second processor. Following
>>> is the message.
>>> CPU1: failed to boot: -22(-EINVAL)
>>>
>>> The PSCI device nodes are anyway passed from virt.c file.
>>> Is there anything extra that needs to be done to get 2 cpus working?
>>
>> In theory it should work (it works for kvmtool and there is code
>> to support it in the qemu patches). However I haven't tested it
>> and it's quite possible it got accidentally broken in the course
>> of the various rebasings and rewritings the mach-virt patches
>> have gone through. Feel free to debug it :-)
>>
>> thanks
>> -- PMM



reply via email to

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