[PATCH v2 21/22] configs: Add loongarch linux-user config

2021-07-21 Thread Song Gao
Add loongarch64 linux-user default configs file. Signed-off-by: Song Gao --- configs/targets/loongarch64-linux-user.mak | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configs/targets/loongarch64-linux-user.mak diff --git a/configs/targets/loongarch64-linux-user.mak b/configs/targ

[PATCH v6 11/33] block/copy-before-write: drop extra bdrv_unref on failure path

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
bdrv_attach_child() do bdrv_unref() on failure, so we shouldn't do it by hand here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/copy-before-write.c b/block/copy-before-write.c index 2a5

[PATCH v6 02/33] block: introduce blk_replace_bs

2021-07-21 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 b/include/sysemu/block-ba

[PATCH v6 04/33] qdev: allow setting drive property for realized device

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
We need an ability to insert filters above top block node, attached to block device. It can't be achieved with blockdev-reopen command. So, we want do it with help of qom-set. Intended usage: Assume there is a node A that is attached to some guest device. 1. blockdev-add to create a filter node

[PATCH v6 03/33] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/hw/qdev-properties.h | 1 + hw/core/qdev-properties.c| 6 +++--- 2 files changed, 4

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

2021-07-21 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(-)

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

2021-07-21 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 v6 05/33] block: rename backup-top to copy-before-write

2021-07-21 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 d

[PATCH v6 06/33] block-copy: always set BDRV_REQ_SERIALISING flag

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
It won't hurt in common case, so let's not bother with detecting image fleecing. Also, we want to simplify initialization interface of copy-before-write filter as we are going to make it public. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.h |

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

2021-07-21 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 calcul

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

2021-07-21 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 --- block/copy-befo

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

2021-07-21 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 fleecin

[PATCH v6 16/33] block/copy-before-write: cbw_init(): use file child after attaching

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
In the next commit we'll get rid of source argument of cbw_init(). Prepare to it now, to make next commit simpler: move the code block that uses source below attaching the child and use bs->file->bs instead of source variable. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --

[PATCH v6 10/33] block/copy-before-write: relax permission requirements when no parents

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter. So, user should be able to create it with blockdev-add first, specifying both filtered and target children. And then do blockdev-reopen, to actually insert the filter where needed. Currently, filter unshares write permission unconditionally on sour

[PATCH v6 27/33] iotests/222: constantly use single quotes for strings

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
The file use both single and double quotes for strings. Let's be consistent. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/222 | 68 +- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/qemu-

[PATCH v6 12/33] block/copy-before-write: use file child instead of backing

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter, and there no public backing-child-based filter in Qemu. No reason to create a precedent, so let's refactor copy-before-write filter instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 39 ++

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

2021-07-21 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 v6 30/33] iotests/image-fleecing: proper source device

2021-07-21 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 v6 14/33] block/copy-before-write: introduce cbw_init()

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Move part of bdrv_cbw_append() to new function cbw_open(). It's an intermediate step for adding normal .bdrv_open() handler to the filter. With this commit no logic is changed, but we have a function which will be turned into .bdrv_open() handler in future commit. Signed-off-by: Vladimir Sementsov

[PATCH v6 21/33] block/copy-before-write: make public block driver

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Finally, copy-before-write gets own .bdrv_open and .bdrv_close handlers, block_init() call and becomes available through bdrv_open(). To achieve this: - cbw_init gets unused flags argument and becomes cbw_open - block_copy_state_free() call moved to new cbw_close() - in bdrv_cbw_append: - o

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

2021-07-21 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 deleti

Re: [PATCH] This is a test mail

2021-07-21 Thread Peter Maydell
On Wed, 21 Jul 2021 at 00:53, Shuuichirou Ishii wrote: > > This is a test mail to check the behavior of my mail > because it is not listed in the ML of qemu-devel. > I may send several test mails. > > I apologize and thank you for your patience. > > Shuuichirou Ishii (1): > This is a test mail t

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

2021-07-21 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 b386fd8f01..51847e71

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

2021-07-21 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 v6 23/33] python/qemu/machine.py: refactor _qemu_args()

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
- use shorter construction - don't create new dict if not needed - drop extra unpacking key-val arguments - drop extra default values Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- python/qemu/machine/machine.py | 18 -- 1 file

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

2021-07-21 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 inter

