Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-09-22 Thread Michael Tokarev
[Trimming Cc list] 22.09.2023 13:45, Anton Johansson: On 21/09/23, Michael Tokarev wrote: Anton Johansson (9): accel/kvm: Widen pc/saved_insn for kvm_sw_breakpoint accel/hvf: Widen pc/saved_insn for hvf_sw_breakpoint target: Use vaddr for kvm_arch_[insert|remove]_hw_breakpoint

[PATCH] hw/i386: changes towards enabling -Wshadow=local

2023-09-22 Thread Ani Sinha
Code changes that addresses all compiler complaints coming from enabling -Wshadow flags. Enabling -Wshadow catches cases of local variables shadowing other local variables or parameters. These makes the code confusing and/or adds bugs that are difficult to catch. CC: Markus Armbruster CC:

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

2023-09-22 Thread Gregory Price
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 and LINUX. Add an explicit flag for niagara. Signed-off-by: Gregory Price --- hw/cxl/Kconfig

Re: [PATCH 6/9] vt82c686: Support machine-default audiodev with fallback

2023-09-22 Thread BALATON Zoltan
On Fri, 22 Sep 2023, Paolo Bonzini wrote: On Fri, Sep 22, 2023 at 2:17 PM BALATON Zoltan wrote: mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb"); mc->default_ram_size = 512 * MiB; mc->default_ram_id = "ppc4xx.sdram"; + +machine_add_audiodev_property(mc); This hunk has

Re: [PATCH 1/4] multifd: wait for channels_ready before sending sync

2023-09-22 Thread Elena Ufimtseva
On Fri, Sep 22, 2023 at 01:06:53PM -0300, Fabiano Rosas wrote: > Elena Ufimtseva writes: > > > In multifd_send_sync_main we need to wait for channels_ready > > before submitting sync packet as the threads may still be sending > > their previous pages. > > There is also no need to check for

Re: [RFC PATCH 1/3] migration/multifd: Move channels_ready semaphore

2023-09-22 Thread Elena Ufimtseva
On Fri, Sep 22, 2023 at 11:53:17AM -0300, Fabiano Rosas wrote: > Commit d2026ee117 ("multifd: Fix the number of channels ready") moved > the "post" of channels_ready to the start of the multifd_send_thread() > loop and added a missing "wait" at multifd_send_sync_main(). While it > does work, the

Re: [PATCH] hw/timer/npcm7xx_timer: Prevent timer from counting down past zero

2023-09-22 Thread Chris Rauer
No. This patch does not address that issue and is not related. I was able to reproduce it about 2/1000 iterations with and without this patch. I will look into that issue separately. -Chris On Fri, Sep 22, 2023 at 11:24 AM Hao Wu wrote: > Is this related to this error? > >

Re: [PATCH] intel_iommu: Fix shadow local variables on "size"

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 12:04:10PM -0400, Peter Xu wrote: > This patch fixes the warning of shadowed local variable: > > ../hw/i386/intel_iommu.c: In function ‘vtd_address_space_unmap’: > ../hw/i386/intel_iommu.c:3773:18: warning: declaration of ‘size’ shadows a > previous local

Re: [PATCH 2/4] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS

2023-09-22 Thread Dave Jiang
On 9/22/23 13:08, Michael Tokarev wrote: > 04.09.2023 16:28, Jonathan Cameron: >> 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

Re: [PATCH v2 0/4] Support dynamic MSI-X allocation

2023-09-22 Thread Alex Williamson
On Mon, 18 Sep 2023 05:45:03 -0400 Jing Liu wrote: > Changes since v1: > - v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg982842.html > - Revise Qemu to QEMU. (Cédric) > - Add g_free when failure of getting MSI-X irq info. (Cédric) > - Apply Cédric's Reviewed-by. (Cédric) > - Use

[PATCH] qemu-nbd: changes towards enabling -Wshadow=local

2023-09-22 Thread Eric Blake
Address all compiler complaints from -Wshadow in qemu-nbd. Several instances of 'int ret' became shadows when commit 4fbec260 added 'ret' at a higher scope in main. More interesting was the 'void *ret' capturing the result of a pthread; where we were conceptually doing

Re: [PATCH v2 2/4] vfio/pci: enable vector on dynamic MSI-X allocation

2023-09-22 Thread Alex Williamson
On Mon, 18 Sep 2023 05:45:05 -0400 Jing Liu wrote: > The vector_use callback is used to enable vector that is unmasked in > guest. The kernel used to only support static MSI-X allocation. When > allocating a new interrupt using "static MSI-X allocation" kernels, > QEMU first disables all

Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section

