[PATCH v5 16/16] python/qemu: Add mypy type annotations

2020-07-09 Thread John Snow
These should all be purely annotations with no changes in behavior at all. You need to be in the python folder, but you should be able to confirm that these annotations are correct (or at least self-consistent) by running `mypy --strict qemu`. Signed-off-by: John Snow --- python/qemu/accel.py

[PATCH v5 15/16] iotests.py: Adjust HMP kwargs typing

2020-07-09 Thread John Snow
mypy wants to ensure there's consistency between the kwargs arguments types and any unspecified keyword arguments. In this case, conv_keys is a bool, but the remaining keys are Any type. Mypy (correctly) infers the **kwargs type to be **Dict[str, str], which is not compatible with conv_keys: bool.

[PATCH v5 11/16] python/machine.py: use qmp.command

2020-07-09 Thread John Snow
machine.py and qmp.py both do the same thing here; refactor machine.py to use qmp.py's functionality more directly. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- python/qemu/machine.py | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git

[PATCH v5 06/16] python/qmp.py: add QMPProtocolError

2020-07-09 Thread John Snow
In the case that we receive a reply but are unable to understand it, use this exception name to indicate that case. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf --- python/qemu/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v5 09/16] python/machine.py: Don't modify state in _base_args()

2020-07-09 Thread John Snow
Don't append to the _remove_files list during _base_args; instead do so during _launch. Rework _base_args as a @property to help facilitate this impression. This has the additional benefit of making the type of _console_address easier to analyze statically. Signed-off-by: John Snow Reviewed-by:

[PATCH v5 12/16] python/machine.py: Add _qmp access shim

2020-07-09 Thread John Snow
Like many other Optional[] types, it's not always a given that this object will be set. Wrap it in a type-shim that raises a meaningful error and will always return a concrete type. Signed-off-by: John Snow --- python/qemu/machine.py | 24 +--- 1 file changed, 13

[PATCH v5 14/16] python/qemu: make 'args' style arguments immutable

2020-07-09 Thread John Snow
These arguments don't need to be mutable and aren't really used as such. Clarify their types as immutable and adjust code to match where necessary. In general, It's probably best not to accept a user-defined mutable object and store it as internal object state unless there's a strong

[PATCH v5 07/16] python/machine.py: Fix monitor address typing

2020-07-09 Thread John Snow
Prior to this, it's difficult for mypy to intuit what the concrete type of the monitor address is; it has difficulty inferring the type across two variables. Create _monitor_address as a property that always returns a valid address to simplify static type analysis. To preserve our ability to

[PATCH v5 13/16] python/machine.py: fix _popen access

2020-07-09 Thread John Snow
As always, Optional[T] causes problems with unchecked access. Add a helper that asserts the pipe is present before we attempt to talk with it. Signed-off-by: John Snow --- python/qemu/machine.py | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH v5 04/16] python/qmp.py: Do not return None from cmd_obj

2020-07-09 Thread John Snow
This makes typing the qmp library difficult, as it necessitates wrapping Optional[] around the type for every return type up the stack. At some point, it becomes difficult to discern or remember why it's None instead of the expected object. Use the python exception system to tell us exactly why

[PATCH v5 01/16] python/qmp.py: Define common types

2020-07-09 Thread John Snow
Define some common types that we'll need to annotate a lot of other functions going forward. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- python/qemu/qmp.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py index

[PATCH v5 05/16] python/qmp.py: add casts to JSON deserialization

2020-07-09 Thread John Snow
mypy and python type hints are not powerful enough to properly describe JSON messages in Python 3.6. The best we can do, generally, is describe them as Dict[str, Any]. Add casts to coerce this type for static analysis; but do NOT enforce this type at runtime in any way. Note: Python 3.8 adds a

[PATCH v5 10/16] python/machine.py: Handle None events in events_wait

2020-07-09 Thread John Snow
If the timeout is 0, we can get None back. Handle this explicitly. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- python/qemu/machine.py | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index

[PATCH v5 08/16] python/machine.py: reorder __init__

2020-07-09 Thread John Snow
Put the init arg handling all at the top, and mostly in order (deviating when one is dependent on another), and put what is effectively runtime state declaration at the bottom. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf --- python/qemu/machine.py | 29

[PATCH v5 03/16] python/qmp.py: re-absorb MonitorResponseError

2020-07-09 Thread John Snow
When I initially split this out, I considered this more of a machine error than a QMP protocol error, but I think that's misguided. Move this back to qmp.py and name it QMPResponseError. Convert qmp.command() to use this exception type. Signed-off-by: John Snow Reviewed-by: Philippe

