[Qemu-devel] [PATCH RFC 1/6] configure: probe for memfd

2015-07-22 Thread Marc-André Lureau
Check if memfd_create() is part of system libc. Signed-off-by: Marc-André Lureau --- configure | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index cc0338d..9a401d4 100755 --- a/configure +++ b/configure @@ -3390,6 +3390,22 @@ if compile_prog "" ""

[Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-22 Thread Marc-André Lureau
Implement memfd_create() fallback if not available in system libc. memfd_create() is still not included in glibc today, atlhough it's been available since Linux 3.17 in Oct 2014. memfd has numerous advantages over traditional shm/mmap for ipc memory sharing with fd handler, which we are going to m

[Qemu-devel] [PATCH RFC 4/6] vhost: alloc shareable log

2015-07-22 Thread Marc-André Lureau
If the backend is of type VHOST_BACKEND_TYPE_USER, allocate shareable memory. Note: vhost_log_get() can use a global "vhost_log" that can be shared by several vhost devices. We may want instead a common shareable log and a common non-shareable one. Signed-off-by: Marc-André Lureau --- hw/virtio

[Qemu-devel] [PATCH RFC 5/6] vhost-user: send log shm fd along with log_base

2015-07-22 Thread Marc-André Lureau
Send the shm for the dirty pages logging if the backend support VHOST_USER_PROTOCOL_F_LOG_SHMFD. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 49

[Qemu-devel] [PATCH RFC 6/6] vhost-user: document migration log

2015-07-22 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 40 1 file changed, 40 insertions(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 0062baa..c2d2e2a 100644 --- a/docs/specs/vhost-user.txt +++ b/docs/specs/vhost-u

Re: [Qemu-devel] [PATCH for-2.4] vl: Fix compiler warning for builds without VLC

2015-07-22 Thread Wen Congyang
On 07/23/2015 01:53 AM, Stefan Weil wrote: > This regression was caused by commit 70b94331. vnc, not vlc in the title. Reviewed-by: Wen Congyang > > CCvl.o > vl.c: In function ‘select_display’: > vl.c:2064:12: error: unused variable ‘err’ [-Werror=unused-variable] > Error *err = NUL

Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections

2015-07-22 Thread Wen Congyang
On 07/22/2015 10:18 PM, Paolo Bonzini wrote: > Otherwise, grace periods are detected too early! We always use qemu_thread_create() in qemu. So I think we can do it like this: wrapped_fn() { rcu_register_thread(); call thread_fn() here rcu_unregister_thread(); } So we will never forget

Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak

2015-07-22 Thread Amit Shah
On (Wed) 22 Jul 2015 [10:19:52], Daniel P. Berrange wrote: > On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > If vnc's password is configured, it will leak memory > > which cipher variable pointed on every vnc connection. > > > > Cc: Daniel P. Be

Re: [Qemu-devel] [PATCH v7 27/42] postcopy: ram_enable_notify to switch on userfault

2015-07-22 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:40], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Mark the area of RAM as 'userfault' > Start up a fault-thread to handle any userfaults we might receive > from it (to be filled in later) > > Signed-off-by: Dr. David Alan Gilbert > Reviewe

Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak

2015-07-22 Thread Paolo Bonzini
On 23/07/2015 06:22, Amit Shah wrote: > On (Wed) 22 Jul 2015 [10:19:52], Daniel P. Berrange wrote: >> > On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gong...@huawei.com wrote: >>> > > From: Gonglei >>> > > >>> > > If vnc's password is configured, it will leak memory >>> > > which cipher variab

Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections

2015-07-22 Thread Paolo Bonzini
On 23/07/2015 04:56, Wen Congyang wrote: >> > Otherwise, grace periods are detected too early! > We always use qemu_thread_create() in qemu. So I think we can do it like this: > wrapped_fn() > { > rcu_register_thread(); > call thread_fn() here > rcu_unregister_thread(); > } > > So we

Re: [Qemu-devel] [PATCH for-2.4] vl: Fix compiler warning for builds without VLC

2015-07-22 Thread Paolo Bonzini
On 23/07/2015 03:43, Wen Congyang wrote: > On 07/23/2015 01:53 AM, Stefan Weil wrote: >> > This regression was caused by commit 70b94331. > vnc, not vlc in the title. > > Reviewed-by: Wen Congyang > Thanks, queued for 2.4. Paolo

Re: [Qemu-devel] [PATCH v7 28/42] Postcopy: Postcopy startup in migration thread

2015-07-22 Thread Amit Shah
On (Mon) 13 Jul 2015 [18:56:55], Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > > +/* > > > + * send rest of state - note things that are doing postcopy > > > + * will notice we're in POSTCOPY_ACTIVE and not actually > > > + * wrap their state up h

Re: [Qemu-devel] [PATCH v7 28/42] Postcopy: Postcopy startup in migration thread

2015-07-22 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:41], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Rework the migration thread to setup and start postcopy. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Amit

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Jason Wang
On 07/22/2015 06:55 PM, Yang Hongyang wrote: > This patch add a net filter between network backend and NIC devices. > All packets will pass by this filter. > TODO: > multiqueue support. > plugin support. > > +--+ +-+ > +--+ |filter|

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.4.0-rc2 is now available

2015-07-22 Thread Vasiliy Tolstov
2015-07-23 1:33 GMT+03:00 Michael Roth : > On behalf of the QEMU Team, I'd like to announce the availability of the > third release candidate for the QEMU 2.4 release. This release is meant > for testing purposes and should not be used in a production environment. > > http://wiki.qemu.org/download

[Qemu-devel] [RFC PATCH 01/11] aio: Introduce "type" in aio_set_fd_handler and aio_set_event_notifier

2015-07-22 Thread Fam Zheng
The parameter is added but not used. The callers are converted with following coccinelle semantic patch: @@ expression E1, E2, E3, E4, E5; @@ ( -aio_set_event_notifier(E1, E2, E3) +aio_set_event_notifier(E1, E2, AIO_CLIENT_UNSPECIFIED, E3) | -aio_set_fd_handler(E1,

[Qemu-devel] [RFC PATCH 02/11] aio: Save type to AioHandler

2015-07-22 Thread Fam Zheng
So it can be used by aio_poll later. Signed-off-by: Fam Zheng --- aio-posix.c | 2 ++ aio-win32.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/aio-posix.c b/aio-posix.c index 56f2bce..d25fcfc 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -25,6 +25,7 @@ struct AioHandler IOHandler

[Qemu-devel] [RFC PATCH 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-07-22 Thread Fam Zheng
Most existing nested aio_poll()'s in block layer are inconsiderate of dispatching potential new r/w requests from ioeventfds and nbd exports, which might result in responsiveness issues (e.g. bdrv_drain_all will not return when new requests keep coming), or even wrong semantics (e.g. qmp_transactio

[Qemu-devel] [RFC PATCH 04/11] aio-win32: Implement aio_poll_clients

2015-07-22 Thread Fam Zheng
This is the counterpart of for windows. Signed-off-by: Fam Zheng --- aio-win32.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/aio-win32.c b/aio-win32.c index f5ecf57..c925085 100644 --- a/aio-win32.c +++ b/aio-win32.c @@ -149,7 +149,7 @@

[Qemu-devel] [RFC PATCH 08/11] dataplane: Mark host notifiers' client type as "dataplane"

2015-07-22 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 4 ++-- hw/scsi/virtio-scsi-dataplane.c | 16 include/block/aio.h | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c

[Qemu-devel] [RFC PATCH 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-07-22 Thread Fam Zheng
So that external events are not processed in nested event loops. Signed-off-by: Fam Zheng --- block/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 5f5e575..c98fa92 100644 --- a/block/io.c +++ b/block/io.c @@ -2611,5 +2611,6 @@ void bdrv_f

Re: [Qemu-devel] [PATCH v7 29/42] Postcopy end in migration_thread

2015-07-22 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:42], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The end of migration in postcopy is a bit different since some of > the things normally done at the end of migration have already been > done on the transition to postcopy. > > The end of mi

Re: [Qemu-devel] [PATCH 0/1] A couple of problems with BlockDriverState's children list

2015-07-22 Thread Markus Armbruster
Alberto Garcia writes: > I've been debugging a couple of problems related to the recently > merged bdrv_reopen() overhaul code. > > 1. bs->children is not updated correctly > > The problem is described in this e-mail: > >https://lists.gnu.org/archive/h

Re: [Qemu-devel] [RFC] Virt machine memory map

2015-07-22 Thread Alexander Graf
> Am 22.07.2015 um 08:52 schrieb Pavel Fedin : > > Hello! > >>> I think the theory we discussed at the time of putting in the PCIe >>> device was that if we wanted this we'd add support for the other >>> PCIe memory window (which would then live at somewhere above 4GB). >>> Alex, can you remembe

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Marc Marí
On Tue, 21 Jul 2015 21:44:49 +0200 Laszlo Ersek wrote: > On 07/21/15 18:03, Marc Marí wrote: > > From: Gerd Hoffmann > > > > First draft of a fw_cfg dma interface. Designed as add-on to the > > extisting fw_cfg interface, i.e. there is no select register. There > > are four 32bit registers:

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Marc Marí
On Wed, 22 Jul 2015 00:24:34 -0400 "Kevin O'Connor" wrote: > On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: > > From: Gerd Hoffmann > > > > First draft of a fw_cfg dma interface. Designed as add-on to the > > extisting fw_cfg interface, i.e. there is no select register. There > >

[Qemu-devel] [PATCH v6 1/6] Merge memory_region_init_reservation() into memory_region_init_io()

2015-07-22 Thread Pavel Fedin
Just speficying ops = NULL in some cases can be more convenient than having two functions. GICv3 code is going to use this. GICv2 code can be refactored in a similar way, killing some code duplication. Signed-off-by: Pavel Fedin Acked-by: Paolo Bonzini --- include/exec/memory.h | 14 +++

[Qemu-devel] [PATCH v6 0/6] vGICv3 support

2015-07-22 Thread Pavel Fedin
This series introduces support for GICv3 by KVM. Software emulation is currently not supported. Differences from v5: - Fixed various checkpatch.pl style warnings - Removed TODO in gicv3_init_irqs_and_mmio(), relevant memory API patch included - gicv3_init_irqs_and_mmio() now takes 3 arguments in

[Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for KVM

2015-07-22 Thread Pavel Fedin
This patch introduces kernel_irqchip_type member in Machine class, which it passed to kvm_arch_irqchip_create. It allows machine models to specify correct GIC type during KVM capability verification. The variable is defined as int in order to be architecture-agnostic for potential future uses by ot

[Qemu-devel] [PATCH v6 5/6] Initial implementation of vGICv3

2015-07-22 Thread Pavel Fedin
Get/put routines are missing, live migration is not possible. Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 3 + hw/intc/arm_gicv3_kvm.c | 155 2 files changed, 158 insertions(+) create mode 100644 hw/intc/arm_gicv3_kvm.c diff --git

[Qemu-devel] [PATCH v6 6/6] Add gicversion option to virt machine

2015-07-22 Thread Pavel Fedin
Set kernel_irqchip_type according to value of the option and pass it around where necessary. Instantiate devices and fdt nodes according to the choice. mac_cpus for virt machine increased to 64. GICv2 compatibility check happens inside arm_gic_common_realize(). Signed-off-by: Pavel Fedin --- hw

[Qemu-devel] [PATCH v6 2/6] Implement GIC-500 base class

2015-07-22 Thread Pavel Fedin
From: Shlomo Pongratz This class is to be used by both software and KVM implementations of GICv3 Signed-off-by: Shlomo Pongratz Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 1 + hw/intc/arm_gicv3_common.c | 249 + hw/intc/gi

[Qemu-devel] [PATCH v6 3/6] Extract some reusable vGIC code

2015-07-22 Thread Pavel Fedin
These functions are useful also for vGICv3 implementation. Make them accessible from within other modules. Actually kvm_dist_get() and kvm_dist_put() could also be made reusable, but they would require two extra parameters (s->dev_fd and s->num_cpu) as well as lots of typecasts of 's' to DeviceSta

Re: [Qemu-devel] [RFC] Virt machine memory map

2015-07-22 Thread Pavel Fedin
Hello! > At least on Seattle we do have several regions with that driver and I don't > expect real hardware to provide > a model as simple as ours. So yes, I would be very surprised if there were > limitations about the split of > regions. Thank you for pointing out, i will check. Kind regar

Re: [Qemu-devel] [RFC 4/7] enable fw_cfg dma for arm virt

2015-07-22 Thread Marc Marí
On Tue, 21 Jul 2015 18:04:31 +0100 Peter Maydell wrote: > On 21 July 2015 at 17:03, Marc Marí wrote: > > From: Gerd Hoffmann > > > > Signed-off-by: Gerd Hoffmann > > --- > > docs/specs/fw_cfg.txt | 6 ++ > > hw/arm/virt.c | 11 --- > > 2 files changed, 14 insertions(+), 3

Re: [Qemu-devel] [RFC 5/7] fw_cfg file sort

2015-07-22 Thread Marc Marí
On Tue, 21 Jul 2015 21:53:06 +0200 Laszlo Ersek wrote: > On 07/21/15 18:18, Stefan Hajnoczi wrote: > > On Tue, Jul 21, 2015 at 5:03 PM, Marc Marí > > wrote: > >> From: Gerd Hoffmann > >> > >> This is what it takes to have a sorted fw_cfg file directory. > >> Entries are inserted at the correct

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Cornelia Huck
On Wed, 22 Jul 2015 13:59:51 +0800 Jason Wang wrote: > SCSI passthrough was no longer supported in virtio 1.0, so this patch > fail the get_features() when both 1.0 and scsi is set. And also only > advertise VIRTIO_BLK_F_SCSI for legacy virtio-blk device. > > Signed-off-by: Jason Wang > --- >

Re: [Qemu-devel] [RFC 6/7] Add offset register to fw_cfg DMA interface

2015-07-22 Thread Marc Marí
On Tue, 21 Jul 2015 22:36:39 +0200 Laszlo Ersek wrote: > On 07/21/15 22:16, Kevin O'Connor wrote: > > On Tue, Jul 21, 2015 at 10:06:51PM +0200, Laszlo Ersek wrote: > >> On 07/21/15 18:26, Stefan Hajnoczi wrote: > >>> On Tue, Jul 21, 2015 at 5:03 PM, Marc Marí > >>> wrote: > Signed-off-by: M

Re: [Qemu-devel] [RFC 7/7] fw_cfg DMA for x86

2015-07-22 Thread Marc Marí
On Tue, 21 Jul 2015 18:14:40 +0100 Peter Maydell wrote: > On 21 July 2015 at 17:03, Marc Marí wrote: > > Enable fw_cfg for x86 machines. Create new machine to avoid > > incompatibilites. > > > @@ -1391,7 +1399,14 @@ FWCfgState *pc_memory_init(MachineState > > *machine, option_rom_mr, > >

Re: [Qemu-devel] [PULL for-2.4 0/7] update ipxe roms, fix efi support

2015-07-22 Thread Stefan Hajnoczi
On Wed, Jul 22, 2015 at 12:58:59AM +0200, Laszlo Ersek wrote: > On 07/21/15 18:10, Stefan Hajnoczi wrote: > > On Tue, Jul 21, 2015 at 3:28 PM, Paolo Bonzini wrote: > >> On 21/07/2015 16:25, Peter Maydell wrote: > > or work > > with others to add upstream maintainers. > > When we can't get the mai

[Qemu-devel] [PATCH for-2.4] vnc: fix memory leak

2015-07-22 Thread arei.gonglei
From: Gonglei If vnc's password is configured, it will leak memory which cipher variable pointed on every vnc connection. Cc: Daniel P. Berrange Signed-off-by: Gonglei --- ui/vnc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index 1483958..e2697

Re: [Qemu-devel] [PATCH for-2.4] vnc: fix memory leak

2015-07-22 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:08:53PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > If vnc's password is configured, it will leak memory > which cipher variable pointed on every vnc connection. > > Cc: Daniel P. Berrange > Signed-off-by: Gonglei Reviewed-by: Daniel P. Berrange Reg

Re: [Qemu-devel] [PULL for-2.4 0/1] qemu-ga: small documentation versioning fix-up

2015-07-22 Thread Peter Maydell
On 21 July 2015 at 20:51, Michael Roth wrote: > The following changes since commit 774ee4772b6838b78741ea52d4bf26b8922244c5: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20150721' into staging (2015-07-21 > 12:21:08 +0100) > > are available in the git repository at

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 10:58:43AM +0200, Cornelia Huck wrote: > On Wed, 22 Jul 2015 13:59:51 +0800 > Jason Wang wrote: > > > SCSI passthrough was no longer supported in virtio 1.0, so this patch > > fail the get_features() when both 1.0 and scsi is set. And also only > > advertise VIRTIO_BLK_F_S

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 01:59:51PM +0800, Jason Wang wrote: > SCSI passthrough was no longer supported in virtio 1.0, so this patch > fail the get_features() when both 1.0 and scsi is set. And also only > advertise VIRTIO_BLK_F_SCSI for legacy virtio-blk device. > > Signed-off-by: Jason Wang > --

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 01:59:51PM +0800, Jason Wang wrote: > SCSI passthrough was no longer supported in virtio 1.0, so this patch > fail the get_features() when both 1.0 and scsi is set. And also only > advertise VIRTIO_BLK_F_SCSI for legacy virtio-blk device. Why is SCSI passthrough support not

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Stefan Hajnoczi
On Wed, Jul 22, 2015 at 12:24:34AM -0400, Kevin O'Connor wrote: > On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: > > From: Gerd Hoffmann > > > > First draft of a fw_cfg dma interface. Designed as add-on to the > > extisting fw_cfg interface, i.e. there is no select register. There >

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Jason Wang
On 07/22/2015 04:58 PM, Cornelia Huck wrote: > On Wed, 22 Jul 2015 13:59:51 +0800 > Jason Wang wrote: > >> SCSI passthrough was no longer supported in virtio 1.0, so this patch >> fail the get_features() when both 1.0 and scsi is set. And also only >> advertise VIRTIO_BLK_F_SCSI for legacy virti

[Qemu-devel] [PATCH RFC] virtio: set any_layout in virtio core

2015-07-22 Thread Michael S. Tsirkin
Virtio 1 requires this, and all devices are clean by now, so let's do it! Exceptions: - virtio-blk - compat machine types Signed-off-by: Michael S. Tsirkin --- Untested - consider this pseudo-code - it just seems easier to write it in C than try to explain it. include/hw/compat.h

Re: [Qemu-devel] [PATCH v4 0/6] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-22 Thread Richard W.M. Jones
On Tue, Jul 21, 2015 at 04:07:47PM +0200, Paolo Bonzini wrote: > This puts together all pending fixes in a single series. > > Paolo > > v1->v2 > Split some changes to the tests to a separate patch > Fix commit message [Laszlo] > Clarify do...while loop in aio-win32.c [Kevi

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Jason Wang
On 07/22/2015 05:31 PM, Daniel P. Berrange wrote: > On Wed, Jul 22, 2015 at 01:59:51PM +0800, Jason Wang wrote: >> SCSI passthrough was no longer supported in virtio 1.0, so this patch >> fail the get_features() when both 1.0 and scsi is set. And also only >> advertise VIRTIO_BLK_F_SCSI for legac

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Jason Wang
On 07/22/2015 05:25 PM, Michael S. Tsirkin wrote: > On Wed, Jul 22, 2015 at 01:59:51PM +0800, Jason Wang wrote: >> SCSI passthrough was no longer supported in virtio 1.0, so this patch >> fail the get_features() when both 1.0 and scsi is set. And also only >> advertise VIRTIO_BLK_F_SCSI for legac

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Laszlo Ersek
On 07/22/15 10:19, Marc Marí wrote: > On Tue, 21 Jul 2015 21:44:49 +0200 > Laszlo Ersek wrote: > >> On 07/21/15 18:03, Marc Marí wrote: >>> From: Gerd Hoffmann >>> >>> First draft of a fw_cfg dma interface. Designed as add-on to the >>> extisting fw_cfg interface, i.e. there is no select regist

Re: [Qemu-devel] [PULL for-2.4 0/7] update ipxe roms, fix efi support

2015-07-22 Thread Laszlo Ersek
On 07/22/15 11:05, Stefan Hajnoczi wrote: > On Wed, Jul 22, 2015 at 12:58:59AM +0200, Laszlo Ersek wrote: >> On 07/21/15 18:10, Stefan Hajnoczi wrote: >>> On Tue, Jul 21, 2015 at 3:28 PM, Paolo Bonzini wrote: On 21/07/2015 16:25, Peter Maydell wrote: >>> or work >>> with others to add upstrea

[Qemu-devel] [PATCH] virtio: hide legacy features from modern guests

2015-07-22 Thread Michael S. Tsirkin
NOTIFY_ON_EMPTY, ANY_LAYOUT and BAD are only valid on the legacy interface. Hide them from modern guests. Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 4 hw/virtio/virtio-pci.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/hw/virti

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 05:52:29PM +0800, Jason Wang wrote: > > > On 07/22/2015 05:25 PM, Michael S. Tsirkin wrote: > > On Wed, Jul 22, 2015 at 01:59:51PM +0800, Jason Wang wrote: > >> SCSI passthrough was no longer supported in virtio 1.0, so this patch > >> fail the get_features() when both 1.0

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 01:12:45PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 22, 2015 at 05:52:29PM +0800, Jason Wang wrote: > > > > > > On 07/22/2015 05:25 PM, Michael S. Tsirkin wrote: > > > On Wed, Jul 22, 2015 at 01:59:51PM +0800, Jason Wang wrote: > > >> SCSI passthrough was no longer s

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 10:31:45AM +0100, Daniel P. Berrange wrote: > On Wed, Jul 22, 2015 at 01:59:51PM +0800, Jason Wang wrote: > > SCSI passthrough was no longer supported in virtio 1.0, so this patch > > fail the get_features() when both 1.0 and scsi is set. And also only > > advertise VIRTIO_B

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Cornelia Huck
On Wed, 22 Jul 2015 17:35:07 +0800 Jason Wang wrote: > > > On 07/22/2015 04:58 PM, Cornelia Huck wrote: > > On Wed, 22 Jul 2015 13:59:51 +0800 > > Jason Wang wrote: > > > >> SCSI passthrough was no longer supported in virtio 1.0, so this patch > >> fail the get_features() when both 1.0 and scs

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Cornelia Huck
On Wed, 22 Jul 2015 12:21:32 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jul 22, 2015 at 10:58:43AM +0200, Cornelia Huck wrote: > > On Wed, 22 Jul 2015 13:59:51 +0800 > > Jason Wang wrote: > > > > > SCSI passthrough was no longer supported in virtio 1.0, so this patch > > > fail the get_feature

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 12:25:31PM +0200, Cornelia Huck wrote: > On Wed, 22 Jul 2015 12:21:32 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Jul 22, 2015 at 10:58:43AM +0200, Cornelia Huck wrote: > > > On Wed, 22 Jul 2015 13:59:51 +0800 > > > Jason Wang wrote: > > > > > > > SCSI passthrough

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Cornelia Huck
On Wed, 22 Jul 2015 13:32:17 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jul 22, 2015 at 12:25:31PM +0200, Cornelia Huck wrote: > > On Wed, 22 Jul 2015 12:21:32 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jul 22, 2015 at 10:58:43AM +0200, Cornelia Huck wrote: > > > > On Wed, 22 Jul

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Michael S. Tsirkin
On Wed, Jul 22, 2015 at 12:38:40PM +0200, Cornelia Huck wrote: > On Wed, 22 Jul 2015 13:32:17 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Jul 22, 2015 at 12:25:31PM +0200, Cornelia Huck wrote: > > > On Wed, 22 Jul 2015 12:21:32 +0300 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Wed,

Re: [Qemu-devel] [PATCH v2 0/5] For QEMU 2.5: Network traffic dumping for -netdev devices

2015-07-22 Thread Yang Hongyang
Hi Thomas, Jason, Stefan I'm reading the QEMU network subsystem and am thinking implement a network filter between network backend and NIC devices. All packets will pass by this filter, therefore, dump can be easily done with the filter. +--+ +-+

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Cornelia Huck
On Wed, 22 Jul 2015 13:44:14 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jul 22, 2015 at 12:38:40PM +0200, Cornelia Huck wrote: > > On Wed, 22 Jul 2015 13:32:17 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jul 22, 2015 at 12:25:31PM +0200, Cornelia Huck wrote: > > > > On Wed, 22 Jul

[Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Yang Hongyang
This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. TODO: multiqueue support. plugin support. +--+ +-+ +--+ |filter| |frontend(NIC)| | real | | | |

[Qemu-devel] [PATCH for-2.5] ppc/spapr: Use qemu_log_mask() for hcall_dprintf()

2015-07-22 Thread Thomas Huth
To see the output of the hcall_dprintf statements, you currently have to enable the DEBUG_SPAPR_HCALLS macro in include/hw/ppc/spapr.h. This is ugly because a) not every user who wants to debug guest problems can or wants to recompile QEMU to be able to see such issues, and b) since this macro is d

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 06:55:36PM +0800, Yang Hongyang wrote: > This patch add a net filter between network backend and NIC devices. > All packets will pass by this filter. > TODO: > multiqueue support. > plugin support. > > +--+ +-+ > +--+ |

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Andrew Jones
On Tue, Jul 21, 2015 at 09:44:49PM +0200, Laszlo Ersek wrote: > On 07/21/15 18:03, Marc Marí wrote: > > +static void fw_cfg_dma_transfer(FWCfgState *s) > > +{ > > +dma_addr_t len; > > +uint8_t *ptr; > > +uint32_t i; > > + > > +if (s->dma_ctl & FW_CFG_DMA_CTL_ERROR) { > > +re

Re: [Qemu-devel] [PATCH v4 0/6] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-22 Thread Stefan Hajnoczi
On Tue, Jul 21, 2015 at 04:07:47PM +0200, Paolo Bonzini wrote: > This puts together all pending fixes in a single series. > > Paolo > > v1->v2 > Split some changes to the tests to a separate patch > Fix commit message [Laszlo] > Clarify do...while loop in aio-win32.c [Kevi

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Laszlo Ersek
On 07/22/15 13:30, Andrew Jones wrote: > On Tue, Jul 21, 2015 at 09:44:49PM +0200, Laszlo Ersek wrote: >> On 07/21/15 18:03, Marc Marí wrote: >>> +static void fw_cfg_dma_transfer(FWCfgState *s) >>> +{ >>> +dma_addr_t len; >>> +uint8_t *ptr; >>> +uint32_t i; >>> + >>> +if (s->dma_ctl

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Paolo Bonzini
On 22/07/2015 12:19, Michael S. Tsirkin wrote: > > > SCSI passthrough was no longer supported in virtio 1.0, so this patch > > > fail the get_features() when both 1.0 and scsi is set. And also only > > > advertise VIRTIO_BLK_F_SCSI for legacy virtio-blk device. > > > > Why is SCSI passthrough su

Re: [Qemu-devel] [PULL for-2.4 0/7] update ipxe roms, fix efi support

2015-07-22 Thread Stefan Hajnoczi
On Wed, Jul 22, 2015 at 11:05 AM, Laszlo Ersek wrote: > On 07/22/15 11:05, Stefan Hajnoczi wrote: >> On Wed, Jul 22, 2015 at 12:58:59AM +0200, Laszlo Ersek wrote: >>> On 07/21/15 18:10, Stefan Hajnoczi wrote: On Tue, Jul 21, 2015 at 3:28 PM, Paolo Bonzini wrote: > On 21/07/2015 16:25, Pe

[Qemu-devel] [PULL v2 for-2.4 v2 1/7] mirror: Speed up bitmap initial scanning

2015-07-22 Thread Stefan Hajnoczi
From: Fam Zheng Limiting to sectors_per_chunk for each bdrv_is_allocated_above is slow, because the underlying protocol driver would issue much more queries than necessary. We should coalesce the query. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Message-id: <1436413678-7114-4-git-se

[Qemu-devel] [PULL v2 for-2.4 v2 0/7] Block patches

2015-07-22 Thread Stefan Hajnoczi
The following changes since commit 774ee4772b6838b78741ea52d4bf26b8922244c5: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20150721' into staging (2015-07-21 12:21:08 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-requ

[Qemu-devel] [PULL v2 for-2.4 v2 3/7] tests: remove irrelevant assertions from test-aio

2015-07-22 Thread Stefan Hajnoczi
From: Paolo Bonzini In these tests, the purpose of the initial calls to aio_poll and g_main_context_iteration is simply to put the AioContext in a known state; the return value of the function does not really matter. The next patch will change those return values; change the assertions to a whil

[Qemu-devel] [PULL v2 for-2.4 v2 6/7] AioContext: fix broken placement of event_notifier_test_and_clear

2015-07-22 Thread Stefan Hajnoczi
From: Paolo Bonzini event_notifier_test_and_clear must be called before processing events. Otherwise, an aio_poll could "eat" the notification before the main I/O thread invokes ppoll(). The main I/O thread then never wakes up. This is an example of what could happen: i/o thread vcpu t

[Qemu-devel] [PULL v2 for-2.4 v2 5/7] AioContext: fix broken ctx->dispatching optimization

2015-07-22 Thread Stefan Hajnoczi
From: Paolo Bonzini This patch rewrites the ctx->dispatching optimization, which was the cause of some mysterious hangs that could be reproduced on aarch64 KVM only. The hangs were indirectly caused by aio_poll() and in particular by flash memory updates's call to blk_write(), which invokes aio_p

[Qemu-devel] [PULL v2 for-2.4 v2 4/7] aio-win32: reorganize polling loop

2015-07-22 Thread Stefan Hajnoczi
From: Paolo Bonzini Preparatory bugfixes and tweaks to the loop before the next patch: - disable dispatch optimization during aio_prepare. This fixes a bug. - do not modify "blocking" until after the first WaitForMultipleObjects call. This is needed in the next patch. - change the loop to do

[Qemu-devel] [PULL v2 for-2.4 v2 2/7] qemu-timer: initialize "timers_done_ev" to set

2015-07-22 Thread Stefan Hajnoczi
From: Paolo Bonzini The normal value for the event is to be set. If we do not do this, pause_all_vcpus (through qemu_clock_enable) hangs unless timerlist_run_timers has been run at least once for the timerlist. This can happen with the following patches, that make aio_notify do nothing most of t

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 01:40:25PM +0200, Paolo Bonzini wrote: > > > On 22/07/2015 12:19, Michael S. Tsirkin wrote: > > > > SCSI passthrough was no longer supported in virtio 1.0, so this patch > > > > fail the get_features() when both 1.0 and scsi is set. And also only > > > > advertise VIRTIO_B

[Qemu-devel] [PULL v2 for-2.4 v2 7/7] AioContext: optimize clearing the EventNotifier

2015-07-22 Thread Stefan Hajnoczi
From: Paolo Bonzini It is pretty rare for aio_notify to actually set the EventNotifier. It can happen with worker threads such as thread-pool.c's, but otherwise it should never be set thanks to the ctx->notify_me optimization. The previous patch, unfortunately, added an unconditional call to ev

Re: [Qemu-devel] [PATCH v2] cpu-exec: Do not invalidate original TB in cpu_exec_nocache()

2015-07-22 Thread Paolo Bonzini
On 22/07/2015 08:15, Sergey Fedorov wrote: > ping. Hi, this patch was a bit late for QEMU 2.4, but it will be included in 2.5. Paolo > On 30.06.2015 12:35, Sergey Fedorov wrote: >> > Instead of invalidating an original TB in cpu_exec_nocache() >> > prematurely, just save a link to it in the te

Re: [Qemu-devel] [PATCH V3 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-22 Thread Paolo Bonzini
On 22/07/2015 13:46, Daniel P. Berrange wrote: > IIUC, the SCSI passthrough feature for virtio-blk is enabled by > setting the 'scsi=on' property on the virtio-blk device, which is > exposed by libvirt with XML: > > > > > > > > (For use with virtio-scsi you'd just

[Qemu-devel] [PATCH] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
On some (but not all) systems: $ qemu-img create -f qcow2 overlay -b ssh://xen/ Segmentation fault It turns out this happens when inet_connect returns NULL in the following code, but errno is not set (0). s->sock = inet_connect(s->hostport, errp); if (s->sock < 0) { ret = -errno;

Re: [Qemu-devel] [PULL 1/2] target-mips: replace cpu_save/cpu_load with VMStateDescription

2015-07-22 Thread Peter Maydell
On 11 March 2015 at 16:15, Leon Alrae wrote: > Create VMStateDescription for MIPS CPU. The new structure contains exactly the > same fields as before, therefore leaving existing version_id. > > Signed-off-by: Leon Alrae Hi. I've just noticed that this commit has a bug, which provokes a warning o

Re: [Qemu-devel] Self-modifying test case for mttcg

2015-07-22 Thread Andrew Jones
On Tue, Jul 21, 2015 at 12:58:56PM +0200, Alexander Spyridakis wrote: > Hello all, > > You can find a new self-modifying test case in the following branch: > > git clone https://git.virtualopensystems.com/dev/tcg_baremetal_tests.git -b > > smc_test > > For each core, the test will run a small as

[Qemu-devel] [PATCH for-2.4 0/2] framebuffer: automatically set DIRTY_MEMORY_VGA

2015-07-22 Thread Paolo Bonzini
The pxa2xx_lcd, omap_lcdc, pl110 and milkymist-vgafb devices use framebuffer.c to render an image from a shared memory framebuffer. With KVM, DIRTY_MEMORY_VGA always had to be enabled explicitly on RAM memory regions that can be used for the framebuffer, and the 2.4 changes to dirty bitmap handling

[Qemu-devel] [PATCH for-2.4 2/2] framebuffer: set DIRTY_MEMORY_VGA on RAM that is used for the framebuffer

2015-07-22 Thread Paolo Bonzini
The MemoryRegionSection contains enough information to access the RAM region underlying the framebuffer, and can be cached inside the display device. By doing this, the new framebuffer_update_memory_section function can enable dirty memory logging on the relevant RAM region. The function must be

[Qemu-devel] [PATCH for-2.4 1/2] memory: count number of active VGA logging clients

2015-07-22 Thread Paolo Bonzini
For a board that has multiple framebuffer devices, both of them might want to use DIRTY_MEMORY_VGA on the same memory region. The lack of reference counting in memory_region_set_log makes this very awkward to implement. Suggested-by: Peter Maydell Signed-off-by: Paolo Bonzini --- include/exec/m

Re: [Qemu-devel] [PATCH v2] target-arm: kvm: Differentiate registers based on write-back levels

2015-07-22 Thread Claudio Fontana
On 17.07.2015 17:39, Christoffer Dall wrote: > On Fri, Jul 17, 2015 at 03:29:56PM +0100, Peter Maydell wrote: >> On 16 July 2015 at 12:34, Christoffer Dall >> wrote: >>> Some registers like the CNTVCT register should only be written to the >>> kernel as part of machine initialization or on vmload

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-22 Thread Thomas Huth
On 22/07/15 12:55, Yang Hongyang wrote: > This patch add a net filter between network backend and NIC devices. > All packets will pass by this filter. > TODO: > multiqueue support. > plugin support. > > +--+ +-+ > +--+ |filter| |

Re: [Qemu-devel] Self-modifying test case for mttcg

2015-07-22 Thread Paolo Bonzini
On 22/07/2015 14:38, Andrew Jones wrote: > I took a quick look at this and see issues with the test code. First, > you're spinning on a stack variable with this, > > /* Wait for our turn */ > while(next_cpu != cpu); > > next_cpu needs to be global, and incremented atomically. I haven't

[Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
v2: I fixed several mistakes in the commit message. The code change is the same as before. Rich.

[Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
On some (but not all) systems: $ qemu-img create -f qcow2 overlay -b ssh://xen/ Segmentation fault It turns out this happens when inet_connect returns -1 in the following code, but errno == 0. s->sock = inet_connect(s->hostport, errp); if (s->sock < 0) { ret = -errno; goto er

Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 02:07:22PM +0100, Richard W.M. Jones wrote: > On some (but not all) systems: > > $ qemu-img create -f qcow2 overlay -b ssh://xen/ > Segmentation fault > > It turns out this happens when inet_connect returns -1 in the > following code, but errno == 0. > > s->sock = i

Re: [Qemu-devel] [PATCH] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
On Wed, Jul 22, 2015 at 01:07:53PM +0100, Richard W.M. Jones wrote: > On some (but not all) systems: > > $ qemu-img create -f qcow2 overlay -b ssh://xen/ > Segmentation fault > > It turns out this happens when inet_connect returns NULL in the > following code, but errno is not set (0). Bleah

Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
On Wed, Jul 22, 2015 at 02:10:51PM +0100, Daniel P. Berrange wrote: > There are a reasonable number of other uses of inet_connect() in QEMU, > so can't we fix inet_connect() itself to set EINVAL in the error case > instead of just fixing one caller. The only users I can find are block/nbd.c and bl

Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Jeff Cody
On Wed, Jul 22, 2015 at 02:07:22PM +0100, Richard W.M. Jones wrote: > On some (but not all) systems: > > $ qemu-img create -f qcow2 overlay -b ssh://xen/ > Segmentation fault > > It turns out this happens when inet_connect returns -1 in the > following code, but errno == 0. > > s->sock = i

  1   2   3   >