Re: [QEMU PATCH v2 4/6] nvdimm: Implement ACPI NVDIMM Label Methods

2022-07-26 Thread Robert Hoo
On Thu, 2022-07-21 at 10:58 +0200, Igor Mammedov wrote: [...] Thanks Igor for review. > > > The patch it is too intrusive and my hunch is that it breaks > > > ABI and needs a bunch of compat knobs to work properly and > > > that I'd like to avoid unless there is not other way around > > > the

Re: [PATCH 07/16] virtio-net: support queue reset

2022-07-26 Thread Jason Wang
On Tue, Jul 26, 2022 at 3:02 PM Kangjie Xu wrote: > > > 在 2022/7/26 11:43, Jason Wang 写道: > > > > 在 2022/7/18 19:17, Kangjie Xu 写道: > >> From: Xuan Zhuo > >> > >> virtio-net implements queue reset. Queued packets in the corresponding > >> queue pair are flushed or purged. > >> > >> Queue reset

Re: [PATCH 14/16] virtio-net: support queue_enable for vhost-user

2022-07-26 Thread Jason Wang
On Tue, Jul 26, 2022 at 2:54 PM Kangjie Xu wrote: > > > 在 2022/7/26 12:25, Jason Wang 写道: > > > > 在 2022/7/18 19:17, Kangjie Xu 写道: > >> Support queue enable in vhost-user scenario. It will be called when > >> a vq reset operation is performed and the vq will be restared. > >> > >> It should be

Re: [PATCH 08/16] vhost: add op to enable or disable a single vring

2022-07-26 Thread Jason Wang
On Tue, Jul 26, 2022 at 2:39 PM Kangjie Xu wrote: > > > 在 2022/7/26 11:49, Jason Wang 写道: > > > > 在 2022/7/18 19:17, Kangjie Xu 写道: > >> The interface to set enable status for a single vring is lacked in > >> VhostOps, since the vhost_set_vring_enable_op will manipulate all > >> virtqueues in a

Re: [PATCH 16/16] vhost-net: vq reset feature bit support

2022-07-26 Thread Jason Wang
On Tue, Jul 26, 2022 at 2:24 PM Kangjie Xu wrote: > > > 在 2022/7/26 12:28, Jason Wang 写道: > > > > 在 2022/7/18 19:17, Kangjie Xu 写道: > >> Add support for negotation of vq reset feature bit. > >> > >> Signed-off-by: Kangjie Xu > >> Signed-off-by: Xuan Zhuo > > > > > > I'd suggest to add support

Re: [PATCH 09/16] vhost-user: enable/disable a single vring

2022-07-26 Thread Jason Wang
On Tue, Jul 26, 2022 at 1:27 PM Kangjie Xu wrote: > > > 在 2022/7/26 12:07, Jason Wang 写道: > > > > 在 2022/7/18 19:17, Kangjie Xu 写道: > >> Implement the vhost_set_single_vring_enable, which is to enable or > >> disable a single vring. > >> > >> The parameter wait_for_reply is added to help for some

Re: [PATCH] target/riscv: Ensure opcode is saved for every instruction

2022-07-26 Thread Anup Patel
On Wed, Jul 27, 2022 at 9:24 AM Richard Henderson wrote: > > On 7/26/22 20:25, Anup Patel wrote: > > We should call decode_save_opc() for every decoded instruction > > because generating transformed instruction upon guest page faults > > expects opcode to be available. Without this, hypervisor

Re: [PATCH] target/riscv: Ensure opcode is saved for every instruction

2022-07-26 Thread Richard Henderson
On 7/26/22 20:25, Anup Patel wrote: We should call decode_save_opc() for every decoded instruction because generating transformed instruction upon guest page faults expects opcode to be available. Without this, hypervisor sees transformed instruction as zero in htinst CSR for guest MMIO

[PATCH] target/riscv: Ensure opcode is saved for every instruction

2022-07-26 Thread Anup Patel
We should call decode_save_opc() for every decoded instruction because generating transformed instruction upon guest page faults expects opcode to be available. Without this, hypervisor sees transformed instruction as zero in htinst CSR for guest MMIO emulation which makes MMIO emulation in

Re: [PATCH] hw/microblaze: pass random seed to fdt

2022-07-26 Thread Richard Henderson
On 7/26/22 18:49, Jason A. Donenfeld wrote: Hi Edgar, On Thu, Jul 21, 2022 at 8:43 PM Edgar E. Iglesias wrote: Ah OK, Paolo, it would be great if you would take this via your tree! It looks like Paolo never did this. So you might want to queue this somewhere, or bug him to take it, or