[PATCH v5 00/16] python: add mypy support to python/qemu

2020-07-09 Thread John Snow
Based-on: 20200710050649.32434-1-js...@redhat.com This series modifies the python/qemu library to comply with mypy --strict, pylint, and flake8. This requires my "refactor shutdown" patch as a pre-requisite. v5: (Things unchanged omitted) 003/16:[] [-C] 'python/qmp.py: re-absorb

[PATCH v5 02/16] iotests.py: use qemu.qmp type aliases

2020-07-09 Thread John Snow
iotests.py should use the type definitions from qmp.py instead of its own. Signed-off-by: John Snow Reviewed-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/iotests.py

[PATCH v5 12/12] python/machine.py: change default wait timeout to 3 seconds

2020-07-09 Thread John Snow
Machine.wait() does not appear to be used except in the acceptance tests, and an infinite timeout by default in a test suite is not the most helpful. Change it to 3 seconds, like the default shutdown timeout. Signed-off-by: John Snow --- python/qemu/machine.py | 4 ++-- 1 file changed, 2

[PATCH v5 11/12] python/machine.py: re-add sigkill warning suppression

2020-07-09 Thread John Snow
If the user kills QEMU on purpose, we don't need to warn them about that having happened: they know already. Signed-off-by: John Snow --- python/qemu/machine.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index

[PATCH v5 10/12] python/machine.py: split shutdown into hard and soft flavors

2020-07-09 Thread John Snow
This is done primarily to avoid the 'bare except' pattern, which suppresses all exceptions during shutdown and can obscure errors. Replace this with a pattern that isolates the different kind of shutdown paradigms (_hard_shutdown and _soft_shutdown), and a new fallback shutdown handler

[PATCH v5 09/12] tests/acceptance: Don't test reboot on cubieboard

2020-07-09 Thread John Snow
cubieboard does not have a functioning reboot, it halts and QEMU does not exit. vm.shutdown() is modified in a forthcoming patch that makes it less tolerant of race conditions on shutdown; tests should consciously decide to WAIT or to SHUTDOWN qemu. So long as this test is attempting to reboot,

[PATCH v5 08/12] tests/acceptance: wait() instead of shutdown() where appropriate

2020-07-09 Thread John Snow
When issuing 'reboot' to a VM with the no-reboot option, that VM will exit. When then issuing a shutdown command, the cleanup may race. Add calls to vm.wait() which will gracefully mark the VM as having exited. Subsequent vm.shutdown() calls in generic tearDown code will not race when called

[PATCH v5 01/12] python/machine.py: consolidate _post_shutdown()

2020-07-09 Thread John Snow
Move more cleanup actions into _post_shutdown. As a change, if QEMU should so happen to be terminated during a call to wait(), that event will now be logged. This is not likely to occur during normative use. Signed-off-by: John Snow --- python/qemu/machine.py | 27 +--

[PATCH v5 06/12] python/machine.py: Add a configurable timeout to shutdown()

2020-07-09 Thread John Snow
Three seconds is hardcoded. Use it as a default parameter instead, and use that value for both waits that may occur in the function. Signed-off-by: John Snow --- python/qemu/machine.py | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/qemu/machine.py

[PATCH v4 7/7] Makefile: Ship the generic platform bios images for RISC-V

2020-07-09 Thread Bin Meng
From: Bin Meng Update the install blob list to include the generic platform fw_dynamic bios images. Signed-off-by: Bin Meng --- (no changes since v3) Changes in v3: - change fw_jump to fw_dynamic in the Makefile Changes in v2: - new patch: Makefile: Ship the generic platform bios images

[PATCH v5 07/12] python/machine.py: Make wait() call shutdown()

2020-07-09 Thread John Snow
At this point, shutdown(has_quit=True) and wait() do essentially the same thing; they perform cleanup without actually instructing QEMU to quit. Define one in terms of the other. Signed-off-by: John Snow --- python/qemu/machine.py | 17 + 1 file changed, 9 insertions(+), 8

[PATCH v4 6/7] gitlab-ci/opensbi: Update GitLab CI to build generic platform

2020-07-09 Thread Bin Meng
From: Bin Meng This updates the GitLab CI opensbi job to build opensbi bios images for the generic platform. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- (no changes since v3) Changes in v3: - Generate fw_dynamic images in the artifacts Changes in v2:

[PATCH v5 00/12] python/machine.py: refactor shutdown

2020-07-09 Thread John Snow
v5: More or less rewritten. This series is motivated by a desire to move python/qemu onto a strict mypy/pylint regime to help prevent regressions in the python codebase. 1. Remove the "bare except" pattern in the existing shutdown code, which can mask problems and make debugging difficult.

