RE: [PATCH RFC v1 3/3] vfio/pci: dynamic MSI-X allocation in interrupt restoring

2023-08-01 Thread Liu, Jing2
Hi Alex, > On July 28, 2023 1:25 AM, Alex Williamson wrote: > > On Thu, 27 Jul 2023 03:24:10 -0400 > Jing Liu wrote: > > > During migration restoring, vfio_enable_vectors() is called to restore > > enabling MSI-X interrupts for assigned devices. It sets the range from > > 0 to nr_vectors to ke

Re: [PATCH 0/8] Adds CPU hot-plug support to Loongarch

2023-08-01 Thread lixianglai
Hi,  Salil On 2023/7/27 pm 10:51, Salil Mehta wrote: Hello, From: lixianglai Sent: Thursday, July 27, 2023 3:14 AM To: Gavin Shan ; qemu-devel@nongnu.org; Salil Mehta ; zhukeqian ; Bibo Mao Subject: Re: [PATCH 0/8] Adds CPU hot-plug support to Loongarch Hi Gavin and Salil, On 7/27/23 8:57

Re: [RFC] migration/block-dirty-bitmap: make loading bitmap for device with iothread future-proof

2023-08-01 Thread Fiona Ebner
Am 31.07.23 um 09:35 schrieb Juan Quintela: > Fiona Ebner wrote: >> The bdrv_create_dirty_bitmap() function (which is also called by >> bdrv_dirty_bitmap_create_successor()) uses bdrv_getlength(bs). This is >> a wrapper around a coroutine, and when not called in coroutine context >> would use bdrv

Re: [PATCH 1/8] Update ACPI GED framework to support vcpu hot-(un)plug

2023-08-01 Thread lixianglai
Hi, Igor Mammedov : On 7/28/23 7:45 PM, Igor Mammedov wrote: On Thu, 20 Jul 2023 15:15:06 +0800 xianglai li wrote: ACPI GED shall be used to convey to the guest kernel about any cpu hot-(un)plug events. Therefore, existing ACPI GED framework inside QEMU needs to be enhanced to support CPU hot

Re: [PATCH 2/8] Update CPUs AML with cpu-(ctrl)dev change

2023-08-01 Thread lixianglai
Hi, Igor Mammedov : On 7/28/23 7:55 PM, Igor Mammedov wrote: On Thu, 20 Jul 2023 15:15:07 +0800 xianglai li wrote: CPUs Control device(\\_SB.PCI0) register interface for the x86 arch is based on PCI and is IO port based and hence existing cpus AML code assumes _CRS objects would evaluate to a

Re: [PATCH 3/8] Introduced a new function to disconnect GPIO connections

2023-08-01 Thread lixianglai
Hi, Igor Mammedov: On 7/28/23 7:59 PM, Igor Mammedov wrote: On Thu, 20 Jul 2023 15:15:08 +0800 xianglai li wrote: It introduces a new function to unwire the vcpu<->exioi interrupts for the vcpu hot-(un)plug cases. it's not a new function. You probably wanted to say: subj: make foo() public

RE: [RFC PATCH v4 00/24] vfio: Adopt iommufd

2023-08-01 Thread Duan, Zhenzhong
Ping, any comments or suggestions are appreciated. Thanks Zhenzhong >-Original Message- >From: Duan, Zhenzhong >Sent: Wednesday, July 12, 2023 3:25 PM >To: qemu-devel@nongnu.org >Cc: alex.william...@redhat.com; c...@redhat.com; j...@nvidia.com; >nicol...@nvidia.com; eric.au...@redhat.com

Re: [RESEND PATCH] hw/i386/vmmouse:add relative packet flag for button status

2023-08-01 Thread Marc-André Lureau
On Tue, Aug 1, 2023 at 9:45 AM Zongmin Zhou wrote: > > The buttons value use macros instead of direct numbers. > > If request relative mode, have to add this for > guest vmmouse driver to judge this is a relative packet. > otherwise,vmmouse driver will not match > the condition 'status & VMMOUSE_R

[PATCH 1/2] vmmouse: replace DPRINTF with tracing

2023-08-01 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/i386/vmmouse.c| 29 ++--- hw/i386/trace-events | 10 ++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index a56c185f15..fce13a5cde 100644

[PATCH 2/2] vmmouse: use explicit code

2023-08-01 Thread marcandre . lureau
From: Marc-André Lureau It's weird to shift x & y without obvious reason. Let's make this more explicit and future-proof. Signed-off-by: Marc-André Lureau --- hw/i386/vmmouse.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmous

[PULL 4/5] xen: Don't pass MemoryListener around by value

2023-08-01 Thread Anthony PERARD via
From: Peter Maydell Coverity points out (CID 1513106, 1513107) that MemoryListener is a 192 byte struct which we are passing around by value. Switch to passing a const pointer into xen_register_ioreq() and then to xen_do_ioreq_register(). We can also make the file-scope MemoryListener variables

[PULL 3/5] thread-pool: signal "request_cond" while locked

2023-08-01 Thread Anthony PERARD via
From: Anthony PERARD thread_pool_free() might have been called on the `pool`, which would be a reason for worker_thread() to quit. In this case, `pool->request_cond` is been destroyed. If worker_thread() didn't managed to signal `request_cond` before it been destroyed by thread_pool_free(), we g

[PULL 2/5] xen-block: Avoid leaks on new error path

