Re: [PATCH v3 2/2] x86/sev: generate SEV kernel loader hashes in x86_load_linux

2021-09-27 Thread Daniel P . Berrangé
On Wed, Aug 25, 2021 at 07:35:38AM +, Dov Murik wrote: > If SEV is enabled and a kernel is passed via -kernel, pass the hashes of > kernel/initrd/cmdline in an encrypted guest page to OVMF for SEV > measured boot. > > Co-developed-by: James Bottomley > Signed-off-by: James Bottomley >

[PULL 17/21] Acceptance Tests: improve check-acceptance description

2021-09-27 Thread Philippe Mathieu-Daudé
From: Cleber Rosa The "check-acceptance" make rule won't necessarily run *all* available tests, because it employs a filter based on the currently configured targets. This change in the description of the rule makes that behavior extra clear. Signed-off-by: Cleber Rosa Reviewed-by: Philippe

Re: [PATCH 11/11] Deprecate stable non-JSON -device and -object

2021-09-27 Thread Kevin Wolf
Am 27.09.2021 um 14:52 hat Peter Maydell geschrieben: > On Mon, 27 Sept 2021 at 12:27, Kevin Wolf wrote: > > > > Am 27.09.2021 um 11:00 hat Peter Maydell geschrieben: > > > On Fri, 24 Sept 2021 at 10:14, Kevin Wolf wrote: > > > > > > > > We want to switch both from QemuOpts to the keyval parser

Re: [PATCH v5 2/5] python/aqmp-tui: Add AQMP TUI

2021-09-27 Thread John Snow
On Tue, Aug 24, 2021 at 6:15 AM Niteesh G. S. wrote: > > > On Tue, Aug 24, 2021 at 12:30 AM John Snow wrote: > >> >> >> On Mon, Aug 23, 2021 at 12:31 PM G S Niteesh Babu >> wrote: >> >>> Added AQMP TUI. >>> >>> Implements the follwing basic features: >>> 1) Command transmission/reception. >>>

Re: [PATCH 1/2] 9pfs: deduplicate iounit code

2021-09-27 Thread Greg Kurz
On Mon, 27 Sep 2021 17:45:00 +0200 Christian Schoenebeck wrote: > Remove redundant code that translates host fileystem's block > size into 9p client (guest side) block size. > > Signed-off-by: Christian Schoenebeck > --- > hw/9pfs/9p.c | 42 -- > 1 file

Re: [PATCH 0/6] avocado_qemu: small fixes and tweaks

2021-09-27 Thread Philippe Mathieu-Daudé
On 9/20/21 22:49, Willian Rampazzo wrote: > Standardize the super() calls according to PEP3135; fix import order based on > isort; fix and tweak the ssh `connect` method; explicitly return None on > `pick_default_qemu_bin` function to avoid linters R1710; and fix inheritance > order on `LinuxTest`

[PULL 16/21] qemu: Split machine_ppc.py acceptance tests

2021-09-27 Thread Philippe Mathieu-Daudé
From: David Gibson machine_ppc.py contains tests for 3 different ppc based machine types. It is listed in MAINTAINERS along with the PPC TCG cpu code. That's not really accurate though, since it's really more about testing those machines than the CPUs. Therefore, split it up into separate

[PULL 20/21] tests/acceptance/ppc_prep_40p.py: NetBSD 7.1.2 location update

2021-09-27 Thread Philippe Mathieu-Daudé
From: Cleber Rosa The NetBSD-7.1.2-prep.iso is no longer available on the CDN, but it's still available in the archive. Let's update its location so that users without the file on cache can still fetch it and run the test. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé

[PULL v2 22/22] tests/acceptance: Test powernv machines

2021-09-27 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Fetch the OpenPOWER images to boot the powernv8 and powernv9 machines with a simple PCI layout. Cc: Cleber Rosa Cc: Philippe Mathieu-Daudé Cc: Wainer dos Santos Moschetta Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2] tests/acceptance: Test powernv machines

2021-09-27 Thread Philippe Mathieu-Daudé
On 9/27/21 19:37, Cédric Le Goater wrote: > On 9/27/21 19:21, Philippe Mathieu-Daudé wrote: >> On 8/17/21 11:30, Cédric Le Goater wrote: >>> Fetch the OpenPOWER images to boot the powernv8 and powernv9 machines >>> with a simple PCI layout. >>> >>> Cc: Cleber Rosa >>> Cc: Philippe Mathieu-Daudé

