Re: [PATCH] docs/devel/reset.rst: Correct function names

2023-09-21 Thread Akihiko Odaki
On 2022/11/25 23:06, Akihiko Odaki wrote: resettable_class_set_parent_phases() was mistakenly called resettable_class_set_parent_reset_phases() in some places. Signed-off-by: Akihiko Odaki --- docs/devel/reset.rst | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff

Re: [PATCH] docs/devel/reset.rst: Correct function names

2023-09-21 Thread Michael Tokarev
21.09.2023 10:33, Akihiko Odaki: .. This patch seems to have been forgotten. Can anyone pull this? Applied to my trivial-patches tree now. Thank you! /mjt

[PULL v2 12/22] parallels: collect bitmap of used clusters at open

2023-09-21 Thread Denis V. Lunev
If the operation is failed, we need to check image consistency if the problem is not about memory allocation. Bitmap adjustments in allocate_cluster are not performed yet. They worth to be separate. This was proven useful during debug of this series. Kept as is for future bissecting. It should

[PULL v2 18/22] parallels: improve readability of allocate_clusters

2023-09-21 Thread Denis V. Lunev
Replace 'space' representing the amount of data to preallocate with 'bytes'. Rationale: * 'space' at each place is converted to bytes * the unit is more close to the variable name Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 13 + 1 file

[PULL v2 21/22] parallels: naive implementation of parallels_co_pwrite_zeroes

2023-09-21 Thread Denis V. Lunev
The zero flag is missed in the Parallels format specification. We can resort to discard if we have no backing file. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/parallels.c

[PATCH v3] input: Allow to choose console with qemu_input_is_absolute

2023-09-21 Thread Akihiko Odaki
Although an input is routed depending on the console, qemu_input_is_absolute() had no mechanism to specify the console. Accept QemuConsole as an argument for qemu_input_is_absolute, and let the display know the absolute/relative state for a particular console. Signed-off-by: Akihiko Odaki ---

Re: [PATCH v2 5/7] block/vdi: Clean up local variable shadowing

2023-09-21 Thread Kevin Wolf
Am 20.09.2023 um 20:31 hat Markus Armbruster geschrieben: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [RFC PATCH v2 00/21] QEMU gmem implemention

2023-09-21 Thread David Hildenbrand
2. hugepage support. KVM gmem can be allocated from hugetlbfs. How does QEMU determine Not yet it can't. gmem only supports THP, hugetlbfs is a future thing, if it's ever supported. I wouldn't be at all surprised if we end up going down a slightly different route and don't use

[PATCH v2] plugins/hotblocks: Fix potential deadlock in plugin_exit() function

2023-09-21 Thread Cong Liu
This patch fixes a potential deadlock in the plugin_exit() function of QEMU. The original code does not release the lock mutex if it is NULL. This patch adds a check for it being NULL and releases the mutex in that case. Signed-off-by: Cong Liu Suggested-by: Philippe Mathieu-Daudé ---

Re: [PATCH v1 12/22] vfio/ccw: Use vfio_[attach/detach]_device

2023-09-21 Thread Cédric Le Goater
On 8/30/23 12:37, Zhenzhong Duan wrote: From: Eric Auger Let the vfio-ccw device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Also now all the devices have been migrated to use the new vfio_attach_device/vfio_detach_device API, let's

Re: [PATCH v3] hw/i386/pc: improve physical address space bound check for 32-bit systems

2023-09-21 Thread David Hildenbrand
On 21.09.23 09:17, Ani Sinha wrote: 32-bit systems do not have a reserved memory for hole64 and hotplugging memory devices are not supported on those systems. Therefore, the maximum limit of the guest physical address in the absence of additional memory devices effectively coincides with the end

[PULL 02/17] bsd-user: spelling fixes

2023-09-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Kyle Evans Reviewed-by: Warner Losh --- bsd-user/errno_defs.h| 2 +- bsd-user/freebsd/target_os_siginfo.h | 2 +- bsd-user/freebsd/target_os_stack.h | 4 ++-- bsd-user/freebsd/target_os_user.h| 2 +- bsd-user/qemu.h

[PULL 04/17] hw/net: spelling fixes

2023-09-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Peter Maydell --- hw/net/cadence_gem.c | 10 +- hw/net/dp8393x.c | 2 +- hw/net/e1000_regs.h | 2 +- hw/net/e1000x_regs.h | 2 +- hw/net/fsl_etsec/rings.c | 2 +- hw/net/igb_regs.h | 4 ++--

