kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 218177] New: qemu got sigabrt when using vpp in guest and dpdk for qemu
@ 2023-11-22  9:32 bugzilla-daemon
  2023-11-22  9:32 ` [Bug 218177] " bugzilla-daemon
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2023-11-22  9:32 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=218177

            Bug ID: 218177
           Summary: qemu got sigabrt when using vpp in guest and dpdk for
                    qemu
           Product: Virtualization
           Version: unspecified
          Hardware: Intel
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: kvm
          Assignee: virtualization_kvm@kernel-bugs.osdl.org
          Reporter: zhang.lei.fly@gmail.com
        Regression: No

I am testing vpp in qemu guest. and the guest is using dpdk interface provided
by dpdk.

when i set the interface up in vpp, the qemu is crashed



after doing some deep debug, this is happend in the `setup_routing_entry`
function


```
static int setup_routing_entry(struct kvm *kvm,
                               struct kvm_irq_routing_table *rt,
                               struct kvm_kernel_irq_routing_entry *e,
                               const struct kvm_irq_routing_entry *ue)
{
        struct kvm_kernel_irq_routing_entry *ei;
        int r;
        u32 gsi = array_index_nospec(ue->gsi, KVM_MAX_IRQ_ROUTES);

        /*
         * Do not allow GSI to be mapped to the same irqchip more than once.
         * Allow only one to one mapping between GSI and non-irqchip routing.
         */
        hlist_for_each_entry(ei, &rt->map[gsi], link)
                if (ei->type != KVM_IRQ_ROUTING_IRQCHIP ||
                    ue->type != KVM_IRQ_ROUTING_IRQCHIP ||
                    ue->u.irqchip.irqchip == ei->irqchip.irqchip)
                        return -EINVAL;

```

the code run into `return -EINVAL` 

and the each field value is:

ei->type: 2, 
KVM_IRQ_ROUTING_IRQCHIP: 1,
ue->type: 1,
ue->u.irqchip.irqchip: 2 ,
ei->irqchip.irqchip: -18870272

i am not familiar with kernel, but i guess there maybe some bug here? 

Here is other informations

qemu-kvm version: qemu-kvm-7.2.0-14.el9
kernel:  4.18.0-477.27.1.el8.x86_64
ovs: 2.16.3
dpdk: 20.11.3

the qemu xml is attached

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 218177] qemu got sigabrt when using vpp in guest and dpdk for qemu
  2023-11-22  9:32 [Bug 218177] New: qemu got sigabrt when using vpp in guest and dpdk for qemu bugzilla-daemon
@ 2023-11-22  9:32 ` bugzilla-daemon
  2023-11-23  1:31 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2023-11-22  9:32 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=218177

--- Comment #1 from Jeffrey zhang (zhang.lei.fly@gmail.com) ---
Created attachment 305459
  --> https://bugzilla.kernel.org/attachment.cgi?id=305459&action=edit
qemu instance xml

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 218177] qemu got sigabrt when using vpp in guest and dpdk for qemu
  2023-11-22  9:32 [Bug 218177] New: qemu got sigabrt when using vpp in guest and dpdk for qemu bugzilla-daemon
  2023-11-22  9:32 ` [Bug 218177] " bugzilla-daemon
@ 2023-11-23  1:31 ` bugzilla-daemon
  2023-11-23  1:31 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2023-11-23  1:31 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=218177

--- Comment #2 from Jeffrey zhang (zhang.lei.fly@gmail.com) ---
I change the debug printk to print %s rather than %d, here is the field values

        hlist_for_each_entry(ei, &rt->map[gsi], link)
                if (ei->type != KVM_IRQ_ROUTING_IRQCHIP ||
                    ue->type != KVM_IRQ_ROUTING_IRQCHIP ||
                    ue->u.irqchip.irqchip == ei->irqchip.irqchip){
                        printk("ei->type: %u, KVM_IRQ_ROUTING_IRQCHIP: %u,
ue->type: %u, ue->u.irqchip.irqchip: %u , ei->irqchip.irqchip: %u",  ei->type,
KVM_IRQ_ROUTING_IRQCHIP , ue->type, ue->u.irqchip.irqchip ,
ei->irqchip.irqchip);
                        // return -EINVAL;
        }