[PULL 30/32] python: Add entry point for aqmp-tui

2021-09-27 Thread John Snow
From: G S Niteesh Babu Add an entry point for aqmp-tui. This will allow it to be run from the command line using "aqmp-tui localhost:1234" More options available in the TUI can be found using "aqmp-tui -h" Signed-off-by: G S Niteesh Babu Message-Id:

[PULL 15/32] python/aqmp: add QMP event support

2021-09-27 Thread John Snow
This class was designed as a "mix-in" primarily so that the feature could be given its own treatment in its own python module. It gets quite a bit too long otherwise. Signed-off-by: John Snow Message-id: 20210915162955.333025-16-js...@redhat.com Signed-off-by: John Snow ---

[PULL 10/32] python/aqmp: add configurable read buffer limit

2021-09-27 Thread John Snow
QMP can transmit some pretty big messages, and the default limit of 64KB isn't sufficient. Make sure that we can configure it. Reported-by: G S Niteesh Babu Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20210915162955.333025-11-js...@redhat.com Signed-off-by: John Snow ---

[PULL 29/32] python/aqmp-tui: Add AQMP TUI

2021-09-27 Thread John Snow
From: G S Niteesh Babu Added AQMP TUI. Implements the follwing basic features: 1) Command transmission/reception. 2) Shows events asynchronously. 3) Shows server status in the bottom status bar. 4) Automatic retries on disconnects and error conditions. Also added type annotations and necessary

[PULL 23/32] python/aqmp: add scary message

2021-09-27 Thread John Snow
Add a warning whenever AQMP is used to steer people gently away from using it for the time-being. Signed-off-by: John Snow Message-id: 20210915162955.333025-24-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 14 ++ 1 file changed, 14 insertions(+) diff

[PULL 09/32] python/aqmp: add AsyncProtocol.accept() method

2021-09-27 Thread John Snow
It's a little messier than connect, because it wasn't designed to accept *precisely one* connection. Such is life. Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20210915162955.333025-10-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/protocol.py | 89

Re: [PATCH] hw/arm/virt: Allow additions to the generated device tree

2021-09-27 Thread Simon Glass
Hi Peter, On Mon, 27 Sept 2021 at 10:50, Peter Maydell wrote: > > On Mon, 27 Sept 2021 at 17:04, Simon Glass wrote: > > On Mon, 27 Sept 2021 at 09:46, Peter Maydell > > wrote: > > > > My take is that this is u-boot doing weird custom things with > > > the DTB that aren't "describe the

[PULL 16/32] python/pylint: disable too-many-function-args

2021-09-27 Thread John Snow
too-many-function-args seems prone to failure when considering things like Method Resolution Order, which mypy gets correct. When dealing with multiple inheritance, pylint doesn't seem to understand which method will actually get called, while mypy does. Remove the less powerful, redundant check.

[PULL 14/32] python/aqmp: add well-known QMP object models

2021-09-27 Thread John Snow
The QMP spec doesn't define very many objects that are iron-clad in their format, but there are a few. This module makes it trivial to validate them without relying on an external third-party library. Signed-off-by: John Snow Message-id: 20210915162955.333025-15-js...@redhat.com Signed-off-by:

[PULL 13/32] python/aqmp: add QMP Message format

2021-09-27 Thread John Snow
The Message class is here primarily to serve as a solid type to use for mypy static typing for unambiguous annotation and documentation. We can also stuff JSON serialization and deserialization into this class itself so it can be re-used even outside this infrastructure. Signed-off-by: John Snow

[PULL 31/32] python: add optional pygments dependency

2021-09-27 Thread John Snow
From: G S Niteesh Babu Added pygments as optional dependency for AQMP TUI. This is required for the upcoming syntax highlighting feature in AQMP TUI. The dependency has also been added in the devel optional group. Added mypy 'ignore_missing_imports' for pygments since it does not have any type

[PULL 25/32] python/aqmp: add AsyncProtocol unit tests

2021-09-27 Thread John Snow
This tests most of protocol.py -- From a hacked up Coverage.py run, it's at about 86%. There's a few error cases that aren't very well tested yet, they're hard to induce artificially so far. I'm working on it. Signed-off-by: John Snow Message-id: 20210915162955.333025-26-js...@redhat.com

[PULL 18/32] python/pylint: disable no-member check