Re: [PATCH] hw/nvme: Add iothread support

2022-07-26 Thread Jinhao Fan
at 2:07 AM, Keith Busch wrote: > MSI-x uses MMIO for masking, so there's no need for an NVMe specific way to > mask these interrupts. You can just use the generic PCIe methods to clear the > vector's enable bit. But no NVMe driver that I know of is making use of these > either, though it should

Re: [PATCH] target/sh4: Honor QEMU_LOG_FILENAME with QEMU_LOG=cpu

2022-07-26 Thread Yoshinori Sato
On Mon, 25 Jul 2022 23:28:54 +0900, Ilya Leoshkevich wrote: > > When using QEMU_LOG=cpu on sh4, QEMU_LOG_FILENAME is partially ignored. > Fix by using qemu_fprintf() instead of qemu_printf() in the respective > places. > > Fixes: 90c84c560067 ("qom/cpu: Simplify how CPUClass:cpu_dump_state()

Re: [PATCH] target/riscv: fix csr check for cycle{h}, instret{h}, time{h}, hpmcounter3~31{h}

2022-07-26 Thread Weiwei Li
在 2022/7/27 上午7:34, Atish Patra 写道: On Wed, Jul 20, 2022 at 9:32 PM Alistair Francis wrote: On Sat, Jul 2, 2022 at 11:42 PM Weiwei Li wrote: - improve the field extract progress This part is already improved with the PMU series.

Re: [PATCH] hw/microblaze: pass random seed to fdt

2022-07-26 Thread Jason A. Donenfeld
Hi Edgar, On Thu, Jul 21, 2022 at 8:43 PM Edgar E. Iglesias wrote: > Ah OK, Paolo, it would be great if you would take this via your tree! It looks like Paolo never did this. So you might want to queue this somewhere, or bug him to take it, or something. I don't know how this works with 7.1-rc0

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-07-26 Thread Jason A. Donenfeld
Hey David, On Wed, Jul 20, 2022 at 08:41:48PM +0200, David Hildenbrand wrote: > I did not review the doc in detail once again, maybe I get to that later > this week. Did you ever get around to merging this patch? Is it in some tree somewhere? Jason

Re: [PATCH] linux-user: Don't assume 0 is not a valid host timer_t value

2022-07-26 Thread Jon Alduan
Hello Peter, I can say so far, your patch solved the issue! Great thanks for that! Regarding the libc version: >From my WSL2 Ubuntu 21.04 x86_64: $ ls -l /lib32/libc* -rwxr-xr-x 1 root root 2042632 Mar 31 2021 /lib32/libc-2.33.so My gcc version 10 does use the same libc version. As already

[PATCH v2 1/1] monitor: Support specified vCPU registers

2022-07-26 Thread zhenwei pi
Originally we have to get all the vCPU registers and parse the specified one. To improve the performance of this usage, allow user specified vCPU id to query registers. Run a VM with 16 vCPU, use bcc tool to track the latency of 'hmp_info_registers': 'info registers -a' uses about 3ms; 'info

[PATCH v2 0/1] monitor: Support specified vCPU registers

2022-07-26 Thread zhenwei pi
v1 -> v2: - Typo fix in commit message. - Suggested by Darren, use '[-a|vcpu]' instead of '[-a] [vcpu]', becase only one of these may be specified at a time. v1: - Support specified vCPU registers for monitor command. Zhenwei Pi (1): monitor: Support specified vCPU registers

Re: [PATCH v1 1/1] migration: add remaining params->has_* = true in migration_instance_init()

2022-07-26 Thread Leonardo Bras Soares Passos
Please include: Fixes: 69ef1f36b0 ("migration: define 'tls-creds' and 'tls-hostname' migration parameters") Fixes: 1d58872a91 ("migration: do not wait for free thread") Fixes: d2f1d29b95 ("migration: add support for a "tls-authz" migration parameter") On Mon, Jul 25, 2022 at 10:02 PM Leonardo

Re: [PATCH] target/riscv: fix csr check for cycle{h}, instret{h}, time{h}, hpmcounter3~31{h}

2022-07-26 Thread Atish Patra
On Wed, Jul 20, 2022 at 9:32 PM Alistair Francis wrote: > > On Sat, Jul 2, 2022 at 11:42 PM Weiwei Li wrote: > > > > - improve the field extract progress This part is already improved with the PMU series. https://www.mail-archive.com/qemu-devel@nongnu.org/msg895143.html > > - add stand-alone

Re: [PATCH 2/2] pci: Sanity check mask argument to pci_set_*_by_mask()

2022-07-26 Thread Richard Henderson
On 7/26/22 09:32, Peter Maydell wrote: Coverity complains that in functions like pci_set_word_by_mask() we might end up shifting by more than 31 bits. This is true, but only if the caller passes in a zero mask. Help Coverity out by asserting that the mask argument is valid. Fixes: CID 1487168

Re: [PATCH 1/2] pci: Remove unused pci_get_*_by_mask() functions

2022-07-26 Thread Richard Henderson
On 7/26/22 09:32, Peter Maydell wrote: The helper functions pci_get_{byte,word,long,quad}_by_mask() were added in 2012 in commit c9f50cea70a1596. In the decade since we have never added a single use of them. The helpers clearly aren't that helpful, so drop them rather than carrying around dead

Re: [PATCH 00/11] QOM'ify PIIX3 southbridge

2022-07-26 Thread BB
Am 26. Juli 2022 16:53:03 MESZ schrieb "Michael S. Tsirkin" : >On Wed, Jul 13, 2022 at 10:17:24AM +0200, Bernhard Beschow wrote: >> Similar to PIIX4 this series QOM'ifies internal device creation for PIIX3. >> This reduces the delta between the implementations of PIIX3 and PIIX4 and >>

Re: [PATCH v10 04/12] target/riscv: pmu: Make number of counters configurable

2022-07-26 Thread Atish Patra
On Tue, Jul 5, 2022 at 1:20 AM Weiwei Li wrote: > > > 在 2022/7/5 下午3:51, Atish Kumar Patra 写道: > > On Mon, Jul 4, 2022 at 5:38 PM Weiwei Li wrote: > >> > >> 在 2022/7/4 下午11:26, Weiwei Li 写道: > >>> 在 2022/6/21 上午7:15, Atish Patra 写道: > The RISC-V privilege specification provides flexibility

Re: [PULL 00/16] pc,virtio: fixes

2022-07-26 Thread Richard Henderson
On 7/26/22 12:40, Michael S. Tsirkin wrote: The following changes since commit d1c912b816844aa045082595eba796b5a025dbc4: Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-07-26 13:29:26 +0100) are available in the Git repository at:

