Re: [PULL 24/30] spapr_pci: populate ibm,loc-code

2021-08-15 Thread Philippe Mathieu-Daudé
On 8/13/21 5:17 PM, Peter Maydell wrote: > On Tue, 10 Aug 2021 at 05:40, David Gibson > wrote: >> >> On Mon, Aug 09, 2021 at 10:57:00AM +0100, Peter Maydell wrote: >>> >>> Cleanest fix would be to declare 'path' and 'host' as >>>g_autofree char *path = NULL; >>>g_autofree char *host =

[PATCH v2] hw/sensor: Add lsm303dlhc magnetometer device

2021-08-15 Thread Kevin Townsend
This commit adds emulation of the magnetometer on the LSM303DLHC. It allows the magnetometer's X, Y and Z outputs to be set via the mag_x, mag_y and mag_z properties, as well as the 12-bit temperature output via the temperature property. Signed-off-by: Kevin Townsend --- hw/sensor/Kconfig

Re: [PATCH for-6.2 09/25] clock: Provide builtin multiplier/divider

2021-08-15 Thread Philippe Mathieu-Daudé
On 8/12/21 11:33 AM, Peter Maydell wrote: > It is quite common for a clock tree to involve possibly programmable > clock multipliers or dividers, where the frequency of a clock is for > instance divided by 8 to produce a slower clock to feed to a > particular device. > > Currently we provide no

Re: [PATCH 12/19] target/ppc/pmu_book3s_helper.c: enable PMC1 counter negative EBB

2021-08-15 Thread Richard Henderson
On 8/14/21 9:13 AM, Daniel Henrique Barboza wrote: https://github.com/torvalds/linux/blob/master/tools/testing/selftests/powerpc/pmu/count_instructions.c This test runs an instruction loop that consists of 'addi' instructions . Before running the instructions there's an overhead calculation

Re: [PATCH for-6.2 2/7] linux-user/arm: Set siginfo_t addr field for SIGTRAP signals

2021-08-15 Thread Richard Henderson
On 8/13/21 3:18 AM, Peter Maydell wrote: When generating a TRAP_BRKPT SIGTRAP, set the siginfo_t addr field to the PC where the breakpoint/singlestep trap occurred; this is what the kernel does for this signal for this architecture. Signed-off-by: Peter Maydell --- linux-user/arm/cpu_loop.c |

Re: [PATCH for-6.2 1/7] linux-user/aarch64: Set siginfo_t addr field for SIGTRAP signals

2021-08-15 Thread Richard Henderson
On 8/13/21 3:18 AM, Peter Maydell wrote: When generating a TRAP_BRKPT SIGTRAP, set the siginfo_t addr field to the PC where the breakpoint/singlestep trap occurred; this is what the kernel does for this signal for this architecture. Fixes: Coverity 1459154 Signed-off-by: Peter Maydell ---

Re: [PATCH for-6.2 4/7] linux-user: Zero out target_siginfo_t in force_sig()

2021-08-15 Thread Richard Henderson
On 8/13/21 3:18 AM, Peter Maydell wrote: The target_siginfo_t we populate in force_sig() will eventually get copied onto the target's stack. Zero it out so that any extra padding in the sifields union is consistently zero when the guest sees it. Signed-off-by: Peter Maydell ---

Re: [PATCH for-6.2 0/4] Zero sockaddr_in when initializing it

