[PATCH v4 4/4] wdt_z069: Add support for MEN 16z069 Watchdog

2023-04-18 Thread Johannes Thumshirn
Add 16z069 Watchdog over MEN Chameleon BUS emulation. Signed-off-by: Johannes Thumshirn --- hw/watchdog/Kconfig | 5 + hw/watchdog/meson.build | 1 + hw/watchdog/trace-events | 6 ++ hw/watchdog/wdt_z069.c | 207 +++ 4 files changed, 219

[PATCH v4 1/4] Add MEN Chameleon Bus emulation

2023-04-18 Thread Johannes Thumshirn
The MEN Chameleon Bus (MCB) is an on-chip bus system exposing IP Cores of an FPGA to a outside bus system like PCIe. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn --- MAINTAINERS | 6 ++ hw/Kconfig | 1 + hw/mcb/Kconfig | 2 + hw/mcb/mcb.c

[PATCH v4 2/4] Add MEN Chameleon Bus via PCI carrier

2023-04-18 Thread Johannes Thumshirn
Add PCI based MEN Chameleon Bus carrier emulation. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn --- hw/mcb/Kconfig | 6 + hw/mcb/mcb-pci.c| 298 hw/mcb/meson.build | 1 + hw/mcb/trace-events | 4 + hw/mcb/trace.h

[PATCH v4 0/4] Add emulation of MEN Chameleon Hardware

2023-04-18 Thread Johannes Thumshirn
MCB and a watchdog timer. Changes since v2: - Converted DPRINTF() to tracing infrastructure again (Alistair) Changes since v2: - Adjusted license to GPL 2 or later (Peter) Changes since v1: - Converted DPRINTF() to tracing infrastructure (Alistair) - Fixed style issues (Alistair) Johannes

[PATCH v4 3/4] serial-mcb: Add serial via MEN chameleon bus

2023-04-18 Thread Johannes Thumshirn
Add MEN z125 UART over MEN Chameleon Bus emulation. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn --- hw/char/Kconfig | 6 +++ hw/char/meson.build | 1 + hw/char/serial-mcb.c | 115 +++ 3 files changed, 122 insertions(+) create

Re: [PATCH v3 4/4] wdt_z069: Add support for MEN 16z069 Watchdog

2023-04-17 Thread Johannes Thumshirn
mment from the previous versions about using traces instead of macro prints Of cause, you're right. I'm stupid, sorry.     Johannes

[PATCH v3 2/4] Add MEN Chameleon Bus via PCI carrier

2023-04-10 Thread Johannes Thumshirn
Add PCI based MEN Chameleon Bus carrier emulation. Signed-off-by: Johannes Thumshirn --- hw/mcb/Kconfig | 6 + hw/mcb/mcb-pci.c| 297 hw/mcb/meson.build | 1 + hw/mcb/trace-events | 3 + hw/mcb/trace.h | 1 + meson.build

[PATCH v3 3/4] serial-mcb: Add serial via MEN chameleon bus

2023-04-10 Thread Johannes Thumshirn
Add MEN z125 UART over MEN Chameleon Bus emulation. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn --- hw/char/Kconfig | 6 +++ hw/char/meson.build | 1 + hw/char/serial-mcb.c | 115 +++ 3 files changed, 122 insertions(+) create

[PATCH v3 1/4] Add MEN Chameleon Bus emulation

2023-04-10 Thread Johannes Thumshirn
The MEN Chameleon Bus (MCB) is an on-chip bus system exposing IP Cores of an FPGA to a outside bus system like PCIe. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn --- MAINTAINERS | 6 ++ hw/Kconfig | 1 + hw/mcb/Kconfig | 2 + hw/mcb/mcb.c

[PATCH v3 4/4] wdt_z069: Add support for MEN 16z069 Watchdog

2023-04-10 Thread Johannes Thumshirn
Add 16z069 Watchdog over MEN Chameleon BUS emulation. Signed-off-by: Johannes Thumshirn --- hw/watchdog/Kconfig | 5 + hw/watchdog/meson.build | 1 + hw/watchdog/wdt_z069.c | 218 3 files changed, 224 insertions(+) create mode 100644 hw

[PATCH v3 0/4] Add emulation of MEN Chameleon Hardware

2023-04-10 Thread Johannes Thumshirn
MCB and a watchdog timer. Changes since v2: - Adjusted license to GPL 2 or later (Peter) Changes since v1: - Converted DPRINTF() to tracing infrastructure (Alistair) - Fixed style issues (Alistair) Johannes Thumshirn (4): Add MEN Chameleon Bus emulation Add MEN Chameleon Bus via PCI carrier

