vhost-user: questions regarding migration

2020-09-19 Thread Anton Kuchin
Hi, I'm implementing migration support in vhost-user backend and have a couple of questions: 1. How master can be sure that logging was started? We expect that right after set_fatures command with VHOST_F_LOG_ALL flag all memory modifications will be tracked in log, but slave can need a little

[PATCH] usb: hcd-dwc2: change assert()s to qemu_log_mask(LOG_GUEST_ERROR...)

2020-09-19 Thread Paul Zimmerman
Change several assert()s to qemu_log_mask(LOG_GUEST_ERROR...), to prevent the guest from causing Qemu to assert. Also fix up several existing qemu_log_mask()s to include the function name in the message. Suggested-by: Peter Maydell Signed-off-by: Paul Zimmerman --- Hi Gerd, This was prompted

[Bug 1896096] Re: Git version: Build process is broken in block_curl.c.o

2020-09-19 Thread Toolybird
Looking deeper into this... I believe there are indeed qemu bugs here. It's actually the qemu configure script which is adding `-pie' $ echo $LDFLAGS -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now Yet meson-logs/meson-log.txt tells me that: Using 'LDFLAGS' from environment with value: '-g

Ping2: [PATCH v2] Emulate dip switch language layout settings on SUN keyboard

2020-09-19 Thread Henrik Carlqvist
Just wanted to check that my patch hasn't been forgotten... I was hoping that it would make it into some branch in git. Do you want me to do any more changes to the patch or the description? Best regards Henrik On Mon, 3 Aug 2020 22:20:49 +0200 Henrik Carlqvist wrote: > This is my second

[Bug 1892604] Re: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS2' failed.

2020-09-19 Thread Paul Zimmerman
I also tried http://downloads.raspberrypi.org/raspbian/images/raspbian-2016-09-28/2016-09-23 -raspbian-jessie.zip, which is the next Raspbian release after the cursed one, and it works OK too. So I assume any release after that will also work OK. Just in case anyone wants to use the older releases

[Bug 1896342] Re: IDE ATA IDENTIFY WORD 106

2020-09-19 Thread Benjamin David Lunt
For more information, Annex-E of the ACS-2 explains this as well. http://www.t13.org/Documents/UploadedDocuments/docs2009/d2015r2 -ATAATAPI_Command_set_-_2_ACS-2.pdf See the statement on the top of page 165 as well. "If bit 13 is set, then bits 3:0 are valid". Page 119 of that same document

[Bug 1896342] [NEW] IDE ATA IDENTIFY WORD 106

2020-09-19 Thread Benjamin David Lunt
Public bug reported: The code at line 202 in hw/ide/core.c (https://git.qemu.org/?p=qemu.git;a=blob;f=hw/ide/core.c;#l201) hard codes bit 13 set. However, get_physical_block_exp() can and may return 0, which is a valid response. If get_physical_block_exp() does return zero, bit 13 should not

Re: [PULL 00/17] Trivial branch for 5.2 patches

2020-09-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200919184451.2129349-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200919184451.2129349-1-laur...@vivier.eu Subject: [PULL 00/17] Trivial branch for 5.2

[PULL 15/17] disas/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the disas folder. Signed-off-by: zhaolichang Reviewed-by: Alex Bennée Message-Id:

[PULL 11/17] docs/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the docs folder. Signed-off-by: zhaolichang Reviewed-by: Peter Maydell Message-Id:

[PULL 07/17] hw/timer/hpet: Fix debug format strings

2020-09-19 Thread Laurent Vivier
From: Dov Murik Fix compiler errors when compiling with -DHPET_DEBUG due to mismatch between format string token "%x" and the argument type uint64_t. Also "%#x" is replaced by "0x%" PRIx64 according to the coding style. Signed-off-by: Dov Murik Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 14/17] linux-user/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the linux-user folder. Signed-off-by: zhaolichang Reviewed-by: Alex Bennee Message-Id:

[PULL 08/17] scripts/git.orderfile: Display meson files along with buildsys ones

2020-09-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Since commit a56650518f5 ("configure: integrate Meson in the build system") we replaced many Makefile by Meson files. Adapt the git.orderfile script to display the new file at the same position. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefano Garzarella

[PULL 10/17] migration/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the migration folder. Signed-off-by: zhaolichang Reviewed-by: Peter Maydell Message-Id:

[PULL 17/17] contrib/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the contrib folder. Signed-off-by: zhaolichang Reviewed-by: Alex Bennee Message-Id:

[PULL 12/17] scripts/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the scripts folder. Signed-off-by: zhaolichang Reviewed-by: Peter Maydell Message-Id:

[PULL 04/17] manual: escape backslashes in "parsed-literal" blocks

2020-09-19 Thread Laurent Vivier
From: Laszlo Ersek According to , "inline markup is recognized and there is no protection from parsing. Backslash-escapes may be necessary to prevent unintended parsing". The qemu(1) manual page (formatted with Sphinx

[PULL 16/17] qapi/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the qapi folder. Signed-off-by: zhaolichang Reviewed-by: Markus Armbruster Message-Id:

[PULL 13/17] util/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the util folder. Signed-off-by: zhaolichang Reviewed-by: Alex Bennee Message-Id:

[PULL 02/17] hw/ppc/ppc4xx_pci: Replace magic value by the PCI_NUM_PINS definition

2020-09-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Replace the magic '4' value by the PCI_NUM_PINS definition. Suggested-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Reviewed-by: Richard Henderson Message-Id: <20200910072325.439344-3-f4...@amsat.org> Signed-off-by: Laurent

[PULL 09/17] qemu/: fix some comment spelling errors

2020-09-19 Thread Laurent Vivier
From: zhaolichang I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the folder. Signed-off-by: zhaolichang Reviewed-by: Alex Bennee Message-Id:

[PULL 06/17] hw/timer/hpet: Remove unused functions hpet_ram_readb, hpet_ram_readw

2020-09-19 Thread Laurent Vivier
From: Dov Murik Fix compiler error about defined but not used functions when compiling with -DHPET_DEBUG by deleting the unused debug functions hpet_ram_readb and hpet_ram_readw. Signed-off-by: Dov Murik Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 03/17] ui/spice-input: Remove superfluous forward declaration

2020-09-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé We only need to forward-declare kbd_push_key() and kbd_get_leds() which are used in kbd_interface, not kbd_leds(). Remove this superfluous forward declaration. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id:

[PULL 01/17] hw/gpio/max7310: Remove impossible check

