hw/nvme: why schedule sq timer when cq is full?

2022-06-24 Thread Jinhao Fan
Hi Keith, I just came across this piece of code in nvme_process_db() that I found weird: start_sqs = nvme_cq_full(cq) ? 1 : 0; ... if (start_sqs) { NvmeSQueue *sq; QTAILQ_FOREACH(sq, >sq_list, entry) { timer_mod(sq->timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 500); }

[PATCH v2 09/11] bsd-user: Implement pathconf, lpathconf and fpathconf

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 32 bsd-user/freebsd/os-syscall.c | 12 2 files changed, 44 insertions(+) diff --git a/bsd-user/bsd-file.h

[PATCH v2 11/11] bsd-user: Remove stray 'inline' from do_bsd_close

2022-06-24 Thread Warner Losh
In the last series, I inadvertantly didn't remove this inline, but did all the others. Remove it for consistency. Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index

[PATCH v2 06/11] bsd-user: Implement chflags, lchflags and fchflags

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 32 bsd-user/freebsd/os-syscall.c | 12 2 files changed, 44 insertions(+) diff --git a/bsd-user/bsd-file.h

[PATCH v2 08/11] bsd-user: Implement mkfifo and mkfifoat

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 27 +++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 35 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index

[PATCH v2 10/11] bsd-user: Implement undelete

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 13 + bsd-user/freebsd/os-syscall.c | 4 2 files changed, 17 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index

[PATCH v2 04/11] bsd-user: Implement freebsd11_mknod, freebsd11_mknodat and mknodat

2022-06-24 Thread Warner Losh
These implement both the old-pre INO64 mknod variations, as well as the now current INO64 variant. To implement the old stuff, we use some linker magic to bind to the old versions of these functions. Signed-off-by: Stacey Son Signed-off-by: Michal Meloun Signed-off-by: Warner Losh ---

[PATCH v2 05/11] bsd-user: Implement chown, fchown, lchown and fchownat

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 48 +++ bsd-user/freebsd/os-syscall.c | 16 2 files changed, 64 insertions(+) diff --git a/bsd-user/bsd-file.h

[PATCH v6 15/15] block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_child

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
Now the function can remove any child, so give it more common name. Drop assertions and drop bs argument which becomes unused. Function would be reused in a further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 27 +-- 1 file changed, 9 insertions(+),

[PATCH v2 07/11] bsd-user: Implement chroot and flock

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 19 +++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 27 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index

[PATCH v2 03/11] bsd-user: implement chmod, fchmod, lchmod and fchmodat

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 46 +++ bsd-user/freebsd/os-syscall.c | 16 2 files changed, 62 insertions(+) diff --git a/bsd-user/bsd-file.h

[PATCH v2 02/11] bsd-user: Implement symlink, symlinkat, readlink and readlinkat

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Jung-uk Kim Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 74 +++ bsd-user/freebsd/os-syscall.c | 16 2 files changed, 90 insertions(+) diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h

[PATCH v2 00/11] bsd-user: More file-related system calls

2022-06-24 Thread Warner Losh
A second round of mostly BSD-independent filesystem calls: mount, unmount, nmount, symlink, symlinkat, readlink, readlinkat, chmod, fchmod, lchmod, fchmodat, freebsd11_mknod, freebsd11_monodat, mknodat, chown, fchown, lchown, fchownat, chflags, lchflags, fchflags, chroot, flock, mkfifo, mkfifoat,

[PATCH v6 13/15] block: Manipulate bs->file / bs->backing pointers in .attach/.detach

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
bs->file and bs->backing are a kind of duplication of part of bs->children. But very useful diplication, so let's not drop them at all:) We should manage bs->file and bs->backing in same place, where we manage bs->children, to keep them in sync. Moreover, generic io paths are unprepared to

[PATCH v2 01/11] bsd-user: Implement mount, umount and nmount

2022-06-24 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Jung-uk Kim Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 52 +++ bsd-user/freebsd/os-syscall.c | 13 + 2 files changed, 65 insertions(+) diff --git

[PATCH v6 12/15] Revert "block: Pass BdrvChild ** to replace_child_noperm"

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit be64bbb0149748f3999c49b13976aafb8330ea86. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 23 +++ 1

Re: [PATCH v3 22/51] target/arm: Trap AdvSIMD usage when Streaming SVE is active

2022-06-24 Thread Peter Maydell
On Fri, 24 Jun 2022 at 21:34, Richard Henderson wrote: > > On 6/24/22 08:30, Peter Maydell wrote: > > So the thing that worries me about structuring this this way > > is that the SME supplement appendix includes this caution: > > > > # The instruction encoding tables in this section [...] will >

[PATCH v6 10/15] Revert "block: Let replace_child_tran keep indirect pointer"

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 82b54cf51656bf3cd5ed1ac549e8a1085a0e3290. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 81

Re: [PATCH] aspeed: i2c: Fix DMA len write-enable bit handling

2022-06-24 Thread Cédric Le Goater
On 6/24/22 22:34, Peter Delevoryas wrote: On Jun 24, 2022, at 1:31 PM, Peter Delevoryas wrote: I noticed i2c rx transfers were getting shortened to "1" on Zephyr. It seems to be because the Zephyr i2c driver sets the RX DMA len with the RX field write-enable bit set (bit 31) to avoid a

[PATCH v6 09/15] Revert "block: Let replace_child_noperm free children"

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
We are going to reimplement this behavior (clear bs->file / bs->backing pointers automatically when child->bs is cleared) in a nicer way, see further commit "block: Manipulate bs->file / bs->backing pointers in .attach/.detach". With this revert we bring back a problem that was fixed by

[PATCH v6 06/15] test-bdrv-graph-mod: fix filters to be filters

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
bdrv_pass_through is used as filter, even all node variables has corresponding names. We want to append it, so it should be backing-child-based filter like mirror_top. So, in test_update_perm_tree, first child should be DATA, as we don't want filters with two filtered children.

[PATCH v6 14/15] block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
Now the indirection is not actually used, we can safely reduce it to simple pointer. For consistency do a bit of refactoring to get rid of _ptr suffixes that become meaningless. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/snapshot.c | 38 -- 1 file

[PATCH v6 11/15] Revert "block: Restructure remove_file_or_backing_child()"

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 562bda8bb41879eeda0bd484dd3d55134579b28e. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 21 + 1

[PATCH v6 04/15] test-bdrv-graph-mod: update test_parallel_perm_update test case

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
test_parallel_perm_update() does two things that we are going to restrict in the near future: 1. It updates bs->file field by hand. bs->file will be managed automatically by generic code (together with bs->children list). Let's better refactor our "tricky" bds to have own state where one

[PATCH v6 08/15] block/snapshot: stress that we fallback to primary child

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
Actually what we chose is a primary child. Let's stress it in the code. We are going to drop indirect pointer logic here in future. Actually this commit simplifies the future work: we drop use of indirection in the assertion now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna

[PATCH v6 00/15] block: cleanup backing and file handling

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
Hi all! That's the first part of "[PATCH v5 00/45] Transactional block-graph modifying API", updated and almost reviewed. On commit (15) is added to original scope of "block: cleanup backing and file handling", as it's related. 01: add Hanna's r-b 02: - mention snapshot-access in commit msg

[PATCH v6 07/15] block: document connection between child roles and bs->backing/bs->file

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
Make the informal rules formal. In further commit we'll add corresponding assertions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-common.h | 39 1 file changed, 39 insertions(+) diff --git a/include/block/block-common.h

[PATCH v6 02/15] block: introduce bdrv_open_file_child() helper

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
Almost all drivers call bdrv_open_child() similarly. Let's create a helper for this. The only not updated drivers that call bdrv_open_child() to set bs->file are raw-format and snapshot-access: raw-format sometimes want to have filtered child but don't set drv->is_filter to true.

[PATCH v6 01/15] block: BlockDriver: add .filtered_child_is_backing field

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
Unfortunately not all filters use .file child as filtered child. Two exclusions are mirror_top and commit_top. Happily they both are private filters. Bad thing is that this inconsistency is observable through qmp commands query-block / query-named-block-nodes. So, could we just change mirror_top

[PATCH v6 05/15] tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
We do add COW child to the node. In future we are going to forbid adding COW child to the node that doesn't support backing. So, fix it here now. Don't worry about setting bs->backing itself: in further commit we'll update the block-layer to automatically set/unset this field in generic code.

[PATCH v6 03/15] block/blklogwrites: don't care to remove bs->file child on failure

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
We don't need to remove bs->file, generic layer takes care of it. No other driver cares to remove bs->file on failure by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- block/blklogwrites.c | 4 1 file changed, 4 deletions(-) diff --git

[PATCH] Align Raspberry Pi DMA interrupts with Linux DTS

2022-06-24 Thread Andrey Makarov
All Raspberry Pi models 1-3 (based on bcm2835) have Linux device tree (arch/arm/boot/dts/bcm2835-common.dtsi +25): /* dma channel 11-14 share one irq */ which mismatched the Qemu model. In this patch channels 0--10 and 11--14 are handled separately. Signed-off-by: Andrey Makarov ---

Re: [PATCH v3 22/51] target/arm: Trap AdvSIMD usage when Streaming SVE is active

2022-06-24 Thread Richard Henderson
On 6/24/22 08:30, Peter Maydell wrote: So the thing that worries me about structuring this this way is that the SME supplement appendix includes this caution: # The instruction encoding tables in this section [...] will # require correction if subsequent versions of the A64 ISA # add new

Re: [PULL v2 00/20] Block layer patches

2022-06-24 Thread Richard Henderson
On 6/24/22 08:40, Kevin Wolf wrote: The following changes since commit 3a821c52e1a30ecd9a436f2c67cc66b5628c829f: Merge tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme into staging (2022-06-23 14:52:30 -0700) are available in the Git repository at:

Re: [PATCH] aspeed: i2c: Fix DMA len write-enable bit handling

2022-06-24 Thread Peter Delevoryas
> On Jun 24, 2022, at 1:31 PM, Peter Delevoryas wrote: > > I noticed i2c rx transfers were getting shortened to "1" on Zephyr. It > seems to be because the Zephyr i2c driver sets the RX DMA len with the > RX field write-enable bit set (bit 31) to avoid a read-modify-write. [1] > > /* 0x1C :

[PATCH] aspeed: i2c: Fix DMA len write-enable bit handling

2022-06-24 Thread Peter Delevoryas
I noticed i2c rx transfers were getting shortened to "1" on Zephyr. It seems to be because the Zephyr i2c driver sets the RX DMA len with the RX field write-enable bit set (bit 31) to avoid a read-modify-write. [1] /* 0x1C : I2CM Master DMA Transfer Length Register */ I think we should be

Re: [PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-24 Thread Daniel Henrique Barboza
Alexey, The newer version of this patch is having trouble with Gitlab runners, as you can read in my feedback there. I've tested this one just in case. The same problems happen. E.g. for the cross-armel-system runner: In file included from ../hw/intc/pnv_xive.c:14: ../hw/intc/pnv_xive.c: In

Re: [PATCH v2 3/3] target/ppc: Check page dir/table base alignment

2022-06-24 Thread Leandro Lupori
On 6/24/22 15:04, Richard Henderson wrote: On 6/24/22 10:16, Leandro Lupori wrote: Check if each page dir/table base address is properly aligned and log a guest error if not, as real hardware behave incorrectly in this case. Signed-off-by: Leandro Lupori ---   target/ppc/mmu-radix64.c | 15

[PATCH] python: QEMUMachine: enable qmp accept timeout by default

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
I've spent much time trying to debug hanging pipeline in gitlab. I started from and idea that I have problem in code in my series (which has some timeouts). Finally I found that the problem is that I've used QEMUMachine class directly to avoid qtest, and didn't add necessary arguments. Qemu fails

Re: [PATCH RESEND v2 2/2] target/ppc: Implement ISA 3.00 tlbie[l]

2022-06-24 Thread Richard Henderson
On 6/24/22 12:14, Leandro Lupori wrote: This initial version supports the invalidation of one or all TLB entries. Flush by PID/LPID, or based in process/partition scope is not supported, because it would make using the generic QEMU TLB implementation hard. In these cases, all entries are

[PATCH RESEND v2 2/2] target/ppc: Implement ISA 3.00 tlbie[l]

2022-06-24 Thread Leandro Lupori
This initial version supports the invalidation of one or all TLB entries. Flush by PID/LPID, or based in process/partition scope is not supported, because it would make using the generic QEMU TLB implementation hard. In these cases, all entries are flushed. Signed-off-by: Leandro Lupori ---

[PATCH RESEND v2 1/2] target/ppc: Move tlbie[l] to decode tree

2022-06-24 Thread Leandro Lupori
Also decode RIC, PRS and R operands. Signed-off-by: Leandro Lupori --- target/ppc/cpu_init.c| 4 +- target/ppc/insn32.decode | 8 ++ target/ppc/translate.c | 64 +- target/ppc/translate/storage-ctrl-impl.c.inc | 87

[PATCH RESEND v2 0/2] ppc: Implement ISA 3.00 tlbie[l]

2022-06-24 Thread Leandro Lupori
Resent after rebasing and fixing conflicts with master. Changes from v1: - squashed first 2 commits into 1, because adding PPC_MEM_TLBIE to P9/P10's insns_flags and moving only tlbie (and not tlbiel) to decode tree breaks PowerPC64 instruction decoder initialization. Leandro Lupori (2):

Re: [PATCH v2 3/3] target/ppc: Check page dir/table base alignment

2022-06-24 Thread Fabiano Rosas
Leandro Lupori writes: > Check if each page dir/table base address is properly aligned and > log a guest error if not, as real hardware behave incorrectly in > this case. I think the commit message could be clearer, something like: According to PowerISA 3.1B, Book III 6.7.6 programming note,

Re: [PATCH v2 1/3] ppc: Check partition and process table alignment

2022-06-24 Thread Fabiano Rosas
Leandro Lupori writes: > Check if partition and process tables are properly aligned, in > their size, according to PowerISA 3.1B, Book III 6.7.6 programming > note. Hardware and KVM also raise an exception in these cases. > > Signed-off-by: Leandro Lupori Reviewed-by: Fabiano Rosas

Re: [PATCH v2 2/3] target/ppc: Improve Radix xlate level validation

2022-06-24 Thread Fabiano Rosas
Leandro Lupori writes: > Check if the number and size of Radix levels are valid on > POWER9/POWER10 CPUs, according to the supported Radix Tree > Configurations described in their User Manuals. > > Signed-off-by: Leandro Lupori > --- > target/ppc/mmu-radix64.c | 51

[PATCH v4] hw: m25p80: add tests for write protect (WP# and SRWD bit)

2022-06-24 Thread Iris Chen
Signed-off-by: Iris Chen --- Adding Signed Off By tag -- sorry I missed that ! tests/qtest/aspeed_smc-test.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/tests/qtest/aspeed_smc-test.c b/tests/qtest/aspeed_smc-test.c index ec233315e6..7786addfb8 100644

[RFC PATCH] tests/9p: introduce declarative function calls

2022-06-24 Thread Christian Schoenebeck
There are currently 3 different functions for sending a 9p 'Twalk' request. They are all doing the same thing, just in a slightly different way and with slightly different function arguments. Merge those 3 functions into a single function by using a struct for function call arguments and use

Re: [PATCH v7 01/18] job.c: make job_mutex and job_lock/unlock() public

2022-06-24 Thread Vladimir Sementsov-Ogievskiy
I've already acked this (honestly, because Stefan do), but still, want to clarify: On 6/16/22 16:18, Emanuele Giuseppe Esposito wrote: job mutex will be used to protect the job struct elements and list, replacing AioContext locks. Right now use a shared lock for all jobs, in order to keep

Re: [PATCH v2 3/3] target/ppc: Check page dir/table base alignment

2022-06-24 Thread Richard Henderson
On 6/24/22 10:16, Leandro Lupori wrote: Check if each page dir/table base address is properly aligned and log a guest error if not, as real hardware behave incorrectly in this case. Signed-off-by: Leandro Lupori --- target/ppc/mmu-radix64.c | 15 +++ 1 file changed, 15

Re: [PATCH v11 2/2] qtest/cxl: Add aarch64 virt test for CXL

2022-06-24 Thread Jonathan Cameron via
On Fri, 24 Jun 2022 17:12:25 +0100 Peter Maydell wrote: > On Thu, 16 Jun 2022 at 15:20, Jonathan Cameron > wrote: > > > > Add a single complex case for aarch64 virt machine. > > > > Signed-off-by: Jonathan Cameron > > --- > > tests/qtest/cxl-test.c | 48

Re: [PULL 0/3] Linux user for 7.1 patches

2022-06-24 Thread Richard Henderson
) linux-user pull request 20220624 Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate. r~ Helge Deller (1): linux-user: Adjust child_tidptr on set_tid_address

[PATCH v9 4/4] module: Use bundle mechanism

2022-06-24 Thread Akihiko Odaki
Before this change, the directory of the executable was being added to resolve modules in the build tree. However, get_relocated_path() can now resolve them with the new bundle mechanism. Signed-off-by: Akihiko Odaki --- util/module.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH 2/2] target/arm: Check V7VE as well as LPAE in arm_pamax

2022-06-24 Thread Richard Henderson
On 6/24/22 09:27, Peter Maydell wrote: +/* + * In machvirt_init, we call arm_pamax on a cpu that is not fully + * initialized, so we can't rely on the propagation done in realize. + */ +if (arm_feature(>env, ARM_FEATURE_LPAE) || +arm_feature(>env, ARM_FEATURE_V7VE)) {

[PATCH v9 2/4] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files in the installation tree. The build tree will have a new directory, qemu-bundle, to

[PATCH v9 3/4] datadir: Use bundle mechanism

2022-06-24 Thread Akihiko Odaki
softmmu/datadir.c had its own implementation to find files in the build tree, but now bundle mechanism provides the unified implementation which works for datadir and the other files. Signed-off-by: Akihiko Odaki --- .travis.yml | 2 +- pc-bios/keymaps/meson.build | 21

[PATCH v9 1/4] tests/vm: do not specify -bios option

2022-06-24 Thread Akihiko Odaki
From: Paolo Bonzini When running from the build tree, the executable is able to find the BIOS on its own; when running from the source tree, a firmware blob should already be installed and there is no guarantee that the one in the source tree works with the QEMU that is being used for the

[PATCH v9 0/4] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files located relative to the installation tree. The build tree must have a new directory,

Re: [PATCH v7 10/18] jobs: rename static functions called with job_mutex held

2022-06-24 Thread Emanuele Giuseppe Esposito
Am 24/06/2022 um 17:28 schrieb Paolo Bonzini: > On 6/24/22 16:29, Kevin Wolf wrote: >> Yes, I think Vladimir is having the same difficulties with reading the >> series as I had. And I believe his suggestion would make the >> intermediate states less impossible to review. The question is how

[PATCH v2 3/3] target/ppc: Check page dir/table base alignment

2022-06-24 Thread Leandro Lupori
Check if each page dir/table base address is properly aligned and log a guest error if not, as real hardware behave incorrectly in this case. Signed-off-by: Leandro Lupori --- target/ppc/mmu-radix64.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/target/ppc/mmu-radix64.c

[PATCH v2 2/3] target/ppc: Improve Radix xlate level validation

2022-06-24 Thread Leandro Lupori
Check if the number and size of Radix levels are valid on POWER9/POWER10 CPUs, according to the supported Radix Tree Configurations described in their User Manuals. Signed-off-by: Leandro Lupori --- target/ppc/mmu-radix64.c | 51 +++- 1 file changed, 40

[PATCH v2 1/3] ppc: Check partition and process table alignment

2022-06-24 Thread Leandro Lupori
Check if partition and process tables are properly aligned, in their size, according to PowerISA 3.1B, Book III 6.7.6 programming note. Hardware and KVM also raise an exception in these cases. Signed-off-by: Leandro Lupori --- hw/ppc/spapr.c | 5 + hw/ppc/spapr_hcall.c |

[PATCH v2 0/3] ppc: Check for bad Radix configs

2022-06-24 Thread Leandro Lupori
Changes from v1: - Use proper format defines in logs - Optimized ppc_radix64_is_valid_level() and added a comment with instructions on how to proceed when adding new Radix CPUs with different configurations - Moved calls to ppc_radix64_is_valid_level() outside of ppc_radix64_next_level().

Re: [PATCH 12/14] aspeed: Make aspeed_board_init_flashes public

2022-06-24 Thread Cédric Le Goater
On 6/23/22 20:43, Peter Delevoryas wrote: On Jun 23, 2022, at 8:09 AM, Cédric Le Goater wrote: On 6/23/22 12:26, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Let's start simple without flash support. We should be able to load FW blobs in each CPU address space using loader

Re: [PATCH 0/2] target/arm: Fix issue 1078

2022-06-24 Thread Peter Maydell
On Sun, 19 Jun 2022 at 01:16, Richard Henderson wrote: > > Nicely summarized by the reporter, but I thought it would be > nicer to pull all of the logic into arm_pamax, rather than > leave it separated. Applied to target-arm.next, thanks. I think the hang He Zhe reports as still present is an

Re: [PATCH v6 0/7] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
On 2022/06/16 18:18, Paolo Bonzini wrote: +def destdir_join(d1: str, d2: str) -> str: +    if not d1: +    return d2 +    if not os.path.isabs(d2): +    return os.path.join(d1, d2) + +    # c:\destdir + c:\prefix must produce c:\destdir\prefix +    if len(d2) > 1 and d2[1] == ':': +  

Re: [PATCH 2/2] target/arm: Check V7VE as well as LPAE in arm_pamax

2022-06-24 Thread Peter Maydell
On Sun, 19 Jun 2022 at 01:18, Richard Henderson wrote: > > In machvirt_init we create a cpu but do not fully initialize it. > Thus the propagation of V7VE to LPAE has not been done, and we > compute the wrong value for some v7 cpus, e.g. cortex-a15. > > Resolves:

Re: [PATCH 1/2] target/arm: Extend arm_pamax to more than aarch64

2022-06-24 Thread Peter Maydell
On Sun, 19 Jun 2022 at 01:16, Richard Henderson wrote: > > Move the code from hw/arm/virt.c that is supposed > to handle v7 into the one function. > > Signed-off-by: Richard Henderson > --- > hw/arm/virt.c| 10 +- > target/arm/ptw.c | 24 Reviewed-by: Peter

Re: [PATCH v11 2/2] qtest/cxl: Add aarch64 virt test for CXL

2022-06-24 Thread Peter Maydell
On Thu, 16 Jun 2022 at 15:20, Jonathan Cameron wrote: > > Add a single complex case for aarch64 virt machine. > > Signed-off-by: Jonathan Cameron > --- > tests/qtest/cxl-test.c | 48 + > tests/qtest/meson.build | 1 + > 2 files changed, 40

Re: [PATCH] meson: Prefix each element of firmware path

2022-06-24 Thread Paolo Bonzini
Queued, thanks! Paolo On 6/24/22 17:40, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- configure | 23 +++ meson.build | 10 -- meson_options.txt | 2 +- scripts/meson-buildoptions.py | 7 +--

Re: [PATCH v3 2/2] docs/system/devices/canokey: Document limitations on usb-ehci

2022-06-24 Thread Hongren Zheng
On Fri, Jun 24, 2022 at 11:29:40PM +0800, MkfsSion wrote: > > -Another limitation is that this device is not compatible with ``qemu-xhci``, > -in that this device would hang when there are FIDO2 packets (traffic on > -interrupt endpoints). If you do not use FIDO2 then it works as intended, >

[PULL v2 20/20] vduse-blk: Add name option

2022-06-24 Thread Kevin Wolf
From: Xie Yongji Currently we use 'id' option as the name of VDUSE device. It's a bit confusing since we use one value for two different purposes: the ID to identfy the export within QEMU (must be distinct from any other exports in the same QEMU process, but can overlap with names used by other

[PULL v2 18/20] nbd: Drop dead code spotted by Coverity

2022-06-24 Thread Kevin Wolf
From: Eric Blake CID 1488362 points out that the second 'rc >= 0' check is now dead code. Reported-by: Peter Maydell Fixes: 172f5f1a40(nbd: remove peppering of nbd_client_connected) Signed-off-by: Eric Blake Message-Id: <20220516210519.76135-1-ebl...@redhat.com> Reviewed-by: Peter Maydell

Re: [RFC v2] Adding block layer APIs resembling Linux ZoneBlockDevice ioctls.

2022-06-24 Thread Sam Li
Stefan Hajnoczi 于2022年6月24日周五 23:50写道: > > On Fri, Jun 24, 2022 at 11:14:32AM +0800, Sam Li wrote: > > Hi Stefan, > > > > Stefan Hajnoczi 于2022年6月20日周一 15:55写道: > > > > > > On Mon, Jun 20, 2022 at 11:36:11AM +0800, Sam Li wrote: > > > > > > Hi Sam, > > > Is this version 2 of "[RFC v1] Add

[PATCH] artist: set memory region owners for buffers to the artist device

2022-06-24 Thread Mark Cave-Ayland
This fixes the output of "info qom-tree" so that the buffers appear as children of the artist device, rather than underneath the "unattached" container. Signed-off-by: Mark Cave-Ayland --- hw/display/artist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL v2 10/20] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-06-24 Thread Kevin Wolf
From: Xie Yongji VDUSE [1] is a linux framework that makes it possible to implement software-emulated vDPA devices in userspace. This adds a library as a subproject to help implementing VDUSE backends in QEMU. [1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html Signed-off-by:

[PULL v2 16/20] block/gluster: correctly set max_pdiscard

2022-06-24 Thread Kevin Wolf
From: Fabian Ebner On 64-bit platforms, assigning SIZE_MAX to the int64_t max_pdiscard results in a negative value, and the following assertion would trigger down the line (it's not the same max_pdiscard, but computed from the other one): qemu-system-x86_64: ../block/io.c:3166: bdrv_co_pdiscard:

Re: [PATCH v11 1/2] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-06-24 Thread Jonathan Cameron via
On Fri, 24 Jun 2022 16:01:42 +0100 Peter Maydell wrote: > On Fri, 24 Jun 2022 at 15:54, Jonathan Cameron > wrote: > > Just occurred to me there is another barrier to an approach that adds > > DT bindings. > > I fairly sure hw/pci-bridge/pci_expander_bridge.c (PXB) > > only works on ACPI

Re: [PULL 00/14] (Mostly) build system changes for 2022-06-24

2022-06-24 Thread Richard Henderson
On 6/24/22 01:27, Paolo Bonzini wrote: The following changes since commit 2b049d2c8dc01de750410f8f1a4eac498c04c723: Merge tag 'pull-aspeed-20220622' of https://github.com/legoater/qemu into staging (2022-06-22 07:27:06 -0700) are available in the Git repository at:

[PULL v2 15/20] block/rbd: report a better error when namespace does not exist

2022-06-24 Thread Kevin Wolf
From: Stefano Garzarella If the namespace does not exist, rbd_create() fails with -ENOENT and QEMU reports a generic "error rbd create: No such file or directory": $ qemu-img create rbd:rbd/namespace/image 1M Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576 qemu-img:

[PULL v2 13/20] libvduse: Add support for reconnecting

2022-06-24 Thread Kevin Wolf
From: Xie Yongji To support reconnecting after restart or crash, VDUSE backend might need to resubmit inflight I/Os. This stores the metadata such as the index of inflight I/O's descriptors to a shm file so that VDUSE backend can restore them during reconnecting. Signed-off-by: Xie Yongji

[PULL v2 07/20] block/export: Fix incorrect length passed to vu_queue_push()

2022-06-24 Thread Kevin Wolf
From: Xie Yongji Now the req->size is set to the correct value only when handling VIRTIO_BLK_T_GET_ID request. This patch fixes it. Signed-off-by: Xie Yongji Message-Id: <20220523084611.91-3-xieyon...@bytedance.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf ---

[PULL v2 14/20] qsd: document vduse-blk exports

2022-06-24 Thread Kevin Wolf
From: Stefan Hajnoczi Document vduse-blk exports in qemu-storage-daemon --help and the qemu-storage-daemon(1) man page. Based-on: <20220523084611.91-1-xieyon...@bytedance.com> Cc: Xie Yongji Signed-off-by: Stefan Hajnoczi Message-Id: <20220525121947.859820-1-stefa...@redhat.com>

Re: [RFC v2] Adding block layer APIs resembling Linux ZoneBlockDevice ioctls.

2022-06-24 Thread Stefan Hajnoczi
On Fri, Jun 24, 2022 at 11:14:32AM +0800, Sam Li wrote: > Hi Stefan, > > Stefan Hajnoczi 于2022年6月20日周一 15:55写道: > > > > On Mon, Jun 20, 2022 at 11:36:11AM +0800, Sam Li wrote: > > > > Hi Sam, > > Is this version 2 of "[RFC v1] Add support for zoned device"? Please > > keep the email subject line

[PULL v2 06/20] block: Support passing NULL ops to blk_set_dev_ops()

2022-06-24 Thread Kevin Wolf
From: Xie Yongji This supports passing NULL ops to blk_set_dev_ops() so that we can remove stale ops in some cases. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi Message-Id: <20220523084611.91-2-xieyon...@bytedance.com> Signed-off-by: Kevin Wolf --- block/block-backend.c | 2 +- 1

[PULL v2 11/20] vduse-blk: Implement vduse-blk export

2022-06-24 Thread Kevin Wolf
From: Xie Yongji This implements a VDUSE block backends based on the libvduse library. We can use it to export the BDSs for both VM and container (host) usage. The new command-line syntax is: $ qemu-storage-daemon \ --blockdev file,node-name=drive0,filename=test.img \ --export

[PULL v2 05/20] block: simplify handling of try to merge different sized bitmaps

2022-06-24 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We have too much logic to simply check that bitmaps are of the same size. Let's just define that hbitmap_merge() and bdrv_dirty_bitmap_merge_internal() require their argument bitmaps be of same size, this simplifies things. Let's look through the callers: For

[PULL v2 19/20] vduse-blk: Add serial option

2022-06-24 Thread Kevin Wolf
From: Xie Yongji Add a 'serial' option to allow user to specify this value explicitly. And the default value is changed to an empty string as what we did in "hw/block/virtio-blk.c". Signed-off-by: Xie Yongji Message-Id: <20220614051532.92-6-xieyon...@bytedance.com> Signed-off-by: Kevin Wolf

[PULL v2 03/20] block: block_dirty_bitmap_merge(): fix error path

2022-06-24 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy At the end we ignore failure of bdrv_merge_dirty_bitmap() and report success. And still set errp. That's wrong. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin Reviewed-by: Kevin Wolf Message-Id:

[PULL v2 09/20] linux-headers: Add vduse.h

2022-06-24 Thread Kevin Wolf
From: Xie Yongji This adds vduse header to linux headers so that the relevant VDUSE API can be used in subsequent patches. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi Message-Id: <20220523084611.91-5-xieyon...@bytedance.com> Signed-off-by: Kevin Wolf ---

[PULL v2 17/20] aio_wait_kick: add missing memory barrier

2022-06-24 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito It seems that aio_wait_kick always required a memory barrier or atomic operation in the caller, but nobody actually took care of doing it. Let's put the barrier in the function instead, and pair it with another one in AIO_WAIT_WHILE. Read aio_wait_kick() comment

[PULL v2 08/20] block/export: Abstract out the logic of virtio-blk I/O process

2022-06-24 Thread Kevin Wolf
From: Xie Yongji Abstract the common logic of virtio-blk I/O process to a function named virtio_blk_process_req(). It's needed for the following commit. Signed-off-by: Xie Yongji Message-Id: <20220523084611.91-4-xieyon...@bytedance.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf

[PULL v2 01/20] block: drop unused bdrv_co_drain() API

2022-06-24 Thread Kevin Wolf
From: Stefan Hajnoczi bdrv_co_drain() has not been used since commit 9a0cec664eef ("mirror: use bdrv_drained_begin/bdrv_drained_end") in 2016. Remove it so there are fewer drain scenarios to worry about. Use bdrv_drained_begin()/bdrv_drained_end() instead. They are "mixed" functions that can be

[PULL v2 00/20] Block layer patches

2022-06-24 Thread Kevin Wolf
The following changes since commit 3a821c52e1a30ecd9a436f2c67cc66b5628c829f: Merge tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme into staging (2022-06-23 14:52:30 -0700) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL v2 12/20] vduse-blk: Add vduse-blk resize support

2022-06-24 Thread Kevin Wolf
From: Xie Yongji To support block resize, this uses vduse_dev_update_config() to update the capacity field in configuration space and inject config interrupt on the block resize callback. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi Message-Id:

[PULL v2 02/20] block: get rid of blk->guest_block_size

2022-06-24 Thread Kevin Wolf
From: Stefan Hajnoczi Commit 1b7fd729559c ("block: rename buffer_alignment to guest_block_size") noted: At this point, the field is set by the device emulation, but completely ignored by the block layer. The last time the value of buffer_alignment/guest_block_size was actually used was

[PULL v2 04/20] block: improve block_dirty_bitmap_merge(): don't allocate extra bitmap

2022-06-24 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We don't need extra bitmap. All we need is to backup the original bitmap when we do first merge. So, drop extra temporary bitmap and work directly with target and backup. Still to keep old semantics, that on failure target is unchanged and user don't need to

[PATCH] meson: Prefix each element of firmware path

2022-06-24 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- configure | 23 +++ meson.build | 10 -- meson_options.txt | 2 +- scripts/meson-buildoptions.py | 7 +-- scripts/meson-buildoptions.sh | 6 +++--- softmmu/datadir.c

Re: [PATCH v3 22/51] target/arm: Trap AdvSIMD usage when Streaming SVE is active

2022-06-24 Thread Peter Maydell
On Mon, 20 Jun 2022 at 19:09, Richard Henderson wrote: > > This new behaviour is in the ARM pseudocode function > AArch64.CheckFPAdvSIMDEnabled, which applies to AArch32 > via AArch32.CheckAdvSIMDOrFPEnabled when the EL to which > the trap would be delivered is in AArch64 mode. > > Given that

Re: [PATCH qemu v2] ppc: Define SETFIELD for the ppc target

2022-06-24 Thread Daniel Henrique Barboza
Alexey, Gitlab does not like what you're doing here. Several cross compile runners fails with errors like these (this is from cross-win64-system): ../hw/intc/pnv_xive.c: In function 'pnv_xive_block_id': 3328/builds/danielhb/qemu/target/ppc/cpu.h:45:33: error: overflow in conversion from 'long

  1   2   3   4   >