2023-09-22 Thread Michael Tokarev
20.09.2023 12:23, Alex Bennée: .. I wonder if I should keep 0d58c6606 for 8.1.1 (the deadline is tomorrow).. Unfortunately 0d58c is not the full fix, it papered over one crack but revealed others. It might be leading to a false sense of security. So I would argue: - keep the assert -

Re: [PATCH 2/4] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS

2023-09-22 Thread Michael Tokarev
04.09.2023 16:28, Jonathan Cameron: 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

Re: [PATCH v4 20/21] i386: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2023-09-22 Thread Moger, Babu
On 9/14/2023 2:21 AM, Zhao Liu wrote: From: Zhao Liu CPUID[0x801D].EAX[bits 25:14] NumSharingCache: number of logical processors sharing cache. The number of logical processors sharing this cache is NumSharingCache + 1. After cache models have topology information, we can use

Re: [PATCH v4 19/21] i386: Use offsets get NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2023-09-22 Thread Moger, Babu
On 9/14/2023 2:21 AM, Zhao Liu wrote: 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

Re: [PATCH 0/4] aspeed: Clean up local variable shadowing

2023-09-22 Thread Cédric Le Goater
On 9/22/23 20:20, Philippe Mathieu-Daudé wrote: On 22/9/23 17:59, Cédric Le Goater wrote: Hello, Here are cleanups for local variable shadowing warnings in aspeed models. Joel, Andrew, Could you please double check patch 4 ? Could Markus' MAKE_IDENTFIER() help there? ah ! you typed too

Re: Help wanted for enabling -Wshadow=local

2023-09-22 Thread Warner Losh
On Fri, Sep 22, 2023 at 11:49 AM Peter Maydell wrote: > On Fri, 22 Sept 2023 at 18:43, Daniel Henrique Barboza > wrote: > > Can you publish your branch with the current -Wshadow=local patches in > > gitlab/github? I'm hitting (and fixing) a lot of errors that aren't > listed > > here, meaning

Re: [PATCH 4/4] multifd: reset next_packet_len after sending pages

2023-09-22 Thread Fabiano Rosas
Elena Ufimtseva writes: > Sometimes multifd sends just sync packet with no pages > (normal_num is 0). In this case the old value is being > preserved and being accounted for while only packet_len > is being transferred. > Reset it to 0 after sending and accounting for. > Usually you'd finish

Re: [PATCH 4/4] aspeed/timer: Clean up local variable shadowing

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:59, Cédric Le Goater wrote: commit 8137355e850f ("aspeed/timer: Fix behaviour running Linux") introduced a MAX() expression to calculate the next timer deadline : return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0)); The second MAX() is not necessary since the

Re: [PATCH 4/4] multifd: reset next_packet_len after sending pages

2023-09-22 Thread Fabiano Rosas
Elena Ufimtseva writes: > Sometimes multifd sends just sync packet with no pages > (normal_num is 0). In this case the old value is being > preserved and being accounted for while only packet_len > is being transferred. > Reset it to 0 after sending and accounting for. > > TODO: Fix the same

Re: [PATCH] hw/timer/npcm7xx_timer: Prevent timer from counting down past zero

2023-09-22 Thread Hao Wu
Is this related to this error? https://lists.gnu.org/archive/html/qemu-devel/2023-09/msg04903.html On Fri, Sep 22, 2023 at 11:14 AM Chris Rauer wrote: > The counter register is only 24-bits and counts down. If the timer is > running but the qtimer to reset it hasn't fired off yet, there is a

Re: [PATCH 2/4] aspeed: Clean up local variable shadowing

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:59, Cédric Le Goater wrote: Remove superfluous local 'irq' variables and use the one define at the top of the routine. This fixes warnings in aspeed_soc_ast2600_realize() such as : ../hw/arm/aspeed_ast2600.c: In function ‘aspeed_soc_ast2600_realize’:

Re: [PATCH 1/4] aspeed/i2c: Clean up local variable shadowing

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:59, Cédric Le Goater wrote: Remove superfluous local 'data' variable and use the one define at the top of the routine. This fixes : ../hw/i2c/aspeed_i2c.c: In function ‘aspeed_i2c_bus_recv’: ../hw/i2c/aspeed_i2c.c:315:17: warning: declaration of ‘data’ shadows a previous

Re: [PATCH 0/4] aspeed: Clean up local variable shadowing

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:59, Cédric Le Goater wrote: Hello, Here are cleanups for local variable shadowing warnings in aspeed models. Joel, Andrew, Could you please double check patch 4 ? Could Markus' MAKE_IDENTFIER() help there? Thanks, C. Cédric Le Goater (4): aspeed/i2c: Clean up local

