All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] A problem of IRQchip in QEMU and KVM for ARM
@ 2017-05-19  5:46 Li Zhang
  2017-05-23  2:11   ` [Qemu-devel] " Li Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Li Zhang @ 2017-05-19  5:46 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, kvm

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A problem of IRQchip in QEMU and KVM for ARM
  2017-05-19  5:46 [Qemu-devel] A problem of IRQchip in QEMU and KVM for ARM Li Zhang
@ 2017-05-23  2:11   ` Li Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Li Zhang @ 2017-05-23  2:11 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, kvm

Any idea?

Thanks.


On Fri, May 19, 2017 at 1:46 PM, Li Zhang <zhlcindy@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] A problem of IRQchip in QEMU and KVM for ARM
@ 2017-05-23  2:11   ` Li Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Li Zhang @ 2017-05-23  2:11 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, kvm

Any idea?

Thanks.


On Fri, May 19, 2017 at 1:46 PM, Li Zhang <zhlcindy@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-23  2:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19  5:46 [Qemu-devel] A problem of IRQchip in QEMU and KVM for ARM Li Zhang
2017-05-23  2:11 ` Li Zhang
2017-05-23  2:11   ` [Qemu-devel] " Li Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.