Re: [PATCH v2 1/4] Add MEN Chameleon Bus emulation

2023-04-10 Thread Johannes Thumshirn
On 06/04/2023 12:01, Peter Maydell wrote: On Thu, 6 Apr 2023 at 10:34, Johannes Thumshirn wrote: The MEN Chameleon Bus (MCB) is an on-chip bus system exposing IP Cores of an FPGA to a outside bus system like PCIe. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn @@ -0,0 +1,182

[PATCH v2 4/4] wdt_z069: Add support for MEN 16z069 Watchdog

2023-04-06 Thread Johannes Thumshirn
Add 16z069 Watchdog over MEN Chameleon BUS emulation. Signed-off-by: Johannes Thumshirn --- hw/watchdog/Kconfig | 5 + hw/watchdog/meson.build | 1 + hw/watchdog/wdt_z069.c | 218 3 files changed, 224 insertions(+) create mode 100644 hw

[PATCH v2 3/4] serial-mcb: Add serial via MEN chameleon bus

2023-04-06 Thread Johannes Thumshirn
Add MEN z125 UART over MEN Chameleon Bus emulation. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn --- hw/char/Kconfig | 6 +++ hw/char/meson.build | 1 + hw/char/serial-mcb.c | 115 +++ 3 files changed, 122 insertions(+) create

[PATCH v2 0/4] Add emulation of MEN Chameleon Hardware

2023-04-06 Thread Johannes Thumshirn
MCB and a watchdog timer. Changes since v1: - Converted DPRINTF() to tracing infrastructure (Alistair) - Fixed style issues (Alistair) Johannes Thumshirn (4): Add MEN Chameleon Bus emulation Add MEN Chameleon Bus via PCI carrier serial-mcb: Add serial via MEN chameleon bus wdt_z069: Add

[PATCH v2 2/4] Add MEN Chameleon Bus via PCI carrier

2023-04-06 Thread Johannes Thumshirn
Add PCI based MEN Chameleon Bus carrier emulation. Signed-off-by: Johannes Thumshirn --- hw/mcb/Kconfig | 6 + hw/mcb/mcb-pci.c| 297 hw/mcb/meson.build | 1 + hw/mcb/trace-events | 3 + hw/mcb/trace.h | 1 + meson.build

[PATCH v2 1/4] Add MEN Chameleon Bus emulation

2023-04-06 Thread Johannes Thumshirn
The MEN Chameleon Bus (MCB) is an on-chip bus system exposing IP Cores of an FPGA to a outside bus system like PCIe. Acked-by: Alistair Francis Signed-off-by: Johannes Thumshirn --- MAINTAINERS | 6 ++ hw/Kconfig | 1 + hw/mcb/Kconfig | 2 + hw/mcb/mcb.c

[PATCH 3/4] serial-mcb: Add serial via MEN chameleon bus

2023-03-29 Thread Johannes Thumshirn
Add MEN z125 UART over MEN Chameleon Bus emulation. Signed-off-by: Johannes Thumshirn --- hw/char/Kconfig | 6 +++ hw/char/meson.build | 1 + hw/char/serial-mcb.c | 115 +++ 3 files changed, 122 insertions(+) create mode 100644 hw/char/serial

[PATCH 2/4] Add MEN Chameleon Bus via PCI carrier

2023-03-29 Thread Johannes Thumshirn
Add PCI based MEN Chameleon Bus carrier emulation. Signed-off-by: Johannes Thumshirn --- hw/mcb/Kconfig | 6 + hw/mcb/mcb-pci.c | 307 + hw/mcb/meson.build | 1 + 3 files changed, 314 insertions(+) create mode 100644 hw/mcb/mcb-pci.c diff

[PATCH 1/4] Add MEN Chameleon Bus emulation

2023-03-29 Thread Johannes Thumshirn
The MEN Chameleon Bus (MCB) is an on-chip bus system exposing IP Cores of an FPGA to a outside bus system like PCIe. Signed-off-by: Johannes Thumshirn --- MAINTAINERS | 6 ++ hw/Kconfig | 1 + hw/mcb/Kconfig | 2 + hw/mcb/mcb.c | 182

[PATCH 0/4] Add emulation of MEN Chameleon Hardware