[PATCH v2 1/5] plugins/cache: Fixed a bug with destroying FIFO metadata

2021-07-21 Thread Mahmoud Mandour
This manifests itself when associativity degree is greater than the number of sets and FIFO is used, otherwise it's also a memory leak whenever FIFO was used. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pl

[PATCH v6 19/33] block/copy-before-write: initialize block-copy bitmap

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter to be used in separate of backup. Future step would support bitmap for the filter. But let's start from full set bitmap. We have to modify backup, as bitmap is first initialized by copy-before-write filter, and then backup modifies it. Signed-off-b

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

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
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 a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 025e288ddd..9d0031a0e8 100644 --- a/tests/qemu-iotests

[PATCH v6 26/33] iotests/222: fix pylint and mypy complains

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Here: - long line - move to new interface of vm.qmp() (direct passing dict), to avoid mypy false-positive, as it thinks that unpacked dict is a positional argument. - extra parenthesis - handle event_wait possible None value Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max R

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

2021-07-21 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 --- tests

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

2021-07-21 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 | 5

[PATCH v6 28/33] iotests: move 222 to tests/image-fleecing

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Give a good name to test file. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/{222 => tests/image-fleecing} | 0 tests/qemu-iotests/{222.out => tests/image-fleecing.out} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/qemu-i

Re: [PATCH for-6.1 v6 08/17] hw/core: Introduce TCGCPUOps.debug_check_breakpoint

2021-07-21 Thread Alex Bennée
Richard Henderson writes: > New hook to return true when an architectural breakpoint is > to be recognized and false when it should be suppressed. > > First use must wait until other pieces are in place. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by:

[PATCH v2 2/5] plugins/cache: limited the scope of a mutex lock

2021-07-21 Thread Mahmoud Mandour
It's not necessary to lock the address translation portion of the vcpu_mem_access callback. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 4a71602639..695fb96

[PATCH v6 32/33] iotests/image-fleecing: prepare for adding new test-case

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
We are going to add a test-case with some behavior modifications. So, let's prepare a function to be reused. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/tests/image-fleecing | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-)

Re: QEMU modules improvements objective (Was: Re: [RFC 0/3] Improve module accelerator error message)

2021-07-21 Thread Gerd Hoffmann
Hi, > Open question to all, > > why don't we have/add the ability to configure > > CONFIG_XXX=m > > for all potentially modular pieces? > > It should be possible to say, I want to build the storage plugins as modules, > TCG I would like it built-in, and KVM as a module, > or any combination

Re: [PATCH 2/2] Revert "qxl: add migration blocker to avoid pre-save assert"

2021-07-21 Thread Marc-André Lureau
On Wed, Jul 21, 2021 at 1:34 PM Gerd Hoffmann wrote: > This reverts commit 86dbcdd9c7590d06db89ca256c5eaf0b4aba8858. > > The pre-save assert is gone now, so the migration blocker > is not needed any more. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Marc-André Lureau > --- > hw/display/q

Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save.

2021-07-21 Thread Marc-André Lureau
On Wed, Jul 21, 2021 at 1:41 PM Gerd Hoffmann wrote: > Since commit 551dbd0846d2 ("migration: check pre_save return in > vmstate_save_state") the pre_save hook can fail. So lets finally > use that to drop the guest-triggerable assert in qxl_pre_save(). > > Signed-off-by: Gerd Hoffmann > Review

Re: [PATCH for-6.1 v6 09/17] target/arm: Implement debug_check_breakpoint

2021-07-21 Thread Alex Bennée
Richard Henderson writes: > Reuse the code at the bottom of helper_check_breakpoints, > which is what we currently call from *_tr_breakpoint_check. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 4/5] migration: Teach QEMUFile to be QIOChannel-aware

2021-07-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > migration uses QIOChannel typed qemufiles. In follow up patches, we'll need > the capability to identify this fact, so that we can get the backing > QIOChannel > from a QEMUFile. > > We can also define types for QEMUFile but so far since we only need to be

Re: QEMU modules improvements objective (Was: Re: [RFC 0/3] Improve module accelerator error message)

2021-07-21 Thread Claudio Fontana
On 7/21/21 12:35 PM, Gerd Hoffmann wrote: > Hi, > >> Open question to all, >> >> why don't we have/add the ability to configure >> >> CONFIG_XXX=m >> >> for all potentially modular pieces? >> >> It should be possible to say, I want to build the storage plugins as >> modules, TCG I would like it

