Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2022-12-07 Thread Chao Peng
On Tue, Dec 06, 2022 at 02:57:04PM +, Fuad Tabba wrote: > Hi, > > On Fri, Dec 2, 2022 at 6:18 AM Chao Peng wrote: > > > > From: "Kirill A. Shutemov" > > > > Introduce 'memfd_restricted' system call with the ability to create > > memory areas that are restricted from userspace access through

[PATCH for 8.0 1/2] virtio-iommu: Add unmap on virtio_iommu_remap()

2022-12-07 Thread Eric Auger
following replay() callback documentation in memory.h we shall first invalidate (notify with flag == IOMMU_NONE) and then map for existing mappings. The code currently skips the unmap and just do map. This may lead to duplicate mapping attempts on VFIO side (leading to spurious -EEXIST DMA_MAP

[PATCH for 8.0 2/2] virtio-iommu: Fix replay on device attach

2022-12-07 Thread Eric Auger
When attaching a device to a domain, we replay the existing domain mappings for that device. If there are several VFIO devices in the same group on the guest we may end up with duplicate mapping attempts because the mapping already exist on VFIO side. So let's do a proper remap, ie. first unmap

[PATCH for 8.0 0/2] virtio-iommu: Fix Replay

2022-12-07 Thread Eric Auger
When assigning VFIO devices protected by a virtio-iommu we need to replay the mappings when adding a new IOMMU MR and when attaching a device to a domain. While we do a "remap" we currently fail to first unmap the existing IOVA mapping and just map the new one. With some device/group topology this

Re: [PULL 02/10] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-12-07 Thread Thomas Huth
On 07/12/2022 14.21, Jonathan Cameron wrote: On Mon, 05 Dec 2022 14:59:39 + Alex Bennée wrote: Jonathan Cameron via writes: On Mon, 5 Dec 2022 10:54:03 + Jonathan Cameron via wrote: On Sun, 4 Dec 2022 08:23:55 +0100 Thomas Huth wrote: On 04/11/2022 07.47, Thomas Huth

Re: [PATCH for 7.2?] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-07 Thread Eric Auger
On 12/7/22 14:24, Eric Auger wrote: > Initialize r0-3 to avoid compilation errors when > -Werror=maybe-uninitialized is used > > ../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’: > ../target/i386/ops_sse.h:2495:13: error: ‘r3’ may be used uninitialized in > this function

[PATCH for 7.2?] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-07 Thread Eric Auger
Initialize r0-3 to avoid compilation errors when -Werror=maybe-uninitialized is used ../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’: ../target/i386/ops_sse.h:2495:13: error: ‘r3’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 2495 | d->Q(3) = r3;

Re: [PATCH 1/1] qemu-iotests/stream-under-throttle: do not shutdown QEMU

2022-12-07 Thread Thomas Huth
On 07/12/2022 14.14, Christian Borntraeger wrote: Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390. Signed-off-by: Christian Borntraeger ---

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

2022-12-07 Thread Fiona Ebner
The new copy mode starts out in 'background' mode and switches to 'write-blocking' mode once the job transitions to ready. Before switching to active mode and indicating that the drives are actively synced, it is necessary to have seen and handled all guest I/O. This is done by checking the dirty

[PATCH 03/18] graph-lock: Implement guard macros

2022-12-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Similar to the implementation in lockable.h, implement macros to automatically take and release the rdlock. Create the empty GraphLockable and GraphLockableMainloop structs only to use it as a type for G_DEFINE_AUTOPTR_CLEANUP_FUNC. Signed-off-by: Emanuele

Re: [PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-12-07 Thread Markus Armbruster
Jonah Palmer writes: > On 12/2/22 10:21, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 2/12/22 13:23, Jonah Palmer wrote: On 11/30/22 11:16, Philippe Mathieu-Daudé wrote: > Hi, > > On 11/8/22 14:24, Jonah Palmer wrote: >> From: Laurent Vivier >>

Re: [PULL 02/10] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-12-07 Thread Jonathan Cameron via
On Mon, 05 Dec 2022 14:59:39 + Alex Bennée wrote: > Jonathan Cameron via writes: > > > On Mon, 5 Dec 2022 10:54:03 + > > Jonathan Cameron via wrote: > > > >> On Sun, 4 Dec 2022 08:23:55 +0100 > >> Thomas Huth wrote: > >> > >> > On 04/11/2022 07.47, Thomas Huth wrote: > >> >

[PATCH 07/18] clang-tsa: Add macros for shared locks

2022-12-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- include/qemu/clang-tsa.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/clang-tsa.h b/include/qemu/clang-tsa.h index 211ee0ae73..ba06fb8c92 100644 --- a/include/qemu/clang-tsa.h +++ b/include/qemu/clang-tsa.h @@ -62,6 +62,7 @@ * void

[PATCH 16/18] block-coroutine-wrapper.py: introduce annotations that take the graph rdlock

2022-12-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Add co_wrapper_bdrv_rdlock and co_wrapper_mixed_bdrv_rdlock option to the block-coroutine-wrapper.py script. This "_bdrv_rdlock" option takes and releases the graph rdlock when a coroutine function is created. This means that when used together with "_mixed",

[PATCH 06/18] clang-tsa: Add TSA_ASSERT() macro

2022-12-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- include/qemu/clang-tsa.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/qemu/clang-tsa.h b/include/qemu/clang-tsa.h index 0a3361dfc8..211ee0ae73 100644 --- a/include/qemu/clang-tsa.h +++ b/include/qemu/clang-tsa.h @@ -98,4 +98,13 @@ */

[PATCH 15/18] Mark assert_bdrv_graph_readable/writable() GRAPH_RD/WRLOCK

2022-12-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- include/block/block_int-common.h | 4 ++-- include/block/graph-lock.h | 4 ++-- block.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h index

[PATCH 14/18] graph-lock: TSA annotations for lock/unlock functions

2022-12-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- include/block/graph-lock.h | 80 +- block/graph-lock.c | 3 ++ 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/include/block/graph-lock.h b/include/block/graph-lock.h index 85e8a53b73..50b7e7b1b6 100644

[PATCH 05/18] Import clang-tsa.h

2022-12-07 Thread Kevin Wolf
This defines macros that allow clang to perform Thread Safety Analysis based on function and variable annotations that specify the locking rules. On non-clang compilers, the annotations are ignored. Imported tsa.h from the original repository with the pthread_mutex_t wrapper removed:

[PATCH 01/18] block: Factor out bdrv_drain_all_begin_nopoll()

2022-12-07 Thread Kevin Wolf
Provide a separate function that just quiesces the users of a node to prevent new requests from coming in, but without waiting for the already in-flight I/O to complete. This function can be used in contexts where polling is not allowed. Signed-off-by: Kevin Wolf ---

[PATCH 13/18] block: assert that graph read and writes are performed correctly

2022-12-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Remove the old assert_bdrv_graph_writable, and replace it with the new version using graph-lock API. See the function documentation for more information. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf ---

[PATCH 00/18] block: Introduce a block graph rwlock

2022-12-07 Thread Kevin Wolf
This series supersedes the first half of Emanuele's "Protect the block layer with a rwlock: part 1". It introduces the basic infrastructure for protecting the block graph (specifically parent/child links) with a rwlock. Actually taking the reader lock in all necessary places is left for future

[PATCH 02/18] graph-lock: Introduce a lock to protect block graph operations

2022-12-07 Thread Kevin Wolf
From: Paolo Bonzini Block layer graph operations are always run under BQL in the main loop. This is proved by the assertion qemu_in_main_thread() and its wrapper macro GLOBAL_STATE_CODE. However, there are also concurrent coroutines running in other iothreads that always try to traverse the

[PATCH 08/18] configure: Enable -Wthread-safety if present

2022-12-07 Thread Kevin Wolf
This enables clang's thread safety analysis (TSA), which we'll use to statically check the block graph locking. Signed-off-by: Kevin Wolf --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 26c7bc5154..45d693a241 100755 --- a/configure +++ b/configure

[PATCH 18/18] block: GRAPH_RDLOCK for functions only called by co_wrappers

2022-12-07 Thread Kevin Wolf
The generated coroutine wrappers already take care to take the lock in the non-coroutine path, and assume that the lock is already taken in the coroutine path. The only thing we need to do for the wrapped function is adding the GRAPH_RDLOCK annotation. Doing so also allows us to mark the

[PATCH 17/18] block: use co_wrapper_mixed_bdrv_rdlock in functions taking the rdlock

2022-12-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Take the rdlock already, before we add the assertions. All these functions either read the graph recursively, or call BlockDriver callbacks that will eventually need to be protected by the graph rdlock. Do it now to all functions together, because many of these

[PATCH 09/18] test-bdrv-drain: Fix incorrrect drain assumptions

2022-12-07 Thread Kevin Wolf
The test case assumes that a drain only happens in one specific place where it drains explicitly. This assumption happened to hold true until now, but block layer functions may drain interally (any graph modifications are going to do that through bdrv_graph_wrlock()), so this is incorrect. Make

[PATCH 12/18] block: remove unnecessary assert_bdrv_graph_writable()

2022-12-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito We don't protect bdrv->aio_context with the graph rwlock, so these assertions are not needed Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf --- block.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block.c b/block.c index

[PATCH 10/18] block: Fix locking in external_snapshot_prepare()

2022-12-07 Thread Kevin Wolf
bdrv_img_create() polls internally (when calling bdrv_create(), which is a co_wrapper), so it can't be called while holding the lock of any AioContext except the current one without causing deadlocks. Drop the lock around the call in external_snapshot_prepare(). Signed-off-by: Kevin Wolf ---

[PATCH 11/18] block: wrlock in bdrv_replace_child_noperm

2022-12-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Protect the main function where graph is modified. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf --- block.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 44d59362d6..df52c6b012 100644

[PATCH 04/18] async: Register/unregister aiocontext in graph lock list

2022-12-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Add/remove the AioContext in aio_context_list in graph-lock.c when it is created/destroyed. This allows using the graph locking operations from this AioContext. In order to allow linking util/async.c with binaries that don't include the block layer, introduce

[PATCH 1/1] qemu-iotests/stream-under-throttle: do not shutdown QEMU

2022-12-07 Thread Christian Borntraeger
Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390. Signed-off-by: Christian Borntraeger --- tests/qemu-iotests/tests/stream-under-throttle | 2 ++ 1 file changed, 2

Re: [PATCH v2] tests/stream-under-throttle: New test

2022-12-07 Thread Christian Borntraeger
Am 07.12.22 um 13:56 schrieb Christian Borntraeger: Am 07.12.22 um 11:31 schrieb Christian Borntraeger: Am 14.11.22 um 10:52 schrieb Hanna Reitz: Test streaming a base image into the top image underneath two throttle nodes.  This was reported to make qemu 7.1 hang

Re: [PATCH v2] tests/stream-under-throttle: New test

2022-12-07 Thread Christian Borntraeger
Am 07.12.22 um 11:31 schrieb Christian Borntraeger: Am 14.11.22 um 10:52 schrieb Hanna Reitz: Test streaming a base image into the top image underneath two throttle nodes.  This was reported to make qemu 7.1 hang (https://gitlab.com/qemu-project/qemu/-/issues/1215), so this serves as a

Re: [PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-07 Thread Pierre Morel
On 12/7/22 12:38, Janis Schoetterl-Glausch wrote: * On Wed, 2022-12-07 at 11:00 +0100, Pierre Morel wrote: On 12/6/22 22:06, Janis Schoetterl-Glausch wrote: On Tue, 2022-12-06 at 15:35 +0100, Pierre Morel wrote: On 12/6/22 14:35, Janis Schoetterl-Glausch wrote: On Tue, 2022-12-06 at

Re: [PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-07 Thread Janis Schoetterl-Glausch
* On Wed, 2022-12-07 at 11:00 +0100, Pierre Morel wrote: > > On 12/6/22 22:06, Janis Schoetterl-Glausch wrote: > > On Tue, 2022-12-06 at 15:35 +0100, Pierre Morel wrote: > > > > > > On 12/6/22 14:35, Janis Schoetterl-Glausch wrote: > > > > On Tue, 2022-12-06 at 11:32 +0100, Pierre Morel wrote:

Re: [RFC PATCH 12/21] i386/xen: set shared_info page

2022-12-07 Thread David Woodhouse
On Tue, 2022-12-06 at 10:00 +, Dr. David Alan Gilbert wrote: > * Philippe Mathieu-Daudé ( > phi...@linaro.org > ) wrote: > > +Juan/David/Claudio. > > > > On 6/12/22 03:20, David Woodhouse wrote: > > > On Mon, 2022-12-05 at 23:17 +0100, Philippe Mathieu-Daudé wrote: > > > > On 5/12/22 18:31,

Re: [PATCH for-8.0] ui/vnc: fix bad address parsing

2022-12-07 Thread Vladimir Sementsov-Ogievskiy
On 12/6/22 23:12, Philippe Mathieu-Daudé wrote: On 6/12/22 20:23, Vladimir Sementsov-Ogievskiy wrote: IF addrstr == "[" and websocket is true, hostlen becomes 0 and we try to access addrstr[hostlen-1] which is bad idea. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   ui/vnc.c | 2 +-   1

Re: [PATCH v2] tests/stream-under-throttle: New test

2022-12-07 Thread Christian Borntraeger
Am 14.11.22 um 10:52 schrieb Hanna Reitz: Test streaming a base image into the top image underneath two throttle nodes. This was reported to make qemu 7.1 hang (https://gitlab.com/qemu-project/qemu/-/issues/1215), so this serves as a regression test. Signed-off-by: Hanna Reitz --- Based-on:

Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-07 Thread Michael S. Tsirkin
On Wed, Dec 07, 2022 at 10:02:53AM +0100, Philippe Mathieu-Daudé wrote: > On 7/12/22 07:25, Markus Armbruster wrote: > > pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. > > pci.h must be included before pcie_sriov.h or else compile fails. > > > > Adding #include "pci/pci.h"

[PATCH] vhost-user-blk: Fix live migration crash during event handling

2022-12-07 Thread Yajun Wu
After live migration with virtio block device, qemu crash at: #0 0x7fe051e54269 in g_source_destroy () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #1 0x55cebaa5f37d in qio_net_listener_set_client_func_full (listener=0x55cebceab340, func=0x55cebab4f5f2 ,

Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-07 Thread Michael S. Tsirkin
On Wed, Dec 07, 2022 at 07:25:49AM +0100, Markus Armbruster wrote: > pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. > pci.h must be included before pcie_sriov.h or else compile fails. > > Adding #include "pci/pci.h" to pcie_sriov would be wrong, because it > would close an

Re: [PATCH 14/15] hw/riscv: opentitan: Drop "hartid-base" and "priority-base" initialization

2022-12-07 Thread Bin Meng
Hi Alistair, On Wed, Dec 7, 2022 at 12:38 PM Alistair Francis wrote: > > On Fri, Dec 2, 2022 at 12:09 AM Bin Meng wrote: > > > > "hartid-base" and "priority-base" are zero by default. There is no > > need to initialize them to zero again. > > What is the defaults change though? I feel like

Re: [PATCH 02/11] exec: Restrict hwaddr.h to sysemu/

2022-12-07 Thread Claudio Fontana
On 12/6/22 18:09, Philippe Mathieu-Daudé wrote: > On 6/12/22 16:38, Claudio Fontana wrote: >> On 12/6/22 15:53, Claudio Fontana wrote: >>> On 5/17/21 13:11, Philippe Mathieu-Daudé wrote: Guard declarations within hwaddr.h against inclusion from user-mode emulation. To make it

[PATCH v2 07/16] hw/intc: sifive_plic: Improve robustness of the PLIC config parser

2022-12-07 Thread Bin Meng
At present the PLIC config parser can only handle legal config string like "MS,MS". However if a config string like ",MS,MS,,MS,MS,," is given the parser won't get the correct configuration. This commit improves the config parser to make it more robust. Signed-off-by: Bin Meng Acked-by:

[PATCH v2 09/16] hw/intc: sifive_plic: Update "num-sources" property default value

2022-12-07 Thread Bin Meng
At present the default value of "num-sources" property is zero, which does not make a lot of sense, as in sifive_plic_realize() we see s->bitfield_words is calculated by: s->bitfield_words = (s->num_sources + 31) >> 5; if the we don't configure "num-sources" property its default value zero

[PATCH v2 11/16] hw/riscv: sifive_e: Fix the number of interrupt sources of PLIC

2022-12-07 Thread Bin Meng
Per chapter 10 in Freedom E310 manuals [1][2][3], E310 G002 and G003 supports 52 interrupt sources while G000 supports 51 interrupt sources. We use the value of G002 and G003, so it is 53 (including source 0). [1] G000 manual:

[PATCH v2 13/16] hw/riscv: virt: Fix the value of "riscv, ndev" in the dtb

2022-12-07 Thread Bin Meng
Commit 28d8c281200f ("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") changed the value of VIRT_IRQCHIP_NUM_SOURCES from 127 to 53, which is VIRTIO_NDEV and also used as the value of "riscv,ndev" property in the dtb. Unfortunately this is wrong as VIRT_IRQCHIP_NUM_SOURCES should

[PATCH v2 12/16] hw/riscv: sifive_u: Avoid using magic number for "riscv, ndev"

2022-12-07 Thread Bin Meng
At present magic number is used to create "riscv,ndev" property in the dtb. Let's use the macro SIFIVE_U_PLIC_NUM_SOURCES that is used to instantiate the PLIC model instead. Signed-off-by: Bin Meng Reviewed-by: Wilfred Mallawa Reviewed-by: Alistair Francis --- (no changes since v1)

[PATCH v2 03/16] hw/riscv: Fix opentitan dependency to SIFIVE_PLIC

2022-12-07 Thread Bin Meng
Since commit ef6310064820 ("hw/riscv: opentitan: Update to the latest build") the IBEX PLIC model was replaced with the SiFive PLIC model in the 'opentitan' machine but we forgot the add the dependency there. Signed-off-by: Bin Meng Reviewed-by: Wilfred Mallawa Reviewed-by: Alistair Francis

[PATCH v2 15/16] hw/riscv: opentitan: Drop "hartid-base" and "priority-base" initialization

2022-12-07 Thread Bin Meng
"hartid-base" and "priority-base" are zero by default. There is no need to initialize them to zero again. Signed-off-by: Bin Meng Reviewed-by: Wilfred Mallawa --- (no changes since v1) hw/riscv/opentitan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/riscv/opentitan.c

[PATCH v2 04/16] hw/riscv: Sort machines Kconfig options in alphabetical order

2022-12-07 Thread Bin Meng
SHAKTI_C machine Kconfig option was inserted in disorder. Fix it. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v1) hw/riscv/Kconfig | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index

[PATCH v2 01/16] hw/riscv: Select MSI_NONBROKEN in SIFIVE_PLIC

2022-12-07 Thread Bin Meng
hw/pci/Kconfig says MSI_NONBROKEN should be selected by interrupt controllers regardless of how MSI is implemented. msi_nonbroken is initialized to true in sifive_plic_realize(). Let SIFIVE_PLIC select MSI_NONBROKEN and drop the selection from RISC-V machines. Signed-off-by: Bin Meng

[PATCH v2 02/16] hw/intc: Select MSI_NONBROKEN in RISC-V AIA interrupt controllers

2022-12-07 Thread Bin Meng
hw/pci/Kconfig says MSI_NONBROKEN should be selected by interrupt controllers regardless of how MSI is implemented. msi_nonbroken is initialized to true in both riscv_aplic_realize() and riscv_imsic_realize(). Select MSI_NONBROKEN in RISCV_APLIC and RISCV_IMSIC. Signed-off-by: Bin Meng

[PATCH v2 14/16] hw/intc: sifive_plic: Change "priority-base" to start from interrupt source 0

2022-12-07 Thread Bin Meng
At present the SiFive PLIC model "priority-base" expects interrupt priority register base starting from source 1 instead source 0, that's why on most platforms "priority-base" is set to 0x04 except 'opentitan' machine. 'opentitan' should have set "priority-base" to 0x04 too. Note the irq number

[PATCH v2 16/16] hw/intc: sifive_plic: Fix the pending register range check

2022-12-07 Thread Bin Meng
The pending register upper limit is currently set to plic->num_sources >> 3, which is wrong, e.g.: considering plic->num_sources is 7, the upper limit becomes 0 which fails the range check if reading the pending register at pending_base. Fixes: 1e24429e40df ("SiFive RISC-V PLIC Block")

[PATCH v2 08/16] hw/intc: sifive_plic: Use error_setg() to propagate the error up via errp in sifive_plic_realize()

2022-12-07 Thread Bin Meng
The realize() callback has an errp for us to propagate the error up. While we are here, corret the wrong multi-line comment format. Signed-off-by: Bin Meng --- Changes in v2: - new patch: "hw/intc: sifive_plic: Use error_setg() to propagate the error up via errp in sifive_plic_realize()"

[PATCH v2 05/16] hw/riscv: spike: Remove misleading comments

2022-12-07 Thread Bin Meng
PLIC is not included in the 'spike' machine. Signed-off-by: Bin Meng Reviewed-by: Wilfred Mallawa Reviewed-by: Alistair Francis --- (no changes since v1) hw/riscv/spike.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index 1e1d752c00..13946acf0d

[PATCH v2 10/16] hw/riscv: microchip_pfsoc: Fix the number of interrupt sources of PLIC

2022-12-07 Thread Bin Meng
Per chapter 6.5.2 in [1], the number of interupt sources including interrupt source 0 should be 187. [1] PolarFire SoC MSS TRM: https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ProductDocuments/ReferenceManuals/PolarFire_SoC_FPGA_MSS_Technical_Reference_Manual_VC.pdf Fixes:

[PATCH v2 06/16] hw/intc: sifive_plic: Drop PLICMode_H

2022-12-07 Thread Bin Meng
H-mode has been removed since priv spec 1.10. Drop it. Signed-off-by: Bin Meng Reviewed-by: Wilfred Mallawa Reviewed-by: Alistair Francis --- (no changes since v1) include/hw/intc/sifive_plic.h | 1 - hw/intc/sifive_plic.c | 1 - 2 files changed, 2 deletions(-) diff --git

Re: [PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-07 Thread Pierre Morel
On 12/6/22 22:06, Janis Schoetterl-Glausch wrote: On Tue, 2022-12-06 at 15:35 +0100, Pierre Morel wrote: On 12/6/22 14:35, Janis Schoetterl-Glausch wrote: On Tue, 2022-12-06 at 11:32 +0100, Pierre Morel wrote: On 12/6/22 10:31, Janis Schoetterl-Glausch wrote: On Tue, 2022-11-29 at 18:42

Re: [PATCH v12 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-12-07 Thread Pierre Morel
On 12/7/22 10:12, Cédric Le Goater wrote: On 11/29/22 18:42, Pierre Morel wrote: The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- ...snip... +

Re: [PATCH v3] intel-iommu: Document iova_tree

2022-12-07 Thread Eric Auger
Hi Peter, On 12/6/22 23:13, Peter Xu wrote: > It seems not super clear on when iova_tree is used, and why. Add a rich > comment above iova_tree to track why we needed the iova_tree, and when we > need it. > > Also comment for the map/unmap messages, on how they're used and > implications (e.g.

Re: REG: TTC Timer

2022-12-07 Thread Gowri Shankar
Hello Konrad, Could you please help me to solve it? Thanks & Regards, P.Gowrishankar On Mon, Dec 5, 2022 at 4:26 PM Gowri Shankar wrote: > Hi Konrad, > > Thanks for your quick response. > > Now I want to increment the TTC counter value to enable the system tick. > How to configure the TTC

Re: [PATCH v12 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-12-07 Thread Cédric Le Goater
On 11/29/22 18:42, Pierre Morel wrote: The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- target/s390x/cpu.h | 77 +++

Re: [PATCH] configure: Fix check-tcg not executing any tests

2022-12-07 Thread Philippe Mathieu-Daudé
Hi Mukilan, On 7/12/22 09:23, Mukilan Thiyagarajan wrote: After configuring with --target-list=hexagon-linux-user running `make check-tcg` just prints the following: ``` make: Nothing to be done for 'check-tcg' ``` In the probe_target_compiler function, the 'break' command is used

Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-07 Thread Philippe Mathieu-Daudé
On 7/12/22 07:25, Markus Armbruster wrote: pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. pci.h must be included before pcie_sriov.h or else compile fails. Adding #include "pci/pci.h" to pcie_sriov would be wrong, because it would close an inclusion loop: pci.h includes

[PATCH 1/2] target/riscv: Simplify helper_sret() a little bit

2022-12-07 Thread Bin Meng
There are 2 paths in helper_sret() and the same mstatus update codes are replicated. Extract the common parts to simplify it a little bit. Signed-off-by: Bin Meng --- target/riscv/op_helper.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git

[PATCH 2/2] target/riscv: Clear mstatus.MPRV when leaving M-mode for priv spec 1.12+

2022-12-07 Thread Bin Meng
Since priv spec v1.12, MRET and SRET now clear mstatus.MPRV when leaving M-mode. Signed-off-by: Bin Meng --- target/riscv/op_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index a047d38152..878bcb03b8 100644 ---

Re: [RFC PATCH for 8.0 00/13] vDPA-net inflight descriptors migration with SVQ

2022-12-07 Thread Eugenio Perez Martin
On Tue, Dec 6, 2022 at 8:08 AM Jason Wang wrote: > > On Tue, Dec 6, 2022 at 1:04 AM Eugenio Pérez wrote: > > > > The state of the descriptors (avail or used) may not be recoverable just > > looking at the guest memory. Out of order used descriptor may override > > previous avail ones in the

Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-07 Thread Thomas Huth
On 07/12/2022 00.12, BALATON Zoltan wrote: On Tue, 6 Dec 2022, Thomas Huth wrote: The only code that is really, really target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). By moving this code into the hw/i386/ folder (renamed to rtc_apic_policy_slew_deliver_irq()) and

Re: [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors

2022-12-07 Thread Eugenio Perez Martin
On Tue, Dec 6, 2022 at 4:24 AM Jason Wang wrote: > > On Tue, Dec 6, 2022 at 1:05 AM Eugenio Pérez wrote: > > > > There is currently no data to be migrated, since nothing populates or > > read the fields on virtio-net. > > > > The migration of in-flight descriptors is modelled after the migration

Re: [PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-12-07 Thread Jonah Palmer
On 12/2/22 10:21, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 2/12/22 13:23, Jonah Palmer wrote: On 11/30/22 11:16, Philippe Mathieu-Daudé wrote: Hi, On 11/8/22 14:24, Jonah Palmer wrote: From: Laurent Vivier This new command lists all the instances of VirtIODevices with

Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-07 Thread Thomas Huth
On 07/12/2022 00.38, Bernhard Beschow wrote: Am 6. Dezember 2022 20:06:41 UTC schrieb Thomas Huth : The only code that is really, really target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). By moving this code into the hw/i386/ folder (renamed to

Re: [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors

2022-12-07 Thread Eugenio Perez Martin
On Mon, Dec 5, 2022 at 9:52 PM Parav Pandit wrote: > > > > From: Eugenio Pérez > > Sent: Monday, December 5, 2022 12:05 PM > > > > There is currently no data to be migrated, since nothing populates or read > > the fields on virtio-net. > > > > The migration of in-flight descriptors is modelled

Re: [PATCH] blockdev: add 'media=cdrom' argument to support usb cdrom emulated as cdrom

2022-12-07 Thread Paolo Bonzini
It should be like this: -device usb-bot,id=bot0 -device scsi-{cd,hd},bus=bot0.0,drive=drive0 Libvirt has the code to generate the options for SCSI controllers, but usb-bot only allows one disk attached to it so it's easier to make it a element. Paolo Il sab 3 dic 2022, 13:52 Zhipeng Lu ha

Re: [PATCH 09/15] hw/riscv: microchip_pfsoc: Fix the number of interrupt sources of PLIC

2022-12-07 Thread Conor Dooley
On Thu, Dec 01, 2022 at 10:08:05PM +0800, Bin Meng wrote: > Per chapter 6.5.2 in [1], the number of interupt sources including > interrupt source 0 should be 187. > > [1] PolarFire SoC MSS TRM: >

[PATCH] configure: Fix check-tcg not executing any tests

2022-12-07 Thread Mukilan Thiyagarajan
After configuring with --target-list=hexagon-linux-user running `make check-tcg` just prints the following: ``` make: Nothing to be done for 'check-tcg' ``` In the probe_target_compiler function, the 'break' command is used incorrectly. There are no lexically enclosing loops associated with that

Re: [PATCH v10 6/9] KVM: Unmap existing mappings when change the memory attributes

2022-12-07 Thread Yuan Yao
On Fri, Dec 02, 2022 at 02:13:44PM +0800, Chao Peng wrote: > Unmap the existing guest mappings when memory attribute is changed > between shared and private. This is needed because shared pages and > private pages are from different backends, unmapping existing ones > gives a chance for page fault

<    1   2