2023-03-29 Thread Johannes Thumshirn
MCB and a watchdog timer. Johannes Thumshirn (4): Add MEN Chameleon Bus emulation Add MEN Chameleon Bus via PCI carrier serial-mcb: Add serial via MEN chameleon bus wdt_z069: Add support for MEN 16z069 Watchdog MAINTAINERS | 6 + hw/Kconfig | 1 + hw/char

[PATCH 4/4] wdt_z069: Add support for MEN 16z069 Watchdog

2023-03-29 Thread Johannes Thumshirn
Add 16z069 Watchdog over MEN Chameleon BUS emulation. Signed-off-by: Johannes Thumshirn --- hw/watchdog/Kconfig | 5 + hw/watchdog/meson.build | 1 + hw/watchdog/wdt_z069.c | 218 3 files changed, 224 insertions(+) create mode 100644 hw

[PATCH v1] kvm: unsigned datatype in ioctl wrapper

2021-09-01 Thread Johannes Stoelp
/show_bug.cgi?id=14362 Signed-off-by: Johannes Stoelp --- v1: - Changed ioctl request from 'unsigned' -> 'unsigned long' in kvm ioctl wrapper. v0: - Changed ioctl request from 'int' -> 'unsigned' in kvm ioctl wrapper. - L: https://lists.nongnu.org/archive/html/qemu-devel/2021-08/ms

Re: [PATCH v0] kvm: unsigned datatype in ioctl wrapper

2021-09-01 Thread Johannes S
would agree to 'unsigned long', in that case I can generate a new patch. And in theory if all libc implementations specify the ioctl request as 'int' we could go back to 'int'. Johannes

Re: [PATCH v0] kvm: unsigned datatype in ioctl wrapper

2021-08-30 Thread Johannes S
gt; # ignores the upper bits exactly because of possible sign confusion. Sounds like we are saved be the Linux Kernel here :) In my opinion we should use 'unsigned' data types here for the ioctl request in the ioctl wrappers or would you prefer to keep the ioctl wrapper definition as is today? What is you opinion? Thanks and best, Johannes

[PATCH v0] kvm: unsigned datatype in ioctl wrapper

2021-08-29 Thread Johannes Stoelp
From: johannst Ping. https://patchew.org/QEMU/20210805193950.514357-1-johannes.sto...@gmail.com/ https://lore.kernel.org/qemu-devel/20210805193950.514357-1-johannes.sto...@gmail.com/ Thanks and best, Johannes

[PATCH v0] kvm: unsigned datatype in ioctl wrapper

2021-08-13 Thread Johannes Stoelp
From: johannst Ping. https://patchew.org/QEMU/20210805193950.514357-1-johannes.sto...@gmail.com/ https://lore.kernel.org/qemu-devel/20210805193950.514357-1-johannes.sto...@gmail.com/ Thanks and best, Johannes

Re: [PATCH 0/4] block/vvfat: Fix leaks and out of bounds writes

2021-05-05 Thread Johannes Schindelin
Hi Philippe, On Fri, 30 Apr 2021, Philippe Mathieu-Daudé wrote: > The first 3 patches are trivial leak fixes, the last > one is a RFC since I have no clue about this code. > > Johannes, you wrote this 18 years ago, do you still > remember? =) I do remember writing them, but I

[Bug 1906180] Re: Keyboard keys get stuck

2021-02-28 Thread johannes
This might be less common in 5.2.0 but I have still had some strange issues with keyboard. ** Changed in: qemu Status: Expired => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906180

[Bug 1906948] Re: Enabling OpenGL for GUI doesn't work on old laptop

2021-02-28 Thread johannes
Still happens in 5.2.0 (Debian 1:5.2+dfsg-3~bpo10+1). Is this just due to hardware which is too old? ** Changed in: qemu Status: Expired => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1906180] Re: Keyboard keys get stuck

2020-12-21 Thread johannes
I've been testing this with SDL interface but haven't yet encountered this bug. So this might be specific to the GTK interface. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906180 Title:

[Bug 1906948] Re: Enabling OpenGL for GUI doesn't work on old laptop

2020-12-12 Thread johannes
I installed Qemu 5.0.0 from Debian Buster backports and I still get this error. qemu_gl_create_compile_shader: compile vertex error 0:2(10): error: GLSL ES 3.00 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES qemu_gl_create_compile_shader: compile fragment error 0:2(10):

[Bug 1906948] [NEW] Enabling OpenGL for GUI doesn't work on old laptop

