[PULL 36/62] vhost-user-scsi: fix printf format warning

2019-12-16 Thread Paolo Bonzini
From: Marc-André Lureau Fixes: ../contrib/vhost-user-scsi/vhost-user-scsi.c:118:57: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat] g_warning("Unable to determine cdb len (0x%02hhX)", cdb[0] >> 5); Signed-off-by: Marc-André Lureau Signed

[PULL 32/62] build-sys: build vhost-user-gpu only if CONFIG_TOOLS

2019-12-16 Thread Paolo Bonzini
From: Marc-André Lureau vhost-user-gpu is always built and installed, but it is not part of the emulator proper. Cut it if --disable-tools is specified. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PULL 29/62] kvm: convert "-machine kernel_irqchip" to an accelerator property

2019-12-16 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 59 ++- hw/core/machine.c | 61 - include/hw/boards.h | 3 --- qemu-options.hx | 9 +--- vl.c| 3 ++- 5 files cha

[PULL 20/62] vl: warn for unavailable accelerators, clarify messages

2019-12-16 Thread Paolo Bonzini
So far, specifying an accelerator that was not compiled in did not result in an error; fix that. While at it, clarify the mysterious "Back to TCG" message. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- vl.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --g

[PULL 34/62] migration: fix maybe-uninitialized warning