Re: [PATCH 1/2] crypto: remove shadowed 'ret' variable

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 18:06, Daniel P. Berrangé wrote: Both instances of 'ret' are used to store a gnutls API return code. Signed-off-by: Daniel P. Berrangé --- crypto/tls-cipher-suites.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] intel_iommu: Fix shadow local variables on "size"

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 18:04, Peter Xu wrote: This patch fixes the warning of shadowed local variable: ../hw/i386/intel_iommu.c: In function ‘vtd_address_space_unmap’: ../hw/i386/intel_iommu.c:3773:18: warning: declaration of ‘size’ shadows a previous local [-Wshadow=compatible-local] 3773 |

Re: [PATCH] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 18:37, Thomas Huth wrote: When compiling this file with -Wshadow=local , we get: ../tests/qtest/m48t59-test.c: In function ‘bcd_check_time’: ../tests/qtest/m48t59-test.c:195:17: warning: declaration of ‘s’ shadows a previous local [-Wshadow=local] 195 | long t, s;

[PATCH] hw/timer/npcm7xx_timer: Prevent timer from counting down past zero

2023-09-22 Thread Chris Rauer
The counter register is only 24-bits and counts down. If the timer is running but the qtimer to reset it hasn't fired off yet, there is a chance the regster read can return an invalid result. Signed-off-by: Chris Rauer --- hw/timer/npcm7xx_timer.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [PATCH 3/4] multifd: fix counters in multifd_send_thread