Re: [PATCH v10 11/12] hw/riscv: virt: Add PMU DT node to the device tree

2022-07-26 Thread Atish Patra
On Thu, Jul 14, 2022 at 3:27 AM Heiko Stübner wrote: > > Hi Atish, > > Am Dienstag, 21. Juni 2022, 01:16:01 CEST schrieb Atish Patra: > > Qemu virt machine can support few cache events and cycle/instret counters. > > It also supports counter overflow for these events. > > > > Add a DT node so

Re: [PATCH] Hexagon (tests/tcg/hexagon) add compiler options to EXTRA_CFLAGS

2022-07-26 Thread Philippe Mathieu-Daudé via
Hi Taylor, On 26/7/22 21:17, Taylor Simpson wrote: The cross_cc_cflags_hexagon in configure are not getting passed to the Hexagon cross compiler. Set EXTRA_CFLAGS in tests/tcg/hexagon/Makefile.target. Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson ---

Re: hexagon docker test failure

2022-07-26 Thread Philippe Mathieu-Daudé via
(Cc'ing Paolo for commit cd362defb) On 26/7/22 19:23, Taylor Simpson wrote: -Original Message- From: Richard Henderson Sent: Tuesday, July 26, 2022 10:41 AM To: Taylor Simpson Cc: qemu-devel Subject: hexagon docker test failure Hi Taylor, One of your recent hexagon testsuite

Re: [PATCH 2/2] pci: Sanity check mask argument to pci_set_*_by_mask()

2022-07-26 Thread Philippe Mathieu-Daudé via
On 26/7/22 18:32, Peter Maydell wrote: Coverity complains that in functions like pci_set_word_by_mask() we might end up shifting by more than 31 bits. This is true, but only if the caller passes in a zero mask. Help Coverity out by asserting that the mask argument is valid. Fixes: CID 1487168

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

2022-07-26 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 v7 10/15] Revert "block: Let replace_child_tran keep indirect pointer"

2022-07-26 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 Reviewed-by: Hanna Reitz --- block.c | 81

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

