[Qemu-devel] [PATCH v2] xen/HVM: atomically access pointers in bufioreq handling

2015-07-23 Thread Jan Beulich
The number of slots per page being 511 (i.e. not a power of two) means that the (32-bit) read and write indexes going beyond 2^32 will likely disturb operation. The hypervisor side gets I/O req server creation extended so we can indicate that we're using suitable atomic accesses where needed, allow

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-23 Thread Jan Beulich
>>> On 22.07.15 at 19:24, wrote: > I'll queue this change up for the next QEMU release cycle. Thanks - v2 (with the adjusted description) just sent. It would however be nice for our variant in 4.6 to also gain this, perhaps independent of upstream's schedule. Jan

Re: [Qemu-devel] [PATCH 4/4] vhost-user: unit test for new messages

2015-07-23 Thread Ouyang, Changchun
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Friday, July 17, 2015 10:10 PM > To: qemu-devel@nongnu.org > Cc: marcandre.lur...@gmail.com; haifeng@huawei.com; > thibaut.col...@6wind.com; Ouyang, Changchun; f...@redhat.com; Peter > Maydell; Nikolay Ni

Re: [Qemu-devel] [PATCH] qmp-shell: add documentation

2015-07-23 Thread Markus Armbruster
John Snow writes: > On 07/02/2015 11:31 AM, Luiz Capitulino wrote: >> On Wed, 1 Jul 2015 14:25:49 -0400 >> John Snow wrote: >> >>> I should probably document the changes that were made. John, what do you mean here? >>> Signed-off-by: John Snow >> >> Looks good to me, CC'ing maintainer. Lu

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

2015-07-23 Thread Amit Shah
On (Mon) 13 Jul 2015 [15:15:07], Juan Quintela wrote: > "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 transit

Re: [Qemu-devel] [PATCH v7 30/42] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command

2015-07-23 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:43], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add MIG_RP_MSG_REQ_PAGES command on Return path for the postcopy > destination to request a page from the source. > > Signed-off-by: Dr. David Alan Gilbert > --- a/migration/migration.c >

Re: [Qemu-devel] User space vs kernel space instructions distribution.

2015-07-23 Thread Shlomo Pongratz
See inline On Wednesday, July 22, 2015, Christopher Covington wrote: > On 07/14/2015 04:45 AM, Peter Maydell wrote: > > On 14 July 2015 at 09:32, Shlomo Pongratz > wrote: > >> Hi, > >> > >> I'm running aarm64 QEMU and I'm counting the number of instructions > which > >> "belong" to user space v

Re: [Qemu-devel] [PATCH v2 2/2] blockdev: always compile in -drive aio= parsing

2015-07-23 Thread Markus Armbruster
Stefan Hajnoczi writes: > CONFIG_LINUX_AIO is an implementation detail of raw-posix.c. Don't > mention CONFIG_LINUX_AIO in blockdev.c. Let raw-posix.c decide what to To be precise: "raw-posix.c or raw-win32.c", or maybe "the block driver". > do with BDRV_O_NATIVE_AIO if CONFIG_LINUX_AIO is no

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

2015-07-23 Thread Gonglei
On 2015/7/23 13:36, Paolo Bonzini wrote: > > > 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

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

2015-07-23 Thread Kevin Wolf
Am 23.07.2015 um 08:47 hat Markus Armbruster geschrieben: > 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 p

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 08:32, Fam Zheng wrote: > > What is realized in this series is similar except the "disable, poll, enable" > method, instead the bit mask of interesting client types is passed to > aio_poll() (to be exact, passed to aio_poll_clients()). That is because, > aio_poll may release the Ai

Re: [Qemu-devel] [PATCH v2 0/2] block: warn about aio=native if libaio is unavailable

2015-07-23 Thread Kevin Wolf
Am 23.07.2015 um 10:08 hat Paolo Bonzini geschrieben: > > > On 23/07/2015 10:03, Markus Armbruster wrote: > > > >> > v2: > >> > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's > >> > business > >> >[Kevin] > >> > * Print the warning in the same way as the aio=native,cache

Re: [Qemu-devel] [PATCH v4] qemu-char: Fix missed data on unix socket

