[PULL 00/31] Misc patches for 2020-06-24

2020-06-24 Thread Paolo Bonzini
The following changes since commit 171199f56f5f9bdf1e5d670d09ef1351d8f01bae: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20200619-3' into staging (2020-06-22 14:45:25 +0100) are available in the Git repository at: git://github.com/bonzini/qemu.git tags/for-upstr

[PULL 1/2] scripts/tracetool: Update maintainer email address

2020-06-24 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé There is an effort in progress to generate a QEMU Python package. As I'm not sure this old email is still valid, update it to not produce package with broken maintainer email. Patch created mechanically by running: $ sed -i 's,\(__email__ *= "\)stefa...@linux.vnet

[PULL 2/2] trace/simple: Fix unauthorized enable

2020-06-24 Thread Stefan Hajnoczi
From: Markus Armbruster st_set_trace_file() accidentally enables tracing. It's called unconditionally during startup, which is why QEMU built with the simple trace backend always writes a trace file "trace-$PID". This has been broken for quite a while. I didn't track down the exact commit. Fi

Re: [PATCH v9 5/5] new qTest case to test the vhost-user-blk-server

2020-06-24 Thread Stefan Hajnoczi
On Wed, Jun 24, 2020 at 12:35:10PM +0800, Coiby Xu wrote: > On Thu, Jun 18, 2020 at 04:17:51PM +0100, Stefan Hajnoczi wrote: > > On Mon, Jun 15, 2020 at 02:39:07AM +0800, Coiby Xu wrote: > > > This test case has the same tests as tests/virtio-blk-test.c except for > > > tests have block_resize. Sin

[PULL 02/31] util/getauxval: Porting to FreeBSD getauxval feature

2020-06-24 Thread Paolo Bonzini
From: David CARLIER FreeBSD has a similar API for auxiliary vector. Signed-off-by: David Carlier Message-Id: Signed-off-by: Paolo Bonzini --- util/getauxval.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/util/getauxval.c b/util/getauxval.c index 36afdfb9e6..b124107d61 1006

[PULL 03/31] libqos: usb-hcd-ehci: use 32-bit write for config register

2020-06-24 Thread Paolo Bonzini
The memory region ops have min_access_size == 4 so obey it. Tested-by: Thomas Huth Signed-off-by: Paolo Bonzini --- tests/qtest/usb-hcd-ehci-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/usb-hcd-ehci-test.c b/tests/qtest/usb-hcd-ehci-test.c index 5251d53

[PULL 0/2] Tracing patches

2020-06-24 Thread Stefan Hajnoczi
The following changes since commit d88d5a3806d78dcfca648c62dae9d88d3e803bd2: Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-hw-2020062= 2' into staging (2020-06-23 13:55:52 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/tracing-pull

[PULL 01/31] kvm: support to get/set dirty log initial-all-set capability

2020-06-24 Thread Paolo Bonzini
From: Jay Zhou Since the new capability KVM_DIRTY_LOG_INITIALLY_SET of KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 has been introduced in the kernel, tweak the userspace side to detect and enable this capability. Signed-off-by: Jay Zhou Reviewed-by: Peter Xu Message-Id: <20200304025554.2159-1-jianjay.z.

[PULL 05/31] memory: Revert "memory: accept mismatching sizes in memory_region_access_valid"

2020-06-24 Thread Paolo Bonzini
From: "Michael S. Tsirkin" Memory API documentation documents valid .min_access_size and .max_access_size fields and explains that any access outside these boundaries is blocked. This is what devices seem to assume. However this is not what the implementation does: it simply ignores the boundar

[PULL 10/31] docs/nvdimm: add description of alignment requirement of device dax

2020-06-24 Thread Paolo Bonzini
From: Jingqi Liu For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option needs to match the alignment requirement of the device dax. It must be larger than or equal to the 'align' of device dax. Reviewed-by: Joao Martins Signed-off-by: Jingqi Liu Message-Id: <20200429085011.63752-3-j

[PULL 04/31] libqos: pci-pc: use 32-bit write for EJ register

2020-06-24 Thread Paolo Bonzini
The memory region ops have min_access_size == 4 so obey it. Tested-by: Thomas Huth Signed-off-by: Paolo Bonzini --- tests/qtest/libqos/pci-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/libqos/pci-pc.c b/tests/qtest/libqos/pci-pc.c index 0bc591d1da..3bb2eb3

[PULL 18/31] softfloat: do not set denominator high bit for floatx80 remainder

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers The floatx80 remainder implementation unnecessarily sets the high bit of bSig explicitly. By that point in the function, arguments that are invalid, zero, infinity or NaN have already been handled and subnormals have been through normalizeFloatx80Subnormal, so the high bit wil

[PULL 06/31] replay: notify the main loop when there are no instructions

2020-06-24 Thread Paolo Bonzini
From: Pavel Dovgalyuk When QEMU is executed in console mode without any external event sources, main loop may sleep for a very long time. But in case of replay there is another event source - event log. This patch adds main loop notification when the vCPU loop has nothing to do and main loop shou

[PULL 09/31] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-06-24 Thread Paolo Bonzini
From: Jingqi Liu If the backend file is devdax pmem character device, the alignment specified by the option 'align=NUM' in the '-object memory-backend-file' needs to match the alignment requirement of the devdax pmem character device. This patch uses the interfaces of libdaxctl to fetch the devd

[PULL 17/31] softfloat: do not return pseudo-denormal from floatx80 remainder

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers The floatx80 remainder implementation sometimes returns the numerator unchanged when the denominator is sufficiently larger than the numerator. But if the value to be returned unchanged is a pseudo-denormal, that is incorrect. Fix it to normalize the numerator in that case.

[PULL 25/31] osdep: Make MIN/MAX evaluate arguments only once

2020-06-24 Thread Paolo Bonzini
From: Eric Blake I'm not aware of any immediate bugs in qemu where a second runtime evalution of the arguments to MIN() or MAX() causes a problem, but proactively preventing such abuse is easier than falling prey to an unintended case down the road. At any rate, here's the conversation that spar

[PULL 13/31] xen: Actually fix build without passthrough

2020-06-24 Thread Paolo Bonzini
From: Anthony PERARD Fix typo. Fixes: acd0c9416d48 ("xen: fix build without pci passthrough") Signed-off-by: Anthony PERARD Message-Id: <20200619103115.254127-1-anthony.per...@citrix.com> Signed-off-by: Paolo Bonzini --- hw/xen/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PULL 11/31] hw/scsi/megasas: Fix possible out-of-bounds array access in tracepoints