2023-09-22 Thread Fabiano Rosas
Elena Ufimtseva writes: > Previous commit cbec7eb76879d419e7dbf531ee2506ec0722e825 > "migration/multifd: Compute transferred bytes correctly" > removed accounting for packet_len in non-rdma > case, but the next_packet_size only accounts for pages, not for > the header packet (normal_pages *

Re: Help wanted for enabling -Wshadow=local

2023-09-22 Thread Peter Maydell
On Fri, 22 Sept 2023 at 18:43, Daniel Henrique Barboza wrote: > Can you publish your branch with the current -Wshadow=local patches in > gitlab/github? I'm hitting (and fixing) a lot of errors that aren't listed > here, meaning they're either fixed already in your local branch or needs to > be

Re: [PATCH] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow

2023-09-22 Thread Daniel P . Berrangé
On Fri, Sep 22, 2023 at 06:37:42PM +0200, Thomas Huth wrote: > When compiling this file with -Wshadow=local , we get: > > ../tests/qtest/m48t59-test.c: In function ‘bcd_check_time’: > ../tests/qtest/m48t59-test.c:195:17: warning: declaration of ‘s’ > shadows a previous local [-Wshadow=local] >

Re: [PATCH 2/4] migration: check for rate_limit_max for RATE_LIMIT_DISABLED

2023-09-22 Thread Fabiano Rosas
Elena Ufimtseva writes: > In migration rate limiting atomic operations are used > to read the rate limit variables and transferred bytes and > they are expensive. Check first if rate_limit_max is equal > to RATE_LIMIT_DISABLED and return false immediately if so. > > Signed-off-by: Elena

Re: Help wanted for enabling -Wshadow=local

2023-09-22 Thread Ani Sinha
> On 22-Sep-2023, at 3:07 PM, Markus Armbruster wrote: > > X86 Machines > > PC > M: Michael S. Tsirkin > M: Marcel Apfelbaum >hw/i386/acpi-build.c(*3*) >hw/i386/acpi-microvm.c(*2*) >hw/i386/intel_iommu.c(*3*) >hw/i386/pc.c(*2*) >hw/i386/x86.c(*2*) Since I

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

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 18:04, Ani Sinha wrote: 32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supported by QEMU as QEMU always places hotplugged memory above 4 GiB boundary which is beyond the

Re: [PATCH] meson.build: Make keyutils independent from keyring

2023-09-22 Thread Thomas Huth
On 07/09/2023 21.57, Michael Tokarev wrote: 24.08.2023 12:42, Thomas Huth wrote: Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils") tried to provide a possibility for the user to disable keyutils if not required by makeing it depend on the keyring feature. This looked reasonable

Re: [PATCH v2 2/2] tests/tcg: Add -fno-stack-protector

2023-09-22 Thread Thomas Huth
On 31/07/2023 11.10, Akihiko Odaki wrote: A build of GCC 13.2 will have stack protector enabled by default if it was configured with --enable-default-ssp option. For such a compiler, it is necessary to explicitly disable stack protector when linking without standard libraries. Signed-off-by:

[PATCH] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow

2023-09-22 Thread Thomas Huth
When compiling this file with -Wshadow=local , we get: ../tests/qtest/m48t59-test.c: In function ‘bcd_check_time’: ../tests/qtest/m48t59-test.c:195:17: warning: declaration of ‘s’ shadows a previous local [-Wshadow=local] 195 | long t, s; | ^

Re: [PATCH v4 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-22 Thread William Roche
On 9/22/23 16:30, Yazen Ghannam wrote: On 9/22/23 4:36 AM, William Roche wrote: On 9/21/23 19:41, Yazen Ghannam wrote: [...] Also, during page migration, does the data flow through the CPU core? Sorry for the basic question. I haven't done a lot with virtualization. Yes, in most cases (with

Re: [PATCH] target/arm: Fix CNTPCT_EL0 trapping from EL0 when HCR_EL2.E2H is 0

2023-09-22 Thread Oleksandr Tyshchenko
On 22.09.23 16:21, Michal Orzel wrote: Hello Michal > On an attempt to access CNTPCT_EL0 from EL0 using a guest running on top > of Xen, a trap from EL2 was observed which is something not reproducible > on HW (also, Xen does not trap accesses to physical counter). > > This is because

Re: [PATCH 1/2] migration: Fix rdma migration failed

2023-09-22 Thread Peter Xu
On Fri, Sep 22, 2023 at 12:59:37PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Sep 20, 2023 at 05:04:11PM +0800, Li Zhijian wrote: > >> From: Li Zhijian > >> > >> Destination will fail with: > >> qemu-system-x86_64: rdma: Too many requests in this message > >>

Re: [PATCH v4 00/21] Support smp.clusters for x86 in QEMU

2023-09-22 Thread Moger, Babu
Tested the series on AMD system. Created a VM and ran some basic commands. Everything looks good. Tested-by: Babu Moger On 9/14/2023 2:21 AM, Zhao Liu wrote: From: Zhao Liu Hi list, (CC k...@vger.kernel.org for better browsing.) This is the our v4 patch series, rebased on the master

Re: [PATCH 1/4] multifd: wait for channels_ready before sending sync

2023-09-22 Thread Fabiano Rosas
Elena Ufimtseva writes: > In multifd_send_sync_main we need to wait for channels_ready > before submitting sync packet as the threads may still be sending > their previous pages. > There is also no need to check for channels_ready in the loop > before the wait for sem_sync, next iteration of

[PATCH 2/2] seccomp: avoid shadowing of 'action' variable

2023-09-22 Thread Daniel P . Berrangé
This is confusing as one 'action' variable is used for storing a SCMP_ enum value, while the other 'action' variable is used for storing a SECCOMP_ enum value. Signed-off-by: Daniel P. Berrangé --- softmmu/qemu-seccomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 1/2] crypto: remove shadowed 'ret' variable

2023-09-22 Thread Daniel P . Berrangé
Both instances of 'ret' are used to store a gnutls API return code. Signed-off-by: Daniel P. Berrangé --- crypto/tls-cipher-suites.c | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/tls-cipher-suites.c b/crypto/tls-cipher-suites.c index 5e4f597464..d0df4badc0 100644 ---

[PATCH 0/2] remove some variable shadowing

2023-09-22 Thread Daniel P . Berrangé
Daniel P. Berrangé (2): crypto: remove shadowed 'ret' variable seccomp: avoid shadowing of 'action' variable crypto/tls-cipher-suites.c | 1 - softmmu/qemu-seccomp.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) -- 2.41.0

Re: [PATCH v4 01/21] i386: Fix comment style in topology.h

2023-09-22 Thread Moger, Babu
On 9/14/2023 2:21 AM, Zhao Liu wrote: From: Zhao Liu For function comments in this file, keep the comment style consistent with other files in the directory. Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yanan Wang Reviewed-by: Xiaoyao Li Acked-by: Michael S.

Re: [PATCH] hw/acpi: changes towards enabling -Wshadow=local

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 06:12:02PM +0530, Ani Sinha wrote: > Code changes in acpi that addresses all compiler complaints coming from > enabling > -Wshadow flags. Enabling -Wshadow catches cases of local variables shadowing > other local variables or parameters. These makes the code confusing

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

2023-09-22 Thread Ani Sinha
32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supported by QEMU as QEMU always places hotplugged memory above 4 GiB boundary which is beyond the physical address space of the processor.

Re: [PATCH 1/2] migration: Fix rdma migration failed

2023-09-22 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Sep 20, 2023 at 05:04:11PM +0800, Li Zhijian wrote: >> From: Li Zhijian >> >> Destination will fail with: >> qemu-system-x86_64: rdma: Too many requests in this message >> (3638950032).Bailing. >> >> migrate with RDMA is different from tcp. RDMA has its own control

[PATCH] intel_iommu: Fix shadow local variables on "size"