2022-07-26 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 v7 04/15] test-bdrv-graph-mod: update test_parallel_perm_update test case

2022-07-26 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

Re: [PATCH] s390x/cpumodel: add stfl197 processor-activity-instrumentation extension 1

2022-07-26 Thread David Hildenbrand
On 26.07.22 21:48, Christian Borntraeger wrote: > Add stfle 197 (processor-activity-instrumentation extension 1) to the > gen16 default model and fence it off for 7.0 and older. QEMU is already in soft-freeze. I assume you want to get this still into 7.1. (decision not in my hands :) ) Anyhow,

Re: [PATCH v3 for 7.2 00/21] virtio-gpio and various virtio cleanups

2022-07-26 Thread Michael S. Tsirkin
On Tue, Jul 26, 2022 at 08:21:29PM +0100, Alex Bennée wrote: > Hi, > > After much slogging through the vhost-user code I've gotten the > virtio-gpio device working again. The core change in pushing the > responsibility for VHOST_USER_F_PROTOCOL_FEATURES down to the > vhost-user layer (which knows

[PULL 11/16] i386/pc: handle unitialized mr in pc_get_cxl_range_end()

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins Remove pc_get_cxl_range_end() dependency on the CXL memory region, and replace with one that does not require the CXL host_mr to determine the start of CXL start. This in preparation to allow pc_pci_hole64_start() to be called early in pc_memory_init(), handle CXL memory

[PULL 08/16] i386/pc: factor out above-4g end to an helper

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins There's a couple of places that seem to duplicate this calculation of RAM size above the 4G boundary. Move all those to a helper function. Signed-off-by: Joao Martins Reviewed-by: Igor Mammedov Message-Id: <20220719170014.27028-5-joao.m.mart...@oracle.com> Reviewed-by:

[PULL 09/16] i386/pc: factor out cxl range end to helper

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins Move calculation of CXL memory region end to separate helper. This is in preparation to a future change that removes CXL range dependency on the CXL memory region, with the goal of allowing pc_pci_hole64_start() to be called before any memory region are initialized. Cc:

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

2022-07-26 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 Reviewed-by: Hanna Reitz --- block.c | 21

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

2022-07-26 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 Reviewed-by: Hanna Reitz --- block.c | 27 +-- 1 file

[PULL 04/16] hw/cxl: Fix size of constant in interleave granularity function.

2022-07-26 Thread Michael S. Tsirkin
From: Jonathan Cameron Whilst the interleave granularity is always small enough that this isn't a real problem (much less than 4GiB) let's change the constant to ULL to fix the coverity warning. Reported-by: Peter Maydell Fixes: 829de299d1 ("hw/cxl/component: Add utils for interleave parameter

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

2022-07-26 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 Reviewed-by: Hanna Reitz --- block/snapshot.c | 38

[PULL 06/16] i386/pc: create pci-host qdev prior to pc_memory_init()

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins At the start of pc_memory_init() we usually pass a range of 0..UINT64_MAX as pci_memory, when really its 2G (i440fx) or 32G (q35). To get the real user value, we need to get pci-host passed property for default pci_hole64_size. Thus to get that, create the qdev prior to memory

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

2022-07-26 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 v7 12/15] Revert "block: Pass BdrvChild ** to replace_child_noperm"

2022-07-26 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 Reviewed-by: Hanna Reitz --- block.c | 23

[PULL 05/16] hw/i386: add 4g boundary start to X86MachineState

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins Rather than hardcoding the 4G boundary everywhere, introduce a X86MachineState field @above_4g_mem_start and use it accordingly. This is in preparation for relocating ram-above-4g to be dynamically start at 1T on AMD platforms. Signed-off-by: Joao Martins Reviewed-by: Igor

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

2022-07-26 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 v7 03/15] block/blklogwrites: don't care to remove bs->file child on failure

2022-07-26 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 v7 06/15] test-bdrv-graph-mod: fix filters to be filters

2022-07-26 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.

[PULL 03/16] hw/i386/pc: Always place CXL Memory Regions after device_memory

2022-07-26 Thread Michael S. Tsirkin
From: Jonathan Cameron Previously broken_reserved_end was taken into account, but Igor Mammedov identified that this could lead to a clash between potential RAM being mapped in the region and CXL usage. Hence always add the size of the device_memory memory region. This only affects the case

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

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

[PATCH v7 for-7.2 00/15] block: cleanup backing and file handling

