Re: [RFC v3] virtio/vsock: add two more queues for datagram types

2021-08-04 Thread Stefano Garzarella
On Wed, Aug 4, 2021 at 8:41 AM Stefano Garzarella wrote: > > On Tue, Aug 03, 2021 at 11:58:27AM -0700, Jiang Wang . wrote: > >On Wed, Jul 7, 2021 at 10:27 AM Stefano Garzarella > >wrote: > >> On Wed, Jul 07, 2021 at 09:52:46AM -0700, Jiang Wang . wrote: > >> >On Wed, Jul 7, 2021 at 1:33 AM

Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation

2021-08-04 Thread Song Gao
On 07/23/2021 01:12 PM, Richard Henderson wrote: >> +static bool trans_asrtle_d(DisasContext *ctx, arg_asrtle_d * a) >> +{ >> +    TCGv t0, t1; >> + >> +    t0 = get_gpr(a->rj); >> +    t1 = get_gpr(a->rk); >> + >> +    gen_helper_asrtle_d(cpu_env, t0, t1); >> + >> +    return true; >> +} >> +

[Bug 1908626] Re: Atomic test-and-set instruction does not work on qemu-user

2021-08-04 Thread taos
Thanks. Tested, the problem is gone. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1908626 Title: Atomic test-and-set instruction does not work on qemu-user Status in QEMU: Expired Bug

[PATCH v2] hw/display/xlnx_dp: fix an out-of-bounds read in xlnx_dp_read

2021-08-04 Thread Qiang Liu
xlnx_dp_read allows an out-of-bounds read at its default branch because of an improper index. According to https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html (DP Module), registers 0x3A4/0x3A4/0x3AC are allowed. DP_INT_MASK 0x03A4 32 mixed

Re: [Question] qemu-img convert block alignment

2021-08-04 Thread Zhenyu Ye
On 2021/8/3 23:03, Eric Blake wrote: > On Fri, Apr 02, 2021 at 11:52:25AM +0800, Zhenyu Ye wrote: >> Hi all, >> >> commit 8dcd3c9b91 ("qemu-img: align result of is_allocated_sectors") >> introduces block alignment when doing qemu-img convert. However, the >> alignment is: >> >> s.alignment =

Re: [PATCH v2] hw/display/xlnx_dp: fix an out-of-bounds read in xlnx_dp_read

2021-08-04 Thread Thomas Huth
On 04/08/2021 08.51, Qiang Liu wrote: xlnx_dp_read allows an out-of-bounds read at its default branch because of an improper index. According to https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html (DP Module), registers 0x3A4/0x3A4/0x3AC are allowed.

[PATCH v2 01/11] util: fix abstract socket path copy

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket support" neglected to update socket_sockaddr_to_address_unix() and copied the whole sun_path without taking "salen" into account. Later, commit 3b14b4ec49 "sockets: Fix socket_sockaddr_to_address_unix() for

[PATCH v2 03/11] chardev: remove needless class method

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau "chr_option_parsed" is only implemented by the "mux" chardev, we can specialize the code there to avoid the needless generic class method. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- include/chardev/char.h

Re: [PATCH V5 02/25] cpr: reboot mode

2021-08-04 Thread Eric Blake
On Wed, Jul 07, 2021 at 10:20:11AM -0700, Steve Sistare wrote: > Provide the cprsave and cprload functions for live update. These save and > restore VM state, with minimal guest pause time, so that qemu may be updated > to a new version in between. > > +++ b/migration/cpr.c > @@ -0,0 +1,149 @@

Re: [PATCH 0/3] Disable vhost device IOTLB is IOMMU is not enabled

2021-08-04 Thread Peter Xu
On Wed, Aug 04, 2021 at 11:48:00AM +0800, Jason Wang wrote: > Hi: > > We currently try to enable device IOTLB when iommu_platform is > set. This may lead unnecessary trasnsactions between qemu and vhost > when vIOMMU is not used (which is the typical case for the encrypted > VM). > > So patch

Re: [PATCH V5 12/25] cpr: QMP interfaces for restart

2021-08-04 Thread Eric Blake
On Wed, Jul 07, 2021 at 10:20:21AM -0700, Steve Sistare wrote: > cprexec calls cprexec(). Syntax: > { 'command': 'cprexec', 'data': { 'argv': [ 'str' ] } } > > Add the restart mode: > { 'enum': 'CprMode', 'data': [ 'reboot', 'restart' ] } > > Signed-off-by: Steve Sistare > --- >

