[Qemu-devel] [PATCH] rng-random: implement request queue

2016-01-22 Thread Ladi Prosek
layed completion of reads from virtio-rng, i.e. a read is completed only after another read is issued. This patch adds an internal queue of requests, analogous to what rng-egd uses, to make sure that requests and responses are balanced and correctly ordered. Signed-off-by: Ladi Prosek --- backend

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-02-03 Thread Ladi Prosek
Hi Amit, - Original Message - > Hi Ladi, > > Adding Pankaj to CC, he too looked at this recently. > > On (Fri) 22 Jan 2016 [13:19:58], Ladi Prosek wrote: > > If the guest adds a buffer to the virtio queue while another buffer > > is still pending and hasn&#x

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-02-04 Thread Ladi Prosek
- Original Message - > > > On 03/02/2016 13:36, Amit Shah wrote: > > ... and this can lead to breaking migration (the queue of requests on > > the host needs to be migrated, else the new host will have no idea of > > the queue). > > It is already migrated as part of virtio_rng_save's cal

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-02-04 Thread Ladi Prosek
Hi Pankaj, - Original Message - > > Hi Ladi, > > I think this is fine if we have multiple requests from Guests and > depending on entropy pool available we can honour individual requests > and return with the entropy. > > Just one point I have is, Suppose we have multiple requests from

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-02-04 Thread Ladi Prosek
- Original Message - > - Original Message - > > > > > > On 03/02/2016 13:36, Amit Shah wrote: > > > ... and this can lead to breaking migration (the queue of requests on > > > the host needs to be migrated, else the new host will have no idea of > > > the queue). > > > > It is al

[Qemu-devel] [PATCH v2 0/4] rng-random: implement request queue

2016-02-10 Thread Ladi Prosek
As suggested by Paolo, I have moved the RngRequest implementation up to the RngBackend parent class and made both child classes use it. Apart from the refactoring, the only functional change compared to v1 is the use of heap instead of stack allocation for the read buffer in rng-random. The parent

[Qemu-devel] [PATCH v2 2/4] rng: move request queue from RngEgd to RngBackend

2016-02-10 Thread Ladi Prosek
The 'requests' field now lives in the RngBackend parent class. There are no functional changes in this commit. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 28 +--- include/sysemu/rng.h | 11 +++ 2 files changed, 20 insertions(+), 19 deletion

[Qemu-devel] [PATCH v2 1/4] rng: remove the unused request cancellation code

2016-02-10 Thread Ladi Prosek
rng_backend_cancel_requests has no callers and none of the code deleted in this commit ever runs. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 12 backends/rng.c | 9 - include/sysemu/rng.h | 11 --- 3 files changed, 32 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-02-10 Thread Ladi Prosek
delayed completion of reads from virtio-rng, i.e. a read is completed only after another read is issued. Signed-off-by: Ladi Prosek --- backends/rng-egd.c| 16 ++-- backends/rng-random.c | 43 +++ backends/rng.c| 13

[Qemu-devel] [PATCH v2 3/4] rng: move request queue cleanup from RngEgd to RngBackend

2016-02-10 Thread Ladi Prosek
RngBackend is now in charge of cleaning up the linked list on instance finalization. It also exposes a function to finalize individual RngRequest instances, called by its child classes. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 25 + backends/rng.c | 32

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-02-10 Thread Ladi Prosek
> > > On 10/02/2016 16:53, Ladi Prosek wrote: > > +req->size = size; > > +req->receive_entropy = receive_entropy; > > +req->opaque = opaque; > > +req->data = g_malloc(req->size); > > + > > +

[Qemu-devel] [PATCH] balloon: fix segfault and harden the stats queue

2016-03-01 Thread Ladi Prosek
admittedly the device assumed too much about the stats queue protocol even before that commit. This commit adds a few more checks and ensures that the one stats buffer gets deallocated on device reset. Signed-off-by: Ladi Prosek --- hw/virtio/virtio-balloon.c | 24 ++-- 1 file

Re: [Qemu-devel] [PATCH v2 3/4] rng: move request queue cleanup from RngEgd to RngBackend

2016-03-02 Thread Ladi Prosek
On Wed, Mar 2, 2016 at 8:15 AM, Amit Shah wrote: > On (Wed) 10 Feb 2016 [16:53:24], Ladi Prosek wrote: >> RngBackend is now in charge of cleaning up the linked list on >> instance finalization. It also exposes a function to finalize >> individual RngRequest instances, called

