[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] PSCI with mach-virt
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] PSCI with mach-virt |
Date: |
Wed, 23 Oct 2013 08:05:31 +0100 |
On 23 October 2013 07:28, Giridhar Maruthy <address@hidden> wrote:
> 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 for looking into this. We probably need to tweak this
a bit because the feature bit is only valid if the kernel supports
the KVM_ARM_CAP_PSCI capability, and we only want to do
this if we're using mach-virt rather than vexpress-a15, but we
certainly need to do something to set the "start powered down"
feature for CPUs after zero if we're using PSCI.
-- PMM