2023-09-22 Thread Peter Xu
This patch fixes the warning of shadowed local variable: ../hw/i386/intel_iommu.c: In function ‘vtd_address_space_unmap’: ../hw/i386/intel_iommu.c:3773:18: warning: declaration of ‘size’ shadows a previous local [-Wshadow=compatible-local] 3773 | uint64_t size = mask + 1; |

[PATCH 3/4] aspeed/i3c: Rename variable shadowing a local

2023-09-22 Thread Cédric Le Goater
to fix warning : ../hw/i3c/aspeed_i3c.c: In function ‘aspeed_i3c_realize’: ../hw/i3c/aspeed_i3c.c:1959:17: warning: declaration of ‘dev’ shadows a parameter [-Wshadow=local] 1959 | Object *dev = OBJECT(>devices[i]); | ^~~ ../hw/i3c/aspeed_i3c.c:1942:45:

[PATCH 1/4] aspeed/i2c: Clean up local variable shadowing

2023-09-22 Thread Cédric Le Goater
Remove superfluous local 'data' variable and use the one define at the top of the routine. This fixes : ../hw/i2c/aspeed_i2c.c: In function ‘aspeed_i2c_bus_recv’: ../hw/i2c/aspeed_i2c.c:315:17: warning: declaration of ‘data’ shadows a previous local [-Wshadow=compatible-local] 315 |

[PATCH 0/4] aspeed: Clean up local variable shadowing

2023-09-22 Thread Cédric Le Goater
Hello, Here are cleanups for local variable shadowing warnings in aspeed models. Joel, Andrew, Could you please double check patch 4 ? Thanks, C. Cédric Le Goater (4): aspeed/i2c: Clean up local variable shadowing aspeed: Clean up local variable shadowing aspeed/i3c: Rename variable

[PATCH 2/4] aspeed: Clean up local variable shadowing

2023-09-22 Thread Cédric Le Goater
Remove superfluous local 'irq' variables and use the one define at the top of the routine. This fixes warnings in aspeed_soc_ast2600_realize() such as : ../hw/arm/aspeed_ast2600.c: In function ‘aspeed_soc_ast2600_realize’: ../hw/arm/aspeed_ast2600.c:420:18: warning: declaration of ‘irq’

[PATCH 4/4] aspeed/timer: Clean up local variable shadowing

2023-09-22 Thread Cédric Le Goater
commit 8137355e850f ("aspeed/timer: Fix behaviour running Linux") introduced a MAX() expression to calculate the next timer deadline : return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0)); The second MAX() is not necessary since the compared values are an unsigned and 0. Simply

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

2023-09-22 Thread Peter Xu
On Wed, Sep 20, 2023 at 05:04:12PM +0800, Li Zhijian wrote: > 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 > (3638950032).Bailing. > > Actually, it's caused by an

[PULL 5/9] hw/audio: Simplify hda audio init

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander No return values are used anywhere, so switch the functions to be void and add support for error reporting using errp for use in next patches. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrangé Message-ID: Signed-off-by: Paolo Bonzini ---

[PULL 4/9] hw/input/tsc210x: Extract common init code into new function

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander This deduplicates several lines and will make future changes more concise. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrangé Message-ID: <1d75877cf4cc2a38f87633ff16f9fea3e1bb0c03.1650874791.git.mklet...@redhat.com> Signed-off-by: Paolo Bonzini ---

[PULL 6/9] hw/audio/lm4549: Add errp error reporting to init function

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander This will be used in future commit. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrangé Message-ID: Signed-off-by: Paolo Bonzini --- hw/audio/lm4549.c | 3 ++- hw/audio/lm4549.h | 3 ++- hw/audio/pl041.c | 2 +- 3 files changed, 5 insertions(+), 3

[PULL 9/9] vl: recognize audiodev groups in configuration files

2023-09-22 Thread Paolo Bonzini
This is necessary for the q35 configuration tests to pass, once audiodev becomes mandatory. Signed-off-by: Paolo Bonzini --- docs/config/q35-emulated.cfg | 4 docs/config/q35-virtio-graphical.cfg | 4 softmmu/vl.c | 10 ++ 3 files changed, 18

[PULL 8/9] tests/qtest: Specify audiodev= and -audiodev

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander This will enable removing deprecated default audiodev support. I did not figure out how to make the audiodev represented as an interface node, so this is a workaround. I am not sure what would be the proper way. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P.

[PULL 7/9] hw/display/xlnx_dp.c: Add audiodev property

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander There was no way to set this and we need that for it to be able to properly initialise. Signed-off-by: Martin Kletzander Message-ID: <16963256573fcbfa7720aa2fd000ba74a4055222.1650874791.git.mklet...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/display/xlnx_dp.c |