Re: [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random

2016-03-02 Thread Ladi Prosek
On Wed, Mar 2, 2016 at 10:56 AM, Amit Shah wrote: > On (Wed) 10 Feb 2016 [16:53:25], Ladi Prosek wrote: >> Requests are now created in the RngBackend parent class and the >> code path is shared by both rng-egd and rng-random. >> >> This commit fixes the rng-random imp

[Qemu-devel] [PATCH] add 1394 OHCI device

2016-03-02 Thread Ladi Prosek
This patch adds 1394 (FireWire) virtual device support to QEMU. Signed-off-by: Ladi Prosek --- I am resurrecting this patch sent to the list by Itamar last year. My motivation is remote Windows kernel debugging - probably the same reason why this work was started in the first place. I have not

[Qemu-devel] [PATCH v3 0/4] rng-random: implement request queue

2016-03-03 Thread Ladi Prosek
As suggested by Paolo, I have moved the RngRequest implementation up to the RngBackend parent class and made both child classes use it. Apart from the refactoring, the only functional change compared to v1 is the use of heap instead of stack allocation for the read buffer in rng-random. The parent

[Qemu-devel] [PATCH v3 2/4] rng: move request queue from RngEgd to RngBackend

2016-03-03 Thread Ladi Prosek
The 'requests' field now lives in the RngBackend parent class. There are no functional changes in this commit. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 28 +--- include/sysemu/rng.h | 11 +++ 2 files changed, 20 insertions(+), 19 deletion

[Qemu-devel] [PATCH v3 1/4] rng: remove the unused request cancellation code

2016-03-03 Thread Ladi Prosek
rng_backend_cancel_requests had no callers and none of the code deleted in this commit ever ran. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 12 backends/rng.c | 9 - include/sysemu/rng.h | 11 --- 3 files changed, 32 deletions(-) diff --git a

[Qemu-devel] [PATCH v3 3/4] rng: move request queue cleanup from RngEgd to RngBackend

2016-03-03 Thread Ladi Prosek
RngBackend is now in charge of cleaning up the linked list on instance finalization. It also exposes a function to finalize individual RngRequest instances, called by its child classes. Signed-off-by: Ladi Prosek --- backends/rng-egd.c | 25 + backends/rng.c | 32

[Qemu-devel] [PATCH v3 4/4] rng: add request queue support to rng-random

2016-03-03 Thread Ladi Prosek
completion of reads from virtio-rng, i.e. a read was completed only after another read was issued. By switching rng-random to use the same request queue as rng-egd, the unsafe stack-based allocation of the entropy buffer is eliminated and replaced with g_malloc. Signed-off-by: Ladi Prosek

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-03-03 Thread Ladi Prosek
On Thu, Mar 3, 2016 at 6:05 AM, Amit Shah wrote: > On (Thu) 04 Feb 2016 [13:07:35], Ladi Prosek wrote: >> - Original Message - >> > - Original Message - >> > > >> > > >> > > On 03/02/2016 13:36, Amit Shah wrote: >> >

[Qemu-devel] [PATCH] virtio-rng: ask for more data if queue is not fully drained

2016-03-03 Thread Ladi Prosek
as a little bit of optimization. Signed-off-by: Ladi Prosek --- This commit has a logical dependency on [PATCH v3 0/4] rng-random: implement request queue which removes a synchronous invocation of the receive_func callback in rng_random_request_entropy, thereby eliminating the risk of infinite

[Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-03 Thread Ladi Prosek
QSIMPLEQ supports appending to tail in O(1) and is intrusive so it doesn't require extra memory allocations for the bookkeeping data. Suggested-by: Paolo Bonzini Signed-off-by: Ladi Prosek --- backends/rng-egd.c| 9 - backends/rng-random.c | 6 +++--- backends/rng.c

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Ladi Prosek
On Fri, Mar 4, 2016 at 7:27 AM, Amit Shah wrote: > On (Thu) 03 Mar 2016 [14:16:11], Ladi Prosek wrote: >> QSIMPLEQ supports appending to tail in O(1) and is intrusive so >> it doesn't require extra memory allocations for the bookkeeping >> data. >> >> Suggest

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Ladi Prosek
On Fri, Mar 4, 2016 at 10:12 AM, Paolo Bonzini wrote: > > > On 04/03/2016 09:04, Ladi Prosek wrote: >>>> >> +QSIMPLEQ_INIT(&s->requests); >>>> >> } >>> > >>> > This init here isn't necessary, the accessors for t

[Qemu-devel] [PATCH] virtio-input: add missing key mappings

2016-03-30 Thread Ladi Prosek
KEY_PAUSE is flat out missing. KEY_SYSRQ already has a keycode assigned but it's not what I'm seeing on my system. The mapping doesn't appear to have to be unique so both keycodes now map to KEY_SYSRQ which is what the "Keyboard PrintScreen", HID usage ID 0x46, translates

[Qemu-devel] [PATCH] virtio-input: retrieve EV_LED host config bits

2016-03-31 Thread Ladi Prosek
VIRTIO_INPUT_CFG_EV_BITS with subsel of EV_LED was always returning an empty bitmap for pass-through input devices. Signed-off-by: Ladi Prosek --- hw/input/virtio-input-host.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/input/virtio-input-host.c b/hw/input/virtio-input-host.c index

[Qemu-devel] [PATCH] virtio-input: implement pass-through evdev writes

2016-04-01 Thread Ladi Prosek
The write path for pass-through devices, commonly used for controlling keyboard LEDs via EV_LED, was not implemented. This commit adds the necessary plumbing to connect the status virtio queue to the host evdev file descriptor. Signed-off-by: Ladi Prosek --- Most of the new code has to do with

Re: [Qemu-devel] [PATCH] virtio-input: implement pass-through evdev writes

2016-04-01 Thread Ladi Prosek
On Fri, Apr 1, 2016 at 12:20 PM, Gerd Hoffmann wrote: > On Fr, 2016-04-01 at 11:31 +0200, Ladi Prosek wrote: >> The write path for pass-through devices, commonly used for controlling >> keyboard LEDs via EV_LED, was not implemented. This commit adds the >> necessary plumbing

[Qemu-devel] [PATCH v2] virtio-input: implement pass-through evdev writes

2016-04-01 Thread Ladi Prosek
The write path for pass-through devices, commonly used for controlling keyboard LEDs via EV_LED, was not implemented. This commit adds the necessary plumbing to connect the status virtio queue to the host evdev file descriptor. Signed-off-by: Ladi Prosek --- v1 -> v2 - dropped the queue

Re: [Qemu-devel] [PATCH] add 1394 OHCI device

2016-04-05 Thread Ladi Prosek
chardev=serial10,idserial10 >> >> Results: >> I've successfully connected to the Target VM using WindbgX64 and ran basic >> debugging functions such as "Break" and "stack trace". >> Moreover I've successfully viewed live trace output f

[Qemu-devel] [PATCH] virtio-input: fix emulated tablet axis ranges

2016-04-08 Thread Ladi Prosek
The reported maximum was wrong. The X and Y coordinates are 0-based so if size is 8000 maximum must be 7FFF. Signed-off-by: Ladi Prosek --- hw/input/virtio-input-hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input

[Qemu-devel] [PATCH] virtio-input: support absolute axis config in pass-through

2016-04-13 Thread Ladi Prosek
VIRTIO_INPUT_CFG_ABS_INFO was not implemented for pass-through input devices. This patch follows the existing design and pre-fetches the config for all absolute axes using EVIOCGABS at realize time. Signed-off-by: Ladi Prosek --- hw/input/virtio-input-host.c | 46

Re: [Qemu-devel] [PATCH] virtio-input: support absolute axis config in pass-through

2016-04-13 Thread Ladi Prosek
On Wed, Apr 13, 2016 at 5:45 PM, Gerd Hoffmann wrote: > On Mi, 2016-04-13 at 16:43 +0200, Ladi Prosek wrote: >> VIRTIO_INPUT_CFG_ABS_INFO was not implemented for pass-through input >> devices. This patch follows the existing design and pre-fetches the >> config for al

Re: [Qemu-devel] [PULL v2 8/9] input-linux: refine mouse detection

2016-04-14 Thread Ladi Prosek
On Wed, Apr 13, 2016 at 5:45 PM, Gerd Hoffmann wrote: > Read absolute and relative axis information, only classify > devices as mouse/tablet in case the x axis is present. I, too, had to come up with a heuristic to classify input devices in my guest driver and what I ended up with is different.

[Qemu-devel] [RFC PATCH] virtio: set ISR status when delivering queue MSI

2016-05-05 Thread Ladi Prosek
code path. Signed-off-by: Ladi Prosek --- hw/virtio/virtio.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 08275a9..4053313 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1192,7 +1192,7 @@ void

Re: [Qemu-devel] [RFC PATCH] virtio: set ISR status when delivering queue MSI

2016-05-05 Thread Ladi Prosek
On Thu, May 5, 2016 at 3:36 PM, Michael S. Tsirkin wrote: > On Thu, May 05, 2016 at 11:13:37AM +0200, Ladi Prosek wrote: >> There is a discrepancy between dataplane and no-dataplane virtio >> behavior with respect to the ISR status register and MSI-X >> capability. >&g

Re: [Qemu-devel] [RFC PATCH] virtio: set ISR status when delivering queue MSI

2016-05-05 Thread Ladi Prosek
On Thu, May 5, 2016 at 5:02 PM, Michael S. Tsirkin wrote: > On Thu, May 05, 2016 at 04:59:13PM +0200, Ladi Prosek wrote: >> On Thu, May 5, 2016 at 3:36 PM, Michael S. Tsirkin wrote: >> > On Thu, May 05, 2016 at 11:13:37AM +0200, Ladi Prosek wrote: >> >> There is a

Re: [Qemu-devel] [RFC PATCH] virtio: set ISR status when delivering queue MSI

2016-05-05 Thread Ladi Prosek
On Thu, May 5, 2016 at 5:20 PM, Michael S. Tsirkin wrote: > On Thu, May 05, 2016 at 05:15:01PM +0200, Ladi Prosek wrote: >> On Thu, May 5, 2016 at 5:02 PM, Michael S. Tsirkin wrote: >> > On Thu, May 05, 2016 at 04:59:13PM +0200, Ladi Prosek wrote: >> >> On Thu, May

Re: [Qemu-devel] [RFC PATCH] virtio: set ISR status when delivering queue MSI

2016-05-05 Thread Ladi Prosek
On Thu, May 5, 2016 at 6:04 PM, Michael S. Tsirkin wrote: > On Thu, May 05, 2016 at 05:27:03PM +0200, Ladi Prosek wrote: >> On Thu, May 5, 2016 at 5:20 PM, Michael S. Tsirkin wrote: >> > On Thu, May 05, 2016 at 05:15:01PM +0200, Ladi Prosek wrote: >> >> On Thu, May

Re: [Qemu-devel] [PATCH] add 1394 OHCI device

2016-03-19 Thread Ladi Prosek
Just a friendly ping after two weeks of silence. Thanks, Ladi

[Qemu-devel] ipxe-virtio subtree announcement

2016-05-25 Thread Ladi Prosek
Hi all, Just a quick announcement that there's a new iPXE subtree at https://github.com/ladipro/ipxe-virtio focused on Virtio networking and related areas. The plan is to be sending regular pull requests to ipxe/ipxe with reviewed patches. Any and all Virtio contributions are welcome and will be r

[Qemu-devel] [PATCH trivial] Remove unused function declarations

2016-06-13 Thread Ladi Prosek
Unused function declarations were found using a simple gcc plugin and manually verified by grepping the sources. Signed-off-by: Ladi Prosek --- Posting as one trivial patch because no domain specific knowledge is required to verify correctness. block/qcow2.h | 1 - disas/sh4.c

[Qemu-devel] [PATCH v2 0/2] virtio: cosmetic tweaks

2016-11-03 Thread Ladi Prosek
Just a trivial couple of patches addressing minor style issues. v1 -> v2: * rebased on top of current master Ladi Prosek (2): virtio: rename virtqueue_discard to virtqueue_unpop virtio: make virtqueue_alloc_element static

[Qemu-devel] [PATCH v2 2/2] virtio: make virtqueue_alloc_element static

2016-11-03 Thread Ladi Prosek
The function does not fully initialize the returned VirtQueueElement and should be used only internally from the virtio module. Signed-off-by: Ladi Prosek --- hw/virtio/virtio.c | 2 +- include/hw/virtio/virtio.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v2 1/2] virtio: rename virtqueue_discard to virtqueue_unpop

