[Qemu-devel] [PATCH v9 1/8] bitmap: fix bitmap_count_one

2018-11-15 Thread Wei Wang
BITMAP_LAST_WORD_MASK(nbits) returns 0x when "nbits=0", which makes bitmap_count_one fail to handle the "nbits=0" case. It appears to be preferred to remain BITMAP_LAST_WORD_MASK identical to the kernel implementation that it is ported from. So this patch fixes bitmap_count_one to handle

[Qemu-devel] [PATCH v9 2/8] bitmap: bitmap_count_one_with_offset

2018-11-15 Thread Wei Wang
Count the number of 1s in a bitmap starting from an offset. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin Reviewed-by: Dr. David Alan Gilbert --- include/qemu/bitmap.h | 13 + 1 file changed, 13 insertions(+) diff --git

Re: [Qemu-devel] [PULL for-3.1 0/1] bugfix for s390x

2018-11-15 Thread Peter Maydell
On 14 November 2018 at 10:16, Cornelia Huck wrote: > The following changes since commit 6ff144698935e8bdbc96d255cf49b1a7d54174ac: > > Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2018-11-12-tag' > into staging (2018-11-13 12:32:30 +) > > are available in the Git repository

[Qemu-devel] [PATCH v6 11/16] gdbstub: add support for extended mode packet

2018-11-15 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index eec1cf0d09..ada53ac559 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1294,10

Re: [Qemu-devel] [PATCH] MAINTAINERS: list myself as maintainer for various Arm boards

2018-11-15 Thread Peter Maydell
On 15 November 2018 at 09:51, Alex Bennée wrote: > > Alistair Francis writes: > >> On 14/11/2018 3:12 am, Peter Maydell wrote: >>> On 13 November 2018 at 20:10, Alistair Francis wrote: These two and the Xilinx boards seem a little out of place in this patch. I agree they probably

Re: [Qemu-devel] [PATCH] target: hax: replace g_malloc with g_malloc0

2018-11-15 Thread Alex Bennée
Li Qiang writes: > And also the g_malloc doesn't need check return value, > remove it. > > Cc: qemu-triv...@nongnu.org > > Signed-off-by: Li Qiang Reviewed-by: Alex Bennée > --- > target/i386/hax-all.c | 15 +++ > 1 file changed, 3 insertions(+), 12 deletions(-) > > diff --git

Re: [Qemu-devel] Are FreeBSD guest images working?

