[Qemu-devel] [PATCH 6/6] vhost-user-bridge: support host notifier

2018-05-24 Thread Tiwei Bie
This patch introduces the host notifier support in vhost-user-bridge. A new option (-H) is added to use the host notifier. This is mainly used to test the host notifier implementation in vhost user. Signed-off-by: Tiwei Bie --- tests/vhost-user-bridge.c | 98

[Qemu-devel] [PATCH 5/6] libvhost-user: support host notifier

2018-05-24 Thread Tiwei Bie
This patch introduces the host notifier support in libvhost-user. A new API is added to support setting host notifier for each queue. Signed-off-by: Tiwei Bie --- contrib/libvhost-user/libvhost-user.c | 81 --- contrib/libvhost-user/libvhost-user.h |

[Qemu-devel] [PATCH 2/6] vhost-user: allow slave to send fds via slave channel

2018-05-24 Thread Tiwei Bie
Introduce VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD protocol feature to allow slave to send at most 8 descriptors in each message to master via ancillary data using the slave channel. Suggested-by: Michael S. Tsirkin Signed-off-by: Tiwei Bie ---

[Qemu-devel] [PATCH 1/6] vhost: allow backends to filter memory sections

2018-05-24 Thread Tiwei Bie
This patch introduces a vhost op for vhost backends to allow them to filter the memory sections that they can handle. Signed-off-by: Tiwei Bie --- hw/virtio/vhost-user.c| 11 +++ hw/virtio/vhost.c | 9 +++--

Re: [Qemu-devel] [qemu-s390x] [PATCH v2 1/2] vfio-ccw: add force unlimited prefetch property

2018-05-24 Thread Cornelia Huck
On Thu, 24 May 2018 12:29:01 +0200 Halil Pasic wrote: > On 05/24/2018 09:16 AM, Cornelia Huck wrote: > > On Wed, 23 May 2018 19:28:31 +0200 > > Halil Pasic wrote: > > > >> On 05/23/2018 06:59 PM, Cornelia Huck wrote: > >>> On Wed, 23 May 2018

[Qemu-devel] [PATCH 0/6] Support host notifiers in vhost-user

2018-05-24 Thread Tiwei Bie
This patch set depends on below patch set: http://lists.gnu.org/archive/html/qemu-devel/2018-05/msg05335.html More details about this patch set can be found from: http://lists.gnu.org/archive/html/qemu-devel/2018-04/msg01779.html

[Qemu-devel] [PATCH 4/6] vhost-user: support registering external host notifiers

2018-05-24 Thread Tiwei Bie
This patch introduces VHOST_USER_PROTOCOL_F_HOST_NOTIFIER. With this feature negotiated, vhost-user backend can register memory region based host notifiers. And it will allow the guest driver in the VM to notify the hardware accelerator at the vhost-user backend directly. Signed-off-by: Tiwei Bie

[Qemu-devel] [PATCH 3/6] vhost-user: introduce shared vhost-user state

2018-05-24 Thread Tiwei Bie
When multi queue is enabled e.g. for a virtio-net device, each queue pair will have a vhost_dev, and the only thing shared between vhost devs currently is the chardev. This patch introduces a vhost-user state structure which will be shared by all vhost devs of the same virtio device.

Re: [Qemu-devel] [qemu-s390x] [PATCH v2 1/2] vfio-ccw: add force unlimited prefetch property

2018-05-24 Thread Halil Pasic
On 05/24/2018 09:16 AM, Cornelia Huck wrote: On Wed, 23 May 2018 19:28:31 +0200 Halil Pasic wrote: On 05/23/2018 06:59 PM, Cornelia Huck wrote: On Wed, 23 May 2018 18:23:44 +0200 Halil Pasic wrote: On 05/23/2018 04:46 PM, Cornelia Huck wrote:

Re: [Qemu-devel] [PULL 0/1] target/lm32 BQL patch

2018-05-24 Thread Peter Maydell
On 22 May 2018 at 19:33, Michael Walle wrote: > Am 2018-05-22 12:01, schrieb Peter Maydell: >> >> On 21 May 2018 at 16:49, Michael Walle wrote: >>> >>> The following changes since commit >>> 81e9cbd0ca1131012b058df6804b1f626a6b730c: >>> >>> lm32: take BQL