2016-11-03 Thread Ladi Prosek
The function undoes the effect of virtqueue_pop and doesn't do anything destructive or irreversible so virtqueue_unpop is a more fitting name. Signed-off-by: Ladi Prosek --- hw/net/virtio-net.c| 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio.c | 8 inclu

Re: [Qemu-devel] [PATCH v2 1/2] virtio: rename virtqueue_discard to virtqueue_unpop

2016-11-03 Thread Ladi Prosek
On Fri, Nov 4, 2016 at 3:42 AM, Alexey Kardashevskiy wrote: > On 03/11/16 19:55, Ladi Prosek wrote: >> The function undoes the effect of virtqueue_pop and doesn't do anything >> destructive or irreversible so virtqueue_unpop is a more fitting name. > > virtqueue_undo_po

Re: [Qemu-devel] [PATCH v2 4/6] virtio-balloon: keep collecting stats on save/restore

2016-09-01 Thread Ladi Prosek
ge handler to > virtio-ballon which would take care of pushing the element if there is > one. > > Signed-off-by: Roman Kagan > Cc: "Michael S. Tsirkin" > Cc: Ladi Prosek > Cc: Stefan Hajnoczi > --- > hw/virtio/virtio-balloon.c | 27 ++-

Re: [Qemu-devel] [PATCH v2 4/6] virtio-balloon: keep collecting stats on save/restore