2015-07-23 Thread Nils Carlson
On Tue, 21 Jul 2015, Paolo Bonzini wrote: On 19/07/2015 22:39, pyssl...@ludd.ltu.se wrote: From: Nils Carlson Commit 812c1057 introduced HUP detection on unix and tcp sockets prior to a read in tcp_chr_read. This unfortunately broke CloudStack 4.2 which relied on the old behaviour where dat

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

2015-07-23 Thread Stefan Hajnoczi
On Wed, Jul 22, 2015 at 9:08 PM, Laszlo Ersek wrote: > On 07/22/15 13:42, Stefan Hajnoczi wrote: >> 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, Stefa

Re: [Qemu-devel] [PATCH v2 0/2] block: warn about aio=native if libaio is unavailable

2015-07-23 Thread Markus Armbruster
Stefan Hajnoczi writes: > v2: > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business >[Kevin] > * Print the warning in the same way as the aio=native,cache.direct=off >deprecation warning [Kevin] > > Open question: what about the Windows case? We now pass the > FIL

Re: [Qemu-devel] User space vs kernel space instructions distribution.

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 08:57, Shlomo Pongratz wrote: > I have an array of the three address spaces user/unmapped/kernel and array > of 4 els and I'm add the TB's icount to the appropriate entry according to > the env->pc and arm_current_el(env) before the block execution. > As I wrote before I disable

[Qemu-devel] [RFC PATCH 10/11] block: Replace nested aio_poll with bdrv_aio_poll

2015-07-23 Thread Fam Zheng
Just a manual search and replace. No semantic change here. Signed-off-by: Fam Zheng --- block.c | 2 +- block/curl.c | 2 +- block/io.c| 18 +- block/nfs.c | 2 +- block/qed-table.c | 8 blockjob.c| 2 +- qemu-img.c| 2 +

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

2015-07-23 Thread Jason Wang
On 07/22/2015 05:36 PM, Michael S. Tsirkin wrote: > Virtio 1 requires this, I think you mean transitional not virtio 1? > and all devices are clean by now, > so let's do it! > > Exceptions: > - virtio-blk > - compat machine types > > Signed-off-by: Michael S. Tsirkin > --- > > Unteste

[Qemu-devel] [RFC PATCH 06/11] nbd: Mark fd handlers client type as "nbd server"

2015-07-23 Thread Fam Zheng
So we could distinguish it from "protocol" to avoid handling in nested aio polls. Signed-off-by: Fam Zheng --- include/block/aio.h | 1 + nbd.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/block/aio.h b/include/block/aio.h index 1895a74..088f9ce

[Qemu-devel] [RFC PATCH 09/11] block: Introduce bdrv_aio_poll

2015-07-23 Thread Fam Zheng
This call is introduced simply as a wrapper of aio_poll, but it makes it is easy to change the polled client types. Signed-off-by: Fam Zheng --- block/io.c| 5 + include/block/block.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/block/io.c b/block/io.c index d4bc83b..fb

[Qemu-devel] [RFC PATCH 05/11] block: Mark fd handlers as "protocol"

2015-07-23 Thread Fam Zheng
The "protocol" type includes all the fd handlers and event notifiers used by block layer, especially those that should be polled in a nested event loop. Signed-off-by: Fam Zheng --- block/curl.c| 8 block/iscsi.c | 4 ++-- block/linux-aio.c | 4 ++-- block/nbd-client.

[Qemu-devel] [RFC PATCH 07/11] aio: Mark ctx->notifier's client type as "context"

2015-07-23 Thread Fam Zheng
It is important to include this for any blocking poll, on the other hand it is also OK to exclude it otherwise. Signed-off-by: Fam Zheng --- aio-posix.c | 3 +++ aio-win32.c | 3 +++ async.c | 4 ++-- include/block/aio.h | 1 + 4 files changed, 9 insertions(+), 2 dele

[Qemu-devel] [RFC PATCH 03/11] aio-posix: Introduce aio_poll_clients

2015-07-23 Thread Fam Zheng
This new API will allow limiting the scope of polled fds. The parameter client_mask is a bit mask of the polled client types. Signed-off-by: Fam Zheng --- aio-posix.c | 19 ++- include/block/aio.h | 11 ++- 2 files changed, 24 insertions(+), 6 deletions(-) diff -

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

2015-07-23 Thread Cornelia Huck
On Wed, 22 Jul 2015 19:34:31 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jul 22, 2015 at 06:11:16PM +0200, Cornelia Huck wrote: > > On Wed, 22 Jul 2015 17:53:47 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jul 22, 2015 at 12:55:22PM +0200, Cornelia Huck wrote: > > > > On Wed, 22 Jul