2022-07-26 Thread Vladimir Sementsov-Ogievskiy
Hi all! That's the first part of "[PATCH v5 00/45] Transactional block-graph modifying API", updated and is fully reviewed by Hanna. v7: add r-bs and rebase on master Vladimir Sementsov-Ogievskiy (15): block: BlockDriver: add .filtered_child_is_backing field block: introduce

[PULL 01/16] acpi/nvdimm: Define trace events for NVDIMM and substitute nvdimm_debug()

2022-07-26 Thread Michael S. Tsirkin
From: Robert Hoo Signed-off-by: Robert Hoo Reviewed-by: Jingqi Liu Message-Id: <20220704085852.330005-1-robert...@linux.intel.com> Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/mem/nvdimm.h | 8 hw/acpi/nvdimm.c

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

2022-07-26 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 v7 01/15] block: BlockDriver: add .filtered_child_is_backing field

2022-07-26 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] s390x/cpumodel: add stfl197 processor-activity-instrumentation extension 1

2022-07-26 Thread Christian Borntraeger
Add stfle 197 (processor-activity-instrumentation extension 1) to the gen16 default model and fence it off for 7.0 and older. Signed-off-by: Christian Borntraeger --- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/cpu_features_def.h.inc | 1 + target/s390x/gen-features.c | 2 ++

[PATCH v3 12/21] hw/virtio: add vhost-user-gpio-pci boilerplate

2022-07-26 Thread Alex Bennée
From: Viresh Kumar This allows is to instantiate a vhost-user-gpio device as part of a PCI bus. It is mostly boilerplate which looks pretty similar to the vhost-user-fs-pci device. Signed-off-by: Viresh Kumar Reviewed-by: Alex Bennée Message-Id:

[PATCH v3 16/21] tests/qtest: catch unhandled vhost-user messages

2022-07-26 Thread Alex Bennée
We don't need to action every message but lets document the ones we are expecting to consume so future tests don't get confused about unhandled bits. Signed-off-by: Alex Bennée --- v1 - drop g_test_fail() when we get unexpected result, that just hangs --- tests/qtest/vhost-user-test.c | 40

[PULL 15/16] i386/pc: restrict AMD only enforcing of 1Tb hole to new machine type

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins The added enforcing is only relevant in the case of AMD where the range right before the 1TB is restricted and cannot be DMA mapped by the kernel consequently leading to IOMMU INVALID_DEVICE_REQUEST or possibly other kinds of IOMMU events in the AMD IOMMU. Although, there's a

[PULL 12/16] i386/pc: factor out device_memory base/size to helper

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins Move obtaining hole64_start from device_memory memory region base/size into an helper alongside correspondent getters in pc_memory_init() when the hotplug range is unitialized. While doing that remove the memory region based logic from this newly added helper. This is the

[PATCH v3 13/21] tests/qtest: pass stdout/stderr down to subtests

2022-07-26 Thread Alex Bennée
When trying to work out what the virtio-net-tests where doing it was hard because the g_test_trap_subprocess redirects all output to /dev/null. Lift this restriction by using the appropriate flags so you can see something similar to what the vhost-user-blk tests show when running. Signed-off-by:

[PULL 14/16] i386/pc: relocate 4g start to 1T where applicable

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins It is assumed that the whole GPA space is available to be DMA addressable, within a given address space limit, except for a tiny region before the 4G. Since Linux v5.4, VFIO validates whether the selected GPA is indeed valid i.e. not reserved by IOMMU on behalf of some

[PULL 13/16] i386/pc: bounds check phys-bits against max used GPA

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins Calculate max *used* GPA against the CPU maximum possible address and error out if the former surprasses the latter. This ensures max used GPA is reacheable by configured phys-bits. Default phys-bits on Qemu is TCG_PHYS_ADDR_BITS (40) which is enough for the CPU to address 1Tb

[PULL 10/16] i386/pc: factor out cxl range start to helper

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins Factor out the calculation of the base address of the memory region. It will be used later on for the cxl range end counterpart calculation and as well in pc_memory_init() CXL memory region initialization, thus avoiding duplication. Cc: Jonathan Cameron Signed-off-by: Joao

[PATCH v3 20/21] tests/qtest: add a get_features op to vhost-user-test

2022-07-26 Thread Alex Bennée
As we expand this test for more virtio devices we will need to support different feature sets. Add a mandatory op field to fetch the list of features needed for the test itself. Signed-off-by: Alex Bennée --- tests/qtest/vhost-user-test.c | 37 +-- 1 file