Re: [Qemu-devel] [RFC 3/3] acpi-build: allocate mcfg for multiple host bridges

2018-05-24 Thread Zihan Yang
2018-05-24 1:33 GMT+08:00 Marcel Apfelbaum : > >> * IOMMUs cannot span domains either, so bringing new domains introduces >> the need >> to add a VT-d DHRD or vIOMMU per PCIe domain > > > Not really, you may have PCI domains not associated to an vIOMMU. As a first >

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Kashyap Chamarthy
On Mon, May 21, 2018 at 05:33:22PM -0300, Eduardo Habkost wrote: > On Mon, May 21, 2018 at 09:18:17PM +0100, Daniel P. Berrangé wrote: [...] (Just catching up with this thread.) [...] > > > I have very specific goal here: the goal is to make it less > > > painful to users when

Re: [Qemu-devel] [RFC 3/3] acpi-build: allocate mcfg for multiple host bridges

2018-05-24 Thread Zihan Yang
> > The original purpose was just to support multiple segments in Intel > > Q35 archtecure for PCIe topology, which makes bus number a less scarce > > resource. The patches are very primitive and many things are left for > > firmware to finish(the initial plan was to implement it in SeaBIOS), > >

Re: [Qemu-devel] [PATCH v7 4/4] monitor: add lock to protect mon_fdsets