[Thu Nov 23 09:29:10 2023] ei->type: 2, KVM_IRQ_ROUTING_IRQCHIP: 1, ue->type:
1, ue->u.irqchip.irqchip: 2 , ei->irqchip.irqchip: 4276097024
[Thu Nov 23 09:29:10 2023] ei->type: 2, KVM_IRQ_ROUTING_IRQCHIP: 1, ue->type:
1, ue->u.irqchip.irqchip: 2 , ei->irqchip.irqchip: 4276097024


I also tried to just ignore the return -EINVAL, seem it works well.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 218177] qemu got sigabrt when using vpp in guest and dpdk for qemu
  2023-11-22  9:32 [Bug 218177] New: qemu got sigabrt when using vpp in guest and dpdk for qemu bugzilla-daemon
  2023-11-22  9:32 ` [Bug 218177] " bugzilla-daemon
  2023-11-23  1:31 ` bugzilla-daemon
@ 2023-11-23  1:31 ` bugzilla-daemon
  2023-11-23  3:38 ` bugzilla-daemon
  2023-11-23  6:09 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2023-11-23  1:31 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=218177

--- Comment #3 from Jeffrey zhang (zhang.lei.fly@gmail.com) ---
I change the debug printk to print %s rather than %d, here is the field values

        hlist_for_each_entry(ei, &rt->map[gsi], link)
                if (ei->type != KVM_IRQ_ROUTING_IRQCHIP ||
                    ue->type != KVM_IRQ_ROUTING_IRQCHIP ||
                    ue->u.irqchip.irqchip == ei->irqchip.irqchip){
                        printk("ei->type: %u, KVM_IRQ_ROUTING_IRQCHIP: %u,
ue->type: %u, ue->u.irqchip.irqchip: %u , ei->irqchip.irqchip: %u",  ei->type,
KVM_IRQ_ROUTING_IRQCHIP , ue->type, ue->u.irqchip.irqchip ,
ei->irqchip.irqchip);
                        // return -EINVAL;
        }



[Thu Nov 23 09:29:10 2023] ei->type: 2, KVM_IRQ_ROUTING_IRQCHIP: 1, ue->type:
1, ue->u.irqchip.irqchip: 2 , ei->irqchip.irqchip: 4276097024
[Thu Nov 23 09:29:10 2023] ei->type: 2, KVM_IRQ_ROUTING_IRQCHIP: 1, ue->type:
1, ue->u.irqchip.irqchip: 2 , ei->irqchip.irqchip: 4276097024


I also tried to just ignore the return -EINVAL, seem it works well.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 218177] qemu got sigabrt when using vpp in guest and dpdk for qemu
  2023-11-22  9:32 [Bug 218177] New: qemu got sigabrt when using vpp in guest and dpdk for qemu bugzilla-daemon
                   ` (2 preceding siblings ...)
  2023-11-23  1:31 ` bugzilla-daemon
@ 2023-11-23  3:38 ` bugzilla-daemon
  2023-11-23  6:09 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2023-11-23  3:38 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=218177

--- Comment #4 from Jeffrey zhang (zhang.lei.fly@gmail.com) ---
Guest os version:

OS: Ubuntu 22.04.3 LTS
Kernel: 5.15.0-86-generic
vpp: 22.06.0-6~g1513b381d~b23

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

* [Bug 218177] qemu got sigabrt when using vpp in guest and dpdk for qemu
  2023-11-22  9:32 [Bug 218177] New: qemu got sigabrt when using vpp in guest and dpdk for qemu bugzilla-daemon
                   ` (3 preceding siblings ...)
  2023-11-23  3:38 ` bugzilla-daemon
@ 2023-11-23  6:09 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2023-11-23  6:09 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=218177

--- Comment #5 from Jeffrey zhang (zhang.lei.fly@gmail.com) ---
i also file a bug in qemu site:
https://gitlab.com/qemu-project/qemu/-/issues/1999

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

end of thread, other threads:[~2023-11-23  6:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22  9:32 [Bug 218177] New: qemu got sigabrt when using vpp in guest and dpdk for qemu bugzilla-daemon
2023-11-22  9:32 ` [Bug 218177] " bugzilla-daemon
2023-11-23  1:31 ` bugzilla-daemon
2023-11-23  1:31 ` bugzilla-daemon
2023-11-23  3:38 ` bugzilla-daemon
2023-11-23  6:09 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).