[PULL 01/17] ppc: spelling fixes

2023-09-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Cédric Le Goater --- host/include/ppc/host/cpuinfo.h | 2 +- hw/ppc/ppc.c| 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/spapr.c | 8 hw/ppc/spapr_hcall.c| 2 +-

[PULL 06/17] hw/tpm: spelling fixes

2023-09-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Stefan Berger --- hw/tpm/tpm_tis.h| 2 +- hw/tpm/tpm_tis_common.c | 2 +- hw/tpm/tpm_tis_i2c.c| 4 ++-- hw/tpm/tpm_tis_isa.c| 2 +- hw/tpm/tpm_tis_sysbus.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PULL 03/17] i386: spelling fixes

2023-09-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Peter Maydell --- host/include/i386/host/cpuinfo.h | 2 +- hw/i386/acpi-build.c | 4 ++-- hw/i386/amd_iommu.c | 4 ++-- hw/i386/intel_iommu.c| 4 ++-- hw/i386/kvm/xen_xenstore.c | 2 +-

[PULL 00/17] Trivial patches for 2023-09-21

2023-09-21 Thread Michael Tokarev
The following changes since commit 4907644841e3200aea6475c0f72d3d987e9f3d93: Merge tag 'mem-2023-09-19' of https://github.com/davidhildenbrand/qemu into staging (2023-09-19 13:22:19 -0400) are available in the Git repository at: https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches

Re: [RFC PATCH v2 07/21] i386/pc: Drop pc_machine_kvm_type()