[PATCH v2 3/5] plugins/cache: Supported multicore cache modelling

2021-07-21 Thread Mahmoud Mandour
Multicore L1 cache modelling is introduced and is supported for both full system emulation and linux-user. For full-system emulation, L1 icache and dcache are maintained for each available core, since this information is exposed to the plugin through `qemu_plugin_n_vcpus()`. For linux-user, a sta

plugins/cache: multicore cache modelling and minor tweaks

2021-07-21 Thread Mahmoud Mandour
Hello, This series introduce some minor improvements/bug fixes in the cache plugins and multicore cache modelling. Multi-core cache modelling is handled such that for full-system emulation, a private L1 cache is maintained to each core available to the system. For multi-threaded userspace emulati

[PATCH v2 4/5] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-07-21 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 595b8e0ea4..370c11373f 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins

[PATCH v2 5/5] plugins/cache: Fixed "function decl. is not a prototype" warnings

2021-07-21 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 496d6e7d49..cc9020b2d5 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -535,7 +535,7 @

Re: [PATCH 5/5] migration: Move the yank unregister of channel_close out

2021-07-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It's efficient, but hackish to call yank unregister calls in channel_close(), > especially it'll be hard to debug when qemu crashed with some yank function > leaked. > > Remove that hack, but instead explicitly unregister yank functions at the > places where

Re: [PATCH 4/5] migration: Teach QEMUFile to be QIOChannel-aware

2021-07-21 Thread Daniel P . Berrangé
On Wed, Jul 21, 2021 at 11:27:44AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > migration uses QIOChannel typed qemufiles. In follow up patches, we'll need > > the capability to identify this fact, so that we can get the backing > > QIOChannel > > from a QEMUFi

Re: [PATCH] failover: unregister ram on unplug

2021-07-21 Thread Michael S. Tsirkin
On Wed, Jul 21, 2021 at 10:58:17AM +0200, Igor Mammedov wrote: > On Tue, 20 Jul 2021 20:16:44 +0200 > Laurent Vivier wrote: > > > This simple change allows to test failover with a simulated device > > like e1000e rather than a vfio device. > > > > This is interesting to developers that want to t

Re: [PATCH] failover: unregister ram on unplug

2021-07-21 Thread Laurent Vivier
On 21/07/2021 12:41, Michael S. Tsirkin wrote: > On Wed, Jul 21, 2021 at 10:58:17AM +0200, Igor Mammedov wrote: >> On Tue, 20 Jul 2021 20:16:44 +0200 >> Laurent Vivier wrote: >> >>> This simple change allows to test failover with a simulated device >>> like e1000e rather than a vfio device. >>> >>

Re: [RFC 1/2] modules: Option to build native TCG with --enable-modules

2021-07-21 Thread Gerd Hoffmann
On Tue, Jun 29, 2021 at 06:28:18PM -0300, Jose R. Ziviani wrote: > Adds an option (--enable-tcg-builtin) to build TCG natively when > --enable-modules argument is passed to the build system. It gives > the opportunity to have the accelerator built-in and still take > advantage of the new modular sy

Re: [RFC 1/2] modules: Option to build native TCG with --enable-modules

2021-07-21 Thread Claudio Fontana
On 7/21/21 12:59 PM, Gerd Hoffmann wrote: > On Tue, Jun 29, 2021 at 06:28:18PM -0300, Jose R. Ziviani wrote: >> Adds an option (--enable-tcg-builtin) to build TCG natively when >> --enable-modules argument is passed to the build system. It gives >> the opportunity to have the accelerator built-in a

Re: [PATCH for-6.1 v6 17/17] accel/tcg: Record singlestep_enabled in tb->cflags

2021-07-21 Thread Alex Bennée
Richard Henderson writes: > Set CF_SINGLE_STEP when single-stepping is enabled. > This avoids the need to flush all tb's when turning > single-stepping on or off. > > Signed-off-by: Richard Henderson > --- > include/exec/exec-all.h | 1 + > accel/tcg/cpu-exec.c | 7 ++- > accel/tcg

Re: QEMU modules improvements objective (Was: Re: [RFC 0/3] Improve module accelerator error message)