[PATCH v3 17/21] tests/qtest: plain g_assert for VHOST_USER_F_PROTOCOL_FEATURES

2022-07-26 Thread Alex Bennée
checkpatch.pl warns that non-plain asserts should be avoided so convert the check to a plain g_assert. Signed-off-by: Alex Bennée --- tests/qtest/vhost-user-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c

[PULL 02/16] hw/machine: Clear out left over CXL related pointer from move of state handling to machines.

2022-07-26 Thread Michael S. Tsirkin
From: Jonathan Cameron This got left behind in the move of the CXL setup code from core files to the machines that support it. Link: https://gitlab.com/qemu-project/qemu/-/commit/1ebf9001fb2701e3c00b401334c8f3900a46adaa Signed-off-by: Jonathan Cameron Message-Id:

[PULL 07/16] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-07-26 Thread Michael S. Tsirkin
From: Joao Martins Use the pre-initialized pci-host qdev and fetch the pci-hole64-size into pc_memory_init() newly added argument. Use PCI_HOST_PROP_PCI_HOLE64_SIZE pci-host property for fetching pci-hole64-size. This is in preparation to determine that host-phys-bits are enough and for

Re: [RFC 1/2] hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map()

2022-07-26 Thread Richard Henderson
On 7/26/22 11:23, Peter Maydell wrote: In dcr_write_dma(), there is code that uses cpu_physical_memory_map() to implement a DMA transfer. That function takes a 'plen' argument, which points to a hwaddr which is used for both input and output: the caller must set it to the size of the range it

[PATCH v3 11/21] hw/virtio: add boilerplate for vhost-user-gpio device

2022-07-26 Thread Alex Bennée
From: Viresh Kumar This creates the QEMU side of the vhost-user-gpio device which connects to the remote daemon. It is based of vhost-user-i2c code. Signed-off-by: Viresh Kumar Reviewed-by: Alex Bennée Message-Id:

[PATCH v3 08/21] hw/virtio: handle un-configured shutdown in virtio-pci

2022-07-26 Thread Alex Bennée
The assert() protecting against leakage is a little aggressive and causes needless crashes if a device is shutdown without having been configured. In this case no descriptors are lost because none have been assigned. Signed-off-by: Alex Bennée --- hw/virtio/virtio-pci.c | 9 +++-- 1 file

[PULL 16/16] hw/virtio/virtio-iommu: Enforce power-of-two notify for both MAP and UNMAP

2022-07-26 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker Currently we only enforce power-of-two mappings (required by the QEMU notifier) for UNMAP requests. A MAP request not aligned on a power-of-two may be successfully handled by VFIO, and then the corresponding UNMAP notify will fail because it will attempt to split that

[PATCH v3 14/21] tests/qtest: add a timeout for subprocess_run_one_test

2022-07-26 Thread Alex Bennée
Hangs have been observed in the tests and currently we don't timeout if a subprocess hangs. Rectify that. Signed-off-by: Alex Bennée --- v3 - expand timeout to 180 at Thomas' suggestion --- tests/qtest/qos-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 06/21] hw/virtio: incorporate backend features in features

2022-07-26 Thread Alex Bennée
There are some extra bits used over a vhost-user connection which are hidden from the device itself. We need to set them here to ensure we enable things like the protocol extensions. Currently net/vhost-user.c has it's own inscrutable way of persisting this data but it really should live in the

[PATCH v3 10/21] hw/virtio: add some vhost-user trace events

2022-07-26 Thread Alex Bennée
These are useful for tracing the lifetime of vhost-user connections. Signed-off-by: Alex Bennée --- hw/virtio/vhost.c | 6 ++ hw/virtio/trace-events | 4 2 files changed, 10 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index f758f177bb..5185c15295 100644 ---

[PULL 00/16] pc,virtio: fixes

2022-07-26 Thread Michael S. Tsirkin
The following changes since commit d1c912b816844aa045082595eba796b5a025dbc4: Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-07-26 13:29:26 +0100) are available in the Git repository at:

[PATCH v3 18/21] tests/qtest: add assert to catch bad features

2022-07-26 Thread Alex Bennée
No device driver (which is what the qvirtio_ access functions represent) should be setting UNUSED(30) in the feature space. Although existing libqos users mask it out lets ensure nothing sneaks through. Signed-off-by: Alex Bennée --- tests/qtest/libqos/virtio.c | 2 ++ 1 file changed, 2

[PATCH v3 19/21] tests/qtest: implement stub for VHOST_USER_GET_CONFIG