2021-09-27 Thread John Snow
mypy handles this better -- but we only need the workaround because pylint under Python 3.6 does not understand that a MutableMapping really does have a .get() method attached. We could remove this again once 3.7 is our minimum. Signed-off-by: John Snow Message-id:

[PULL 21/32] python/aqmp: add _raw() execution interface

2021-09-27 Thread John Snow
This is added in anticipation of wanting it for a synchronous wrapper for the iotest interface. Normally, execute() and execute_msg() both raise QMP errors in the form of Python exceptions. Many iotests expect the entire reply as-is. To reduce churn there, add a private execution interface that

[PULL 04/32] python/aqmp: add asyncio compatibility wrappers

2021-09-27 Thread John Snow
Python 3.6 does not have all of the goodies that Python 3.7 does, and we need to support both. Add some compatibility wrappers needed for this purpose. (Note: Python 3.6 is EOL December 2021.) Signed-off-by: John Snow Message-id: 20210915162955.333025-5-js...@redhat.com Signed-off-by: John Snow

[PULL 02/32] python/aqmp: add error classes

2021-09-27 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20210915162955.333025-3-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 4 +++ python/qemu/aqmp/error.py| 50 2 files changed, 54 insertions(+) create mode

[PULL 12/32] python/aqmp: add AsyncProtocol._readline() method

2021-09-27 Thread John Snow
This is added as a courtesy: many protocols are line-based, including QMP. Putting it in AsyncProtocol lets us keep the QMP class implementation just a pinch more abstract. (And, if we decide to add a QTEST implementation later, it will need this, too. (Yes, I have a QTEST implementation.))

[PULL 05/32] python/aqmp: add generic async message-based protocol support

2021-09-27 Thread John Snow
This is the bare minimum that you need to establish a full-duplex async message-based protocol with Python's asyncio. The features to be added in forthcoming commits are: - Runstate tracking - Logging - Support for incoming connections via accept() - _cb_outbound, _cb_inbound message hooks -

[PULL 24/32] python: bump avocado to v90.0

2021-09-27 Thread John Snow
Avocado v90 includes improved support for running async unit tests. The workaround that existed prior to v90 causes the unit tests to fail afterwards, however, so upgrade our minimum version pin to the very latest and greatest. Signed-off-by: John Snow Message-id:

[PULL 07/32] python/aqmp: Add logging utility helpers

2021-09-27 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20210915162955.333025-8-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/util.py | 56 1 file changed, 56 insertions(+) diff --git a/python/qemu/aqmp/util.py

[PULL 11/32] python/aqmp: add _cb_inbound and _cb_outbound logging hooks

2021-09-27 Thread John Snow
Add hooks designed to log/filter incoming/outgoing messages. The primary intent for these is to be able to support iotests which may want to log messages with specific filters for reproducible output. Another use is for plugging into Urwid frameworks; all messages in/out can be automatically

[PULL 28/32] python: Add dependencies for AQMP TUI

2021-09-27 Thread John Snow
From: G S Niteesh Babu Added dependencies for the upcoming AQMP TUI under the optional 'tui' group. The same dependencies have also been added under the devel group since no work around has been found for optional groups to imply other optional groups. Signed-off-by: G S Niteesh Babu

[PULL 26/32] python/aqmp: add LineProtocol tests

2021-09-27 Thread John Snow
Tests a real connect, a real accept, and really sending and receiving a message over a UNIX socket. Brings coverage of protocol.py up to ~93%. Signed-off-by: John Snow Message-id: 20210915162955.333025-27-js...@redhat.com Signed-off-by: John Snow --- python/tests/protocol.py | 48

Re: [PATCH v11 00/16] target/riscv: Update QEmu for Zb[abcs] 1.0.0

2021-09-27 Thread Vineet Gupta
Hi, On 9/11/21 7:00 AM, Philipp Tomsich wrote: The Zb[abcs] extensions have complete public review and are nearing ratifications. These individual extensions are one part of what was previously though of as the "BitManip" (B) extension, leaving the final details of future Zb* extensions open

Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine

2021-09-27 Thread Shitalkumar Gandhi
Hi All, Please let me know how to get this merged? Thanks, Shitalkumar From: Shitalkumar Gandhi Sent: Monday, September 27, 2021 7:45 AM To: Cédric Le Goater ; Philippe Mathieu-Daudé ; qemu-devel@nongnu.org ; qemu-arm Cc: Hao Wu ; Patrick Venture ; Andrew