[PATCH v5 05/12] python/machine.py: Prohibit multiple shutdown() calls

2020-07-09 Thread John Snow
If the VM is not launched, don't try to shut it down. As a change, _post_shutdown now unconditionally also calls _early_cleanup in order to offer comprehensive object cleanup in failure cases. As a courtesy, treat it as a NOP instead of rejecting it as an error. This is slightly nicer for

[PATCH v5 03/12] python/machine.py: Add _early_cleanup hook

2020-07-09 Thread John Snow
Some parts of cleanup need to occur prior to shutdown, otherwise shutdown might break. Move this into a suitably named method/callback. Signed-off-by: John Snow --- python/qemu/machine.py | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git

[PATCH v4 4/7] hw/riscv: Use pre-built bios image of generic platform for virt & sifive_u

2020-07-09 Thread Bin Meng
From: Bin Meng Update virt and sifive_u machines to use the opensbi fw_dynamic bios image built for the generic FDT platform. Remove the out-of-date no longer used bios images. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- Changes in v4: - Remove old

[PATCH v5 04/12] python/machine.py: Perform early cleanup for wait() calls, too

2020-07-09 Thread John Snow
This is primarily for consistency, and is a step towards wait() and shutdown() sharing the same implementation so that the two cleanup paths cannot diverge. Signed-off-by: John Snow --- python/qemu/machine.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/qemu/machine.py

[PATCH v5 02/12] python/machine.py: Close QMP socket in cleanup

2020-07-09 Thread John Snow
It's not important to do this before waiting for the process to exit, so it can be done during generic post-shutdown cleanup. Signed-off-by: John Snow --- python/qemu/machine.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/qemu/machine.py

[PATCH v4 5/7] hw/riscv: spike: Change the default bios to use generic platform image

2020-07-09 Thread Bin Meng
From: Bin Meng To keep sync with other RISC-V machines, change the default bios to use generic platform fw_dynamic.elf image. While we are here, add some comments to mention that using ELF files for the Spike machine was intentional. Signed-off-by: Bin Meng Reviewed-by: Anup Patel

[PATCH v4 3/7] roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware

2020-07-09 Thread Bin Meng
From: Bin Meng The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently. Update our Makefile to build the

[PATCH v4 2/7] roms/opensbi: Upgrade from v0.7 to v0.8

2020-07-09 Thread Bin Meng
From: Bin Meng Upgrade OpenSBI from v0.7 to v0.8. The v0.8 release includes the following commits: 1bb00ab lib: No need to provide default PMP region using platform callbacks a9eac67 include: sbi_platform: Combine reboot and shutdown into one callback 6585fab lib: utils: Add SiFive test device