2022-07-26 Thread Alex Bennée
We don't implement the full solution because frankly none of the tests need to at the moment. We may end up re-implementing libvhostuser in the end. Signed-off-by: Alex Bennée --- tests/qtest/vhost-user-test.c | 13 + 1 file changed, 13 insertions(+) diff --git

[PATCH v3 05/21] block/vhost-user-blk-server: don't expose VHOST_USER_F_PROTOCOL_FEATURES

2022-07-26 Thread Alex Bennée
This bit is unused in actual VirtIO feature negotiation and should only appear in the vhost-user messages between master and slave. [AJB: experiment, this doesn't break the tests but I'm not super confident of the range of tests] Signed-off-by: Alex Bennée ---

[PATCH v3 21/21] tests/qtest: enable tests for virtio-gpio

2022-07-26 Thread Alex Bennée
We don't have a virtio-gpio implementation in QEMU and only support a vhost-user backend. The QEMU side of the code is minimal so it should be enough to instantiate the device and pass some vhost-user messages over the control socket. To do this we hook into the existing vhost-user-test code and

[PATCH v3 02/21] include/hw: document vhost_dev feature life-cycle

2022-07-26 Thread Alex Bennée
Try and explicitly document the various state of feature bits as related to the vhost_dev structure. Importantly the backend_features can advertise things like VHOST_USER_F_PROTOCOL_FEATURES which is never exposed to the driver and is only present in the vhost-user feature negotiation.

[PATCH v3 07/21] hw/virtio: gracefully handle unset vhost_dev vdev

2022-07-26 Thread Alex Bennée
I've noticed asserts firing because we query the status of vdev after a vhost connection is closed down. Rather than faulting on the NULL indirect just quietly reply false. Signed-off-by: Alex Bennée --- hw/virtio/vhost.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff

[PATCH v3 09/21] hw/virtio: fix vhost_user_read tracepoint

2022-07-26 Thread Alex Bennée
As reads happen in the callback we were never seeing them. We only really care about the header so move the tracepoint to when the header is complete. Fixes: 6ca6d8ee9d (hw/virtio: add vhost_user_[read|write] trace points) Signed-off-by: Alex Bennée --- hw/virtio/vhost-user.c | 4 ++-- 1 file

[PATCH v3 for 7.2 00/21] virtio-gpio and various virtio cleanups

2022-07-26 Thread Alex Bennée
Hi, After much slogging through the vhost-user code I've gotten the virtio-gpio device working again. The core change in pushing the responsibility for VHOST_USER_F_PROTOCOL_FEATURES down to the vhost-user layer (which knows it needs it). We still need to account for that in virtio-gpio because

[PATCH v3 04/21] hw/virtio: log potentially buggy guest drivers

2022-07-26 Thread Alex Bennée
If the guest driver attempts to use the UNUSED(30) bit it is potentially buggy as 6.3 Legacy Interface: Reserved Feature Bits states it "SHOULD NOT be negotiated". For now just log this guest error. Signed-off-by: Alex Bennée --- hw/virtio/virtio.c | 7 +++ 1 file changed, 7 insertions(+)

[PATCH v3 15/21] tests/qtest: use qos_printf instead of g_test_message

2022-07-26 Thread Alex Bennée
The vhost-user tests respawn qos-test as a standalone process. As a result the gtester framework squashes all messages coming out of it which make it hard to debug. As the test does not care about asserting certain messages just convert the tests to use the direct qos_printf. Signed-off-by: Alex

[PATCH v3 03/21] hw/virtio: fix some coding style issues

2022-07-26 Thread Alex Bennée
Signed-off-by: Alex Bennée --- hw/virtio/vhost-user.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 75b8df21a4..55fce18480 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -200,7 +200,7 @@

[PATCH v3 01/21] include/hw/virtio: more comment for VIRTIO_F_BAD_FEATURE

2022-07-26 Thread Alex Bennée
When debugging a new vhost user you may be surprised to see VHOST_USER_F_PROTOCOL getting squashed in the maze of backend_features, acked_features and guest_features. Expand the description here to help the next poor soul trying to work through this. Signed-off-by: Alex Bennée --- v3 -

[PATCH] Hexagon (tests/tcg/hexagon) add compiler options to EXTRA_CFLAGS

2022-07-26 Thread Taylor Simpson
The cross_cc_cflags_hexagon in configure are not getting passed to the Hexagon cross compiler. Set EXTRA_CFLAGS in tests/tcg/hexagon/Makefile.target. Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/Makefile.target | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH 0/2] block/parallels: Fix buffer-based write call