2021-08-15 Thread Peter Maydell
On Sun, 15 Aug 2021 at 15:34, Philippe Mathieu-Daudé wrote: > > On 8/13/21 8:30 PM, Eric Blake wrote: > > FWIW, the POSIX wording is interesting - it requires portable > > applications to zero out sockaddr_in6 (and even states that memset() > > is not yet a portable way to do that on exotic

Re: [PATCH for-6.2 7/7] linux-user/aarch64: Use force_sig_fault()

2021-08-15 Thread Richard Henderson
On 8/13/21 3:18 AM, Peter Maydell wrote: Use the new force_sig_fault() function instead of setting up a target_siginfo_t and calling queue_signal(). Signed-off-by: Peter Maydell --- linux-user/aarch64/cpu_loop.c | 34 +- 1 file changed, 9 insertions(+), 25

Re: [PATCH for-6.2 09/25] clock: Provide builtin multiplier/divider

2021-08-15 Thread Luc Michel
Hi Peter, On 10:33 Thu 12 Aug , Peter Maydell wrote: > diff --git a/hw/core/clock.c b/hw/core/clock.c > index fc5a99683f8..c371b9e977a 100644 > --- a/hw/core/clock.c > +++ b/hw/core/clock.c > @@ -133,10 +143,21 @@ char *clock_display_freq(Clock *clk) > return

Re: [PATCH for-6.2 01/25] arm: Move M-profile RAS register block into its own device

2021-08-15 Thread Philippe Mathieu-Daudé
+Peter/David On 8/12/21 11:33 AM, Peter Maydell wrote: > Currently we implement the RAS register block within the NVIC device. > It isn't really very tightly coupled with the NVIC proper, so instead > move it out into a sysbus device of its own and have the top level > ARMv7M container create it

Re: [PULL 0/1] Hexagon (disas/hexagon) fix memory leak for early exit

2021-08-15 Thread Peter Maydell
On Fri, 13 Aug 2021 at 04:07, Taylor Simpson wrote: > > The following changes since commit 703e8cd6189cf699c8d5c094bc68b5f3afa6ad71: > > Update version for v6.1.0-rc3 release (2021-08-10 19:08:09 +0100) > > are available in the git repository at: > > https://github.com/quic/qemu

Re: [PATCH] hw/sensor: Add lsm303dlhc magnetometer device

2021-08-15 Thread Philippe Mathieu-Daudé
Hi Kevin, On 8/15/21 12:02 AM, Kevin Townsend wrote: > This commit adds emulation of the magnetometer on the LSM303DLHC. > It allows the magnetometer's X, Y and Z outputs to be set via the > magn_x, magn_y and magn_z properties, as well as the 12-bit > temperature output via the temperature

Re: [PATCH for-6.2 0/4] Zero sockaddr_in when initializing it

2021-08-15 Thread Philippe Mathieu-Daudé
On 8/15/21 5:44 PM, Peter Maydell wrote: > On Sun, 15 Aug 2021 at 15:34, Philippe Mathieu-Daudé > wrote: >> >> On 8/13/21 8:30 PM, Eric Blake wrote: >>> FWIW, the POSIX wording is interesting - it requires portable >>> applications to zero out sockaddr_in6 (and even states that memset() >>> is

[no subject]

2021-08-15 Thread Kevin Townsend
Updates the proposed LSM303DLHC magnetometer device following review by Philippe Mathieu-Daudé. This has been tested with Zephyr 2.6.0, as follows: $ west build -p auto -b mps2_an521 \ zephyr/samples/sensor/sensor_shell/ \ -- -DCONFIG_I2C_SHELL=y $ qemu-system-arm -M mps2-an521 -device

Re: [PATCH for-6.2 0/4] Zero sockaddr_in when initializing it

2021-08-15 Thread Philippe Mathieu-Daudé
On 8/13/21 8:30 PM, Eric Blake wrote: > On Fri, Aug 13, 2021 at 04:05:02PM +0100, Peter Maydell wrote: >> The POSIX spec for sockaddr_in says that implementations are allowed >> to have implementation-dependent extensions controlled by extra >> fields in the struct, and that the way to ensure

Re: [PATCH for-6.2 3/7] linux-user/arm: Use force_sig() to deliver fpa11 emulation SIGFPE

2021-08-15 Thread Richard Henderson
On 8/13/21 3:18 AM, Peter Maydell wrote: In the Arm target code, when the fpa11 emulation code tells us we need to send the guest a SIGFPE, we do this with queue_signal(), but we are using the wrong si_type, and we aren't setting the _sifields union members corresponding to either the si_type we

Re: [PATCH for-6.2 5/7] linux-user: Provide new force_sig_fault() function

2021-08-15 Thread Richard Henderson
On 8/13/21 3:18 AM, Peter Maydell wrote: +void force_sig_fault(int sig, int code, abi_ulong addr) Better as abi_ptr? Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH for-6.2 6/7] linux-user/arm: Use force_sig_fault()

2021-08-15 Thread Richard Henderson
On 8/13/21 3:18 AM, Peter Maydell wrote: Use the new force_sig_fault() function instead of setting up a target_siginfo_t and calling queue_signal(). Signed-off-by: Peter Maydell --- I threw in a comment confirming that the si_addr value for the "bad SWI immediate" SIGILL really is different

Re: [PATCH-for-6.2 v3 0/7] target/mips: Convert NEC Vr54xx to decodetree

2021-08-15 Thread Philippe Mathieu-Daudé
On 8/8/21 7:30 PM, Philippe Mathieu-Daudé wrote: > Missing review: #1 > > Trivial conversion, few more lines moved out of the huge translate.c. > > Since v2: > - Move TRANS() to translate.h (rth) > > Since v1: > - Use TRANS() macro from ppc/translate.c, per rth's comment: >

Re: [PATCH for-6.2 10/25] hw/arm: Don't allocate separate MemoryRegions in stm32 SoC realize

2021-08-15 Thread Philippe Mathieu-Daudé
On 8/12/21 2:27 PM, Peter Maydell wrote: > On Thu, 12 Aug 2021 at 13:13, Alexandre IOOSS wrote: >> >> On 8/12/21 11:33 AM, Peter Maydell wrote: >>> In the realize methods of the stm32f100 and stm32f205 SoC objects, we >>> call g_new() to create new MemoryRegion objjects for the sram, flash, >>>

Re: [PULL 02/11] gitlab: skip many more targets in windows cross builds

2021-08-15 Thread Peter Maydell
On Sat, 14 Aug 2021 at 07:10, Thomas Huth wrote: > > From: Daniel P. Berrangé > > The windows cross builds still take way too long in gitlab CI, so need > more targets to be skipped. We don't want to hurt coverage of other > cross builds more though, so we let jobs fine tune with a new env >

Re: [PULL 0/7] Maintainers 20210811 patches

2021-08-15 Thread Peter Maydell
On Wed, 11 Aug 2021 at 07:44, Gerd Hoffmann wrote: > > The following changes since commit 703e8cd6189cf699c8d5c094bc68b5f3afa6ad71: > > Update version for v6.1.0-rc3 release (2021-08-10 19:08:09 +0100) > > are available in the Git repository at: > > git://git.kraxel.org/qemu

[PATCH] po: update turkish translation

2021-08-15 Thread Oğuz Ersen
Hi, this is a small patch to update Turkish translation, thanks. -- Best Regards Oğuz ErsenFrom c1109c16e5d72cf55954a809afdde92c3c014f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sun, 15 Aug 2021 22:22:18 +0300 Subject: [PATCH] po: update turkish translation

[PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT

2021-08-15 Thread Philippe Mathieu-Daudé
We already call check_cp1_enabled() earlier in the "pre-conditions" checks for GSLWXC1 and GSLDXC1 in gen_loongson_lsdc2() prologue. Remove the duplicated calls. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/translate.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v2] hw/virtio: Fix leak of host-notifier memory-region

2021-08-15 Thread Yajun Wu via
If call virtio_queue_set_host_notifier_mr fails, should free host-notifier memory-region. Fixes: 44866521bd ("vhost-user: support registering external host notifiers") Signed-off-by: Yajun Wu --- hw/virtio/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-user.c

Re: [PATCH 0/2] enable fsdax rdma migration

2021-08-15 Thread lizhij...@fujitsu.com
ping... Hey Dave, could you help to take a look :) Thanks Zhijian On 31/07/2021 22:03, Li Zhijian wrote: > Previous qemu face 2 problems when migrating a fsdax memory backend with > RDMA protocol. > (1) ibv_reg_mr failed with Operation not supported > (2) requester(source) side could receive