Re: [PATCH 1/1] hw/arm/smmu: Add access flag handling

2021-08-04 Thread Eric Auger
Hi Joe, On 7/31/21 1:17 AM, Joe Komlodi wrote: > The SMMU should access fault if AF == 0 in a TTD, and if AFFD == 0 in the CD. > > Per the spec, an access fault has a higher priority over a permission fault. > For instance, a write to a writable clean (temporarily non-writable) page with > AF ==

Re: [PATCH 0/3] docs: convert qapi-code-gen.txt to qapi-code-gen.rst

2021-08-04 Thread John Snow
On Wed, Aug 4, 2021 at 4:48 AM Markus Armbruster wrote: > Peter Maydell writes: > > > On Wed, 21 Jul 2021 at 00:58, John Snow wrote: > >> > >> Patch 1 does (roughly) the bare minimum, patch 2 adds some formatting, > >> and patch 3 adds cross-references. > >> > >> John Snow (3): > >> docs:

Re: [PATCH] linux-user/elfload: byteswap i386 registers when dumping core

2021-08-04 Thread Philippe Mathieu-Daudé
On 8/4/21 4:12 PM, Laurent Vivier wrote: > Le 03/08/2021 à 20:34, Peter Maydell a écrit : >> On Tue, 3 Aug 2021 at 18:21, Ilya Leoshkevich wrote: >>> >>> Core dumps from emulating x86_64 on big-endian hosts contain incorrect >>> register values. >>> >>> Signed-off-by: Ilya Leoshkevich >> >> >>

Re: [PATCH v5 0/2] plugins/cache: multicore cache modelling

2021-08-04 Thread Alex Bennée
Mahmoud Mandour writes: > On Tue, Aug 3, 2021 at 11:10 PM Alex Bennée wrote: > > Mahmoud Mandour writes: > > > Hello, > > > > This series introduce multicore cache modelling in contrib/plugins/cache.c > > > > Multi-core cache modelling is handled such that for full-system > >

[PATCH v2 02/11] chardev/socket: print a more correct command-line address

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Better reflect the command line version of the socket address arguments, following the now recommended long-form opt=on syntax. Complement/fixes commit 9d902d51 "chardev: do not use short form boolean options in non-QemuOpts character device descriptions".

[PATCH v2 04/11] chardev: add some comments about the class methods

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/chardev/char.h | 33 + 1 file changed, 33 insertions(+) diff --git a/include/chardev/char.h b/include/chardev/char.h index 589e7fe46d..a319b5fdff 100644 ---

[PATCH v2 05/11] chardev: mark explicitly first argument as poisoned

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Since commit 9894dc0cdcc397ee5b26370bc53da6d360a363c2 "char: convert from GIOChannel to QIOChannel", the first argument to the watch callback can actually be a QIOChannel, which is not a GIOChannel (but a QEMU Object). Even though we never used that pointer, change the

Re: [PATCH V5 03/25] cpr: QMP interfaces for reboot