2023-09-21 Thread David Hildenbrand
On 14.09.23 05:51, Xiaoyao Li wrote: pc_machine_kvm_type() was introduced by commit e21be724eaf5 ("i386/xen: add pc_machine_kvm_type to initialize XEN_EMULATE mode") to do Xen specific initialization by utilizing kvm_type method. commit eeedfe6c6316 ("hw/xen: Simplify emulated Xen platform

Re: [PATCH 01/52] migration/rdma: Clean up qemu_rdma_poll()'s return type

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_poll()'s return type is uint64_t, even though it returns 0, > -1, or @ret, which is int. Its callers assign the return value to int > variables, then check whether it's negative. Unclean. > > Return int instead. > > Signed-off-by:

Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failure on errors

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_accept() returns 0 in some cases even when it didn't > complete its job due to errors. Impact is not obvious. I figure the > caller will soon fail again with a misleading error message. > > Fix it to return -1 on any failure. > >

Re: [PATCH 09/52] migration/rdma: Put @errp parameter last

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > include/qapi/error.h demands: > > * - Functions that use Error to report errors have an Error **errp > * parameter. It should be the last parameter, except for functions > * taking variable arguments. > > qemu_rdma_connect() does not

Re: [PATCH v3] input: Allow to choose console with qemu_input_is_absolute

2023-09-21 Thread Philippe Mathieu-Daudé
On 21/9/23 10:29, Akihiko Odaki wrote: Although an input is routed depending on the console, qemu_input_is_absolute() had no mechanism to specify the console. Accept QemuConsole as an argument for qemu_input_is_absolute, and let the display know the absolute/relative state for a particular

RE: [PATCH v1 04/22] vfio/common: Introduce vfio_container_add|del_section_window()

2023-09-21 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Sent: Thursday, September 21, 2023 4:29 PM >Subject: Re: [PATCH v1 04/22] vfio/common: Introduce >vfio_container_add|del_section_window() > >Hello Zhenzhong, > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> From: Eric Auger >> >>

Re: EDK2 ArmVirtQemu behaviour with multiple UARTs

2023-09-21 Thread Ard Biesheuvel
On Thu, 21 Sept 2023 at 10:50, Peter Maydell wrote: > > Hi; I've been looking again at a very long standing missing feature in > the QEMU virt board, which is that we only have one UART. One of the > things that has stalled this in the past has been the odd behaviour of > EDK2 if the DTB that

[PATCH v2] amd_iommu: Fix APIC address check

2023-09-21 Thread Akihiko Odaki
An MSI from I/O APIC may not exactly equal to APIC_DEFAULT_ADDRESS. In fact, Windows 17763.3650 configures I/O APIC to set the dest_mode bit. Cover the range assigned to APIC. Fixes: 577c470f43 ("x86_iommu/amd: Prepare for interrupt remap support") Signed-off-by: Akihiko Odaki --- V1 -> V2:

Re: [PATCH v1 04/22] vfio/common: Introduce vfio_container_add|del_section_window()

2023-09-21 Thread Cédric Le Goater
On 9/21/23 12:14, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Sent: Thursday, September 21, 2023 4:29 PM Subject: Re: [PATCH v1 04/22] vfio/common: Introduce vfio_container_add|del_section_window() Hello Zhenzhong, On 8/30/23 12:37, Zhenzhong Duan

Re: [PATCH] cxl/vendor: update niagara to only build on linux, add KConfig options

2023-09-21 Thread Philippe Mathieu-Daudé
Hi Gregory, On 20/9/23 17:50, Gregory Price wrote: Niagara uses which presently limits its compatibility to linux hosts. Change build to only build it on linux. Add Kconfig file for skhynix directory, and make niagara depend on CXL_MEM_DEVICE. Add an explicit flag for niagara.

Re: [PATCH v1 04/22] vfio/common: Introduce vfio_container_add|del_section_window()

2023-09-21 Thread Cédric Le Goater
Hello Zhenzhong, On 8/30/23 12:37, Zhenzhong Duan wrote: From: Eric Auger Introduce helper functions that isolate the code used for VFIO_SPAPR_TCE_v2_IOMMU. This code reliance is IOMMU backend specific whereas the rest of the code in the callers, ie. vfio_listener_region_add|del is not.

Re: [PATCH 00/52] migration/rdma: Error handling fixes

2023-09-21 Thread Zhijian Li (Fujitsu)
Perter, On 20/09/2023 00:49, Peter Xu wrote: > On Mon, Sep 18, 2023 at 04:41:14PM +0200, Markus Armbruster wrote: >> Oh dear, where to start. There's so much wrong, and in pretty obvious >> ways. This code should never have passed review. I'm refraining from >> saying more; see the commit

Re: [PATCH v2 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-21 Thread Kevin Wolf
Am 20.09.2023 um 20:31 hat Markus Armbruster geschrieben: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: rename both the pair of parameters and the pair of local > variables. While

[PULL 12/17] hw/cxl/cxl_device: Replace magic number in CXLError definition

2023-09-21 Thread Michael Tokarev
From: Fan Ni Replace the magic number 32 with CXL_RAS_ERR_HEADER_NUM for better code readability and maintainability. Signed-off-by: Fan Ni Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Signed-off-by: Jonathan Cameron Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael

[PULL 13/17] docs/cxl: Change to lowercase as others

2023-09-21 Thread Michael Tokarev
From: Li Zhijian Using the same style as elsewhere for topology / topo Signed-off-by: Li Zhijian Link: https://lore.kernel.org/r/20230519085802.2106900-2-lizhij...@cn.fujitsu.com Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael

[PULL 17/17] docs/devel/reset.rst: Correct function names

2023-09-21 Thread Michael Tokarev
From: Akihiko Odaki resettable_class_set_parent_phases() was mistakenly called resettable_class_set_parent_reset_phases() in some places. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- docs/devel/reset.rst | 17

[PULL 14/17] hw/cxl: Fix out of bound array access

2023-09-21 Thread Michael Tokarev
From: Dmitry Frolov According to cxl_interleave_ways_enc(), fw->num_targets is allowed to be up to 16. This also corresponds to CXL r3.0 spec. So, the fw->target_hbs[] array is iterated from 0 to 15. But it is statically declared of length 8. Thus, out of bound array access may occur. Fixes:

Re: [PATCH 1/3] qga: Fix memory leak when output stream is unused

2023-09-21 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Sep 18, 2023 at 2:00 PM Daniel Xu wrote: > If capture-output is requested but one of the channels goes unused (eg. > we attempt to capture stderr but the command never writes to stderr), we > can leak memory. > > guest_exec_output_watch() is (from what

Re: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-09-21 Thread Cédric Le Goater
On 9/21/23 12:22, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Thursday, September 21, 2023 4:42 PM Subject: Re: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd On 9/20/23 13:49, Eric Auger wrote: Hi Zhenzhong, On 8/30/23 12:37,

Re: Concerns regarding e17bebd049 ("dump: Set correct vaddr for ELF dump")

2023-09-21 Thread Laszlo Ersek
On 9/20/23 19:35, Stephen Brennan wrote: > Hi Jon, > > Jon Doron writes: >> Hi Stephen, >> Like you have said the reason is as I wrote in the commit message, >> without "fixing" the vaddr GDB is messing up mapping and working with >> the generated core file. > > For the record I totally love

[PULL v2 16/22] parallels: update used bitmap in allocate_cluster

2023-09-21 Thread Denis V. Lunev
We should extend the bitmap if the file is extended and set the bit in the image used bitmap once the cluster is allocated. Sanity check at that moment also looks like a good idea. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 ++ 1 file

Re: [PATCH] cutils: Fix get_relocated_path on Windows

2023-09-21 Thread Akihiko Odaki
On 2022/10/31 9:59, Akihiko Odaki wrote: get_relocated_path() did not have error handling for PathCchSkipRoot() because a path given to get_relocated_path() was expected to be a valid path containing a drive letter or UNC server/share path elements on Windows, but sometimes it turned out

Re: [PATCH 04/52] migration/rdma: Drop fragile wr_id formatting

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > wrid_desc[] uses 4001 pointers to map four integer values to strings. > > print_wrid() accesses wrid_desc[] out of bounds when passed a negative > argument. It returns null for values 2..1999 and 2001..3999. > > qemu_rdma_poll() and

Re: [PATCH 07/52] migration/rdma: Give qio_channel_rdma_source_funcs internal linkage

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian

Re: [RFC PATCH v2 00/21] QEMU gmem implemention

2023-09-21 Thread David Hildenbrand
This version still leave some opens to be discussed: 1. whether we need "private" propery to be user-settable?     It seems unnecessary because vm-type is determined. If the VM is     confidential-guest, then the RAM of the guest must be able to be     mapped as private, i.e., have kvm gmem

Re: [PATCH 10/52] migration/rdma: Eliminate error_propagate()

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > When all we do with an Error we receive into a local variable is > propagating to somewhere else, we can just as well receive it there > right away. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian > --- > migration/rdma.c | 19

Re: [PATCH v1 09/22] vfio/container: Introduce vfio_[attach/detach]_device

2023-09-21 Thread Cédric Le Goater
On 8/30/23 12:37, Zhenzhong Duan wrote: From: Eric Auger We want the VFIO devices to be able to use two different IOMMU callbacks, the legacy VFIO one and the new iommufd one. Introduce vfio_[attach/detach]_device which aim at hiding the underlying IOMMU backend (IOCTLs, datatypes, ...).

Re: [PATCH] vl: Free machine list

2023-09-21 Thread Philippe Mathieu-Daudé
On 22/7/23 08:26, Akihiko Odaki wrote: Free machine list and make LeakSanitizer happy. Signed-off-by: Akihiko Odaki --- softmmu/vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index b0b96f67fa..802f728298 100644 --- a/softmmu/vl.c +++

Re: [PATCH v1 10/22] vfio/platform: Use vfio_[attach/detach]_device

2023-09-21 Thread Cédric Le Goater
On 8/30/23 12:37, Zhenzhong Duan wrote: From: Eric Auger Let the vfio-platform device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan ---

Re: [PATCH 2/2] migration/rdma: zore out head.repeat to make the error more clear

2023-09-21 Thread Fabiano Rosas
"Zhijian Li (Fujitsu)" writes: > On 20/09/2023 21:01, Fabiano Rosas wrote: >> Li Zhijian writes: >> >>> From: Li Zhijian >>> >>> Previously, we got a confusion error that complains >>> the RDMAControlHeader.repeat: >>> qemu-system-x86_64: rdma: Too many requests in this message >>>

EDK2 ArmVirtQemu behaviour with multiple UARTs

2023-09-21 Thread Peter Maydell
Hi; I've been looking again at a very long standing missing feature in the QEMU virt board, which is that we only have one UART. One of the things that has stalled this in the past has been the odd behaviour of EDK2 if the DTB that QEMU passes it describes two UARTs. I'm going to describe the

Re: [PATCH v2 07/10] virtiofsd: Use qemu_get_runtime_dir()

2023-09-21 Thread Stefan Hajnoczi
On Thu, Nov 10, 2022 at 07:06:26PM +0900, Akihiko Odaki wrote: > qemu_get_runtime_dir() is used to construct the path to a lock file. > > Signed-off-by: Akihiko Odaki > --- > tools/virtiofsd/fuse_virtio.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

RE: [PATCH v1 12/22] vfio/ccw: Use vfio_[attach/detach]_device

2023-09-21 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, September 21, 2023 8:20 PM >Subject: Re: [PATCH v1 12/22] vfio/ccw: Use vfio_[attach/detach]_device > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> From: Eric Auger >> >> Let the vfio-ccw device use vfio_attach_device() and >>

[PULL v2 00/22] implement discard operation for Parallels images

2023-09-21 Thread Denis V. Lunev
The following changes since commit 4907644841e3200aea6475c0f72d3d987e9f3d93: Merge tag 'mem-2023-09-19' of https://github.com/davidhildenbrand/qemu into staging (2023-09-19 13:22:19 -0400) are available in the Git repository at: https://src.openvz.org/scm/~den/qemu.git

[PULL v2 07/22] parallels: refactor path when we need to re-check image in parallels_open

2023-09-21 Thread Denis V. Lunev
More conditions follows thus the check should be more scalable. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH v3 1/8] util: Introduce qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
qemu_get_runtime_dir() returns a dynamically allocated directory path that is appropriate for storing runtime files. It corresponds to "run" directory in Unix. With a tree-wide search, it was found that there are several cases where such a functionality is implemented so let's have one as a

[PATCH v3 0/8] util: Introduce qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
qemu_get_runtime_dir() returns a dynamically allocated directory path that is appropriate for storing runtime files. It corresponds to "run" directory in Unix. With a tree-wide search, it was found that there are several cases where such a functionality is implemented so let's have one as a

[PATCH v3 2/8] ivshmem-server: Use qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
qemu_get_runtime_dir() is used to construct the default PID file path. Signed-off-by: Akihiko Odaki --- contrib/ivshmem-server/main.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c index

[PATCH v3 8/8] spice-app: Use qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
qemu_get_runtime_dir() provides QEMU-specific fallback of runtime directory. Signed-off-by: Akihiko Odaki --- ui/spice-app.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/spice-app.c b/ui/spice-app.c index 405fb7f9f5..f6c2343213 100644 --- a/ui/spice-app.c +++

[PATCH v3 6/8] module: Use qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
qemu_get_runtime_dir() is used to construct the path to module upgrades. Signed-off-by: Akihiko Odaki --- util/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/module.c b/util/module.c index 32e263163c..580658edf4 100644 --- a/util/module.c +++ b/util/module.c

Re: [RFC PATCH v2 04/21] memory: Introduce memory_region_has_gmem_fd()

2023-09-21 Thread David Hildenbrand
On 14.09.23 05:51, Xiaoyao Li wrote: Introduce memory_region_has_gmem_fd() to query if the MemoryRegion has KVM gmem fd allocated. *probably* best to just squash that into patch #2. -- Cheers, David / dhildenb

Re: [PATCH v3] hw/i386/pc: improve physical address space bound check for 32-bit systems

2023-09-21 Thread Ani Sinha
> On 21-Sep-2023, at 1:45 PM, David Hildenbrand wrote: > > On 21.09.23 09:17, Ani Sinha wrote: >> 32-bit systems do not have a reserved memory for hole64 and hotplugging >> memory >> devices are not supported on those systems. Therefore, the maximum limit of >> the >> guest physical address

Re: [PATCH] accel/kvm/kvm-all: Handle register access errors

2023-09-21 Thread Akihiko Odaki
On 2023/06/19 21:19, Peter Maydell wrote: On Sat, 10 Jun 2023 at 04:51, Akihiko Odaki wrote: On 2022/12/01 20:00, Akihiko Odaki wrote: On 2022/12/01 19:40, Peter Maydell wrote: On Thu, 1 Dec 2022 at 10:27, Akihiko Odaki wrote: A register access error typically means something seriously

Re: [PATCH] plugins/hotblocks: Fix potential deadlock in plugin_exit() function

2023-09-21 Thread Philippe Mathieu-Daudé
Hi Cong, On 21/9/23 08:12, Cong Liu wrote: This patch fixes a potential deadlock in the plugin_exit() function of QEMU. The original code does not release the lock mutex if it is NULL. This patch adds a check for it being NULL and releases the mutex in that case. You are correct.

[PULL 07/17] hw/other: spelling fixes

2023-09-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Peter Maydell --- hw/acpi/aml-build.c | 6 +++--- hw/acpi/hmat.c | 2 +- hw/acpi/nvdimm.c | 2 +- hw/block/hd-geometry.c | 4 ++-- hw/block/pflash_cfi01.c | 2 +-

[PULL 11/17] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS

2023-09-21 Thread Michael Tokarev
From: Dave Jiang According to ACPI spec 6.5 5.2.28.4 System Locality Latency and Bandwidth Information Structure, if the "Entry Base Unit" is 1024 for BW and the matrix entry has the value of 100, the BW is 100 GB/s. So the entry_base_unit should be changed from 1000 to 1024 given the comment

[PULL 15/17] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-21 Thread Michael Tokarev
From: Jonathan Cameron This has been missing from the start. Assume it should match with cxl/cxl-component-utils.c as both were part of early postings from Ben. Reported-by: Philippe Mathieu-Daudé Acked-by: Dave Jiang Acked-by: Ira Weiny Reviewed-by: Fan Ni Signed-off-by: Jonathan Cameron

[PULL 08/17] subprojects: Use the correct .git suffix in the repository URLs

2023-09-21 Thread Michael Tokarev
From: Thomas Huth This avoids the warnings à la: "warning: redirecting to https://gitlab.com/qemu-project/xyz.git/; Signed-off-by: Thomas Huth Reviewed-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev --- subprojects/berkeley-softfloat-3.wrap | 2 +-

[PULL 05/17] hw/pci: spelling fixes

2023-09-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Peter Maydell --- hw/pci-bridge/cxl_downstream.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 2 +- hw/pci-host/bonito.c| 2 +- hw/pci-host/designware.c| 4 ++-- hw/pci-host/dino.c | 2 +-

[PULL 16/17] docs/cxl: Cleanout some more aarch64 examples.

2023-09-21 Thread Michael Tokarev
From: Jonathan Cameron These crossed with the previous fix to get rid of examples using aarch64 for which support is not yet upstream. Reviewed-by: Fan Ni Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1892 Signed-off-by: Jonathan Cameron Signed-off-by: Michael Tokarev ---

[PULL 09/17] hw/i386/pc: fix code comment on cumulative flash size

2023-09-21 Thread Michael Tokarev
From: Laszlo Ersek - The comment is incorrectly indented / formatted. - The comment states a 8MB limit, even though the code enforces a 16MB limit. Both of these warts come from commit 0657c657eb37 ("hw/i386/pc: add max combined fw size as machine configuration option", 2020-12-09); clean

[PULL 10/17] hw/cxl: Fix CFMW config memory leak

2023-09-21 Thread Michael Tokarev
From: Li Zhijian Allocate targets and targets[n] resources when all sanity checks are passed to avoid memory leaks. Cc: qemu-sta...@nongnu.org Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Li Zhijian Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jonathan Cameron Reviewed-by: Fan

Re: [PATCH 4/4] target/i386: add live migration support for FRED

2023-09-21 Thread Yang, Weijiang
On 9/1/2023 1:30 PM, Li, Xin3 wrote: FRED CPU states are managed in 10 FRED MSRs, in addtion to a few existing CPU registers and MSRs, e.g., the CR4.FRED bit. Add the 10 new FRED MSRs to x86 CPUArchState for live migration support. Tested-by: Shan Kang Signed-off-by: Xin Li ---

Re: [PATCH v3] hw/i386/pc: improve physical address space bound check for 32-bit systems

2023-09-21 Thread Ani Sinha
> On 21-Sep-2023, at 12:47 PM, Ani Sinha wrote: > > 32-bit systems do not have a reserved memory for hole64 and hotplugging memory > devices are not supported on those systems. Therefore, the maximum limit of > the > guest physical address in the absence of additional memory devices

[PATCH] Revert "tap: setting error appropriately when calling net_init_tap_one()"

2023-09-21 Thread Akihiko Odaki
This reverts commit 46d4d36d0bf2b24b205f2f604f0905db80264eef. The reverted commit changed to emit warnings instead of errors when vhost is requested but vhost initialization fails if vhostforce option is not set. However, vhostforce is not meant to ignore vhost errors. It was once introduced as

Re: [PATCH 11/52] migration/rdma: Drop rdma_add_block() error handling

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > rdma_add_block() can't fail. Return void, and drop the unreachable > error handling. > > Signed-off-by: Markus Armbruster > --- > migration/rdma.c | 30 +- > 1 file changed, 9 insertions(+), 21 deletions(-) >

Re: [PATCH v2 01/10] qga: Remove platform GUID definitions

2023-09-21 Thread Konstantin Kostiuk
Hi Akihiko, Thanks for ping. I will merge this commit with other qga fixes. Best Regards, Konstantin Kostiuk. On Thu, Sep 21, 2023 at 10:58 AM Akihiko Odaki wrote: > On 2022/11/17 18:45, Konstantin Kostiuk wrote: > > Reviewed-by: Konstantin Kostiuk > > > > > >

Re: [PATCH] amd_iommu: Fix APIC address check

2023-09-21 Thread Philippe Mathieu-Daudé
Hi Akihiko, Adding Peter. On 9/9/23 18:23, Akihiko Odaki wrote: An MSI from I/O APIC may not exactly equal to APIC_DEFAULT_ADDRESS. In fact, Windows 17763.3650 configures I/O APIC to set the dest_mode bit. Check only the 12 bits that are known to be fixed for I/O APIC-generated MSIs. Fixes:

Re: [PATCH] cutils: Fix get_relocated_path on Windows

2023-09-21 Thread Philippe Mathieu-Daudé
On 31/10/22 01:59, Akihiko Odaki wrote: get_relocated_path() did not have error handling for PathCchSkipRoot() because a path given to get_relocated_path() was expected to be a valid path containing a drive letter or UNC server/share path elements on Windows, but sometimes it turned out

Re: [PATCH v3 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-21 Thread Philippe Mathieu-Daudé
On 21/9/23 14:13, Markus Armbruster wrote: Variables declared in macros can shadow other variables. Much of the time, this is harmless, e.g.: #define _FDT(exp) \ do { \

RE: [PATCH v1 09/22] vfio/container: Introduce vfio_[attach/detach]_device

2023-09-21 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, September 21, 2023 5:45 PM >Subject: Re: [PATCH v1 09/22] vfio/container: Introduce >vfio_[attach/detach]_device > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> From: Eric Auger >> >> We want the VFIO devices to be able to use

RE: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-09-21 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, September 21, 2023 4:42 PM >Subject: Re: [PATCH v1 05/22] vfio/common: Extract out >vfio_kvm_device_[add/del]_fd > >On 9/20/23 13:49, Eric Auger wrote: >> Hi Zhenzhong, >> >> On 8/30/23 12:37, Zhenzhong Duan wrote: >>>

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-09-21 Thread Kishon Vijay Abraham I
+Vaishnav Hi Shunsuke, On 8/18/2023 7:16 PM, Shunsuke Mie wrote: Hi all, We are proposing to add a new test syste to Linux for PCIe Endpoint. That can be run on QEMU without real hardware. At present, partially we have confirmed that pci-epf-test is working, but it is not yet complete.

[PATCH v3 7/8] util: Remove qemu_get_local_state_dir()

2023-09-21 Thread Akihiko Odaki
There are no users of the function anymore. Signed-off-by: Akihiko Odaki --- include/qemu/osdep.h | 8 util/oslib-posix.c | 6 -- util/oslib-win32.c | 10 -- 3 files changed, 24 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index

[PULL v2 19/22] parallels: naive implementation of parallels_co_pdiscard

2023-09-21 Thread Denis V. Lunev
* Discarding with backing stores is not supported by the format. * There is no buffering/queueing of the discard operation. * Only operations aligned to the cluster are supported. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 46

[PATCH v3 3/8] contrib/rdmacm-mux: Use qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
qemu_get_runtime_dir() is used to construct the default Unix socket path. Signed-off-by: Akihiko Odaki --- contrib/rdmacm-mux/main.c | 22 ++ contrib/rdmacm-mux/meson.build | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git

[PULL v2 14/22] tests: test self-cure of parallels image with duplicated clusters

2023-09-21 Thread Denis V. Lunev
The test is quite similar with the original one for duplicated clusters. There is the only difference in the operation which should fix the image. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 36 +++

[PULL v2 02/22] parallels: mark driver as supporting CBT

2023-09-21 Thread Denis V. Lunev
Parallels driver indeed support Parallels Dirty Bitmap Feature in read-only mode. The patch adds bdrv_supports_persistent_dirty_bitmap() callback which always return 1 to indicate that. This will allow to copy CBT from Parallels image with qemu-img. Note: read-write support is signalled through

[PULL v2 03/22] parallels: fix memory leak in parallels_open()

2023-09-21 Thread Denis V. Lunev
We should free opts allocated through qemu_opts_create() at the end. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index 428f72de1c..af7be427c9 100644 ---

[PULL v2 05/22] parallels: return earler in fail_format branch in parallels_open()

2023-09-21 Thread Denis V. Lunev
We do not need to perform any deallocation/cleanup if wrong format is detected. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index

[PULL v2 01/22] parallels: fix formatting in bdrv_parallels initialization

2023-09-21 Thread Denis V. Lunev
Old code is ugly and contains tabulations. There are no functional changes in this patch. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git

Re: [PATCH 02/52] migration/rdma: Clean up qemu_rdma_data_init()'s return type

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_data_init() return type is void *. It actually returns > RDMAContext *, and all its callers assign the value to an > RDMAContext *. Unclean. > > Return RDMAContext * instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Li

Re: [PATCH 03/52] migration/rdma: Clean up rdma_delete_block()'s return type

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > rdma_delete_block() always returns 0, which its only caller ignores. > Return void instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian

[PATCH v3 4/8] qga: Use qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
qemu_get_runtime_dir() is used to construct the default state directory. Signed-off-by: Akihiko Odaki --- qga/main.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qga/main.c b/qga/main.c index 8668b9f3d3..145ee02df3 100644 --- a/qga/main.c +++ b/qga/main.c @@

[PULL v2 11/22] parallels: add test which will validate data_off fixes through repair

2023-09-21 Thread Denis V. Lunev
We have only check through self-repair and that proven to be not enough. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 17 + tests/qemu-iotests/tests/parallels-checks.out | 18 ++ 2 files changed,

[PULL v2 13/22] tests: fix broken deduplication check in parallels format test

2023-09-21 Thread Denis V. Lunev
Original check is broken as supposed reading from 2 different clusters results in read from the same file offset twice. This is definitely wrong. We should be sure that * the content of both clusters is correct after repair * clusters are at the different offsets after repair In order to check

[PULL v2 17/22] parallels: naive implementation of allocate_clusters with used bitmap

2023-09-21 Thread Denis V. Lunev
The access to the bitmap is not optimized completely. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 51 --- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/block/parallels.c b/block/parallels.c

Re: [PATCH v2 01/10] qga: Remove platform GUID definitions

2023-09-21 Thread Akihiko Odaki
On 2022/11/17 18:45, Konstantin Kostiuk wrote: Reviewed-by: Konstantin Kostiuk > Will merge this patch in QGA series On Thu, Nov 10, 2022 at 12:06 PM Akihiko Odaki > wrote: GUID_DEVINTERFACE_DISK and

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-21 Thread Jeuk Kim
On 2023-09-15 4:59 PM, Paolo Bonzini wrote: On 9/15/23 00:19, Jeuk Kim wrote: First, ufs-lu has a feature called "unit descriptor". This feature shows the status of the ufs-lu and only works with UFS-specific "query request" commands, not SCSI commands. This looks like something that can

Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM

2023-09-21 Thread Xiaoyao Li
On 9/20/2023 11:42 PM, Markus Armbruster wrote: David Hildenbrand writes: On 20.09.23 16:35, Xiaoyao Li wrote: On 9/20/2023 3:30 PM, Markus Armbruster wrote: Xiaoyao Li writes: On 9/19/2023 5:46 PM, Markus Armbruster wrote: Xiaoyao Li writes: From: Isaku Yamahata Add a new property

Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM

2023-09-21 Thread David Hildenbrand
I think as long as there is no demand to have a TDX guest with this property be set to "off", then just don't add it. With a TDX VM, it will can be implicitly active. If we ever have to disable it for selective memory backends, we can add the property and have something like on/off/auto. For

[PATCH v3 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-21 Thread Markus Armbruster
Variables declared in macros can shadow other variables. Much of the time, this is harmless, e.g.: #define _FDT(exp) \ do { \ int ret = (exp);

[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-21 Thread Markus Armbruster
qemu_rdma_save_page() reports polling error with error_report(), then succeeds anyway. This is because the variable holding the polling status *shadows* the variable the function returns. The latter remains zero. Broken since day one, and duplicated more recently. Fixes: 2da776db4846 (rdma:

  1   2   3   >