2016-09-01 Thread Ladi Prosek
On Thu, Sep 1, 2016 at 4:17 PM, Roman Kagan wrote: > On Thu, Sep 01, 2016 at 10:35:49AM +0200, Ladi Prosek wrote: >> On Fri, Aug 19, 2016 at 3:39 PM, Roman Kagan wrote: >> > Upon save/restore virtio-balloon stats acquisition stops. The reason is >> > that the fac

[Qemu-devel] [PATCH 3/3] virtio-balloon: fix stats vq migration

2016-09-07 Thread Ladi Prosek
ted-by: Roman Kagan Signed-off-by: Ladi Prosek --- hw/virtio/virtio-balloon.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index ad4189a..49a2f4a 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@

[Qemu-devel] [PATCH 2/3] virtio: add virtqueue_rewind()

2016-09-07 Thread Ladi Prosek
after migration with the usual proviso that the guest may have modified the vring since last time. Cc: Michael S. Tsirkin Cc: Roman Kagan Cc: Stefan Hajnoczi Signed-off-by: Ladi Prosek --- hw/virtio/virtio.c | 22 ++ include/hw/virtio/virtio.h | 1 + 2 files change

[Qemu-devel] [PATCH 0/3] virtio-balloon: stats vq fixes

2016-09-07 Thread Ladi Prosek
This is another series that aims to fix issues with the balloon stats queue, heavily inspired by previous patches posted by Stefan and Roman. Stefan Hajnoczi (1): virtio: add virtqueue_rewind() Ladi Prosek (2): virtio-balloon: discard virtqueue element on reset virtio-balloon: fix stats vq

[Qemu-devel] [PATCH 1/3] virtio-balloon: discard virtqueue element on reset

2016-09-07 Thread Ladi Prosek
balanced. Cc: Michael S. Tsirkin Cc: Roman Kagan Cc: Stefan Hajnoczi Signed-off-by: Ladi Prosek --- hw/virtio/virtio-balloon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 5af429a..ad4189a 100644 --- a/hw/virtio/virtio-ballo