2020-09-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé The max7310_gpio_set() handler is static and only used by qdev_init_gpio_in, initialized with 8 IRQs. The 'line' argument can not be out of the [0-8[ range. Replace the dead code by an assertion. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé

[PULL 05/17] meson: remove empty else and duplicated gio deps

2020-09-19 Thread Laurent Vivier
From: Yonggang Luo Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Message-Id: <20200915171234.236-14-luoyongg...@gmail.com> Signed-off-by: Laurent Vivier --- meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build

[PULL 00/17] Trivial branch for 5.2 patches

2020-09-19 Thread Laurent Vivier
-for-5.2-pull-request for you to fetch changes up to 639b090df52a4952262615328a3fdfae81234ea8: contrib/: fix some comment spelling errors (2020-09-17 20:41:44 +0200) Pull request trivial patches 20200919

Re: [PATCH] hw/ssi/npcm7xx_fiu: Fix handling of unsigned integer

2020-09-19 Thread Havard Skinnemoen
On Sat, Sep 19, 2020 at 6:24 AM Philippe Mathieu-Daudé wrote: > > Fix integer handling issues handling issue reported by Coverity: > > hw/ssi/npcm7xx_fiu.c: 162 in npcm7xx_fiu_flash_read() > >>> CID 1432730: Integer handling issues (NEGATIVE_RETURNS) > >>>

[PULL 57/57] meson: fix installation of keymaps

2020-09-19 Thread Paolo Bonzini
From: Anthony PERARD Signed-off-by: Anthony PERARD Message-Id: <20200918130354.1879275-1-anthony.per...@citrix.com> Signed-off-by: Paolo Bonzini --- pc-bios/keymaps/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build

Re: [PATCH v5 0/4] Fixes curses on msys2/mingw

2020-09-19 Thread Yonggang Luo
On Sat, Sep 19, 2020 at 11:03 PM Paolo Bonzini wrote: > > On 18/09/20 18:10, 罗勇刚(Yonggang Luo) wrote: > > > >> Yonggang Luo (4): > >> curses: Fixes compiler error that complain don't have langinfo.h on > >> msys2/mingw > >> curses: Fixes curses compiling errors. > >> win32: Simplify

[PULL 51/57] qga: relocate path to default configuration and hook

2020-09-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qga/main.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qga/main.c b/qga/main.c index 3febf3b0fd..740f5f7303 100644 --- a/qga/main.c +++ b/qga/main.c @@ -29,6 +29,7 @@ #include "qapi/error.h" #include "channel.h" #include

[PULL 38/57] meson: qtest: set "depends" correctly

2020-09-19 Thread Paolo Bonzini
This does not have any effect on Meson's behavior itself, since "meson test" always rebuilds everything (that is one reason why we are not using it...). However, mtest2make can use this information to do a selective rebuild for the requested suite. Cc: Thomas Huth Signed-off-by: Paolo Bonzini

[PULL 41/57] oslib: do not call g_strdup from qemu_get_exec_dir

2020-09-19 Thread Paolo Bonzini
Just return the directory without requiring the caller to free it. This also removes a bogus check for NULL in os_find_datadir and module_load_one; g_strdup of a static variable cannot return NULL. Signed-off-by: Paolo Bonzini --- include/qemu/osdep.h| 8 ++-- os-posix.c |

[PULL 54/57] hw/i386/q35: Remove unreachable Xen code on Q35 machine

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Xen accelerator requires specific changes to a machine to be able to use it. See for example the 'Xen PC' machine configure its PCI bus calling pc_xen_hvm_init_pci(). There is no 'Xen Q35' machine declared. This code was probably added while introducing the Q35

[PULL 36/57] configure: move cocoa option to Meson

2020-09-19 Thread Paolo Bonzini
While detection of the framework was already there, moving the option allows for better error reporting. Reported-by: Christophe de Dinechin Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 17 +++-- meson.build | 9 +++--

[PULL 52/57] ui: relocate paths to icons and translations

2020-09-19 Thread Paolo Bonzini
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- ui/gtk.c | 10 -- ui/sdl2.c | 9 +++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 1c59de2af4..b11594d817 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -51,6 +51,7 @@

Re: [PATCH] configure: fix performance regression due to PIC objects

2020-09-19 Thread Philippe Mathieu-Daudé
Cc'ing Aleksandar as Ahmed is away. On 9/19/20 5:56 PM, Paolo Bonzini wrote: > Because most files in QEMU are grouped into static libraries, Meson > conservatively > compiles them with -fPIC. This is overkill and produces slowdowns up to 20% > on > some TCG tests. > > As a stopgap measure,

[PULL 37/57] configure: do not limit Hypervisor.framework test to Darwin

2020-09-19 Thread Paolo Bonzini
Because the target/i386/hvf/meson.build rule culls hvf support on non-Darwin systems, a --enable-hvf build is succeeding. To fix this, just try the compilation test every time someone passes --enable-hvf. Reported-by: Christophe de Dinechin Reviewed-by: Richard Henderson Signed-off-by: Paolo

[PULL 46/57] module: relocate path to modules

2020-09-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- util/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/module.c b/util/module.c index 9ffe83bb32..a44ec38d93 100644 --- a/util/module.c +++ b/util/module.c @@ -19,6 +19,7 @@ #endif #include "qemu/queue.h" #include

[PULL 44/57] cutils: introduce get_relocated_path

2020-09-19 Thread Paolo Bonzini
Add the function that will compute a relocated version of the directories in CONFIG_QEMU_*DIR and CONFIG_QEMU_*PATH. Signed-off-by: Paolo Bonzini --- include/qemu/cutils.h | 12 + meson.build | 4 +-- util/cutils.c | 61 +++ 3

[PULL 55/57] exec: Remove MemoryRegion::global_locking field

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Last uses of memory_region_clear_global_locking() have been removed in commit 7070e085d4 ("acpi: mark PMTIMER as unlocked") and commit 08565552f7 ("cputlb: Move NOTDIRTY handling from I/O path to TLB path"). Remove memory_region_clear_global_locking() and the now

[PULL 47/57] net: relocate paths to helpers and scripts

2020-09-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/net/net.h | 4 ++-- net/tap.c | 26 +++--- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index e7ef42d62b..897b2d7595 100644 --- a/include/net/net.h +++

[PULL 30/57] i386/cpu: Clear FEAT_XSAVE_COMP_{LO, HI} when XSAVE is not available

2020-09-19 Thread Paolo Bonzini
From: Xiaoyao Li Per Intel SDM vol 1, 13.2, if CPUID.1:ECX.XSAVE[bit 26] is 0, the processor provides no further enumeration through CPUID function 0DH. QEMU does not do this for "-cpu host,-xsave". Signed-off-by: Xiaoyao Li Message-Id: <20200716082019.215316-2-xiaoyao...@intel.com>

[PULL 29/57] hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl

2020-09-19 Thread Paolo Bonzini
From: Li Qiang Currently in 'megasas_map_sgl' when 'iov_count=0' will just return success however the 'cmd' doens't contain any iov. This will cause the assert in 'scsi_dma_complete' failed. This is because in 'dma_blk_cb' the 'dbs->sg_cur_index == dbs->sg->nsg' will be true and just call

[PULL 42/57] fuzz: use qemu_get_exec_dir

2020-09-19 Thread Paolo Bonzini
Make things consistent with how softmmu/vl.c uses os_find_datadir. Initializing the path to the executables will also be needed for get_relocatable_path to work. Reviewed-by: Thomas Huth Reviewed-by: Alexander Bulekov Signed-off-by: Paolo Bonzini --- tests/qtest/fuzz/fuzz.c | 3 ++- 1 file

[PULL 33/57] meson: extend libmpathpersist test for static linking

2020-09-19 Thread Paolo Bonzini
libmultipath has a dependency on libdevmapper, so include it as well when static linking. It seems that the rabbit hole ends there. Signed-off-by: Paolo Bonzini --- meson.build | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/meson.build

[PULL 31/57] meson: move libudev test

2020-09-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 14 -- meson.build | 7 --- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 6201e7c732..4a7f577f49 100755 --- a/configure +++ b/configure @@ -901,7 +901,6 @@ Linux) linux_user="yes"

[PULL 56/57] checkpatch: avoid error on cover letter files

2020-09-19 Thread Paolo Bonzini
From: Stefano Garzarella Running checkpatch on a directory that contains a cover letter reports this error: Checking /tmp/tmpbnngauy3/-cover-letter.patch... ERROR: Does not appear to be a unified-diff format patch total: 1 errors, 0 warnings, 0 lines checked Let's skip cover

[PULL 32/57] meson: move libmpathpersist test

2020-09-19 Thread Paolo Bonzini
This is the first compiler/linker test that has been moved to Meson. Add more section headings to keep things clearer. This also fixes static linking to libmpathpersist, which has a dependency on libmultipath but no pkg-config file to describe it. Signed-off-by: Paolo Bonzini --- configure

[PULL 48/57] vl: relocate paths to data directories

2020-09-19 Thread Paolo Bonzini
As an additional advantage, the logic is now unified between POSIX and Win32 systems. Signed-off-by: Paolo Bonzini --- include/qemu-common.h | 1 - include/sysemu/sysemu.h | 2 +- os-posix.c | 20 os-win32.c | 11 --- softmmu/vl.c

[PULL 49/57] vl: relocate path to configuration file

2020-09-19 Thread Paolo Bonzini
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index c872657e60..c4f9671c48 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2676,8 +2676,9 @@ static int

[PULL 34/57] configure: move malloc_trim/tcmalloc/jemalloc to meson

2020-09-19 Thread Paolo Bonzini
Because LIBS is not used anymore, tcmalloc/jemalloc does not work with binaries whose description is in Meson. The fix is simply to move them to Meson too. For consistency with other configure options, specifying --enable-malloc-trim together with --enable-{tc,je}malloc becomes a fatal error.

[PULL 43/57] oslib-posix: default exec_dir to bindir

2020-09-19 Thread Paolo Bonzini
If the exec_dir cannot be retrieved, just assume it's the installation directory that was specified at configure time. This makes it simpler to reason about what the callers will do if they get back an empty path. Signed-off-by: Paolo Bonzini --- meson.build| 2 +- util/oslib-posix.c

[PULL 50/57] qemu-bridge-helper: relocate path to default ACL

2020-09-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-bridge-helper.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c index 88b26747fc..a26e1663f0 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -40,6 +40,7 @@ #endif

[PULL 26/57] hw/char/serial-{isa, pci}: Alias QDEV properties from generic serial object

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Instead of overwritting the properties of the generic 'state' object, alias them. Note we can now propagate the "baudbase" property. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200907015535.827885-7-f4...@amsat.org>

[PULL 24/57] hw/char/serial: Rename I/O read/write trace events

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The serial_mm_read/write() handlers from the TYPE_SERIAL_MM device call the serial_ioport_read/write() handlers with shifted offset. When looking at the trace events from this MMIO device, it is confusing to read the accesses as I/O. Simplify using generic trace

[PULL 20/57] configure: rename QEMU_GA_MSI_ENABLED to CONFIG_QGA_MSI

2020-09-19 Thread Paolo Bonzini
From: Stefan Hajnoczi The QEMU_GA_MSI_ENABLED config-host.mak variable is emitted by ./configure. meson.build actually checks for CONFIG_QGA_MSI_ENABLED: summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI_ENABLED')} Rename QEMU_GA_MSI_ENABLED to CONFIG_QGA_MSI for

[PULL 53/57] configure: use a platform-neutral prefix

2020-09-19 Thread Paolo Bonzini
Now that the installation is relocatable, there is no need to compile a Windows-format prefix into Win32 binaries. Instead, the prefix will only be used to compute installation-relative paths, and it can be any string. Drop the "Program Files" path completely: it is only usable on English

[PULL 45/57] oslib-posix: relocate path to /var

2020-09-19 Thread Paolo Bonzini
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- util/oslib-posix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/oslib-posix.c b/util/oslib-posix.c index ce44380f09..7e21b2f10c 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@

[PULL 25/57] hw/char/serial: Make 'wakeup' property boolean

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Make the "wakeup" property introduced in commit 9826fd597df ("suspend: make serial ports wakeup the guest") a boolean. As we want to reuse the generic serial properties in the ISA model (next commit), expose this property. Signed-off-by: Philippe Mathieu-Daudé

[PULL 18/57] hw/mips/mipssim: Use MMIO serial device on fake ISA I/O

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The 'mipssim' is not a real hardware, it is a simulator. There is an ISA MMIO space mapped at 0x1fd0, however this is not a real ISA bus (no ISA IRQ). So can not use the TYPE_ISA_SERIAL device... Instead we have been using a plain MMIO device, but named it IO.

[PULL 40/57] meson: report accelerator support

2020-09-19 Thread Paolo Bonzini
Note that the "real" support is reported. A configuration like --disable-system --enable-kvm will report "no" for "KVM support" because no KVM-supported target is being compiled. Reported-by: Andrew Jones Signed-off-by: Paolo Bonzini --- meson.build | 35 --- 1

[PULL 39/57] mtest2make: add support for introspected test dependencies

2020-09-19 Thread Paolo Bonzini
Right now all "make check" targets depend blindly on "all". If Meson is 0.56.0 or newer, we can use the correct dependencies using the new "depends" entry in "meson introspect --tests". Signed-off-by: Paolo Bonzini --- Makefile | 2 +- scripts/mtest2make.py | 19

[PULL 23/57] hw/char/serial: Remove old DEBUG_SERIAL commented code

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé All useful DPRINTF() calls have been converted to trace events. Remove a pointless one in the IOEventHandler, and drop the DEBUG_SERIAL ifdef'ry. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id:

[PULL 22/57] hw/char/serial: Replace commented DPRINTF() by trace event

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Convert the old debug PRINTF() call to display the UART baudrate to a trace event. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200907015535.827885-3-f4...@amsat.org> Signed-off-by: Paolo Bonzini --- hw/char/serial.c |

[PULL 35/57] configure: fix --meson=/path/to/meson

2020-09-19 Thread Paolo Bonzini
Due to a cut-and-paste error, the path to a user-specified meson was ignored and replaced by whatever was in the path. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index

[PULL 28/57] hw: megasas: return -1 when 'megasas_map_sgl' fails

2020-09-19 Thread Paolo Bonzini
From: Li Qiang The caller of 'megasas_map_sgl' will only check if the return is zero or not. If it return 0 it means success, as in the next patch we will consider 'iov_count=0' is an error, so let's return -1 to indicate a failure. Signed-off-by: Li Qiang Message-Id:

[PULL 15/57] numa: drop support for '-numa node' (without memory specified)

2020-09-19 Thread Paolo Bonzini
From: Igor Mammedov it was deprecated since 4.1 commit 4bb4a2732e (numa: deprecate implict memory distribution between nodes) Users of existing VMs, wishing to preserve the same RAM distribution, should configure it explicitly using ``-numa node,memdev`` options. Current RAM distribution can be

[PULL 17/57] numa: remove fixup numa_state->num_nodes to MAX_NODES

2020-09-19 Thread Paolo Bonzini
From: Igor Mammedov current code permits only nodeids in [0..MAX_NODES) range due to nodeid check in parse_numa_node() if (nodenr >= MAX_NODES) { error_setg(errp, "Max number of NUMA nodes reached: %" so subj fixup is not reachable, drop it. Signed-off-by: Igor Mammedov

[PULL 27/57] scsi-generic: Fix HM-zoned device scan

2020-09-19 Thread Paolo Bonzini
From: Dmitry Fomichev Several important steps during device scan depend on SCSI type of the device. For example, max_transfer property is only determined and assigned if the device has the type of TYPE_DISK. Host-managed ZBC disks retain most of the properties of regular SCSI drives, but they

[PULL 08/57] configure: Do not intent to build WHPX on 32-bit host

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Hyper-V is available on 64-bit versions of Windows, do not try to build its support on 32-bit versions. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200910054516.405777-1-f4...@amsat.org> Reviewed-by: Stefan Weil Signed-off-by: Paolo Bonzini ---

[PULL 21/57] hw/char/serial: Assert serial_ioport_read/write offset fits 8 bytes

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The serial device has 8 registers, each 8-bit. The MemoryRegionOps 'serial_io_ops' is initialized with max_access_size=1, and all memory_region_init_io() callers correctly set the region size to 8 bytes: - serial_io_realize - serial_isa_realizefn - serial_pci_realize

[PULL 19/57] hw/char/serial: Remove TYPE_SERIAL_IO

2020-09-19 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé TYPE_SERIAL_IO is a subset of TYPE_SERIAL_MM, and it is not used anymore. Remove it. Suggested-by: Paolo Bonzini Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 11/57] memory: Convert IOMMUMemoryRegionClass doc comment to kernel-doc

2020-09-19 Thread Paolo Bonzini
From: Eduardo Habkost Convert the existing documentation comments of IOMMUMemoryRegionClass to kernel-doc format so their contents will appear in the API reference at docs/devel/memory.html. Signed-off-by: Eduardo Habkost Message-Id: <20200908201129.3407568-1-ehabk...@redhat.com> Reviewed-by:

[PULL 06/57] meson: error out if qemu_suffix starts with /

2020-09-19 Thread Paolo Bonzini
From: Marc-André Lureau Since the variable is used for path concatenation, the result would ignore the prefix directory altogether. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 5 + 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build

[PULL 10/57] target/i386: support KVM_FEATURE_ASYNC_PF_INT

2020-09-19 Thread Paolo Bonzini
From: Vitaly Kuznetsov Linux-5.8 introduced interrupt based mechanism for 'page ready' events delivery and disabled the old, #PF based one (see commit 2635b5c4a0e4 "KVM: x86: interrupt based APF 'page ready' event delivery"). Linux guest switches to using in in 5.9 (see commit b1d405751cd5 "KVM:

[PULL 14/57] acpi: i386: Move VMBus DSDT entry to SB

2020-09-19 Thread Paolo Bonzini
From: Jon Doron Signed-off-by: Jon Doron Reviewed-by: Igor Mammedov Message-Id: <20200715084326.678715-2-ari...@gmail.com> Signed-off-by: Paolo Bonzini --- hw/i386/acpi-build.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/i386/acpi-build.c

[PULL 07/57] WHPX: vmware cpuid leaf for tsc and apic frequency

2020-09-19 Thread Paolo Bonzini
From: Sunil Muthuswamy Newer versions of WHPX provide the capability to query the tsc and apic frequency. Expose these through the vmware cpuid leaf. This patch doesnt support setting the tsc frequency; that will come as a separate fix. Signed-off-by: Sunil Muthuswamy Message-Id:

[PULL 13/57] Simplify the .gitignore file

2020-09-19 Thread Paolo Bonzini
From: Thomas Huth Now that we always do out-of-tree builds (and the in-tree builds are faked via a "build" directory), we can simplify out .gitignore file quite a bit. Signed-off-by: Thomas Huth Message-Id: <20200909080305.258961-1-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé

[PULL 05/57] meson: fix MSI rule

2020-09-19 Thread Paolo Bonzini
From: Marc-André Lureau The environment variables can't be passed through an env: argument yet (meson#2723), use 'env' as suggested in: https://github.com/mesonbuild/meson/issues/2723#issuecomment-348630957 Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- qga/meson.build | 1

[PULL 09/57] MAINTAINERS: add Paolo Bonzini as RCU maintainer

2020-09-19 Thread Paolo Bonzini
From: Stefan Hajnoczi The RCU code that Paolo maintains is missing a MAINTAINERS file entry. Signed-off-by: Stefan Hajnoczi Message-Id: <20200909090851.14458-1-stefa...@redhat.com> Signed-off-by: Paolo Bonzini --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git

[PULL 00/57] Misc patches for 2020-09-19

2020-09-19 Thread Paolo Bonzini
The following changes since commit de39a045bd8d2b49e4f3d07976622c29d58e0bac: Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200915-pull-request' into staging (2020-09-15 14:25:05 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

[PULL 01/57] tests: add missing genh dependency

2020-09-19 Thread Paolo Bonzini
From: Claudio Fontana Fix high-parallelism builds by forcing all generated headers to be created before tests are compiled. Reported-by: Claudio Fontana Signed-off-by: Paolo Bonzini Tested-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé --- tests/meson.build | 4 ++-- 1 file

[PULL 03/57] meson: clean up build_by_default

2020-09-19 Thread Paolo Bonzini
Build all executables by default except for the known-broken ones. This also allows running qemu-iotests without manually building socket_scm_helper. Reported-by: Max Reitz Tested-by: Max Reitz Signed-off-by: Paolo Bonzini --- docs/devel/build-system.rst| 5 + tests/fp/meson.build

[PULL 12/57] vhost-scsi: support inflight io track

2020-09-19 Thread Paolo Bonzini
From: Li Feng Qemu will send GET_INFLIGHT_FD and SET_INFLIGH_FD to backend, and the backend setup the inflight memory to track the io. Change-Id: I805d6189996f7a1b44c65f0b12ef7473b1789510 Signed-off-by: Li Feng Message-Id: <20200909122021.1055174-1-fen...@smartx.com> Signed-off-by: Paolo

[PULL 04/57] ninjatool: rebuild multi-output targets if outputs are missing

2020-09-19 Thread Paolo Bonzini
The "stamp file trick" used to group targets of a single multi-output rule prevents the user from deleting one such target in order to force its rebuild. Doing so will not touch the stamp file, and therefore only the dummy ":" command will be executed. With this patch, ninjatool writes rules

[PULL 16/57] doc: Cleanup "'-mem-path' fallback to RAM" deprecation text

2020-09-19 Thread Paolo Bonzini
From: Igor Mammedov it was actually removed in 5.0, commit 68a86dc15c (numa: remove deprecated -mem-path fallback to anonymous RAM) clean up forgotten remnants in docs. Signed-off-by: Igor Mammedov Message-Id: <20200911084410.788171-3-imamm...@redhat.com> Signed-off-by: Paolo Bonzini ---

[PULL 02/57] iotests: Work around failing readlink -f

2020-09-19 Thread Paolo Bonzini
From: Max Reitz On macOS, (out of the box) readlink does not have -f. If the recent "readlink -f" call introduced by b1cbc33a397 fails, just fall back to the old behavior (which means you can run the iotests only from the build tree, but that worked fine for six years, so it should be fine

[PATCH] configure: fix performance regression due to PIC objects

2020-09-19 Thread Paolo Bonzini
Because most files in QEMU are grouped into static libraries, Meson conservatively compiles them with -fPIC. This is overkill and produces slowdowns up to 20% on some TCG tests. As a stopgap measure, use the b_staticpic option to limit the slowdown to --enable-pie.

[PATCH] qom: code hardening - have bound checking while looping with integer value

2020-09-19 Thread Ani Sinha
Object property insertion code iterates over an integer to get an unused index that can be used as an unique name for an object property. This loop increments the integer value indefinitely. Although very unlikely, this can still cause an integer overflow. In this change, we fix the above code by

[PATCH 7/7] s390x/pci: get zPCI function info from host

2020-09-19 Thread Matthew Rosato
We use the VFIO_REGION_SUBTYPE_ZDEV_CLP subregion of PCI_VENDOR_ID_IBM to retrieve the CLP information the kernel exports. To be compatible with previous kernel versions we fall back on previous predefined values, same as the emulation values, when the region is not found. If individual CLP

[PATCH 4/7] s390x/pci: use a PCI Group structure

2020-09-19 Thread Matthew Rosato
From: Pierre Morel We use a S390PCIGroup structure to hold the information related to a zPCI Function group. This allows us to be ready to support multiple groups and to retrieve the group information from the host. Signed-off-by: Pierre Morel Signed-off-by: Matthew Rosato ---

[PATCH 6/7] s390x/pci: use a PCI Function structure

2020-09-19 Thread Matthew Rosato
From: Pierre Morel We use a ClpRspQueryPci structure to hold the information related to a zPCI Function. This allows us to be ready to support different zPCI functions and to retrieve the zPCI function information from the host. Signed-off-by: Pierre Morel Signed-off-by: Matthew Rosato ---

[PATCH 5/7] s390x/pci: clean up s390 PCI groups

2020-09-19 Thread Matthew Rosato
Add a step to remove all stashed PCI groups to avoid stale data between machine resets. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 3015d86..dc2 100644 ---

[PATCH 3/7] s390x/pci: create a header dedicated to PCI CLP

2020-09-19 Thread Matthew Rosato
From: Pierre Morel To have a clean separation between s390-pci-bus.h and s390-pci-inst.h headers we export the PCI CLP instructions in a dedicated header. Signed-off-by: Pierre Morel Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.h | 1 + hw/s390x/s390-pci-clp.h | 211

[PATCH 2/7] linux-headers: update against 5.9-rc5

2020-09-19 Thread Matthew Rosato
PLACEHOLDER as the kernel patch driving the need for this ("vfio-pci/zdev: define the vfio_zdev header") isn't merged yet. Signed-off-by: Matthew Rosato --- include/standard-headers/drm/drm_fourcc.h | 140 + include/standard-headers/linux/ethtool.h | 87

[PATCH 1/7] update-linux-headers: Add vfio_zdev.h

2020-09-19 Thread Matthew Rosato
vfio_zdev.h is used by s390x zPCI support to pass device-specific CLP information between host and userspace. Signed-off-by: Matthew Rosato --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh

[PATCH 0/7] Retrieve zPCI hardware information from VFIO

2020-09-19 Thread Matthew Rosato
This patchset exploits the VFIO ZPCI CLP region, which provides hardware information about passed-through s390 PCI devices that can be shared with the guest. The retrieval of this information is done once per function (and for a subset of data, once per function group) and is performed at time of

Re: [PATCH 0/6] Convert pc-bios Makefiles to meson

2020-09-19 Thread Paolo Bonzini
On 19/09/20 17:15, Marc-André Lureau wrote: > > > I don't know, the way pc-bios/ works seems just wrong to me.  pc-bios > should IMO be its own build system with support for docker-based cross > compilers similar to tests/tcg. > > > It could still use meson to build the binaries

Re: [PATCH 1/2] file-posix: Correctly read max_segments of SG nodes

2020-09-19 Thread Paolo Bonzini
On 17/09/20 18:44, Dmitry Fomichev wrote: > > Maxim, looks like you are on top of this problem and your approach sounds > sensible too me. Just FYI, it is also possible to avoid using > SG_GET_SG_TABLESIZE > ioctl and rely entirely on sysfs, but the code gets a bit more complicated > (see

Re: [PATCH 1/2] file-posix: Correctly read max_segments of SG nodes

2020-09-19 Thread Paolo Bonzini
On 17/09/20 15:16, Max Reitz wrote: > So is this path ever taken, or can we just replace it all with the ioctl? > > (Before 867eccfed84, this function was used for all host devices, which > might explain why the code even exists.) Because 867eccfed84 is wrong. If you use /dev/sda* with SG_IO

  1   2   >