2021-08-04 Thread Eric Blake
On Wed, Jul 07, 2021 at 10:20:12AM -0700, Steve Sistare wrote: > cprsave calls cprsave(). Syntax: > { 'enum': 'CprMode', 'data': [ 'reboot' ] } > { 'command': 'cprsave', 'data': { 'file': 'str', 'mode': 'CprMode' } } > > cprload calls cprload(). Syntax: > { 'command': 'cprload', 'data': {

[PATCH v2 10/11] chardev: report a simpler error about duplicated id

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Report: "Chardev with id 'char2' already exists" Rather than: "Failed to add chardev 'char2': duplicate yank instance" Signed-off-by: Marc-André Lureau --- chardev/char.c | 5 + 1 file changed, 5 insertions(+) diff --git a/chardev/char.c b/chardev/char.c index

Re: [PATCH 1/2] fuzz: use ITIMER_REAL for timeouts

2021-08-04 Thread Darren Kenny
On Wednesday, 2021-08-04 at 09:56:20 -04, Alexander Bulekov wrote: > Using ITIMER_VIRTUAL is a bad idea, if the fuzzer hits a blocking > syscall - e.g. ppoll with a NULL timespec. This causes timeout issues > while fuzzing some block-device code. Fix that by using wall-clock time. > This might

improving logging of hanging tests in CI

2021-08-04 Thread Peter Maydell
Some of our tests in 'make check' hang intermittently. At the moment we have a path to diagnosing these when they happen via my ad-hoc CI scripts: I can log into the relevant machine and manually look at what has hung, attach gdb, etc. However, for the gitlab CI this doesn't work. Is it possible

Re: [PATCH 0/3] docs: convert qapi-code-gen.txt to qapi-code-gen.rst

2021-08-04 Thread Peter Maydell
On Wed, 4 Aug 2021 at 15:49, John Snow wrote: > > > > On Wed, Aug 4, 2021 at 4:48 AM Markus Armbruster wrote: >> >> For 6.1, or "don't rock the boat now"? > > > No preference. In response to the same question on the other doc conversion > patch, "No preference." I have no strong preference

Re: [PATCH 0/7] floppy: build as modules.

2021-08-04 Thread Philippe Mathieu-Daudé
+Mark On 8/4/21 4:27 PM, Gerd Hoffmann wrote: > Some code shuffling needed beforehand due to floppy being part of > several platforms. While being at it also make floppy optional > in pc machine type. > floppy: move fdctrl_init_sysbus > floppy: move sun4m_fdctrl_init

[PATCH v2 08/11] chardev: fix qemu_chr_open_fd() with fd_in==fd_out

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau The "serial" chardev calls qemu_chr_open_fd() with the same fd. This may lead to double-close as each QIOChannel owns the fd. Instead, share the reference to the same QIOChannel. Signed-off-by: Marc-André Lureau --- chardev/char-fd.c | 19 +++ 1 file

Re: [PATCH v7 29/33] iotests.py: hmp_qemu_io: support qdev

2021-08-04 Thread John Snow
On Wed, Aug 4, 2021 at 5:39 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > tests/qemu-iotests/iotests.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git

[PATCH v2 11/11] chardev: reuse qmp_chardev_new()

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau qemu_chardev_new() and qmp_chardev_add() are similar, let's factorize the code a bit. Signed-off-by: Marc-André Lureau --- chardev/char.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/chardev/char.c b/chardev/char.c

Re: [PATCH v6 05/11] qapi: introduce QAPISchemaIfCond.cgen()

2021-08-04 Thread Marc-André Lureau
Hi On Mon, Aug 2, 2021 at 6:46 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Instead of building prepocessor conditions from a list of string, use > > the result generated from QAPISchemaIfCond.cgen() and hide the > > implementation

[PATCH v7 03/10] qapi: add QAPISchemaIfCond.is_present()

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- docs/sphinx/qapidoc.py | 8 scripts/qapi/introspect.py | 4 ++-- scripts/qapi/schema.py | 7 +-- tests/qapi-schema/test-qapi.py | 2 +- 4 files changed, 12

Re: [PATCH] util: fix abstract socket path copy

2021-08-04 Thread Marc-André Lureau
Hi On Wed, Aug 4, 2021 at 12:39 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket > > support" neglected to update socket_sockaddr_to_address_unix() and > > copied the whole

Re: [PATCH 4/6] coverity-model: clean up the models for array allocation functions

2021-08-04 Thread Peter Maydell
On Wed, 4 Aug 2021 at 09:35, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > On 02/08/21 14:36, Peter Maydell wrote: > >> Reviewed-by: Peter Maydell > >> The real g_malloc_n() returns failure if the multiplication > >> would overflow; > > Really? Its documentation: > > This

[PATCH v7 01/33] block: introduce bdrv_replace_child_bs()

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block.h | 2 ++ block.c | 31 +++ 2 files changed, 33 insertions(+) diff --git a/include/block/block.h

[PATCH v7 31/33] iotests/image-fleecing: rename tgt_node

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Actually target of backup(sync=None) is not a final backup target: image fleecing is intended to be used with external tool, which will copy data from fleecing node to some real backup target. Also, we are going to add a test case for "push backup with fleecing", where instead of exporting

[PATCH v4 03/14] migration.json: add AMD SEV specific migration parameters

2021-08-04 Thread Ashish Kalra
From: Brijesh Singh AMD SEV migration flow requires that target machine's public Diffie-Hellman key (PDH) and certificate chain must be passed before initiating the guest migration. User can use QMP 'migrate-set-parameters' to pass the certificate chain. The certificate chain will be used while

[PATCH v4 04/14] confidential guest support: introduce ConfidentialGuestMemoryEncryptionOps for encrypted VMs

2021-08-04 Thread Ashish Kalra
From: Brijesh Singh When memory encryption is enabled in VM, the guest RAM will be encrypted with the guest-specific key, to protect the confidentiality of data while in transit we need to platform specific hooks to save or migrate the guest RAM. Introduce the new

Re: [PATCH v2] block/io_uring: resubmit when result is -EAGAIN

2021-08-04 Thread Stefano Garzarella
On Mon, Aug 02, 2021 at 02:40:36PM +0200, Kevin Wolf wrote: Am 29.07.2021 um 11:10 hat Fabian Ebner geschrieben: Linux SCSI can throw spurious -EAGAIN in some corner cases in its completion path, which will end up being the result in the completed io_uring request. Resubmitting such requests

Re: [PATCH 2/2] fuzz: unblock SIGALRM so the timeout works

2021-08-04 Thread Darren Kenny
On Wednesday, 2021-08-04 at 09:56:21 -04, Alexander Bulekov wrote: > The timeout mechanism wont work if SIGALRM is blocked. This changes NIT: s/wont/won't/ s/changes/change/ > unmasks SIGALRM when the timer is installed. This doesn't completely > solve the problem, as the fuzzer could

Re: [PATCH] hw/char/virtio-serial-bus: fix: Unpop throttled VirtQueueElement to queue before discard vq data

2021-08-04 Thread Stefan Hajnoczi
On Mon, Aug 02, 2021 at 05:01:14PM +0200, Laurent Vivier wrote: > On 30/07/2021 03:58, AIERPATIJIANG1 [艾尔帕提江·阿布都赛买提] wrote: > > Ports enter a "throttled" state when writing to the chardev would block. > > The current output VirtQueueElement is kept around until the chardev > > becomes writable

Re: [PATCH] chardev: give some context on chardev-add error

2021-08-04 Thread Marc-André Lureau
Hi On Tue, Aug 3, 2021 at 6:39 PM Daniel P. Berrangé wrote: > On Tue, Aug 03, 2021 at 04:02:29PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > Related to: > > https://bugzilla.redhat.com/show_bug.cgi?id=1984721 > > It is preferrable to describe the problem &

Re: [PATCH v4 00/13] new plugin argument passing scheme

2021-08-04 Thread Alex Bennée
Mahmoud Mandour writes: > Hello, > > This series removes passing arguments to plugins through "arg=" since > it's redundant and reduces readability especially when the argument > itself is composed of a name and a value. Queued to plugins/next, thanks. -- Alex Bennée

[PATCH v2 00/11] chardev related fixes

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Hi, Those patches have been sent earlier. I compiled them here, as I intend to send a pull request for 6.1. We may want to drop the last 2/3 patches since we are in freeze though. Marc-André Lureau (11): util: fix abstract socket path copy chardev/socket: print a

[PATCH v2 09/11] chardev: give some context on chardev-add error

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Description from Daniel P. Berrangé: > The original code reported: > > "attempt to add duplicate property 'char2' to object (type 'container')" > > Since adding yank support, the current code reports > > "duplicate yank instance" > > With this patch applied it now

[PATCH v2 06/11] chardev: fix fd_chr_add_watch() when in != out

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Create child sources for the different streams, and dispatch on the parent source with the synthesized conditions. Signed-off-by: Marc-André Lureau --- chardev/char-fd.c | 78 ++- 1 file changed, 77 insertions(+), 1

[PATCH v2 07/11] chardev: fix qemu_chr_open_fd() being called with fd=-1

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau The "file" chardev may call qemu_chr_open_fd() with fd_in=-1. This may cause invalid system calls, as the QIOChannel is assumed to be properly initialized later on. Signed-off-by: Marc-André Lureau --- chardev/char-fd.c | 26 +- 1 file changed,

Re: [RESEND RFC] hw/arm/smmuv3: add device properties to disable cached iotlb

2021-08-04 Thread Eric Auger
Hi Chenxiang, On 8/4/21 10:49 AM, chenxiang wrote: > From: Xiang Chen > > It splits invalidations into ^2 range invalidations in the patch > 6d9cd115b(" hw/arm/smmuv3: Enforce invalidation on a power of two range"). > So for some scenarios such as the size of invalidation is not ^2 range >

Re: [PULL 0/5] pc,pci: bugfixes

2021-08-04 Thread Peter Maydell
On Tue, 3 Aug 2021 at 21:52, Michael S. Tsirkin wrote: > > The following changes since commit f2da205cb4142259d9bc6b9d4596ebbe2426fe49: > > Update version for v6.1.0-rc1 release (2021-07-27 18:07:52 +0100) > > are available in the Git repository at: > >

[PATCH v7 10/10] qapi: make 'if' condition strings simple identifiers

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Change the 'if' condition strings to be C-agnostic. It will accept '[A-Z][A-Z0-9_]*' identifiers. This allows to express configuration conditions in other languages (Rust or Python for ex) or other more suitable forms. Signed-off-by: Marc-André Lureau Reviewed-by:

[PATCH v7 05/33] block: rename backup-top to copy-before-write

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
We are going to convert backup_top to full featured public filter, which can be used in separate of backup job. Start from renaming from "how it used" to "what it does". While updating comments in 283 iotest, drop and rephrase also things about ".active", as this field is now dropped, and filter

[PATCH v7 07/33] block/block-copy: introduce block_copy_set_copy_opts()

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
We'll need a possibility to set compress and use_copy_range options after initialization of the state. So make corresponding part of block_copy_state_new() separate and public. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 2 ++ block/block-copy.c | 66

[PATCH v7 13/33] block/copy-before-write: bdrv_cbw_append(): replace child at last

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Refactor the function to replace child at last. Thus we don't need to revert it and code is simplified. block-copy state initialization being done before replacing the child doesn't need any drained section. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

[PATCH v7 30/33] iotests/image-fleecing: proper source device

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Define scsi device to operate with it by qom-set in further patch. Give a new node-name to source block node, to not look like device name. Job now don't want to work without giving explicit id, so, let's call it "fleecing". Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PATCH v7 25/33] iotests.py: VM: add own __enter__ method

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
In superclass __enter__ method is defined with return value type hint 'QEMUMachine'. So, mypy thinks that return value of VM.__enter__ is QEMUMachine. Let's redefine __enter__ in VM class, to give it correct type hint. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

Re: [PATCH for-6.1? v2 6/7] mirror: Check job_is_cancelled() earlier

2021-08-04 Thread Kevin Wolf
Am 04.08.2021 um 10:25 hat Max Reitz geschrieben: > On 03.08.21 16:34, Kevin Wolf wrote: > > Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: > > > We must check whether the job is force-cancelled early in our main loop, > > > most importantly before any `continue` statement. For example, we

Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation

2021-08-04 Thread Song Gao
On 08/04/2021 03:40 PM, Song Gao wrote: > > On 07/23/2021 01:12 PM, Richard Henderson wrote: >>> +static bool trans_asrtle_d(DisasContext *ctx, arg_asrtle_d * a) >>> +{ >>> +    TCGv t0, t1; >>> + >>> +    t0 = get_gpr(a->rj); >>> +    t1 = get_gpr(a->rk); >>> + >>> +   

[PATCH v7 02/10] qapi: wrap Sequence[str] in an object

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Except for the special casing assert in _make_implicit_object_type(), which needs to handle schema objects, it's a mechanical change. Signed-off-by: Marc-André Lureau --- docs/sphinx/qapidoc.py | 10 +++--- scripts/qapi/commands.py | 4 +--

[PATCH v7 00/10] qapi: untie 'if' conditions from C preprocessor

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series makes the 'if' conditions less liberal, by formalizing a simple expression tree based on bare boolean logic of configure option identifiers. (this allows to express conditions in Rust in my QAPI-Rust PoC series) thanks v7: after Markus review - use

[PATCH v7 01/10] docs: update the documentation upfront about schema configuration

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Update the documentation describing the changes in this series. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Tested-by: John Snow Reviewed-by: Markus Armbruster --- docs/devel/qapi-code-gen.txt | 30 ++ 1 file changed, 18

Re: [PATCH 4/6] coverity-model: clean up the models for array allocation functions

2021-08-04 Thread Markus Armbruster
Paolo Bonzini writes: > On 02/08/21 14:36, Peter Maydell wrote: >> Reviewed-by: Peter Maydell >> The real g_malloc_n() returns failure if the multiplication >> would overflow; Really? Its documentation: This function is similar to g_malloc(), allocating (n_blocks * n_block_bytes)

[PATCH v7 04/10] qapi: introduce QAPISchemaIfCond.cgen()

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Instead of building prepocessor conditions from a list of string, use the result generated from QAPISchemaIfCond.cgen() and hide the implementation details. Note: this patch introduces a minor regression, generating a redundant pair of parenthesis. This is fixed in a

[PATCH v7 09/10] qapi: add 'not' condition operation

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau For the sake of completeness, introduce the 'not' condition. Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py | 4 scripts/qapi/expr.py| 7 +-- tests/qapi-schema/bad-if-key.err| 2 +-

[PATCH v7 08/10] qapi: Use 'if': { 'any': ... } where appropriate

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Tested-by: John Snow Reviewed-by: Markus Armbruster --- qapi/machine-target.json | 20 qapi/misc-target.json| 12 +++- 2 files changed, 27 insertions(+), 5 deletions(-)

Re: [PATCH v2 06/55] target/microblaze: Do not set MO_ALIGN for user-only

2021-08-04 Thread Edgar E. Iglesias
On Mon, Aug 02, 2021 at 06:13:54PM -1000, Richard Henderson wrote: > The kernel will fix up unaligned accesses, so emulate that > by allowing unaligned accesses to succeed. Reviewed-by: Edgar E. Iglesias > > Cc: Edgar E. Iglesias > Signed-off-by: Richard Henderson > --- >

Re: [PATCH V5 00/25] Live Update [restart] : fork mode?

2021-08-04 Thread Zheng Chuan
kindly ping? On 2021/7/30 21:10, Zheng Chuan wrote: > Hi, Steve > I have saw the discussion about the fork+exec mode below: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg815956.html > > And I am still very curious and I want to discuss about the possibility to > support both fork+exec

[PATCH v7 02/33] block: introduce blk_replace_bs

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Add function to change bs inside blk. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/sysemu/block-backend.h | 1 + block/block-backend.c | 8 2 files changed, 9 insertions(+) diff --git a/include/sysemu/block-backend.h

[PATCH v7 20/33] block/block-copy: make setting progress optional

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Now block-copy will crash if user don't set progress meter by block_copy_set_progress_meter(). copy-before-write filter will be used in separate of backup job, and it doesn't want any progress meter (for now). So, allow not setting it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max

[PATCH v7 18/33] block/copy-before-write: cbw_init(): use options

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
One more step closer to .bdrv_open(): use options instead of plain arguments. Move to bdrv_open_child() calls, native for drive open handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 29 +++-- 1 file changed, 15 insertions(+), 14

[PATCH v7 24/33] python/qemu/machine: QEMUMachine: improve qmp() method

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a positional argument and complains that it type should be bool (because second argument of qmp() is conv_keys: bool). Allow passing dict directly, simplifying

[PATCH v7 17/33] block/copy-before-write: bdrv_cbw_append(): drop unused compress arg

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.h | 1 - block/backup.c| 2 +- block/copy-before-write.c | 7 +++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/block/copy-before-write.h b/block/copy-before-write.h index

[PATCH v7 33/33] iotests/image-fleecing: add test-case for copy-before-write filter

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
New fleecing method becomes available: copy-before-write filter. Actually we don't need backup job to setup image fleecing. Add test for new recommended way of image fleecing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/tests/image-fleecing |

Re: [PATCH 2/2] Acceptance Tests: updates to the MAINTAINERS file

2021-08-04 Thread Philippe Mathieu-Daudé
On 8/3/21 10:09 PM, Willian Rampazzo wrote: > On Tue, Aug 3, 2021 at 4:35 PM Cleber Rosa wrote: >> >> The tests/acceptance directory is currently lacking a maintainer >> entry, even though I've been performing that role (of course with help >> from many others). Thus, its status is, even more

[qemu-web PATCH] Update broken links to point to the new page with deprecated features

2021-08-04 Thread Thomas Huth
The deprecated.html file has been moved from the "system" to the "about" folder recently. Signed-off-by: Thomas Huth --- _posts/2017-08-10-deprecation.md | 2 +- download.html| 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v4 06/14] target/i386: sev: do not create launch context for an incoming guest

2021-08-04 Thread Ashish Kalra
From: Brijesh Singh The LAUNCH_START is used for creating an encryption context to encrypt newly created guest, for an incoming guest the RECEIVE_START should be used. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra --- target/i386/sev.c | 15

[PATCH v4 02/14] doc: update AMD SEV to include Live migration flow

2021-08-04 Thread Ashish Kalra
From: Brijesh Singh Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra --- docs/amd-memory-encryption.txt | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/docs/amd-memory-encryption.txt b/docs/amd-memory-encryption.txt index

[PATCH v4 00/14] Add SEV guest live migration support

2021-08-04 Thread Ashish Kalra
From: Ashish Kalra AMD SEV encrypts the memory of VMs and because this encryption is done using an address tweak, the hypervisor will not be able to simply copy ciphertext between machines to migrate a VM. Instead the AMD SEV Key Management API provides a set of functions which the hypervisor

Re: [PATCH v6 03/11] qapi: add QAPISchemaIfCond.is_present()

2021-08-04 Thread Marc-André Lureau
On Mon, Aug 2, 2021 at 1:52 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Signed-off-by: Marc-André Lureau > > --- > > docs/sphinx/qapidoc.py | 8 > > scripts/qapi/schema.py | 7 +-- > >

Re: [PATCH v6 00/11] qapi: untie 'if' conditions from C preprocessor

2021-08-04 Thread Marc-André Lureau
Hi On Tue, Aug 3, 2021 at 5:44 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Hi, > > > > This series makes the 'if' conditions less liberal, by formalizing a > simple > > expression tree based on bare boolean logic of configure option >

Re: [PATCH for-6.1? v2 6/7] mirror: Check job_is_cancelled() earlier

2021-08-04 Thread Max Reitz
On 03.08.21 16:34, Kevin Wolf wrote: Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: We must check whether the job is force-cancelled early in our main loop, most importantly before any `continue` statement. For example, we used to have `continue`s before our current checking location that

[PATCH v7 06/10] qapi: replace if condition list with dict {'all': [...]}

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not). Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py| 23 +-- scripts/qapi/expr.py

