[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V4 4/7] CAN bus Kvaser PCI CAN-S (single SJA1000
From: |
Pavel Pisa |
Subject: |
Re: [Qemu-devel] [PATCH V4 4/7] CAN bus Kvaser PCI CAN-S (single SJA1000 channel) emulation added. |
Date: |
Tue, 6 Mar 2018 21:52:08 +0100 |
User-agent: |
KMail/1.9.10 (enterprise35 0.20100827.1168748) |
Hello Thomas,
thanks for report but I at this time I am and
can be some time in condition which does not allow
me to access e-mail and normal work
On Tuesday 06 of March 2018 16:29:19 Thomas Huth wrote:
> On 14.01.2018 21:14, address@hidden wrote:
> > From: Pavel Pisa <address@hidden>
> >
> > Signed-off-by: Pavel Pisa <address@hidden>
> > ---
> > default-configs/pci.mak | 1 +
> > hw/can/Makefile.objs | 1 +
> > hw/can/can_kvaser_pci.c | 375
> > ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 377
> > insertions(+)
> > create mode 100644 hw/can/can_kvaser_pci.c
>
> Hi,
>
> the kvaser_pci device introduced a new way to crash QEMU, e.g.:
>
> mips64el-softmmu/qemu-system-mips64el -M malta,accel=qtest \
> -device kvaser_pci
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000555555a6e2ec in can_bus_insert_client (bus=0x0,
> address@hidden) at
> /home/thuth/devel/qemu/net/can/can_core.c:50
> 50 QTAILQ_INSERT_TAIL(&bus->clients, client, next);
The reason is that parameters canbus0 and canbus1 are required.
-object can-bus,id=canbus0 \
-device kvaser_pci,canbus0=canbus0
This could be be fast fix but plead somebody else to send regular
patch.
--- a/net/can/can_host.c
+++ b/net/can/can_host.c
@@ -57,6 +57,10 @@ static void can_host_connect(CanHostState *ch, Error **errp)
return;
}
+ if (ch->bus_client == NULL) {
+ error_setg(errp, "bus is not specified for given device.");
+ return;
+ }
can_bus_insert_client(ch->bus, &ch->bus_client);
}
My personal opinion is to create bus on
Best wishes,
Pavel Pisa