2020-12-05 Thread johannes
Public bug reported: QEMU start command is: qemu-system-x86_64 -enable-kvm -m 2G -cpu host -smp 2 -cdrom ./linuxmint-20-mate-64bit.iso -boot d -vga virtio -soundhw hda -display gtk,gl=on and QEMU crashes immediately on startup and gives these error messages: qemu_gl_create_compile_shader:

[Bug 1906180] Re: Keyboard keys get stuck

2020-12-02 Thread johannes
I'm running it on local desktop. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906180 Title: Keyboard keys get stuck Status in QEMU: Incomplete Bug description: Keyboard keys get "stuck"

[Bug 1906180] Re: Keyboard keys get stuck

2020-12-01 Thread johannes
I've encountered this with GTK interface. I'll test if this occurs with SDL too. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906180 Title: Keyboard keys get stuck Status in QEMU: Incomplete

[Bug 1906185] [NEW] Guest display resolution cannot be changed when using certain graphics/interface combinations

2020-11-29 Thread johannes
Public bug reported: Guest display resolution cannot be changed with certain virtual graphics card (-vga) and interface (-display) combinations. For example, resolution changing doesn't work with the following QEMU start commands, it resets to the default resolution immediately: QXL with SDL

[Bug 1906184] [NEW] Lots of stuttering/crackling in guest sound

2020-11-29 Thread johannes
Public bug reported: When listening to music (e.g. with VLC) or watching Youtube on the guest, there's lots of stuttering and crackling in the sound. Tested with the following QEMU start commands: qemu-system-x86_64 -enable-kvm -m 6G -cpu host -smp 3 -cdrom

[Bug 1906181] [NEW] Mouse starts jumping wildly on guest desktop

2020-11-29 Thread johannes
Public bug reported: Sometimes mouse goes completely crazy and starts jumping around the guest desktop by itself and becomes completely unusable. This does not happen on every boot, only sometimes. It may be caused by some input combination but I haven't yet found any specific cause. It happens

[Bug 1906180] [NEW] Keyboard keys get stuck

2020-11-29 Thread johannes
Public bug reported: Keyboard keys get "stuck" quite often, on certain Linux guests at least, and start repeating themselves until another key is pressed. This is especially noticeable with key combinations like Ctrl+V for pasting. When it happens, you get the pasted text and

Re: [PATCH v5 0/6] small vhost changes and in-band notifications

2020-02-13 Thread Johannes Berg
On Thu, 2020-01-23 at 09:17 +0100, Johannes Berg wrote: > Hi, > > Here's a repost of all the patches I sent back in August, with the > in-band notifications rebased over the reset patch, so IDs have now > changed a bit. Ping? The patches still apply on top of latest qemu. I want

[PATCH v5 4/6] libvhost-user: handle NOFD flag in call/kick/err better

2020-01-23 Thread Johannes Berg
From: Johannes Berg The code here is odd, for example will it print out invalid file descriptor numbers that were never sent in the message. Clean that up a bit so it's actually possible to implement a device that uses polling. Signed-off-by: Johannes Berg --- contrib/libvhost-user/libvhost

[PATCH v5 6/6] libvhost-user: implement in-band notifications

2020-01-23 Thread Johannes Berg
From: Johannes Berg Add support for VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS, but as it's not desired by default, don't enable it unless the device implementation opts in by returning it from its protocol features callback. Note that I updated vu_set_vring_err_exec(), but didn't add any

[PATCH v5 5/6] docs: vhost-user: add in-band kick/call messages

2020-01-23 Thread Johannes Berg
From: Johannes Berg For good reason, vhost-user is currently built asynchronously, that way better performance can be obtained. However, for certain use cases such as simulation, this is problematic. Consider an event-based simulation in which both the device and CPU have scheduled according

[PATCH v5 0/6] small vhost changes and in-band notifications

2020-01-23 Thread Johannes Berg
collected reviewed-by's from the previous patches here. Let me know if I should make any further edits here or in follow-up patches. Thanks, johannes

[PATCH v5 3/6] libvhost-user-glib: use g_main_context_get_thread_default()

2020-01-23 Thread Johannes Berg
From: Johannes Berg If we use NULL, we just get the main program default mainloop here. Using g_main_context_get_thread_default() has basically the same effect, but it lets us start different devices in different threads with different mainloops, which can be useful. Reviewed-by: Stefan

[PATCH v5 2/6] libvhost-user-glib: fix VugDev main fd cleanup

