Re: [PATCH RFC 7/7] Revert "hw/i386: pass RNG seed via setup_data entry"

2023-02-14 Thread Daniel P . Berrangé
On Wed, Feb 08, 2023 at 04:12:56PM -0500, Michael S. Tsirkin wrote: > This reverts commit 67f7e426e53833a5db75b0d813e8d537b8a75bd2. > > Fixes: 67f7e426e5 ("hw/i386: pass RNG seed via setup_data entry") > Signed-off-by: Michael S. Tsirkin > --- > include/hw/i386/pc.h | 3 --- > include/hw/i386/

Re: [PATCH 2/2] hw/arm/smmu-common: Fix TTB1 handling

2023-02-14 Thread Jean-Philippe Brucker
On Mon, Feb 13, 2023 at 05:30:03PM +0100, Eric Auger wrote: > Hi Jean, > > On 2/10/23 17:37, Jean-Philippe Brucker wrote: > > Addresses targeting the second translation table (TTB1) in the SMMU have > > all upper bits set (except for the top byte when TBI is enabled). Fix > > the TTB1 check. > > >

Re: [PATCH] block/mirror: add 'write-blocking-after-ready' copy mode

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 14.02.23 17:29, Fiona Ebner wrote: [..] [0]: Is there a good way to peek the iterator without doing something like the following (we do know the offset from last time in mirror_iteration(), so that is not an issue)? offset_from_last_time = bdrv_dirty_iter_next(s->dbi); ...other stuff... pe

Re: [PATCH 0/2] docs/devel/qapi-code-gen: Update features doc, minor improvements

2023-02-14 Thread John Snow
On Mon, Feb 13, 2023, 8:20 AM Markus Armbruster wrote: > *** BLURB HERE *** > đŸ€« > Markus Armbruster (2): > docs/devel/qapi-code-gen: Belatedly update features documentation > docs/devel/qapi-code-gen: Fix a missing 'may', clarify SchemaInfo > > docs/devel/qapi-code-gen.rst | 16 --

Re: [PATCH 0/2] docs/devel/qapi-code-gen: Update features doc, minor improvements

2023-02-14 Thread John Snow
On Tue, Feb 14, 2023, 11:49 AM John Snow wrote: > > > On Mon, Feb 13, 2023, 8:20 AM Markus Armbruster wrote: > >> *** BLURB HERE *** >> > > đŸ€« > > >> Markus Armbruster (2): >> docs/devel/qapi-code-gen: Belatedly update features documentation >> docs/devel/qapi-code-gen: Fix a missing 'may', c

Re: [PATCH v3 06/10] monitor: release the lock before calling close()

2023-02-14 Thread Peter Xu
On Tue, Feb 14, 2023 at 05:23:08PM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, Feb 14, 2023 at 05:36:32PM +0400, Marc-André Lureau wrote: > >> Hi > >> > >> On Tue, Feb 14, 2023 at 5:34 PM Markus Armbruster > >> wrote: > >> > > >> > marcandre.lur...@redhat.com wri

Re: [PATCH v3 5/7] qapi/parser: add QAPIExpression type

2023-02-14 Thread John Snow
On Sat, Feb 11, 2023, 1:49 AM Markus Armbruster wrote: > John Snow writes: > > > This patch creates a new type, QAPIExpression, which represents a parsed > > expression complete with QAPIDoc and QAPISourceInfo. > > > > This patch turns parser.exprs into a list of QAPIExpression instead, > > and

Re: [PATCH 1/4] util/cacheflush: fix illegal instruction on windows-arm64

2023-02-14 Thread Richard Henderson
On 2/14/23 06:44, Peter Maydell wrote: This will cause us to not use the generic aarch64 flush_idcache_range(), which uses DC CVAU and IC IVAU. Does that not work on Windows? If it doesn't then I think the ifdeffery would be more clearly structured as #elif defined(__aarch64__) ifdef CONFIG_DA

Re: [PATCH v3 3/7] qapi/expr: Split check_expr out from check_exprs

2023-02-14 Thread John Snow
On Sat, Feb 11, 2023, 5:06 AM Markus Armbruster wrote: > John Snow writes: > > > --3b01fe05f45a096a > > Content-Type: text/plain; charset="UTF-8" > > > > On Fri, Feb 10, 2023, 7:33 AM Markus Armbruster > wrote: > > > >> Another observation... > >> > >> John Snow writes: > >> > >> >

Re: [RFC 00/52] Introduce hybrid CPU topology

2023-02-14 Thread Zhao Liu
On Mon, Feb 13, 2023 at 01:38:28PM +, Daniel P. Berrangé wrote: > Date: Mon, 13 Feb 2023 13:38:28 + > From: "Daniel P. Berrangé" > Subject: Re: [RFC 00/52] Introduce hybrid CPU topology > > On Mon, Feb 13, 2023 at 05:49:43PM +0800, Zhao Liu wrote: > > From: Zhao Liu > > ## 3.3. "-hybrid"

Re: [PATCH v3 4/7] qapi/expr: add typing workaround for AbstractSet