2021-07-21 Thread Claudio Fontana
On 7/21/21 12:47 PM, Claudio Fontana wrote: > On 7/21/21 12:35 PM, Gerd Hoffmann wrote: >> Hi, >> >>> Open question to all, >>> >>> why don't we have/add the ability to configure >>> >>> CONFIG_XXX=m >>> >>> for all potentially modular pieces? >>> >>> It should be possible to say, I want to build

Re: [PATCH v3] failover: unregister ROM on unplug

2021-07-21 Thread Dr. David Alan Gilbert
* Laurent Vivier (lviv...@redhat.com) wrote: > The intend of failover is to allow to migrate a VM with a VFIO > networking card without disrupting the network operation by switching > to a virtio-net device during the migration. > > This simple change allows to test failover with a simulated devic

Re: [PATCH v3] failover: unregister ROM on unplug

2021-07-21 Thread Laurent Vivier
On 21/07/2021 13:10, Dr. David Alan Gilbert wrote: > * Laurent Vivier (lviv...@redhat.com) wrote: >> The intend of failover is to allow to migrate a VM with a VFIO >> networking card without disrupting the network operation by switching >> to a virtio-net device during the migration. >> >> This sim

Re: [PATCH v2 00/13] Clipboard fixes (for 6.1?)

2021-07-21 Thread Marc-André Lureau
Hi Gerd, On Wed, Jul 21, 2021 at 12:41 PM wrote: > From: Marc-André Lureau > > Hi, > > Here is a few fixes I have collected while working on clipboard-related > code. > > There are some obvious code improvements/fixes, and better handling of > release & > unregister to avoid dangling pointers a

Re: [PATCH] hw/usb/hcd-dwc2: Enforce epnum to 0 for the control endpoint to avoid the assertion failure in usb_ep_get()

2021-07-21 Thread Gerd Hoffmann
> > > * https://gitlab.com/qemu-project/qemu/-/issues/119 > > > * https://gitlab.com/qemu-project/qemu/-/issues/303 > diff --git a/hw/usb/core.c b/hw/usb/core.c > index 975f762..a29b378 100644 > --- a/hw/usb/core.c > +++ b/hw/usb/core.c > @@ -735,10 +735,11 @@ void usb_ep_dump(USBDevice *dev) > >

Re: [PATCH v3 3/4] vhost-user-rng: backend: Add RNG vhost-user daemon implementation

2021-07-21 Thread Alex Bennée
Mathieu Poirier writes: > This patch provides the vhost-user backend implementation to work > in tandem with the vhost-user-rng implementation of the QEMU VMM. > > It uses the vhost-user API so that other VMM can re-use the interface > without having to write the driver again. > > Signed-off-by

Re: [PATCH 0/2] qapi/qom: use correct field name when getting/setting alias properties

2021-07-21 Thread Paolo Bonzini
On 20/07/21 17:54, Markus Armbruster wrote: First, let me describe what's wrong in my own words, because that's how I understand stuff. [snip] All correct. Next, the solution. I get the idea of a wrapper visitor which gives you "pflash0" when you ask for "drive", but oh boy do I wish we cou

Re: [PATCH 5/6] tests/acceptance/virtio-gpu.py: use virtio-vga-gl

2021-07-21 Thread Gerd Hoffmann
On Wed, Jul 14, 2021 at 01:40:50PM -0400, Cleber Rosa wrote: > Since 49afbca3b, the use of an optional virgl renderer is not > available anymore, and since b36eb8860f, the way to choose a GL based > rendered is to use the "virtio-vga-gl" device. > > Signed-off-by: Cleber Rosa > --- > tests/accep

Re: [PATCH for-6.2 v2 01/11] machine: Disallow specifying topology parameters as zero

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 0:11, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:33AM +0800, Yanan Wang wrote: In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Configurati

Re: [PATCH for-6.2 v2 01/11] machine: Disallow specifying topology parameters as zero

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 0:46, Daniel P. Berrangé wrote: On Mon, Jul 19, 2021 at 11:20:33AM +0800, Yanan Wang wrote: In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Confi

Re: [PATCH for 6.1 1/2] ui/gtk: add a keyboard fifo to the VTE consoles