[PATCH v7 05/10] qapidoc: introduce QAPISchemaIfCond.docgen()

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Instead of building the condition documentation from a list of string, use the result generated from QAPISchemaIfCond.docgen(). This changes the generated documentation from: - COND1, COND2... (where COND1, COND2 are Literal nodes, and ',' is Text) to: - COND1 and COND2

[PATCH v7 07/10] qapi: add 'any' condition

2021-08-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/unit/test-qmp-cmds.c | 1 + scripts/qapi/common.py | 4 ++-- scripts/qapi/expr.py| 6 +++--- tests/qapi-schema/bad-if-key.err| 2 +- tests/qapi-schema/bad-if-keys.err

Re: [PATCH] hw/char/virtio-serial-bus: fix: Unpop throttled VirtQueueElement to queue before discard vq data

2021-08-04 Thread AIERPATIJIANG1 [艾尔帕提江·阿布都赛买提]
在 2021/8/2 下午11:01,“Laurent Vivier” 写入: On 30/07/2021 03:58, AIERPATIJIANG1 [艾尔帕提江·阿布都赛买提] wrote: >> Ports enter a "throttled" state when writing to the chardev would block. >> The current output VirtQueueElement is kept around until the chardev >> becomes writable again.

[PATCH v7 08/33] block/backup: set copy_range and compress after filter insertion

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter, so it would be initialized through options. Still we don't want to publish compress and copy-range options, as 1. Modern way to enable compression is to use compress filter. 2. For copy-range it's unclean how to make proper interface: - it's has