2018-11-15 Thread Philippe Mathieu-Daudé
On 15/11/18 9:58, Peter Xu wrote: Hi, the list, I am trying to boot a FreeBSD guest but failed. It hangs at the kernel booting phase: /boot/ker]el/kernel text=0x14ed860 data=0x132538+0x4baa68 syms=[0x8+0x159ee8+0x8 Booting... (nothing more) It's just as simple as downloading the image and

Re: [Qemu-devel] [PATCH v6 10/11] authz: add QAuthZPAM object type for authorizing using PAM

2018-11-15 Thread Daniel P . Berrangé
On Thu, Nov 08, 2018 at 02:23:18AM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Oct 19, 2018 at 5:47 PM Daniel P. Berrangé > wrote: > > diff --git a/qemu-options.hx b/qemu-options.hx > > index a1c3e0e59c..a9654b8115 100644 > > --- a/qemu-options.hx > > +++ b/qemu-options.hx > > @@ -4447,6

Re: [Qemu-devel] [PATCH V2] net/filter-rewriter.c: Fix coverity static analysis issue

2018-11-15 Thread Peter Maydell
On 2 November 2018 at 02:21, Jason Wang wrote: > > On 2018/10/31 上午8:50, Zhang Chen wrote: >> >> The original code just follow the TCP state diagram, >> but in this case, we can skip the TCPS_TIME_WAIT state to simplify >> the implementation. >> >> Signed-off-by: Zhang Chen >> --- >>

Re: [Qemu-devel] [PATCH qemu] configure/fdt: Use more strict test for libfdt version

2018-11-15 Thread Daniel P . Berrangé
On Thu, Nov 15, 2018 at 09:33:08PM +1100, David Gibson wrote: > On Thu, Nov 15, 2018 at 10:11:12AM +, Daniel P. Berrangé wrote: > > On Thu, Nov 15, 2018 at 02:56:59PM +1100, Alexey Kardashevskiy wrote: > > > The libfdt installed in the system is preferred to the dtc submodule by > > > default.

[Qemu-devel] [PATCH v9 7/8] migration: move migrate_postcopy() to include/migration/misc.h

2018-11-15 Thread Wei Wang
The ram save state notifier callback, for example the free page optimization offerred by virtio-balloon, may need to check if postcopy is in use, so move migrate_postcopy() to the outside header. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC:

[Qemu-devel] [PATCH v9 6/8] migration/ram.c: add a function to disable the bulk stage

2018-11-15 Thread Wei Wang
This patch adds a function to enable a precopy notifier callback outside the migration subsystem to disable the bulk stage flag. This is needed by the free page optimization offered by virtio-balloon. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin

[Qemu-devel] [PATCH v9 3/8] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-11-15 Thread Wei Wang
The bitmap mutex is used to synchronize threads to update the dirty bitmap and the migration_dirty_pages counter. For example, the free page optimization clears bits of free pages from the bitmap in an iothread context. This patch makes migration_bitmap_clear_dirty update the bitmap and counter

[Qemu-devel] [PATCH v9 8/8] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-11-15 Thread Wei Wang
The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. A notifier is registered to the migration precopy notifier chain. The notifier calls free_page_start after the migration thread syncs the dirty bitmap, so that the free page optimization

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-15 Thread Cornelia Huck
On Thu, 15 Nov 2018 10:05:59 + Daniel P. Berrangé wrote: > On Wed, Nov 14, 2018 at 09:38:31PM -0200, Eduardo Habkost wrote: > > Many of the current virtio-*-pci device types actually represent > > 3 different types of devices: > > * virtio 1.0 non-transitional devices > > * virtio 1.0

[Qemu-devel] Are FreeBSD guest images working?

2018-11-15 Thread Ilya Maximets
> Hi, the list, > > I am trying to boot a FreeBSD guest but failed. It hangs at the > kernel booting phase: > > /boot/ker]el/kernel text=0x14ed860 data=0x132538+0x4baa68 > syms=[0x8+0x159ee8+0x8 > Booting... > (nothing more) > > It's just as simple as downloading the image and boot so I can't

Re: [Qemu-devel] [PATCH RFC 2/6] qapi: use qemu_strtod() in string-input-visitor

2018-11-15 Thread David Hildenbrand
On 14.11.18 17:09, Markus Armbruster wrote: > David Hildenbrand writes: > >> Let's use the new function. >> >> Signed-off-by: David Hildenbrand >> --- >> qapi/string-input-visitor.c | 6 ++ >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/qapi/string-input-visitor.c

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-15 Thread Cornelia Huck
On Wed, 14 Nov 2018 21:38:31 -0200 Eduardo Habkost wrote: > diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h > index 813082b0d7..1d2a11504f 100644 > --- a/hw/virtio/virtio-pci.h > +++ b/hw/virtio/virtio-pci.h (...) > +/** > + * VirtioPCIDeviceTypeInfo: > + * > + * Template for

Re: [Qemu-devel] [PATCH for-3.1] linux-user/sparc/signal.c: Remove dead code

2018-11-15 Thread Laurent Vivier
On 15/11/2018 12:46, Peter Maydell wrote: > Coverity complains (CID 1390847) about some dead code in > do_sigreturn(). This is an if (err) clause that can never be > true, copied from the kernel (where __get_user returns an error). > The one code path that could report an error is in the >

[Qemu-devel] [PATCH for-3.1?] qtest: log QEMU command line

2018-11-15 Thread Paolo Bonzini
Record the command line that was used to start QEMU. This can be useful for debugging. Signed-off-by: Paolo Bonzini --- tests/libqtest.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index

Re: [Qemu-devel] [PATCH for-4.0 00/17] tcg: Move softmmu out-of-line

2018-11-15 Thread Richard Henderson
On 11/14/18 2:00 AM, Emilio G. Cota wrote: > The following might be related: I'm seeing segfaults with -smp 8 > and beyond when doing bootup+shutdown of an aarch64 guest on > an x86-64 host. I'm not seeing that. Anything else special on the command-line? Are the segv in the code_gen_buffer or

[Qemu-devel] [PATCH for-3.1] linux-user/sparc/signal.c: Remove dead code

2018-11-15 Thread Peter Maydell
Coverity complains (CID 1390847) about some dead code in do_sigreturn(). This is an if (err) clause that can never be true, copied from the kernel (where __get_user returns an error). The one code path that could report an error is in the currently commented-out pseudocode for handling FPU

Re: [Qemu-devel] [PATCH] vhost-user-bridge: fix recvmsg iovlen

2018-11-15 Thread Marc-André Lureau
On Fri, Nov 9, 2018 at 9:39 PM Marc-André Lureau wrote: > > After iov_discard_front(), the iov may be smaller than its initial > size. Fixes the heap-buffer-overflow spotted by ASAN: > > ==9036==ERROR: AddressSanitizer: heap-buffer-overflow on address > 0x606001e0 at pc 0x7fe632eca3f0 bp

Re: [Qemu-devel] [Qemu-block] [PATCH] migration/block-dirty-bitmap: fix Coverity CID1390625

2018-11-15 Thread Peter Maydell
On 17 October 2018 at 10:51, Stefan Hajnoczi wrote: > On Tue, Oct 16, 2018 at 04:20:18PM +0300, Vladimir Sementsov-Ogievskiy wrote: >> Theoretically possible that we finish the skipping loop with bs = NULL >> and the following code will crash trying to dereference it. Fix that. >> >>

Re: [Qemu-devel] [PATCH] libvhost-user: fix clang enum-conversion warning

2018-11-15 Thread Marc-André Lureau
On Thu, Aug 30, 2018 at 8:50 PM Marc-André Lureau wrote: > > Now that the VhostUserMsg.request field is used for both master & > slave requests, since commit d84599f56c820d8c1ac9928a76500dcdfbbf194d: > > contrib/libvhost-user/libvhost-user.c:953:20: error: implicit conversion from > enumeration

Re: [Qemu-devel] [PATCH] Corrected memory regions

2018-11-15 Thread Peter Maydell
On 4 November 2018 at 07:42, Seth K wrote: > I corrected these 2 memory regions based on specifications from the chip > manufacturer. The existing ranges seem to overlap and and cause odd > behavior and/or crashes when trying to set up multiple UARTs, > I also played with changing

Re: [Qemu-devel] [PATCH] vl: Improve error message when we can't load fw_cfg from file

2018-11-15 Thread Li Qiang
Ping Li Qiang 于2018年11月1日周四 下午1:59写道: > parse_fw_cfg() reports "can't load" without further details. Get > the details from g_file_get_contents(), and include them in the > error message. > > Signed-off-by: Li Qiang > --- > vl.c | 6 -- > 1 file changed, 4 insertions(+), 2

[Qemu-devel] [PATCH 0/4] keymaps: drop support for include files

2018-11-15 Thread Gerd Hoffmann
Gerd Hoffmann (4): keymaps: remove modifiers include keymaps: drop nl-be map keymaps: remove common include keymaps: drop support for include files ui/keymaps.c | 7 +- pc-bios/keymaps/common| 157 pc-bios/keymaps/modifiers |

[Qemu-devel] [PATCH 2/4] keymaps: drop nl-be map

2018-11-15 Thread Gerd Hoffmann
It doesn't define any keys, only includes "common". Which makes it effectively an "en-us" map. Signed-off-by: Gerd Hoffmann --- pc-bios/keymaps/nl-be | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 pc-bios/keymaps/nl-be diff --git a/pc-bios/keymaps/nl-be b/pc-bios/keymaps/nl-be

[Qemu-devel] [PATCH 4/4] keymaps: drop support for include files

2018-11-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/keymaps.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/keymaps.c b/ui/keymaps.c index 085889b555..6e44f738ed 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -115,10 +115,9 @@ static int parse_keyboard_layout(kbd_layout_t *k,

[Qemu-devel] [PATCH 1/4] keymaps: remove modifiers include

2018-11-15 Thread Gerd Hoffmann
"common" is the only file using it, so we can just include it directly. Signed-off-by: Gerd Hoffmann --- pc-bios/keymaps/common| 19 ++- pc-bios/keymaps/modifiers | 18 -- 2 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644

[Qemu-devel] [PATCH 3/4] keymaps: remove common include

2018-11-15 Thread Gerd Hoffmann
Copy the content into the sl and sv files (the only ones left which are not generated by qemu-keymap). Signed-off-by: Gerd Hoffmann --- pc-bios/keymaps/common | 174 pc-bios/keymaps/sl | 177 -

Re: [Qemu-devel] [PATCH v5 12/24] hw: acpi: Export the MCFG getter

2018-11-15 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:35 +0100 Samuel Ortiz wrote: > From: Yang Zhong > > The ACPI MCFG getter is not x86 specific and could be called from > anywhere within generic ACPI API, so let's export it. So far it's x86 or more exactly q35 specific thing, for example it won't work with arm/virt

Re: [Qemu-devel] [PATCH v5 14/24] hw: i386: Make the hotpluggable memory size property more generic

2018-11-15 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:37 +0100 Samuel Ortiz wrote: > This property is currently defined under i386/pc while it only describes > a region size that's eventually fetched from the AML ACPI code. > > We can make it more generic and shareable across machine types by moving > it to

Re: [Qemu-devel] [PATCH for-3.2 07/41] slirp: add clock_get_ns() callback

2018-11-15 Thread Paolo Bonzini
On 14/11/2018 13:36, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > slirp/libslirp.h | 6 ++ > net/slirp.c | 19 +++ > slirp/if.c | 2 +- > slirp/ip6_icmp.c | 6 -- > slirp/slirp.c| 11 ++- > 5 files changed, 36

Re: [Qemu-devel] [PATCH for-3.2 08/41] slirp: add callbacks for timer

2018-11-15 Thread Paolo Bonzini
On 14/11/2018 13:36, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > slirp/libslirp.h | 6 ++ > slirp/slirp.h| 2 +- > net/slirp.c | 23 +++ > slirp/ip6_icmp.c | 21 ++--- > 4 files changed, 40 insertions(+), 12 deletions(-)

[Qemu-devel] [PATCH v6 0/6] qmp: add pmemload command

2018-11-15 Thread Simon Ruderich
Hello, As I got no replies to my last mails, here again the full patch set (rebased on current master) in the hope to get this merged. The first few patches are cleanup, the last two patches add the pmemload feature. Only 5/6 requires an ack (although all mentioned issues should be fixed), all

[Qemu-devel] [PATCH v6 6/6] hmp: add pmemload command

2018-11-15 Thread Simon Ruderich
Adapted patch from Baojun Wang [1] with the following commit message: I found this could be useful to have qemu-softmmu as a cross debugger (launch with -s -S command line option), then if we can have a command to load guest physical memory, we can use cross gdb to do some target

[Qemu-devel] [PATCH v6 3/6] hmp: use l for size argument in memsave/pmemsave

2018-11-15 Thread Simon Ruderich
i is only 32-bit. To prevent possible truncation when dumping large memory regions use l which is target long. Suggested-by: Dr. David Alan Gilbert Signed-off-by: Simon Ruderich Reviewed-by: Dr. David Alan Gilbert --- hmp-commands.hx | 4 ++-- hmp.c | 4 ++-- 2 files changed, 4

[Qemu-devel] [PATCH v6 5/6] qmp: add pmemload command

2018-11-15 Thread Simon Ruderich
Adapted patch from Baojun Wang [1] with the following commit message: I found this could be useful to have qemu-softmmu as a cross debugger (launch with -s -S command line option), then if we can have a command to load guest physical memory, we can use cross gdb to do some target

[Qemu-devel] [PATCH v6 4/6] hmp: use F for filename arguments in memsave/pmemsave

2018-11-15 Thread Simon Ruderich
This enables completion for the filename arguments. Suggested-by: Dr. David Alan Gilbert Signed-off-by: Simon Ruderich Reviewed-by: Dr. David Alan Gilbert --- hmp-commands.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index

[Qemu-devel] [PATCH v6 1/6] cpus: convert qmp_memsave/qmp_pmemsave to use qemu_open

2018-11-15 Thread Simon Ruderich
qemu_open() allow passing file descriptors to qemu which is used in restricted environments like libvirt where open() is prohibited. Suggested-by: Eric Blake Signed-off-by: Simon Ruderich Reviewed-by: Eric Blake --- cpus.c | 20 ++-- 1 file changed, 10 insertions(+), 10

Re: [Qemu-devel] [PULL for 3.1 0/2] Testing tweaks

2018-11-15 Thread Peter Maydell
On 14 November 2018 at 13:10, Alex Bennée wrote: > The following changes since commit 186ac05f749c69e98030f037aa930ff2bc4ad7fb: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-3.1-pull-request' into staging > (2018-11-13 11:45:16 +) > > are available in the Git

[Qemu-devel] [PATCH v6 2/6] cpus: use size_t in qmp_memsave/qmp_pmemsave

2018-11-15 Thread Simon Ruderich
It's the natural type for object sizes and matches the return value of sizeof(buf). Signed-off-by: Simon Ruderich Reviewed-by: Eric Blake --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index c0d796f441..ee54595733 100644 --- a/cpus.c +++

Re: [Qemu-devel] [PATCH for-3.2 09/41] slirp: add a set_nonblock() callback

2018-11-15 Thread Paolo Bonzini
On 14/11/2018 13:36, Marc-André Lureau wrote: > qemu_set_nonblock() does some event registration with the main loop on > win32, let's have a callback. > > Signed-off-by: Marc-André Lureau Perhaps a better interface would be register_poll_fd, which is called before a file descriptor can be

Re: [Qemu-devel] [PATCH v2 for-4.0 00/13] block: byte-based blocking read/write

2018-11-15 Thread Eric Blake
On 11/15/18 3:02 AM, no-re...@patchew.org wrote: Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Message-id: 20181115020334.1189829-1-ebl...@redhat.com Type:

Re: [Qemu-devel] [PATCH for-3.1?] qtest: log QEMU command line

2018-11-15 Thread Laurent Vivier
On 15/11/2018 13:29, Paolo Bonzini wrote: > Record the command line that was used to start QEMU. This can be > useful for debugging. > > Signed-off-by: Paolo Bonzini > --- > tests/libqtest.c | 26 +++--- > 1 file changed, 15 insertions(+), 11 deletions(-) It seems to be a

Re: [Qemu-devel] [PATCH for-3.2 06/41] slirp: add a callback for qemu_chr_fe_write_all()

2018-11-15 Thread Paolo Bonzini
On 14/11/2018 13:36, Marc-André Lureau wrote: > Replace strong dependency on QEMU. > > Signed-off-by: Marc-André Lureau > --- > slirp/libslirp.h | 1 + > net/slirp.c | 6 ++ > slirp/slirp.c| 2 +- > 3 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/slirp/libslirp.h

Re: [Qemu-devel] [PATCH for-3.2 04/13] slirp: use a dedicated field for chardev pointer

2018-11-15 Thread Paolo Bonzini
On 10/11/2018 14:45, Marc-André Lureau wrote: > Let's not mix command line and chardev pointers. > > Signed-off-by: Marc-André Lureau This would probably be a good place to implement the suggestion I have just sent. Paolo > --- > slirp/libslirp.h | 2 +- > slirp/misc.h | 4 ++-- >

Re: [Qemu-devel] [PATCH for-3.2 05/13] slirp: remove unused EMU_RSH

2018-11-15 Thread Paolo Bonzini
On 10/11/2018 14:45, Marc-André Lureau wrote: > EMU_RSH handling was dropped in commit > 0d62c4cfe21752df4c1d6e2c2398f15d5eaa794a. > > The assignment, and subsequent free() of ex_ptr->ex_exec to so->extra > looks unsafe (double free is likely to occur). > > Signed-off-by: Marc-André Lureau >

Re: [Qemu-devel] [PATCH RFC 2/6] qapi: use qemu_strtod() in string-input-visitor

2018-11-15 Thread Eric Blake
On 11/15/18 5:09 AM, David Hildenbrand wrote: Three more: in qobject-input-visitor.c's qobject_input_type_number_keyval(), This one is interesting, as it properly bails out when parsing "inf" (via isFinite()). - should we do the same for the string input visitor? Especially, should we forbid

<    1   2   3   4