Re: [PATCH] hw: ppc: sam460ex: Disable Ethernet devicetree nodes

2021-08-15 Thread David Gibson
On Sun, Aug 15, 2021 at 07:59:15PM -0700, Guenter Roeck wrote: > IBM EMAC Ethernet controllers are not emulated by qemu. If they are > enabled in devicetree files, they are instantiated in Linux but > obviously won't work. Disable associated devicetree nodes to prevent > unpredictable behavior. >

Re: [PATCH v3] vhost-vdpa: Do not send empty IOTLB update batches

2021-08-15 Thread Michael S. Tsirkin
On Mon, Aug 16, 2021 at 10:51:57AM +0800, Jason Wang wrote: > On Thu, Aug 12, 2021 at 10:09 PM Eugenio Pérez wrote: > > > > With the introduction of the batch hinting, meaningless batches can be > > created with no IOTLB updates if the memory region was skipped by > >

Re: [PATCH for-6.2 v5 06/14] machine: Prefer cores over sockets in smp parsing since 6.2

2021-08-15 Thread wangyanan (Y)
On 2021/8/14 0:30, Pankaj Gupta wrote: In the real SMP hardware topology world, it's much more likely that we have high cores-per-socket counts and few sockets totally. While the current preference of sockets over cores in smp parsing results in a virtual cpu topology with low cores-per-sockets

Re: [PATCH 3/7] MAINTAINERS: update audio entry.

2021-08-15 Thread Gerd Hoffmann
Hi, > First idea, split the current entry in too, allowing developers > with different interests to add their contact to the relevant entries. This makes sense indeed. Maybe split the backends into even more entries, specifically the os-specific ones (coreaudio for macos, ...), similar to the

Re: [PATCH v3] vhost-vdpa: Do not send empty IOTLB update batches

2021-08-15 Thread Jason Wang
On Thu, Aug 12, 2021 at 10:09 PM Eugenio Pérez wrote: > > With the introduction of the batch hinting, meaningless batches can be > created with no IOTLB updates if the memory region was skipped by > vhost_vdpa_listener_skipped_section. This is the case of host notifiers > memory regions, device

[PATCH] hw: ppc: sam460ex: Disable Ethernet devicetree nodes