[PATCH v4 1/7] configure: Create symbolic links for pc-bios/*.elf files

2020-07-09 Thread Bin Meng
From: Bin Meng Now we need to ship the OpenSBI fw_dynamic.elf image for the RISC-V Spike machine, it requires us to create symbolic links for pc-bios/*.elf files. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - new patch: configure: Create

[PATCH v4 0/7] riscv: Switch to use generic platform fw_dynamic type opensbi bios images

2020-07-09 Thread Bin Meng
From: Bin Meng The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently. This series updates QEMU to switch

[PATCH v2] Remove the CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE switch

2020-07-09 Thread Thomas Huth
GCC supports "#pragma GCC diagnostic" since version 4.6, and Clang seems to support it, too, since its early versions 3.x. That means that our minimum required compiler versions all support this pragma already and we can remove the test from configure and all the related #ifdefs in the code.

Re: [PATCH 3/3] cpu-timers, icount: new modules

2020-07-09 Thread Thomas Huth
On 09/07/2020 20.38, Claudio Fontana wrote: > On 7/8/20 5:05 PM, Paolo Bonzini wrote: >> On 08/07/20 17:00, Claudio Fontana wrote: Bisectable, 100% failure rate, etc. :( Can you split the patch in multiple parts, specifically separating any rename or introducing of includes from

[Bug 1877526] Re: KVM internal crash

2020-07-09 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1877526 Title: KVM

Re: Separate notifications from list messages?

2020-07-09 Thread Thomas Huth
On 09/07/2020 20.14, Liviu Ionescu wrote: > Now, with the migration to GitLab under way, could you consider separating > the notifications sent by GitLab from the messages exchanged on the list? > > I mean allowing those interested in receiving the notifications to explicitly > subscribe to

Re: [PULL v2 40/41] vhost-vdpa: introduce vhost-vdpa backend

2020-07-09 Thread Cindy Lu
Peter Maydell 于2020年7月9日周四 下午11:15写道: > On Sat, 4 Jul 2020 at 19:31, Michael S. Tsirkin wrote: > > > > From: Cindy Lu > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a generic device for vDPA purpose, > > this vDPA device

Re: [PATCH v5 1/4] target/i386: add missing vmx features for several CPU models

2020-07-09 Thread Chenyi Qiang
On 7/10/2020 6:12 AM, Eduardo Habkost wrote: I'm very sorry for taking so long to review this. Question below: On Fri, Jun 19, 2020 at 03:31:11PM +0800, Chenyi Qiang wrote: Add some missing VMX features in Skylake-Server, Cascadelake-Server and Icelake-Server CPU models based on the

Re: [PATCH] 9p: null terminate fs driver options list

2020-07-09 Thread Li Qiang
P J P 于2020年7月10日周五 上午2:01写道: > > From: Prasad J Pandit > > NULL terminate fs driver options' list, validate_opt() looks for > a null entry to terminate the loop. > > Signed-off-by: Prasad J Pandit Reviewed-by: Li Qiang > --- > fsdev/qemu-fsdev.c | 3 +++ > 1 file changed, 3 insertions(+) >

Re: [PATCH v2 2/2] hw/riscv: sifive_u: Provide a reliable way for bootloader to detect whether it is running in QEMU

2020-07-09 Thread Bin Meng
Hi Palmer, On Fri, Jul 10, 2020 at 8:45 AM Palmer Dabbelt wrote: > > On Thu, 09 Jul 2020 15:09:18 PDT (-0700), alistai...@gmail.com wrote: > > On Thu, Jul 9, 2020 at 3:07 AM Bin Meng wrote: > >> > >> From: Bin Meng > >> > >> The reset vector codes are subject to change, e.g.: with recent > >>

Re: [PATCH v2 2/2] hw/riscv: sifive_u: Provide a reliable way for bootloader to detect whether it is running in QEMU

2020-07-09 Thread Bin Meng
Hi Alistair, On Fri, Jul 10, 2020 at 6:19 AM Alistair Francis wrote: > > On Thu, Jul 9, 2020 at 3:07 AM Bin Meng wrote: > > > > From: Bin Meng > > > > The reset vector codes are subject to change, e.g.: with recent > > fw_dynamic type image support, it breaks oreboot again. > > This is a

Re: [PATCH v2 2/2] hw/riscv: sifive_u: Provide a reliable way for bootloader to detect whether it is running in QEMU

2020-07-09 Thread Palmer Dabbelt
On Thu, 09 Jul 2020 15:09:18 PDT (-0700), alistai...@gmail.com wrote: On Thu, Jul 9, 2020 at 3:07 AM Bin Meng wrote: From: Bin Meng The reset vector codes are subject to change, e.g.: with recent fw_dynamic type image support, it breaks oreboot again. This is a recurring problem, I have

Re: [RFC PATCH 3/3] fuzz: Add callbacks for dma-access functions

2020-07-09 Thread Alexander Bulekov
On 200623 1514, Stefan Hajnoczi wrote: > On Thu, Jun 11, 2020 at 01:56:51AM -0400, Alexander Bulekov wrote: > > Signed-off-by: Alexander Bulekov > > --- > > exec.c| 17 - > > include/exec/memory.h | 8 > >

[PULL 0/1] virtio: bugfix

2020-07-09 Thread Michael S. Tsirkin
Fixes a single bug in vdpa. The following changes since commit eb2c66b10efd2b914b56b20ae90655914310c925: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-07-06' into staging (2020-07-07 19:47:26 +0100) are available in the Git repository at:

[PULL 1/1] vhost-vdpa: fix the compile issue without kvm

2020-07-09 Thread Michael S. Tsirkin
From: Cindy Lu Fix the compile issue in the system without the kvm support Signed-off-by: Cindy Lu Message-Id: <20200708084922.21904-1-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-vdpa.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH v5 3/4] target/i386: add the missing features for Icelake-Server CPU model

2020-07-09 Thread Eduardo Habkost
On Fri, Jun 19, 2020 at 03:31:13PM +0800, Chenyi Qiang wrote: > Add the missing features(sha-ni, avx512ifma, rdpid, fsrm) in the > Icelake-Server CPU model. > > Signed-off-by: Chenyi Qiang Reviewed-by: Eduardo Habkost > --- > target/i386/cpu.c | 10 ++ > 1 file changed, 10

Re: [PATCH v5 2/4] target/i386: add fast short REP MOV support

2020-07-09 Thread Eduardo Habkost
On Fri, Jun 19, 2020 at 03:31:12PM +0800, Chenyi Qiang wrote: > For CPUs support fast short REP MOV[CPUID.(EAX=7,ECX=0):EDX(bit4)], e.g > Icelake and Tigerlake, expose it to the guest VM. > > Signed-off-by: Chenyi Qiang Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v2 2/2] hw/riscv: sifive_u: Provide a reliable way for bootloader to detect whether it is running in QEMU

2020-07-09 Thread Alistair Francis
On Thu, Jul 9, 2020 at 3:07 AM Bin Meng wrote: > > From: Bin Meng > > The reset vector codes are subject to change, e.g.: with recent > fw_dynamic type image support, it breaks oreboot again. This is a recurring problem, I have another patch for Oreboot to fix the latest breakage. > > Add a

[PATCH v2 v2 1/2] hw/char: Convert the Ibex UART to use the qdev Clock model

2020-07-09 Thread Alistair Francis
Conver the Ibex UART to use the recently added qdev-clock functions. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- include/hw/char/ibex_uart.h | 3 +++ hw/char/ibex_uart.c | 30 +++--- 2 files changed, 30 insertions(+), 3 deletions(-)

[PATCH v2 v2 0/2] A few RISC-V fixes

2020-07-09 Thread Alistair Francis
This series has a few fixes for RISC-V OpenTitan v2: - Convert Ibex UART to the register field API Alistair Francis (2): hw/char: Convert the Ibex UART to use the qdev Clock model hw/char: Convert the Ibex UART to use the registerfields API include/hw/char/ibex_uart.h | 79

[PATCH v2 v2 2/2] hw/char: Convert the Ibex UART to use the registerfields API

2020-07-09 Thread Alistair Francis
Signed-off-by: Alistair Francis --- include/hw/char/ibex_uart.h | 76 ++--- hw/char/ibex_uart.c | 130 ++-- 2 files changed, 100 insertions(+), 106 deletions(-) diff --git a/include/hw/char/ibex_uart.h b/include/hw/char/ibex_uart.h index

Re: [PATCH v5 4/4] target/i386: modify Icelake-Server CPU model number

2020-07-09 Thread Eduardo Habkost
On Fri, Jun 19, 2020 at 03:31:14PM +0800, Chenyi Qiang wrote: > According to the Intel Icelake family list, Icelake-Server uses model > number 106(0x6A). > > Signed-off-by: Chenyi Qiang Same question as in patch 1/4: why are you changing v1 instead of adding a new version? > --- >

Re: [PATCH v5 1/4] target/i386: add missing vmx features for several CPU models

2020-07-09 Thread Eduardo Habkost
I'm very sorry for taking so long to review this. Question below: On Fri, Jun 19, 2020 at 03:31:11PM +0800, Chenyi Qiang wrote: > Add some missing VMX features in Skylake-Server, Cascadelake-Server and > Icelake-Server CPU models based on the output of Paolo's script. > > Signed-off-by:

Re: Failure prints during format or mounting a usb storage device

2020-07-09 Thread Paul Zimmerman
On Thu, Jul 9, 2020 at 12:57 AM Gerd Hoffmann wrote: > > Starting at line 1746 is the first CBW, it's for an Inquiry command. > > > > Starting at line 1759 is the response, notice at line 1761 the MSD debug > > says "Data in 64/36", which is strange. > > Not really. First is the packet size,

Re: [PATCH] linux-user: Fix Coverity CID 1430271 / CID 1430272

2020-07-09 Thread Peter Maydell
On Thu, 9 Jul 2020 at 21:00, Laurent Vivier wrote: > > In new functions print_ioctl() and print_syscall_ret_ioctl(), we don't > check if lock_user() returns NULL and this would cause a segfault in > thunk_print(). > > If lock_user() returns NULL don't call thunk_print() but prints only the >

Re: [PATCH] hw/register: Document register_init_block @memory_size

2020-07-09 Thread Laurent Vivier
Le 09/07/2020 à 19:19, Alistair Francis a écrit : > On Wed, Jul 8, 2020 at 5:43 AM Laurent Vivier wrote: >> >> Le 07/07/2020 à 08:23, Philippe Mathieu-Daudé a écrit : >>> Document the 'memory_size' argument of register_init_block(). >>> >>> Fixes: a74229597e ("register: Add block initialise

QEMU | Pipeline #164956421 has failed for master | aff2caf6

2020-07-09 Thread GitLab via
Your pipeline has failed. Project: QEMU ( https://gitlab.com/qemu-project/qemu ) Branch: master ( https://gitlab.com/qemu-project/qemu/-/commits/master ) Commit: aff2caf6 ( https://gitlab.com/qemu-project/qemu/-/commit/aff2caf6b3fbab1062e117a47b66d27f7fd2f272 ) Commit Message: Merge

Re: [RFC PATCH 1/3] hw/i2c/smbus_eeprom: Set QOM parent

2020-07-09 Thread Eduardo Habkost
On Fri, Jun 26, 2020 at 04:15:40PM +0200, Philippe Mathieu-Daudé wrote: > On 6/26/20 4:03 PM, BALATON Zoltan wrote: > > On Fri, 26 Jun 2020, Philippe Mathieu-Daudé wrote: > >> + Eduardo / Mark / Edgard / Alistair / Fred for QOM design. > >> > >> On 6/26/20 12:54 PM, BALATON Zoltan wrote: > >>>

[PATCH] linux-user: Fix Coverity CID 1430271 / CID 1430272

2020-07-09 Thread Laurent Vivier
In new functions print_ioctl() and print_syscall_ret_ioctl(), we don't check if lock_user() returns NULL and this would cause a segfault in thunk_print(). If lock_user() returns NULL don't call thunk_print() but prints only the value of the (invalid) pointer. Tested with: # cat ioctl.c

[PATCH 12/13] gluster: add GUri-based URI parsing

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/gluster.c | 81 + 1 file changed, 61 insertions(+), 20 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index c06eca1c12f..2cad76deabf 100644 --- a/block/gluster.c +++ b/block/gluster.c @@

[PATCH 10/13] sheepdog: add GUri-based URI parsing

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/sheepdog.c | 99 ++-- 1 file changed, 71 insertions(+), 28 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 3403adfc2cd..3f3f5b7dba9 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@

Re: [RFC PATCH 2/3] hw/i2c/smbus_eeprom: Add description based on child name

2020-07-09 Thread Eduardo Habkost
On Fri, Jun 26, 2020 at 04:26:33PM +0200, Philippe Mathieu-Daudé wrote: > On 6/26/20 1:00 PM, BALATON Zoltan wrote: > > On Fri, 26 Jun 2020, Philippe Mathieu-Daudé wrote: > >> Suggested-by: Markus Armbruster > >> Signed-off-by: Philippe Mathieu-Daudé > >> --- > >> hw/i2c/smbus_eeprom.c | 3

[PATCH 09/13] nbd: add GUri-based URI parsing version

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nbd.c| 86 +++--- util/Makefile.objs | 2 +- 2 files changed, 66 insertions(+), 22 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index faadcab442b..fdc4a53a98f 100644 --- a/block/nbd.c +++

[PATCH 06/13] block/nfs: auto-ify URI parsing variables

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nfs.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index b1718d125a4..93d719551d2 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -77,34 +77,34 @@ typedef struct NFSRPC {

[PATCH 08/13] build-sys: add HAVE_GLIB_GURI

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- configure | 7 +++ 1 file changed, 7 insertions(+) diff --git a/configure b/configure index ee6c3c6792a..cd2fc120aed 100755 --- a/configure +++ b/configure @@ -3924,6 +3924,10 @@ if $pkg_config --atleast-version=$glib_req_ver gio-unix-2.0; then

[PATCH 04/13] block/sheepdog: auto-ify URI parsing variables

2020-07-09 Thread Marc-André Lureau
Since we are going to introduce URI parsing alternative, I changed the way SheepdogConfig takes care of host/path & URI/QueryParams lifetimes. Signed-off-by: Marc-André Lureau --- block/sheepdog.c | 72 1 file changed, 30 insertions(+), 42

[PATCH 07/13] block/gluster: auto-ify URI parsing variables

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/gluster.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index 31233cac696..c06eca1c12f 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -349,10 +349,10 @@ static

[PATCH 13/13] ssh: add GUri-based URI parsing

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/ssh.c | 75 + 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index c8f6ad79e3c..d2bc6277613 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -180,9 +180,37 @@

[PATCH 11/13] nfs: add GUri-based URI parsing

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nfs.c | 96 - 1 file changed, 65 insertions(+), 31 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 93d719551d2..0b24044535d 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -77,6 +77,31 @@

[PATCH 03/13] block/vxhs: auto-ify URI parsing variables

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vxhs.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/block/vxhs.c b/block/vxhs.c index d79fc97df66..5d61cfb7548 100644 --- a/block/vxhs.c +++ b/block/vxhs.c @@ -174,14 +174,12 @@ static QemuOptsList runtime_tcp_opts = {

[PATCH 05/13] block/ssh: auto-ify URI parsing variables

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/ssh.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index 098dbe03c15..c8f6ad79e3c 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -180,9 +180,9 @@ static void

[PATCH 01/13] uri: add g_auto macros for URI & QueryParams

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/qemu/uri.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/uri.h b/include/qemu/uri.h index d201c61260d..b246a59449b 100644 --- a/include/qemu/uri.h +++ b/include/qemu/uri.h @@ -105,6 +105,9 @@ struct QueryParams *query_params_new

[PATCH 02/13] block/nbd: auto-ify URI parsing variables

2020-07-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nbd.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index eed160c5cda..faadcab442b 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -1516,10 +1516,9 @@ static int

[PATCH 00/13] RFC: use upcoming GUri for URI handling

2020-07-09 Thread Marc-André Lureau
Hi, After years trying to add a glib API to handle URI, GLib 2.65.1 will finally have one. As an exercice, I checked if the API fits qemu needs, and it seems to be fine. It should be about as verbose as the current libxml based URI parser, but the main benefit is that we will get rid of fairly

Re: [PATCH 00/18] hw: Mark the device with no migratable fields

2020-07-09 Thread Peter Maydell
On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: > > This is a proof-of-concept after chatting with Peter Maydell > on IRC earlier. > > Introduce the vmstate_no_state_to_migrate structure, and > a reference to it: vmstate_qdev_no_state_to_migrate. > Use this reference in devices with no

Re: [RFC PATCH 18/18] hw/core/qdev: Display warning for devices missing migration state

2020-07-09 Thread Peter Maydell
On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: > > When built with --enable-qdev-debug, QEMU displays warnings > listing devices missing migration state: > > $ qemu-system-arm -S -M spitz > qemu-system-arm: warning: missing migration state for type: > 'pxa270-c0-arm-cpu' >

Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it

2020-07-09 Thread Eduardo Habkost
On Thu, Jul 09, 2020 at 10:00:59AM -0700, Jim Mattson wrote: > On Thu, Jul 9, 2020 at 2:44 AM Gerd Hoffmann wrote: > > > (2) GUEST_MAXPHYADDR < HOST_MAXPHYADDR > > > > Mostly fine. Some edge cases, like different page fault errors for > > addresses above GUEST_MAXPHYADDR and below

Re: [PATCH 08/18] hw/core/split-irq: Mark the device with no migratable fields

2020-07-09 Thread Peter Maydell
On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: > > This device doesn't have fields to migrate. Be explicit > by using vmstate_qdev_no_state_to_migrate. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/split-irq.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Peter

Re: [PATCH 04/18] hw/arm/armv7m: Mark the device with no migratable fields

2020-07-09 Thread Peter Maydell
On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: > > This device doesn't have fields to migrate. Be explicit > by using vmstate_qdev_no_state_to_migrate. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/arm/armv7m.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PULL 00/10] Modules 20200707 patches

2020-07-09 Thread Peter Maydell
On Tue, 7 Jul 2020 at 14:48, Gerd Hoffmann wrote: > > The following changes since commit 7623b5ba017f61de5d7c2bba12c6feb3d55091b1: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-5.1-pull-request' into staging > (2020-07-06 11:40:10 +0100) > > are available in the Git

Re: [PATCH 02/18] migration/vmstate: Introduce vmstate_no_state_to_migrate

2020-07-09 Thread Peter Maydell
On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: > > Introduce a special state to indicate when an object doesn't > have anything in its state to migrate. > > Suggested-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > include/migration/vmstate.h | 1 + >

Re: [PATCH v2 5/5] hw/i2c: Document the I2C qdev helpers

2020-07-09 Thread Peter Maydell
On Sun, 5 Jul 2020 at 23:42, Philippe Mathieu-Daudé wrote: > > In commit d88c42ff2c we added new prototype but neglected to > add their documentation. Fix that. > > Reported-by: Peter Maydell > Reviewed-by: Corey Minyard > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Peter Maydell

[PATCH] Remove VXHS block device

2020-07-09 Thread Marc-André Lureau
The vxhs code doesn't compile since v2.12.0. There's no point in fixing and then adding CI for a config that our users have demonstrated that they do not use; better to just remove it. Signed-off-by: Marc-André Lureau --- configure| 39 -- qapi/block-core.json

Re: [PATCH 3/3] cpu-timers, icount: new modules

2020-07-09 Thread Claudio Fontana
On 7/9/20 8:38 PM, Claudio Fontana wrote: > On 7/8/20 5:05 PM, Paolo Bonzini wrote: >> On 08/07/20 17:00, Claudio Fontana wrote: Bisectable, 100% failure rate, etc. :( Can you split the patch in multiple parts, specifically separating any rename or introducing of includes from the

Re: [PATCH 0/2] hw/sd/pxa2xx_mmci: Do not create SD card within the SDHCI controller

2020-07-09 Thread Peter Maydell
On Sun, 5 Jul 2020 at 22:33, Philippe Mathieu-Daudé wrote: > > SDHCI controllers provide a SD Bus to plug SD cards, but don't > come with SD card plugged in > > This series move the SD card creation to the machine/board code. As with the other series, I can take this via target-arm.next or you

Re: [PATCH 1/2] hw/sd/pxa2xx_mmci: Do not create SD card within the SDHCI controller

2020-07-09 Thread Peter Maydell
On Sun, 5 Jul 2020 at 22:33, Philippe Mathieu-Daudé wrote: > > SDHCI controllers provide a SD Bus to plug SD cards, but don't > come with SD card plugged in :) Let the machine/board object > create and plug the SD cards when required. This too is not an SDHCI controller. > Signed-off-by:

Re: [PULL 00/12] Block patches

2020-07-09 Thread Eduardo Habkost
On Thu, Jul 09, 2020 at 05:02:06PM +0200, Kevin Wolf wrote: > Am 08.07.2020 um 00:05 hat Eduardo Habkost geschrieben: > > On Tue, Jul 07, 2020 at 05:28:21PM +0200, Philippe Mathieu-Daudé wrote: > > > On 6/26/20 12:25 PM, Stefan Hajnoczi wrote: > > > > On Thu, Jun 25, 2020 at 02:31:14PM +0100,

Re: [PATCH 3/3] cpu-timers, icount: new modules

2020-07-09 Thread Claudio Fontana
On 7/8/20 5:05 PM, Paolo Bonzini wrote: > On 08/07/20 17:00, Claudio Fontana wrote: >>> Bisectable, 100% failure rate, etc. :( Can you split the patch in >>> multiple parts, specifically separating any rename or introducing of >>> includes from the final file move? >> Hi Paolo, >> >> will take a

[PATCH] linux-headers: update again to 5.8-rc

2020-07-09 Thread Paolo Bonzini
5.8-rc1 inadvertently broke userspace ABI compatibility. Merge again with latest kvm/master to undo that. Signed-off-by: Paolo Bonzini --- The patch should get to Linus tomorrow. Posting here to ensure it is on people's radar for hard freeze, because I probably won't be

Re: [PATCH v4 00/10] hw/sd: convert legacy SDHCI devices to the SDBus API

2020-07-09 Thread Peter Maydell
On Sun, 5 Jul 2020 at 21:46, Philippe Mathieu-Daudé wrote: > > Hi, > > Since v3: > - rebased (was from Feb 2018) > - use named GPIOs > - addressed Peter review comment (adding TYPE_PL181_BUS object) > - convert DPRINF to trace events > > Since v2: > - pl181: remove legacy sd_set_cb() (Peter) > >

Re: [PATCH v4 07/10] hw/sd/pl181: Do not create SD card within the SDHCI controller

2020-07-09 Thread Peter Maydell
On Sun, 5 Jul 2020 at 21:46, Philippe Mathieu-Daudé wrote: > > SDHCI controllers provide a SD Bus to plug SD cards, but don't > come with SD card plugged in :) Let the machine/board object > create and plug the SD cards when required. Nit on the commit message: the PL181 isn't an SDHCI

Re: [PATCH RFC 2/5] s390x: implement diag260

2020-07-09 Thread David Hildenbrand
On 09.07.20 12:52, Christian Borntraeger wrote: > > On 08.07.20 20:51, David Hildenbrand wrote: >> Let's implement the "storage configuration" part of diag260. This diag >> is found under z/VM, to indicate usable chunks of memory tot he guest OS. >> As I don't have access to documentation, I have

Separate notifications from list messages?

2020-07-09 Thread Liviu Ionescu
Now, with the migration to GitLab under way, could you consider separating the notifications sent by GitLab from the messages exchanged on the list? I mean allowing those interested in receiving the notifications to explicitly subscribe to them, and no longer sending all of them to the full

Re: [PATCH v5 5/5] vhost-user-blk: default num_queues to -smp N

2020-07-09 Thread Raphael Norwitz
On Mon, Jul 6, 2020 at 7:00 AM Stefan Hajnoczi wrote: > > Automatically size the number of request virtqueues to match the number > of vCPUs. This ensures that completion interrupts are handled on the > same vCPU that submitted the request. No IPI is necessary to complete > an I/O request and

  1   2   3   4   >