[PULL 5/5] qapi: More complex uses of QAPI_LIST_APPEND

2021-01-27 Thread Markus Armbruster
From: Eric Blake These cases require a bit more thought to review; in each case, the code was appending to a list, but not with a FOOList **tail variable. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210113221013.390592-6-ebl...@redhat.com> Reviewed-by: Ma

Re: [PATCH 4/7] ppc/pnv: Simplify pnv_bmc_create()

2021-01-27 Thread Cédric Le Goater
On 1/28/21 1:46 AM, Joel Stanley wrote: > On Tue, 26 Jan 2021 at 17:14, Cédric Le Goater wrote: >> >> and reuse pnv_bmc_set_pnor() to share the setting of the PNOR. >> >> Signed-off-by: Cédric Le Goater >> --- >> hw/ppc/pnv_bmc.c | 7 +-- >> 1 file changed, 1 insertion(+), 6 deletions(-) >>

[PULL 4/5] qapi: Use QAPI_LIST_APPEND in trivial cases

2021-01-27 Thread Markus Armbruster
From: Eric Blake The easiest spots to use QAPI_LIST_APPEND are where we already have an obvious pointer to the tail of a list. While at it, consistently use the variable name 'tail' for that purpose. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Markus Armbr

Re: [PATCH v4 5/5] qapi: More complex uses of QAPI_LIST_APPEND

2021-01-27 Thread Markus Armbruster
Eric Blake writes: > On 1/26/21 3:31 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> These cases require a bit more thought to review; in each case, the >>> code was appending to a list, but not with a FOOList **tail variable. >>> >>> Signed-off-by: Eric Blake >>> Reviewed-by: Vladim

[PULL 2/5] qapi: A couple more QAPI_LIST_PREPEND() stragglers

2021-01-27 Thread Markus Armbruster
From: Eric Blake Commit 54aa3de72e switched multiple sites to use QAPI_LIST_PREPEND instead of open-coding, but missed a couple of spots. Signed-off-by: Eric Blake Message-Id: <20210113221013.390592-3-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Markus Armbruster

[PULL 0/5] QAPI patches patches for 2021-01-28

2021-01-27 Thread Markus Armbruster
The following changes since commit bf159f0bdc7b8e7aa8342dedb3829ca744c1b612: Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2021-01-27.for-upstream' into staging (2021-01-27 17:40:25 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pu

[PULL 1/5] net: Clarify early exit condition

2021-01-27 Thread Markus Armbruster
From: Eric Blake On first glance, the loop in qmp_query_rx_filter() has early return paths that could leak any allocation of filter_list from a previous iteration. But on closer inspection, it is obvious that all of the early exits are guarded by has_name, and that the bulk of the loop body can

[PULL 3/5] qapi: Introduce QAPI_LIST_APPEND

2021-01-27 Thread Markus Armbruster
From: Eric Blake Similar to the existing QAPI_LIST_PREPEND, but designed for use where we want to preserve insertion order. Callers will be added in upcoming patches. Note the difference in signature: PREPEND takes List*, APPEND takes List**. Signed-off-by: Eric Blake Reviewed-by: Vladimir Se

Re: [PATCH 3/6] qapi: Simplify full_name_nth() in qobject-input-visitor

2021-01-27 Thread Markus Armbruster
Kevin Wolf writes: > Am 27.01.2021 um 14:56 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Instead of counting how many elements from the top of the stack we need >> > to ignore until we find the thing we're interested in, we can just >> > directly pass the StackObject pointer

Re: [PATCH v8 00/10] hw/ssi: imx_spi: Fix various bugs in the imx_spi model

2021-01-27 Thread Bin Meng
On Fri, Jan 22, 2021 at 9:36 PM Bin Meng wrote: > > On Tue, Jan 19, 2021 at 9:40 PM Bin Meng wrote: > > > > From: Bin Meng > > > > This v8 series is based on the following 2 versions: > > > > - v5 series sent from Bin > > http://patchwork.ozlabs.org/project/qemu-devel/list/?series=223919 > > -

Re: [PATCH 5/7] ppc/pnv: Discard internal BMC initialization when BMC is external

2021-01-27 Thread Cédric Le Goater
On 1/28/21 1:48 AM, Joel Stanley wrote: > On Tue, 26 Jan 2021 at 17:11, Cédric Le Goater wrote: >> >> The PowerNV machine can be run with an external IPMI BMC device >> connected to a remote QEMU machine acting as BMC, using these options : >> >> -chardev socket,id=ipmi0,host=localhost,port=9002

Re: [PATCH 2/3] hw/sd: sd: Move the sd_block_{read, write} and macros ahead

2021-01-27 Thread Cédric Le Goater
Hello Bin, On 1/28/21 7:43 AM, Bin Meng wrote: > From: Bin Meng > > These APIs and macros may be referenced by functions that are > currently before them. Move them ahead a little bit. We could also change fprintf() by qemu_log_mask() Thanks, C. > Signed-off-by: Bin Meng > --- > > hw/s

Re: [PATCH 3/7] ppc/pnv: Use skiboot addresses to load kernel and ramfs

2021-01-27 Thread Cédric Le Goater
On 1/28/21 1:45 AM, Joel Stanley wrote: > On Tue, 26 Jan 2021 at 17:11, Cédric Le Goater wrote: >> >> The current settings are useful to load large kernels (with debug) but >> it moves the initrd image in a memory region not protected by >> skiboot. If skiboot is compiled with DEBUG=1, memory pois