[PULL 00/32] Python patches

2021-09-27 Thread John Snow
The following changes since commit de8ed1055c2ce18c95f597eb10df360dcb534f99: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-25-v2' into staging (2021-09-27 15:03:42 +0100) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git

[PULL 01/32] python/aqmp: add asynchronous QMP (AQMP) subpackage

2021-09-27 Thread John Snow
For now, it's empty! Soon, it won't be. Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20210915162955.333025-2-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 27 +++ python/qemu/aqmp/py.typed| 0 python/setup.cfg

[PULL 06/32] python/aqmp: add runstate state machine to AsyncProtocol

2021-09-27 Thread John Snow
This serves a few purposes: 1. Protect interfaces when it's not safe to call them (via @require) 2. Add an interface by which an async client can determine if the state has changed, for the purposes of connection management. Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id:

[PULL 08/32] python/aqmp: add logging to AsyncProtocol

2021-09-27 Thread John Snow
Give the connection and the reader/writer tasks nicknames, and add logging statements throughout. Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20210915162955.333025-9-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/protocol.py | 82

[PULL 03/32] python/pylint: Add exception for TypeVar names ('T')

2021-09-27 Thread John Snow
'T' is a common TypeVar name, allow its use. See also https://github.com/PyCQA/pylint/issues/3401 -- In the future, we might be able to have a separate list of acceptable names for TypeVars exclusively. Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id:

[PULL 17/32] python/aqmp: add QMP protocol support

2021-09-27 Thread John Snow
The star of our show! Add most of the QMP protocol, sans support for actually executing commands. No problem, that happens in the next several commits. Signed-off-by: John Snow Message-id: 20210915162955.333025-18-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py |

[PULL 20/32] python/aqmp: add execute() interfaces

2021-09-27 Thread John Snow
Add execute() and execute_msg(). _execute() is split into _issue() and _reply() halves so that hypothetical subclasses of QMP that want to support different execution paradigms can do so. I anticipate a synchronous interface may have need of separating the send/reply phases. However, I do not

Re: [PATCH v6 12/40] accel/nvmm: Implement AccelOpsClass::has_work()

2021-09-27 Thread Kamil Rytarowski
On 24.09.2021 11:38, Philippe Mathieu-Daudé wrote: > Since there is no specific NVMM handling for cpu_has_work() in > cpu_thread_is_idle(), implement NVMM has_work() handler as a > simple 'return false' code. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Kamil Rytarowski > --- >

[PULL 22/32] python/aqmp: add asyncio_run compatibility wrapper

2021-09-27 Thread John Snow
As a convenience. It isn't used by the library itself, but it is used by the test suite. It will also come in handy for users of the library still on Python 3.6. Signed-off-by: John Snow Message-id: 20210915162955.333025-23-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/util.py

[PULL 27/32] python/aqmp: Add Coverage.py support