2021-07-21 Thread Gerd Hoffmann
Hi, > +static void gd_vc_send_chars(VirtualConsole *vc) > +{ > +uint32_t len, avail; > +const uint8_t *buf; > + > +len = qemu_chr_be_can_write(vc->vte.chr); > +avail = fifo8_num_used(&vc->vte.out_fifo); > +if (len > avail) { > +len = avail; > +} > +while (len

Re: [PATCH for-6.2 v2 00/11] machine: smp parsing fixes and improvement

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 0:57, Cornelia Huck wrote: On Mon, Jul 19 2021, Yanan Wang wrote: Hi, This is v2 of the series [1] that I have posted to introduce some smp parsing fixes and improvement, much more work has been processed compared to RFC v1. [1] https://lists.gnu.org/archive/html/qemu-devel/2021

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

2021-07-21 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". Signed-off-by:

[Bug 1796520] Re: autogen crashes on qemu-sh4-user after 61dedf2af7

2021-07-21 Thread John Paul Adrian Glaubitz
The patch suggested by Thorsten Glaser glibc Bugzilla #27543 fixes the issue for me: > https://sourceware.org/bugzilla/show_bug.cgi?id=27543#c2 ** Bug watch added: Sourceware.org Bugzilla #27543 https://sourceware.org/bugzilla/show_bug.cgi?id=27543 -- You received this bug notification becau

Re: [PULL for 6.1 0/7] Python and Acceptance Tests

2021-07-21 Thread Peter Maydell
On Wed, 21 Jul 2021 at 00:30, Cleber Rosa wrote: > > The following changes since commit c04b4d9e6b596ead3cf6046a9243fbfee068ef33: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2021-07-20 16:59:33 +0100) > > are available in the Git repository at: > > https

Re: [RFC PATCH 2/6] i386/sev: extend sev-guest property to include SEV-SNP

2021-07-21 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Jul 20, 2021 at 02:42:12PM -0500, Michael Roth wrote: >> On Tue, Jul 13, 2021 at 03:46:19PM +0200, Markus Armbruster wrote: [...] >> > I recommend to do exactly what we've done before for complex >> > configuration: define it in the QAPI schema, so we can us

vulkan support in qemu with virgil

2021-07-21 Thread Tomeu Vizoso
Hi all, At Collabora we have started looking at Vulkan support in QEMU with Virgil. We have seen the work that Vivek has submitted to support the new virtio-gpu BLOB API (thanks!) and have identified a few holes that are still needed for Vulkan support. We would like to know if anybody else

[PULL for-6.1 0/3] Block patches

2021-07-21 Thread Stefan Hajnoczi
The following changes since commit 801f3db7564dcce8a37a70833c0abe40ec19f8ce: Merge remote-tracking branch 'remotes/philmd/tags/kconfig-20210720' into staging (2021-07-20 19:30:28 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for

[PULL for-6.1 1/3] iothread: generalize iothread_set_param/iothread_get_param

2021-07-21 Thread Stefan Hajnoczi
From: Stefano Garzarella Changes in preparation for next patches where we add a new parameter not related to the poll mechanism. Let's add two new generic functions (iothread_set_param and iothread_get_param) that we use to set and get IOThread parameters. Signed-off-by: Stefano Garzarella Mes

[PULL for-6.1 3/3] linux-aio: limit the batch size using `aio-max-batch` parameter

2021-07-21 Thread Stefan Hajnoczi
From: Stefano Garzarella When there are multiple queues attached to the same AIO context, some requests may experience high latency, since in the worst case the AIO engine queue is only flushed when it is full (MAX_EVENTS) or there are no more queues plugged. Commit 2558cb8dd4 ("linux-aio: incre

Re: [PATCH for-6.1? v2 0/3] linux-aio: limit the batch size to reduce queue latency

2021-07-21 Thread Stefan Hajnoczi
On Wed, Jul 21, 2021 at 11:42:08AM +0200, Stefano Garzarella wrote: > Since it's a performance regression, if possible we could include it in > 6.1-rc1. > There shouldn't be any particular criticism. > > v1: https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg01526.html > v2: > - s/bacth/b

[PULL for-6.1 2/3] iothread: add aio-max-batch parameter

2021-07-21 Thread Stefan Hajnoczi
From: Stefano Garzarella The `aio-max-batch` parameter will be propagated to AIO engines and it will be used to control the maximum number of queued requests. When there are in queue a number of requests equal to `aio-max-batch`, the engine invokes the system call to forward the requests to the

[PATCH] hw/i386: fix phys-bits on cpus with AMD SEV/SMD

2021-07-21 Thread Jörg Thalheim
On AMD machines with SEV/SMD the physical address space needs to be reduced by a number of bits. Linux does this correctly and shows this information in /proc/cpuinfo. CPUID set by qemu however reports too big physical addresses i.e. 48 bit instead of 43. This patch has been tested on both Intel a

[PATCH RFC]Fix rocker device null-pointer crash.

2021-07-21 Thread sohu0106
From 503b08d3b8d8faa93c3f5d2bc9eb8b52a7772b85 Mon Sep 17 00:00:00 2001 From: sohu0106 Date: Wed, 21 Jul 2021 10:07:07 +0800 Subject: [RFC] Fix rocker device null pointer crash. qemu config r->fp_ports with "-device rocker,len-ports=10" when guest config port larget then r->fp_ports(10) r->fp_p

[PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it.

2021-07-21 Thread zhuguanghong
Signed-off-by: zhuguanghong --- qom/object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qom/object.c b/qom/object.c index 6a01d56546..c8f5481afe 100644 --- a/qom/object.c +++ b/qom/object.c @@ -78,9 +78,7 @@ static GHashTable *type_table_get(void) { static GHashT

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

2021-07-21 Thread AIERPATIJIANG1 [艾尔帕提江·阿布都赛买提]
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. Because closing the virtio serial device does not reset the queue, we cannot directly discard this element, otherwise the control v

[PATCH v4 1/3] target/ppc: divided mmu_helper.c in 2 files

2021-07-21 Thread Lucas Mateus Castro (alqotel)
Divided mmu_helper.c in 2 files, functions inside #ifdef CONFIG_SOFTMMU stayed in mmu_helper.c, other functions moved to mmu_common.c. Updated meson.build to compile mmu_common.c and only compile mmu_helper.c when CONFIG_TCG is set. Moved function declarations, #define and structs used by both file

Re: [PATCH] chardev/socket: print a more correct command-line address

2021-07-21 Thread Daniel P . Berrangé
On Wed, Jul 21, 2021 at 05:04:53PM +0400, marcandre.lur...@redhat.com wrote: > 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 s

[PATCH v4 0/3] target/ppc: MMU clean up

2021-07-21 Thread Lucas Mateus Castro (alqotel)
This patch series aims to clean up some of the code mmu_helper.c, including removing the #includes inside ifdef. This version of the patch has been rebased on the current ppc-for-6.2 branch as adapted accordingly. v4: Moved functions declarations from cpu.h to internal.h when possible. Comments

[PATCH v4 2/3] target/ppc: moved ppc_store_sdr1 to mmu_common.c

2021-07-21 Thread Lucas Mateus Castro (alqotel)
ppc_store_sdr1 was at first in mmu_helper.c and was moved as part the patches to enable the disable-tcg option, now it's being moved back to a file that will be compiled with that option Signed-off-by: Lucas Mateus Castro (alqotel) --- target/ppc/cpu.c| 28 t

[PATCH v4 3/3] target/ppc: moved store_40x_sler to helper_regs.c

2021-07-21 Thread Lucas Mateus Castro (alqotel)
moved store_40x_sler from mmu_common.c to helper_regs.c as it was more appropriate Signed-off-by: Lucas Mateus Castro (alqotel) --- target/ppc/helper_regs.c | 12 target/ppc/mmu_common.c | 10 -- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/target/ppc/he

Re: [PATCH 0/1]

2021-07-21 Thread Jose R. Ziviani
On Wed, Jul 21, 2021 at 07:24:02AM +0200, Thomas Huth wrote: > On 21/07/2021 00.13, Jose R. Ziviani wrote: > > Hello! > > > > This patch gives the ability to build TCG builtin even if > > --enable-modules is selected. This is useful to have a base > > QEMU with TCG native product but still using t

Re: [RFC 3/3] qom: Improve error message in module_object_class_by_name()

2021-07-21 Thread Jose R. Ziviani
On Wed, Jul 21, 2021 at 10:57:37AM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 21, 2021 at 11:54:45AM +0200, Gerd Hoffmann wrote: > > > ObjectClass *module_object_class_by_name(const char *typename) > > > { > > > ObjectClass *oc; > > > @@ -1031,8 +1049,20 @@ ObjectClass *module_object_cla

Re: [PATCH v1 02/29] docs: collect the disparate device emulation docs into one section

2021-07-21 Thread Markus Armbruster
Alex Bennée writes: > While we are at it add a brief preamble that explains some of the > common concepts in QEMU's device emulation which will hopefully lead > to less confusing about our dizzying command line options. > > Signed-off-by: Alex Bennée > Message-Id: <20210714182056.25888-3-alex.be

Re: [PATCH v3] failover: unregister ROM on unplug

2021-07-21 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Laurent Vivier (lviv...@redhat.com) wrote: >> The intend of failover is to allow to migrate a VM with a VFIO >> networking card without disrupting the network operation by switching >> to a virtio-net device during the migration. >> >> This simple change allows

Re: [PATCH v3] failover: unregister ROM on unplug

2021-07-21 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Laurent Vivier (lviv...@redhat.com) wrote: > >> The intend of failover is to allow to migrate a VM with a VFIO > >> networking card without disrupting the network operation by switching > >> to a virtio-net device

Re: [PATCH] chardev/socket: print a more correct command-line address

2021-07-21 Thread Philippe Mathieu-Daudé
On 7/21/21 3:04 PM, marcandre.lur...@redhat.com wrote: > 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 > op

Re: [PATCH for-6.2 v2 00/11] machine: smp parsing fixes and improvement

2021-07-21 Thread Pankaj Gupta
> > On Mon, Jul 19 2021, Yanan Wang wrote: > > > >> Hi, > >> > >> This is v2 of the series [1] that I have posted to introduce some smp > >> parsing > >> fixes and improvement, much more work has been processed compared to RFC > >> v1. > >> > >> [1] https://lists.gnu.org/archive/html/qemu-devel/

Re: [PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it.

2021-07-21 Thread Marc-André Lureau
Hi On Wed, Jul 21, 2021 at 5:22 PM zhuguanghong wrote: > Signed-off-by: zhuguanghong > --- > qom/object.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/qom/object.c b/qom/object.c > index 6a01d56546..c8f5481afe 100644 > --- a/qom/object.c > +++ b/qom/object.c > @@

Re: [PATCH v3] failover: unregister ROM on unplug

2021-07-21 Thread Juan Quintela
Laurent Vivier wrote: > The intend of failover is to allow to migrate a VM with a VFIO > networking card without disrupting the network operation by switching > to a virtio-net device during the migration. > > This simple change allows to test failover with a simulated device > like e1000e rather

Re: [PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it.

2021-07-21 Thread Daniel P . Berrangé
On Wed, Jul 21, 2021 at 05:55:44PM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Jul 21, 2021 at 5:22 PM zhuguanghong > wrote: > > > Signed-off-by: zhuguanghong > > --- > > qom/object.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/qom/object.c b/qom/obje

Re: [PATCH v3] failover: unregister ROM on unplug

2021-07-21 Thread Philippe Mathieu-Daudé
On 7/21/21 3:45 PM, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> "Dr. David Alan Gilbert" wrote: >>> * Laurent Vivier (lviv...@redhat.com) wrote: The intend of failover is to allow to migrate a VM with a VFIO networking card without disrupting the netwo

[PATCH v2 1/6] block/block-copy: use write-unchanged for fleecing scheme

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
We are going to use fleecing scheme for push-backup, so that copy-before-write filter does copy before write operations to temporary image and backup job copies data from (immutable from backup's point of view) temporary image to actual backup target. For this to work properly, backup job should un

[PATCH v2 4/6] block: blk_root(): return non-const pointer

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
In the following patch we'll want to pass blk children to block-copy. Const pointers are not enough. So, return non const pointer from blk_root(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 2 +- block/block-backend.c | 2 +- 2 files changed, 2 inse

[PATCH v2 2/6] block/copy-before-write: require BLK_PERM_WRITE_UNCHANGED for fleecing

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Now block-copy detects fleecing scheme and do write-unchanged operations if detected. So, let's require appropriate permissions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/block/copy-be

[PATCH] hw/acpi: some cosmetic improvements to existing code

2021-07-21 Thread Ani Sinha
From: Ani Sinha All existing code using acpi_get_i386_pci_host() checks for a non-null return from this function call. This change brings the same check to acpi_pcihp_disable_root_bus() function. Also adds a comment describing why we unconditionally pass a truth value to the last argument when ca

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

2021-07-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is push-backup with fleecing. What is it: 1. Make fleecing scheme guest blk | |root v copy-before-write filter ---> temp qcow2 | | |file | backing V | active disk <---

<    1   2   3   4   >