Re: [Qemu-devel] [PATCH 2/3] virtio: add virtqueue_rewind()

2016-09-08 Thread Ladi Prosek
On Thu, Sep 8, 2016 at 8:44 AM, Roman Kagan wrote: > On Wed, Sep 07, 2016 at 05:20:48PM +0200, Ladi Prosek wrote: >> From: Stefan Hajnoczi >> >> virtqueue_discard() requires a VirtQueueElement but virtio-balloon does >> not migrate its in-use element. Introduce a new

Re: [Qemu-devel] [PATCH] virtio: zero vq->inuse in virtio_reset()

2016-09-08 Thread Ladi Prosek
t;> @@ -822,6 +822,7 @@ void virtio_reset(void *opaque) >> vdev->vq[i].signalled_used_valid = false; >> vdev->vq[i].notification = true; >> vdev->vq[i].vring.num = vdev->vq[i].vring.num_default; >> +vdev->vq[i].inuse = 0; >> } >> } >> >> -- >> 2.7.4 > > CCing qemu-stable Reviewed-by: Ladi Prosek

Re: [Qemu-devel] Qemu 2.6 => Qemu 2.7 migration: error while loading state for instance 0x0 of device '0000:00:03.0/virtio-balloon'

2016-11-15 Thread Ladi Prosek
;d qemu-stable. >> I think it's 4b7f91ed, but I'm not sure if there are others needed. > > thanks for pointing to that commit. > > Stefan can you tell me whether it's enough to cherry-pick 4b7f91ed into > 2.7.0 ? I don't believe that 4b7f91ed will help here

Re: [Qemu-devel] Qemu 2.6 => Qemu 2.7 migration: error while loading state for instance 0x0 of device '0000:00:03.0/virtio-balloon'

2016-11-15 Thread Ladi Prosek
On Tue, Nov 15, 2016 at 12:19 PM, Stefan Priebe - Profihost AG wrote: > Am 15.11.2016 um 12:07 schrieb Ladi Prosek: >> Hi, >> >> On Tue, Nov 15, 2016 at 11:37 AM, Stefan Priebe - Profihost AG >> wrote: >>> Hello, >>> >>> Am 15.11.2016 um 11:3

[Qemu-devel] [PATCH 2/2] virtio: make virtqueue_alloc_element static

2016-10-11 Thread Ladi Prosek
The function does not fully initialize the returned VirtQueueElement and should be used only internally from the virtio module. Signed-off-by: Ladi Prosek --- hw/virtio/virtio.c | 2 +- include/hw/virtio/virtio.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 1/2] virtio: rename virtqueue_discard to virtqueue_unpop

2016-10-11 Thread Ladi Prosek
The function undoes the effect of virtqueue_pop and doesn't do anything destructive or irreversible so virtqueue_unpop is a more fitting name. Signed-off-by: Ladi Prosek --- hw/net/virtio-net.c| 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio.c | 6 +++--- inclu

[Qemu-devel] [PATCH 0/2] virtio: cosmetic tweaks

2016-10-11 Thread Ladi Prosek
ing a shadow available ring - doable but not justified at the moment. Ladi Prosek (2): virtio: rename virtqueue_discard to virtqueue_unpop virtio: make virtqueue_alloc_element static

Re: [Qemu-devel] [PATCH v2] balloon: Fix failure of updating guest memory status

2016-08-03 Thread Ladi Prosek
gt; > > > > Commit 4eae2a657d is doing the right thing, but >> > > > > > > 's->stats_vq_elem' >> > > > > > > should be treated as part of balloon device state and migrated >> > > > > > > to desti

Re: [Qemu-devel] [PATCH v2] balloon: Fix failure of updating guest memory status

2016-08-04 Thread Ladi Prosek
On Wed, Aug 3, 2016 at 9:25 AM, Ladi Prosek wrote: > On Tue, Aug 2, 2016 at 2:11 AM, Michael S. Tsirkin wrote: >> On Mon, Aug 01, 2016 at 11:59:31PM +, Li, Liang Z wrote: >>> > On Wed, Jul 06, 2016 at 12:49:06PM +, Li, Liang Z wrote: >>> > > > &

Re: [Qemu-devel] [PATCH v2] balloon: Fix failure of updating guest memory status

2016-08-04 Thread Ladi Prosek
On Thu, Aug 4, 2016 at 6:01 PM, Michael S. Tsirkin wrote: > On Thu, Aug 04, 2016 at 05:14:14PM +0200, Ladi Prosek wrote: >> On Wed, Aug 3, 2016 at 9:25 AM, Ladi Prosek wrote: >> > On Tue, Aug 2, 2016 at 2:11 AM, Michael S. Tsirkin wrote: >> >> On Mon, Aug 01, 2016

[Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-05 Thread Ladi Prosek
VM is stopped, eliminating the need for the field to be migrated. When the VM starts running again, the field is reinitialized by re-popping the element from the virtqueue. Signed-off-by: Ladi Prosek Suggested-by: Michael S. Tsirkin --- hw/virtio/virtio-balloon.c

Re: [Qemu-devel] [PATCH trivial] Remove unused function declarations

2016-07-11 Thread Ladi Prosek
On Mon, Jun 13, 2016 at 4:20 PM, Ladi Prosek wrote: > Unused function declarations were found using a simple gcc plugin and > manually verified by grepping the sources. > > Signed-off-by: Ladi Prosek > --- > Posting as one trivial patch because no domain specific knowledg

Re: [Qemu-devel] Guest unresponsive after Virtqueue size exceeded error

2017-06-15 Thread Ladi Prosek
Hi, On Wed, Jun 14, 2017 at 11:56 PM, Fernando Casas Schössow wrote: > Hi there, > > I recently migrated a Hyper-V host to qemu/kvm runing on Alpine Linux 3.6.1 > (kernel 4.9.30 -with grsec patches- and qemu 2.8.1). > > Almost on daily basis at least one of the guests is showing the following >

Re: [Qemu-devel] Guest unresponsive after Virtqueue size exceeded error

2017-06-16 Thread Ladi Prosek
virtio_scsi instead of virtio_blk, no balloon, etc.) and then maybe once we know which device it is, we can add some instrumentation to the code. > Thanks again for your help with this! > > Fer > > On vie, jun 16, 2017 at 8:58 , Ladi Prosek wrote: > > Hi, > > Would you

[Qemu-devel] [PATCH] intel_iommu: relax iq tail check on VTD_GCMD_QIE enable

2017-06-16 Thread Ladi Prosek
andle_iqt_write). Signed-off-by: Ladi Prosek --- hw/i386/intel_iommu.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 15610b9..f2cb822 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iomm

[Qemu-devel] [PATCH v2] intel_iommu: relax iq tail check on VTD_GCMD_QIE enable

2017-06-19 Thread Ladi Prosek
makes them crash early on boot with -device intel-iommu,intremap=on. This commit relaxes the check and instead of failing to enable VTD_GCMD_QIE with vtd_err_qi_enable, it behaves as if the tail register was set just after enabling VTD_GCMD_QIE (see vtd_handle_iqt_write). Signed-off-by: Ladi Prosek

Re: [Qemu-devel] [PATCH] intel_iommu: relax iq tail check on VTD_GCMD_QIE enable

2017-06-19 Thread Ladi Prosek
On Mon, Jun 19, 2017 at 8:42 AM, Peter Xu wrote: > Since looks like we need another post, a tiny suggestion is that we > can also add some comment to tell the reason why we didn't really > check it, and a trace_vtd_warn_invalid_qi_tail() tracer to show that > spec is violated (if you see, we have

Re: [Qemu-devel] Guest unresponsive after Virtqueue size exceeded error

2017-06-19 Thread Ladi Prosek
uot; error or should I be worried > for a storage level issue here? > > Now I will wait to see if disabling virtio_balloon helps or not and report > back. > > Thanks. > > Fer > > On vie, jun 16, 2017 at 12:25 , Ladi Prosek wrote: > > On Fri, Jun 16, 2017 at 12:11 PM, Fer

Re: [Qemu-devel] Guest unresponsive after Virtqueue size exceeded error

2017-06-20 Thread Ladi Prosek
I see. Would it be possible for you, once a guest is in the broken state, to make it available for debugging? By attaching gdb to the QEMU process for example and letting me poke around it remotely? Thanks! > Thanks for all your help. > > Fer. > > On mar, jun 20, 2017 at 7:59 , La

Re: [Qemu-devel] Guest unresponsive after Virtqueue size exceeded error

2017-06-22 Thread Ladi Prosek
k you for all your help and your great > disposition! You're absolutely welcome, I don't think I've done anything helpful so far :) > Cheers, > > Fer > > On mar, jun 20, 2017 at 9:52 , Ladi Prosek wrote: > > The host kernel is less likely to be responsible for this,

Re: [Qemu-devel] WinDbg module

2017-04-13 Thread Ladi Prosek
Hi, On Wed, Apr 12, 2017 at 4:05 PM, Mihail Abakumov wrote: > Hello. > > We made the debugger module WinDbg (like GDB) for QEMU. This is the > replacement of the remote stub in Windows kernel. Used for remote Windows > kernel debugging without debugging mode. This is awesome! > The latest build

[Qemu-devel] [PATCH] memory: don't sign-extend 32-bit writes

2017-01-26 Thread Ladi Prosek
0x8000 in its value argument. Signed-off-by: Ladi Prosek --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index f2bed92..b05c5d2 100644 --- a/exec.c +++ b/exec.c @@ -2630,7 +2630,7 @@ static MemTxResult address_space_write_continue

Re: [Qemu-devel] [PATCH] ahci: advertise HOST_CAP_64

2017-01-31 Thread Ladi Prosek
On Tue, Jan 31, 2017 at 1:56 PM, John Snow wrote: > > > On 01/16/2017 02:49 AM, Ladi Prosek wrote: >> On Fri, Jan 13, 2017 at 8:15 PM, John Snow wrote: >>> >>> >>> On 01/13/2017 02:01 PM, Ladi Prosek wrote: >>>> On Fri, Jan 13, 2017 at 7:31

[Qemu-devel] [PATCH] qga: implement guest-file-ioctl