2019-12-16 Thread Paolo Bonzini
From: Marc-André Lureau ../migration/ram.c: In function ‘multifd_recv_thread’: /home/elmarco/src/qq/include/qapi/error.h:165:5: error: ‘block’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 165 | error_setg_internal((errp), __FILE__, __LINE__, __func__, \

[PULL 38/62] tests: skip block layer tests if !CONFIG_TOOLS

2019-12-16 Thread Paolo Bonzini
From: Marc-André Lureau The block tests, as well as ahci-test needs qemu-img. Do not run them if it wasn't built. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.inc

[PULL 33/62] build-sys: do not include Windows SLIRP dependencies in $LIBS

2019-12-16 Thread Paolo Bonzini
When including the internal SLIRP library, we should add all the libraries that it needs for the build. Right now they are all included by QEMU, but -liphlpapi is not needed without slirp. Move it from LIBS to slirp_libs. Based on a patch by Marc-André Lureau. Acked-by: Samuel Thibault Signed-

[PULL 22/62] qom: add object_new_with_class

2019-12-16 Thread Paolo Bonzini
Similar to CPU and machine classes, "-accel" class names are mangled, so we have to first get a class via accel_find and then instantiate it. Provide a new function to instantiate a class without going through object_class_get_name, and use it for CPUs and machines already. Reviewed-by: Marc-André

[PULL 35/62] monitor: fix maybe-uninitialized

2019-12-16 Thread Paolo Bonzini
From: Marc-André Lureau ../monitor/misc.c: In function ‘mon_get_cpu_sync’: /home/elmarco/src/qq/include/sysemu/hw_accel.h:22:9: error: ‘cpu’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 22 | kvm_cpu_synchronize_state(cpu); | ^~

[PULL 41/62] stubs: replace stubs with lnot if applicable

2019-12-16 Thread Paolo Bonzini
The stubs mechanism relies on static libraries and compilation order, which is a bit brittle and should be avoided unless necessary. Replace it with Boolean operations on CONFIG_* symbols. Signed-off-by: Paolo Bonzini --- Makefile.objs| 2 +- crypto/Makefile.objs | 3 +-- util/Makefile.o

[PULL 40/62] crypto: move common bits for all emulators to libqemuutil

2019-12-16 Thread Paolo Bonzini
qcrypto_random_*, AES and qcrypto_init do not need to be linked as a whole and are the only parts that are used by user-mode emulation. Place them in libqemuutil, so that whatever needs them will pick them up automatically. Signed-off-by: Paolo Bonzini --- Makefile | 3 +-- Makefil

[PULL 23/62] accel: pass object to accel_init_machine

2019-12-16 Thread Paolo Bonzini
We will have to set QOM properties before accel_init_machine, based on the options provided to -accel. Construct the object outside it so that it will be possible to iterate on properties between object_new_with_class and accel_init_machine. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bo

[PULL 37/62] os-posix: simplify os_find_datadir

2019-12-16 Thread Paolo Bonzini
From: Marc-André Lureau Use g_build_filename instead of sprintf, and g_autofree instead of manual freeing. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- os-posix.c | 41 + 1 file changed, 13 insertions(+), 28 deletions(-) diff --git

[PULL 46/62] hw: replace hw/i386/pc.h with a header just for the i8259

2019-12-16 Thread Paolo Bonzini
Remove the need to include i386/pc.h to get to the i8259 functions. This is enough to remove the inclusion of hw/i386/pc.h from all non-x86 files. Signed-off-by: Paolo Bonzini --- hw/alpha/alpha_sys.h| 3 ++- hw/alpha/dp264.c| 1 + hw/hppa/hppa_sys.h |

[PULL 45/62] fw_cfg: allow building without other devices

2019-12-16 Thread Paolo Bonzini
The microvm machine type uses fw_cfg but lacks SMBIOS and ACPI. Do not include the files if the symbol is not present in QEMU and remove dependencies on machine-specific files. Reviewed-by: Sergio Lopez Signed-off-by: Paolo Bonzini --- hw/i386/fw_cfg.c | 7 +++ hw/i386/pc.c | 2 -- 2 f

[PULL 25/62] tcg: add "-accel tcg,tb-size" and deprecate "-tb-size"

2019-12-16 Thread Paolo Bonzini
-tb-size fits nicely in the new framework for accelerator-specific options. It is a very niche option, so insta-deprecate it. Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-all.c| 40 +--- include/sysemu/accel.h | 2 -- qemu-deprecated.texi | 6 ++

[PULL 49/62] hw/i386/pc: Convert DPRINTF() to trace events

2019-12-16 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Convert the deprecated DPRINTF() macro to trace events. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 19 +-- hw/i386/trace-events | 6 ++ 2 files changed, 11 insertions(+), 14 deletions(-) diff

[PULL 39/62] libvixl: remove per-target compiler flags

2019-12-16 Thread Paolo Bonzini
We are already including -D__STDC_LIMIT_MACROS in the global CXXFLAGS, so it makes sense to do the same for -D__STDC_CONSTANT_MACROS and -D__STDC_FORMAT_MACROS instead of limiting that to libvixl. The -Wno-sign-compare option can also be removed since GCC 4.6 is not supported anymore. Signed-off-

[PULL 51/62] acpi: move PC stubs out of stubs/

2019-12-16 Thread Paolo Bonzini
This is a small cleanup that lets microvm build entirely without include/hw/i386/pc.h. Signed-off-by: Paolo Bonzini --- hw/acpi/Makefile.objs| 3 ++- stubs/pc_madt_cpu_entry.c => hw/acpi/acpi-x86-stub.c | 0 stubs/Makefile.objs | 1

[PULL 26/62] xen: convert "-machine igd-passthru" to an accelerator property

2019-12-16 Thread Paolo Bonzini
The first machine property to fall is Xen's Intel integrated graphics passthrough. The "-machine igd-passthru" option does not set anymore a property on the machine object, but desugars to a GlobalProperty on accelerator objects. The setter is very simple, since the value ends up in a global vari

[PULL 50/62] x86: move more x86-generic functions out of PC files

2019-12-16 Thread Paolo Bonzini
These are needed by microvm too, so move them outside of PC-specific files. With this patch, microvm.c need not include pc.h anymore. Signed-off-by: Paolo Bonzini --- hw/i386/acpi-build.c | 1 + hw/i386/fw_cfg.c | 1 - hw/i386/fw_cfg.h | 2 + hw/i386/kvm/ioapic.c | 2 +- hw/i

[PULL 43/62] configure: simplify vhost condition with Kconfig

2019-12-16 Thread Paolo Bonzini
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Kconfig.host| 5 + Makefile| 1 + hw/virtio/Kconfig | 3 +++ hw/virtio/Makefile.objs | 4 ++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Kconfig

[PULL 52/62] pc: stubify x86 iommu

2019-12-16 Thread Paolo Bonzini
Allow building microvm without x86-iommu.c. Signed-off-by: Paolo Bonzini --- hw/i386/Kconfig | 6 ++ hw/i386/Makefile.objs| 3 ++- hw/i386/x86-iommu-stub.c | 34 ++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 hw/i386/x86

[PULL 31/62] object: Improve documentation of interfaces

2019-12-16 Thread Paolo Bonzini
From: Greg Kurz QOM interfaces allow a limited form of multiple inheritance, at the condition of being stateless. That is, they cannot be instantiated and a pointer to an interface shouldn't be dereferenceable in any way. This is achieved by making the QOM instance type an incomplete type, which

[PULL 53/62] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler()

2019-12-16 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Both gsi_handler() and kvm_pc_gsi_handler() have the same content, except one comment. Move the comment, and de-duplicate the code. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/i386/kvm/ioapic.c | 12 hw/i386/pc.c

[PULL 56/62] hw/i386/pc: Use TYPE_PORT92 instead of hardcoded string

2019-12-16 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé By using the TYPE_* definitions for devices, we can: - quickly find where devices are used with 'git-grep' - easily rename a device (one-line change). Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 2 +- 1 file changed, 1 ins

[PULL 60/62] qsp: Use WITH_RCU_READ_LOCK_GUARD

2019-12-16 Thread Paolo Bonzini
From: "Dr. David Alan Gilbert" The automatic rcu read lock maintenance works quite nicely in this case where it previously relied on a comment to delimit the lifetime and now has a block. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- util/qsp.c | 22 ++

[PULL 42/62] configure: set $PYTHON to a full path

2019-12-16 Thread Paolo Bonzini
This will make it possible to replace it in a shebang line. Signed-off-by: Paolo Bonzini --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 394f7f5..bbb8611 100755 --- a/configure +++ b/configure @@ -909,7 +909,7 @@ for binary in "${PYTH

[PULL 59/62] hyperv: Use auto rcu_read macros

2019-12-16 Thread Paolo Bonzini
From: "Dr. David Alan Gilbert" Use RCU_READ_LOCK_GUARD and WITH_RCU_READ_LOCK_GUARD to replace the manual rcu_read_(un)lock calls. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- hw/hyperv/hyperv.c | 22 +- 1 file changed, 9 insertions(+), 13 deletio

[PULL 61/62] memory: use RCU_READ_LOCK_GUARD

2019-12-16 Thread Paolo Bonzini
Cc: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index e499dc2..e42a9d7 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2165,7 +

[PULL 44/62] i386: conditionally compile more files

2019-12-16 Thread Paolo Bonzini
Reviewed-by: Sergio Lopez Signed-off-by: Paolo Bonzini --- hw/i386/Makefile.objs | 6 +++--- hw/i386/kvm/Makefile.objs | 6 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index 0d195b5..01ae202 100644 --- a/hw/i386/Makefile

qemu-project git server not utf-8 clean?

2019-12-16 Thread Alex Bennée
Hi, I was doing some housekeeping of the wiki links into the docs page and I discovered my name getting corrupted for: https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/devel/tcg-plugins.rst;hb=HEAD Looking at the headers: HTTP/1.1 200 OK Date: Mon, 16 Dec 2019 16:24:50 GMT Server

[PULL 62/62] colo: fix return without releasing RCU

2019-12-16 Thread Paolo Bonzini
Use WITH_RCU_READ_LOCK_GUARD to avoid exiting colo_init_ram_cache without releasing RCU. Cc: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- migration/ram.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/migration/ram.c b/migratio

[PULL 47/62] pci-stub: add more MSI functions

2019-12-16 Thread Paolo Bonzini
On x86, KVM needs some function from the PCI subsystem in order to set up interrupt routes. Provide some stubs to support x86 machines that lack PCI. Reviewed-by: Sergio Lopez Signed-off-by: Paolo Bonzini --- hw/pci/pci-stub.c | 27 +++ 1 file changed, 27 insertions(+)

Re: [RFC PATCH v2 3/5] target/arm/kvm: Implement virtual time adjustment

2019-12-16 Thread Andrew Jones
On Mon, Dec 16, 2019 at 03:14:00PM +, Peter Maydell wrote: > On Thu, 12 Dec 2019 at 17:33, Andrew Jones wrote: > > > > When a VM is stopped (guest is paused) guest virtual time > > should stop counting. Otherwise, when the VM is resumed it > > will experience time jumps and its kernel may repo

[PULL 48/62] x86: move SMM property to X86MachineState

2019-12-16 Thread Paolo Bonzini
Add it to microvm as well, it is a generic property of the x86 architecture. Suggested-by: Sergio Lopez Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 49 - hw/i386/pc_piix.c | 6 +++--- hw/i386/pc_q35.c | 2 +- hw/i386/x86.c

[PULL 54/62] hw/i386: Simplify ioapic_init_gsi()

2019-12-16 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé All callers of ioapic_init_gsi() provide a parent. We want new uses to follow the same good practice and provide the parent name, so do not make this optional: assert the parent name is provided, and simplify the code. Signed-off-by: Philippe Mathieu-Daudé Signed-of

Re: [RFC PATCH v2 5/5] target/arm/cpu: Add the kvm-no-adjvtime CPU property

2019-12-16 Thread Andrew Jones
On Mon, Dec 16, 2019 at 03:06:57PM +, Peter Maydell wrote: > On Thu, 12 Dec 2019 at 17:33, Andrew Jones wrote: > > > > kvm-no-adjvtime is a KVM specific CPU property and a first of its kind. > > To accommodate it we also add kvm_arm_add_vcpu_properties() and a > > KVM specific CPU properties d

[PULL 55/62] hw/isa/isa-bus: cleanup irq functions

2019-12-16 Thread Paolo Bonzini
The irq number is unsigned; we reject negative values. But -1 is used for the isairq array, which is declared unsigned! And since we have a definition for the number of ISA IRQs, use it. Based on a patch by Philippe Mathieu-Daudé. Signed-off-by: Paolo Bonzini --- hw/isa/isa-bus.c | 11 +++

Re: [RFC PATCH v2 3/5] target/arm/kvm: Implement virtual time adjustment

2019-12-16 Thread Andrew Jones
On Mon, Dec 16, 2019 at 03:40:16PM +, Peter Maydell wrote: > On Mon, 16 Dec 2019 at 15:14, Peter Maydell wrote: > > How does this interact with the usual register sync to/from > > KVM (ie kvm_arch_get_registers(), which I think will do a > > GET_ONE_REG read of the TIMER_CNT register the way i

Re: [RFC PATCH v2 5/5] target/arm/cpu: Add the kvm-no-adjvtime CPU property

2019-12-16 Thread Peter Maydell
On Mon, 16 Dec 2019 at 16:53, Andrew Jones wrote: > > On Mon, Dec 16, 2019 at 03:06:57PM +, Peter Maydell wrote: > > This phrasing reads a bit confusingly to me. What I would usually expect > > is that you get > > name-of-option Description of what the option does. > > > > But h

Extraneous nesting in QAPI schema

2019-12-16 Thread Markus Armbruster
Extra nesting is merely another set of braces in QMP. It's bloody annoying in QAPIfied CLI using dotted keys syntax. Example: QMP command {"execute": "chardev-add", "arguments": { "id": "char0", "backend": { "type": "socket", "data": {

[PULL 57/62] hw/i386/pc: Inline port92_init()

2019-12-16 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This one-line function is not very helpful, so remove it by inlining the call to qdev_connect_gpio_out_named(). Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-)

Re: [RFC PATCH v2 0/5] target/arm/kvm: Adjust virtual time

2019-12-16 Thread Andrew Jones
On Mon, Dec 16, 2019 at 04:18:23PM +, Marc Zyngier wrote: > On 2019-12-16 15:33, Peter Maydell wrote: > > On Thu, 12 Dec 2019 at 17:33, Andrew Jones wrote: > > > > > Userspace that wants to set KVM_REG_ARM_TIMER_CNT should beware that > > > the KVM register ID is not correct. This cannot be

[PULL 58/62] hw/i386/pc: Extract the port92 device

2019-12-16 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This device is only used by the PC machines. The pc.c file is already big enough, with 2255 lines. By removing 113 lines of it, we reduced it by 5%. It is now a bit easier to navigate the file. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini ---

[PATCH 09/10] iotests: 207: Remove duplication with VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
The blockdev_create() function in this test case adds another filter to the logging, but provides otherwise the same functionality as VM.blockdev_create() from iotests.py. Make it a thin wrapper around the iotests.py function. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/207 | 8 +--- 1

[PATCH 10/10] iotests: 211: Remove duplication with VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
The blockdev_create() function in this test case adds an error check that skips the test in case of failure because of memory shortage, but provides otherwise the same functionality as VM.blockdev_create() from iotests.py. Make it a thin wrapper around the iotests.py function. Signed-off-by: Kevin

[PATCH 01/10] iotests: Create VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
We have several almost identical copies of a blockdev_create() function in different test cases. Time to create one unified function in iotests.py. To keep the diff managable, this patch only creates the function and follow-up patches will convert the individual test cases. Signed-off-by: Kevin W

[Bug 1856549] Re: qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ?

2019-12-16 Thread Philippe Mathieu-Daudé
This code seems to emulate a RTC device connected via I2C to the VIA chipset. This might be the expected code (simply looking at this file, without checking the datasheet): -- >8 -- --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -409,7 +409,7 @@ static void via1_rtc_update(MacVIAState *m)

[PATCH 02/10] iotests: 255: Drop blockdev_create()

2019-12-16 Thread Kevin Wolf
blockdev_create() is completely unused in this test case, so we can just drop it. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/255 | 10 -- 1 file changed, 10 deletions(-) diff --git a/tests/qemu-iotests/255 b/tests/qemu-iotests/255 index 3632d507d0..0ba03d9e61 100755 --- a/tests/qe

[PATCH 04/10] iotests: 210: Convert to VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
Instead of having a separate blockdev_create() function, make use of the VM.blockdev_create() offered by iotests.py. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/210 | 81 +++--- 1 file changed, 36 insertions(+), 45 deletions(-) diff --git a/tests/qemu-io

[PATCH 03/10] iotests: 206: Convert to VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
Instead of having a separate blockdev_create() function, make use of the VM.blockdev_create() offered by iotests.py. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/206 | 232 - 1 file changed, 111 insertions(+), 121 deletions(-) diff --git a/tests/qemu-

Re: [PATCH 0/2] target/s390x: Implement LOAD/STORE TO REAL ADDRESS inline

2019-12-16 Thread Cornelia Huck
On Wed, 11 Dec 2019 12:36:12 -0800 Richard Henderson wrote: > Found while working on other parts of cputlb, > this cleanup can be split out independently. > > > r~ > > > Richard Henderson (2): > target/s390x: Split out helper_per_store_real > target/s390x: Implement LOAD/STORE TO REAL ADD

Re: [RFC PATCH v2 0/5] target/arm/kvm: Adjust virtual time

2019-12-16 Thread Marc Zyngier
On 2019-12-16 16:59, Andrew Jones wrote: On Mon, Dec 16, 2019 at 04:18:23PM +, Marc Zyngier wrote: On 2019-12-16 15:33, Peter Maydell wrote: > On Thu, 12 Dec 2019 at 17:33, Andrew Jones wrote: > > > Userspace that wants to set KVM_REG_ARM_TIMER_CNT should beware that > > the KVM register

[PATCH 05/10] iotests: 212: Convert to VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
Instead of having a separate blockdev_create() function, make use of the VM.blockdev_create() offered by iotests.py. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/212 | 101 +++-- 1 file changed, 46 insertions(+), 55 deletions(-) diff --git a/tests/qemu-io

[PATCH 00/10] iotests: Remove duplicated blockdev_create()

2019-12-16 Thread Kevin Wolf
We kept copying (and occasionally slightly modifying) the blockdev_create() function first added in 206. With now nine tests sharing duplicates of almost the same function (and me being about to add the tenth one), it's probably time to unify them into a single iotests.py function. Kevin Wolf (10)

[Bug 1856549] Re: qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ?

2019-12-16 Thread Laurent Vivier
I think VIA RTC access method has been implemented earlier (Classic Mac, 1984-1989) than the I2C specification, so I'm not sure we can/should port this to an I2C bus. Specs are (from Apple Macintosh Family Hardware Reference Chapter 2, Classi Macitosh Processor and Control) z001 Seconds regi

[PATCH 07/10] iotests: 237: Convert to VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
Instead of having a separate blockdev_create() function, make use of the VM.blockdev_create() offered by iotests.py. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/237 | 139 +++-- 1 file changed, 65 insertions(+), 74 deletions(-) diff --git a/tests/qemu-io

[PATCH 08/10] iotests: 266: Convert to VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
Instead of having a separate blockdev_create() function, make use of the VM.blockdev_create() offered by iotests.py. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/266 | 69 +- tests/qemu-iotests/266.out | 14 2 files changed, 44 insertions(+),

[PATCH 06/10] iotests: 213: Convert to VM.blockdev_create()

2019-12-16 Thread Kevin Wolf
Instead of having a separate blockdev_create() function, make use of the VM.blockdev_create() offered by iotests.py. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/213 | 113 +++-- 1 file changed, 52 insertions(+), 61 deletions(-) diff --git a/tests/qemu-io

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-16 Thread Philippe Mathieu-Daudé
On 12/16/19 2:08 PM, Paolo Bonzini wrote: On 14/12/19 17:02, Philippe Mathieu-Daudé wrote: If a subregion is mapped out of the parent region range, it will never get accessed. Since this is a bug, abort to help the developer notice the mistake. Signed-off-by: Philippe Mathieu-Daudé --- memor

Re: [RFC PATCH v2 3/5] target/arm/kvm: Implement virtual time adjustment

2019-12-16 Thread Peter Maydell
On Mon, 16 Dec 2019 at 16:44, Andrew Jones wrote: > > On Mon, Dec 16, 2019 at 03:40:16PM +, Peter Maydell wrote: > > On Mon, 16 Dec 2019 at 15:14, Peter Maydell > > wrote: > > > How does this interact with the usual register sync to/from > > > KVM (ie kvm_arch_get_registers(), which I think

Re: [PATCH 04/13] ppc/pnv: Introduce PnvMachineClass and PnvMachineClass::compat

2019-12-16 Thread Greg Kurz
On Fri, 13 Dec 2019 13:44:48 +0100 Cédric Le Goater wrote: > On 13/12/2019 12:59, Greg Kurz wrote: > > The pnv_dt_create() function generates different contents for the > > "compatible" property of the root node in the DT, depending on the > > CPU type. This is open coded with multiple ifs using

[PATCH v2 1/2] tests/ide-test: Create a single unit-test covering more PRDT cases

2019-12-16 Thread Alexander Popov
Fuzzing the Linux kernel with syzkaller allowed to find how to crash qemu using a special SCSI_IOCTL_SEND_COMMAND. It hits the assertion in ide_dma_cb() introduced in the commit a718978ed58a in July 2015. Currently this bug is not reproduced by the unit tests. Let's improve the ide-test to cover m

[PATCH v2 2/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb()

2019-12-16 Thread Alexander Popov
The commit a718978ed58a from July 2015 introduced the assertion which implies that the size of successful DMA transfers handled in ide_dma_cb() should be multiple of 512 (the size of a sector). But guest systems can initiate DMA transfers that don't fit this requirement. For fixing that let's chec

Re: [PATCH] docs/specs/tpm: reST-ify TPM documentation

2019-12-16 Thread Stefan Berger
On 12/12/19 9:59 AM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- docs/specs/index.rst | 1 + docs/specs/tpm.rst | 503 +++ docs/specs/tpm.txt | 445 -- 3 file

Re: [PATCH v1 01/16] configure: allow disable of cross compilation containers

2019-12-16 Thread Philippe Mathieu-Daudé
On 12/16/19 12:07 PM, Alex Bennée wrote: Our docker infrastructure isn't quite as multiarch as we would wish so lets allow the user to disable it if they want. This will allow us to use still run check-tcg on non-x86 CI setups. Signed-off-by: Alex Bennée Reviewed-by: Stefan Weil --- configur

Re: [PATCH v1 06/16] iotests: Skip test 079 if it is not possible to create large files

2019-12-16 Thread Philippe Mathieu-Daudé
On 12/16/19 12:07 PM, Alex Bennée wrote: From: Thomas Huth Test 079 fails in the arm64, s390x and ppc64le LXD containers on Travis (which we will hopefully enable in our CI soon). These containers apparently do not allow large files to be created. Test 079 tries to create a 4G sparse file, whic

[PATCH v4 1/5] python/qemu: Move kvm_available() to its own module

2019-12-16 Thread Wainer dos Santos Moschetta
This creates the 'accel' Python module to be the home for utilities that deal with accelerators. Also moved kvm_available() from __init__.py to this new module. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/__init__.py |

[PATCH v4 3/5] python/qemu: accel: Strengthen kvm_available() checks

2019-12-16 Thread Wainer dos Santos Moschetta
Currently kvm_available() checks for the presence of kvm module and, if target and host arches don't mismatch. This patch adds an 3rd checking: if QEMU binary was compiled with kvm support. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Alex Bennée Reviewed-by: Cleber Rosa Reviewed-by:

[PATCH v4 0/5] python/qemu: New accel module and improvements

2019-12-16 Thread Wainer dos Santos Moschetta
On commit abf0bf998dcb John Snow moved some code out of __init__.py to machine.py. kvm_available() remained in though. So on patch 01 I continue his work by creating a home for that method (the new 'accel' module). Honestly I was unsure about whether move the code to any existing module or make a n

[PATCH v4 2/5] python/qemu: accel: Add list_accel() method

2019-12-16 Thread Wainer dos Santos Moschetta
Since commit cbe6d6365a48 the command `qemu -accel help` returns the list of accelerators enabled in the QEMU binary. This adds the list_accel() method which return that same list. Signed-off-by: Wainer dos Santos Moschetta --- python/qemu/accel.py | 23 +++ 1 file changed, 2

[PATCH v4 4/5] python/qemu: accel: Add tcg_available() method

2019-12-16 Thread Wainer dos Santos Moschetta
This adds a method to check if the tcg accelerator is enabled in the QEMU binary. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Alex Bennée Reviewed-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Tested-by: Cleber Rosa --- python/qemu/accel.py | 8 1 file changed, 8 i

[PATCH v4 5/5] python/qemu: Remove unneeded imports in __init__

2019-12-16 Thread Wainer dos Santos Moschetta
__init_.py import some sub-modules unnecessarily. So let's clean it up. Signed-off-by: Wainer dos Santos Moschetta Suggested-by: Cleber Rosa Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/qemu/__init__.py | 6 -- 1 file changed, 6 deletions(-) diff --git a/python/qemu/__init_

Re: qemu-4.2: failed to set MSR 0x48b to 0x1582e00000000: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2019-12-16 Thread Paolo Bonzini
> > > > 1) running "vmxcap" on the Azure VM > You need to run "modprobe msr" before. Paolo > > $ sudo ./vmxcap > Basic VMX Information > Traceback (most recent call last): > File "./vmxcap", line 280, in > c.show() > File "./vmxcap", line 82, in show > value = msr().read(self.msr,

Re: qemu-4.2: failed to set MSR 0x48b to 0x1582e00000000: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2019-12-16 Thread Montes, Julio
here the log https://paste.centos.org/view/cbaae252 Thanks - Julio From: Paolo Bonzini Sent: Monday, December 16, 2019 1:23 PM To: Montes, Julio Cc: Philippe Mathieu-Daudé ; qemu-devel ; Eduardo Habkost Subject: Re: qemu-4.2: failed to set MSR 0x48b to 0x1582e

Re: [EXTERNAL]Re: [PATCH v4 29/37] RFC: mips/cps: fix setting saar property

2019-12-16 Thread Aleksandar Markovic
> From: Philippe Mathieu-Daudé > Sent: Sunday, December 15, 2019 6:56 AM > > On 11/20/19 4:24 PM, Marc-André Lureau wrote: > > There is no "saar" property. Note: I haven't been able to test this > > code. Help welcome. > > > > May fix commit 043715d1e0fbb3e3411be3f898c5b77b7f90327a ("target/mips:

[PULL 0/4] x86 queue, 2019-12-16

2019-12-16 Thread Eduardo Habkost
The following changes since commit 4148d142a8cbbce10bb77e560997ae6b482e5edf: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-virtiofs-20191213a' into staging (2019-12-13 15:58:54 +) are available in the Git repository at: git://github.com/ehabkost/qemu.git tags/x86-next-pull-re

[PULL 2/4] i386: Add macro for stibp

2019-12-16 Thread Eduardo Habkost
From: Cathy Zhang stibp feature is already added through the following commit. https://github.com/qemu/qemu/commit/0e8916582991b9fd0b94850a8444b8b80d0a0955 Add a macro for it to allow CPU models to report it when host supports. Signed-off-by: Cathy Zhang Reviewed-by: Xiaoyao Li Reviewed-by: T

[PULL 1/4] i386: Add MSR feature bit for MDS-NO

2019-12-16 Thread Eduardo Habkost
From: Cathy Zhang Define MSR_ARCH_CAP_MDS_NO in the IA32_ARCH_CAPABILITIES MSR to allow CPU models to report the feature when host supports it. Signed-off-by: Cathy Zhang Reviewed-by: Xiaoyao Li Reviewed-by: Tao Xu Message-Id: <1571729728-23284-2-git-send-email-cathy.zh...@intel.com> Signed-o

[PULL 3/4] i386: Add new CPU model Cooperlake

2019-12-16 Thread Eduardo Habkost
From: Cathy Zhang Cooper Lake is intel's successor to Cascade Lake, the new CPU model inherits features from Cascadelake-Server, while add one platform associated new feature: AVX512_BF16. Meanwhile, add STIBP for speculative execution. Signed-off-by: Cathy Zhang Reviewed-by: Xiaoyao Li Review

[PULL 4/4] i386: Use g_autofree in a few places

2019-12-16 Thread Eduardo Habkost
Get rid of 12 explicit g_free() calls. Signed-off-by: Eduardo Habkost Message-Id: <20191025025632.5928-1-ehabk...@redhat.com> Reviewed-by: Stefano Garzarella Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 41 + 1 file changed, 13 insertions(+), 2

Re: [PATCH 09/10] arm: allwinner-h3: add SD/MMC host controller

2019-12-16 Thread Niek Linnenbank
On Mon, Dec 16, 2019 at 1:14 AM Philippe Mathieu-Daudé wrote: > On 12/16/19 12:07 AM, Niek Linnenbank wrote: > > > > > > On Fri, Dec 13, 2019 at 12:56 AM Philippe Mathieu-Daudé > > mailto:phi...@redhat.com>> wrote: > > > > Hi Niek, > > > > On 12/11/19 11:34 PM, Niek Linnenbank wrote: > [.

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-16 Thread Elena Ufimtseva
On Fri, Dec 13, 2019 at 10:41:16AM +, Stefan Hajnoczi wrote: > On Mon, Dec 09, 2019 at 10:47:17PM -0800, Elena Ufimtseva wrote: > > At this moment we are working on the first stage of the project with help of > > the Nutanix developers. > > The questions we have gathered so far will be addresse

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-16 Thread Felipe Franciosi
Heya, > On 16 Dec 2019, at 20:47, Elena Ufimtseva wrote: > > On Fri, Dec 13, 2019 at 10:41:16AM +, Stefan Hajnoczi wrote: >>> On Mon, Dec 09, 2019 at 10:47:17PM -0800, Elena Ufimtseva wrote: >>> At this moment we are working on the first stage of the project with help of >>> the Nutanix dev

Re: qemu-4.2: failed to set MSR 0x48b to 0x1582e00000000: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

2019-12-16 Thread Montes, Julio
Hi Paolo and Philippe > Are you running also nested on your workstation? yes, qemu in qemu > 1) running "vmxcap" on the Azure VM $ sudo ./vmxcap Basic VMX Information Traceback (most recent call last): File "./vmxcap", line 280, in c.show() File "./vmxcap", line 82, in show value =

Re: [PATCH 0/2] target/s390x: Implement LOAD/STORE TO REAL ADDRESS inline

2019-12-16 Thread Richard Henderson
On 12/16/19 7:04 AM, Cornelia Huck wrote: > On Wed, 11 Dec 2019 12:36:12 -0800 > Richard Henderson wrote: > >> Found while working on other parts of cputlb, >> this cleanup can be split out independently. ... > Should I take these via the s390 tree, or do you plan to merge them via > another path

Re: [PATCH v9 05/13] accel: adding TB_JIT_TIME and full replacing CONFIG_PROFILER

2019-12-16 Thread Richard Henderson
On 12/13/19 11:49 AM, Alex Bennée wrote: > I'm going to split this patch up into more sub-commits to do each piece > one at a time. To make it easier can I drop CONFIG_PROFILE support > before the re-factoring so I don't need to keep both modes compiling > during the transition? Certainly. > I th

[kvm-unit-tests PATCH 00/10] KVM: arm64: PMUv3 Event Counter Tests

2019-12-16 Thread Eric Auger
This series implements tests exercising the PMUv3 event counters. It tests both the 32-bit and 64-bit versions. Overflow interrupts also are checked. Those tests only are written for arm64. It allowed to reveal some issues related to SW_INCR implementation (esp. related to 64-bit implementation),

[kvm-unit-tests PATCH 01/10] arm64: Provide read/write_sysreg_s

2019-12-16 Thread Eric Auger
From: Andrew Jones Sometimes we need to test access to system registers which are missing assembler mnemonics. Signed-off-by: Andrew Jones Reviewed-by: Alexandru Elisei --- lib/arm64/asm/sysreg.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/lib/arm64/asm/sysreg.h b/lib/arm

[kvm-unit-tests PATCH 04/10] arm: pmu: Check Required Event Support

2019-12-16 Thread Eric Auger
If event counters are implemented check the common events required by the PMUv3 are implemented. Some are unconditionally required (SW_INCR, CPU_CYCLES, either INST_RETIRED or INST_SPEC). Some others only are required if the implementation implements some other features. Check those wich are unco

[kvm-unit-tests PATCH 10/10] arm: pmu: Test overflow interrupts

2019-12-16 Thread Eric Auger
Test overflows for MEM_ACCESS and SW_INCR events. Also tests overflows with 64-bit events. Signed-off-by: Eric Auger --- arm/pmu.c | 134 ++ arm/unittests.cfg | 6 +++ 2 files changed, 140 insertions(+) diff --git a/arm/pmu.c b/arm/pmu.c ind

[kvm-unit-tests PATCH 09/10] arm/arm64: gic: Introduce setup_irq() helper

2019-12-16 Thread Eric Auger
ipi_enable() code would be reusable for other interrupts than IPI. Let's rename it setup_irq() and pass an interrupt handler pointer. We also export it to use it in other tests such as the PMU's one. Signed-off-by: Eric Auger --- arm/gic.c | 24 +++- lib/arm/asm/gic.h

[kvm-unit-tests PATCH 06/10] arm: pmu: Test chained counter

2019-12-16 Thread Eric Auger
Add 2 tests exercising chained counters. The first one uses CPU_CYCLES and the second one uses SW_INCR. Signed-off-by: Eric Auger --- arm/pmu.c | 128 ++ arm/unittests.cfg | 12 + 2 files changed, 140 insertions(+) diff --git a/arm/pmu.c

[kvm-unit-tests PATCH 02/10] arm: pmu: Let pmu tests take a sub-test parameter

2019-12-16 Thread Eric Auger
As we intend to introduce more PMU tests, let's add a sub-test parameter that will allow to categorize them. Existing tests are in the cycle-counter category. Signed-off-by: Eric Auger --- arm/pmu.c | 24 +++- arm/unittests.cfg | 7 --- 2 files changed, 19 insert

[kvm-unit-tests PATCH 07/10] arm: pmu: test 32-bit <-> 64-bit transitions

2019-12-16 Thread Eric Auger
Test configurations where we transit from 32b to 64b counters and conversely. Also tests configuration where chain counters are configured but only one counter is enabled. Signed-off-by: Eric Auger --- arm/pmu.c | 135 ++ arm/unittests.cfg |

[kvm-unit-tests PATCH 03/10] arm: pmu: Add a pmu struct

2019-12-16 Thread Eric Auger
This struct aims at storing information potentially used by all tests such as the pmu version, the read-only part of the PMCR, the number of implemented event counters, ... Signed-off-by: Eric Auger --- arm/pmu.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(

[PATCH v10 Kernel 0/5] KABIs to support migration for VFIO devices

2019-12-16 Thread Kirti Wankhede
Hi, This patch set adds: * New IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap with respect to IOMMU container rather than per device. All pages pinned by vendor driver through vfio_pin_pages external API has to be marked as dirty during migration. When IOMMU capable device is presen

[kvm-unit-tests PATCH 08/10] arm: gic: Provide per-IRQ helper functions

2019-12-16 Thread Eric Auger
From: Andre Przywara A common theme when accessing per-IRQ parameters in the GIC distributor is to set fields of a certain bit width in a range of MMIO registers. Examples are the enabled status (one bit per IRQ), the level/edge configuration (2 bits per IRQ) or the priority (8 bits per IRQ). Ad

[PATCH v10 Kernel 5/5] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2019-12-16 Thread Kirti Wankhede
Pages, pinned by external interface for requested IO virtual address range, might get unpinned and unmapped while migration is active and device is still running, that is, in pre-copy phase while guest driver still could access those pages. Host device can write to these pages while those were ma

<    1   2   3   4   5   6   >