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

2015-07-23 Thread Cornelia Huck
On Thu, 23 Jul 2015 21:29:05 +0200 Christian Borntraeger wrote: > Am 23.07.2015 um 21:25 schrieb Paolo Bonzini: > > > > > > On 23/07/2015 21:19, Christian Borntraeger wrote: > >> Am 23.07.2015 um 20:19 schrieb Paolo Bonzini: > >>> > >>> > >>> On 23/07/2015 19:20, Paolo Bonzini wrote: > > >

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 02:22 PM, Paolo Bonzini wrote: > > > On 24/07/2015 07:56, Wen Congyang wrote: >> @@ -115,9 +116,12 @@ static void wait_for_readers(void) >> } >> >> /* Wait for one thread to report a quiescent state and >> - * try again. >> + * try again. Release

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

2015-07-23 Thread Paolo Bonzini
On 24/07/2015 07:56, Wen Congyang wrote: > @@ -115,9 +116,12 @@ static void wait_for_readers(void) > } > > /* Wait for one thread to report a quiescent state and > - * try again. > + * try again. Release rcu_gp_lock, so rcu_(un)register_thread() > + * d

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

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,

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

[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 Signed-off-by: Richard Henderson Message-Id: <1437081950-7206-2-git-send-email-...@twiddle.net> --- tcg/i386/tcg-target.c | 114 +++--- 1 file changed, 72 insertio

[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 961521261a3d600b0695b2e6d2b0f490076f7e

[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 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 Reviewed-by: Aurelien Jarno Signed-off-b

[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 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 Reviewed-by: Aurelien Jarno Signed-off-by: Paolo Bonzini

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

2015-07-23 Thread Richard Henderson
From: Aurelien Jarno Due to a copy&paste, 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 Message-Id: <1436544211-2769-1-git-send-email-aurel...@aurel32.net> Signed-off-by: Richard Henderson --- tcg/op

[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 Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 12 ++-- 1 file cha

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 se

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 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 +++ w/scripts/qapi-t

[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 --- 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, unlink(filename);

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 > Signed-off-by: Michael S. Tsirkin > --- > > Lightly tested. Looks correct.

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? >

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 > s

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 explicitl

[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 --- docs/multi-thread-compression.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/multi-thre

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 > --- > docs/qapi-code-gen.txt | 15 --- > scripts/qapi.py

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 > --- > qmp-commands.hx | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Perhaps could be squashed with the previous patch. Or not - up to you. Reviewed

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

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 > Cc: Paolo Bonzini

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 ++

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 > Cc: Paolo Bonzini > Cc: Aurelien Jarno

[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 Cc: Paolo Bonzini Cc: Aurelien Jarno Signed-off-by: Richard Henderson --- While applying Paol

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] [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 > Signed-off-by: Dmitry Poletaev > Reported-by: Kirill Batuzov

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 wrote: > > > On 23 July 2015 at 22:10, Michael S. Tsirkin wrote: > > >> On Thu, Jul 23, 2015 at 10:00:30PM +0100, Peter Maydell wrote: > > >>> (Also, none of our PC

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 c

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 wrote: > > On 23 July 2015 at 22:10, Michael S. Tsirkin 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

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

[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: "0001-target-i386-Fix-conversion-infinity-from

[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

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 > --- > docs/qapi-code-gen.txt | 29 ++--- > 1 file changed, 18 insertions(+), 11 dele

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 wrote: > On 23 July 2015 at 22:10, Michael S. Tsirkin 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 >>> presu

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 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 devic

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

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: mak

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 > wrote: > > On Thu, 2015-07-23 at 20:24 +0200, Laurent Vivier wrote: > >> From: Michael Roth > >> > >> Some kernels program a 0 address for io regions. PCI 3.0 spec > >> section 6.2.

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 wrote: > On Thu, 2015-07-23 at 20:24 +0200, Laurent Vivier wrote: >> From: Michael Roth >> >> 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 >> [lvi

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

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. > > */ > > -

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 > > 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 > [lvivier: add pci_allow_0_addr in MachineClass to conditionally > al

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

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 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 >> trying to r

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 o

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

2015-07-23 Thread Christian Borntraeger
Am 23.07.2015 um 21:25 schrieb Paolo Bonzini: > > > On 23/07/2015 21:19, Christian Borntraeger wrote: >> Am 23.07.2015 um 20:19 schrieb Paolo Bonzini: >>> >>> >>> On 23/07/2015 19:20, Paolo Bonzini wrote: On 23/07/2015 16:14, Cornelia Huck wrote: > (gdb) bt > #0 0x03f

Re: [Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list generation

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Generated qapi-event.[ch] lose line breaks. No change otherwise. For example, -void qapi_event_send_block_image_corrupted(const char *device, - bool has_node_name, -

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 21:19, Christian Borntraeger wrote: > Am 23.07.2015 um 20:19 schrieb Paolo Bonzini: >> >> >> On 23/07/2015 19:20, Paolo Bonzini wrote: >>> >>> >>> On 23/07/2015 16:14, Cornelia Huck wrote: (gdb) bt #0 0x03fffc5871b4 in pthread_cond_wait@@GLIBC_2.3.2 () from /

Re: [Qemu-devel] [Xen-devel] [Block dev] : Qemu block ide_dma_read call routine

2015-07-23 Thread Shailesh Kumar
On Mon, Feb 23, 2015 at 3:25 AM, Kevin Wolf wrote: > Am 11.02.2015 um 04:51 hat Shailesh Kumar geschrieben: >> Hi, >> >> I am implementing read equivalent routine in qemu. Can some one >> help me understand control flow of the qemu read/write >> implementation. >> >> I am using xen-4.2.0 and

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

2015-07-23 Thread Christian Borntraeger
Am 23.07.2015 um 20:19 schrieb Paolo Bonzini: > > > On 23/07/2015 19:20, Paolo Bonzini wrote: >> >> >> On 23/07/2015 16:14, Cornelia Huck wrote: >>> (gdb) bt >>> #0 0x03fffc5871b4 in pthread_cond_wait@@GLIBC_2.3.2 () >>>from /lib64/libpthread.so.0 >>> #1 0x8024cfca in qemu_cond

Re: [Qemu-devel] [PATCH RFC v2 36/47] qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > These functions marshal both input and output. > > Signed-off-by: Markus Armbruster > --- > docs/qapi-code-gen.txt| 4 +- > docs/writing-qmp-commands.txt | 8 +- > monitor.c | 2 +- > qmp-commands.hx

[Qemu-devel] [PULL 1/2] vfio/pci: Fix RTL8168 NIC quirks

2015-07-23 Thread Alex Williamson
The RTL8168 quirk correctly describes using bit 31 as a signal to mark a latch/completion, but the code mistakenly uses bit 28. This causes the Realtek driver to spin on this register for quite a while, 20k cycles on Windows 7 v7.092 driver. Then it gets frustrated and tries to set the bit itself

[Qemu-devel] [PULL 2/2] vfio/pci: Fix bootindex

2015-07-23 Thread Alex Williamson
bootindex was incorrectly changed to a device Property during the platform code split, resulting in it no longer working. Remove it. Signed-off-by: Alex Williamson Cc: qemu-sta...@nongnu.org # v2.3+ --- hw/vfio/pci.c |1 - 1 file changed, 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/

[Qemu-devel] [PULL 0/2] vfio-pci fixes for v2.4

2015-07-23 Thread Alex Williamson
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/awilliam/qemu-vfio.git tags/vfio-fixes-20150723.0 for you to fetch changes up to 759b484c5d

Re: [Qemu-devel] [PATCH] target-i386: gdbserver: Return CS:IP as EIP on 16-bit mode

2015-07-23 Thread Richard Henderson
On 07/14/2015 11:43 AM, Ismael Luceno wrote: > While far from ideal, that seems to be what GDB and most other debuggers > expect. If so, you'd surely want a similar change to the write side, then. r~

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

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 08:24:18PM +0200, Laurent Vivier wrote: > From: Michael Roth I think at this point it's your patches, I'd write "based on patch by Michael Roth" instead. > Some kernels program a 0 address for io regions. PCI 3.0 spec > section 6.2.5.1 doesn't seem to disallow this. > >

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

2015-07-23 Thread Laurent Vivier
From: Michael Roth 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 [lvivier: add pci_allow_0_addr in MachineClass to conditionally allow addr 0 for pseries, as this can break other architectures] Signed-off

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 19:20, Paolo Bonzini wrote: > > > On 23/07/2015 16:14, Cornelia Huck wrote: >> (gdb) bt >> #0 0x03fffc5871b4 in pthread_cond_wait@@GLIBC_2.3.2 () >>from /lib64/libpthread.so.0 >> #1 0x8024cfca in qemu_cond_wait (cond=cond@entry=0x9717d950, >> mutex=mutex@en

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

2015-07-23 Thread Michael S. Tsirkin
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 Signed-off-by: Michael S. Tsirkin --- Lightly tested. hw/9pfs/virtio-9p.c | 22 -- 1 file changed, 16 insertions(+),

Re: [Qemu-devel] [PATCH RFC v2 35/47] qapi-commands: Rearrange code

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Rename gen_marshal_input() to gen_marshal(), because the generated > function marshals both arguments and results. > > Rename gen_visitor_input_containers_decl() to gen_marshal_vars(), and > move the other variable declarations there, too. > > Re

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

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

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 16:14, Cornelia Huck wrote: > (gdb) bt > #0 0x03fffc5871b4 in pthread_cond_wait@@GLIBC_2.3.2 () >from /lib64/libpthread.so.0 > #1 0x8024cfca in qemu_cond_wait (cond=cond@entry=0x9717d950, > mutex=mutex@entry=0x9717d920) > at /data/git/yyy/qemu/util/qemu-t

Re: [Qemu-devel] [PATCH RFC v2 34/47] qapi-visit: Rearrange code a bit

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Move gen_visit_decl() to a better place. Inline > generate_visit_struct_body(). > > Signed-off-by: Markus Armbruster > --- > scripts/qapi-visit.py | 42 -- > 1 file changed, 16 insertions(+), 26 deletions

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 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, worse, rcu_register_thread() if call

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

2015-07-23 Thread Paolo Bonzini
On 23/07/2015 13:57, Alexander Graf wrote: >> > @@ -125,6 +125,7 @@ static const MemMapEntry a15memmap[] = { >> > [VIRT_PCIE_PIO] = { 0x3eff, 0x0001 }, >> > [VIRT_PCIE_ECAM] = { 0x3f00, 0x0100 }, >> > [VIRT_MEM] ={ 0x4000, 30UL

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 RFC v2 33/47] qapi: Clean up after recent conversions to QAPISchemaVisitor

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Drop helper functions that are now unused. > > Make pylint reasonably happy. > > Rename generate_FOO() functions to gen_FOO() for consistency. > > Use more consistent and sensible variable names. > > Consistently use c_ for mapping keys when th

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

2015-07-23 Thread Marc-André Lureau
Hi - Original Message - > On Thu, Jul 23, 2015 at 03:36:43AM +0200, Marc-André Lureau wrote: > > Signed-off-by: Marc-André Lureau > > for some reason I didn't get 5/6. > strange: http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg04640.html > > --- > > docs/specs/vhost-user.t

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-23 Thread Markus Armbruster
Peter Maydell writes: > This series makes a start at cleaning up some of our headers > to avoid the common problem of header files including qemu-common.h > (which then in turn can lead to awkward circular includes). Yes, please! > One common cause of this is that we don't have any header > whi

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

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 03:36:43AM +0200, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau for some reason I didn't get 5/6. > --- > docs/specs/vhost-user.txt | 40 > 1 file changed, 40 insertions(+) > > diff --git a/docs/specs/vhost-user.txt

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 traditi

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': '

[Qemu-devel] [PATCH v1 1/1] target-microblaze: Set the PC in reset instead of realize

2015-07-23 Thread Alistair Francis
Set the Microblaze CPU PC in the reset instead of setting it in the realize. This is required as the PC is zeroed in the reset function and causes problems in some situations. Signed-off-by: Alistair Francis --- target-microblaze/cpu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(

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 refer

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 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 tags/numa-pul

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 > > Should we d

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 > /work/armbru/qemu/blo

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 > --- > scripts/qapi-event.py | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://lib

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

2015-07-23 Thread Markus Armbruster
Stefan Hajnoczi 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

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

2015-07-23 Thread Alexander Spyridakis
On 23 July 2015 at 12:04, Andrew Jones 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 to do > > #ifde

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 >

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 targett

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

[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

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

  1   2   >