2017-02-01 Thread Ladi Prosek
in-buf-b64 = int-arg = This last example will work only with the Posix guest agent as Win32 always uses indirect input and output data. Signed-off-by: Ladi Prosek --- qga/commands-posix.c | 78 qga/commands-wi

Re: [Qemu-devel] [PATCH] qga: implement guest-file-ioctl

2017-02-01 Thread Ladi Prosek
On Wed, Feb 1, 2017 at 11:20 AM, Daniel P. Berrange wrote: > On Wed, Feb 01, 2017 at 11:06:46AM +0100, Ladi Prosek wrote: >> Analogous to guest-file-read and guest-file-write, this commit adds >> support for issuing IOCTLs to files in the guest. With the goal of >>

Re: [Qemu-devel] [PATCH] qga: implement guest-file-ioctl

2017-02-01 Thread Ladi Prosek
On Wed, Feb 1, 2017 at 12:03 PM, Daniel P. Berrange wrote: > On Wed, Feb 01, 2017 at 11:50:43AM +0100, Ladi Prosek wrote: >> On Wed, Feb 1, 2017 at 11:20 AM, Daniel P. Berrange >> wrote: >> > On Wed, Feb 01, 2017 at 11:06:46AM +0100, Ladi Prosek wrote: >> >&

Re: [Qemu-devel] [PATCH] qga: implement guest-file-ioctl

2017-02-01 Thread Ladi Prosek
On Wed, Feb 1, 2017 at 3:43 PM, Eric Blake wrote: > On 02/01/2017 07:41 AM, Ladi Prosek wrote: > >> >> Ok, so there are two different aspects that should probably be >> separated. The actual semantics of IOCTL calls is equivalent to the >> semantics of files in gen

Re: [Qemu-devel] [PATCH] qga: implement guest-file-ioctl

2017-02-06 Thread Ladi Prosek
On Mon, Feb 6, 2017 at 4:37 PM, Denis V. Lunev wrote: > On 02/01/2017 04:41 PM, Ladi Prosek wrote: >> On Wed, Feb 1, 2017 at 12:03 PM, Daniel P. Berrange >> wrote: >>> On Wed, Feb 01, 2017 at 11:50:43AM +0100, Ladi Prosek wrote: >>>> On Wed, Feb 1,

Re: [Qemu-devel] [PATCH] qga: implement guest-file-ioctl

2017-02-07 Thread Ladi Prosek
ome reason. That's one thing I need to take a close look at. Thanks! > I think that there should be virtio direct channel for general purposes of > dumping and guest-agent channel may be usefull for obtainin varoius > > info from guest drivers through ioctls and providing live-dump fea

Re: [Qemu-devel] [PATCH 4/9] vga: make display updates thread safe.

2017-05-09 Thread Ladi Prosek
Hi Gerd, On Fri, Apr 21, 2017 at 11:16 AM, Gerd Hoffmann wrote: > The vga code clears the dirty bits *after* reading the framebuffer > memory. So if the guest framebuffer updates hits the race window > between vga reading the framebuffer and vga clearing the dirty bits > vga will miss that updat

Re: [Qemu-devel] [PATCH 4/9] vga: make display updates thread safe.

2017-05-09 Thread Ladi Prosek
On Tue, May 9, 2017 at 4:02 PM, Gerd Hoffmann wrote: > Hi, > >> #4 cpu_physical_memory_snapshot_get_dirty (snap=0x56a3b3d0, >> start=2148532224, length=511) > > https://patchwork.ozlabs.org/patch/760013/ Awesome, thanks! > cheers, > Gerd

[Qemu-devel] [PATCH 0/2] usb-hub: clear PORT_STAT_SUSPEND on wakeup

2017-05-11 Thread Ladi Prosek
Two small usb patches. Patch 2 fixes a problem with xhci on Windows, patch 1 addresses a minor code issue I found when debugging it. Ladi Prosek (2): xhci: fix logging usb-hub: clear PORT_STAT_SUSPEND on wakeup hw/usb/dev-hub.c | 1 + hw/usb/hcd-xhci.c | 7 ++- 2 files changed

[Qemu-devel] [PATCH 2/2] usb-hub: clear PORT_STAT_SUSPEND on wakeup

2017-05-11 Thread Ladi Prosek
uest and does not exhibit this problem. Signed-off-by: Ladi Prosek --- hw/usb/dev-hub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 9fe7333..47b7519 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -208,6 +208,7 @@ static void

[Qemu-devel] [PATCH 1/2] xhci: fix logging

2017-05-11 Thread Ladi Prosek
slotid and epid were deleted from XHCITransfer in commit d6fcb29. Also deleting one unused forward declaration. Signed-off-by: Ladi Prosek --- hw/usb/hcd-xhci.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index a2d3143

[Qemu-devel] [PATCH] xhci: relax link check