[PULL 3/9] qemu/timer: Add host ticks function for RISC-V

2023-09-22 Thread Paolo Bonzini
From: LIU Zhiwei Signed-off-by: LIU Zhiwei Message-ID: <20230911063223.742-1-zhiwei_...@linux.alibaba.com> Signed-off-by: Paolo Bonzini --- include/qemu/timer.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index

[PULL 1/9] target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC

2023-09-22 Thread Paolo Bonzini
On parts that enumerate IA32_VMX_BASIC MSR bit as 1, any exception vector can be delivered with or without an error code if the other consistency checks are satisfied. Signed-off-by: Paolo Bonzini --- scripts/kvm/vmxcap | 1 + target/i386/cpu.c | 1 + target/i386/cpu.h | 1 + 3 files changed,

[PULL 2/9] target/i386: Export GDS_NO bit to guests

2023-09-22 Thread Paolo Bonzini
From: Pawan Gupta Gather Data Sampling (GDS) is a side-channel attack using Gather instructions. Some Intel processors will set ARCH_CAP_GDS_NO bit in MSR IA32_ARCH_CAPABILITIES to report that they are not vulnerable to GDS. Make this bit available to guests. Closes:

[PULL v2 0/9] i386, audio changes for 2023-09-22

2023-09-22 Thread Paolo Bonzini
The following changes since commit 005ad32358f12fe9313a4a01918a55e60d4f39e5: Merge tag 'pull-tpm-2023-09-12-3' of https://github.com/stefanberger/qemu-tpm into staging (2023-09-13 13:41:57 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

Re: [PATCH 1/2] migration: Fix rdma migration failed

2023-09-22 Thread Peter Xu
On Wed, Sep 20, 2023 at 05:04:11PM +0800, Li Zhijian wrote: > From: Li Zhijian > > Destination will fail with: > qemu-system-x86_64: rdma: Too many requests in this message > (3638950032).Bailing. > > migrate with RDMA is different from tcp. RDMA has its own control > message, and all traffic

Re: [PATCH 2/4] hw/misc/arm_sysctl.c: Avoid shadowing local variable

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:29, Peter Maydell wrote: Avoid shadowing a local variable in arm_sysctl_write(): ../../hw/misc/arm_sysctl.c: In function ‘arm_sysctl_write’: ../../hw/misc/arm_sysctl.c:537:26: warning: declaration of ‘val’ shadows a parameter [-Wshadow=local] 537 | uint32_t

Re: [PATCH 3/4] hw/arm/smmuv3.c: Avoid shadowing variable

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:29, Peter Maydell wrote: Avoid shadowing a variable in smmuv3_notify_iova(): ../../hw/arm/smmuv3.c: In function ‘smmuv3_notify_iova’: ../../hw/arm/smmuv3.c:1043:23: warning: declaration of ‘event’ shadows a previous local [-Wshadow=local] 1043 | SMMUEventInfo event =

Re: [PATCH 1/4] hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd()

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:29, Peter Maydell wrote: Avoid shadowing a local variable in do_process_its_cmd(): ../../hw/intc/arm_gicv3_its.c:548:17: warning: declaration of ‘ite’ shadows a previous local [-Wshadow=compatible-local] 548 | ITEntry ite = {}; | ^~~

Re: [ANNOUNCE] QEMU 8.1.1 Stable released

2023-09-22 Thread Michael Tokarev
22.09.2023 18:18, Michael Tokarev wrote: This update contains a pile of fixes for various architectures/subsystems, fixing a number of various bugs.  Unfortunately some known bugs remain unfixed still, and hopefully will be addressed in subsequent 8.1.x releases. In particular, the following

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

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 17:01, Ani Sinha wrote: 32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supported by QEMU as QEMU always places hotplugged memory above 4 GiB boundary which is beyond the

[PATCH v2] qapi: provide a friendly string representation of QAPI classes

2023-09-22 Thread Daniel P . Berrangé
If printing a QAPI schema object for debugging we get the classname and a hex value for the instance: With this change we instead get the classname and the human friendly name of the QAPI type instance: Signed-off-by: Daniel P. Berrangé --- v1 was two & half years ago:

[PATCH 3/4] hw/arm/smmuv3.c: Avoid shadowing variable

2023-09-22 Thread Peter Maydell
Avoid shadowing a variable in smmuv3_notify_iova(): ../../hw/arm/smmuv3.c: In function ‘smmuv3_notify_iova’: ../../hw/arm/smmuv3.c:1043:23: warning: declaration of ‘event’ shadows a previous local [-Wshadow=local] 1043 | SMMUEventInfo event = {.inval_ste_allowed = true}; |

