Re: [Qemu-devel] [PATCH v2] target-mips: simplify LWL/LDL mask generation

2015-07-23 Thread Richard Henderson
On 07/15/2015 08:05 AM, Aurelien Jarno wrote: The LWL/LDL instructions mask the GPR with a mask depending on the address alignement. It is currently computed by doing: mask = 0x7fffull (t1 ^ 63) It's simpler to generate it by doing: mask = ~(-1 t1) It uses one

Re: [Qemu-devel] [PATCH RFC v2 41/47] qom: Don't use 'gen': false for qom-get, qom-set, object-add

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: With the previous commit, the generated marshalers just work, and save us a bit of handwritten code. Generated code grows, because you are now generating the hook :) qmp-commands.h |6 ++ qmp-marshal.c | 144

[Qemu-devel] The QEMU project has joined Software Freedom Conservancy

2015-07-23 Thread Peter Maydell
I'm happy to be able to announce that the QEMU project has joined Software Freedom Conservancy. This is something we've been wanting to do for a while now (we've talked about it at several previous QEMU Summit meetings). Software Freedom Conservancy is a non-profit public charity that provides

Re: [Qemu-devel] [PATCH] target-i386/FPU: a misprint in helper_fistll_ST0

2015-07-23 Thread Aurelien Jarno
On 2015-07-08 12:48, Dmitry Poletaev wrote: There is a misprint in the patch https://lists.gnu.org/archive/html/qemu-devel/2014-11/msg01657.html . It cause errors in guest work. Here is the bugfix. From: Dmitry Poletaev poletaev-q...@yandex.ru Signed-off-by: Dmitry Poletaev

[Qemu-devel] [PATCH] tcg/aarch64: use 32-bit offset for 32-bit softmmu emulation

2015-07-23 Thread Richard Henderson
Similar to the same fix for user-mode, except this instance ocurrs on the softmmu path. Again, the softmmu addend must be the base register, while the guest address is the index. Cc: Claudio Fontana claudio.font...@huawei.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Aurelien Jarno

Re: [Qemu-devel] [PATCH RFC v2 43/47] qmp: Improve netdev_add usage example in the manual

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: Add a device option to show how it's done. Signed-off-by: Markus Armbruster arm...@redhat.com --- qmp-commands.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Perhaps could be squashed with the previous patch. Or not - up to

Re: [Qemu-devel] [PATCH] tcg/aarch64: use 32-bit offset for 32-bit softmmu emulation

2015-07-23 Thread Aurelien Jarno
On 2015-07-23 15:14, Richard Henderson wrote: Similar to the same fix for user-mode, except this instance ocurrs on the softmmu path. Again, the softmmu addend must be the base register, while the guest address is the index. Cc: Claudio Fontana claudio.font...@huawei.com Cc: Paolo Bonzini

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Benjamin Herrenschmidt
On Thu, 2015-07-23 at 20:24 +0200, Laurent Vivier wrote: From: Michael Roth mdr...@linux.vnet.ibm.com Some kernels program a 0 address for io regions. PCI 3.0 spec section 6.2.5.1 doesn't seem to disallow this. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com [lvivier: add

Re: [Qemu-devel] [PATCH RFC v2 40/47] qapi: Introduce a first class 'any' type

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: It's first class, because unlike '**', it actually works, i.e. doesn't require 'gen': false. Generated code grows in order to accommodate visiting the new anyList type: qapi-types.c| 15 +++ qapi-types.h

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Michael Roth
Quoting Peter Maydell (2015-07-23 16:24:20) On 23 July 2015 at 22:19, Peter Maydell peter.mayd...@linaro.org wrote: On 23 July 2015 at 22:10, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 23, 2015 at 10:00:30PM +0100, Peter Maydell wrote: (Also, none of our PCI device models

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Michael S. Tsirkin
On Fri, Jul 24, 2015 at 07:46:55AM +1000, Benjamin Herrenschmidt wrote: On Thu, 2015-07-23 at 22:00 +0100, Peter Maydell wrote: (Also, none of our PCI device models actually try to do the BAR at zero means I won't respond behaviour, which presumably they might do in real life.) Devices

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 21:46, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Thu, 2015-07-23 at 20:24 +0200, Laurent Vivier wrote: From: Michael Roth mdr...@linux.vnet.ibm.com Some kernels program a 0 address for io regions. PCI 3.0 spec section 6.2.5.1 doesn't seem to disallow this.

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 22:19, Peter Maydell peter.mayd...@linaro.org wrote: On 23 July 2015 at 22:10, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 23, 2015 at 10:00:30PM +0100, Peter Maydell wrote: (Also, none of our PCI device models actually try to do the BAR at zero means I won't

Re: [Qemu-devel] [PATCH] tcg/aarch64: use 32-bit offset for 32-bit softmmu emulation

2015-07-23 Thread Eric Blake
On 07/23/2015 04:14 PM, Richard Henderson wrote: Similar to the same fix for user-mode, except this instance ocurrs on the softmmu path. Again, the softmmu addend must s/ocurrs/occurs/ be the base register, while the guest address is the index. Cc: Claudio Fontana

Re: [Qemu-devel] [PATCH RFC v2 42/47] qapi-schema: Fix up misleading specification of netdev_add

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: It doesn't take a 'props' argument, let alone one in the format NAME=VALUE,... The bogus arguments specification doesn't matter due to 'gen': false. Clean it up to be incomplete rather than wrong, and document the incompleteness.

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 22:10, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 23, 2015 at 10:00:30PM +0100, Peter Maydell wrote: (Also, none of our PCI device models actually try to do the BAR at zero means I won't respond behaviour, which presumably they might do in real life.) Maybe some

Re: [Qemu-devel] [PATCH 0/2] tcg: aarch64: use 32-bit offset for 32-bit user-mode emulation

2015-07-23 Thread Richard Henderson
On 07/15/2015 08:26 AM, Paolo Bonzini wrote: The register allocator may sometimes pass a 64-bit value to a 32-bit operation if truncations are considered no-ops by the backend. When this happens, user-mode emulation may use an incorrect offset for loads and stores. This affects aarch64 and

[Qemu-devel] [Bug 1477683] Re: FPU in qemu-system-i386 works incorrectly

2015-07-23 Thread Daniel Milewski
** Description changed: FPU bug in qemu-system-i386 makes software which use floating point numbers work incorrectly. For instance, the one included in attachment prints out 0 instead of 2147483648. The same code works ok in qemu- system-x86_64. - I have this issue in QEMU 2.3.0 on two

[Qemu-devel] [Bug 1477683] [NEW] FPU in qemu-system-i386 works incorrectly

2015-07-23 Thread Daniel Milewski
Public bug reported: FPU bug in qemu-system-i386 makes software which use floating point numbers work incorrectly. For instance, the one included in attachment prints out 0 instead of 2147483648. The same code works ok in qemu- system-x86_64. I have this issue in QEMU 2.3.0 on two different x86

[Qemu-devel] [Bug 1477683] Re: FPU in qemu-system-i386 works incorrectly

2015-07-23 Thread Sandmann
I think, that I have the same issue. After some git bisect, I found out that commit ea32aaf1a72af102b855317b47a22e75ac2965a9 has introduced the problem. Attached is a patch that fixes the issue for me. Maybe you can try this out, too. ** Patch added:

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Benjamin Herrenschmidt
On Thu, 2015-07-23 at 22:00 +0100, Peter Maydell wrote: (Also, none of our PCI device models actually try to do the BAR at zero means I won't respond behaviour, which presumably they might do in real life.) Devices aren't supposed to do that ... In fact, I don't see HW designers adding a

[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

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 arm...@redhat.com --- scripts/qapi.py | 72 +++-- 1 file changed, 65

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 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 pbonz...@redhat.com 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

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, stefano.stabell...@eu.citrix.com wrote: On Thu, 23 Jul 2015, Jan Beulich wrote: On 22.07.15 at 19:24, stefano.stabell...@eu.citrix.com wrote: I'll queue this change up for the next QEMU release cycle. Thanks - v2 (with the adjusted description) just sent. It would

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, Not

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

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, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org thanks -- PMM Hi, Paolo Would you pick up this

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_poll_clients()).

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 dgilb...@redhat.com On receiving MIG_RPCOMM_REQ_PAGES look up the address and queue the page. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com Reviewed-by: Amit Shah

[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

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 ke...@koconnor.net wrote: On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a

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 ler...@redhat.com 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

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

2015-07-23 Thread Markus Armbruster
Eric Blake ebl...@redhat.com 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 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 peter.mayd...@linaro.org --- hw/virtio/virtio-pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio/virtio-pci.c

[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 peter.mayd...@linaro.org --- 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 +++

[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 peter.mayd...@linaro.org --- 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 ---

[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 p.fe...@samsung.com --- 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). ---

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 stefa...@redhat.com 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

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 ler...@redhat.com 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

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

2015-07-23 Thread Wen Congyang
On 07/24/2015 12:58 AM, Paolo Bonzini wrote: On 23/07/2015 14:59, Wen Congyang wrote: If the thread doesn't use RCU, rcu_register_thread() is harmless, is it right? Every rcu_register_thread() makes synchronize_rcu() a little slower. Yes, but synchronize_rcu() is very slow... Hmm,

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 22:10, Peter Maydell wrote: The series looks good, but I'd prefer (especially for patch 4 which is in a fast path) if pow2ceil and pow2floor were made inline. Yeah, I was wondering if I was going to be asked to do that. Note that qemu_fls() is/was *not* inline, though, so

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

2015-07-23 Thread Chen Hanxiao
Use ROUND_UP instead. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 7d60e15..bb16c50 100644 --- a/exec.c +++ b/exec.c @@ -1207,7 +1207,7 @@ static void *file_ram_alloc(RAMBlock *block,

[Qemu-devel] [PULL for-2.4 3/5] tcg/aarch64: use 32-bit offset for 32-bit user-mode emulation

2015-07-23 Thread Richard Henderson
From: Paolo Bonzini pbonz...@redhat.com Thanks to the previous patch, it is now easy for tcg_out_qemu_ld and tcg_out_qemu_st to use a 32-bit zero extended offset. However, the guest base register x28 must be the base and addr_reg must be the index. Reported-by: Leon Alrae leon.al...@imgtec.com

[Qemu-devel] [PULL for-2.4 0/5] tcg fixes

2015-07-23 Thread Richard Henderson
12e21eb088a51161c78ee39ed54ac56ebcff4243: Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging (2015-07-23 12:54:53 +0100) are available in the git repository at: git://github.com/rth7680/qemu.git tags/pull-tcg-20150723 for you to fetch changes up to 961521261a3d600b0695b2e6d2b0f490076f7e90: tcg

[Qemu-devel] [PULL for-2.4 5/5] tcg/optimize: fix tcg_opt_gen_movi

2015-07-23 Thread Richard Henderson
From: Aurelien Jarno aurel...@aurel32.net Due to a copypaste, the new op value is tested against mov_i32 instead of movi_i32. The test is therefore always false. Fix that. Signed-off-by: Aurelien Jarno aurel...@aurel32.net Message-Id: 1436544211-2769-1-git-send-email-aurel...@aurel32.net

[Qemu-devel] [PULL for-2.4 2/5] tcg/aarch64: add ext argument to tcg_out_insn_3310

2015-07-23 Thread Richard Henderson
From: Paolo Bonzini pbonz...@redhat.com The new argument lets you pick uxtw or uxtx mode for the offset register. For now, all callers pass TCG_TYPE_I64 so that uxtx is generated. The bits for uxtx are removed from I3312_TO_I3310. Reported-by: Leon Alrae leon.al...@imgtec.com Reviewed-by:

[Qemu-devel] [PULL for-2.4 1/5] tcg/i386: Extend addresses for 32-bit guests

2015-07-23 Thread Richard Henderson
Removing the ??? comment explaining why it (mostly) worked. Reviewed-by: Aurelien Jarno aurel...@aurel32.net Signed-off-by: Richard Henderson r...@twiddle.net Message-Id: 1437081950-7206-2-git-send-email-...@twiddle.net --- tcg/i386/tcg-target.c | 114

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-23 Thread Dong, Eddie
BTW, I felt it is better to be called as an agency, rather than a proxy. Any comments from native speaker? Thx Eddie Hi, all We are planning to implement colo-proxy in qemu to cache and compare packets. This module is one of the important component of COLO project and now it is still

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-23 Thread Dong, Eddie
Hi Stefan: Thanks for your comments! On Mon, Jul 20, 2015 at 02:42:33PM +0800, Li Zhijian wrote: We are planning to implement colo-proxy in qemu to cache and compare packets. I thought there is a kernel module to do that? Yes, that is the previous solution the COLO

Re: [Qemu-devel] [PULL 08/11] rcu: detect missing rcu_register_thread()

2015-07-23 Thread Wen Congyang
On 07/17/2015 12:55 AM, Paolo Bonzini wrote: Use an impossible value for the .depth field in order to quickly detect threads that have not registered themselves with the RCU subsystem. Avoid a false positive around forking by unregistering and registering the forking thread explicitly.

Re: [Qemu-devel] [PATCH] virtio-9p: fix any_layout

2015-07-23 Thread Jason Wang
On 07/24/2015 01:59 AM, Michael S. Tsirkin wrote: virtio pci allows any device to have a modern interface, this in turn requires ANY_LAYOUT support. Fix up ANY_LAYOUT for virtio-9p. Reported-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Lightly

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-23 Thread Jason Wang
On 07/24/2015 10:04 AM, Dong, Eddie wrote: Hi Stefan: Thanks for your comments! On Mon, Jul 20, 2015 at 02:42:33PM +0800, Li Zhijian wrote: We are planning to implement colo-proxy in qemu to cache and compare packets. I thought there is a kernel module to do that? Yes, that

Re: [Qemu-devel] [PATCH RFC v2 45/47] qapi: New QMP command query-schema for QMP schema introspection

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: Caution, rough edges. No joke. It doesn't even compile without this fixup to a rebase snafu (see [0] below): diff --git i/scripts/qapi-types.py w/scripts/qapi-types.py index 79e8d24..12f3767 100644 --- i/scripts/qapi-types.py +++

Re: [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: To eliminate the temptation for clients to look up types by name (which are not ABI), replace all type names by meaningless strings. Reduces output of query-schema by 9 out of 80KiB. I'm not sure whether I like this or not. It does make sense

[Qemu-devel] [PULL for-2.4 4/5] tcg/aarch64: use 32-bit offset for 32-bit softmmu emulation

2015-07-23 Thread Richard Henderson
Similar to the same fix for user-mode, except this instance occurs on the softmmu path. Again, the tlb addend must be the base register, while the guest address is the index. Reviewed-by: Aurelien Jarno aurel...@aurel32.net Signed-off-by: Richard Henderson r...@twiddle.net ---

[Qemu-devel] [PATCH] docs/multi-thread-compression.txt: erratum

2015-07-23 Thread Liang Li
The unit of the network bandwidth is wrong, it shoud be 'Mb', not 'Gb'. Actually, the speed limit is set to '0' in the test, which means no limit. Signed-off-by: Liang Li liang.z...@intel.com --- docs/multi-thread-compression.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH RFC v2 46/47] qapi-introspect: Map all integer types to 'int'

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: How many bits we use internally is an implementation detail. It could be pressed into external interface service as a very approximate range information, but that's probably a bad idea. If we need range information, we better do it properly.

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

2015-07-23 Thread Wen Congyang
On 07/24/2015 12:58 AM, Paolo Bonzini wrote: On 23/07/2015 14:59, Wen Congyang wrote: If the thread doesn't use RCU, rcu_register_thread() is harmless, is it right? Every rcu_register_thread() makes synchronize_rcu() a little slower. Yes, but synchronize_rcu() is very slow... Hmm,

Re: [Qemu-devel] [PATCH RFC v2 38/47] qapi-commands: De-duplicate output marshaling functions

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: gen_marshal_output() uses its parameter name only for name of the generated function. Name it after the type being marshaled instead of its caller, and drop duplicates. Saves 7 copies of qmp_marshal_output_int() in qemu-ga, and one copy of

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

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 17:54, Paolo Bonzini pbonz...@redhat.com wrote: 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

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Benjamin Herrenschmidt
On Thu, 2015-07-23 at 21:30 +0300, Michael S. Tsirkin wrote: @@ -1075,7 +1080,8 @@ static pcibus_t pci_bar_address(PCIDevice *d, /* Check if 32 bit BAR wraps around explicitly. * TODO: make priorities correct and remove this work around. */ -if

Re: [Qemu-devel] [PATCH RFC v2 39/47] qapi: Improve built-in type documentation

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: Clarify how they map to JSON. Add how they map to C. Fix the reference to StringInputVisitor. Signed-off-by: Markus Armbruster arm...@redhat.com --- docs/qapi-code-gen.txt | 29 ++--- 1 file changed, 18

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Michael Roth
Quoting Michael Roth (2015-07-23 16:38:19) Quoting Peter Maydell (2015-07-23 16:24:20) On 23 July 2015 at 22:19, Peter Maydell peter.mayd...@linaro.org wrote: On 23 July 2015 at 22:10, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 23, 2015 at 10:00:30PM +0100, Peter Maydell wrote:

Re: [Qemu-devel] [PATCH RFC v2 44/47] qapi: Pseudo-type '**' is now unused, drop it

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: 'gen': false needs to stay for now, because netdev_add is still using it. Signed-off-by: Markus Armbruster arm...@redhat.com --- docs/qapi-code-gen.txt | 15 --- scripts/qapi.py

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 10:00:30PM +0100, Peter Maydell wrote: On 23 July 2015 at 21:46, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Thu, 2015-07-23 at 20:24 +0200, Laurent Vivier wrote: From: Michael Roth mdr...@linux.vnet.ibm.com Some kernels program a 0 address for io

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-23 Thread Michael S. Tsirkin
On Fri, Jul 24, 2015 at 06:48:57AM +1000, Benjamin Herrenschmidt wrote: On Thu, 2015-07-23 at 21:30 +0300, Michael S. Tsirkin wrote: @@ -1075,7 +1080,8 @@ static pcibus_t pci_bar_address(PCIDevice *d, /* Check if 32 bit BAR wraps around explicitly. * TODO: make

[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 arm...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- include/qapi/error.h | 4 ++-- util/error.c | 9 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/qapi/error.h

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

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 04:14:36PM +0800, Jason Wang wrote: 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

[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

[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

[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 can

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 ler...@redhat.com 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

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()

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

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 12:15:22PM +0200, Christian Borntraeger wrote: 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

Re: [Qemu-devel] [PATCH RFC v2 31/47] qapi-event: Eliminate global variable event_enum_value

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com --- scripts/qapi-event.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Eric Blake ebl...@redhat.com -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt

Re: [Qemu-devel] [PATCH RFC v2 14/47] qapi-tests: New tests for union, alternate command arguments

2015-07-23 Thread Eric Blake
On 07/21/2015 06:43 AM, Eric Blake wrote: On 07/01/2015 02:22 PM, Markus Armbruster wrote: A command's 'data' must be a struct type, given either as a dictionary, or as struct type name. Existing test case data-int.json covers simple type 'int'. Add test cases for type names referring to

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 ler...@redhat.com wrote: On 07/23/15 15:35, Peter Maydell wrote: On 23 July 2015 at 14:13, Laszlo Ersek ler...@redhat.com wrote: On 07/22/15 19:18, Kevin O'Connor wrote: Another possibility would be to place the new fw_cfg dma register

[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.

[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

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

2015-07-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- 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

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

2015-07-23 Thread Markus Armbruster
Stefan Hajnoczi stefa...@redhat.com writes: 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 No fishy uses of CONFIG_LINUX_AIO left. Series Reviewed-by: Markus Armbruster arm...@redhat.com

Re: [Qemu-devel] [PULL 0/1] NUMA queue, 2015-07-22

2015-07-23 Thread Peter Maydell
On 22 July 2015 at 19:11, Eduardo Habkost ehabk...@redhat.com wrote: The following changes since commit b69b30532e0a80e25449244c01b0cbed000c99a3: Update version for v2.4.0-rc2 release (2015-07-22 18:17:19 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git

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

2015-07-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- 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

[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

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 stefa...@redhat.com wrote: From: Paolo Bonzini pbonz...@redhat.com 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

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

2015-07-23 Thread Alexander Spyridakis
On 23 July 2015 at 12:04, Andrew Jones drjo...@redhat.com wrote: One more observation; to make this work for aarch64 you'll need to modify your instruction modification. The add immediate can't be changed with +-1 like it can for arm. Please make sure the code works for both, even if you need

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

2015-07-23 Thread Eric Blake
On 07/23/2015 08:01 AM, Markus Armbruster wrote: 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

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

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 04:00:21PM +0800, Jason Wang wrote: 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 m...@redhat.com Should we do

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

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

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

2015-07-23 Thread Fam Zheng
So it can be used by aio_poll later. Signed-off-by: Fam Zheng f...@redhat.com --- 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

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

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

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

2015-07-23 Thread Fam Zheng
This is the counterpart of for windows. Signed-off-by: Fam Zheng f...@redhat.com --- 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 @@

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

2015-07-23 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-23 Thread Vasiliy Tolstov
2015-07-23 1:33 GMT+03:00 Michael Roth mdr...@linux.vnet.ibm.com: 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.

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

2015-07-23 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- 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

Re: [Qemu-devel] [PATCH RFC v2 32/47] qapi-event: Convert to QAPISchemaVisitor, fixing data with base

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: Fixes events whose data is struct with base to include the struct's base members. Test case is qapi-schema-test.json's event __org.qemu_x-command: { 'event': '__ORG.QEMU_X-EVENT', 'data': '__org.qemu_x-Struct' } { 'struct':

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

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 03:36:39AM +0200, Marc-André Lureau wrote: 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

  1   2   >