Re: [Qemu-devel] [PATCH v4] qemu-char: Fix missed data on unix socket

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 10:24, Nils Carlson wrote: > Any luck with this fixup? Let me know if you need anything more from me, > code or testing. Just busy, I'll send a pull request today or tomorrow. Paolo

Re: [Qemu-devel] [PATCH v2 0/2] block: warn about aio=native if libaio is unavailable

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 10:03, Markus Armbruster wrote: > >> > v2: >> > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business >> >[Kevin] >> > * Print the warning in the same way as the aio=native,cache.direct=off >> >deprecation warning [Kevin] >> > >> > Open question: what

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

2015-07-23 Thread Jason Wang
On 07/22/2015 06:11 PM, Michael S. Tsirkin wrote: > 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 Should we do the same for device specific legacy feature bits? > --- > include/hw/virtio/vi

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 11:07, Cornelia Huck wrote: > > Paolo said this specific feature has been deprecated for years, no > > one should be using it, so we dropped it from spec. > > Nothing wrong with that. But "it's deprecated" does not mean "nobody's > using it", I fear. The question is: Should qemu acc

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

2015-07-23 Thread Peter Maydell
On 22 July 2015 at 13:46, Paolo Bonzini wrote: > 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

Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface

2015-07-23 Thread Paolo Bonzini
On 16/07/2015 16:21, Jason J. Herne wrote: > 1. Using atomic operations to manage throttle_percentage. I'm not sure > where atomics are applicable here. If this is still a concern hopefully > someone can explain. I would use atomic_read/atomic_set in cpu_throttle_set, cpu_throttle_stop, cpu_thr

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-23 Thread Stefano Stabellini
On Thu, 23 Jul 2015, Jan Beulich wrote: > >>> On 22.07.15 at 19:24, wrote: > > I'll queue this change up for the next QEMU release cycle. > > Thanks - v2 (with the adjusted description) just sent. > > It would however be nice for our variant in 4.6 to also gain this, > perhaps independent of ups

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

2015-07-23 Thread Andrew Jones
On Thu, Jul 23, 2015 at 01:12:30AM +0200, Alexander Spyridakis wrote: > Hello Andrew, > > First, thanks for the comments. > > On 22 July 2015 at 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,