[PATCH v7 09/33] block/backup: move cluster size calculation to block-copy

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
The main consumer of cluster-size is block-copy. Let's calculate it here instead of passing through backup-top. We are going to publish copy-before-write filter soon, so it will be created through options. But we don't want for now to make explicit option for cluster-size, let's continue to

[PATCH v7 22/33] qapi: publish copy-before-write filter

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- qapi/block-core.json | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 675d8265eb..59d3e5e42d 100644 --- a/qapi/block-core.json

[PATCH v7 15/33] block/copy-before-write: cbw_init(): rename variables

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
One more step closer to real .bdrv_open() handler: use more usual names for bs being initialized and its state. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-)

Re: [PATCH v2 for-6.2 0/6] push backup with fleecing

2021-08-04 Thread Vladimir Sementsov-Ogievskiy
Consider that as RFC. I'm preparing an alternative and more efficient fleecing scheme, based on special block driver, not on backing link. So, this will be rebased, and probably some permission-related difficulties may be avoided. 21.07.2021 17:04, Vladimir Sementsov-Ogievskiy wrote: Hi

Re: [PATCH for-6.1? v2 6/7] mirror: Check job_is_cancelled() earlier

2021-08-04 Thread Max Reitz
On 04.08.21 11:48, Kevin Wolf wrote: Am 04.08.2021 um 10:25 hat Max Reitz geschrieben: On 03.08.21 16:34, Kevin Wolf wrote: Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: We must check whether the job is force-cancelled early in our main loop, most importantly before any `continue`

