[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] A problem of IRQchip in QEMU and KVM for ARM
From: |
Li Zhang |
Subject: |
Re: [Qemu-devel] A problem of IRQchip in QEMU and KVM for ARM |
Date: |
Tue, 23 May 2017 10:11:03 +0800 |
Any idea?
Thanks.
On Fri, May 19, 2017 at 1:46 PM, Li Zhang <address@hidden> wrote:
>
> Hi,
>
> I am looking into QEMU code in ARM recently and trying to add add_hot_cpu in
> QEMU for ARM,
> but it doesn't work when enabling KVM. It reports error:
>
> "kvm_init_vcpu failed: Device or resourc busy."
>
> By debugging QEMU with gdb, it failed on ioctl. In kernel soruce code
> arch/arm/kvm/arm.c,
> vcpu is created by this following function, it will report -EBUSY if
> irqchip_in_kernel.
>
> struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
> {
> int err;
> struct kvm_vcpu *vcpu;
>
> if (irqchip_in_kernel(kvm) && vgic_initialized(kvm)) {
> err = -EBUSY;
> goto out;
> }
>
> ....
> }
>
> I set virt machine with kernel_irqchip = off, it can execute cpu-add
> interface correctly with qmp-shell
> commands. But VMs still can't work well with kernel_irqchip=off when
> executing "info cpus" in qemu monitor.
>
> My question is that:
> 1) Can we change this error status in kvm_arch_vcpu_create?
> 2) Is it that irqchip_kernel=off isn't supported with KVM enabled on ARM?
>
> --
>
> Best Regards
> -Li
--
Best Regards
-Li