2020-01-23 Thread Johannes Berg
From: Johannes Berg If you try to make a device implementation that can handle multiple connections and allow disconnections (which requires overriding the VHOST_USER_NONE handling), then glib will warn that we remove a src while it's still on the mainloop, and will poll() an FD that doesn't

[PATCH v5 1/6] libvhost-user: implement VHOST_USER_PROTOCOL_F_REPLY_ACK

2020-01-23 Thread Johannes Berg
From: Johannes Berg This is really simple, since we know whether a response is already requested or not, so we can just send a (successful) response when there isn't one already. Given that, it's not all _that_ useful but the master can at least be sure the message was processed, and we can

Re: [Qemu-devel] [RFC] contrib: add vhost-user-sim

2019-10-09 Thread Johannes Berg
ith a (hand- written) recursive mainloop as a single thread, and it works way better. One of these days I need to sit down and port that to be independent of my testing framework, so I can show the code ... johannes

Re: [Qemu-devel] [RFC] contrib: add vhost-user-sim

2019-09-23 Thread Johannes Berg
lly seems to reports an FD as readable when it's not, so I even put them into non-blocking mode :( The second is that I can't seem to understand how to do recursive mainloops. To really do this *well*, it should remain a single-threaded application, but would need a hook like run_mainloop_until_fd_readable(vdev->call_fd) inside the libvhost-user.c code, and that's a bit ugly ... if I even could figure out how to implement that in glib. johannes

Re: [Qemu-devel] [PATCH] libvhost-user: handle NOFD flag in call/kick/err better