2017-05-12 Thread Ladi Prosek
te: Tue Mar 7 09:40:18 2017 +0100 ohci: relax link check Signed-off-by: Ladi Prosek --- hw/usb/hcd-xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index d3d47bf..77d8e11 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-

Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-15 Thread Ladi Prosek
On Mon, Aug 15, 2016 at 2:09 PM, Stefan Hajnoczi wrote: > On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote: >> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c >> index 5af429a..65457e9 100644 >> --- a/hw/virtio/virtio-balloon.c >> +++ b

Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-15 Thread Ladi Prosek
On Mon, Aug 15, 2016 at 2:50 PM, Stefan Hajnoczi wrote: > On Mon, Aug 15, 2016 at 1:35 PM, Ladi Prosek wrote: >> On Mon, Aug 15, 2016 at 2:09 PM, Stefan Hajnoczi wrote: >>> On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote: >>>> diff --git a/hw/virti

Re: [Qemu-devel] [PATCH] virtio-balloon: stats vq migration spec compliance

2016-08-16 Thread Ladi Prosek
On Mon, Aug 15, 2016 at 11:32 PM, Michael S. Tsirkin wrote: > virtio spec says that devices must not touch VQs > before DRIVER_OK is set. > > Additionally, balloon must not touch stats VQ > unless the stats feature bit has been negotiated. > > Cc: Ladi Prosek > Signed-of

Re: [Qemu-devel] [PATCH 4/4] virtio-balloon: keep collecting stats on save/restore

2016-08-19 Thread Ladi Prosek
On Thu, Aug 18, 2016 at 8:27 PM, Roman Kagan wrote: > Upon save/restore virtio-balloon stats acquisition stops. The reason is > that the fact that the (only) virtqueue element is being used by QEMU is > not recorded anywhere on save, so upon restore it's not released to the > guest, making furthe

Re: [Qemu-devel] [PATCH 2/4] virtio-balloon: make stats virtqueue length 1

2016-08-19 Thread Ladi Prosek
ed by the host, just define the > stats virtqueue length to 1 initially and rely on the generic virtio > code to handle overflows. Looks good to me, one nit inline. > Signed-off-by: Roman Kagan > Cc: "Michael S. Tsirkin" > Cc: Ladi Prosek > --- > hw/virtio/

Re: [Qemu-devel] [PATCH 4/4] virtio-balloon: keep collecting stats on save/restore

2016-08-19 Thread Ladi Prosek
On Fri, Aug 19, 2016 at 1:37 PM, Roman Kagan wrote: > On Fri, Aug 19, 2016 at 11:57:44AM +0200, Ladi Prosek wrote: >> On Thu, Aug 18, 2016 at 8:27 PM, Roman Kagan wrote: >> > Upon save/restore virtio-balloon stats acquisition stops. The reason is >> > that the fac

Re: [Qemu-devel] [PATCH 4/4] virtio-balloon: keep collecting stats on save/restore

2016-08-19 Thread Ladi Prosek
On Fri, Aug 19, 2016 at 4:45 PM, Roman Kagan wrote: > On Fri, Aug 19, 2016 at 02:08:50PM +0200, Ladi Prosek wrote: >> On Fri, Aug 19, 2016 at 1:37 PM, Roman Kagan wrote: >> > On Fri, Aug 19, 2016 at 11:57:44AM +0200, Ladi Prosek wrote: >> >> On Thu, Aug 18, 2016

[Qemu-devel] [PATCH] virtio: enhance virtio_error messages

2017-07-12 Thread Ladi Prosek
Output like "Virtqueue size exceeded" is not much useful in identifying the culprit. This commit adds virtio device name and queue index to all error messages in virtio.c to improve debuggability. Signed-off-by: Ladi Prosek --- hw/virtio/vir

Re: [Qemu-devel] [PATCH] virtio: enhance virtio_error messages

2017-07-12 Thread Ladi Prosek
On Wed, Jul 12, 2017 at 11:55 AM, Stefan Hajnoczi wrote: > On Wed, Jul 12, 2017 at 10:05:38AM +0200, Ladi Prosek wrote: >> Output like "Virtqueue size exceeded" is not much useful in identifying the >> culprit. This commit adds virtio device name and queue index to

[Qemu-devel] [PATCH v2 2/8] virtio: enhance virtio_error messages

2017-07-13 Thread Ladi Prosek
o-serial) insert a bus between the proxy object and the virtio backends, so a helper function is added to walk the object hierarchy and find the right proxy object to extract the id from. Signed-off-by: Ladi Prosek --- hw/virtio/virtio.c | 27 +-- 1 file changed, 25 inser

[Qemu-devel] [PATCH v2 0/8] virtio: enhance virtio_error messages

2017-07-13 Thread Ladi Prosek
s appropriate; added virtio device maintainers to cc Ladi Prosek (8): qemu-error: introduce error_report_nolf virtio: enhance virtio_error messages virtio: introduce virtqueue_error virtio-9p: use virtqueue_error for errors with queue context virtio-blk: use virtqueue_error for errors with

[Qemu-devel] [PATCH v2 3/8] virtio: introduce virtqueue_error

2017-07-13 Thread Ladi Prosek
Most virtio error output pertains to a specific virtqueue so it makes sense to include the queue index in error messages. This commit makes all error output in virtio.c use the newly introduced virtqueue_error. Suggested-by: Stefan Hajnoczi Signed-off-by: Ladi Prosek --- hw/virtio/virtio.c

  1   2   3   >