2020-06-24 Thread Paolo Bonzini
From: Thomas Huth Some tracepoints in megasas.c use a guest-controlled value as an index into the mfi_frame_desc[] array. Thus a malicious guest could cause an out-of-bounds error here. Fortunately, the impact is very low since this can only happen when the corresponding tracepoints have been ena

[PULL 27/31] kvm: i386: allow TSC to differ by NTP correction bounds without TSC scaling

2020-06-24 Thread Paolo Bonzini
From: Marcelo Tosatti The Linux TSC calibration procedure is subject to small variations (its common to see +-1 kHz difference between reboots on a given CPU, for example). So migrating a guest between two hosts with identical processor can fail, in case of a small variation in calibrated TSC

[PULL 08/31] configure: add libdaxctl support

2020-06-24 Thread Paolo Bonzini
From: Jingqi Liu Add a pair of configure options --{enable,disable}-libdaxctl to control whether QEMU is compiled with libdaxctl [1]. Libdaxctl is a utility library for managing the device dax subsystem. QEMU uses mmap(2) to maps vNVDIMM backends and aligns the mapping address to the page size (

[PULL 16/31] softfloat: fix floatx80 remainder pseudo-denormal check for zero

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers The floatx80 remainder implementation ignores the high bit of the significand when checking whether an operand (numerator) with zero exponent is zero. This means it mishandles a pseudo-denormal representation of 0x1p-16382L by treating it as zero. Fix this by checking the who

[PULL 15/31] softfloat: merge floatx80_mod and floatx80_rem

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers The m68k-specific softfloat code includes a function floatx80_mod that is extremely similar to floatx80_rem, but computing the remainder based on truncating the quotient toward zero rather than rounding it to nearest integer. This is also useful for emulating the x87 fprem and

[PULL 14/31] target/i386: reimplement f2xm1 using floatx80 operations

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers The x87 f2xm1 emulation is currently based around conversion to double. This is inherently unsuitable for a good emulation of any floatx80 operation, even before considering that it is a particularly naive implementation using double (computing with pow and then subtracting 1

[PULL 28/31] hyperv: vmbus: Remove the 2nd IRQ

2020-06-24 Thread Paolo Bonzini
From: Jon Doron It seems like Windows does not really require 2 IRQs to have a functioning VMBus. Signed-off-by: Jon Doron Message-Id: <20200617160904.681845-2-ari...@gmail.com> Signed-off-by: Paolo Bonzini --- hw/hyperv/vmbus.c| 3 +-- hw/i386/acpi-build.c | 4 +--

[PULL 29/31] vmport: move compat properties to hw_compat_5_0

2020-06-24 Thread Paolo Bonzini
The patches that introduced the properties were submitted when QEMU 5.0 had not been released yet, so they got merged under the wrong heading. Move them to hw_compat_5_0 so that 5.0 machine types get the pre-patch behavior. Fixes: b889212973da ("hw/i386/vmport: Propagate IOPort read to vCPU EAX r

Re: [PATCH] tests: fix a memory in test_socket_unix_abstract_good

2020-06-24 Thread Daniel P . Berrangé
On Thu, Jun 18, 2020 at 02:12:58PM +0800, Li Qiang wrote: > Ping.. > Anyone queued this? Thanks, I've queud this now. > > Thanks, > Li Qiang > > Li Qiang 于2020年6月4日周四 上午12:31写道: > > > After build qemu with '-fsanitize=address' extra-cflags, > > 'make check' show following leak: > > > > ==

[PULL 20/31] target/i386: reimplement fprem, fprem1 using floatx80 operations

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers The x87 fprem and fprem1 emulation is currently based around conversion to double, which is inherently unsuitable for a good emulation of any floatx80 operation. Reimplement using the soft-float floatx80 remainder operations. Signed-off-by: Joseph Myers Reviewed-by: Richard

[PULL 12/31] Makefile: Install qemu-[qmp/ga]-ref.* into the directory "interop"

2020-06-24 Thread Paolo Bonzini
From: Liao Pingfang We need install qemu-[qmp/ga]-ref.* files into the subdirectory of qemu docs: interop. If we visit the following address and click the link to qemu-qmp-ref.html: https://www.qemu.org/docs/master/interop/bitmaps.html#basic-qmp-usage It will report following error: " Not Foun

[PULL 07/31] replay: synchronize on every virtual timer callback

2020-06-24 Thread Paolo Bonzini
From: Pavel Dovgalyuk Sometimes virtual timer callbacks depend on order of virtual timer processing and warping of virtual clock. Therefore every callback should be logged to make replay deterministic. This patch creates a checkpoint before every virtual timer callback. With these checkpoints vir

[PULL 24/31] target/i386: Add notes for versioned CPU models

2020-06-24 Thread Paolo Bonzini
From: Tao Xu Add which features are added or removed in this version. Signed-off-by: Tao Xu Message-Id: <20200324051034.30541-1-tao3...@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c

[PULL 19/31] softfloat: return low bits of quotient from floatx80_modrem

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers Both x87 and m68k need the low parts of the quotient for their remainder operations. Arrange for floatx80_modrem to track those bits and return them via a pointer. The architectures using float32_rem and float64_rem do not appear to need this information, so the *_rem interfa

Re: [PATCH v5 00/12] pc-bios: s390x: Cleanup part 1

2020-06-24 Thread Janosch Frank
On 6/24/20 12:46 PM, Thomas Huth wrote: > On 24/06/2020 12.44, Cornelia Huck wrote: >> On Wed, 24 Jun 2020 03:52:14 -0400 >> Janosch Frank wrote: >> >>> The bios is in dire need for a cleanup as there are still a lot of >>> magic constants being used throughout as well as duplicated code. >>> >>>

Re: [PATCH] hw/core/null-machine: Do not initialize unused chardev backends

2020-06-24 Thread Thomas Huth
On 24/06/2020 12.56, Philippe Mathieu-Daudé wrote: The MachineClass uses an inverted logic (inherited from the PC machines [*]) to create the chardev backends for the default devices (see commits 998bbd74b9d..aa40fc9c964 and ac33f8fad14). As the none-machine doesn't have any hardware device, it

[PULL 23/31] target/i386: reimplement fpatan using floatx80 operations

2020-06-24 Thread Paolo Bonzini
From: Joseph Myers The x87 fpatan emulation is currently based around conversion to double. This is inherently unsuitable for a good emulation of any floatx80 operation. Reimplement using the soft-float operations, as for other such instructions. Signed-off-by: Joseph Myers Message-Id: Sign

Re: [PATCH v5 00/12] pc-bios: s390x: Cleanup part 1

2020-06-24 Thread Cornelia Huck
On Wed, 24 Jun 2020 12:46:49 +0200 Thomas Huth wrote: > On 24/06/2020 12.44, Cornelia Huck wrote: > > On Wed, 24 Jun 2020 03:52:14 -0400 > > Janosch Frank wrote: > > > >> The bios is in dire need for a cleanup as there are still a lot of > >> magic constants being used throughout as well as d

[PULL 30/31] ibex_uart: fix XOR-as-pow

2020-06-24 Thread Paolo Bonzini
The xor-as-pow warning in clang actually detected a genuine bug. Fix it. Signed-off-by: Paolo Bonzini --- hw/char/ibex_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c index 3e0dd9968e..45cd724998 100644 --- a/hw/char/ibex_uart.

[PULL 31/31] i386: Mask SVM features if nested SVM is disabled

2020-06-24 Thread Paolo Bonzini
From: Eduardo Habkost QEMU incorrectly validates FEAT_SVM feature flags against GET_SUPPORTED_CPUID even if SVM features are being masked out by cpu_x86_cpuid(). This can make QEMU print warnings on most AMD CPU models, even when SVM nesting is disabled (which is the default). This bug was neve

[PULL 26/31] numa: forbid '-numa node, mem' for 5.1 and newer machine types

2020-06-24 Thread Paolo Bonzini
From: Igor Mammedov Deprecation period is run out and it's a time to flip the switch introduced by cd5ff8333a. Disable legacy option for new machine types (since 5.1) and amend documentation. '-numa node,memdev' shall be used instead of disabled option with new machine types. Signed-off-by: Ig

[PATCH] hw/core/null-machine: Do not initialize unused chardev backends

2020-06-24 Thread Philippe Mathieu-Daudé
The MachineClass uses an inverted logic (inherited from the PC machines [*]) to create the chardev backends for the default devices (see commits 998bbd74b9d..aa40fc9c964 and ac33f8fad14). As the none-machine doesn't have any hardware device, it is pointless to initialize chardev backends. Fix by s

[PATCH v2 2/6] chardev: add support for retrieving the terminal size

2020-06-24 Thread Szymon Lukasz
Extend the class of chardevs with a new function - chr_get_winsize. A chardev backend should implement if it is able to get the size of the connected terminal and can detect changes in the terminal size, i.e. if the backend cannot detect resizes it must not implement this (e.g. if we have a tty bac

Re: [PATCH for-5.1 V5 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-24 Thread Aleksandar Markovic
> > What exactly is missing in tcg support? Would it work if Loongson EXT is > supported in QEMU? > Huacai, hi. I couldn't find the answer to this question in v6. Could you please clarify this aspect? Thank you, Aleksandar

[PATCH v2 0/6] virtio-console: notify about the terminal size

2020-06-24 Thread Szymon Lukasz
The goal of this series is to have a resizable terminal into a guest without having to set up networking and using, e.g. ssh. The virtio spec allows a virtio-console device to notify the guest about terminal resizes in the host. Linux Kernel implements the driver part of the spec. This series impl

[PATCH v2 4/6] char-stdio: add support for the terminal size

2020-06-24 Thread Szymon Lukasz
Implement chr_get_winsize for the stdio backend and trigger CHR_EVENT_RESIZE upon SIGWINCH delivery. Signed-off-by: Szymon Lukasz --- chardev/char-stdio.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c index 82

[PATCH v2 1/6] main-loop: change the handling of SIGWINCH

2020-06-24 Thread Szymon Lukasz
Block SIGWINCH, so it is delivered only via signalfd. Install a handler that uses NotifierList to tell interested parties about SIGWINCH delivery. Signed-off-by: Szymon Lukasz --- include/qemu/main-loop.h | 4 ui/curses.c | 11 ++- util/main-loop.c | 21 +++

[PATCH v2 3/6] chardev: add support for notifying about terminal resizes

2020-06-24 Thread Szymon Lukasz
Add a new chardev event, CHR_EVENT_RESIZE, which a backend should trigger if detects the size of the connected terminal changed. Signed-off-by: Szymon Lukasz --- backends/cryptodev-vhost-user.c | 1 + chardev/char.c | 1 + hw/block/vhost-user-blk.c | 1 + hw/char/terminal3

[PATCH v4 00/20] audio: deprecate -soundhw

2020-06-24 Thread Gerd Hoffmann
v2: - use g_assert_not_reached() for stubs. - add deprecation notice. v3: - rebase to latest master. - adapt to armbru's device initialization changes. v4: - reorder patches, drop temporary -global setup, go straight to -machine pcspk-audiodev= instead. - update error messages and docume

[PATCH v4 03/20] audio: add deprecated_register_soundhw

2020-06-24 Thread Gerd Hoffmann
Add helper function for -soundhw deprecation. It can replace the simple init functions which just call {isa,pci}_create_simple() with a hardcoded type. It also prints a deprecation message. Signed-off-by: Gerd Hoffmann --- include/hw/audio/soundhw.h | 2 ++ hw/audio/soundhw.c | 24 +++

[PATCH v2 6/6] virtio-console: notify the guest about terminal resizes

2020-06-24 Thread Szymon Lukasz
If a virtio serial port is a console port forward terminal resize messages from the chardev backend to the guest. Signed-off-by: Szymon Lukasz --- hw/char/virtio-console.c | 64 +--- 1 file changed, 60 insertions(+), 4 deletions(-) diff --git a/hw/char/virtio

[PATCH v4 15/20] audio: rework pcspk_init()

2020-06-24 Thread Gerd Hoffmann
Instead of creating and returning the pc speaker accept it as argument. That allows to rework the initialization workflow in followup patches. Signed-off-by: Gerd Hoffmann --- include/hw/audio/pcspk.h | 6 +- hw/i386/pc.c | 2 +- hw/isa/i82378.c | 2 +- 3 files changed,

[PATCH v2 5/6] virtio-serial-bus: add terminal resize messages

2020-06-24 Thread Szymon Lukasz
Implement the part of the virtio spec that allows to notify the virtio driver about terminal resizes. The virtio spec contains two methods to achieve that: For legacy drivers, we have only one port and we put the terminal size in the config space and inject the config changed interrupt. For multi

[PATCH v4 09/20] audio: deprecate -soundhw sb16

2020-06-24 Thread Gerd Hoffmann
Switch to deprecated_register_soundhw(). Remove the now obsolete init function. Signed-off-by: Gerd Hoffmann --- hw/audio/sb16.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index df6f755a37f8..2d9e50f99b5d 100644 --- a/hw/audio/s

[PATCH v4 10/20] audio: deprecate -soundhw hda

2020-06-24 Thread Gerd Hoffmann
Add deprecation message to the audio init function. Signed-off-by: Gerd Hoffmann --- hw/audio/intel-hda.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index f673b8317a84..f6cea49686d7 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda

[PATCH v4 20/20] audio: set default value for pcspk.iobase property

2020-06-24 Thread Gerd Hoffmann
Allows to drop the explicit qdev_prop_set_uint32 call in pcspk_init. Signed-off-by: Gerd Hoffmann --- include/hw/audio/pcspk.h | 6 +- hw/audio/pcspk.c | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/hw/audio/pcspk.h b/include/hw/audio/pcspk.h index 8b4

[PATCH v4 11/20] pc_basic_device_init: pass PCMachineState

2020-06-24 Thread Gerd Hoffmann
Need access to pcms for pcspk initialization. Just preparation, no functional change. Signed-off-by: Gerd Hoffmann --- include/hw/i386/pc.h | 3 ++- hw/i386/pc.c | 3 ++- hw/i386/pc_piix.c| 2 +- hw/i386/pc_q35.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --gi

[PATCH v4 04/20] audio: deprecate -soundhw ac97

2020-06-24 Thread Gerd Hoffmann
Switch to deprecated_register_soundhw(). Remove the now obsolete init function. Add an alias so both ac97 and AC97 are working with -device. Signed-off-by: Gerd Hoffmann --- hw/audio/ac97.c | 9 ++--- qdev-monitor.c | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/

[PATCH v4 19/20] pcspk: update docs/system/target-i386-desc.rst.inc

2020-06-24 Thread Gerd Hoffmann
Add PC speaker with config hints. Signed-off-by: Gerd Hoffmann --- docs/system/target-i386-desc.rst.inc | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/system/target-i386-desc.rst.inc b/docs/system/target-i386-desc.rst.inc index 47a169e0ae2a..7d1fffacbea3

[PATCH v4 07/20] audio: deprecate -soundhw cs4231a

2020-06-24 Thread Gerd Hoffmann
Switch to deprecated_register_soundhw(). Remove the now obsolete init function. Signed-off-by: Gerd Hoffmann --- hw/audio/cs4231a.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index ffdbb58d6a11..59705a8d4701 100644 --- a/hw/

[PATCH v4 18/20] audio: add soundhw deprecation notice

2020-06-24 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- docs/system/deprecated.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 3a255591c341..4cbf3bba3944 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -82,6 +82,1

[PATCH v4 06/20] audio: deprecate -soundhw adlib

2020-06-24 Thread Gerd Hoffmann
Switch to deprecated_register_soundhw(). Remove the now obsolete init function. Signed-off-by: Gerd Hoffmann --- hw/audio/adlib.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index 7c3b67dcfb8c..65dff5b6fca4 100644 --- a/hw/audio/

[PATCH v4 17/20] audio: deprecate -soundhw pcspk

2020-06-24 Thread Gerd Hoffmann
Add deprecation message to the audio init function. Factor out audio initialization and call that from both audio init and realize, so setting the audiodev property is enough to properly initialize pcspk. Add a property alias to the machine type to set the audio device, so pcspk can be initialize

[PATCH v4 05/20] audio: deprecate -soundhw es1370

2020-06-24 Thread Gerd Hoffmann
Switch to deprecated_register_soundhw(). Remove the now obsolete init function. Add an alias so both es1370 and ES1370 are working with -device. Signed-off-by: Gerd Hoffmann --- hw/audio/es1370.c | 9 ++--- qdev-monitor.c| 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --g

[PATCH v4 01/20] stubs: add isa_create_simple

2020-06-24 Thread Gerd Hoffmann
Needed for -soundhw cleanup. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- stubs/isa-bus.c | 7 +++ stubs/Makefile.objs | 1 + 2 files changed, 8 insertions(+) create mode 100644 stubs/isa-bus.c diff --git a/stubs/isa-bus.c b/s

[PATCH v4 08/20] audio: deprecate -soundhw gus

2020-06-24 Thread Gerd Hoffmann
Switch to deprecated_register_soundhw(). Remove the now obsolete init function. Signed-off-by: Gerd Hoffmann --- hw/audio/gus.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index c8df2bde6b32..7e4a8cadad6f 100644 --- a/hw/audio/gus.c

[PATCH v4 02/20] stubs: add pci_create_simple

2020-06-24 Thread Gerd Hoffmann
Needed for -soundhw cleanup. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- stubs/pci-bus.c | 7 +++ stubs/Makefile.objs | 1 + 2 files changed, 8 insertions(+) create mode 100644 stubs/pci-bus.c diff --git a/stubs/pci-bus.c b/s

[PATCH v4 13/20] pc_basic_device_init: drop no_vmport arg

2020-06-24 Thread Gerd Hoffmann
Now that we pass pcms anyway, we don't need the no_vmport arg any more. No functional change. Signed-off-by: Gerd Hoffmann --- include/hw/i386/pc.h | 1 - hw/i386/pc.c | 3 +-- hw/i386/pc_piix.c| 1 - hw/i386/pc_q35.c | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff -

[PATCH v4 12/20] pc_basic_device_init: drop has_pit arg

2020-06-24 Thread Gerd Hoffmann
Now that we pass pcms anyway, we don't need the has_pit arg any more. No functional change. Signed-off-by: Gerd Hoffmann --- include/hw/i386/pc.h | 1 - hw/i386/pc.c | 3 +-- hw/i386/pc_piix.c| 2 +- hw/i386/pc_q35.c | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff

[PATCH v4 16/20] audio: create pcspk device early

2020-06-24 Thread Gerd Hoffmann
Create the pcspk device early, so it exists at machine type initialization time. Signed-off-by: Gerd Hoffmann --- include/hw/i386/pc.h | 1 + hw/i386/pc.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 283754f42bd5

[PATCH v4 14/20] softmmu: initialize spice and audio earlier

2020-06-24 Thread Gerd Hoffmann
audiodev must be initialized before machine_set_property so the machine can have audiodev property aliases. spice must initialize before audiodev because the default audiodev is spice only in case spice is actually enabled. Signed-off-by: Gerd Hoffmann --- softmmu/vl.c | 12 ++-- 1 file

Re: [PATCH v2 1/1] target/rx: Check for page crossings in use_goto_tb()

2020-06-24 Thread Aleksandar Markovic
уто, 2. јун 2020. у 00:19 Richard Henderson је написао/ла: > > On 5/31/20 6:45 AM, Ahmed Karaman wrote: > > Add the page crossings check in use_goto_tb(). If this check is not > > applied, a number of bugs may occasionally occur during target rx > > system mode emulation. > > Also, this check is n

Re: [PATCH v2 0/6] virtio-console: notify about the terminal size

2020-06-24 Thread Daniel P . Berrangé
On Wed, Jun 24, 2020 at 01:26:34PM +0200, Szymon Lukasz wrote: > Also there is a problem with the virtio spec and Linux Kernel > implementation, the order of fields in virtio_console_resize struct > differs between the kernel and the spec. I do not know if there is any > implementation of the virti

Re: [PATCH V6 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-24 Thread Aleksandar Markovic
сре, 24. јун 2020. у 12:45 Huacai Chen је написао/ла: > > Add Loongson-3 based machine support, it use liointc as the interrupt > controler and use GPEX as the pci controller. Currently it can only work > with KVM, but we will add TCG support in future. > > As the machine model is not based on any

Re: [PATCH v2 0/6] virtio-console: notify about the terminal size

2020-06-24 Thread Daniel P . Berrangé
On Wed, Jun 24, 2020 at 01:26:34PM +0200, Szymon Lukasz wrote: > In this series resize notifications are only supported for the stdio > backend but I think it should be easy to add support for the vc backend. > Support for tty/serial backends is complicated by the fact that there is > no clean way

Re: [PATCH v3 2/8] s390/sclp: check sccb len before filling in data

2020-06-24 Thread Thomas Huth
On 19/06/2020 00.22, Collin Walling wrote: The SCCB must be checked for a sufficient length before it is filled with any data. If the length is insufficient, then the SCLP command is suppressed and the proper response code is set in the SCCB header. Fixes: 832be0d8a3bb ("s390x: sclp: Report insu

Re: [PULL 25/31] osdep: Make MIN/MAX evaluate arguments only once

2020-06-24 Thread Eric Blake
On 6/24/20 5:50 AM, Paolo Bonzini wrote: From: Eric Blake I'm not aware of any immediate bugs in qemu where a second runtime evalution of the arguments to MIN() or MAX() causes a problem, but evaluation Update the MIN/MAX macros to only evaluate their argument once at runtime; Use of MIN

Re: sysbus failed assert for xen_sysdev

2020-06-24 Thread Jason Andryuk
On Wed, Jun 24, 2020 at 6:29 AM Paul Durrant wrote: > > > -Original Message- > > From: Jason Andryuk > > Sent: 24 June 2020 04:24 > > To: Paul Durrant > > Cc: Markus Armbruster ; Mark Cave-Ayland > > ; Anthony > > PERARD ; xen-devel > > ; QEMU > de...@nongnu.org> > > Subject: Re: sysb

RE: sysbus failed assert for xen_sysdev

2020-06-24 Thread Paul Durrant
> -Original Message- > From: Jason Andryuk > Sent: 24 June 2020 13:15 > To: Paul Durrant > Cc: Markus Armbruster ; Mark Cave-Ayland > ; Anthony > PERARD ; xen-devel > ; QEMU de...@nongnu.org> > Subject: Re: sysbus failed assert for xen_sysdev > > On Wed, Jun 24, 2020 at 6:29 AM Paul D

[PATCH 1/2] xen: fix legacy 'xen-sysdev' and 'xen-backend' bus types

2020-06-24 Thread Paul Durrant
From: Paul Durrant 'xen-sysdev' plugs into the 'System' bus type, not 'xen-sysbus. That bus type is what 'xen-backend' plugs into. 'xen-sysdev' is drived form 'sys-bus-device' so the bus type need not be overridden. 'xen-backend' is derived from 'device', which plugs into the generic 'bus' type,

[PATCH 0/2] fix assertion failures when using Xen

2020-06-24 Thread Paul Durrant
From: Paul Durrant Paul Durrant (2): xen: fix legacy 'xen-sysdev' and 'xen-backend' bus types xen: cleanup unrealized flash devices hw/i386/pc_piix.c | 9 ++--- hw/i386/pc_sysfw.c | 2 +- hw/xen/xen-legacy-backend.c | 4 ++-- include/hw/i386/pc.h| 1 + 4 files

[PATCH 2/2] xen: cleanup unrealized flash devices

2020-06-24 Thread Paul Durrant
From: Paul Durrant The generic pc_machine_initfn() calls pc_system_flash_create() which creates 'system.flash0' and 'system.flash1' devices. These devices are then realized by pc_system_flash_map() which is called from pc_system_firmware_init() which itself is called via pc_memory_init(). The lat

[PATCH] xen: Fix xen-legacy-backend qdev types

2020-06-24 Thread Jason Andryuk
xen-sysdev is a TYPE_SYS_BUS_DEVICE. bus_type should not be changed so that it can plug into the System bus. Otherwise this assert triggers: qemu-system-i386: hw/core/qdev.c:102: qdev_set_parent_bus: Assertion `dc->bus_type && object_dynamic_cast(OBJECT(bus), dc->bus_type)' failed. TYPE_XENBACKE

Re: [PULL 25/31] osdep: Make MIN/MAX evaluate arguments only once

2020-06-24 Thread Daniel P . Berrangé
On Wed, Jun 24, 2020 at 07:13:17AM -0500, Eric Blake wrote: > On 6/24/20 5:50 AM, Paolo Bonzini wrote: > > From: Eric Blake > > > > I'm not aware of any immediate bugs in qemu where a second runtime > > evalution of the arguments to MIN() or MAX() causes a problem, but > > evaluation > > > Upda

Re: [PATCH v9 1/5] Allow vu_message_read to be replaced

2020-06-24 Thread Kevin Wolf
Am 24.06.2020 um 05:36 hat Coiby Xu geschrieben: > On Thu, Jun 18, 2020 at 12:43:47PM +0200, Kevin Wolf wrote: > > Am 14.06.2020 um 20:39 hat Coiby Xu geschrieben: > > > Allow vu_message_read to be replaced by one which will make use of the > > > QIOChannel functions. Thus reading vhost-user messag

Re: [PATCH v4 18/20] audio: add soundhw deprecation notice

2020-06-24 Thread Eric Blake
On 6/24/20 6:30 AM, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- docs/system/deprecated.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 3a255591c341..4cbf3bba3944 100644 --- a/docs/system/deprecated.rst ++

Re: [PATCH v4 20/20] audio: set default value for pcspk.iobase property

2020-06-24 Thread Eric Blake
On 6/24/20 6:30 AM, Gerd Hoffmann wrote: Allows to drop the explicit qdev_prop_set_uint32 call in pcspk_init. "allows to $verb" is not idiomatic, better is "allows ${verb}ing" [Allows dropping] or "allows $subject to $verb" [Allows us to drop]. Signed-off-by: Gerd Hoffmann --- include/h

RE: [PATCH] xen: Fix xen-legacy-backend qdev types

2020-06-24 Thread Paul Durrant
> -Original Message- > From: Jason Andryuk > Sent: 24 June 2020 13:20 > To: Stefano Stabellini ; Anthony Perard > ; Paul > Durrant ; xen-de...@lists.xenproject.org > Cc: Jason Andryuk ; qemu-devel@nongnu.org > Subject: [PATCH] xen: Fix xen-legacy-backend qdev types > > xen-sysdev is a TY

Re: [PATCH 1/2] vvfat: Check that updated filenames are valid

2020-06-24 Thread Kevin Wolf
Am 23.06.2020 um 20:21 hat Eric Blake geschrieben: > On 6/23/20 12:55 PM, Kevin Wolf wrote: > > FAT allows only a restricted set of characters in file names, and for > > some of the illegal characters, it's actually important that we catch > > them: If filenames can contain '/', the guest can const

Re: [PATCH v3 6/8] s390/sclp: add extended-length sccb support for kvm guest

2020-06-24 Thread Cornelia Huck
On Thu, 18 Jun 2020 18:22:56 -0400 Collin Walling wrote: > As more features and facilities are added to the Read SCP Info (RSCPI) > response, more space is required to store them. The space used to store > these new features intrudes on the space originally used to store CPU > entries. This means

Re: [PATCH v3 6/8] s390/sclp: add extended-length sccb support for kvm guest

2020-06-24 Thread Thomas Huth
On 24/06/2020 14.36, Cornelia Huck wrote: On Thu, 18 Jun 2020 18:22:56 -0400 Collin Walling wrote: As more features and facilities are added to the Read SCP Info (RSCPI) response, more space is required to store them. The space used to store these new features intrudes on the space originally

Re: [PATCH 2/2] vvfat: Fix array_remove_slice()

2020-06-24 Thread Kevin Wolf
Am 23.06.2020 um 20:30 hat Eric Blake geschrieben: > On 6/23/20 12:55 PM, Kevin Wolf wrote: > > array_remove_slice() calls array_roll() with array->next - 1 as the > > destination index. This is only correct for count == 1, otherwise we're > > writing past the end of the array. array->next - count

[PATCH v2 2/2] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id

2020-06-24 Thread Eric Auger
This new test checks that attempting to create an object with an existing ID gracefully fails. Signed-off-by: Eric Auger --- tests/qtest/qmp-cmd-test.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c index 9f5228cd99

[PATCH v2 0/2] Avoid abort on QMP attempt to add an object with duplicate id

2020-06-24 Thread Eric Auger
Attempting to add an object through QMP with an id that is already used leads to a qemu abort. This is a regression since d2623129a7de ("qom: Drop parameter @errp of object_property_add() & friends"). The first patch fixes the issue and the second patch adds a test to check the error is gracefully

[PATCH v2 1/2] qom: Introduce object_property_try_add_child()

2020-06-24 Thread Eric Auger
object_property_add() does not allow object_property_try_add() to gracefully fail as &error_abort is passed as an error handle. However such failure can easily be triggered from the QMP shell when, for instance, one attempts to create an object with an id that already exists. This is achived from

Re: [PATCH v3 8/8] s390: guest support for diagnose 0x318

2020-06-24 Thread Cornelia Huck
On Thu, 18 Jun 2020 18:22:58 -0400 Collin Walling wrote: > DIAGNOSE 0x318 (diag318) is an s390 instruction that allows the storage > of diagnostic information that is collected by the firmware in the case > of hardware/firmware service events. > > QEMU handles the instruction by storing the info

Re: [PATCH] xen: Fix xen-legacy-backend qdev types

2020-06-24 Thread Jason Andryuk
On Wed, Jun 24, 2020 at 8:30 AM Paul Durrant wrote: > > > -Original Message- > > From: Jason Andryuk > > Sent: 24 June 2020 13:20 > > To: Stefano Stabellini ; Anthony Perard > > ; Paul > > Durrant ; xen-de...@lists.xenproject.org > > Cc: Jason Andryuk ; qemu-devel@nongnu.org > > Subject:

Re: [PATCH v7 0/3] vTPM/aarch64 ACPI support

2020-06-24 Thread Ard Biesheuvel
On Mon, 22 Jun 2020 at 16:06, Eric Auger wrote: > > Those patches bring MMIO TPM TIS ACPI support in machvirt. > > On ARM, the TPM2 table is added when the TPM TIS sysbus > device is dynamically instantiated in machvirt. > > Also the TPM2 device object is described in the DSDT. > > Many thanks to

Re: [PATCH v3 6/8] s390/sclp: add extended-length sccb support for kvm guest

2020-06-24 Thread Cornelia Huck
On Wed, 24 Jun 2020 14:40:58 +0200 Thomas Huth wrote: > On 24/06/2020 14.36, Cornelia Huck wrote: > > On Thu, 18 Jun 2020 18:22:56 -0400 > > Collin Walling wrote: > > > >> As more features and facilities are added to the Read SCP Info (RSCPI) > >> response, more space is required to store the

Re: [PATCH v2 2/2] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id

2020-06-24 Thread Thomas Huth
On 24/06/2020 14.43, Eric Auger wrote: This new test checks that attempting to create an object with an existing ID gracefully fails. Signed-off-by: Eric Auger --- tests/qtest/qmp-cmd-test.c | 18 ++ 1 file changed, 18 insertions(+) Acked-by: Thomas Huth

[PATCH v5 04/10] build: fix device module builds

2020-06-24 Thread Gerd Hoffmann
See comment. Feels quite hackish. Better ideas anyone? Signed-off-by: Gerd Hoffmann --- Makefile.target | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Makefile.target b/Makefile.target index 8ed1eba95b9c..c70325df5796 100644 --- a/Makefile.target +++ b/Makefile.target @@ -179,6 +17

[PATCH v5 01/10] module: qom module support

2020-06-24 Thread Gerd Hoffmann
Add support for qom types provided by modules. For starters use a manually maintained list which maps qom type to module and prefix. Two load functions are added: One to load the module for a specific type, and one to load all modules (needed for object/device lists as printed by -- for example

[PATCH v5 00/10] build some devices as modules.

2020-06-24 Thread Gerd Hoffmann
Specifically devices which depend on shared libraries, to reduce the runtime dependencies of core qemu. v2: - better commit messages. - add some more devices. - general tidy up. v3: - rebase, solve stubs conflict. - fix -vga $name - fix -device $name,help v4: - rebase to latest master -

<    1   2   3   4   5   6   >