2019-09-18 Thread Johannes Berg
u_set_vring_err_exec() would indeed then not be necessary, but in vu_set_vring_call_exec() we should still avoid the eventfd_write() if it's going to get -1. So, yeah - could be a bit simpler there. I'd say being explicit here is easier to understand and thus nicer, but your (or Michael's I guess?) call. johannes

[Qemu-devel] [PATCH 2/2] libvhost-user: implement in-band notifications

2019-09-17 Thread Johannes Berg
From: Johannes Berg Add support for VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS, but as it's not desired by default, don't enable it unless the device implementation opts in by returning it from its protocol features callback. Note that I updated vu_set_vring_err_exec(), but didn't add any

[Qemu-devel] [PATCH 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-17 Thread Johannes Berg
From: Johannes Berg For good reason, vhost-user is currently built asynchronously, that way better performance can be obtained. However, for certain use cases such as simulation, this is problematic. Consider an event-based simulation in which both the device and CPU have scheduled according

[Qemu-devel] [RFC] contrib: add vhost-user-sim

2019-09-17 Thread Johannes Berg
From: Johannes Berg This implements * the UM protocol to access the simulation calendar, * the underlying simulation calendar, and * a very trivial simulated network as a vhost-user virtio_net device. Currently the code is a bit rough and mostly an example, things such as the network

[Qemu-devel] [PATCH] libvhost-user: handle NOFD flag in call/kick/err better

2019-09-17 Thread Johannes Berg
From: Johannes Berg The code here is odd, for example will it print out invalid file descriptor numbers that were never sent in the message. Clean that up a bit so it's actually possible to implement a device that uses polling. Signed-off-by: Johannes Berg --- contrib/libvhost-user/libvhost

[Qemu-devel] [PATCH] libvhost-user-glib: use g_main_context_get_thread_default()

2019-09-17 Thread Johannes Berg
From: Johannes Berg If we use NULL, we just get the main program default mainloop here. Using g_main_context_get_thread_default() has basically the same effect, but it lets us start different devices in different threads with different mainloops, which can be useful. Signed-off-by: Johannes

Re: [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-17 Thread Johannes Berg
ting/stopping ring needs to be updated, teaching it > that ring is started after it gets a kick. Makes sense, mostly I just need to actually *implement* that. johannes

Re: [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-16 Thread Johannes Berg
for simulation work, and in that case no polling will be doable. If you do think it's important to not make the two mutually exclusive, how would you prefer to have this handled? With a new flag, e.g. in bit 9, indicating "use inband signalling instead of polling or eventfd"? Thanks, johannes

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-12 Thread Johannes Berg
e's a way to have the device make the connection to a listening unix domain socket, as implied by the spec? I cannot find evidence for such a mode in any code... johannes

Re: [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-12 Thread Johannes Berg
No, the calls (or more specifically the REPLY_ACK to them) are really in simulation to only acknowledge the interrupt (kick/call) signal has been received and accounted for on the simulation calendar, the actual processing happens when the calendar event is scheduled. johannes

Re: [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Johannes Berg
es. But I think enough words have been expended on explaining it already, if I may kindly ask you to read the discussions with Stefan and Michael here: https://lore.kernel.org/qemu-devel/20190902121233.13382-1-johan...@sipsolutions.net/ Thanks, johannes

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Johannes Berg
On Wed, 2019-09-11 at 17:36 +0200, Johannes Berg wrote: > On Wed, 2019-09-11 at 17:31 +0200, Stefan Hajnoczi wrote: > > > > +``VHOST_USER_VQ_CALL`` It should also be VRING, not VQ, but I did indeed fix that in v2 already along with the CALL<->KICK inversion. So I guess I

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Johannes Berg
message types > > --- > > > > @@ -1246,6 +1265,19 @@ Slave message types > >``VHOST_USER_PROTOCOL_F_HOST_NOTIFIER`` protocol feature has been > >successfully negotiated. > > > > +``VHOST_USER_VQ_KICK`` > > s/KICK/CALL/ Indeed. Wait, that should be VHOST_USER_SLAVE_VQ_CALL, actually. Maybe I already did fix that in v2? johannes

Re: [Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Johannes Berg
_PROTOCOL_F_IN_BAND_NOTIFICATIONS`` protocol > > + feature has been successfully negotiated, this message may be > > + submitted by the slave to indicate that a buffer was used from > > + the vring instead of signalling this using the vring's kick FD or > > + having the master relying on polling. > > call FD? I confused this far too many times and thought I got it right finally, but yes, you're right. johannes

[Qemu-devel] [RFC v2 2/2] libvhost-user: implement in-band notifications

2019-09-11 Thread Johannes Berg
From: Johannes Berg Add support for VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS, but as it's not desired by default, don't enable it unless the device implementation opts in by returning it from its protocol features callback. Note that I updated vu_set_vring_err_exec(), but didn't add any

[Qemu-devel] [RFC v2 1/2] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Johannes Berg
From: Johannes Berg For good reason, vhost-user is currently built asynchronously, that way better performance can be obtained. However, for certain use cases such as simulation, this is problematic. Consider an event-based simulation in which both the device and CPU have scheduled according

[Qemu-devel] [RFC v2 0/2] vhost-user: in-band notifications

2019-09-11 Thread Johannes Berg
Here's a respin of both the docs and the code, hopefully addressing most of the requests from review. Let me know if I've missed anything or not done it in the way you thought. Thanks, johannes

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-11 Thread Johannes Berg
other errors probably should also close the FD? johannes

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-11 Thread Johannes Berg
On Wed, 2019-09-11 at 09:35 +0200, Stefan Hajnoczi wrote: > On Tue, Sep 10, 2019 at 05:14:36PM +0200, Johannes Berg wrote: > > On Tue, 2019-09-10 at 17:03 +0200, Stefan Hajnoczi wrote: > > > > Now, this means that the CPU (that's part of the simulation) has to > > >

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-10 Thread Johannes Berg
On Mon, 2019-09-09 at 15:50 +0200, Johannes Berg wrote: > > We can document how to behave in case of inconsistent protocol features, > > yes. > > OK. Coming back to this, I was just looking at it. How/where would you like to see this done? There isn't really any

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-10 Thread Johannes Berg
On Tue, 2019-09-10 at 11:33 -0400, Michael S. Tsirkin wrote: > On Tue, Sep 10, 2019 at 05:14:36PM +0200, Johannes Berg wrote: > > Is any of you familiar with the process of getting a virtio device ID > > assigned, and if so, do you think it'd be feasible? Without that, it

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-10 Thread Johannes Berg
ich is an optimization to not have to talk to the calendar all the time. Is any of you familiar with the process of getting a virtio device ID assigned, and if so, do you think it'd be feasible? Without that, it'd probably be difficult to upstream the patch to support this protocol to user-mode Linux. Thanks, johannes

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-09 Thread Johannes Berg
here are quite a few papers proposing such simulation systems, I only found the VMSimInt one publishing their code, but even that is some hacks on top of qemu 1.6.0... johannes

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-09 Thread Johannes Berg
On Mon, 2019-09-09 at 11:45 -0400, Michael S. Tsirkin wrote: > On Mon, Sep 09, 2019 at 05:34:13PM +0200, Johannes Berg wrote: > > On Mon, 2019-09-09 at 17:26 +0200, Johannes Berg wrote: > > > Maybe instead we should just add a "VHOST_USER_REPLY_ERROR" bit (e.g. > &g

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-09 Thread Johannes Berg
On Mon, 2019-09-09 at 17:26 +0200, Johannes Berg wrote: > > Maybe instead we should just add a "VHOST_USER_REPLY_ERROR" bit (e.g. > bit 4 after NEED_REPLY). Qemu in vhost_user_read_header() validates that > it received REPLY_MASK | VERSION, so it would reject the m

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-09 Thread Johannes Berg
num with possible values, then I'd probably prefer an 8-byte status since that's the way everything works now, but I don't really care much either way. johannes

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-09 Thread Johannes Berg
hing else. > > Exactly for this reason :) :) > > Unless you also wanted to write into the spec that F_KICK_CALL_MSGS > > absolutely *requires* F_REPLY_ACK, > > yep Sure, I'm fine with that. > We can document how to behave in case of inconsistent protocol features, > yes. OK. johannes

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-09 Thread Johannes Berg
less as libvhost-user is more of a sample implementation than anything else. Unless you also wanted to write into the spec that F_KICK_CALL_MSGS absolutely *requires* F_REPLY_ACK, and add some text that tells a device how to behave when F_KICK_CALL_MSGS is negotiated without F_REPLY_ACK? johannes

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-09 Thread Johannes Berg
so I'll post new patches in a few days or so. johannes

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-06 Thread Johannes Berg
than everyone having their own local hacks for everything, like e.g. the VMSimInt paper(**). But again, like I said, no hard feelings if you think such simulation has no place in upstream vhost-user. (**) I put a copy of their qemu changes on top of 1.6.0 here: https://p.sipsolutions.net/af9a68ded948c07e.txt johannes

Re: [Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-06 Thread Johannes Berg
Hi, On Fri, 2019-09-06 at 10:22 -0400, Michael S. Tsirkin wrote: > On Fri, Sep 06, 2019 at 03:13:50PM +0300, Johannes Berg wrote: > > From: Johannes Berg > > > > Signed-off-by: Johannes Berg > > a bit more content here about the motivation for this? Heh, right, def

[Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-06 Thread Johannes Berg
From: Johannes Berg Signed-off-by: Johannes Berg --- contrib/libvhost-user/libvhost-user.c | 61 +++ contrib/libvhost-user/libvhost-user.h | 3 ++ 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-05 Thread Johannes Berg
entation now for my simulation environment, and I guess I can keep that private etc. but if there's interest I can submit an (optional) implementation of this for libvhost-user too, I think. johannes

[Qemu-devel] [PATCH] libvhost-user: introduce and use vu_has_protocol_feature()

2019-09-04 Thread Johannes Berg
From: Johannes Berg This simplifies the various has_feature() checks, we already have vu_has_feature() but it checks features, not protocol features. Signed-off-by: Johannes Berg --- contrib/libvhost-user/libvhost-user.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[Qemu-devel] [PATCH v2] libvhost-user: fix SLAVE_SEND_FD handling

2019-09-03 Thread Johannes Berg
From: Johannes Berg It doesn't look like this could possibly work properly since VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD is defined to 10, but the dev->protocol_features has a bitmap. I suppose the peer this was tested with also supported VHOST_USER_PROTOCOL_F_LOG_SHMFD, in which case the test wo

[Qemu-devel] [PATCH] libvhost-user: fix SLAVE_SEND_FD handling

2019-09-03 Thread Johannes Berg
From: Johannes Berg It doesn't look like this could possibly work properly since VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD is defined to 10, but the dev->protocol_features has a bitmap. I suppose the peer this was tested with also supported VHOST_USER_PROTOCOL_F_LOG_SHMFD, in which case the test wo

[Qemu-devel] [PATCH] libvhost-user: implement VHOST_USER_PROTOCOL_F_REPLY_ACK

2019-09-03 Thread Johannes Berg
From: Johannes Berg This is really simple, since we know whether a response is already requested or not, so we can just send a (successful) response when there isn't one already. Given that, it's not all _that_ useful but the master can at least be sure the message was processed, and we can

[Qemu-devel] [RFC] vhost-user simulation extension

2019-09-02 Thread Johannes Berg
lendar, the latter of which is necessary anyway. Hopefully I've managed to explain what I'm trying to do here, questions or suggestions are always welcome :-) johannes [1] http://www.ikr.uni-stuttgart.de/INDSimLib/ [2] https://patchwork.ozlabs.org/patch/1140033/ [3] http://www.ikr.uni-s

[Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-02 Thread Johannes Berg
From: Johannes Berg For good reason, vhost-user is currently built asynchronously, that way better performance can be obtained. However, for certain use cases such as simulation, this is problematic. Consider an event-based simulation in which both the device and CPU have are scheduled

[Qemu-devel] [PATCH v4] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-28 Thread Johannes Berg
From: Johannes Berg If you try to make a device implementation that can handle multiple connections and allow disconnections (which requires overriding the VHOST_USER_NONE handling), then glib will warn that we remove a src while it's still on the mainloop, and will poll() an FD that doesn't

Re: [Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-28 Thread Johannes Berg
free to add a second commit to fix that too. I looked at it briefly but couldn't unwind the paths, sorry. johannes

[Qemu-devel] [PATCH v3] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-27 Thread Johannes Berg
From: Johannes Berg If you try to make a device implementation that can handle multiple connections and allow disconnections (which requires overriding the VHOST_USER_NONE handling), then glib will warn that we remove a src while it's still on the mainloop, and will poll() an FD that doesn't

[Qemu-devel] [PATCH v2] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-27 Thread Johannes Berg
From: Johannes Berg If you try to make a device implementation that can handle multiple connections and allow disconnections (which requires overriding the VHOST_USER_NONE handling), then glib will warn that we remove a src while it's still on the mainloop, and will poll() an FD that doesn't

Re: [Qemu-devel] [PATCH] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-27 Thread Johannes Berg
Hi, > What other problems? Sure we need the caller to unref. Don't recall, and now I can't reproduce it, sorry. > > > Imho, we should change the behaviour of the function to return a ref > > > source. > > > > Which "the function" do you mean? > > The vug_source_new() function. [...] > Sure we

Re: [Qemu-devel] [PATCH] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-27 Thread Johannes Berg
On Tue, 2019-08-27 at 14:47 +0400, Marc-André Lureau wrote: > Hi > > On Tue, Aug 27, 2019 at 12:32 PM Johannes Berg > wrote: > > From: Johannes Berg > > > > If you try to make a device implementation that can handle multiple > > connections and allow disco

[Qemu-devel] [PATCH] libvhost-user-glib: fix VugDev main fd cleanup

2019-08-27 Thread Johannes Berg
From: Johannes Berg If you try to make a device implementation that can handle multiple connections and allow disconnections (which requires overriding the VHOST_USER_NONE handling), then glib will warn that we remove a src while it's still on the mainloop, and will poll() an FD that doesn't

Re: [Qemu-devel] custom virt-io support (in user-mode-linux)

2019-05-24 Thread Johannes Berg
t-user-blk and vhost-user-scsi examples in the contrib/ directory. Awesome, thanks! johannes

Re: [Qemu-devel] custom virt-io support (in user-mode-linux)

2019-05-23 Thread Johannes Berg
I guess there might be better documentation on the ioctl interfaces? Do you know if there's a sample client/server somewhere? I guess we should implement the server in UML like it is in QEMU (unless we can figure out how to virtualize the time with HPET or something in QEMU) and then have our client and kernel driver for it... Thanks a lot! johannes

Re: [Qemu-devel] custom virt-io support (in user-mode-linux)

2019-05-22 Thread Johannes Berg
all out to some RPC that contains the real model. Now that I thought about it further, I guess my question boils down to "did anyone ever think about doing RPC for Virt-IO instead of putting the entire device model into the hypervisor/emulator/...". johannes

[Qemu-devel] custom virt-io support (in user-mode-linux)

2019-05-22 Thread Johannes Berg
)? Thanks, johannes [1] Actually, I've considered using qemu, but it doesn't have virtualized time and doesn't seem to support TSC virtualization. I guess I could remove TSC from the guest CPU and add a virtualized HPET, but I've yet to convince myself this works - on UML I made virtual time

[Qemu-devel] [RESEND PATCH v2 3/4] serial-mcb: Add serial via MEN chameleon bus

2018-09-10 Thread Johannes Thumshirn
Add MEN z125 UART over MEN Chameleon Bus emulation. Signed-off-by: Johannes Thumshirn --- hw/char/Makefile.objs | 1 + hw/char/serial-mcb.c | 100 ++ 2 files changed, 101 insertions(+) create mode 100644 hw/char/serial-mcb.c diff --git a/hw

  1   2   3   4   5   >