2021-09-27 Thread John Snow
I'm not exposing this via the Makefile help, it's not likely to be useful to passersby. Switch the avocado runner to the 'legacy' runner for now, as the new runner seems to obscure coverage reports, again. Usage is to enter your venv of choice and then: `make check-coverage && xdg-open

[PULL 19/32] python/aqmp: Add message routing to QMP protocol

2021-09-27 Thread John Snow
Add the ability to handle and route messages in qmp_protocol.py. The interface for actually sending anything still isn't added until next commit. Signed-off-by: John Snow Message-id: 20210915162955.333025-20-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/qmp_client.py | 122

[PULL 32/32] python/aqmp-tui: Add syntax highlighting

2021-09-27 Thread John Snow
From: G S Niteesh Babu Add syntax highlighting for the incoming and outgoing QMP messages. This is achieved using the pygments module which was added in a previous commit. The current implementation is a really simple one which doesn't allow for any configuration. In future this has to be

Re: [PATCH v11 00/16] target/riscv: Update QEmu for Zb[abcs] 1.0.0

2021-09-27 Thread Jim Wilson
On Mon, Sep 27, 2021 at 1:01 PM Vineet Gupta wrote: > So I obviously forgot to get the equivalent binutils branch, but the > only rvb branch on sifive fork feels dated > > > https://github.com/riscv-collab/riscv-binutils-gdb/tree/riscv-binutils-2.35-rvb That is the right branch to use with the

Re: [PATCH v2] nbd/server: Add --selinux-label option

2021-09-27 Thread Eric Blake
On Fri, Jul 23, 2021 at 11:33:03AM +0100, Richard W.M. Jones wrote: > Under SELinux, Unix domain sockets have two labels. One is on the > disk and can be set with commands such as chcon(1). There is a > different label stored in memory (called the process label). This can > only be set by the

Re: [PATCH v11 00/16] target/riscv: Update QEmu for Zb[abcs] 1.0.0

2021-09-27 Thread Vineet Gupta
On 9/27/21 1:23 PM, Jim Wilson wrote: On Mon, Sep 27, 2021 at 1:01 PM Vineet Gupta > wrote: So I obviously forgot to get the equivalent binutils branch, but the only rvb branch on sifive fork feels dated

[PULL 00/20] NBD patches through 2021-09-27

2021-09-27 Thread Eric Blake
The following changes since commit 9b03a1178204598055f23f24e438fdddb5935df9: Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-6.2-pull-request' into staging (2021-09-27 11:08:36 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git

[PULL 09/20] block/io: allow 64bit write-zeroes requests

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Now that all drivers are updated by previous commit, we can drop two last limiters on write-zeroes path: INT_MAX in bdrv_co_do_pwrite_zeroes() and bdrv_check_request32() in bdrv_co_pwritev_part(). Now everything is prepared for implementing incredibly cool and

[PULL 10/20] block: make BlockLimits::max_pdiscard 64bit

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are going to support 64 bit discard requests. Now update the limit variable. It's absolutely safe. The variable is set in some drivers, and used in bdrv_co_pdiscard(). Update also max_pdiscard variable in bdrv_co_pdiscard(), so that bdrv_co_pdiscard() is

[PULL 07/20] block: make BlockLimits::max_pwrite_zeroes 64bit

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are going to support 64 bit write-zeroes requests. Now update the limit variable. It's absolutely safe. The variable is set in some drivers, and used in bdrv_co_do_pwrite_zeroes(). Update also max_write_zeroes variable in bdrv_co_do_pwrite_zeroes(), so that

[PATCH v4 2/3] vhost-user-rng-pci: Add vhost-user-rng-pci implementation

2021-09-27 Thread Mathieu Poirier
This patch provides a PCI bus interface to the vhost-user-rng backend. Reviewed-by: Alex Bennée Signed-off-by: Mathieu Poirier --- hw/virtio/meson.build | 1 + hw/virtio/vhost-user-rng-pci.c | 79 ++ 2 files changed, 80 insertions(+) create mode

[PATCH v4 3/3] docs: Add documentation for vhost based RNG implementation

2021-09-27 Thread Mathieu Poirier
Add description and example for the vhost-user based RNG implementation. Signed-off-by: Mathieu Poirier --- docs/system/devices/vhost-user-rng.rst | 39 ++ 1 file changed, 39 insertions(+) create mode 100644 docs/system/devices/vhost-user-rng.rst diff --git

[PATCH v4 1/3] vhost-user-rng: Add vhost-user-rng implementation

2021-09-27 Thread Mathieu Poirier
Introduce a random number generator (RNG) backend that communicates with a vhost-user server to retrieve entropy. That way other VMM that comply with the vhost user protocl can use the same vhost-user daemon without having to write yet another RNG driver. Reviewed-by: Alex Bennée Signed-off-by:

Re: [PATCH v3 02/15] target/ppc: add user write access control for PMU SPRs

2021-09-27 Thread Daniel Henrique Barboza
On 9/27/21 02:08, David Gibson wrote: On Thu, Sep 23, 2021 at 11:39:14AM -0300, Daniel Henrique Barboza wrote: On 9/6/21 22:38, David Gibson wrote: On Fri, Sep 03, 2021 at 05:31:03PM -0300, Daniel Henrique Barboza wrote: The PMU needs to enable writing of its uregs to userspace,

[PULL 03/20] qcow2: check request on vmstate save/load path

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We modify the request by adding an offset to vmstate. Let's check the modified request. It will help us to safely move .bdrv_co_preadv_part and .bdrv_co_pwritev_part to int64_t type of offset and bytes. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[PULL 19/20] block/nbd: check that received handle is valid

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy If we don't have active request, that waiting for this handle to be received, we should report an error. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210902103805.25686-6-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric

[PULL 08/20] block: use int64_t instead of int in driver write_zeroes handlers

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be consistent with

[PULL 15/20] block/nbd: nbd_channel_error() shutdown channel unconditionally

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Don't rely on connection being totally broken in case of -EIO. Safer and more correct is to just shut down the channel anyway, since we change the state and plan on reconnecting. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id:

[PULL 14/20] nbd/client-connection: nbd_co_establish_connection(): fix non set errp

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy When we don't have a connection and blocking is false, we return NULL but don't set errp. That's wrong. We have two paths for calling nbd_co_establish_connection(): 1. nbd_open() -> nbd_do_establish_connection() -> ... but that will never set blocking=false

[PULL 18/20] block/nbd: drop connection_co

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy OK, that's a big rewrite of the logic. Pre-patch we have an always running coroutine - connection_co. It does reply receiving and reconnecting. And it leads to a lot of difficult and unobvious code around drained sections and context switch. We also abuse

[PULL 13/20] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY

2021-09-27 Thread Eric Blake
The NBD protocol just relaxed the requirements on NBD_OPT_LIST_META_CONTEXT: https://github.com/NetworkBlockDevice/nbd/commit/13a4e33a87 Since listing is not stateful (unlike SET_META_CONTEXT), we don't care if a client asks for meta contexts without first requesting structured replies.

[PATCH v4 0/3] virtio: Add vhost-user based RNG

2021-09-27 Thread Mathieu Poirier
This set implements a random number generator (RNG) device that follows the vhost-user protocol. The main difference between V3 is the absence of the vhost-user daemon implemenation. It was dropped to favour the rust implementation currently being considered under the vhost-device crate[1] of

Re: Fw: [EXTERNAL] Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-09-27 Thread Ashish Kalra
On Tue, Aug 24, 2021 at 06:00:51PM -0400, Tobin Feldman-Fitzthum wrote: > On Mon, Aug 16, 2021 at 04:15:46PM +0200, Paolo Bonzini wrote: > > > Hi, > > > > first of all, thanks for posting this work and starting the discussion. > > > > However, I am not sure if the in-guest migration helper vCPUs

Re: [PATCH v2] nbd/server: Add --selinux-label option

2021-09-27 Thread Richard W.M. Jones
On Mon, Sep 27, 2021 at 04:18:34PM -0500, Eric Blake wrote: > On Fri, Jul 23, 2021 at 11:33:03AM +0100, Richard W.M. Jones wrote: > > Under SELinux, Unix domain sockets have two labels. One is on the > > disk and can be set with commands such as chcon(1). There is a > > different label stored in

[PULL 01/20] qemu-nbd: Change default cache mode to writeback

2021-09-27 Thread Eric Blake
From: Nir Soffer Both qemu and qemu-img use writeback cache mode by default, which is already documented in qemu(1). qemu-nbd uses writethrough cache mode by default, and the default cache mode is not documented. According to the qemu-nbd(8): --cache=CACHE The cache mode to be

[PULL 06/20] block: use int64_t instead of uint64_t in copy_range driver handlers

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be consistent with

[PULL 02/20] block/io: bring request check to bdrv_co_(read, write)v_vmstate

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Only qcow2 driver supports vmstate. In qcow2 these requests go through .bdrv_co_p{read,write}v_part handlers. So, let's do our basic check for the request on vmstate generic handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake

[PULL 04/20] block: use int64_t instead of uint64_t in driver read handlers

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be consistent with

[PULL 05/20] block: use int64_t instead of uint64_t in driver write handlers

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be consistent with

[PULL 16/20] block/nbd: move nbd_recv_coroutines_wake_all() up

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are going to use it in nbd_channel_error(), so move it up. Note, that we are going also refactor and rename nbd_recv_coroutines_wake_all() in future anyway, so keeping it where it is and making forward declaration doesn't make real sense. Signed-off-by:

[PULL 17/20] block/nbd: refactor nbd_recv_coroutines_wake_all()

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Split out nbd_recv_coroutine_wake_one(), as it will be used separately. Rename the function and add a possibility to wake only first found sleeping coroutine. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id:

[PULL 12/20] block/io: allow 64bit discard requests

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Now that all drivers are updated by the previous commit, we can drop the last limiter on pdiscard path: INT_MAX in bdrv_co_pdiscard(). Now everything is prepared for implementing incredibly cool and fast big-discard requests in NBD and qcow2. And any other

[PULL 11/20] block: use int64_t instead of int in driver discard handlers

2021-09-27 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be consistent with

[PULL 20/20] nbd/server: Add --selinux-label option

2021-09-27 Thread Eric Blake
From: "Richard W.M. Jones" Under SELinux, Unix domain sockets have two labels. One is on the disk and can be set with commands such as chcon(1). There is a different label stored in memory (called the process label). This can only be set by the process creating the socket. When using SELinux

[PATCH v11 00/14] machine: smp parsing fixes and improvement

2021-09-27 Thread Yanan Wang
Hi, This is a new version (v11) with some update in patch 11/14 suggested by Daniel. Please have another look, Thanks! Summary of v11: 1) Specifying a CPU topology parameter as zero was implicitly allowed but undocumented before, while now it's explicitly deprecated. 2) Refactor/fixes of the

[PATCH v11 01/14] machine: Deprecate "parameter=0" SMP configurations

2021-09-27 Thread Yanan Wang
In the SMP configuration, we should either provide a topology parameter with a reasonable value (greater than zero) or just omit it and QEMU will compute the missing value. The users shouldn't provide a configuration with any parameter of it specified as zero (e.g. -smp 8,sockets=0) which could

[PATCH v11 05/14] machine: Improve the error reporting of smp parsing

2021-09-27 Thread Yanan Wang
We have two requirements for a valid SMP configuration: the product of "sockets * cores * threads" must represent all the possible cpus, i.e., max_cpus, and then must include the initially present cpus, i.e., smp_cpus. So we only need to ensure 1) "sockets * cores * threads == maxcpus" at first

[PATCH v11 10/14] machine: Tweak the order of topology members in struct CpuTopology

2021-09-27 Thread Yanan Wang
Now that all the possible topology parameters are integrated in struct CpuTopology, tweak the order of topology members to be "cpus/sockets/ dies/cores/threads/maxcpus" for readability and consistency. We also tweak the comment by adding explanation of dies parameter. Signed-off-by: Yanan Wang

[PATCH v11 07/14] qtest/numa-test: Use detailed -smp CLIs in test_def_cpu_split

2021-09-27 Thread Yanan Wang
Since commit 80d7835749 (qemu-options: rewrite help for -smp options), the preference of sockets/cores in -smp parsing is considered liable to change, and actually we are going to change it in a coming commit. So it'll be more stable to use detailed -smp CLIs in the testcases that have strong

[PATCH v11 08/14] machine: Prefer cores over sockets in smp parsing since 6.2

2021-09-27 Thread Yanan Wang
In the real SMP hardware topology world, it's much more likely that we have high cores-per-socket counts and few sockets totally. While the current preference of sockets over cores in smp parsing results in a virtual cpu topology with low cores-per-sockets counts and a large number of sockets,

[PATCH v11 02/14] machine: Minor refactor/fix for the smp parsers

2021-09-27 Thread Yanan Wang
To pave the way for the functional improvement in later patches, make some refactor/cleanup for the smp parsers, including using local maxcpus instead of ms->smp.max_cpus in the calculation, defaulting dies to 0 initially like other members, cleanup the sanity check for dies. We actually also fix

[PATCH v11 12/14] machine: Remove smp_parse callback from MachineClass

2021-09-27 Thread Yanan Wang
Now we have a generic smp parser for all arches, and there will not be any other arch specific ones, so let's remove the callback from MachineClass and call the parser directly. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones --- hw/core/machine.c | 3 +-- include/hw/boards.h | 5 -

[PATCH v11 11/14] machine: Make smp_parse generic enough for all arches

2021-09-27 Thread Yanan Wang
Currently the only difference between smp_parse and pc_smp_parse is the support of dies parameter and the related error reporting. With some arch compat variables like "bool dies_supported", we can make smp_parse generic enough for all arches and the PC specific one can be removed. Making

[PATCH v11 03/14] machine: Uniformly use maxcpus to calculate the omitted parameters

2021-09-27 Thread Yanan Wang
We are currently using maxcpus to calculate the omitted sockets but using cpus to calculate the omitted cores/threads. This makes cmdlines like: -smp cpus=8,maxcpus=16 -smp cpus=8,cores=4,maxcpus=16 -smp cpus=8,threads=2,maxcpus=16 work fine but the ones like: -smp

[PATCH v11 06/14] qtest/numa-test: Use detailed -smp CLIs in pc_dynamic_cpu_cfg

2021-09-27 Thread Yanan Wang
Since commit 80d7835749 (qemu-options: rewrite help for -smp options), the preference of sockets/cores in -smp parsing is considered liable to change, and actually we are going to change it in a coming commit. So it'll be more stable to use detailed -smp CLIs in testing if we have strong

[PATCH v11 14/14] machine: Put all sanity-check in the generic SMP parser

2021-09-27 Thread Yanan Wang
Put both sanity-check of the input SMP configuration and sanity-check of the output SMP configuration uniformly in the generic parser. Then machine_set_smp() will become cleaner, also all the invalid scenarios can be tested only by calling the parser. Signed-off-by: Yanan Wang Reviewed-by:

[PATCH v11 09/14] machine: Use ms instead of global current_machine in sanity-check

2021-09-27 Thread Yanan Wang
In the sanity-check of smp_cpus and max_cpus against mc in function machine_set_smp(), we are now using ms->smp.max_cpus for the check but using current_machine->smp.max_cpus in the error message. Tweak this by uniformly using the local ms. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones

[PATCH v11 04/14] machine: Set the value of cpus to match maxcpus if it's omitted

2021-09-27 Thread Yanan Wang
Currently we directly calculate the omitted cpus based on the given incomplete collection of parameters. This makes some cmdlines like: -smp maxcpus=16 -smp sockets=2,maxcpus=16 -smp sockets=2,dies=2,maxcpus=16 -smp sockets=2,cores=4,maxcpus=16 not work. We should probably set the value of

[PATCH v11 13/14] machine: Move smp_prefer_sockets to struct SMPCompatProps

2021-09-27 Thread Yanan Wang
Now we have a common structure SMPCompatProps used to store information about SMP compatibility stuff, so we can also move smp_prefer_sockets there for cleaner code. No functional change intended. Signed-off-by: Yanan Wang Acked-by: David Gibson Reviewed-by: Andrew Jones --- hw/arm/virt.c

Re: [PATCH v2 0/2] modules: Improve modinfo.c support

2021-09-27 Thread Gerd Hoffmann
On Mon, Sep 27, 2021 at 11:11:58AM -0300, Jose R. Ziviani wrote: > This patchset introduces the modinfo_need and changes > modinfo-generate.py/meson.build to generate/link one modinfo per target. > > modinfo-generate.py will know, thanks to modinfo_need, which modules are > currently enabled for

Re: [PATCH 1/1] virtio-gpu: CONTEXT_INIT feature

2021-09-27 Thread Gerd Hoffmann
> @@ -212,6 +212,8 @@ virtio_gpu_base_get_features(VirtIODevice *vdev, uint64_t > features, > features |= (1 << VIRTIO_GPU_F_RESOURCE_BLOB); > } > > +features |= (1 << VIRTIO_GPU_F_CONTEXT_INIT); This needs a config option, simliar to the other features. It is a

Re: [PATCH v10 11/14] machine: Make smp_parse generic enough for all arches

2021-09-27 Thread wangyanan (Y)
On 2021/9/27 18:12, Daniel P. Berrangé wrote: On Sun, Sep 26, 2021 at 04:45:38PM +0800, Yanan Wang wrote: Currently the only difference between smp_parse and pc_smp_parse is the support of dies parameter and the related error reporting. With some arch compat variables like "bool

[PATCH v4 06/25] linux-user/alpha: Implement setup_sigtramp

2021-09-27 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use ka_restorer. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/alpha/target_signal.h | 1 + linux-user/alpha/signal.c| 34 +++- 2 files

[PATCH v4 02/25] linux-user/aarch64: Implement setup_sigtramp

2021-09-27 Thread Richard Henderson
Create and record the rt signal trampoline. Use it when the guest does not use SA_RESTORER. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/aarch64/target_signal.h | 2 ++ linux-user/aarch64/signal.c| 34

[PATCH v4 00/25] linux-user: Move signal trampolines to new page

2021-09-27 Thread Richard Henderson
Changes for v4: * Drop nios2 changes -- I still haven't built a full toolchain. * Clean up arm changes. * Minur i386 pointer type changes. Changes for v3: * Drop vdsos, reinstate setup_sigtramp for all targets. * Incorporate nios2 kuser page emulation, which contains the sigtramp

[PATCH v4 10/25] linux-user/i386: Implement setup_sigtramp

2021-09-27 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Note that x86_64 does not use this code. Signed-off-by: Richard Henderson --- linux-user/i386/target_signal.h | 2 ++ linux-user/x86_64/target_signal.h | 3 ++ linux-user/i386/signal.c |

<    1   2   3   4   >