Re: [PULL 0/1] Block layer patches

2021-08-04 Thread Peter Maydell
On Tue, 3 Aug 2021 at 15:41, Kevin Wolf wrote: > > The following changes since commit 7f1cab9c628a798ae2607940993771e6300e9e00: > > Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' > into staging (2021-08-02 17:21:50 +0100) > > are available in the Git repository at: > >

Re: [PATCH for-6.1? v2 5/7] job: Add job_cancel_requested()

2021-08-04 Thread Peter Krempa
On Wed, Aug 04, 2021 at 12:34:31 +0200, Kevin Wolf wrote: > We could in theory keep allowing redundant completion requests when the > completion mode doesn't conflict, but I don't see the point of that. I don't see either. Especially since ... > Unless libvirt can actually issue multiple

Re: [PATCH 1/4] chardev: fix qemu_chr_open_fd() being called with fd=-1

2021-08-04 Thread Marc-André Lureau
Hi On Tue, Aug 3, 2021 at 12:41 PM Daniel P. Berrangé wrote: > On Fri, Jul 23, 2021 at 02:28:22PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > The "file" chardev may call qemu_chr_open_fd() with fd_in=-1. This may > > cause invalid system calls, as the

[PATCH] target/i386: VMRUN and VMLOAD canonicalizations