2022-07-26 Thread Vladimir Sementsov-Ogievskiy
On 7/14/22 16:27, Hanna Reitz wrote: Hi, While reviewing Stefan’s libblkio driver series, I’ve noticed that block/parallels.c contains a call to bdrv_co_pwritev() that doesn’t pass a QEMUIOVector object but a plain buffer instead. That seems wrong and also pretty dangerous, so change it to a

Re: [PULL 0/9] target-arm queue

2022-07-26 Thread Richard Henderson
in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220726 for you to fetch changes up to 5865d99fe88d8c8fa437c18c6b63fb2a8165634f: hw/display/bcm2835_fb: Fix framebuffer allocation address (2022-07-26 14:09:44 +0100

Re: [RFC 1/2] hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map()

2022-07-26 Thread Peter Maydell
On Tue, 26 Jul 2022 at 19:23, Peter Maydell wrote: > > In dcr_write_dma(), there is code that uses cpu_physical_memory_map() > to implement a DMA transfer. That function takes a 'plen' argument, > which points to a hwaddr which is used for both input and output: the > caller must set it to the

[RFC 1/2] hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map()

2022-07-26 Thread Peter Maydell
In dcr_write_dma(), there is code that uses cpu_physical_memory_map() to implement a DMA transfer. That function takes a 'plen' argument, which points to a hwaddr which is used for both input and output: the caller must set it to the size of the range it wants to map, and on return it is updated

[RFC 0/2] Fix Coverity and other errors in ppc440_uc DMA

2022-07-26 Thread Peter Maydell
This patchset is mainly trying to fix a problem that Coverity spotted in the dcr_write_dma() function in hw/ppc/ppc440_uc.c, where the code is not correctly using the cpu_physical_memory_map() function. While I was fixing that I noticed a second problem in this code, where it doesn't have a

[RFC 2/2] hw/ppc/ppc440_uc: Handle mapping failure in DMA engine

2022-07-26 Thread Peter Maydell
Currently the code for doing DMA in dcr_write_dma() has no fallback code for if its calls to cpu_physical_memory_map() fail. Add handling for this situation, by using address_space_read() and address_space_write() to do the data transfers. Signed-off-by: Peter Maydell --- I believe this to be

Re: hexagon docker test failure

2022-07-26 Thread Richard Henderson
On 7/26/22 11:00, Taylor Simpson wrote: So, instead of putting those in CFLAGS, put them in EXTRA_CFLAGS. --- a/tests/tcg/hexagon/Makefile.target +++ b/tests/tcg/hexagon/Makefile.target @@ -20,6 +20,7 @@ EXTRA_RUNS = CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal

RE: hexagon docker test failure

2022-07-26 Thread Brian Cain
> -Original Message- > From: Qemu-devel > On Behalf Of Richard Henderson > Sent: Tuesday, July 26, 2022 12:42 PM > To: Taylor Simpson > Cc: qemu-devel > Subject: Re: hexagon docker test failure > > WARNING: This email originated from outside of Qualcomm. Please be wary of > any links

Re: [PATCH] hw/nvme: Add iothread support

2022-07-26 Thread Keith Busch
On Tue, Jul 26, 2022 at 11:32:57PM +0800, Jinhao Fan wrote: > at 10:45 PM, Keith Busch wrote: > > > On Tue, Jul 26, 2022 at 04:55:54PM +0800, Jinhao Fan wrote: > >> Hi Klaus and Keith, > >> > >> I just added support for interrupt masking. How can I test interrupt > >> masking? > > > > Are you

Re: [PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection

2022-07-26 Thread John Snow
On Tue, Jul 26, 2022 at 12:12 PM Steve Sistare wrote: > > Provide reopen_qmp_connection() to reopen a closed monitor connection. > This is needed by cpr, because qemu exec closes the monitor socket. > > Signed-off-by: Steve Sistare > --- > python/qemu/machine/machine.py | 9 + > 1 file

Re: [PATCH V9 40/46] python/machine: QEMUMachine full_args

2022-07-26 Thread John Snow
On Tue, Jul 26, 2022 at 12:12 PM Steve Sistare wrote: > > Provide full_args() to return all command-line arguments used to start a > vm, some of which are not otherwise visible to QEMUMachine clients. This > is needed by the cpr test, which must start a vm, then pass all qemu > command-line

  1   2   3   >