2023-08-01 Thread Anthony PERARD via
From: Anthony PERARD Commit 189829399070 ("xen-block: Use specific blockdev driver") introduced a new error path, without taking care of allocated resources. So only allocate the qdicts after the error check, and free both `filename` and `driver` when we are about to return and thus taking care

[PULL 1/5] hw/xen: Clarify (lack of) error handling in transaction_commit()

2023-08-01 Thread Anthony PERARD via
From: David Woodhouse Coverity was unhappy (CID 1508359) because we didn't check the return of init_walk_op() in transaction_commit(), despite doing so at every other call site. Strictly speaking, this is a false positive since it can never fail. It only fails for invalid user input (transaction

[PULL 5/5] xen-platform: do full PCI reset during unplug of IDE devices

2023-08-01 Thread Anthony PERARD via
From: Olaf Hering The IDE unplug function needs to reset the entire PCI device, to make sure all state is initialized to defaults. This is done by calling pci_device_reset, which resets not only the chip specific registers, but also all PCI state. This fixes "unplug" in a Xen HVM domU with the mo

[PULL 0/5] Misc fixes, for thread-pool, xen, and xen-emulate

2023-08-01 Thread Anthony PERARD via
.git tags/pull-xen-20230801 for you to fetch changes up to 856ca10f9ce1fcffeab18546b36a64f79017c905: xen-platform: do full PCI reset during unplug of IDE devices (2023-08-01 10:22:33 +0100) Misc fixes, for thread-pool, xen, and x

[PATCH v3 02/17] tests: Rename test-x86-cpuid.c to test-x86-topo.c

2023-08-01 Thread Zhao Liu
From: Zhao Liu In fact, this unit tests APIC ID other than CPUID. Rename to test-x86-topo.c to make its name more in line with its actual content. Signed-off-by: Zhao Liu Tested-by: Yongwei Ma Reviewed-by: Philippe Mathieu-Daudé --- Changes since v1: * Rename test-x86-apicid.c to test-x86-to

[PATCH v3 03/17] softmmu: Fix CPUSTATE.nr_cores' calculation

2023-08-01 Thread Zhao Liu
From: Zhuocheng Ding >From CPUState.nr_cores' comment, it represents "number of cores within this CPU package". After 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology"), the meaning of smp.cores changed to "the number of cores in one die", but this commit missed

[PATCH v3 00/17] Support smp.clusters for x86

2023-08-01 Thread Zhao Liu
From: Zhao Liu Hi list, This is the our v3 patch series, rebased on the master branch at the commit 234320cd0573 ("Merge tag 'pull-target-arm-20230731' of https: //git.linaro.org/people/pmaydell/qemu-arm into staging"). Comparing with v2 [1], v3 mainly adds "Tested-by", "Reviewed-by" and "ACKed

[PATCH v3 09/17] i386: Support module_id in X86CPUTopoIDs

2023-08-01 Thread Zhao Liu
From: Zhuocheng Ding Add module_id member in X86CPUTopoIDs. module_id can be parsed from APIC ID, so also update APIC ID parsing rule to support module level. With this support, the conversions with module level between X86CPUTopoIDs, X86CPUTopoInfo and APIC ID are completed. module_id can be a

[PATCH v3 01/17] i386: Fix comment style in topology.h

2023-08-01 Thread Zhao Liu
From: Zhao Liu For function comments in this file, keep the comment style consistent with other places. Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin --- include/hw/i386/topology.h | 33 + 1 file changed, 17 insertion

[PATCH v3 07/17] i386: Introduce module-level cpu topology to CPUX86State

2023-08-01 Thread Zhao Liu
From: Zhuocheng Ding smp command has the "clusters" parameter but x86 hasn't supported that level. "cluster" is a CPU topology level concept above cores, in which the cores may share some resources (L2 cache or some others like L3 cache tags, depending on the Archs) [1][2]. For x86, the resource

[PATCH v3 10/17] i386/cpu: Introduce cluster-id to X86CPU

2023-08-01 Thread Zhao Liu
From: Zhuocheng Ding We introduce cluster-id other than module-id to be consistent with CpuInstanceProperties.cluster-id, and this avoids the confusion of parameter names when hotplugging. Following the legacy smp check rules, also add the cluster_id validity into x86_cpu_pre_plug(). Signed-off

[PATCH v3 08/17] i386: Support modules_per_die in X86CPUTopoInfo

2023-08-01 Thread Zhao Liu
From: Zhuocheng Ding Support module level in i386 cpu topology structure "X86CPUTopoInfo". Since x86 does not yet support the "clusters" parameter in "-smp", X86CPUTopoInfo.modules_per_die is currently always 1. Therefore, the module level width in APIC ID, which can be calculated by "apicid_bit

[PATCH v3 15/17] i386: Fix NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2023-08-01 Thread Zhao Liu
From: Zhao Liu The commit 8f4202fb1080 ("i386: Populate AMD Processor Cache Information for cpuid 0x801D") adds the cache topology for AMD CPU by encoding the number of sharing threads directly. >From AMD's APM, NumSharingCache (CPUID[0x801D].EAX[bits 25:14]) means [1]: The number of lo

[PATCH v3 12/17] hw/i386/pc: Support smp.clusters for x86 PC machine

2023-08-01 Thread Zhao Liu
From: Zhuocheng Ding As module-level topology support is added to X86CPU, now we can enable the support for the cluster parameter on PC machines. With this support, we can define a 5-level x86 CPU topology with "-smp": -smp cpus=*,maxcpus=*,sockets=*,dies=*,clusters=*,cores=*,threads=*. Additio