2018-05-24 Thread Stefan Hajnoczi
On Thu, May 24, 2018 at 12:39:52PM +0800, Peter Xu wrote: > int monitor_fdset_get_fd(int64_t fdset_id, int flags) > { > -#ifndef _WIN32 > +#ifdef _WIN32 > +return -ENOENT; stubs/fdset.c:monitor_fdset_get_fd() should return -ENOENT instead of -1 now. signature.asc Description: PGP

Re: [Qemu-devel] [PATCH V3 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-24 Thread Shannon Zhao
On 2018/5/24 17:04, Auger Eric wrote: > Hi Shannon, > > On 05/23/2018 05:53 AM, Shannon Zhao wrote: >> While we skip the GIC_INTERNAL irqs, we don't change the register offset >> accordingly. This will overlap the GICR registers value and leave the >> last GIC_INTERNAL irq's registers out of

Re: [Qemu-devel] [RFC 0/2] ARM virt: Support up to 256 PCIe buses

2018-05-24 Thread Peter Maydell
On 23 May 2018 at 21:52, Laszlo Ersek wrote: > On 05/23/18 22:40, Auger Eric wrote: >> On 05/23/2018 07:45 PM, Laszlo Ersek wrote: > >>> Regarding the second patch, I do believe we need "more sophistication" >>> there. For example, I guess it could be possible to distinguish

[Qemu-devel] [PATCH v2] block: fix QEMU crash with scsi-hd and drive_del

2018-05-24 Thread Greg Kurz
Removing a drive with drive_del while it is being used to run an I/O intensive workload can cause QEMU to crash. An AIO flush can yield at some point: blk_aio_flush_entry() blk_co_flush(blk) bdrv_co_flush(blk->root->bs) ... qemu_coroutine_yield() and let the HMP command to run, free

Re: [Qemu-devel] [PATCH V3 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-24 Thread Auger Eric
Hi Shannon, On 05/23/2018 05:53 AM, Shannon Zhao wrote: > While we skip the GIC_INTERNAL irqs, we don't change the register offset > accordingly. This will overlap the GICR registers value and leave the > last GIC_INTERNAL irq's registers out of update. > > Fix this by skipping the registers

Re: [Qemu-devel] [PATCH v7 4/4] monitor: add lock to protect mon_fdsets

2018-05-24 Thread Markus Armbruster
Peter Xu writes: > Similar to previous patch, but introduce a new global big lock for > mon_fdsets. Take it where needed. The previous patch is "monitor: more comments on lock-free fleids/funcs". Sure you mean that one? > > The monitor_fdset_get_fd() handling is a bit

Re: [Qemu-devel] [PATCH v7 3/4] monitor: more comments on lock-free fleids/funcs

2018-05-24 Thread Peter Xu
On Thu, May 24, 2018 at 10:41:09AM +0200, Markus Armbruster wrote: > Regarding the subject: what are "fleids"? Ouch. :( I meant the word "fields". > > Peter Xu writes: > > > Add some explicit comment for both Readline and cpu_set/cpu_get helpers > > that they do not need

Re: [Qemu-devel] [PATCH v7 3/4] monitor: more comments on lock-free fleids/funcs

2018-05-24 Thread Peter Xu
On Thu, May 24, 2018 at 09:08:04AM +0100, Stefan Hajnoczi wrote: > On Thu, May 24, 2018 at 12:39:51PM +0800, Peter Xu wrote: > > Add some explicit comment for both Readline and cpu_set/cpu_get helpers > > that they do not need the mon_lock protection. > > > > Signed-off-by: Peter Xu

Re: [Qemu-devel] [PATCH v7 1/4] monitor: rename out_lock to mon_lock

2018-05-24 Thread Peter Xu
On Thu, May 24, 2018 at 10:29:20AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > The out_lock is protecting a few Monitor fields. In the future the > > monitor code will start to run in multiple threads. We are going to > > turn it into a bigger lock to protect

Re: [Qemu-devel] [PATCH v3] monitor: let cur_mon be per-thread

2018-05-24 Thread Peter Xu
On Thu, May 24, 2018 at 10:22:48AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Wed, May 23, 2018 at 03:13:07PM +0200, Markus Armbruster wrote: > >> Peter Xu writes: > >> > >> > On Wed, May 23, 2018 at 10:23:22AM +0200, Markus Armbruster

Re: [Qemu-devel] [PATCH v7 3/4] monitor: more comments on lock-free fleids/funcs

2018-05-24 Thread Markus Armbruster
Regarding the subject: what are "fleids"? Peter Xu writes: > Add some explicit comment for both Readline and cpu_set/cpu_get helpers > that they do not need the mon_lock protection. > > Signed-off-by: Peter Xu > --- > monitor.c | 12 +++- > 1 file

Re: [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 02:02 hat John Snow geschrieben: > > > On 05/18/2018 09:21 AM, Kevin Wolf wrote: > > This adds a QMP event that is emitted whenever a job transitions from > > one status to another. > > > > Signed-off-by: Kevin Wolf > > That's a lot of events, and a lot are

Re: [Qemu-devel] [PATCH] block: fix QEMU crash with scsi-hd and drive_del

2018-05-24 Thread Greg Kurz
On Thu, 24 May 2018 09:05:53 +0100 Stefan Hajnoczi wrote: > On Thu, May 24, 2018 at 08:04:59AM +0200, Paolo Bonzini wrote: > > On 23/05/2018 16:46, Greg Kurz wrote: > > > Maybe change bdrv_root_unref_child() to ensure we don't call > > > bdrv_close() with pending I/O

Re: [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready()

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 01:42 hat John Snow geschrieben: > On 05/18/2018 09:21 AM, Kevin Wolf wrote: > > Instead of having a 'bool ready' in BlockJob, add a function that > > derives its value from the job status. > > > > At the same time, this fixes the behaviour to match what the QAPI > >

Re: [Qemu-devel] [PATCH v7 1/4] monitor: rename out_lock to mon_lock

2018-05-24 Thread Markus Armbruster
Peter Xu writes: > The out_lock is protecting a few Monitor fields. In the future the > monitor code will start to run in multiple threads. We are going to > turn it into a bigger lock to protect not only the out buffer but also > all the rest. Hmm, not sure about "all the

Re: [Qemu-devel] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-24 Thread Fam Zheng
On Wed, 05/23 13:28, Eric Blake wrote: > On 05/22/2018 10:04 PM, Fam Zheng wrote: > > We don't verify the request range against s->size in the I/O callbacks > > except for raw_co_pwritev. This is wrong (especially for > > raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. > > I'd also

Re: [Qemu-devel] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 01:18 hat John Snow geschrieben: > > diff --git a/include/qemu/job.h b/include/qemu/job.h > > index 3e817beee9..2648c74281 100644 > > --- a/include/qemu/job.h > > +++ b/include/qemu/job.h > > @@ -97,6 +97,12 @@ typedef struct Job { > > */ > > bool cancelled; > > > > +

Re: [Qemu-devel] [PATCH v3] monitor: let cur_mon be per-thread

2018-05-24 Thread Markus Armbruster
Peter Xu writes: > On Wed, May 23, 2018 at 03:13:07PM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Wed, May 23, 2018 at 10:23:22AM +0200, Markus Armbruster wrote: >> >> Peter Xu writes: >> >> >> >> > In the future the

Re: [Qemu-devel] [PATCH v2 17/40] job: Move BlockJobCreateFlags to Job

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 00:24 hat John Snow geschrieben: > > > On 05/18/2018 09:20 AM, Kevin Wolf wrote: > > +job->auto_finalize = !(flags & JOB_MANUAL_FINALIZE); > > +job->auto_dismiss = !(flags & JOB_MANUAL_DISMISS); > > Job API might be a good chance to say "No, this is the default

Re: [Qemu-devel] [PATCH] prep: fix keyboard for the 40p machine

2018-05-24 Thread Mark Cave-Ayland
On 24/05/18 06:39, Mark Cave-Ayland wrote: Commit 72d3d8f052 "hw/isa/superio: Add a keyboard/mouse controller (8042)" added an 8042 keyboard device to the PC87312 superio device to replace that being used by the prep machine. Unfortunately this commit didn't do the same for the 40p machine

Re: [Qemu-devel] [PATCH v7 3/4] monitor: more comments on lock-free fleids/funcs

2018-05-24 Thread Stefan Hajnoczi
On Thu, May 24, 2018 at 12:39:51PM +0800, Peter Xu wrote: > Add some explicit comment for both Readline and cpu_set/cpu_get helpers > that they do not need the mon_lock protection. > > Signed-off-by: Peter Xu > --- > monitor.c | 12 +++- > 1 file changed, 11

Re: [Qemu-devel] [PATCH] block: fix QEMU crash with scsi-hd and drive_del

2018-05-24 Thread Stefan Hajnoczi
On Thu, May 24, 2018 at 08:04:59AM +0200, Paolo Bonzini wrote: > On 23/05/2018 16:46, Greg Kurz wrote: > > Maybe change bdrv_root_unref_child() to ensure we don't call > > bdrv_close() with pending I/O requests ? > > > > void bdrv_root_unref_child(BdrvChild *child) > > { > >

Re: [Qemu-devel] [PATCH v2 1/1] sandbox: disable -sandbox if CONFIG_SECCOMP undefined

2018-05-24 Thread Eduardo Otubo
On 05/23/2018 02:17 PM, Yi Min Zhao wrote: 在 2018/5/23 下午6:33, Eduardo Otubo 写道: On 05/23/2018 11:16 AM, Yi Min Zhao wrote: 在 2018/5/23 下午3:47, Ján Tomko 写道: On Sat, May 19, 2018 at 04:20:37PM +0800, Yi Min Zhao wrote: 在 2018/5/18 下午9:07, Ján Tomko 写道: On Fri, May 18, 2018 at

Re: [Qemu-devel] [PATCH v2] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Mon, 05/21 16:58, Fam Zheng wrote: > Coverity doesn't like the tests under fail label (report CID 1385847). > Reset the fields so the clean up order is more apparent. > > Signed-off-by: Fam Zheng Queued, thanks. Fam

Re: [Qemu-devel] [RFC] monitor: turn on Out-Of-Band by default again

2018-05-24 Thread Peter Xu
On Thu, May 24, 2018 at 09:08:58AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Mon, May 21, 2018 at 09:13:06AM -0500, Eric Blake wrote: > >> On 05/21/2018 03:42 AM, Peter Xu wrote: > >> > We turned Out-Of-Band feature of monitors off for 2.12 release. Now we >

Re: [Qemu-devel] Questions about vNVDIMM on qemu/KVM

2018-05-24 Thread Yasunori Goto
> On Tue, May 22, 2018 at 10:08 PM, Yasunori Goto wrote: > > Hello, > > > > I'm investigating status of vNVDIMM on qemu/KVM, > > and I have some questions about it. I'm glad if anyone answer them. > > > > In my understanding, qemu/KVM has a feature to show NFIT for guest, >

Re: [Qemu-devel] [qemu-s390x] [PATCH v2 1/2] vfio-ccw: add force unlimited prefetch property

2018-05-24 Thread Cornelia Huck
On Wed, 23 May 2018 19:28:31 +0200 Halil Pasic wrote: > On 05/23/2018 06:59 PM, Cornelia Huck wrote: > > On Wed, 23 May 2018 18:23:44 +0200 > > Halil Pasic wrote: > > > >> On 05/23/2018 04:46 PM, Cornelia Huck wrote: > >> +if

Re: [Qemu-devel] [RFC] monitor: turn on Out-Of-Band by default again

2018-05-24 Thread Markus Armbruster
Peter Xu writes: > On Mon, May 21, 2018 at 09:13:06AM -0500, Eric Blake wrote: >> On 05/21/2018 03:42 AM, Peter Xu wrote: >> > We turned Out-Of-Band feature of monitors off for 2.12 release. Now we >> > try to turn that on again. >> >> "try to turn" sounds weak, like you

Re: [Qemu-devel] [PATCH] migration: fix exec/fd migrations

2018-05-24 Thread Peter Xu
On Wed, May 23, 2018 at 11:14:11AM +0200, Juan Quintela wrote: > Commit: > > commit 36c2f8be2c4eb0003ac77a14910842b7ddd7337e > Author: Juan Quintela > Date: Wed Mar 7 08:40:52 2018 +0100 > > migration: Delay start of migration main routines > > Missed tcp and fd

Re: [Qemu-devel] [PATCH v3 2/6] vhost-user: introduce shared vhost-user state

2018-05-24 Thread Tiwei Bie
On Thu, May 24, 2018 at 10:24:40AM +0800, Tiwei Bie wrote: [...] > > > + > > > qemu_purge_queued_packets(nc); > > > } > > > > > > @@ -341,7 +342,6 @@ err: > > > if (user) { > > > vhost_user_cleanup(user); > > > g_free(user); > > > -s->vhost_user = NULL; > >

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-24 Thread Shannon Zhao
On 2018/5/22 17:13, Peter Maydell wrote: > On 8 April 2018 at 02:50, Shannon Zhao wrote: >> On 2018/4/6 17:36, Peter Maydell wrote: >>> On reflection, I think I'd aim for 2.13 for this, since: >>> * it's not a regression >>> * it doesn't actually affect any of our

Re: [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API

2018-05-24 Thread Peter Xu
On Wed, May 23, 2018 at 12:47:16PM +0100, Peter Maydell wrote: > On 23 May 2018 at 02:06, Peter Xu wrote: > > On Tue, May 22, 2018 at 12:11:38PM +0100, Peter Maydell wrote: > >> On 22 May 2018 at 12:02, Peter Xu wrote: > >> > On Tue, May 22, 2018 at

Re: [Qemu-devel] [PATCH v2] Remove unwanted crlf conversion in serial

2018-05-24 Thread Markus Armbruster
Patryk Olszewski writes: > This patch fixes bug in serial that made it almost impossible for guest > to communicate with devices through host's serial. Well, "almost impossible" for some applications. Text works fine. But I get what you mean. > OPOST flag in c_oflag

Re: [Qemu-devel] [PATCH] block: fix QEMU crash with scsi-hd and drive_del

2018-05-24 Thread Paolo Bonzini
On 23/05/2018 16:46, Greg Kurz wrote: > Maybe change bdrv_root_unref_child() to ensure we don't call > bdrv_close() with pending I/O requests ? > > void bdrv_root_unref_child(BdrvChild *child) > { > BlockDriverState *child_bs; > > child_bs = child->bs; > +

Re: [Qemu-devel] [PATCH] ppc: move at24c to its own CONFIG_ symbol

2018-05-24 Thread Paolo Bonzini
On 22/05/2018 21:17, Paolo Bonzini wrote: > AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is > being included in all emulators that use I2C, even if they do not > really need it. Separate it and, since it was added for the e500 > machines, add it to qemu-system-ppc and

Re: [Qemu-devel] [PATCH v3 00/19] reverse debugging

2018-05-24 Thread Pavel Dovgalyuk
> From: Ciro Santilli [mailto:ciro.santi...@gmail.com] > On Wed, May 23, 2018 at 2:28 PM, Pavel Dovgalyuk wrote: > >> From: Ciro Santilli [mailto:ciro.santi...@gmail.com] > >> On Wed, May 23, 2018 at 7:49 AM, Pavel Dovgalyuk > >> wrote: > >> > GDB

<    1   2   3