2021-08-04 Thread Lara Lazier
APM2 requires that VMRUN and VMLOAD canonicalize (sign extend to 63 from 48/57) all base addresses in the segment registers that have been respectively loaded. Signed-off-by: Lara Lazier --- target/i386/cpu.c | 19 +++ target/i386/cpu.h | 2

[PATCH v4 01/14] doc: update AMD SEV API spec web link

2021-08-04 Thread Ashish Kalra
From: Brijesh Singh Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra --- docs/amd-memory-encryption.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/amd-memory-encryption.txt b/docs/amd-memory-encryption.txt index

Re: [PATCH v5 0/2] plugins/cache: multicore cache modelling

2021-08-04 Thread Mahmoud Mandour
On Tue, Aug 3, 2021 at 11:10 PM Alex Bennée wrote: > > Mahmoud Mandour writes: > > > Hello, > > > > This series introduce multicore cache modelling in > contrib/plugins/cache.c > > > > Multi-core cache modelling is handled such that for full-system > > emulation, a private L1 cache is

[PATCH v4 11/14] migration/ram: add support to send encrypted pages

2021-08-04 Thread Ashish Kalra
From: Brijesh Singh When memory encryption is enabled, the guest memory will be encrypted with the guest specific key. The patch introduces RAM_SAVE_FLAG_ENCRYPTED_PAGE flag to distinguish the encrypted data from plaintext. Encrypted pages may need special handling. The sev_save_outgoing_page()