Re: [Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable

2015-07-23 Thread Christian Borntraeger
Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi: > raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable. > It is confusing when aio=native performance is identical to aio=threads > because the binary was accidentally built without libaio. > > Print a deprecation warning if -drive

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-23 Thread Stefano Stabellini
On Thu, 23 Jul 2015, Stefano Stabellini wrote: > On Thu, 23 Jul 2015, Jan Beulich wrote: > > >>> On 22.07.15 at 19:24, wrote: > > > I'll queue this change up for the next QEMU release cycle. > > > > Thanks - v2 (with the adjusted description) just sent. > > > > It would however be nice for our v

Re: [Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable

2015-07-23 Thread Denis V. Lunev
On 07/23/2015 01:09 PM, Christian Borntraeger wrote: Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi: raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable. It is confusing when aio=native performance is identical to aio=threads because the binary was accidentally built without

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

2015-07-23 Thread Cornelia Huck
On Thu, 23 Jul 2015 11:37:44 +0200 Paolo Bonzini wrote: > On 23/07/2015 11:07, Cornelia Huck wrote: > > > Paolo said this specific feature has been deprecated for years, no > > > one should be using it, so we dropped it from spec. > > > > Nothing wrong with that. But "it's deprecated" does not me

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

2015-07-23 Thread Christian Borntraeger
Am 22.07.2015 um 11:36 schrieb 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 Is this targetted for 2.4 or 2.5? Pushing all the 1.0 stuff in 2.4 while in hard freeze seems a bit dang

Re: [Qemu-devel] [Xen-devel] [PATCH v2] xen/HVM: atomically access pointers in bufioreq handling

2015-07-23 Thread Fabio Fantoni
Il 23/07/2015 08:59, Jan Beulich ha scritto: The number of slots per page being 511 (i.e. not a power of two) means that the (32-bit) read and write indexes going beyond 2^32 will likely disturb operation. The hypervisor side gets I/O req server creation extended so we can indicate that we're usi

Re: [Qemu-devel] [PATCH v2] xen/HVM: atomically access pointers in bufioreq handling

2015-07-23 Thread Stefano Stabellini
On Thu, 23 Jul 2015, Jan Beulich wrote: > The number of slots per page being 511 (i.e. not a power of two) means > that the (32-bit) read and write indexes going beyond 2^32 will likely > disturb operation. The hypervisor side gets I/O req server creation > extended so we can indicate that we're us

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

2015-07-23 Thread Peter Maydell
On 22 July 2015 at 13:46, Paolo Bonzini wrote: > 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

[Qemu-devel] [PATCH] exec: use macro for alignment

2015-07-23 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 7d60e15..f84b485 100644 --- a/exec.c +++ b/exec.c @@ -1153,6 +1153,8 @@ static long gethugepagesize(const char *path, Error **errp) return fs.f_bsize; } +#d

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 12:22, Peter Maydell wrote: > I have a few minor nits below, but the patch works and looks > good overall. > > At the moment the pattern in all the callsites is > if (s->invalidate) { > framebuffer_update_memory_section(...); > } > framebuffer_update_display(...); > > What

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

2015-07-23 Thread Christian Borntraeger
Am 22.07.2015 um 16:18 schrieb Paolo Bonzini: > Otherwise, grace periods are detected too early! I guess this or Wens proposal is still necessary for 2.4? > > Signed-off-by: Paolo Bonzini > --- > cpus.c| 6 ++ > iothread.c| 5 + > migration/migration.c | 4

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 12:30, Christian Borntraeger wrote: > Am 22.07.2015 um 16:18 schrieb Paolo Bonzini: >> Otherwise, grace periods are detected too early! > > I guess this or Wens proposal is still necessary for 2.4? Yes. I think this is better for 2.4. There are threads that do not need RCU, for

Re: [Qemu-devel] [PATCH] exec: use macro for alignment

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 12:20, Chen Hanxiao wrote: > > +#define ALIGN(x, y) (((x)+(y)-1) & ~((y)-1)) > + > static void *file_ram_alloc(RAMBlock *block, > ram_addr_t memory, > const char *path, > @@ -1207,7 +1209,7 @@ static void *file_ram_alloc(

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

2015-07-23 Thread Cornelia Huck
On Wed, 22 Jul 2015 12:36:22 +0300 "Michael S. Tsirkin" wrote: > 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 - i

Re: [Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for KVMis

2015-07-23 Thread Shlomo Pongratz
Hi, This Doesn't compile, a problem with KVM_DEV_TYPE_ARM_VGIC_V2. I assume this is include file issue as it exists in linux-headers/linux/kvm.h Note that everything should compile also for TCG only. Best regards, S.P. On Wednesday, July 22, 2015, Pavel Fedin wrote: > This patch introduces k

[Qemu-devel] [RFC] memory: emulate ioeventfd

2015-07-23 Thread Stefan Hajnoczi
The ioeventfd mechanism is used by vhost, dataplane, and virtio-pci to turn guest MMIO/PIO writes into eventfd file descriptor events. This allows arbitrary threads to be notified when the guest writes to a specific MMIO/PIO address. qtest and TCG do not support ioeventfd because memory writes ar

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

2015-07-23 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 1/2] memory: count number of active VGA logging clients

2015-07-23 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 Reviewed-by: Peter Maydell Signed-off-by: Paolo

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

2015-07-23 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

Re: [Qemu-devel] error building latest QEMU

2015-07-23 Thread Claudio Fontana
On 22.07.2015 19:57, Stefan Weil wrote: > Am 22.07.2015 um 18:01 schrieb Claudio Fontana: >> Hello, >> >> with the following configuration: >> >> ./configure --enable-fdt --disable-sdl --disable-vnc --enable-debug >> --disable-gtk --enable-kvm --target-list=aarch64-softmmu >> >> I get: >> >> vl.c:

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

2015-07-23 Thread Wen Congyang
On 07/23/2015 06:42 PM, Paolo Bonzini wrote: > > > On 23/07/2015 12:30, Christian Borntraeger wrote: >> Am 22.07.2015 um 16:18 schrieb Paolo Bonzini: >>> Otherwise, grace periods are detected too early! >> >> I guess this or Wens proposal is still necessary for 2.4? > > Yes. I think this is bet

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 13:04, Wen Congyang wrote: > > Yes. I think this is better for 2.4. There are threads that do not > > need RCU, for example the thread-pool.c worker threads, so it may just > > If the thread doesn't use RCU, rcu_register_thread() is harmless, is it right? Every rcu_register_threa

[Qemu-devel] [PATCH 3/5] hw/block/nvme.c: Use pow2ceil() rather than hand-calculation

2015-07-23 Thread Peter Maydell
Use pow2ceil() to round up to the next power of 2, rather than an inline calculation. Signed-off-by: Peter Maydell --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 40d4880..5da41b2 100644 --- a/hw/block/nvme.c +++ b/h

Re: [Qemu-devel] [PATCH 0/5] replace qemu_fls() with pow2ceil()/pow2floor()

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 13:08, Peter Maydell wrote: > We have a qemu_fls() function which is just a silly wrapper > around clz32() and which is used in only a handful of places > in the codebase. It turns out that all of those are really > trying to round up or down to a power of 2, which is something > we

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

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 12:02, Paolo Bonzini wrote: > 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

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 13:13, Peter Maydell wrote: >> > + * Negative if the framebuffer is stored in the opposite order (e.g. > should these be "i.e.", or do we allow the source framebuffer to be > either way round? I think we do, that's why I used "e.g.". Paolo >> > + * bottom-to-top) compared to the

Re: [Qemu-devel] [PATCH] xen/HVM: atomically access pointers in bufioreq handling

2015-07-23 Thread Jan Beulich
>>> On 23.07.15 at 12:04, wrote: > On Thu, 23 Jul 2015, Jan Beulich wrote: >> >>> On 22.07.15 at 19:24, wrote: >> > I'll queue this change up for the next QEMU release cycle. >> >> Thanks - v2 (with the adjusted description) just sent. >> >> It would however be nice for our variant in 4.6 to al

[Qemu-devel] [PATCH 4/5] exec.c: Use pow2floor() rather than hand-calculation

2015-07-23 Thread Peter Maydell
Use pow2floor() to round down to the nearest power of 2, rather than an inline calculation. Signed-off-by: Peter Maydell --- exec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 7d60e15..4710e2d 100644 --- a/exec.c +++ b/exec.c @@ -2371,9 +2371,7 @@

[Qemu-devel] [PATCH 5/5] Remove unused qemu_fls function

2015-07-23 Thread Peter Maydell
Nothing uses qemu_fls() any more, so delete it. Signed-off-by: Peter Maydell --- include/qemu-common.h | 1 - util/cutils.c | 5 - 2 files changed, 6 deletions(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index 237d654..bc6f8f8 100644 --- a/include/qemu-common.h +++

[Qemu-devel] [PATCH 2/5] hw/virtio/virtio-pci: Use pow2ceil() rather than hand-calculation

2015-07-23 Thread Peter Maydell
Use the utility function pow2ceil() for rounding up to the next largest power of 2, rather than inline calculation. Signed-off-by: Peter Maydell --- hw/virtio/virtio-pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

Re: [Qemu-devel] [PATCH 7/7] error: On abort, report where the error was created

2015-07-23 Thread Markus Armbruster
Eric Blake writes: > On 07/22/2015 07:54 AM, Markus Armbruster wrote: > >>> +#define error_setg(errp, fmt, ...) \ +error_setg_internal((errp), __FILE__, __LINE__, (fmt), ## __VA_ARGS__) +void error_setg_internal(Error **errp, const char *src, int line, +

[Qemu-devel] [PATCH 0/5] replace qemu_fls() with pow2ceil()/pow2floor()

2015-07-23 Thread Peter Maydell
We have a qemu_fls() function which is just a silly wrapper around clz32() and which is used in only a handful of places in the codebase. It turns out that all of those are really trying to round up or down to a power of 2, which is something we have utility functions for. This series replaces all

[Qemu-devel] [PATCH 1/5] hw/pci: Use pow2ceil() rather than hand-calculation

2015-07-23 Thread Peter Maydell
A couple of places in hw/pci use an inline calculation to round a size up to the next largest power of 2. We have a utility routine for this, so use it. (The behaviour of the old code is different if the size value is 0 -- it would leave it as 0 rather than rounding up to 1, but in both cases we k

[Qemu-devel] [PATCH] arm/virt: Add high MMIO PCI region, 2G in size

2015-07-23 Thread Pavel Fedin
This large region is necessary for some devices like ivshmem and video cards Signed-off-by: Pavel Fedin --- A small merge conflict in virt.h is possible when applying the patch to current master. It is caused by change made by my vGICv3 series (VIRT_GIC_V2M changed). --- hw/arm/virt.c

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

2015-07-23 Thread Fam Zheng
On Thu, 07/23 10:15, Paolo Bonzini wrote: > > > On 23/07/2015 08:32, Fam Zheng wrote: > > > > What is realized in this series is similar except the "disable, poll, > > enable" > > method, instead the bit mask of interesting client types is passed to > > aio_poll() (to be exact, passed to aio_po

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

2015-07-23 Thread Stefan Hajnoczi
On Wed, Jul 22, 2015 at 10:57:16PM +0800, Yang Hongyang wrote: > Hi Stefan, > > On 07/22/2015 09:26 PM, Stefan Hajnoczi wrote: > >On Wed, Jul 22, 2015 at 11:55 AM, Yang Hongyang > >wrote: > >>This patch add a net filter between network backend and NIC devices. > >>All packets will pass by this f

Re: [Qemu-devel] [PATCH] arm/virt: Add high MMIO PCI region, 2G in size

2015-07-23 Thread Alexander Graf
On 23.07.15 13:42, Pavel Fedin wrote: > This large region is necessary for some devices like ivshmem and video cards > > Signed-off-by: Pavel Fedin > --- > A small merge conflict in virt.h is possible when applying the patch to > current master. It is > caused by change made by my vGICv3 seri

Re: [Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable

2015-07-23 Thread Kevin Wolf
Am 23.07.2015 um 12:09 hat Christian Borntraeger geschrieben: > Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi: > > raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable. > > It is confusing when aio=native performance is identical to aio=threads > > because the binary was acciden

Re: [Qemu-devel] [PATCH v2 0/2] block: warn about aio=native if libaio is unavailable

2015-07-23 Thread Stefan Hajnoczi
On Thu, Jul 23, 2015 at 10:03:32AM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > v2: > > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business > >[Kevin] > > * Print the warning in the same way as the aio=native,cache.direct=off > >deprecation warni

Re: [Qemu-devel] [PATCH] Add another sanity check to smp_parse() function

2015-07-23 Thread Igor Mammedov
On Wed, 22 Jul 2015 15:59:50 +0200 Thomas Huth wrote: > The code in smp_parse already checks the topology information for > sockets * cores * threads < cpus and bails out with an error in > that case. However, it is still possible to supply a bad configuration > the other way round, e.g. with: >

Re: [Qemu-devel] [PATCH v7 31/42] Page request: Process incoming page request

2015-07-23 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:44], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > On receiving MIG_RPCOMM_REQ_PAGES look up the address and > queue the page. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Amit

Re: [Qemu-devel] [PATCH] qemu-doc: fix typos

2015-07-23 Thread Gonglei
On 2015/7/3 17:59, Peter Maydell wrote: > On 3 July 2015 at 10:50, wrote: >> From: Gonglei >> >> Signed-off-by: Gonglei > > Reviewed-by: Peter Maydell > > thanks > -- PMM > Hi, Paolo Would you pick up this patch for 2.4-rc3? It's trivial but make sense and no harm. Regards, -Gonglei

Re: [Qemu-devel] [PATCH RFC v2 29/47] qapi: Replace dirty is_c_ptr() by method c_null()

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > is_c_ptr() looks whether the end of the C text for the type looks like > a pointer. Works, but is fragile. > > We now have a better tool: use QAPISchemaType method c_null(). The > initializers for non-pointers become prettier: 0, false or the >

Re: [Qemu-devel] [PATCH RFC v2 22/47] qapi: QAPISchema code generation helper methods

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > New methods c_name(), c_type(), c_null(), json_type(), > alternate_qtype(). > > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 72 > +++-- > 1 file changed, 65 insertions(+), 7 del

Re: [Qemu-devel] [PATCH] qemu-doc: fix typos

2015-07-23 Thread Gonglei
On 2015/7/23 20:26, Gonglei wrote: > On 2015/7/3 17:59, Peter Maydell wrote: >> On 3 July 2015 at 10:50, wrote: >>> From: Gonglei >>> >>> Signed-off-by: Gonglei >> >> Reviewed-by: Peter Maydell >> >> thanks >> -- PMM >> > Hi, Paolo > > Would you pick up this patch for 2.4-rc3? > It's trivial

Re: [Qemu-devel] [PATCH RFC v2 30/47] qapi: De-duplicate enum code generation

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Duplicated in commit 21cd70d. Yes, we can't import qapi-types, but > that's no excuse. Move the helpers from qapi-types.py to qapi.py, and > replace the duplicates in qapi-event.py. > > The generated event enumeration type gains a _MAX member,

[Qemu-devel] [PATCH v3 0/3] block: warn about aio=native if libaio is unavailable

2015-07-23 Thread Stefan Hajnoczi
v3: * Fix Patch 2 commit description because the mention of raw-posix.c ignored Windows [Markus] * Drop #ifdef CONFIG_LINUX_AIO from qemu-nbd.c v2: * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business [Kevin] * Print the warning in the same way as the aio=native,cach

[Qemu-devel] [PATCH v3 2/3] blockdev: always compile in -drive aio= parsing

2015-07-23 Thread Stefan Hajnoczi
CONFIG_LINUX_AIO is an implementation detail of raw-posix.c. Don't mention CONFIG_LINUX_AIO in blockdev.c. Let block drivers decide what to do with BDRV_O_NATIVE_AIO. They may print an error if it is unsupported. Signed-off-by: Stefan Hajnoczi --- blockdev.c | 2 -- 1 file changed, 2 deletion

[Qemu-devel] [PATCH v3 3/3] qemu-nbd: always compile in --aio=MODE option

2015-07-23 Thread Stefan Hajnoczi
The --aio=MODE option enables Linux AIO or Windows overlapped I/O. The #ifdef CONFIG_LINUX_AIO was a layering violation that also prevented Windows overlapped I/O from being used. Now that raw-posix.c prints an error when Linux AIO has not been compiled in, we can unconditionally compile the opti

[Qemu-devel] [PATCH v3 1/3] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable

2015-07-23 Thread Stefan Hajnoczi
raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable. It is confusing when aio=native performance is identical to aio=threads because the binary was accidentally built without libaio. Print a deprecation warning if -drive aio=native is used with a binary that does not support li

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

2015-07-23 Thread Wen Congyang
At 2015/7/23 19:08, Paolo Bonzini Wrote: On 23/07/2015 13:04, Wen Congyang wrote: Yes. I think this is better for 2.4. There are threads that do not need RCU, for example the thread-pool.c worker threads, so it may just If the thread doesn't use RCU, rcu_register_thread() is harmless, is i

[Qemu-devel] [Bug 1477538] [NEW] Windows QEMU Guest Agent VSS Provider service stops during qemu backup

2015-07-23 Thread Joop Martens
Public bug reported: I’m currently implementing the QEMU Guest Agent on all my KVM Windows guests. I’m using the stable VirtIO drivers and Guest agent from Fedora: https://fedoraproject.org/wiki/Windows_Virtio_Drivers Both the stable and latest release do provide Qemu Windows Guest agent 7.0.0.1

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

2015-07-23 Thread Laszlo Ersek
On 07/22/15 19:18, Kevin O'Connor wrote: > On Wed, Jul 22, 2015 at 10:31:12AM +0200, Marc Marí wrote: >> 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 inte

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

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 14:13, Laszlo Ersek wrote: > On 07/22/15 19:18, Kevin O'Connor wrote: >> Another possibility would be to place the new fw_cfg dma register >> address into a named fw_cfg "file" (eg, "fw_cfg_dma"). The firmware >> could then use the existing select/data fw_cfg interface to check

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

2015-07-23 Thread Laszlo Ersek
On 07/23/15 15:35, Peter Maydell wrote: > On 23 July 2015 at 14:13, Laszlo Ersek wrote: >> On 07/22/15 19:18, Kevin O'Connor wrote: >>> Another possibility would be to place the new fw_cfg dma register >>> address into a named fw_cfg "file" (eg, "fw_cfg_dma"). The firmware >>> could then use the

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

2015-07-23 Thread Marc Marí
On Thu, 23 Jul 2015 15:45:25 +0200 Laszlo Ersek wrote: > On 07/23/15 15:35, Peter Maydell wrote: > > On 23 July 2015 at 14:13, Laszlo Ersek wrote: > >> On 07/22/15 19:18, Kevin O'Connor wrote: > >>> Another possibility would be to place the new fw_cfg dma register > >>> address into a named fw_c

[Qemu-devel] QEMU -- SMP and TIME

2015-07-23 Thread françois Guerret
Hi, Further to my mail exchange with Victor I would like to ask you some help about time simulaion in Qemu when using SMP. Context:---I use Qemu on Windows, I am booting bare metal programs and I am trying to test embedded code, so I need more or lessrepeatable executions (and I do not n

[Qemu-devel] [PATCH v2 2/7] error: Make error_setg() a function

2015-07-23 Thread Markus Armbruster
Saves a tiny amount of code at every call site. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/error.h | 4 ++-- util/error.c | 9 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index f44c4

[Qemu-devel] [PATCH v2 6/7] error: Revamp interface documentation

2015-07-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/error.h | 177 --- 1 file changed, 127 insertions(+), 50 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 8c3a7dd..7d808e8 100644 --- a/include/qa

[Qemu-devel] [PATCH v2 1/7] error: De-duplicate code creating Error objects

2015-07-23 Thread Markus Armbruster
Duplicated when commit 680d16d added error_set_errno(), and again when commit 20840d4 added error_set_win32(). Make the original copy in error_set() reusable by factoring out error_setv(), then rewrite error_set_errno() and error_set_win32() on top of it. Signed-off-by: Markus Armbruster Reviewe

[Qemu-devel] [PATCH v2 0/7] error: On abort, report where the error was created

2015-07-23 Thread Markus Armbruster
v2: * Trivially rebased. * [PATCH 1] Fix accidental change of error_set_win32() message [Eric] * [PATCH 6] Correct typoes, document error_free(NULL) is safe [Eric] * [PATCH 7] Report __func__, too [Eric, László] This more than doubles the text size increase: 35KiB (0.7%) instead of 14KiB (0.3%)

[Qemu-devel] [PATCH v2 5/7] error: error_set_errno() is unused, drop

2015-07-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/error.h | 7 ++- util/error.c | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 692e013..8c3a7dd 100644 --- a/include/qapi/error.h +++ b

[Qemu-devel] [PATCH v2 3/7] qga: Clean up unnecessarily dirty casts

2015-07-23 Thread Markus Armbruster
qga_vss_fsfreeze() casts error_set_win32() from void (*)(Error **, int, ErrorClass, const char *, ...) to void (*)(void **, int, int, const char *, ...) The result is later called. Since the two types are not compatible, the call is undefined behavior. It works in practice anyway. Ho

[Qemu-devel] [PATCH v2 7/7] error: On abort, report where the error was created

2015-07-23 Thread Markus Armbruster
This is particularly useful when we abort in error_propagate(), because there the stack backtrace doesn't lead to where the error was created. Looks like this: Unexpected error in parse_block_error_action() at /work/armbru/qemu/blockdev.c:322: qemu-system-x86_64: -drive if=none,werror=fo

[Qemu-devel] [PATCH v2 4/7] qga/vss-win32: Document the DLL requires non-null errp

2015-07-23 Thread Markus Armbruster
requester.cpp uses this pattern to receive an error and pass it on to the caller (err_is_set() macro peeled off for clarity): ... code that may set errset->errp ... if (errset->errp && *errset->errp) { ... handle error ... } This breaks when errset->errp is null. As far as I

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

2015-07-23 Thread Kevin O'Connor
On Thu, Jul 23, 2015 at 02:35:05PM +0100, Peter Maydell wrote: > On 23 July 2015 at 14:13, Laszlo Ersek wrote: > > On 07/22/15 19:18, Kevin O'Connor wrote: > >> Another possibility would be to place the new fw_cfg dma register > >> address into a named fw_cfg "file" (eg, "fw_cfg_dma"). The firmwa

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

2015-07-23 Thread Cornelia Huck
On Wed, 22 Jul 2015 12:43:43 +0100 Stefan Hajnoczi wrote: > 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 particu

Re: [Qemu-devel] [PATCH v2 1/7] error: De-duplicate code creating Error objects

2015-07-23 Thread Eric Blake
On 07/23/2015 08:01 AM, Markus Armbruster wrote: > Duplicated when commit 680d16d added error_set_errno(), and again when > commit 20840d4 added error_set_win32(). > > Make the original copy in error_set() reusable by factoring out > error_setv(), then rewrite error_set_errno() and error_set_win32

  1   2   >