2021-08-15 Thread Guenter Roeck
IBM EMAC Ethernet controllers are not emulated by qemu. If they are enabled in devicetree files, they are instantiated in Linux but obviously won't work. Disable associated devicetree nodes to prevent unpredictable behavior. Signed-off-by: Guenter Roeck --- hw/ppc/sam460ex.c | 8 1

Re: [PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT

2021-08-15 Thread Huacai Chen
Reviewed-by: Huacai Chen On Mon, Aug 16, 2021 at 8:10 AM Philippe Mathieu-Daudé wrote: > > We already call check_cp1_enabled() earlier in the "pre-conditions" > checks for GSLWXC1 and GSLDXC1 in gen_loongson_lsdc2() prologue. > Remove the duplicated calls. > > Signed-off-by: Philippe

[PATCH for-6.1 v6 0/1] machine: Disallow specifying topology parameters as zero

2021-08-15 Thread Yanan Wang
Rebased on the latest upstream/master since commit ea0aa1752ca (hw/core: fix error checking in smp_parse) to resolve conflict. This patch originally comes from [1], and it was suggested that it should be post for 6.1 to avoid a deprecation process in the future. [1]

[PATCH for-6.1 v6 1/1] machine: Disallow specifying topology parameters as zero

2021-08-15 Thread Yanan Wang
In the SMP configuration, we should either provide a topology parameter with a reasonable value (greater than zero) or just omit it and QEMU will compute the missing value. Users should have never provided a configuration with parameters as zero (e.g. -smp 8,sockets=0) which should be treated as

Re: [PULL 24/30] spapr_pci: populate ibm,loc-code

2021-08-15 Thread David Gibson
On Sun, Aug 15, 2021 at 04:36:18PM +0200, Philippe Mathieu-Daudé wrote: > On 8/13/21 5:17 PM, Peter Maydell wrote: > > On Tue, 10 Aug 2021 at 05:40, David Gibson > > wrote: > >> > >> On Mon, Aug 09, 2021 at 10:57:00AM +0100, Peter Maydell wrote: > >>> > >>> Cleanest fix would be to declare

Re: [PATCH] net/colo: check vnet_hdr_support flag when using virtio-net

2021-08-15 Thread Jason Wang
在 2021/8/6 下午2:08, Tao Xu 写道: When COLO use only one vnet_hdr_support parameter between COLO network filter(filter-mirror, filter-redirector or filter-rewriter and colo-compare, packet will not be parsed correctly. Acquire network driver related to COLO, if it is nirtio-net, check

Re: [PATCH] multifd: Implement yank for multifd send side

2021-08-15 Thread Leonardo Bras Soares Passos
Hello Lukas, On Wed, Aug 4, 2021 at 4:27 PM Lukas Straub wrote: > > When introducing yank functionality in the migration code I forgot > to cover the multifd send side. > > Signed-off-by: Lukas Straub > --- > > @Leonardo Could you check if this fixes your issue? In the same scenario I was

Re: [PATCH v2] hw/i386/acpi-build: Get NUMA information from struct NumaState

2021-08-15 Thread Liu, Jingqi
Hi Igor, Any comments on this 2nd version of the patch ? Thanks, Jingqi On 8/6/2021 11:19 AM, Liu, Jingqi wrote: We can get NUMA information completely from MachineState::numa_state. Remove PCMachineState::numa_nodes and PCMachineState::node_mem, since they are just copied from

Re: [PATCH] vga: don't abort when adding a duplicate isa-vga device

2021-08-15 Thread Gerd Hoffmann
Hi, > > +if (qemu_ram_block_by_name("vga.vram")) { > > +error_report("vga.vram is already registered, ignoring this > > device"); > > +return; > > +} > > I think we should not ignore the error, but rather turn this into a proper > error (instead of aborting). Yes.

Re: [PULL 0/3] i386, machine patches for QEMU 6.1-rc4

2021-08-15 Thread Peter Maydell
On Fri, 13 Aug 2021 at 14:40, Paolo Bonzini wrote: > > The following changes since commit 703e8cd6189cf699c8d5c094bc68b5f3afa6ad71: > > Update version for v6.1.0-rc3 release (2021-08-10 19:08:09 +0100) > > are available in the Git repository at: > > https://gitlab.com/bonzini/qemu.git

RE: [CXL volatile MEM] - Qemu command to turn on HMAT and NUMA fails with assertion

2021-08-15 Thread Samarth Saxena
Thanks Ben ! Does this command support volatile memory too? We are looking to run Volatile memory. Regards, Samarth -Original Message- From: Ben Widawsky Sent: Tuesday, August 10, 2021 11:43 PM To: Samarth Saxena Cc: Dr. David Alan Gilbert ; qemu-devel@nongnu.org Subject: Re: [CXL