2023-02-14 Thread John Snow
On Fri, Feb 10, 2023, 11:26 AM John Snow wrote: > > > On Fri, Feb 10, 2023, 10:44 AM Markus Armbruster > wrote: > >> John Snow writes: >> >> > mypy can only narrow the type of `Mapping[str, ...].keys() & Set[str]` >> > to `AbstractSet[str]` and not a `Set[str]`. As a result, if the type of >> >

Re: [PATCH] hbitmap: fix hbitmap_status() return value for first dirty bit case

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 02.02.23 21:15, Andrey Zhadchenko via wrote: The last return statement should return true, as we already evaluated that start == next_dirty Also, fix hbitmap_status() description in header Cc: qemu-sta...@nongnu.org Fixes: a6426475a75 ("block/dirty-bitmap: introduce bdrv_dirty_bitmap_status(

[PATCH v2] block: temporarily hold the new AioContext of bs_top in bdrv_append()

2023-02-14 Thread Stefano Garzarella
bdrv_append() is called with bs_top AioContext held, but bdrv_attach_child_noperm() could change the AioContext of bs_top. bdrv_replace_node_noperm() calls bdrv_drained_begin() starting from commit 2398747128 ("block: Don't poll in bdrv_replace_child_noperm()"). bdrv_drained_begin() can call BDRV_

[PATCH 3/8] hw/misc: add a toy i2c echo device

2023-02-14 Thread Cédric Le Goater
From: Klaus Jensen Add an example I2C device to demonstrate how a slave may master the bus and send data asynchronously to another slave. The device will echo whatever it is sent to the device identified by the first byte received. Signed-off-by: Klaus Jensen [ clg: - Changed to build to use C

[PATCH 5/8] aspeed/smc: Replace SysBus IRQs with GPIO lines

2023-02-14 Thread Cédric Le Goater
It's cleaner and removes the curious '+ 1' required to skip the DMA IRQ line of the controller. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 2 +- hw/ssi/aspeed_smc.c | 5 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 27

[PATCH 2/8] hw/i2c: only schedule pending master when bus is idle

2023-02-14 Thread Cédric Le Goater
From: Klaus Jensen It is not given that the current master will release the bus after a transfer ends. Only schedule a pending master if the bus is idle. Fixes: 37fa5ca42623 ("hw/i2c: support multiple masters") Signed-off-by: Klaus Jensen Acked-by: Corey Minyard Message-Id: <20221116084312.358

[PATCH 6/8] aspeed/smc: Wire CS lines at reset

2023-02-14 Thread Cédric Le Goater
It has become difficult to define on the command line the flash devices of the Aspeed machines and their file backend. Currently, a set of default flash devices is created at machine init and drives are associated to the FMC and SPI controller devices in sequence : -drive file,format=raw,if=mtd

[PATCH 8/8] aspeed: Add a boot_rom overlap region in the SoC spi_boot container

2023-02-14 Thread Cédric Le Goater
To avoid the SPI transactions fetching instructions from the FMC CE0 flash device and speed up boot, a ROM can be created if a drive is available. Reverse a bit the logic to allow a machine to boot without a drive, using a block device instead : -blockdev node-name=fmc0,driver=file,filename=/

[PATCH 4/8] tests/avocado/machine_aspeed.py: Add I2C slave tests

2023-02-14 Thread Cédric Le Goater
Test extracted from : https://lists.nongnu.org/archive/html/qemu-devel/2022-06/msg00183.html Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py in

[PATCH 1/8] m25p80: Improve error when the backend file size does not match the device

2023-02-14 Thread Cédric Le Goater
Currently, when a block backend is attached to a m25p80 device and the associated file size does not match the flash model, QEMU complains with the error message "failed to read the initial flash content". This is confusing for the user. Use blk_check_size_and_read_all() instead of blk_pread() to

Re: [PATCH v4 0/5] Series of fixes for PL011 char device

2023-02-14 Thread eiakovlev
On 2/2/23 6:54 PM, Peter Maydell wrote: On Mon, 23 Jan 2023 at 16:23, Evgeny Iakovlev wrote: > > v4: > * Fixed post_load hook to be backwards-migratable > * Refactored some code in 5/5 as per review comments > > v3: > * Introduced a post_load hook for PL011State migration for >backwards-

[PATCH v2 2/2] hw/arm/smmu-common: Fix TTB1 handling

2023-02-14 Thread Jean-Philippe Brucker
Addresses targeting the second translation table (TTB1) in the SMMU have all upper bits set (except for the top byte when TBI is enabled). Fix the TTB1 check. Reported-by: Ola Hugosson Reviewed-by: Eric Auger Reviewed-by: Richard Henderson Signed-off-by: Jean-Philippe Brucker --- hw/arm/smmu-

[PATCH v2 1/2] hw/arm/smmu-common: Support 64-bit addresses

2023-02-14 Thread Jean-Philippe Brucker
Addresses targeting the second translation table (TTB1) in the SMMU have all upper bits set. Ensure the IOMMU region covers all 64 bits. Reviewed-by: Richard Henderson Signed-off-by: Jean-Philippe Brucker --- include/hw/arm/smmu-common.h | 2 -- hw/arm/smmu-common.c | 2 +- 2 files chan

[PATCH 7/8] aspeed: Introduce a spi_boot region under the SoC

2023-02-14 Thread Cédric Le Goater
The default boot of the Aspeed SoCs is address 0x0. For this reason, the FMC flash device contents are remapped by HW on the first 256MB of the address space. In QEMU, this is currently done in the machine init with the setup of a region alias. Move this code to the SoC and introduce an extra cont

[PATCH 0/8] aspeed: I2C fixes, -drive removal (first step)

2023-02-14 Thread Cédric Le Goater
Hello, This series starts with a first set of patches fixing I2C slave mode in the Aspeed I2C controller, a test device and its associated test in avocado. Follow some cleanups which allow the use of block devices instead of drives. So that, instead of specifying : -drive file=./flash-ast2600-

[PATCH v2 0/2] hw/arm/smmu: Fixes for TTB1

2023-02-14 Thread Jean-Philippe Brucker
Two small changes to support TTB1. Since [v1] I removed the unused SMMU_MAX_VA_BITS and added tags, thanks! [v1] https://lore.kernel.org/qemu-devel/20230210163731.970130-1-jean-phili...@linaro.org/ Jean-Philippe Brucker (2): hw/arm/smmu-common: Support 64-bit addresses hw/arm/smmu-common: Fi

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-14 Thread Kevin Wolf
Am 14.02.2023 um 15:03 hat Paolo Bonzini geschrieben: > In the case of Python the issue is not the interpreter per se, though > there are a couple new feature in Python 3.7 that are quite nice (for > example improved data classes[1] or context variables[2]). The main > problem as far as I understoo

Re: [PATCH] memory: Optimize replay of guest mapping

2023-02-14 Thread Peter Xu
On Tue, Feb 14, 2023 at 07:04:56AM +, Duan, Zhenzhong wrote: > >> @@ -1936,7 +1935,7 @@ void > >> memory_region_iommu_replay(IOMMUMemoryRegion *iommu_mr, > >IOMMUNotifier > >> *n) > >> > >> granularity = memory_region_iommu_get_min_page_size(iommu_mr); > >> > >> -for (addr = 0; addr <

[qemu-web PATCH] fix dead link to template

2023-02-14 Thread Paolo Bonzini
The link to the Linear theme that provided the basis for the QEMU web site is dead. Replace it with something that at least works. Signed-off-by: Paolo Bonzini --- LICENSE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 218e3c7..330ac2a

Re: [PATCH 02/11] target/riscv: allow users to actually write the MISA CSR

2023-02-14 Thread Daniel Henrique Barboza
On 2/14/23 12:12, weiwei wrote: On 2023/2/11 19:50, Daniel Henrique Barboza wrote: On 2/10/23 23:43, weiwei wrote: On 2023/2/10 21:36, Daniel Henrique Barboza wrote: At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code fr

Re: [PATCH v10 01/12] parallels: Out of image offset in BAT leads to image inflation

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 03.02.23 12:18, Alexander Ivanov wrote: data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image will be truncated to this offset on close. This is definit

Re: [PATCH 00/10] Retire Fork-Based Fuzzing

2023-02-14 Thread Laurent Vivier
On 2/14/23 17:08, Philippe Mathieu-Daudé wrote: On 14/2/23 16:38, Stefan Hajnoczi wrote: On Sat, Feb 04, 2023 at 11:29:41PM -0500, Alexander Bulekov wrote: Hello, This series removes fork-based fuzzing. How does fork-based fuzzing work?   * A single parent process initializes QEMU   * We identi

Re: [PATCH v10 02/12] parallels: Fix high_off calculation in parallels_co_check()

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 03.02.23 12:18, Alexander Ivanov wrote: Don't let high_off be more than the file size even if we don't fix the image. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH RFC 7/7] Revert "hw/i386: pass RNG seed via setup_data entry"

2023-02-14 Thread Michael S. Tsirkin
On Tue, Feb 14, 2023 at 04:45:57PM +, Daniel P. Berrangé wrote: > On Wed, Feb 08, 2023 at 04:12:56PM -0500, Michael S. Tsirkin wrote: > > This reverts commit 67f7e426e53833a5db75b0d813e8d537b8a75bd2. > > > > Fixes: 67f7e426e5 ("hw/i386: pass RNG seed via setup_data entry") > > Signed-off-by: M

Re: [PATCH v5 1/3] multifd: Create property multifd-sync-after-each-section

2023-02-14 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> We used to synchronize all channels at the end of each RAM section >> sent. That is not needed, so preparing to only synchronize once every >> full round in latests patches. >> >> Notice that we initialize the property as true. We will chang

Re: [PATCH v2 09/13] vdpa net: block migration if the device has CVQ

2023-02-14 Thread Eugenio Perez Martin
On Mon, Feb 13, 2023 at 7:51 AM Si-Wei Liu wrote: > > > > On 2/8/2023 1:42 AM, Eugenio Pérez wrote: > > Devices with CVQ needs to migrate state beyond vq state. Leaving this > > to future series. > > > > Signed-off-by: Eugenio Pérez > > --- > > net/vhost-vdpa.c | 6 ++ > > 1 file changed,

Re: "patches" tool has a new patches.json URL

2023-02-14 Thread John Snow
On Thu, Feb 9, 2023 at 3:46 PM Stefan Hajnoczi wrote: > > Hi, > For those using the https://github.com/stefanha/patches tool to work > with QEMU patch series, please update your configuration file to the new > patches.json URL: > > $ $EDITOR ~/.patchesrc > [fetch] > url=https://patches.qemu.

Re: [PATCH v10 2/9] KVM: Introduce per-page memory attributes

2023-02-14 Thread Sean Christopherson
On Mon, Feb 13, 2023, Isaku Yamahata wrote: > On Fri, Feb 10, 2023 at 12:35:30AM +, > Sean Christopherson wrote: > > > On Wed, Feb 08, 2023, Isaku Yamahata wrote: > > > On Fri, Dec 02, 2022 at 02:13:40PM +0800, > > > Chao Peng wrote: > > > > > > > +static int kvm_vm_ioctl_set_mem_attributes

Re: [PATCH 4/4] target/ppc: fix warning with clang-15

2023-02-14 Thread Richard Henderson
On 2/13/23 06:13, Pierrick Bouvier wrote: When compiling for windows-arm64 using clang-15, it reports a sometimes uninitialized variable. This seems to be a false positive, as a default case guards switch expressions, preventing to return an uninitialized value, but clang seems unhappy with asser

Re: [PATCH 2/3] migration: Remove unused res_compatible

2023-02-14 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 08.02.23 16:57, Juan Quintela wrote: >> { >> -uint64_t pend_pre, pend_compat, pend_post; >> +uint64_t pend_pre, pend_post; >> bool in_postcopy = s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE; >> -qemu_savevm_state_pending_estimate(&pend

Re: [PATCH 3/3] migration: Remove _only suffix for res_postcopy/precopy

2023-02-14 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 08.02.23 16:57, Juan Quintela wrote: >> Once that res_compatible is removed, they don't make sense anymore. >> Signed-off-by: Juan Quintela >> --- >> include/migration/register.h | 18 -- >> migration/savevm.h | 8

Re: Lost partition tables on ide-hd + ahci drive

2023-02-14 Thread John Snow
On Thu, Feb 2, 2023 at 7:08 AM Fiona Ebner wrote: > > Hi, > over the years we've got 1-2 dozen reports[0] about suddenly > missing/corrupted MBR/partition tables. The issue seems to be very rare > and there was no success in trying to reproduce it yet. I'm asking here > in the hope that somebody h

[PATCH] MAINTAINERS: drop Vladimir from parallels block driver

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
I have to admit this is out of my scope now. Still feel free to Cc me directly if my help is needed :) Signed-off-by: Vladimir Sementsov-Ogievskiy --- MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 96e25f62ac..12bc96f52a 100644 --- a/MAINTAINERS

Re: [PATCH 3/3] migration: Remove _only suffix for res_postcopy/precopy

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 14.02.23 21:22, Juan Quintela wrote: Vladimir Sementsov-Ogievskiy wrote: On 08.02.23 16:57, Juan Quintela wrote: Once that res_compatible is removed, they don't make sense anymore. Signed-off-by: Juan Quintela --- include/migration/register.h | 18 -- migration/savev

Re: [PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-14 Thread John Snow
On Thu, Feb 9, 2023 at 7:31 PM John Snow wrote: > > Howdy, this series increases our minimum python version to 3.7. > > CI: https://gitlab.com/jsnow/qemu/-/pipelines/771780626 > (All green!) > GL: https://gitlab.com/jsnow/qemu/-/commits/python-require-37 > > Patches 1 and 2 are loose pre-requi

Re: [PATCH 2/2] hw/arm/smmu-common: Fix TTB1 handling

2023-02-14 Thread Eric Auger
On 2/14/23 17:46, Jean-Philippe Brucker wrote: > On Mon, Feb 13, 2023 at 05:30:03PM +0100, Eric Auger wrote: >> Hi Jean, >> >> On 2/10/23 17:37, Jean-Philippe Brucker wrote: >>> Addresses targeting the second translation table (TTB1) in the SMMU have >>> all upper bits set (except for the top by

Re: [PATCH v2 1/2] hw/arm/smmu-common: Support 64-bit addresses

2023-02-14 Thread Eric Auger
Hi Jean, On 2/14/23 18:19, Jean-Philippe Brucker wrote: > Addresses targeting the second translation table (TTB1) in the SMMU have > all upper bits set. Ensure the IOMMU region covers all 64 bits. > > Reviewed-by: Richard Henderson > Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger

Re: [PATCH 2/2] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-02-14 Thread Davidlohr Bueso
On Tue, 31 Jan 2023, Jonathan Cameron wrote: From: Gregory Price This commit enables each CXL Type-3 device to contain one volatile memory region and one persistent region. Two new properties have been added to cxl-type3 device initialization: [volatile-memdev] and [persistent-memdev] The

[PATCH] qapi: allow unions to contain further unions

2023-02-14 Thread Daniel P . Berrangé
This extends the QAPI schema validation to permit unions inside unions, provided the checks for clashing fields pass. Signed-off-by: Daniel P. Berrangé --- This patch comes out of the discussion on Het's migration series starting at this patch: https://lists.gnu.org/archive/html/qemu-devel/20

Re: [PATCH 00/10] Retire Fork-Based Fuzzing

2023-02-14 Thread Stefan Hajnoczi
On Tue, 14 Feb 2023 at 12:59, Laurent Vivier wrote: > > On 2/14/23 17:08, Philippe Mathieu-Daudé wrote: > > On 14/2/23 16:38, Stefan Hajnoczi wrote: > >> On Sat, Feb 04, 2023 at 11:29:41PM -0500, Alexander Bulekov wrote: > >>> Hello, > >>> This series removes fork-based fuzzing. > >>> How does for

Re: [PATCH 6/7] hw/isa: Assert isa_register_portio_list() gets non-NULL ISA device

2023-02-14 Thread Richard Henderson
On 2/14/23 00:18, Philippe Mathieu-Daudé wrote:  __attribute__((nonnull)) void a1(void *ptr)  {    // can no use assert(ptr) because compiler warning  } I briefly glossed over that... I realize we'd probably want to add -fno-delete-null-pointer-checks if we make too much ... here. The

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-02-14 Thread Eugenio Perez Martin
On Mon, Feb 13, 2023 at 11:37 PM Si-Wei Liu wrote: > > > > On 2/13/2023 1:47 AM, Eugenio Perez Martin wrote: > > On Sat, Feb 4, 2023 at 3:04 AM Si-Wei Liu wrote: > >> > >> > >> On 2/2/2023 7:28 AM, Eugenio Perez Martin wrote: > >>> On Thu, Feb 2, 2023 at 2:53 AM Si-Wei Liu wrote: > > O

Re: [PATCH 01/14] target/arm: Normalize aarch64 gdbstub get/set function names

2023-02-14 Thread Fabiano Rosas
Richard Henderson writes: > Make the form of the function names between fp and sve the same: > - arm_gdb_*_svereg -> aarch64_gdb_*_sve_reg. > - aarch64_fpu_gdb_*_reg -> aarch64_gdb_*_fpu_reg. > > Signed-off-by: Richard Henderson Reviewed-by: Fabiano Rosas

Re: [PATCH 02/14] target/arm: Unexport arm_gen_dynamic_sysreg_xml

2023-02-14 Thread Fabiano Rosas
Richard Henderson writes: > This function is not used outside gdbstub.c. > > Signed-off-by: Richard Henderson Reviewed-by: Fabiano Rosas

Re: [PATCH v2 01/13] vdpa net: move iova tree creation from init to start

2023-02-14 Thread Eugenio Perez Martin
On Tue, Feb 14, 2023 at 2:45 AM Si-Wei Liu wrote: > > > > On 2/13/2023 3:14 AM, Eugenio Perez Martin wrote: > > On Mon, Feb 13, 2023 at 7:51 AM Si-Wei Liu wrote: > >> > >> > >> On 2/8/2023 1:42 AM, Eugenio Pérez wrote: > >>> Only create iova_tree if and when it is needed. > >>> > >>> The cleanup

Re: [PATCH 03/14] target/arm: Move arm_gen_dynamic_svereg_xml to gdbstub64.c

2023-02-14 Thread Fabiano Rosas
Richard Henderson writes: > The function is only used for aarch64, so move it to the > file that has the other aarch64 gdbstub stuff. Move the > declaration to internals.h. > > Signed-off-by: Richard Henderson Reviewed-by: Fabiano Rosas

Re: [PATCH 00/10] Retire Fork-Based Fuzzing

2023-02-14 Thread Thomas Huth
On 14/02/2023 17.08, Philippe Mathieu-Daudé wrote: On 14/2/23 16:38, Stefan Hajnoczi wrote: On Sat, Feb 04, 2023 at 11:29:41PM -0500, Alexander Bulekov wrote: Hello, This series removes fork-based fuzzing. How does fork-based fuzzing work?   * A single parent process initializes QEMU   * We ide

Re: [PATCH 00/10] Retire Fork-Based Fuzzing

2023-02-14 Thread Alexander Bulekov
On 230214 2009, Thomas Huth wrote: > On 14/02/2023 17.08, Philippe Mathieu-Daudé wrote: > > On 14/2/23 16:38, Stefan Hajnoczi wrote: > > > On Sat, Feb 04, 2023 at 11:29:41PM -0500, Alexander Bulekov wrote: > > > > Hello, > > > > This series removes fork-based fuzzing. > > > > How does fork-based fu

[PATCH v2 04/11] target/riscv: remove RISCV_FEATURE_MISA

2023-02-14 Thread Daniel Henrique Barboza
This enum is no longer used after write_misa() started reading the value from cpu->cfg.misa_w. Reviewed-by: Weiwei Li Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index fe572b83e9..00a464

[PATCH v2 00/11] enable write_misa() and RISCV_FEATURE_* cleanups

2023-02-14 Thread Daniel Henrique Barboza
Hi, This new version contains suggestions made by Weiwei Li in v1. Most notable change is patch 4 from v1, moving up to patch 2 now, to allow the riscv_cpu_cfg() helper to be used in the MISA CSR patch. Changes in v2: - former patch 4 moved to patch 2 - patch 3 (former 2): - use riscv_cpu_cfg

[PATCH v2 07/11] target/riscv: remove RISCV_FEATURE_EPMP

2023-02-14 Thread Daniel Henrique Barboza
RISCV_FEATURE_EPMP is always set to the same value as the cpu->cfg.epmp flag. Use the flag directly. Reviewed-by: Weiwei Li Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 10 +++--- target/riscv/cpu.h | 1 - target/riscv/csr.c | 2 +- target/riscv/pmp.c | 4 ++-- 4 files

[PATCH v2 01/11] target/riscv: do not mask unsupported QEMU extensions in write_misa()

2023-02-14 Thread Daniel Henrique Barboza
The masking done using env->misa_ext_mask already filters any extension that QEMU doesn't support. If the hart supports the extension then QEMU supports it as well. If the masking done by env->misa_ext_mask is somehow letting unsupported QEMU extensions pass by, misa_ext_mask itself needs to be fi

[PATCH v2 08/11] target/riscv: remove RISCV_FEATURE_PMP

2023-02-14 Thread Daniel Henrique Barboza
RISCV_FEATURE_PMP is being set via riscv_set_feature() by mirroring the cpu->cfg.pmp flag. Use the flag instead. Reviewed-by: Weiwei Li Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c| 4 target/riscv/cpu.h| 1 - target/riscv/cpu_helper.c | 2 +- target/riscv/

[PATCH v2 06/11] target/riscv/cpu.c: error out if EPMP is enabled without PMP

2023-02-14 Thread Daniel Henrique Barboza
Instead of silently ignoring the EPMP setting if there is no PMP available, error out informing the user that EPMP depends on PMP support: $ ./qemu-system-riscv64 -cpu rv64,pmp=false,x-epmp=true qemu-system-riscv64: Invalid configuration: EPMP requires PMP support This will force users to pick sa

[PATCH v2 09/11] hw/riscv/virt.c: do not use RISCV_FEATURE_MMU in create_fdt_socket_cpus()

2023-02-14 Thread Daniel Henrique Barboza
Read cpu_ptr->cfg.mmu directly. As a bonus, use cpu_ptr in riscv_isa_string(). Reviewed-by: Weiwei Li Signed-off-by: Daniel Henrique Barboza --- hw/riscv/virt.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 86c4adc0c9..49f2c15

Re: [PATCH v4] qapi/qmp: Add timestamps to qmp command responses

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 01.11.22 18:37, Denis Plotnikov wrote: Add "start" & "end" time values to QMP command responses. These time values are added to let the qemu management layer get the exact command execution time without any other time variance which might be brought by other parts of management layer or qemu

[PATCH v2 05/11] target/riscv: remove RISCV_FEATURE_DEBUG

2023-02-14 Thread Daniel Henrique Barboza
RISCV_FEATURE_DEBUG will always follow the value defined by cpu->cfg.debug flag. Read the flag instead. Reviewed-by: Weiwei Li Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c| 6 +- target/riscv/cpu.h| 1 - target/riscv/cpu_helper.c | 2 +- target/riscv/csr.c

[PATCH v2 10/11] target/riscv: remove RISCV_FEATURE_MMU

2023-02-14 Thread Daniel Henrique Barboza
RISCV_FEATURE_MMU is set whether cpu->cfg.mmu is set, so let's just use the flag directly instead. With this change the enum is also removed. It is worth noticing that this enum, and all the RISCV_FEATURES_* that were contained in it, predates the existence of the cpu->cfg object. Today, using cpu

[PATCH v2 11/11] target/riscv/cpu: remove CPUArchState::features and friends

2023-02-14 Thread Daniel Henrique Barboza
The attribute is no longer used since we can retrieve all the enabled features in the hart by using cpu->cfg instead. Remove env->feature, riscv_feature() and riscv_set_feature(). We also need to bump vmstate_riscv_cpu version_id and minimal_version_id since 'features' is no longer being migrated.

[PATCH v2 03/11] target/riscv: allow users to actually write the MISA CSR

2023-02-14 Thread Daniel Henrique Barboza
At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code from write_misa(), all the nuts and bolts that handles how to properly write this CSR, has always been a no-op as well because write_misa() will always exit earlier. This seems to

[PATCH v2 02/11] target/riscv: introduce riscv_cpu_cfg()

2023-02-14 Thread Daniel Henrique Barboza
We're going to do changes that requires accessing the RISCVCPUConfig struct from the RISCVCPU, having access only to a CPURISCVState 'env' pointer. Add a helper to make the code easier to read. Reviewed-by: Weiwei Li Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.h | 5 + 1 fil

Re: [PATCH v4 01/16] pci/shpc: set attention led to OFF on reset

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: 0 is not a valid state for the led. Let's start with OFF. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index fca7f6691a..1b3f619dc9 1006

Re: [PATCH v4 02/16] pci/shpc: change shpc_get_status() return type to uint8_t

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: The result of the function is always one byte. The result is always assigned to uint8_t variable. Also, shpc_get_status() should be symmetric to shpc_set_status() which has uint8_t value argument. Signed-off-by: Vladimir Sementsov-Ogievski

Re: [PATCH v4 03/16] pci/shpc: shpc_slot_command(): handle PWRONLY -> ENABLED transition

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: ENABLED -> PWRONLY transition is not allowed and we handle it by shpc_invalid_command(). But PWRONLY -> ENABLED transition is silently ignored, which seems wrong. Let's handle it as correct. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH v4 04/16] pci/shpc: more generic handle hot-unplug in shpc_slot_command()

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: Free slot if both conditions (power-led = OFF and state = DISABLED) becomes true regardless of the sequence. It is similar to how PCIe hotplug works. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 52 +++

Re: [PATCH 04/14] target/arm: Split out output_vector_union_type

2023-02-14 Thread Fabiano Rosas
Richard Henderson writes: > Create a subroutine for creating the union of unions > of the various type sizes that a vector may contain. > > Signed-off-by: Richard Henderson Reviewed-by: Fabiano Rosas

Re: [PATCH v4 05/16] pci/shpc: pass PCIDevice pointer to shpc_slot_command()

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: We'll need it in further patch to report bridge in QAPI event. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/pci/shpc.c b/hw/pci

Re: [PATCH v4 06/16] pci/shpc: refactor shpc_device_plug_common()

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: Rename it to shpc_device_get_slot(), to mention what it does rather than how it is used. It also helps to reuse it in further commit. Also, add a return value and get rid of local_err. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw

Re: [PATCH v4 07/16] pcie: pcie_cap_slot_write_config(): use correct macro

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: PCI_EXP_SLTCTL_PIC_OFF is a value, and PCI_EXP_SLTCTL_PIC is a mask. Happily PCI_EXP_SLTCTL_PIC_OFF is a maximum value for this mask and is equal to the mask itself. Still the code looks like a bug. Let's make it more reader-friendly. Sign

Re: [PATCH v4 08/16] pcie_regs: drop duplicated indicator value macros

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: We already have indicator values in include/standard-headers/linux/pci_regs.h , no reason to reinvent them in include/hw/pci/pcie_regs.h. (and we already have usage of PCI_EXP_SLTCTL_PWR_IND_BLINK and PCI_EXP_SLTCTL_PWR_IND_OFF in hw/pci/pc

Re: [PATCH v4 09/16] pcie: drop unused PCIExpressIndicator

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: The structure type is unused. Also, it's the only user of corresponding macros, so drop them too. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Anton Kuchin --- include/hw/pci/pcie.h

Re: [PATCH v4 10/16] pcie: pcie_cap_slot_enable_power() use correct helper

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: *_by_mask() helpers shouldn't be used here (and that's the only one). *_by_mask() helpers do shift their value argument, but in pcie.c code we use values that are already shifted appropriately. Happily, PCI_EXP_SLTCTL_PWR_ON is zero, so shi

Re: [PATCH v4 11/16] pcie: introduce pcie_sltctl_powered_off() helper

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: In pcie_cap_slot_write_config() we check for PCI_EXP_SLTCTL_PWR_OFF in a bad form. We should distinguish PCI_EXP_SLTCTL_PWR which is a "mask" and PCI_EXP_SLTCTL_PWR_OFF which is value for that mask. Better code is in pcie_cap_slot_unplug_r

Re: [PATCH v4 12/16] pcie: set power indicator to off on reset by default

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:00, Vladimir Sementsov-Ogievskiy wrote: It should be zero, the only valid values are ON, OFF and BLINK. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/pcie.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.

Re: [PATCH 05/14] target/arm: Simplify register counting in arm_gen_dynamic_svereg_xml

2023-02-14 Thread Fabiano Rosas
Richard Henderson writes: > Rather than increment base_reg and num, compute num > from the change to base_reg at the end. Clean up some > nearby comments. > > Signed-off-by: Richard Henderson > --- > target/arm/gdbstub64.c | 26 -- > 1 file changed, 16 insertions(+), 10

Re: [PATCH v4 13/16] pci: introduce pci_find_the_only_child()

2023-02-14 Thread Anton Kuchin
On 13/02/2023 16:01, Vladimir Sementsov-Ogievskiy wrote: To be used in further patch to identify the device hot-plugged into pcie-root-port. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- include/hw/pci/pci.h | 1 + hw/pci/pci.c | 33 +++

Re: [PATCH 06/14] target/arm: Hoist pred_width in arm_gen_dynamic_svereg_xml

2023-02-14 Thread Fabiano Rosas
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > target/arm/gdbstub64.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c > index 8d174ff6e0..02a0256c5c 100644 > --- a/target/arm/gdbstub64.c > +++ b/

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-02-14 Thread Vladimir Sementsov-Ogievskiy
On 13.01.23 14:29, Kevin Wolf wrote: Another thing that could be tried is making failure in .bdrv_close less likely by doing things earlier. At least ENOSPC could probably be avoided if dirty bitmaps clusters were allocated during the write request that first sets a bit in them (I know too little

Re: [PATCH] ebpf: fix compatibility with libbpf 1.0+

2023-02-14 Thread Andrew Melnichenko
Hi, all. In the future, there would be eBPF RSS + the helper for Libvirt interaction. And those patches are required for future work. Technically they are required for the current builds with linked libbpf 1.01. Can we apply this patch? On Wed, Dec 28, 2022 at 6:19 PM Andrew Melnichenko wrote: >

Re: [PATCH v2 04/12] bsd-user: various helper routines for sysctl

2023-02-14 Thread Richard Henderson
On 2/13/23 14:27, Warner Losh wrote: +#ifdef TARGET_ABI32 +/* + * Limit the amount of available memory to be most of the 32-bit address + * space. 0x100c000 was arrived at through trial and error as a good + * definition of 'most'. + */ +static const abi_ulong target_max_mem = UINT32_MAX - 0x100c

Re: [PATCH v2 05/12] bsd-user: Helper routines oidfmt

2023-02-14 Thread Richard Henderson
On 2/13/23 14:27, Warner Losh wrote: From: Stacey Son oidfmt uses undocumented system call to get the type of the sysctl. Co-Authored-by: Sean Bruno Signed-off-by: Sean Bruno Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by: Raphael Kubo da Costa Signed-off-by: Raphael Ku

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-14 Thread Paolo Bonzini
Il mar 14 feb 2023, 18:26 Kevin Wolf ha scritto: > Am 14.02.2023 um 15:03 hat Paolo Bonzini geschrieben: > > In the case of Python the issue is not the interpreter per se, though > > there are a couple new feature in Python 3.7 that are quite nice (for > > example improved data classes[1] or cont

Re: [PATCH 00/10] Retire Fork-Based Fuzzing

2023-02-14 Thread Thomas Huth
On 14/02/2023 20.14, Alexander Bulekov wrote: On 230214 2009, Thomas Huth wrote: On 14/02/2023 17.08, Philippe Mathieu-Daudé wrote: On 14/2/23 16:38, Stefan Hajnoczi wrote: On Sat, Feb 04, 2023 at 11:29:41PM -0500, Alexander Bulekov wrote: Hello, This series removes fork-based fuzzing. How do

Re: [PATCH v2 06/12] bsd-user: Helper routines h2t_old_sysctl

2023-02-14 Thread Richard Henderson
On 2/13/23 14:27, Warner Losh wrote: +/* + * Convert the old value from host to target. host vs guest is clearer language; "target" gets overloaded, even though still present in the code base. + * + * For LONG and ULONG on ABI32, we need to 'down convert' the 8 byte quantities + * to 4 byte

Re: [PATCH v2 07/12] bsd-user: sysctl helper funtions: sysctl_name2oid and sysctl_oidfmt

2023-02-14 Thread Richard Henderson
On 2/13/23 14:27, Warner Losh wrote: From: Juergen Lock Helper functions for sysctl implementations. sysctl_name2oid and sysctl_oidfmt convert oids between host and targets Signed-off-by: Juergen Lock Reviewed-by: Warner Losh Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 18 +

Re: [PATCH v2 08/12] bsd-user: common routine do_freebsd_sysctl_oid for all sysctl variants

2023-02-14 Thread Richard Henderson
On 2/13/23 14:27, Warner Losh wrote: From: Juergen Lock do_freebsd_sysctl_oid filters out some of the binary and special sysctls where host != target. None of the sysctls that have to be translated from host to target are handled here. Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son S

Re: [PATCH 05/18] vfio/common: Add VFIOBitmap and (de)alloc functions

2023-02-14 Thread Alex Williamson
On Sun, 12 Feb 2023 17:36:49 +0200 Avihai Horon wrote: > On 27/01/2023 23:11, Alex Williamson wrote: > > External email: Use caution opening links or attachments > > > > > > On Thu, 26 Jan 2023 20:49:35 +0200 > > Avihai Horon wrote: > > > >> There are already two places where dirty page bitmap

Re: [PATCH v2 04/12] bsd-user: various helper routines for sysctl

2023-02-14 Thread Warner Losh
On Tue, Feb 14, 2023 at 1:52 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/13/23 14:27, Warner Losh wrote: > > +#ifdef TARGET_ABI32 > > +/* > > + * Limit the amount of available memory to be most of the 32-bit address > > + * space. 0x100c000 was arrived at through trial and e

Re: [PATCH v2 09/12] bsd-user: Start translation of arch-specific sysctls

2023-02-14 Thread Richard Henderson
On 2/13/23 14:27, Warner Losh wrote: +case HW_NCPU: +if (oldlen) { +(*(int32_t *)holdp) = tswap32(bsd_get_ncpu()); +} +holdlen = sizeof(int32_t); +ret = 0; +goto out; Anything using SYSCTL_INT should use abi_int

Re: [PATCH v2 04/12] bsd-user: various helper routines for sysctl

2023-02-14 Thread Richard Henderson
On 2/14/23 11:31, Warner Losh wrote: Right now they aren't used at all for ABI64...  But that's in later patches...  We only do special things for  LONG or ULONG on ABI32... Otherwise, the normal paths wouldn't call these at all. Yes, I've just seen patch 9, and agree they aren't needed for a

<    1   2   3   4   5   >