[PATCH v3 16/17] i386: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2023-08-01 Thread Zhao Liu
From: Zhao Liu CPUID[0x801D].EAX[bits 25:14] is used to represent the cache topology for amd CPUs. After cache models have topology information, we can use CPUCacheInfo.share_level to decide which topology level to be encoded into CPUID[0x801D].EAX[bits 25:14]. Signed-off-by: Zhao Liu

[PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-08-01 Thread Zhao Liu
From: Zhao Liu CPUID[4].EAX[bits 25:14] is used to represent the cache topology for intel CPUs. After cache models have topology information, we can use CPUCacheInfo.share_level to decide which topology level to be encoded into CPUID[4].EAX[bits 25:14]. And since maximum_processor_id (original

[PATCH v3 04/17] i386/cpu: Fix i/d-cache topology to core level for Intel CPU

2023-08-01 Thread Zhao Liu
From: Zhao Liu For i-cache and d-cache, the maximum IDs for CPUs sharing cache ( CPUID.04H.00H:EAX[bits 25:14] and CPUID.04H.01H:EAX[bits 25:14]) are both 0, and this means i-cache and d-cache are shared in the SMT level. This is correct if there's single thread per core, but is wrong for the hyp

[PATCH v3 13/17] i386: Add cache topology info in CPUCacheInfo

2023-08-01 Thread Zhao Liu
From: Zhao Liu Currently, by default, the cache topology is encoded as: 1. i/d cache is shared in one core. 2. L2 cache is shared in one core. 3. L3 cache is shared in one die. This default general setting has caused a misunderstanding, that is, the cache topology is completely equated with a sp

[PATCH v3 17/17] i386: Add new property to control L2 cache topo in CPUID.04H

2023-08-01 Thread Zhao Liu
From: Zhao Liu The property x-l2-cache-topo will be used to change the L2 cache topology in CPUID.04H. Now it allows user to set the L2 cache is shared in core level or cluster level. If user passes "-cpu x-l2-cache-topo=[core|cluster]" then older L2 cache topology will be overrided by the new

[PATCH v3 06/17] i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid()

2023-08-01 Thread Zhao Liu
From: Zhao Liu In cpu_x86_cpuid(), there are many variables in representing the cpu topology, e.g., topo_info, cs->nr_cores/cs->nr_threads. Since the names of cs->nr_cores/cs->nr_threads does not accurately represent its meaning, the use of cs->nr_cores/cs->nr_threads is prone to confusion and m

[PATCH v3 05/17] i386/cpu: Use APIC ID offset to encode cache topo in CPUID[4]

2023-08-01 Thread Zhao Liu
From: Zhao Liu Refer to the fixes of cache_info_passthrough ([1], [2]) and SDM, the CPUID.04H:EAX[bits 25:14] and CPUID.04H:EAX[bits 31:26] should use the nearest power-of-2 integer. The nearest power-of-2 integer can be caculated by pow2ceil() or by using APIC ID offset (like L3 topology using

[PATCH v3 11/17] tests: Add test case of APIC ID for module level parsing

2023-08-01 Thread Zhao Liu
From: Zhuocheng Ding After i386 supports module level, it's time to add the test for module level's parsing. Signed-off-by: Zhuocheng Ding Co-developed-by: Zhao Liu Signed-off-by: Zhao Liu Tested-by: Yongwei Ma Reviewed-by: Yanan Wang Acked-by: Michael S. Tsirkin --- tests/unit/test-x86-t

Re: [PATCH 0/5] linux-user: brk/mmap fixes

2023-08-01 Thread Helge Deller
On 8/1/23 06:49, Joel Stanley wrote: On Mon, 31 Jul 2023 at 18:24, Helge Deller wrote: As suggested, I've based my patches on top of yours and the tree can be pulled from: git pull https://github.com/hdeller/qemu-hppa/ brk-fixes-akihiko-2 My patches are neccessary to fix an arm-static testca

Re: [PATCH for-8.2 v2 5/6] vfio/migration: Add P2P support for VFIO migration

2023-08-01 Thread Cédric Le Goater
On 7/31/23 12:25, Avihai Horon wrote: VFIO migration uAPI defines an optional intermediate P2P quiescent state. While in the P2P quiescent state, P2P DMA transactions cannot be initiated by the device, but the device can respond to incoming ones. Additionally, all outstanding P2P transactions are

Re: [PATCH for-8.2 v2 2/6] sysemu: Add prepare callback to struct VMChangeStateEntry

2023-08-01 Thread Cédric Le Goater
On 7/31/23 12:25, Avihai Horon wrote: Add prepare callback to struct VMChangeStateEntry. The prepare callback is optional and can be set by the new function qemu_add_vm_change_state_handler_prio_full() that allows setting this callback in addition to the main callback. The prepare callbacks and

Re: [PATCH for-8.2 v2 6/6] vfio/migration: Allow migration of multiple P2P supporting devices

2023-08-01 Thread Cédric Le Goater
On 7/31/23 12:25, Avihai Horon wrote: Now that P2P support has been added to VFIO migration, allow migration of multiple devices if all of them support P2P migration. Single device migration is allowed regardless of P2P migration support. Signed-off-by: Avihai Horon Signed-off-by: Joao Martins

Re: [PATCH for-8.2 v2 3/6] qdev: Add qdev_add_vm_change_state_handler_full()

2023-08-01 Thread Cédric Le Goater
On 7/31/23 12:25, Avihai Horon wrote: Add qdev_add_vm_change_state_handler_full() variant that allows setting a prepare callback in addition to the main callback. This will facilitate adding P2P support for VFIO migration in the following patches. Signed-off-by: Avihai Horon Signed-off-by: Joa

Re: [PATCH] target/nios2: Pass semihosting arg to exit

2023-08-01 Thread Peter Maydell
On Mon, 31 Jul 2023 at 23:42, Keith Packard via wrote: > > Instead of using the function number (which is always zero), fetch the > application-provided exit code argument and pass that to the two exit > functions. > > Signed-off-by: Keith Packard > --- > target/nios2/nios2-semi.c | 5 +++-- > 1

Re: [PATCH] target/nios2: Fix semihost lseek offset computation

2023-08-01 Thread Peter Maydell
On Tue, 1 Aug 2023 at 00:53, Keith Packard via wrote: > > The arguments for deposit64 are (value, start, length, fieldval); this > appears to have thought they were (value, fieldval, start, > length). Reorder the parameters to match the actual function. > > Signed-off-by: Keith Packard > --- > t

Re: [PATCH QEMU 1/2] qapi: Reformat and craft the migration doc comments

2023-08-01 Thread Markus Armbruster
Yong Huang writes: > On Fri, Jul 28, 2023 at 3:49 PM Markus Armbruster wrote: > >> ~hyman writes: >> >> > From: Hyman Huang(黄勇) >> > >> > Reformat migration doc comments to conform to current conventions >> > as commit a937b6aa739 (qapi: Reformat doc comments to conform to >> > current convent

Re: [PATCH QEMU v3 1/3] qapi: Reformat the dirty-limit migration doc comments

2023-08-01 Thread Markus Armbruster
~hyman writes: > From: Hyman Huang(黄勇) > > Reformat the dirty-limit migration doc comments to conform > to current conventions as commit a937b6aa739 (qapi: Reformat > doc comments to conform to current conventions). > > Signed-off-by: Markus Armbruster Unexpected S-o-b. Accident? > Signed-of

Re: [PATCH v3 3/3] cpu, softmmu/vl.c: Change parsing of -cpu argument to allow -cpu cpu, help to print options for the CPU type similar to how the '-device' option works.

2023-08-01 Thread Dinah B
Just realized that the commit message on this one got a little mangled. I'm happy to revise it but I'd prefer to get the code reviewed first before doing a purely commit message change. -Dinah On Sun, Jul 30, 2023 at 2:41 AM Dinah Baum wrote: > Resolves: https://gitlab.com/qemu-project/qemu/-/i

[PATCH 3/8] gitlab: always use updated msys installer

2023-08-01 Thread Daniel P . Berrangé
We current reference an msys installer binary from mid-2022, which means after installation, it immediately has to re-download a bunch of newer content. This wastes precious CI time. The msys project publishes an installer binary with a fixed URL that always references the latest content. We cache

[PATCH 5/8] gitlab: always populate cache for windows msys jobs

2023-08-01 Thread Daniel P . Berrangé
The cache is used to hold the msys installer. Even if the build phase fails, we should still populate the cache as the installer will be valid for next time. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.d/windows.ym

[PATCH 6/8] configure: support passthrough of -Dxxx args to meson

2023-08-01 Thread Daniel P . Berrangé
This can be useful for setting some meson global options, such as the optimization level or debug state.xs Signed-off-by: Daniel P. Berrangé --- configure | 5 + 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 26ec5e4f54..9fe3718b77 100755 --- a/configure +++ b/conf

[PATCH 8/8] gitlab: disable FF_SCRIPT_SECTIONS on msys jobs

2023-08-01 Thread Daniel P . Berrangé
The FF_SCRIPT_SECTIONS=1 variable should ordinarily cause output from each line of the job script to be presented in a collapsible section with execution time listed. While it works on Linux shared runners, when used with Windows runners with PowerShell, this option does not create any sections, a

[PATCH 2/8] gitlab: print timestamps during windows msys jobs

2023-08-01 Thread Daniel P . Berrangé
It is hard to get visibility into where time is consumed in our Windows msys jobs. Adding a few log console messages with the timestamp will aid in our debugging. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/windows.yml | 5 + 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.d/

[PATCH 7/8] gitlab: disable optimization and debug symbols in msys build

2023-08-01 Thread Daniel P . Berrangé
Building at -O2, adds 33% to the build time, over -O2. IOW a build that takes 45 minutes at -O0, takes 60 minutes at -O2. Turning off debug symbols drops it further, down to 38 minutes. IOW, a "-O2 -g" build is 58% slower than a "-O0" build on msys in the gitlab CI windows shared runners. Signed-

[PATCH 4/8] gitlab: drop $CI_PROJECT_DIR from cache path

2023-08-01 Thread Daniel P . Berrangé
The gitlab cache is limited to only handle content within the $CI_PROJECT_DIR hierarchy, and as such relative paths are always implicitly relative to $CI_PROJECT_DIR. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/8] gitlab: remove duplication between msys jobs

2023-08-01 Thread Daniel P . Berrangé
Although they share a common parent, the two msys jobs still have massive duplication in their script definitions that can easily be collapsed. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/windows.yml | 132 +++ 1 file changed, 49 insertions(+), 83 delet

[PATCH 0/8] gitlab: speed up msys windows jobs with GCC

2023-08-01 Thread Daniel P . Berrangé
This is an alternative and/or complementary to Thomas' proposal to use CLang with msys: https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg05402.html First of all, the current msys installer we're using is over 12 months out of date. Thus after running the install, pacman then replaces mo

Re: [PATCH v3 1/3] qapi: Moved architecture agnostic data types to `machine`

2023-08-01 Thread Markus Armbruster
Dinah Baum writes: > Signed-off-by: Dinah Baum > --- > qapi/machine-target.json | 78 +--- > qapi/machine.json| 77 +++ > 2 files changed, 78 insertions(+), 77 deletions(-) > > diff --git a/qapi/machine-target.json

Re: [PATCH] target/nios2: Fix semihost lseek offset computation

2023-08-01 Thread Philippe Mathieu-Daudé
On 1/8/23 14:06, Peter Maydell wrote: On Tue, 1 Aug 2023 at 00:53, Keith Packard via wrote: The arguments for deposit64 are (value, start, length, fieldval); this appears to have thought they were (value, fieldval, start, length). Reorder the parameters to match the actual function. Signed-of

Re: [PATCH for-8.2 v2 5/6] vfio/migration: Add P2P support for VFIO migration

2023-08-01 Thread Avihai Horon
On 01/08/2023 15:02, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 7/31/23 12:25, Avihai Horon wrote: VFIO migration uAPI defines an optional intermediate P2P quiescent state. While in the P2P quiescent state, P2P DMA transactions cannot be initiated by

Re: [RFC PATCH 5/6] include/qemu/compiler: Fix problem with gcc_struct and Clang

2023-08-01 Thread Philippe Mathieu-Daudé
On 31/7/23 19:25, Daniel P. Berrangé wrote: On Mon, Jul 31, 2023 at 04:10:36PM +0200, Philippe Mathieu-Daudé wrote: On 31/7/23 11:32, Daniel P. Berrangé wrote: I was surprised to see that we're not using ccache in gitlab CI. It wouldn't help the from-clean compile time, but thereafter it ought

Re: [RFC PATCH 6/6] gitlab-ci.d/windows: Use Clang for compiling in the 64-bit MSYS2 job

2023-08-01 Thread Philippe Mathieu-Daudé
On 31/7/23 16:43, Thomas Huth wrote: On 31/07/2023 16.23, Philippe Mathieu-Daudé wrote: On 28/7/23 16:27, Thomas Huth wrote: We are struggeling with timeouts in the 64-bit MSYS2 job. Clang seems to be a little bit faster, so let's use this compiler now instead. There is a problem with compilin

Re: [PATCH 1/2] vmmouse: replace DPRINTF with tracing

2023-08-01 Thread Philippe Mathieu-Daudé
On 1/8/23 11:39, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/i386/vmmouse.c| 29 ++--- hw/i386/trace-events | 10 ++ 2 files changed, 24 insertions(+), 15 deletions(-) static uint32_t vmmouse_g

Re: [RFC PATCH 0/6] Use Clang for compiling in the 64-bit MSYS2 job

2023-08-01 Thread Daniel P . Berrangé
On Fri, Jul 28, 2023 at 04:27:42PM +0200, Thomas Huth wrote: > The 64-bit MSYS2 job often times out in our CI, though we already have > limited it to a very minimum by using --without-default-devices etc. > GCC is incredibly slow here. By using Clang instead of GCC, the job > is ca. 15 minutes fast

Re: [PATCH v3 2/3] qapi, target/: Enable 'query-cpu-model-expansion' on all architectures

2023-08-01 Thread Markus Armbruster
Dinah Baum writes: > Only architectures that implement the command will return > results, others will return an error message as before. A brief explanation why this is useful would be nice. > > Signed-off-by: Dinah Baum > --- > cpu.c| 20 +++ > include/exe

Re: [RFC PATCH 5/6] include/qemu/compiler: Fix problem with gcc_struct and Clang

2023-08-01 Thread Daniel P . Berrangé
On Mon, Jul 31, 2023 at 11:05:42AM +0100, Peter Maydell wrote: > On Mon, 31 Jul 2023 at 10:11, Thomas Huth wrote: > > Or do you see another possibility how we could fix that timeout problem in > > the 64-bit MSYS2 job? Still switching to clang, but compiling with > > --extra-cflags="-Wno-unknown-a

Re: [PATCH 0/8] gitlab: speed up msys windows jobs with GCC

2023-08-01 Thread Markus Armbruster
Daniel P. Berrangé writes: > This is an alternative and/or complementary to Thomas' proposal > to use CLang with msys: > > https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg05402.html > > First of all, the current msys installer we're using is over 12 > months out of date. Thus after run

[PATCH] linux-user: Emulate /proc/cpuinfo on aarch64 and arm

2023-08-01 Thread Helge Deller
Add emulation for /proc/cpuinfo for arm architecture. The output below mimics output as seen on debian porterboxes. aarch64 output example: processor : 0 BogoMIPS: 100.00 Features: fp asimd evtstrm cpuid CPU implementer : 0x50 CPU architecture: 8 CPU variant : 0x0 CPU pa

Re: [PATCH v3 3/3] cpu, softmmu/vl.c: Change parsing of -cpu argument to allow -cpu cpu,help to print options for the CPU type similar to how the '-device' option works.

2023-08-01 Thread Markus Armbruster
Dinah Baum writes: > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1480 > Signed-off-by: Dinah Baum > > Signed-off-by: Dinah Baum Looks basically the same as v2, which means my review still applies. Message-ID: <878rdbfww1@pond.sub.org> https://lists.nongnu.org/archive/html/qemu

Re: [PATCH] linux-user: Emulate /proc/cpuinfo on aarch64 and arm

2023-08-01 Thread Peter Maydell
On Tue, 1 Aug 2023 at 14:57, Helge Deller wrote: > > Add emulation for /proc/cpuinfo for arm architecture. > The output below mimics output as seen on debian porterboxes. > +#if defined(TARGET_AARCH64) || defined(TARGET_ARM) > +static int open_cpuinfo(CPUArchState *cpu_env, int fd) > +{ > +i

Re: [PATCH 0/8] gitlab: speed up msys windows jobs with GCC

2023-08-01 Thread Daniel P . Berrangé
On Tue, Aug 01, 2023 at 03:53:22PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > This is an alternative and/or complementary to Thomas' proposal > > to use CLang with msys: > > > > https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg05402.html > > > > First of all, the

Re: [PATCH] linux-user: Emulate /proc/cpuinfo on aarch64 and arm

2023-08-01 Thread Helge Deller
On 8/1/23 16:22, Peter Maydell wrote: On Tue, 1 Aug 2023 at 14:57, Helge Deller wrote: Add emulation for /proc/cpuinfo for arm architecture. The output below mimics output as seen on debian porterboxes. +#if defined(TARGET_AARCH64) || defined(TARGET_ARM) +static int open_cpuinfo(CPUArchSta

Re: [PATCH] linux-user: Emulate /proc/cpuinfo on aarch64 and arm

2023-08-01 Thread Peter Maydell
On Tue, 1 Aug 2023 at 15:41, Helge Deller wrote: > > On 8/1/23 16:22, Peter Maydell wrote: > > On Tue, 1 Aug 2023 at 14:57, Helge Deller wrote: > >> > >> Add emulation for /proc/cpuinfo for arm architecture. > >> The output below mimics output as seen on debian porterboxes. > > > > > >> +#if defi

Re: [RFC PATCH 08/19] HostMem: Add private property to indicate to use kvm gmem

2023-08-01 Thread Xiaoyao Li
On 8/1/2023 1:22 AM, Markus Armbruster wrote: Xiaoyao Li writes: From: Isaku Yamahata Signed-off-by: Isaku Yamahata Signed-off-by: Xiaoyao Li [...] diff --git a/qapi/qom.json b/qapi/qom.json index 7f92ea43e8e1..e0b2044e3d20 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -605,6 +605,

Re: [PATCH] migration/calc-dirty-rate: millisecond precision period

2023-08-01 Thread gudkov . andrei--- via
On Mon, Jul 31, 2023 at 04:06:24PM -0400, Peter Xu wrote: > Hi, Andrei, > > On Mon, Jul 31, 2023 at 05:51:49PM +0300, gudkov.and...@huawei.com wrote: > > On Mon, Jul 17, 2023 at 03:08:37PM -0400, Peter Xu wrote: > > > On Tue, Jul 11, 2023 at 03:38:18PM +0300, gudkov.and...@huawei.com wrote: > > >

Re: [RFC PATCH 08/19] HostMem: Add private property to indicate to use kvm gmem

2023-08-01 Thread Daniel P . Berrangé
On Mon, Jul 31, 2023 at 07:22:05PM +0200, Markus Armbruster wrote: > Xiaoyao Li writes: > > > From: Isaku Yamahata > > > > Signed-off-by: Isaku Yamahata > > Signed-off-by: Xiaoyao Li > > [...] > > > diff --git a/qapi/qom.json b/qapi/qom.json > > index 7f92ea43e8e1..e0b2044e3d20 100644 > > --

[PATCH] linux-user: Fix openat() emulation to correctly detect accesses to /proc

2023-08-01 Thread Helge Deller
In qemu we catch accesses to files like /proc/cpuinfo or /proc/net/route and return to the guest contents which would be visible on a real system (instead what the host would show). This patch fixes a bug, where for example the accesses cat /proccpuinfo or cd /proc && cat cpuinfo will

Re: [PATCH v2 0/9] gfxstream + rutabaga_gfx

2023-08-01 Thread Alyssa Ross
I was able to replicate my existing crosvm cross-domain testing setup using QEMU, and all worked. I didn't test any other capsets. Tested-by: Alyssa Ross signature.asc Description: PGP signature

Re: [PATCH v2 9/9] docs/system: add basic virtio-gpu documentation

2023-08-01 Thread Alyssa Ross
Gurchetan Singh writes: > +virtio-gpu rutabaga > +--- > + > +virtio-gpu can also leverage `rutabaga_gfx`_ to provide `gfxstream`_ > rendering > +and `Wayland display passthrough`_. With the gfxstream rendering mode, GLES > +and Vulkan calls are forwarded directly to the host wit

Re: [PATCH] target/nios2: Pass semihosting arg to exit

2023-08-01 Thread Keith Packard via
> says that for HOSTED_EXIT the exit code is in r5, > not in a parameter block pointed to by r5. That > would imply that the correct change is to use > R_ARG1 rather than R_ARG0 here. Ah, thanks -- I hadn't managed to find the actual standard yet. I'll resubmit with that fixed. -- -keith sign

Re: [PATCH v2 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-01 Thread Alyssa Ross
Gurchetan Singh writes: > +static int virtio_gpu_rutabaga_init(VirtIOGPU *g, Error **errp) > +{ > +int result; > +uint64_t capset_mask; > +struct rutabaga_channels channels = { 0 }; > +struct rutabaga_builder builder = { 0 }; > + > +VirtIOGPURutabaga *vr = VIRTIO_GPU_RUTABAGA(

Re: [PATCH] target/nios2: Pass semihosting arg to exit

2023-08-01 Thread Peter Maydell
On Tue, 1 Aug 2023 at 16:10, Keith Packard wrote: > > > > says that for HOSTED_EXIT the exit code is in r5, > > not in a parameter block pointed to by r5. That > > would imply that the correct change is to use > > R_ARG1 rather than R_ARG0 here. > > Ah, thanks -- I hadn't managed to find the actua

Rutabaga backwards compatibility

2023-08-01 Thread Alyssa Ross
Gurchetan Singh writes: > On Mon, Jul 24, 2023 at 2:56 AM Alyssa Ross wrote: >> >> Gurchetan Singh writes: >> >> > In terms of API stability/versioning/packaging, once this series is >> > reviewed, the plan is to cut a "gfxstream upstream release branch". We >> > will have the same API guarant

[PATCH] target/nios2: Pass semihosting arg to exit

2023-08-01 Thread Keith Packard via
Instead of using R_ARG0 (the semihost function number), use R_ARG1 (the provided exit status). Signed-off-by: Keith Packard --- target/nios2/nios2-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index 3738774976

Re: [PATCH] target/nios2: Pass semihosting arg to exit

2023-08-01 Thread Peter Maydell
On Tue, 1 Aug 2023 at 16:23, Keith Packard via wrote: > > Instead of using R_ARG0 (the semihost function number), use R_ARG1 > (the provided exit status). > > Signed-off-by: Keith Packard > --- > target/nios2/nios2-semi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH] target/nios2: Pass semihosting arg to exit

2023-08-01 Thread Keith Packard via
> Yeah, the closest to a "standard" we have for nios2 is that > I asked the Codesourcery folks to document it in the libgloss > sources and put the URL to it in a comment at the top of > nios2-semi.c, given that there's no official spec and the > original and main guest-side user is libgloss. > m6

Re: [PATCH] target/nios2: Pass semihosting arg to exit

2023-08-01 Thread Peter Maydell
On Tue, 1 Aug 2023 at 16:28, Keith Packard wrote: > > > > Yeah, the closest to a "standard" we have for nios2 is that > > I asked the Codesourcery folks to document it in the libgloss > > sources and put the URL to it in a comment at the top of > > nios2-semi.c, given that there's no official spec

Re: [PATCH v3 00/17] Support smp.clusters for x86

2023-08-01 Thread Jonathan Cameron via
On Tue, 1 Aug 2023 18:35:10 +0800 Zhao Liu wrote: > From: Zhao Liu > > Hi list, > > This is the our v3 patch series, rebased on the master branch at the > commit 234320cd0573 ("Merge tag 'pull-target-arm-20230731' of https: > //git.linaro.org/people/pmaydell/qemu-arm into staging"). > > Comp

[PATCH] gdbstub: use 0 ("any process") on packets with no PID

2023-08-01 Thread Matheus Tavares Bernardino
Previously, qemu-user would always report PID 1 to GDB. This was changed at dc14a7a6e9 (gdbstub: Report the actual qemu-user pid, 2023-06-30), but read_thread_id() still considers GDB packets with "no PID" as "PID 1", which is not the qemu-user PID. Fix that by parsing "no PID" as "0", which the GD

Re: qemu-img cache modes with Linux cgroup v1

2023-08-01 Thread Stefan Hajnoczi
Hi Daniel, I agree with your points. Stefan signature.asc Description: PGP signature

[PATCH for-8.1] target/m68k: Fix semihost lseek offset computation

2023-08-01 Thread Peter Maydell
The arguments for deposit64 are (value, start, length, fieldval); this appears to have thought they were (value, fieldval, start, length). Reorder the parameters to match the actual function. Cc: qemu-sta...@nongnu.org Fixes: 950272506d ("target/m68k: Use semihosting/syscalls.h") Reported-by: Phil

[PATCH] target/m68k: Add URL to semihosting spec

2023-08-01 Thread Peter Maydell
The spec for m68k semihosting is documented in the libgloss sources. Add a comment with the URL for it, as we already have for nios2 semihosting. Signed-off-by: Peter Maydell --- target/m68k/m68k-semi.c | 4 1 file changed, 4 insertions(+) diff --git a/target/m68k/m68k-semi.c b/target/m68k

[PATCH 2/2] block/blkio: add more comments on the fd passing handling

2023-08-01 Thread Stefano Garzarella
As Hanna pointed out, it is not clear in the code why qemu_open() can fail, and why blkio_set_int("fd") is not enough to discover the `fd` property support. Let's fix them by adding more details in the code comments. Suggested-by: Hanna Czenczek Signed-off-by: Stefano Garzarella --- block/blki

Re: [PATCH v5 01/11] hw: arm: Add bananapi M2-Ultra and allwinner-r40 support

2023-08-01 Thread Peter Maydell
On Sat, 24 Jun 2023 at 16:02, Guenter Roeck wrote: > > On 6/24/23 07:23, Guenter Roeck wrote: > > On 6/24/23 03:40, Peter Maydell wrote: > >> On Fri, 23 Jun 2023 at 20:33, Guenter Roeck wrote: > >>> > >>> On 6/23/23 10:44, Peter Maydell wrote: > On Sat, 17 Jun 2023 at 17:29, Guenter Roeck w

[PATCH 1/2] block/blkio: close the fd when blkio_connect() fails

2023-08-01 Thread Stefano Garzarella
libblkio drivers take ownership of `fd` only after a successful blkio_connect(), so if it fails, we are still the owners. Fixes: cad2ccc395 ("block/blkio: use qemu_open() to support fd passing for virtio-blk") Suggested-by: Hanna Czenczek Signed-off-by: Stefano Garzarella --- block/blkio.c | 9

[PATCH 0/2] block/blkio: fix fd leak and add more comments for the fd passing

2023-08-01 Thread Stefano Garzarella
Hanna discovered an fd leak in the error path, and a few comments to improve in the code. Stefano Garzarella (2): block/blkio: close the fd when blkio_connect() fails block/blkio: add more comments on the fd passing handling block/blkio.c | 24 +--- 1 file changed, 21 ins

Re: [PATCH] linux-user: Fix openat() emulation to correctly detect accesses to /proc

2023-08-01 Thread Daniel P . Berrangé
On Tue, Aug 01, 2023 at 04:58:57PM +0200, Helge Deller wrote: > In qemu we catch accesses to files like /proc/cpuinfo or /proc/net/route > and return to the guest contents which would be visible on a real system > (instead what the host would show). > > This patch fixes a bug, where for example th

Re: [RFC PATCH 04/19] memory: Introduce memory_region_can_be_private()

2023-08-01 Thread Sean Christopherson
On Mon, Jul 31, 2023, Peter Xu wrote: > On Mon, Jul 31, 2023 at 05:36:37PM -0400, Michael S. Tsirkin wrote: > > On Mon, Jul 31, 2023 at 02:34:22PM -0700, Sean Christopherson wrote: > > > On Mon, Jul 31, 2023, Peter Xu wrote: > > > > On Mon, Jul 31, 2023 at 12:21:46PM -0400, Xiaoyao Li wrote: > > >

Re: [RFC PATCH 03/19] RAMBlock: Support KVM gmemory

2023-08-01 Thread David Hildenbrand
On 31.07.23 18:21, Xiaoyao Li wrote: From: Chao Peng Add KVM gmem support to RAMBlock so we can have both normal hva based memory and gmem fd based memory in one RAMBlock. The gmem part is represented by the gmem_fd. Signed-off-by: Chao Peng Signed-off-by: Xiaoyao Li So, *someone* creates

Re: [RFC PATCH 04/19] memory: Introduce memory_region_can_be_private()

2023-08-01 Thread Claudio Fontana
On 7/31/23 18:21, Xiaoyao Li wrote: > Signed-off-by: Xiaoyao Li > --- > include/exec/memory.h | 9 + > softmmu/memory.c | 5 + > 2 files changed, 14 insertions(+) > > diff --git a/include/exec/memory.h b/include/exec/memory.h > index 61e31c7b9874..e119d3ce1a1d 100644 > --- a/inc

Re: [RFC PATCH 04/19] memory: Introduce memory_region_can_be_private()

2023-08-01 Thread Claudio Fontana
On 8/1/23 18:48, Claudio Fontana wrote: > On 7/31/23 18:21, Xiaoyao Li wrote: >> Signed-off-by: Xiaoyao Li >> --- >> include/exec/memory.h | 9 + >> softmmu/memory.c | 5 + >> 2 files changed, 14 insertions(+) >> >> diff --git a/include/exec/memory.h b/include/exec/memory.h >> in

Re: [PATCH] migration/calc-dirty-rate: millisecond precision period

2023-08-01 Thread Peter Xu
On Tue, Aug 01, 2023 at 05:55:29PM +0300, gudkov.and...@huawei.com wrote: > Hmmm, such underestimation looks strange to me. I am willing to test > page-sampling and see whether its quality can be improved. Do you have > any specific suggestions on the application to use as a workload? I could have

Re: [Qemu-devel] [PATCH] acpi: Add emulated sleep button

2023-08-01 Thread Annie.li
Hi Igor, On 7/14/2023 10:04 AM, Igor Mammedov wrote: On Fri, 7 Jul 2023 13:43:36 -0400 "Annie.li" wrote: Hi Igor, Revisiting this thread and have more questions, please clarify, thank you! On 9/20/2021 3:53 AM, Igor Mammedov wrote: On Fri, 6 Aug 2021 16:18:09 -0400 "Annie.li" wrote: H

Re: [PATCH v5 01/11] hw: arm: Add bananapi M2-Ultra and allwinner-r40 support

2023-08-01 Thread Guenter Roeck
On 8/1/23 09:01, Peter Maydell wrote: On Sat, 24 Jun 2023 at 16:02, Guenter Roeck wrote: On 6/24/23 07:23, Guenter Roeck wrote: On 6/24/23 03:40, Peter Maydell wrote: On Fri, 23 Jun 2023 at 20:33, Guenter Roeck wrote: On 6/23/23 10:44, Peter Maydell wrote: On Sat, 17 Jun 2023 at 17:29, G

  1   2   >