[PATCH 3/3] hw/sd: sd: Actually perform the erase operation

2021-01-27 Thread Bin Meng
From: Bin Meng At present the sd_erase() does not erase the requested range of card data to 0xFFs. Let's make the erase operation actually happen. Signed-off-by: Bin Meng --- hw/sd/sd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 1886d4b30b..8c3

qemu user mode fails to run programs with large VM / built with address sanitizer (was: Re: [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available)

2021-01-27 Thread Stefan Weil
Am 27.01.21 um 22:47 schrieb Alex Bennée: Stefan Weil writes: I recently tried running tesseract with qemu-x86_64 because I had expected that it might trigger some unimplemented TCG opcodes. qemu-x86-64 is a poor choice as a relatively under maintained front-end doesn't emulate a particularly

[PATCH 1/3] hw/sd: sd: Fix address check in sd_erase()

2021-01-27 Thread Bin Meng
From: Bin Meng For high capacity memory cards, the erase start address and end address are multiplied by 512, but the address check is still based on the original block number in sd->erase_{start, end}. Fixes: 1bd6fd8ed593 ("hw/sd/sdcard: Do not attempt to erase out of range addresses") Signed-

[PATCH 2/3] hw/sd: sd: Move the sd_block_{read, write} and macros ahead

2021-01-27 Thread Bin Meng
From: Bin Meng These APIs and macros may be referenced by functions that are currently before them. Move them ahead a little bit. Signed-off-by: Bin Meng --- hw/sd/sd.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/hw/sd/sd.c

[PATCH 0/3] hw/sd: sd: erase operation fixes

2021-01-27 Thread Bin Meng
From: Bin Meng This includes several fixes related to erase operation of a SD card. Based-on: http://patchwork.ozlabs.org/project/qemu-devel/list/?series=226785 Bin Meng (3): hw/sd: sd: Fix address check in sd_erase() hw/sd: sd: Move the sd_block_{read,write} and macros ahead hw/sd: sd:

[PATCH v4 7/9] hw/sd: ssi-sd: Fix SEND_IF_COND (CMD8) response

2021-01-27 Thread Bin Meng
From: Bin Meng The SEND_IF_COND command (CMD8) response is of format R7, but current code returns R1 for CMD8. Fix it. Fixes: 775616c3ae8c ("Partial SD card SPI mode support") Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- When testing with VxWorks driver, this additional iss

[PATCH v4 9/9] hw/sd: ssi-sd: Handle the rest commands with R1b response type

2021-01-27 Thread Bin Meng
From: Bin Meng Besides CMD12, the following command's reponse type is R1b: - SET_WRITE_PROT (CMD28) - CLR_WRITE_PROT (CMD29) - ERASE (CMD38) Reuse the same s->stopping to indicate a R1b reponse is needed. Signed-off-by: Bin Meng --- Changes in v4: - new patch: handle the rest commands with

[PATCH v4 6/9] hw/sd: ssi-sd: Support multiple block write

2021-01-27 Thread Bin Meng
From: Bin Meng For a multiple block write operation, each block begins with a multi write start token. Unlike the SD mode that the multiple block write ends when receiving a STOP_TRAN command (CMD12), a special stop tran token is used to signal the card. Emulating this by manually sending a CMD1

[PATCH v4 8/9] hw/sd: ssi-sd: Fix STOP_TRANSMISSION (CMD12) response

2021-01-27 Thread Bin Meng
From: Bin Meng CMD12's response type is R1b, which is basically a R1 plus optional addition of the busy signal token that can be any number of bytes. A zero value indicates card is busy and a non-zero value indicates the card is ready for the next command. Current implementation sends the busy s

[PATCH v4 4/9] hw/sd: Introduce receive_ready() callback

2021-01-27 Thread Bin Meng
From: Bin Meng At present there is a data_ready() callback for the SD data read path. Let's add a receive_ready() for the SD data write path. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis Tested-by: Philippe Mathieu-Daudé --- (no changes since v1)

[PATCH v4 5/9] hw/sd: ssi-sd: Support single block write

2021-01-27 Thread Bin Meng
From: Bin Meng Add 2 more states for the block write operation. The SPI host needs to send a data start token to start the transfer, and the data block written to the card will be acknowledged by a data response token. Signed-off-by: Bin Meng Acked-by: Alistair Francis [PMD: Change VMState ver

[PATCH v4 0/9] hw/sd: Support block read/write in SPI mode

2021-01-27 Thread Bin Meng
From: Bin Meng This includes the previously v3 series [1], and one single patch [2]. Compared to v3, this fixed the following issue in patch [v3,6/6]: - Keep the card state to SSI_SD_CMD instead of SSI_SD_RESPONSE after receiving the STOP_TRAN token per the spec All software tested so far (U-

[PATCH v4 2/9] hw/sd: sd: Remove duplicated codes in single/multiple block read/write

2021-01-27 Thread Bin Meng
From: Bin Meng The single block read (CMD17) codes are the same as the multiple block read (CMD18). Merge them into one. The same applies to single block write (CMD24) and multiple block write (CMD25). Signed-off-by: Bin Meng Acked-by: Alistair Francis Tested-by: Philippe Mathieu-Daudé --- (

[PATCH v4 1/9] hw/sd: ssi-sd: Support multiple block read

2021-01-27 Thread Bin Meng
From: Bin Meng In the case of a multiple block read operation every transferred block has its suffix of CRC16. Update the state machine logic to handle multiple block read. Signed-off-by: Bin Meng Acked-by: Alistair Francis [PMD: Change VMState version id 5 -> 6] Signed-off-by: Philippe Mathie

[PATCH v4 3/9] hw/sd: sd: Allow single/multiple block write for SPI mode

2021-01-27 Thread Bin Meng
From: Bin Meng At present the single/multiple block write in SPI mode is blocked by sd_normal_command(). Remove the limitation. Signed-off-by: Bin Meng Acked-by: Alistair Francis Tested-by: Philippe Mathieu-Daudé --- (no changes since v1) hw/sd/sd.c | 3 --- 1 file changed, 3 deletions(-)

Re: [PATCH 0/2] hw/block/nvme: zoned fixes

2021-01-27 Thread Klaus Jensen
On Jan 19 14:54, Klaus Jensen wrote: > From: Klaus Jensen > > Patch [1/2] fixes the zone append bug reported by Niklas. [2/2] > refactors the zone write check function to return status codes in a > different order if there are multiple zone write violations that apply. > > Klaus Jensen (2): >

Re: [PATCH 0/4] Introduce a battery, AC adapter, and lid button

2021-01-27 Thread Leonid Bloch
On Tue, Jan 26, 2021 at 4:40 PM Michael S. Tsirkin wrote: > > Poking at sysfs from QEMU poses a bunch of issues, for example, > security, migration, etc. Running timers on the host is also not nice > since it causes exits from VM ... > > So I agree, as a starting point let's just let user > contro

Re: [PATCH 6/6] hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode

2021-01-27 Thread Corey Minyard
On Wed, Jan 27, 2021 at 05:37:25PM -0600, Corey Minyard wrote: > On Wed, Jan 27, 2021 at 01:59:07PM -0800, Hao Wu wrote: > > > > > > There is also the question about who takes these patches in. I'm the > > > I2C maintainer, but there's other code in this series. Once everything > > > is ready, I

Re: [RFC] Set addresses for memory devices [CXL]

2021-01-27 Thread Dan Williams
On Wed, Jan 27, 2021 at 7:52 PM Ben Widawsky wrote: > > Hi list, Igor. > > I wanted to get some ideas on how to better handle this. Per the recent > discussion [1], it's become clear that there needs to be more thought put into > how to manage the address space for CXL memory devices. If you see t

Re: [PATCH v3 4/4] target/arm: Set ID_PFR0.DIT to 1 for "max" 32-bit CPU

2021-01-27 Thread Richard Henderson
On 1/27/21 6:45 PM, Rebecca Cran wrote: > Enable FEAT_DIT for the "max" 32-bit CPU. > > Signed-off-by: Rebecca Cran > --- > target/arm/cpu.c | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v3 2/4] target/arm: Add support for FEAT_DIT, Data Independent Timing

2021-01-27 Thread Richard Henderson
On 1/27/21 6:45 PM, Rebecca Cran wrote: > Add support for FEAT_DIT. DIT (Data Independent Timing) is a required > feature for ARMv8.4. Since virtual machine execution is largely > nondeterministic and TCG is outside of the security domain, it's > implemented as a NOP. > > Signed-off-by: Rebecca Cr

[PATCH] tcg/tci: Implement INDEX_op_ld16s_i32

2021-01-27 Thread Stefan Weil
That TCG opcode is used by debian-buster (arm64) running ffmpeg: qemu-aarch64 /usr/bin/ffmpeg -i theora.mkv theora.webm Reported-by: Alex Bennée Signed-off-by: Stefan Weil --- tcg/tci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcg/tci.c b/tcg/tci.c index 63d7

Re: [PATCH v3 1/4] target/arm: Remove PSTATE_SS from cpsr and move it into env->pstate.

2021-01-27 Thread Richard Henderson
On 1/27/21 6:45 PM, Rebecca Cran wrote: > cpsr has been treated as being the same as spsr, but it isn't. > Since PSTATE_SS isn't in cpsr, remove it and move it into env->pstate. > > Signed-off-by: Rebecca Cran > --- > target/arm/helper-a64.c | 2 +- > target/arm/helper.c | 2 +- > target/arm

[PATCH v3 3/4] target/arm: Set ID_AA64PFR0.DIT and ID_PFR0.DIT to 1 for "max" AA64 CPU

2021-01-27 Thread Rebecca Cran
Enable FEAT_DIT for the "max" AARCH64 CPU. Signed-off-by: Rebecca Cran Reviewed-by: Richard Henderson --- target/arm/cpu64.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 5e851028c592..9a5cfd4fc632 100644 --- a/target/arm/cpu64.c +++ b/ta

[PATCH v3 2/4] target/arm: Add support for FEAT_DIT, Data Independent Timing

2021-01-27 Thread Rebecca Cran
Add support for FEAT_DIT. DIT (Data Independent Timing) is a required feature for ARMv8.4. Since virtual machine execution is largely nondeterministic and TCG is outside of the security domain, it's implemented as a NOP. Signed-off-by: Rebecca Cran Reviewed-by: Richard Henderson --- target/arm/

[PATCH v3 4/4] target/arm: Set ID_PFR0.DIT to 1 for "max" 32-bit CPU

2021-01-27 Thread Rebecca Cran
Enable FEAT_DIT for the "max" 32-bit CPU. Signed-off-by: Rebecca Cran --- target/arm/cpu.c | 4 1 file changed, 4 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 40142ac141e5..c98f44624423 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2197,6 +2197,10 @@ stat

[PATCH v3 0/4] target/arm: Add support for FEAT_DIT, Data Independent Timing

2021-01-27 Thread Rebecca Cran
Add support for FEAT_DIT. DIT (Data Independent Timing) is a required feature for ARMv8.4. Changes from v2 to v3: o Fixed PSTATE_SS patch: - Reverted the singlestep removal. - Fixed saving cpsr into spsr. o Added DIT to the max 32-bit CPU. Rebecca Cran (4): target/arm: Remove PSTATE_SS fr

[PATCH v3 1/4] target/arm: Remove PSTATE_SS from cpsr and move it into env->pstate.

2021-01-27 Thread Rebecca Cran
cpsr has been treated as being the same as spsr, but it isn't. Since PSTATE_SS isn't in cpsr, remove it and move it into env->pstate. Signed-off-by: Rebecca Cran --- target/arm/helper-a64.c | 2 +- target/arm/helper.c | 2 +- target/arm/op_helper.c | 9 + 3 files changed, 3 insertio

Re: Fwd: VirtioSound device emulation implementation

2021-01-27 Thread Shreyansh Chouhan
Thanks a lot Alex! > All QEMU devices have two parts, a frontend (which the guest sees) and a > backend (which is how the data gets to somewhere in the host). Some of > the command line options in QEMU elide the details for convenience (-nic > and -drive are examples). The -netdev device is all ab

[Bug 1913510] [NEW] [Fuzz] qemu-system-i386 virtio-mouse: Assertion in address_space_lduw_le_cached failed

2021-01-27 Thread Qiuhao Li
Public bug reported: --[ Reproducer cat << EOF | ./build/qemu-system-i386 -machine q35,accel=qtest -nodefaults \ -device virtio-mouse -display none -qtest stdio outl 0xcf8 0x8820 outl 0xcfc 0xe0004000 outl 0xcf8 0x8804 outb 0xcfc 0x02 write 0xe000400c 0x4 0x003fe62e write 0xe0004016 0x1 0

[PATCH] fuzz: fix wrong index in clear_bits

2021-01-27 Thread Qiuhao Li
Signed-off-by: Qiuhao Li --- scripts/oss-fuzz/minimize_qtest_trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/oss-fuzz/minimize_qtest_trace.py b/scripts/oss-fuzz/minimize_qtest_trace.py index 4cba96dee2..20825768c2 100755 --- a/scripts/oss-fuzz/minimize_qtest_

[RFC] Set addresses for memory devices [CXL]

2021-01-27 Thread Ben Widawsky
Hi list, Igor. I wanted to get some ideas on how to better handle this. Per the recent discussion [1], it's become clear that there needs to be more thought put into how to manage the address space for CXL memory devices. If you see the discussion on interleave [2] there's a decent diagram for the

[PATCH] hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled

2021-01-27 Thread Iris Johnson
Currently the Exynos 4210 UART code always reports available FIFO space when the backend checks for buffer space. When the FIFO is disabled this is behavior causes the backend chardev code to replace the data before the guest can read it. This patch changes adds the logic to report the capacity pr

[PATCH] tcg/tci: Implement INDEX_op_ld16s_i32

2021-01-27 Thread Stefan Weil
That TCG opcode is used by debian-buster (arm64) running ffmpeg: qemu-aarch64 /usr/bin/ffmpeg -i theora.mkv theora.webm Reported-by: Alex Bennée Signed-off-by: Stefan Weil --- tcg/tci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcg/tci.c b/tcg/tci.c index 63d7

Re: [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available

2021-01-27 Thread Stefan Weil
Am 27.01.21 um 22:47 schrieb Alex Bennée: Your just going to end up playing wack-a-mole: TODO ../../tcg/tci.c:620: tcg_qemu_tb_exec()me=00:00:00.00 bitrate=N/A speed= 0x ../../tcg/tci.c:620: tcg fatal error qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmen

[Bug 1913505] [NEW] Windows XP slow on Apple M1

2021-01-27 Thread Mishari Muqbil
Public bug reported: Qemu installed by using brew install qemu -s on M1 QEMU emulator version 5.2.0 XP image from: https://archive.org/details/WinXPProSP3x86 Commands run: $ qemu-img create -f qcow2 xpsp3.img 10G $ qemu-system-i386 -m 512 -hda xpsp3.img -cdrom WinXPProSP3x86/en_windows_xp_profe

Re: [RFC PATCH v2 2/3] vfio: Set the priority of the VFIO VM state change handler explicitly

2021-01-27 Thread Shenming Lu
On 2021/1/27 22:20, Alex Williamson wrote: > On Wed, 27 Jan 2021 19:20:06 +0800 > Shenming Lu wrote: > >> On 2021/1/27 5:36, Alex Williamson wrote: >>> On Wed, 9 Dec 2020 16:09:18 +0800 >>> Shenming Lu wrote: >>> In the VFIO VM state change handler, VFIO devices are transitioned in

Re: [PATCH] vhost-user: Check for iotlb callback in iotlb_miss

2021-01-27 Thread Jason Wang
On 2021/1/28 上午4:44, Eugenio Pérez wrote: Not registering this can lead to vhost_backend_handle_iotlb_msg and vhost_device_iotlb_miss if backend issue a miss after qemu vhost device stop. This causes a try to access dev->vdev->dma_as with vdev == NULL. Hi Eugenio: What condition can we get

[PATCH v2] tcg/tci: Implement INDEX_op_ld8s_i64

2021-01-27 Thread Stefan Weil
That TCG opcode is used by debian-buster (arm64) running ffmpeg: qemu-aarch64 /usr/bin/ffmpeg -i theora.mkv theora.webm Reported-by: Alex Bennée Signed-off-by: Stefan Weil --- v2: Fixed as suggested by Richard Henderson Thank you, Stefan tcg/tci.c | 5 - 1 file changed, 4 insertion

Re: [PATCH 7/7] ppc/pnv: Introduce a LPC FW memory region attribute to map the PNOR

2021-01-27 Thread David Gibson
On Tue, Jan 26, 2021 at 06:10:59PM +0100, Cédric Le Goater wrote: > This to map the PNOR from the machine init handler directly and finish > the cleanup of the LPC model. > > Signed-off-by: Cédric Le Goater Applied to ppc-for-6.0, thanks. > --- > include/hw/ppc/pnv.h | 1 + > hw/ppc/pnv.c

Re: [PATCH 6/7] ppc/pnv: Remove default disablement of the PNOR contents

2021-01-27 Thread David Gibson
On Tue, Jan 26, 2021 at 06:10:58PM +0100, Cédric Le Goater wrote: > On PowerNV systems, the BMC is in charge of mapping the PNOR contents > on the LPC FW address space using the HIOMAP protocol. Under QEMU, we > emulate this behavior and we also add an extra control on the flash > accesses by letti

Re: [PATCH 4/7] ppc/pnv: Simplify pnv_bmc_create()

2021-01-27 Thread David Gibson
On Tue, Jan 26, 2021 at 06:10:56PM +0100, Cédric Le Goater wrote: > and reuse pnv_bmc_set_pnor() to share the setting of the PNOR. > > Signed-off-by: Cédric Le Goater Applied to ppc-for-6.0, thanks. > --- > hw/ppc/pnv_bmc.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > dif

Re: [PATCH 5/7] ppc/pnv: Discard internal BMC initialization when BMC is external

2021-01-27 Thread David Gibson
On Tue, Jan 26, 2021 at 06:10:57PM +0100, Cédric Le Goater wrote: > The PowerNV machine can be run with an external IPMI BMC device > connected to a remote QEMU machine acting as BMC, using these options : > > -chardev socket,id=ipmi0,host=localhost,port=9002,reconnect=10 \ > -device ipmi-bmc-

Re: [PATCH 3/7] ppc/pnv: Use skiboot addresses to load kernel and ramfs

2021-01-27 Thread David Gibson
On Tue, Jan 26, 2021 at 06:10:55PM +0100, Cédric Le Goater wrote: > The current settings are useful to load large kernels (with debug) but > it moves the initrd image in a memory region not protected by > skiboot. If skiboot is compiled with DEBUG=1, memory poisoning will > corrupt the initrd. > >

Re: [PATCH 1/7] ppc/pnv: Add trace events for PCI event notification

2021-01-27 Thread David Gibson
On Tue, Jan 26, 2021 at 06:10:53PM +0100, Cédric Le Goater wrote: > On POWER9 systems, PHB controllers signal the XIVE interrupt controller > of a source interrupt notification using a store on a MMIO region. Add > traces for such events. > > Signed-off-by: Cédric Le Goater Applied to ppc-for-6.

Re: [PATCH 2/7] ppc/xive: Add firmware bit when dumping the ENDs

2021-01-27 Thread David Gibson
On Tue, Jan 26, 2021 at 06:10:54PM +0100, Cédric Le Goater wrote: > ENDs allocated by OPAL for the HW thread VPs are tagged as owned by FW. > Dump the state in 'info pic'. > > Signed-off-by: Cédric Le Goater Applied to ppc-for-6.0, thanks. > --- > include/hw/ppc/xive_regs.h | 2 ++ > hw/intc/x

Re: [PATCH] target/ppc: Remove unused MMU definitions

2021-01-27 Thread David Gibson
On Thu, Jan 28, 2021 at 12:24:01AM +0100, Philippe Mathieu-Daudé wrote: > Remove these confusing and unused definitions. > > Signed-off-by: Philippe Mathieu-Daudé Applied to ppc-for-6.0. > --- > target/ppc/cpu.h | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/target/ppc/cpu.h b/tar

[PATCH v4] blockjob: Fix crash with IOthread when block commit after snapshot

2021-01-27 Thread 08005325
From: Michael Qiu v4: rebase to latest code v3: reformat the commit log, remove duplicate content v2: modify the coredump backtrace within commit log with the newest qemu with master branch Currently, if guest has workloads, IO thread will acquire aio_context lock before do io_submit, it l

Re: [PATCH 7/7] ppc/pnv: Introduce a LPC FW memory region attribute to map the PNOR

2021-01-27 Thread Joel Stanley
On Tue, 26 Jan 2021 at 17:19, Cédric Le Goater wrote: > > This to map the PNOR from the machine init handler directly and finish > the cleanup of the LPC model. > > Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley > --- > include/hw/ppc/pnv.h | 1 + > hw/ppc/pnv.c | 11 +

Re: [PATCH 6/7] ppc/pnv: Remove default disablement of the PNOR contents

2021-01-27 Thread Joel Stanley
On Tue, 26 Jan 2021 at 17:11, Cédric Le Goater wrote: > > On PowerNV systems, the BMC is in charge of mapping the PNOR contents > on the LPC FW address space using the HIOMAP protocol. Under QEMU, we > emulate this behavior and we also add an extra control on the flash > accesses by letting the HI

Re: [PATCH 5/7] ppc/pnv: Discard internal BMC initialization when BMC is external

2021-01-27 Thread Joel Stanley
On Tue, 26 Jan 2021 at 17:11, Cédric Le Goater wrote: > > The PowerNV machine can be run with an external IPMI BMC device > connected to a remote QEMU machine acting as BMC, using these options : > > -chardev socket,id=ipmi0,host=localhost,port=9002,reconnect=10 \ > -device ipmi-bmc-extern,id=

Re: [PATCH 4/7] ppc/pnv: Simplify pnv_bmc_create()

2021-01-27 Thread Joel Stanley
On Tue, 26 Jan 2021 at 17:14, Cédric Le Goater wrote: > > and reuse pnv_bmc_set_pnor() to share the setting of the PNOR. > > Signed-off-by: Cédric Le Goater > --- > hw/ppc/pnv_bmc.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c

Re: [PATCH 3/7] ppc/pnv: Use skiboot addresses to load kernel and ramfs

2021-01-27 Thread Joel Stanley
On Tue, 26 Jan 2021 at 17:11, Cédric Le Goater wrote: > > The current settings are useful to load large kernels (with debug) but > it moves the initrd image in a memory region not protected by > skiboot. If skiboot is compiled with DEBUG=1, memory poisoning will > corrupt the initrd. > > Cc: Muril

Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)

2021-01-27 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Cover from Samuel Ortiz from (part 1) [1]: > > This patchset allows for building and running ARM targets with TCG > disabled. [...] > > The rationale behind this work comes from the NEMU project where we're > trying to only support x86 and ARM 64-bit arc

[PATCH] target/moxie: Let moxie_mmu_translate() use MMUAccessType access_type

2021-01-27 Thread Philippe Mathieu-Daudé
moxie_mmu_translate() doesn't do much work. Still keep its prototype similar to the other targets, by taking a MMUAccessType argument. Signed-off-by: Philippe Mathieu-Daudé --- target/moxie/mmu.h| 2 +- target/moxie/helper.c | 2 +- target/moxie/mmu.c| 2 +- 3 files changed, 3 insertions

[PATCH 2/2] target/cris: Let cris_mmu_translate() use MMUAccessType access_type

2021-01-27 Thread Philippe Mathieu-Daudé
All callers of cris_mmu_translate() provide a MMUAccessType type. Let the prototype use it as argument, as it is stricter than an integer. We can remove the documentation as enum names are self explicit. Signed-off-by: Philippe Mathieu-Daudé --- target/cris/mmu.h | 2 +- target/cris/mmu.c | 24

[PATCH 1/2] target/cris: Use MMUAccessType enum type when possible

2021-01-27 Thread Philippe Mathieu-Daudé
Replace the 0/1/2 magic values by the corresponding MMUAccessType. We can remove a comment as enum names are self explicit. Signed-off-by: Philippe Mathieu-Daudé --- target/cris/helper.c | 4 ++-- target/cris/mmu.c| 13 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --

[PATCH 0/2] target/cris: Pass MMUAccessType to cris_mmu_translate()

2021-01-27 Thread Philippe Mathieu-Daudé
Taking notes while reviewing commit 671a0a1265a ("use MMUAccessType instead of int in mmu_translate"). Philippe Mathieu-Daudé (2): target/cris: Use MMUAccessType enum type when possible target/cris: Let cris_mmu_translate() use MMUAccessType access_type target/cris/mmu.h| 2 +- target/c

[PATCH 2/2] target/nios2: Use MMUAccessType enum type when possible

2021-01-27 Thread Philippe Mathieu-Daudé
All callers of mmu_translate() provide it a MMUAccessType type. Let the prototype use it as argument, as it is stricter than an integer. We can remove the documentation as enum names are self explicit. Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/mmu.h | 3 ++- target/nios2/mmu.c | 4 +

[PATCH 1/2] target/nios2: Replace magic value by MMU definitions

2021-01-27 Thread Philippe Mathieu-Daudé
cpu_get_phys_page_debug() uses 'DATA LOAD' MMU access type. The first MMU is the supervisor one. Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/nios2/helper.c b/target/nios2/helper.c index 57c97bde3c6..fe

[PATCH 0/2] target/nios2: Pass MMUAccessType to mmu_translate()

2021-01-27 Thread Philippe Mathieu-Daudé
Taking notes while reviewing commit 671a0a1265a ("use MMUAccessType instead of int in mmu_translate"). Philippe Mathieu-Daudé (2): target/nios2: Replace magic value by MMU definitions target/nios2: Use MMUAccessType enum type when possible target/nios2/mmu.h| 3 ++- target/nios2/helper.c

Re: [PATCH 6/6] hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode

2021-01-27 Thread Corey Minyard
On Wed, Jan 27, 2021 at 01:59:07PM -0800, Hao Wu wrote: > On Wed, Jan 27, 2021 at 1:42 PM Corey Minyard wrote: > > > On Wed, Jan 27, 2021 at 12:37:46PM -0800, wuhaotsh--- via wrote: > > > On Tue, Jan 26, 2021 at 3:47 PM Corey Minyard wrote: > > > > > > > On Tue, Jan 26, 2021 at 11:32:37AM -0800,

RE: [PATCH 0/2] hw/block/nvme: zoned fixes

2021-01-27 Thread Dmitry Fomichev
> -Original Message- > From: Keith Busch > Sent: Wednesday, January 27, 2021 12:42 PM > To: Klaus Jensen > Cc: qemu-devel@nongnu.org; Kevin Wolf ; Max Reitz > ; qemu-bl...@nongnu.org; Dmitry Fomichev > ; Klaus Jensen > Subject: Re: [PATCH 0/2] hw/block/nvme: zoned fixes > > On Tue, Jan

[PATCH] target/arm: Replace magic value by MMU_DATA_LOAD definition

2021-01-27 Thread Philippe Mathieu-Daudé
cpu_get_phys_page_debug() uses 'DATA LOAD' MMU access type. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index d2ead3fcbdb..766ca8b5c78 100644 --- a/target/arm/helper.c

[PATCH] target/ppc: Remove unused MMU definitions

2021-01-27 Thread Philippe Mathieu-Daudé
Remove these confusing and unused definitions. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 2609e4082ed..cb002102888 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -2205,9 +2205

[PATCH 4/5] target/sh4: Let get_physical_address() use MMUAccessType access_type

2021-01-27 Thread Philippe Mathieu-Daudé
superh_cpu_tlb_fill() already provides a access_type variable of type MMUAccessType, and it is passed along, but casted as integer and renamed 'rw'. Simply replace 'int rw' by 'MMUAccessType access_type'. Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/helper.c | 20 ++-- 1

[PATCH 2/5] target/sh4: Replace magic value by MMUAccessType definitions

2021-01-27 Thread Philippe Mathieu-Daudé
Replace the 0/1/2 magic values by the corresponding MMUAccessType. Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/helper.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/sh4/helper.c b/target/sh4/helper.c index fc816137766..4303ebf018b 100644 --

[PATCH 5/5] target/sh4: Remove unused definitions

2021-01-27 Thread Philippe Mathieu-Daudé
Remove these confusing and unused definitions. Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/cpu.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 714e3b56413..01c43440822 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -27

[PATCH 3/5] target/sh4: Pass mmu_idx to get_physical_address()

2021-01-27 Thread Philippe Mathieu-Daudé
get_mmu_address() and get_physical_address() don't use their 'int access_type' argument: remove it along with ACCESS_INT in superh_cpu_tlb_fill(). Pass the MMU index along, as other targets do. Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/helper.c | 11 +-- 1 file changed, 5 in

[PATCH 1/5] target/sh4: Fix code style for checkpatch.pl

2021-01-27 Thread Philippe Mathieu-Daudé
We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé --- Easier to review using 'git-diff -w -b' --- target/sh4/helper.c | 82 ++--- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/target/sh4/helper.c b

[PATCH 0/5] target/sh4: Pass MMUAccessType to get_physical_address()

2021-01-27 Thread Philippe Mathieu-Daudé
Taking notes while reviewing commit 671a0a1265a ("use MMUAccessType instead of int in mmu_translate"). Philippe Mathieu-Daudé (5): target/sh4: Fix code style for checkpatch.pl target/sh4: Replace magic value by MMUAccessType definitions target/sh4: Pass mmu_idx to get_physical_address() ta

Re: [PATCH] tcg/tci: Implement INDEX_op_ld8s_i64

2021-01-27 Thread Richard Henderson
On 1/27/21 11:07 AM, Stefan Weil wrote: > case INDEX_op_ld8s_i64: > -TODO(); > +t0 = *tb_ptr++; > +t1 = tci_read_r(regs, &tb_ptr); > +t2 = tci_read_s32(&tb_ptr); > +tci_write_reg8(regs, t0, *(int8_t *)(t1 + t2)); > br

Re: [PATCH] target/i386: Fix decoding of certain BMI instructions

2021-01-27 Thread David Greenaway
On 14 Jan 2021, David Greenaway wrote: > This patch fixes a translation bug for a subset of x86 BMI instructions > such as the following: [...] Gentle ping. The patch is up at: https://patchwork.kernel.org/project/qemu-devel/patch/20210114063958.1508050-1-dgreena...@google.com/ if that helps.

[PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition

2021-01-27 Thread Philippe Mathieu-Daudé
cpu_get_phys_page_debug() uses 'DATA LOAD' MMU access type. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/tricore/helper.c b/target/tricore/helper.c index 77152932630..81171db833b 100644 --- a/target

[PATCH 3/3] target/tricore: Remove unused definitions

2021-01-27 Thread Philippe Mathieu-Daudé
Remove these confusing and unused definitions. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/cpu.h | 12 1 file changed, 12 deletions(-) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index b82349d1b10..4b61a2c03f8 100644 --- a/target/tricore/cpu.h +++ b/target

[PATCH 2/3] target/tricore: Pass MMUAccessType to get_physical_address()

2021-01-27 Thread Philippe Mathieu-Daudé
'int access_type' and ACCESS_INT are unused, drop them. Provide the mmu_idx argument to match other targets. 'int rw' is actually the MMUAccessType, rename it. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/helper.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --gi

[PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address()

2021-01-27 Thread Philippe Mathieu-Daudé
Taking notes while reviewing commit 671a0a1265a ("use MMUAccessType instead of int in mmu_translate"). Philippe Mathieu-Daudé (3): target/tricore: Replace magic value by MMU_DATA_LOAD definition target/tricore: Pass MMUAccessType to get_physical_address() target/tricore: Remove unused defini

Re: [PATCH 17/25] hw/arm/stellaris: Create Clock input for watchdog

2021-01-27 Thread Philippe Mathieu-Daudé
On 1/21/21 10:59 PM, Philippe Mathieu-Daudé wrote: > On 1/21/21 8:06 PM, Peter Maydell wrote: >> Create and connect the Clock input for the watchdog device on the >> Stellaris boards. Because the Stellaris boards model the ability to >> change the clock rate by programming PLL registers, we have t

Re: [PATCH v4 1/2] drivers/misc: sysgenid: add system generation id driver

2021-01-27 Thread Pavel Machek
Hi! > - Solution > > The System Generation ID is a simple concept meant to alleviate the > issue by providing a monotonically increasing u32 counter that changes > each time the VM or container is restored from a snapshot. I'd make it u64. But as people explained, this has race problems that ma

Re: [PATCH 25/25] hw/arm/stellaris: Remove board-creation reset of STELLARIS_SYS

2021-01-27 Thread Philippe Mathieu-Daudé
On 1/21/21 8:06 PM, Peter Maydell wrote: > Now that the watchdog device uses its Clock input rather than being > passed the value of system_clock_scale at creation time, we can > remove the hack where we reset the STELLARIS_SYS at board creation > time to force it to set system_clock_scale. Instea

Re: [PATCH 16/25] hw/arm/stellaris: Convert SSYS to QOM device

2021-01-27 Thread Philippe Mathieu-Daudé
On 1/25/21 12:48 PM, Peter Maydell wrote: > On Thu, 21 Jan 2021 at 22:13, Philippe Mathieu-Daudé wrote: >> On 1/21/21 8:06 PM, Peter Maydell wrote: >>> Convert the SSYS code in the Stellaris boards (which encapsulates the >>> system registers) to a proper QOM device. This will provide us with >>>

Re: [PATCH 19/25] hw/timer/cmsdk-apb-dualtimer: Convert to use Clock input

2021-01-27 Thread Philippe Mathieu-Daudé
On 1/21/21 8:06 PM, Peter Maydell wrote: > Switch the CMSDK APB dualtimer device over to using its Clock input; > the pclk-frq property is now ignored. > > Signed-off-by: Peter Maydell > --- > hw/timer/cmsdk-apb-dualtimer.c | 42 ++ > 1 file changed, 37 insertions

Re: [PATCH 6/6] hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode

2021-01-27 Thread wuhaotsh--- via
On Wed, Jan 27, 2021 at 1:42 PM Corey Minyard wrote: > On Wed, Jan 27, 2021 at 12:37:46PM -0800, wuhaotsh--- via wrote: > > On Tue, Jan 26, 2021 at 3:47 PM Corey Minyard wrote: > > > > > On Tue, Jan 26, 2021 at 11:32:37AM -0800, wuhaotsh--- via wrote: > > > > + > > > > +static void npcm7xx_smbus

Re: [PATCH 02/25] clock: Add new clock_has_source() function

2021-01-27 Thread Philippe Mathieu-Daudé
On 1/21/21 8:05 PM, Peter Maydell wrote: > Add a function for checking whether a clock has a source. This is > useful for devices which have input clocks that must be wired up by > the board as it allows them to fail in realize rather than ploughing > on with a zero-period clock. > > Signed-off-b

Re: [RFC] Change default ipv6 network from fec0/10 (site local) to fe80/10 (link local)

2021-01-27 Thread Samuel Thibault
Hello, Philippe Mathieu-Daudé, le mer. 27 janv. 2021 22:46:13 +0100, a ecrit: > On 1/27/21 8:13 PM, Doug Evans wrote: > > I happened to notice QEMU's default for the ipv6 network is fec0::/10 > > which is deprecated (RFC3879). > > I think(!) an obvious replacement is fe80::/10, link local. fe80::

Re: [PATCH 04/25] tests: Add a simple test of the CMSDK APB watchdog

2021-01-27 Thread Philippe Mathieu-Daudé
On 1/21/21 8:06 PM, Peter Maydell wrote: > Add a simple test of the CMSDK watchdog, since we're about to do some > refactoring of how it is clocked. > > Signed-off-by: Peter Maydell > --- > tests/qtest/cmsdk-apb-watchdog-test.c | 80 +++ > MAINTAINERS

Re: [RFC PATCH v2 1/3] vfio: Move the saving of the config space to the right place in VFIO migration

2021-01-27 Thread Kirti Wankhede
On 1/27/2021 3:06 AM, Alex Williamson wrote: On Thu, 10 Dec 2020 10:21:21 +0800 Shenming Lu wrote: On 2020/12/10 2:34, Alex Williamson wrote: On Wed, 9 Dec 2020 13:29:47 +0100 Cornelia Huck wrote: On Wed, 9 Dec 2020 16:09:17 +0800 Shenming Lu wrote: On ARM64 the VFIO SET_IRQS io

  1   2   3   >