[PATCH 1/4] hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd()

2023-09-22 Thread Peter Maydell
Avoid shadowing a local variable in do_process_its_cmd(): ../../hw/intc/arm_gicv3_its.c:548:17: warning: declaration of ‘ite’ shadows a previous local [-Wshadow=compatible-local] 548 | ITEntry ite = {}; | ^~~ ../../hw/intc/arm_gicv3_its.c:518:13: note: shadowed

[PATCH 4/4] hw/arm/smmuv3-internal.h: Don't use locals in statement macros

2023-09-22 Thread Peter Maydell
The STE_CTXPTR() and STE_S2TTB() macros both extract two halves of an address from fields in the STE and combine them into a single value to return. The current code for this uses a GCC statement expression. There are two problems with this: (1) The type chosen for the variable in the statement

[PATCH 2/4] hw/misc/arm_sysctl.c: Avoid shadowing local variable

2023-09-22 Thread Peter Maydell
Avoid shadowing a local variable in arm_sysctl_write(): ../../hw/misc/arm_sysctl.c: In function ‘arm_sysctl_write’: ../../hw/misc/arm_sysctl.c:537:26: warning: declaration of ‘val’ shadows a parameter [-Wshadow=local] 537 | uint32_t val; | ^~~

[PATCH 0/4] arm: fix some -Wshadow warnings

2023-09-22 Thread Peter Maydell
These patches fix some -Wshadow warnings in arm related code. -- PMM Peter Maydell (4): hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd() hw/misc/arm_sysctl.c: Avoid shadowing local variable hw/arm/smmuv3.c: Avoid shadowing variable hw/arm/smmuv3-internal.h:

Re: [PATCH v5 2/5] softmmu: Support concurrent bounce buffers

2023-09-22 Thread Peter Xu
On Wed, Sep 20, 2023 at 01:06:19AM -0700, Mattias Nissler wrote: > When DMA memory can't be directly accessed, as is the case when > running the device model in a separate process without shareable DMA > file descriptors, bounce buffering is used. > > It is not uncommon for device models to

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

2023-09-22 Thread Peter Xu
On Thu, Sep 21, 2023 at 08:27:24AM +, Zhijian Li (Fujitsu) wrote: > I'm worried that I may not have enough time, ability, or environment to > review/test > the RDMA patches. but for this patch set, i will take a look later. That'll be helpful, thanks! So it seems maybe at least we should

[PATCH] audio: don't abort on f32 audio format in wav backend

2023-09-22 Thread Daniel P . Berrangé
Print a debug message as is done for other unsupported audio formats to give the user the chance to understand their mistake. Signed-off-by: Daniel P. Berrangé --- audio/wavaudio.c | 4 1 file changed, 4 insertions(+) diff --git a/audio/wavaudio.c b/audio/wavaudio.c index

[ANNOUNCE] QEMU 8.1.1 Stable released

2023-09-22 Thread Michael Tokarev
Hi everyone, The QEMU v8.1.1 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source v8.1.1 is now tagged in the official qemu.git repository, and the stable-8.1 branch has been updated accordingly:

[ANNOUNCE] QEMU 8.0.5 Stable released

2023-09-22 Thread Michael Tokarev
Hi everyone, The QEMU v8.0.5 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source v8.0.5 is now tagged in the official qemu.git repository, and the stable-8.0 branch has been updated accordingly:

Re: [PATCH for-8.1] hw/rdma/vmw/pvrdma_cmd: Use correct struct in query_port()

2023-09-22 Thread Thomas Huth
Reviewed-by: Thomas Huth Maybe this could go via qemu-trivial? On 12/09/2023 16.08, Peter Maydell wrote: Ping^2 for review/pickup by the rdma folks, please? Is anybody still using this subsystem? ... if not, then it's maybe time to set this on the deprecation list? ... just my 0.02 €.

Re: [PATCH 11/11] qdev: Rework array properties based on list visitor

2023-09-22 Thread Markus Armbruster
Kevin Wolf writes: > Until now, array properties are actually implemented with a hack that > uses multiple properties on the QOM level: a static "foo-len" property > and after it is set, dynamically created "foo[i]" properties. > > In external interfaces (-device on the command line and

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

2023-09-22 Thread Ani Sinha
32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supported by QEMU as QEMU always places hotplugged memory above 4 GiB boundary which is beyond the physical address space of the processor.

[RFC PATCH 2/3] migration/multifd: Decouple control flow from the SYNC packet

2023-09-22 Thread Fabiano Rosas
We currently have the sem_sync semaphore that is used: 1) on the sending side, to know when the multifd_send_thread has finished sending the MULTIFD_FLAG_SYNC packet; This is unnecessary. Multifd sends packets (not pages) one by one and completion is already bound by both the