Re: [PATCH v6 04/11] qapi: _make_enum_members() to work with pre-built QAPISchemaIfCond

2021-08-04 Thread Marc-André Lureau
Hi On Mon, Aug 2, 2021 at 2:41 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Instead of lowering the expression back to its original form, and having > > to convert it again, special-case the 'if' condition to be pre-built. > > > >

Re: [PATCH v6 02/11] qapi: wrap Sequence[str] in an object

2021-08-04 Thread Marc-André Lureau
Hi On Mon, Aug 2, 2021 at 1:21 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Except for the special casing assert in _make_implicit_object_type(), > > which needs to handle schema objects, it's a mechanical change. > > > >

Re: [PATCH v6 06/11] qapidoc: introduce QAPISchemaIfCond.docgen()

2021-08-04 Thread Marc-André Lureau
Hi On Mon, Aug 2, 2021 at 7:47 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Instead of building the condition documentation from a list of string, > > use the result generated from QAPISchemaIfCond.docgen(). > > > > Signed-off-by:

Re: [PATCH v6 11/11] qapi: make 'if' condition strings simple identifiers

2021-08-04 Thread Marc-André Lureau
On Tue, Aug 3, 2021 at 5:35 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Change the 'if' condition strings to be C-agnostic and be simple > > identifiers. > > This is less general, and that's okay, we're doing it for a purpose. > But

Re: [PATCH v4] virtio/vsock: add two more queues for datagram types

2021-08-04 Thread Stefano Garzarella
On Tue, Aug 03, 2021 at 11:41:32PM +, Jiang Wang wrote: Datagram sockets are connectionless and unreliable. The sender does not know the capacity of the receiver and may send more packets than the receiver can handle. Add two more dedicate virtqueues for datagram sockets, so that it will

Re: [PULL 0/3] s390x fixes

2021-08-04 Thread Peter Maydell
On Tue, 3 Aug 2021 at 15:25, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit 7f1cab9c628a798ae2607940993771e6300e9e00: > > Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' > into staging (2021-08-02 17:21:50 +0100) > > are available in the Git

  1   2   3   >