[RFC PATCH 3/3] migration/multifd: Extract sem_done waiting into a function

2023-09-22 Thread Fabiano Rosas
This helps document the intent of the loop via the function name and we can reuse this in the future. Signed-off-by: Fabiano Rosas --- migration/multifd.c | 38 +- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/migration/multifd.c

[RFC PATCH 0/3] migration/multifd: SYNC packet changes

2023-09-22 Thread Fabiano Rosas
I'm putting this RFC out early so we can discuss the issues around the SYNC packet of the multifd protocol. There's a related series posted by Elena Ufimtseva: https://lore.kernel.org/r/20230922065625.21848-1-elena.ufimts...@oracle.com My interest in this (aside from correctness) is that when

[RFC PATCH 1/3] migration/multifd: Move channels_ready semaphore

2023-09-22 Thread Fabiano Rosas
Commit d2026ee117 ("multifd: Fix the number of channels ready") moved the "post" of channels_ready to the start of the multifd_send_thread() loop and added a missing "wait" at multifd_send_sync_main(). While it does work, the placement of the wait goes against what the rest of the code does. The

[ANNOUNCE] QEMU 7.2.6 Stable released

2023-09-22 Thread Michael Tokarev
Hi everyone, The QEMU v7.2.6 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source v7.2.6 is now tagged in the official qemu.git repository, and the stable-7.2 branch has been updated accordingly:

Re: [PATCH 1/2] configure: support passthrough of -Dxxx args to meson

2023-09-22 Thread Daniel P . Berrangé
On Fri, Sep 22, 2023 at 04:36:00PM +0200, Thomas Huth wrote: > On 22/09/2023 16.00, Peter Maydell wrote: > > On Fri, 22 Sept 2023 at 14:56, Daniel P. Berrangé > > wrote: > > > > > > This can be useful for setting some meson global options, such as the > > > optimization level or debug state,

Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section

2023-09-22 Thread Michael Tokarev
20.09.2023 18:04, Alex Bennée wrote: .. Sorry my previous reply was eaten by my MUA. That happens.. especially when MUA becomes hungry :) The main purpose of the asserts is to catch corruption to the Memory Regions early so we don't see weird failures later on (c.f. the 3 separate bugs for

Re: [PATCH 1/2] configure: support passthrough of -Dxxx args to meson

2023-09-22 Thread Thomas Huth
On 22/09/2023 16.00, Peter Maydell wrote: On Fri, 22 Sept 2023 at 14:56, Daniel P. Berrangé wrote: This can be useful for setting some meson global options, such as the optimization level or debug state, which don't have an analogous option explicitly defined in QEMU's configure wrapper

Re: [PATCH] vfio/pci: rename vfio_put_device to vfio_pci_put_device

2023-09-22 Thread Cédric Le Goater
On 9/22/23 04:52, Zhenzhong Duan wrote: vfio_put_device() is a VFIO PCI specific function, rename it with 'vfio_pci' prefix to avoid confusing. No functional change. There is more to be done but it can wait after the big code reshuffle. Suggested-by: Cédric Le Goater Signed-off-by:

Re: [PATCH v4 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-22 Thread Yazen Ghannam
On 9/22/23 4:36 AM, William Roche wrote: > On 9/21/23 19:41, Yazen Ghannam wrote: >> On 9/20/23 7:13 AM, Joao Martins wrote: >>> On 18/09/2023 23:00, William Roche wrote: [...] So it looks like the mechanism works fine... unless the VM has migrated between the SRAO error and the

Re: [PATCH 01/11] qdev: Add qdev_prop_set_array()

2023-09-22 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 8/9/23 16:36, Kevin Wolf wrote: >> Instead of exposing the ugly hack of how we represent arrays in qdev (a >> static "foo-len" property and after it is set, dynamically created >> "foo[i]" properties) to boards, add an interface that allows setting the >>

Re: [PATCH 0/4] multifd: various fixes

2023-09-22 Thread Fabiano Rosas
Elena Ufimtseva writes: > Hello > > While working and testing various live migration scenarios, > a few issues were found. > > This is my first patches in live migration and I will > appreciate the suggestions from the community if these > patches could be done differently. > > [PATCH 1/4]

[PATCH 3/3] i386: hvf: Updates API usage to use modern vCPU run function

2023-09-22 Thread Phil Dennis-Jordan
macOS 10.15 introduced the more efficient hv_vcpu_run_until() function to supersede hv_vcpu_run(). According to the documentation, there is no longer any reason to use the latter on modern host OS versions. Observed behaviour of the newer function is that as documented, it exits much less

  1   2   3   >