Re: [PATCH v2 for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Thomas Huth
On 24/11/2020 08.43, Greg Kurz wrote: > The "local" tests can fail on some automated build systems as > reported here: > > https://lists.nongnu.org/archive/html/qemu-devel/2020-11/msg05510.html > > This will need to be investigated and addressed later. Let's go for a > workaround in the meantime

[PATCH v2 for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Greg Kurz
The "local" tests can fail on some automated build systems as reported here: https://lists.nongnu.org/archive/html/qemu-devel/2020-11/msg05510.html This will need to be investigated and addressed later. Let's go for a workaround in the meantime : mark the "local" tests as "slow" so that they aren

[PATCH] hw/block/nvme: add compare command

2020-11-23 Thread Klaus Jensen
From: Gollu Appalanaidu Add the Compare command. This implementation uses a bounce buffer to read in the data from storage and then compare with the host supplied buffer. Signed-off-by: Gollu Appalanaidu [k.jensen: rebased] Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 100

Re: [PATCH for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 19:08:18 +0100 Christian Schoenebeck wrote: > On Montag, 23. November 2020 18:41:51 CET Greg Kurz wrote: > > The "local" tests can fail on some automated build systems as > > reported here: > > > > https://lists.nongnu.org/archive/html/qemu-devel/2020-11/msg05510.html > > >

Re: [PATCH for-5.2] tests/9pfs: Mark "local" tests as "slow"

2020-11-23 Thread Greg Kurz
On Mon, 23 Nov 2020 20:35:58 +0100 Christian Schoenebeck wrote: > On Montag, 23. November 2020 19:08:18 CET Christian Schoenebeck wrote: > > On Montag, 23. November 2020 18:41:51 CET Greg Kurz wrote: > > > The "local" tests can fail on some automated build systems as > > > reported here: > > > >

[PATCH 2/2] hw/block/nvme: add simple copy command

2020-11-23 Thread Klaus Jensen
From: Klaus Jensen Add support for TP 4065a ("Simple Copy Command"), v2020.05.04 ("Ratified"). The implementation uses a bounce buffer to first read in the source logical blocks, then issue a write of that bounce buffer. The default maximum number of source logical blocks is 128, translating to

[PATCH 0/2] hw/block/nvme: add simple copy command

2020-11-23 Thread Klaus Jensen
From: Klaus Jensen Add support for TP 4065 ("Simple Copy Command"). Klaus Jensen (2): nvme: updated shared header for copy command hw/block/nvme: add simple copy command hw/block/nvme-ns.h| 4 + hw/block/nvme.h | 1 + include/block/nvme.h | 45 - hw/block/nvme-ns.c

[PATCH 1/2] nvme: updated shared header for copy command

2020-11-23 Thread Klaus Jensen
From: Klaus Jensen Add new data structures and types for the Simple Copy command. Signed-off-by: Klaus Jensen Cc: Stefan Hajnoczi Cc: Fam Zheng --- include/block/nvme.h | 45 ++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/include/b

Re: [PATCH v2] target/i386: seg_helper: Correct segement selector nullification in the RET/IRET helper

2020-11-23 Thread Bin Meng
Hi Paolo, On Tue, Nov 17, 2020 at 7:06 PM Paolo Bonzini wrote: > > On 17/11/20 11:08, Bin Meng wrote: > >> I see. Is there any chance you could write a testcase for > >> kvm-unit-tests? Or just explain how to write such a test, and then I > >> can write it myself; it's not clear to me how the g

[PULL 1/1] ppc/translate: Implement lxvwsx opcode

2020-11-23 Thread David Gibson
From: LemonBoy Implement the "Load VSX Vector Word & Splat Indexed" opcode, introduced in Power ISA v3.0. Buglink: https://bugs.launchpad.net/qemu/+bug/1793608 Signed-off-by: Giuseppe Musacchio Message-Id: Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- target/ppc/translate/

[PULL 0/1] ppc-for-5.2 queue 20201124

2020-11-23 Thread David Gibson
The following changes since commit 23895cbd82be95428e90168b12e925d0d3ca2f06: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20201123.0' into staging (2020-11-23 18:51:13 +) are available in the Git repository at: https://gitlab.com/dgibson/qemu.git tags/ppc-for-5.2-2020

Re: [PATCH 05/11] exec: add debug version of physical memory read and write API

2020-11-23 Thread Dov Murik
On 16/11/2020 20:51, Ashish Kalra wrote: From: Brijesh Singh Adds the following new APIs - cpu_physical_memory_read_debug - cpu_physical_memory_write_debug - cpu_physical_memory_rw_debug - ldl_phys_debug - ldq_phys_debug The subsequent patch will make use of the API introduced, to ensure th

[Bug 1905356] [NEW] No check for unaligned data access in ARM32 instructions

2020-11-23 Thread JIANG Muhui
Public bug reported: hi According to the ARM documentation, there are alignment requirements of load/store instructions. Alignment fault should be raised if the alignment check is failed. However, it seems that QEMU doesn't implement this, which is against the documentation of ARM. For example,

[PULL 4/5] tap: fix a memory leak

2020-11-23 Thread Jason Wang
From: yuanjungong Close fd before returning. Buglink: https://bugs.launchpad.net/qemu/+bug/1904486 Signed-off-by: yuanjungong Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- net/tap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tap.c b/net/tap.c index c46ff66..fe95fa7

[PULL 3/5] net: purge queued rx packets on queue deletion

2020-11-23 Thread Jason Wang
From: Yuri Benditovich https://bugzilla.redhat.com/show_bug.cgi?id=1829272 When deleting queue pair, purge pending RX packets if any. Example of problematic flow: 1. Bring up q35 VM with tap (vhost off) and virtio-net or e1000e 2. Run ping flood to the VM NIC ( 1 ms interval) 3. Hot unplug the NI

[PULL 5/5] net: Use correct default-path macro for downscript

2020-11-23 Thread Jason Wang
From: Keqian Zhu Fixes: 63c4db4c2e6d (net: relocate paths to helpers and scripts) Signed-off-by: Keqian Zhu Signed-off-by: Jason Wang --- net/tap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tap.c b/net/tap.c index fe95fa7..b751285 100644 --- a/net/tap.c +++ b/ne

[PULL 2/5] net: do not exit on "netdev_add help" monitor command

2020-11-23 Thread Jason Wang
From: Paolo Bonzini "netdev_add help" is causing QEMU to exit because the code that invokes show_netdevs is shared between CLI and HMP processing. Move the check to the callers so that exit(0) remains only in the CLI flow. "netdev_add help" is not fixed by this patch; that is left for later work

[PULL 1/5] hw/net/e1000e: advance desc_offset in case of null descriptor

2020-11-23 Thread Jason Wang
From: Prasad J Pandit While receiving packets via e1000e_write_packet_to_guest() routine, 'desc_offset' is advanced only when RX descriptor is processed. And RX descriptor is not processed if it has NULL buffer address. This may lead to an infinite loop condition. Increament 'desc_offset' to proc

[PULL 0/5] Net patches

2020-11-23 Thread Jason Wang
The following changes since commit 23895cbd82be95428e90168b12e925d0d3ca2f06: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20201123.0' into staging (2020-11-23 18:51:13 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-reques

[PATCH] hw/arm/smmuv3: Fix up L1STD_SPAN decoding

2020-11-23 Thread Kunkun Jiang
Accroding to the SMMUv3 spec, the SPAN field of Level1 Stream Table Descriptor is 5 bits([4:0]). Fixes: 9bde7f0674f(hw/arm/smmuv3: Implement translate callback) Signed-off-by: Kunkun Jiang --- hw/arm/smmuv3-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/smm

Re: [PATCH] xive: Add trace events

2020-11-23 Thread David Gibson
On Mon, Nov 23, 2020 at 05:37:17PM +0100, Cédric Le Goater wrote: > I have been keeping those logging messages in an ugly form for > while. Make them clean ! > > Beware not to activate all of them, this is really verbose. > > Signed-off-by: Cédric Le Goater Applied to ppc-for-6.0, thanks. > --

Re: [PULL 0/2] VFIO updates for QEMU 5.2-rc3

2020-11-23 Thread Peter Maydell
On Mon, 23 Nov 2020 at 17:59, Alex Williamson wrote: > > The following changes since commit 683685e72dccaf8cb9fe8ffa20f5c5aacea72118: > > Merge remote-tracking branch > 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2020-11-23 > 13:03:13 +) > > are available in the Git rep

Re: [PATCH V17 4/6] hw/mips: Add Loongson-3 boot parameter helpers

2020-11-23 Thread Philippe Mathieu-Daudé
On 11/6/20 5:21 AM, Huacai Chen wrote: > Preparing to add Loongson-3 machine support, add Loongson-3's LEFI (a > UEFI-like interface for BIOS-Kernel boot parameters) helpers first. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Huacai Chen > Co-developed-by: Jiaxun Yang > Signed-off-b

Re: [PATCH V17 2/6] hw/intc: Rework Loongson LIOINTC

2020-11-23 Thread Philippe Mathieu-Daudé
On 11/23/20 9:52 PM, Philippe Mathieu-Daudé wrote: > On 11/6/20 5:21 AM, Huacai Chen wrote: >> As suggested by Philippe Mathieu-Daudé, rework Loongson's liointc: >> 1, Move macro definitions to loongson_liointc.h; >> 2, Remove magic values and use macros instead; >> 3, Replace dead D() code by trac

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-23 Thread Yuri Benditovich
The patch below solves both issues: with netdev created by hmp and with netdev created from command-line: diff --git a/net/net.c b/net/net.c index bcd5da4aa0..98294f24ed 100644 --- a/net/net.c +++ b/net/net.c @@ -1155,6 +1155,11 @@ void qmp_netdev_del(const char *id, Error **errp) } qem

Re: [PATCH V17 5/6] hw/mips: Add Loongson-3 machine support

2020-11-23 Thread Philippe Mathieu-Daudé
Hi Huacai, On 11/6/20 5:21 AM, Huacai Chen wrote: > Add Loongson-3 based machine support, it use liointc as the interrupt > controler and use GPEX as the pci controller. Currently it can work with > both TCG and KVM. > > As the machine model is not based on any exiting physical hardware, the > na

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

2020-11-23 Thread Alex Williamson
On Mon, 23 Nov 2020 11:33:37 -0800 Neo Jia wrote: > On Mon, Nov 23, 2020 at 11:14:38AM +0800, Shenming Lu wrote: > > External email: Use caution opening links or attachments > > > > > > On 2020/11/21 6:01, Alex Williamson wrote: > > > On Fri, 20 Nov 2020 22:05:49 +0800 > > > Shenming Lu wrot

Re: [PATCH v2] net/e1000e_core: adjust count if RDH exceeds RDT in e1000e_ring_advance()

2020-11-23 Thread Mauro Matteo Cascella
On Thu, Nov 19, 2020 at 6:57 AM Jason Wang wrote: > > > On 2020/11/18 下午4:53, Mauro Matteo Cascella wrote: > > On Wed, Nov 18, 2020 at 4:56 AM Jason Wang wrote: > >> > >> On 2020/11/13 下午6:31, Mauro Matteo Cascella wrote: > >>> The e1000e_write_packet_to_guest() function iterates over a set of >

Re: [PATCH V17 2/6] hw/intc: Rework Loongson LIOINTC

2020-11-23 Thread Philippe Mathieu-Daudé
On 11/6/20 5:21 AM, Huacai Chen wrote: > As suggested by Philippe Mathieu-Daudé, rework Loongson's liointc: > 1, Move macro definitions to loongson_liointc.h; > 2, Remove magic values and use macros instead; > 3, Replace dead D() code by trace events. > > Suggested-by: Philippe Mathieu-Daudé > Si

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-23 Thread Peter Xu
On Fri, Nov 20, 2020 at 07:53:34PM +0300, Andrey Gruzdev wrote: > On 20.11.2020 19:43, Peter Xu wrote: > > On Fri, Nov 20, 2020 at 07:15:07PM +0300, Andrey Gruzdev wrote: > > > Yeah, I think we can re-use the postcopy queue code for faulting pages. > > > I'm > > > worring a little about some addit

Re: [PATCH v2 27/28] MAINTAINERS: Add entry for MIPS Ingenic Xburst TCG

2020-11-23 Thread Philippe Mathieu-Daudé
On Mon, Nov 23, 2020 at 9:47 PM Philippe Mathieu-Daudé wrote: > > Add an entry for the TCG core related to Ingenic Xburst. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Adding Craig Janeczek in case he wants to be notified of changes, > patch conditional to his approval. > --- > MAINTAINERS

[PATCH v2 24/28] target/mips: Extract Toshiba TXx9 translation routines

2020-11-23 Thread Philippe Mathieu-Daudé
Extract 300 lines of the Toshiba TX19/TX39/TX49/TX79 translation routines to 'vendor-tx_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-23-f4...@amsat.org> --- target/mips/translate.c | 302 +---

[PATCH v2 23/28] target/mips: Make pipeline 1 multiply opcodes generic

2020-11-23 Thread Philippe Mathieu-Daudé
Special2 multiply opcodes are not specific to Toshiba TX79, and are not part of its multimedia extension. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-22-f4...@amsat.org> --- target/mips/translate.c | 75 +--

[PATCH v2 21/28] target/mips: Extract Loongson EXTensions translation routines

2020-11-23 Thread Philippe Mathieu-Daudé
LoongEXTs are general-purpose extensions from the LoongISA. Extract 650 lines of translation routines to 'vendor-loong-ext_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 652 +- target/mips/vendor-loong-ext_translate.c.

[PATCH v2 27/28] MAINTAINERS: Add entry for MIPS Ingenic Xburst TCG

2020-11-23 Thread Philippe Mathieu-Daudé
Add an entry for the TCG core related to Ingenic Xburst. Signed-off-by: Philippe Mathieu-Daudé --- Adding Craig Janeczek in case he wants to be notified of changes, patch conditional to his approval. --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAIN

Re: [PATCH V17 6/6] docs/system: Update MIPS machine documentation

2020-11-23 Thread Philippe Mathieu-Daudé
On 11/6/20 5:21 AM, Huacai Chen wrote: > Update MIPS machine documentation to add Loongson-3 based machine description. > > Signed-off-by: Huacai Chen > --- > docs/system/target-mips.rst | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/docs/system/target-mips.rst b/docs/syst

[PATCH v2 19/28] target/mips: Extract Loongson SIMD helper definitions

2020-11-23 Thread Philippe Mathieu-Daudé
Extract the Loongson SIMD helper definitions to 'vendor-loong-simd_helper.h'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-18-f4...@amsat.org> --- target/mips/helper.h | 60 +-- target/mips/vendor-

[PATCH v2 18/28] target/mips: Rename lmmi_helper.c as loong-simd_helper.c

2020-11-23 Thread Philippe Mathieu-Daudé
The LoongMMI extension has been renamed LoongSIMD (part of the LoongISA). Rename the helper file accordingly. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-17-f4...@amsat.org> --- target/mips/{lmmi_helper.c => vendor-loong-simd_helper.c

[PATCH v2 28/28] MAINTAINERS: Add entry for MIPS Toshiba TCG

2020-11-23 Thread Philippe Mathieu-Daudé
Add an entry for the TCG core related to Toshiba TXx9. Signed-off-by: Philippe Mathieu-Daudé --- Adding Fredrik Noring in case he wants to be notified of changes, patch conditional to his approval. --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINER

[PATCH v2 26/28] MAINTAINERS: Add entry for MIPS Loongson TCG

2020-11-23 Thread Philippe Mathieu-Daudé
Add an entry for the TCG core related to Loongson. Signed-off-by: Philippe Mathieu-Daudé --- Adding Huacai and Jiaxun in case they want to be notified of changes, patch conditional to their individual approval. --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINER

[PATCH v2 25/28] target/mips: Extract Toshiba TX79 multimedia translation routines

2020-11-23 Thread Philippe Mathieu-Daudé
Extract 600 lines of the the Toshiba TX79 multimedia translation routines to 'vendor-tx-mmi_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 568 + target/mips/vendor-tx-mmi_translate.c.inc | 573 ++ 2

Re: [PATCH v8 0/5] hw/block/nvme: dulbe and dsm support

2020-11-23 Thread Klaus Jensen
On Nov 12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > This adds support for the Deallocated or Unwritten Logical Block error > recovery feature as well as the Dataset Management command. > > v8: > - Move req->opaque clearing to nvme_req_clear. > - Add two preparation/cleanup patches.

[PATCH v2 15/28] target/mips: Extract NEC Vr54xx helpers to vendor-vr54xx_helper.c

2020-11-23 Thread Philippe Mathieu-Daudé
Extract NEC Vr54xx helpers from op_helper.c to a new file: 'vendor-vr54xx_helper.c'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-14-f4...@amsat.org> --- target/mips/op_helper.c| 118 -- target/mips/

[PATCH v2 20/28] target/mips: Extract Loongson SIMD translation routines

2020-11-23 Thread Philippe Mathieu-Daudé
LoongSIMD (formerly LoongMMI in Loongson 2E/F) is the 128-bit SIMD extension from the LoongISA. Extract ~500 lines of translation routines to 'vendor-loong-simd_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-19-f4...@am

[PATCH v2 08/28] target/mips: Extract DSP helper definitions

2020-11-23 Thread Philippe Mathieu-Daudé
'MIPS DSP' is defined as a Module by MIPS. Extract the helper definitions to 'mod-dsp_helper.h.inc'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-7-f4...@amsat.org> --- target/mips/helper.h | 335 +--

[PATCH v2 16/28] target/mips: Extract NEC Vr54xx helper definitions

2020-11-23 Thread Philippe Mathieu-Daudé
Extract the NEC Vr54xx helper definitions to 'vendor-vr54xx_helper.h'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-15-f4...@amsat.org> --- target/mips/helper.h | 17 ++--- target/mips/vendor-vr54xx_helper

[PATCH v2 01/28] target/mips: Use FloatRoundMode enum for FCR31 modes conversion

2020-11-23 Thread Philippe Mathieu-Daudé
Use the FloatRoundMode enum type introduced in commit 3dede407cc6 ("softfloat: Name rounding mode enum") instead of 'unsigned int'. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/mips/internal.h | 3 ++- target/mips/fpu_helper.c | 2 +- 2 files changed, 3 ins

[PATCH v2 10/28] target/mips: Extract Multi-Threading helper definitions

2020-11-23 Thread Philippe Mathieu-Daudé
'MIPS MT' is defined as a Module by MIPS. Extract the helper definitions to 'mod-mt_helper.h.inc'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-9-f4...@amsat.org> --- target/mips/helper.h| 23 + target/m

[PATCH v2 07/28] target/mips: Rename dsp_helper.c as mod-dsp_helper.c

2020-11-23 Thread Philippe Mathieu-Daudé
'MIPS DSP' is defined as a Module by MIPS, rename it as mod-dsp_helper.c. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201120210844.2625602-6-f4...@amsat.org> --- target/mips/{dsp_helper.c => mod-dsp_helper.c} | 2 ++ target/mips/meson.build

[PATCH v2 17/28] target/mips: Extract NEC Vr54xx translation routines

2020-11-23 Thread Philippe Mathieu-Daudé
Extract the NEC Vr54xx translation routines to 'vendor-vr54xx_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-16-f4...@amsat.org> --- target/mips/translate.c | 86 + target/mips/vend

[PATCH v2 04/28] target/mips: Extract MSA helpers from op_helper.c

2020-11-23 Thread Philippe Mathieu-Daudé
We have ~400 lines of MSA helpers in the generic op_helper.c, move them with the other helpers in 'mod-msa_helper.c'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/mod-msa_helper.c | 392 ++ target/mips/op_helper.c | 393 --

[PATCH v2 03/28] target/mips: Rename msa_helper.c as mod-msa_helper.c

2020-11-23 Thread Philippe Mathieu-Daudé
MSA means 'MIPS SIMD Architecture' and is defined as a Module by MIPS. To keep the directory sorted, we use the 'mod' prefix for MIPS modules. Rename msa_helper.c as mod-msa_helper.c. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/{msa_helper.c => mod-msa_helper.c} | 0 target/mips/meson.

[PATCH v2 06/28] target/mips: Extract MSA translation routines

2020-11-23 Thread Philippe Mathieu-Daudé
Extract 2200 lines from the huge translate.c to a new file, 'mod-msa_translate.c.inc'. As there are too many inter-dependencies we don't compile it as another object, but keep including it in the big translate.o. We gain in code maintainability. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

[PATCH v2 02/28] target/mips: Extract FPU helpers to 'fpu_helper.h'

2020-11-23 Thread Philippe Mathieu-Daudé
Extract FPU specific helpers from "internal.h" to "fpu_helper.h". Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201120210844.2625602-2-f4...@amsat.org> --- target/mips/fpu_helper.h | 50 ++ target/mips/internal.h |

[PATCH v2 12/28] target/mips: Extract the microMIPS ISA helper definitions

2020-11-23 Thread Philippe Mathieu-Daudé
Extract the microMIPS ISA helper definitions to 'isa-micromips_helper.h.inc'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-11-f4...@amsat.org> --- target/mips/helper.h | 10 ++ target/mips/isa-micromips_helper

[PATCH v2 05/28] target/mips: Extract MSA helper definitions

2020-11-23 Thread Philippe Mathieu-Daudé
Keep all MSA-related code altogether. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201120210844.2625602-4-f4...@amsat.org> --- target/mips/helper.h | 436 +- target/mips/mod-msa_helper.h.inc | 443 +++

[PATCH 20/21] block: introduce bdrv_drop_filter()

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Using bdrv_replace_node() for removing filter is not good enough: it keeps child reference of the filter, which may conflict with original top node during permission update. Instead let's create new interface, which will do all graph modifications first and then update permissions. Let's modify b

[PATCH v2 11/28] target/mips: Extract Code Compaction ASE translation routines

2020-11-23 Thread Philippe Mathieu-Daudé
Extract 1200 lines from the huge translate.c to a new file, 'ase-mips16e_translate.c.inc'. As there are too many inter- dependencies we don't compile it as another object, but keep including it in the big translate.o. We gain in code maintainability. Signed-off-by: Philippe Mathieu-Daudé Reviewed

[PATCH v2 00/28] target/mips: Explode 60% of the 32K-lines translate.c

2020-11-23 Thread Philippe Mathieu-Daudé
Since v1: - Addressed Richard review comments Patches missing review: 1,3,4,21,22,25 Hi, This series, while boring, helps maintainability. I simply exploded 60% of the huge target/mips/translate.c, reducing it from 32K lines of code to 13500. The small overhead in the diffstat is due to entrie

[PATCH 15/21] block: split out bdrv_replace_node_noperm()

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Split part of bdrv_replace_node_common() to be used separately. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 47 ++- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/block.c b/block.c index 5f6ad1d016..1327254b8e 100644 ---

[PATCH 13/21] block: fix bdrv_replace_node_common

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
inore_children thing doesn't help to track all propagated permissions of children we want to ignore. The simplest way to correctly update permissions is update graph first and then do permission update. In this case we just referesh permissions for the whole subgraph (in topological-sort defined or

[PATCH 21/21] block/backup-top: drop .active

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
We don't need this workaround anymore: bdrv_append is already smart enough and we can use new bdrv_drop_filter(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup-top.c | 38 +- tests/qemu-iotests/283.out | 2 +- 2 files changed, 2 inserti

[PATCH 19/21] block: add bdrv_remove_backing transaction action

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 42 -- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index cf7b859a81..6ea926e2c1 100644 --- a/block.c +++ b/block.c @@ -2974,12 +2974,19 @@ BdrvChild *bdrv_attach_

[PATCH 05/21] block: refactor bdrv_child* permission functions

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Split out non-recursive parts, and refactor as block graph transaction action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 79 ++--- 1 file changed, 59 insertions(+), 20 deletions(-) diff --git a/block.c b/block.c index 0d0f065db

[PATCH 18/21] block: adapt bdrv_append() for inserting filters

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
bdrv_append is not very good for inserting filters: it does extra permission update as part of bdrv_set_backing_hd(). During this update filter may conflict with other parents of top_bs. Instead, let's first do all graph modifications and after it update permissions. Note: bdrv_append() is still

[PATCH 16/21] block: bdrv_append(): don't consume reference

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
We have too much comments for this feature. It seems better just don't do it. Most of real users (tests don't count) have to create additional reference. Drop also comment in external_snapshot_prepare: - bdrv_append doesn't "remove" old bs in common sense, it sounds strange - the fact that bd

[PATCH 17/21] block: bdrv_append(): return status

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Return int status to avoid extra error propagation schemes. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 4 ++-- block.c | 15 --- block/commit.c | 6 ++ block/mirror.c | 6 ++ blockdev.c

[PATCH 1/2] block: make bdrv_drop_intermediate() less wrong

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
First, permission update loop tries to do iterations transactionally, but the whole update is not transactional: nobody roll-back successful loop iterations when some iteration fails. Second, in the iteration we have nested permission update: c->klass->update_filename may point to bdrv_child_cb_up

[PATCH 12/21] block: return value from bdrv_replace_node()

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Functions with errp argument are not recommened to be void-functions. Improve bdrv_replace_node(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 4 ++-- block.c | 14 -- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/b

[PATCH 08/21] block: use topological sort for permission update

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Rewrite bdrv_check_perm(), bdrv_abort_perm_update() and bdrv_set_perm() to update nodes in topological sort order instead of simple DFS. With topologically sorted nodes, we update a node only when all its parents already updated. With DFS it's not so. Consider the following example: A -+

[PATCH 14/21] block: add bdrv_attach_child_noperm() transaction action

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
The code partly duplicates bdrv_root_attach_child() and bdrv_attach_child(). Still refactoring these two functions by renaming them to *_common with new noperm argument is more complicating. When all operations moved to new graph update paradigm (update permissions only on updated graph) all duplic

[PATCH 07/21] block: inline bdrv_child_*() permission functions calls

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Each of them has only one caller. Open-coding simplifies further pemission-update system changes. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 59 + 1 file changed, 17 insertions(+), 42 deletions(-) diff --git a/block.c b/bloc

[PATCH RFC 00/21] block: update graph permissions update

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is a proposal of updating graph changing procedures. The thing brought me here is a question about "activating" filters after insertion, which is done in mirror_top and backup_top. The problem is that we can't simply avoid permission conflict when inserting the filter: during inserti

[PATCH 10/21] block: add bdrv_list_* permission update functions

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Add new interface, allowing use of existing node list. It will be used to fix bdrv_replace_node() in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 112 ++-- 1 file changed, 76 insertions(+), 36 deletions(-) di

[PATCH 03/21] util: add transactions.c

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Add simple transaction API to use in further update of block graph operations. Supposed usage is: - "prepare" is main function of the action and it should make the main effect of the action to be visible for the following actions, keeping possibility of roll-back, saving necessary things in a

[PATCH 09/21] block: add bdrv_drv_set_perm transaction action

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Refactor calling driver callbacks to a separate transaction action to be used later. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 71 - 1 file changed, 55 insertions(+), 16 deletions(-) diff --git a/block.c b/block.c index 562

[PATCH 11/21] block: add bdrv_replace_child_safe() transaction action

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 54 ++ 1 file changed, 54 insertions(+) diff --git a/block.c b/block.c index d799afeedd..1b10b6fb5e 100644 --- a/block.c +++ b/block.c @@ -82,6 +82,9

[PATCH 02/21] tests/test-bdrv-graph-mod: add test_parallel_perm_update

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Add test to show that simple DFS recursion order is not correct for permission update. Correct order is topological-sort order, which will be introduced later. Consider the block driver which has two filter children: one active with exclusive write access and one inactive with no specific permissi

[PATCH 04/21] block: bdrv_refresh_perms: check parents compliance

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Add additional check that node parents do not interfere with each other. This should not hurt existing callers and allows in further patch use bdrv_refresh_perms() to update a subtree of changed BdrvChild (check that change is correct). New check will substitute bdrv_check_update_perm() in followi

[PATCH 06/21] block: rewrite bdrv_child_try_set_perm() using bdrv_refresh_perms()

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
We are going to drop recursive bdrv_child_* functions, so stop use them in bdrv_child_try_set_perm() as a first step. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index e12acd5029..a9e

[PATCH v3 16/19] qom: Make PropertyInfo.set_default_value optional

2020-11-23 Thread Eduardo Habkost
If .set_default_value is not set, call object_property_set_default(). This will let us delete most of the .set_default_value functions later. Signed-off-by: Eduardo Habkost --- This is a new patch in v3 of this series. In v2 of the series, equivalent functionality was implemented by "qom: Use q

[PATCH v3 15/19] qom: Make object_property_set_default() public

2020-11-23 Thread Eduardo Habkost
The function will be used outside qom/object.c, to simplify the field property code that sets the property default value. Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo Habkost --- include/qom/object.h | 11 +++ qom/object.c | 2 +- 2 files changed, 12 insertions(+), 1 d

[PATCH 01/21] tests/test-bdrv-graph-mod: add test_parallel_exclusive_write

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
Add the test that shows that concept of ignore_children is incomplete. Actually, when we want to update something, ignoring permission of some existing BdrvChild, we should ignore also the propagated effect of this child to the other children. But that's not done. Better approach (update permission

[PATCH 2/2] block: assert that permission commit sets same permissions

2020-11-23 Thread Vladimir Sementsov-Ogievskiy
On permission update commit we must set same permissions as on _check_. Let's add assertions. Next step may be to drop permission parameters from _set_. Note that prior to previous commit, fixing bdrv_drop_intermediate(), new assertion in bdrv_child_set_perm() crashes on iotests 30 and 40. Signed

[PATCH v3 13/19] qom: Fix documentation of UUID property type

2020-11-23 Thread Eduardo Habkost
On some cases, the documentation for UUID properties is lying: properties defined using DEFINE_PROP_UUID_NODEFAULT are not set to "auto" by default. It's better to omit this instead of providing incorrect information. Signed-off-by: Eduardo Habkost --- This is a new patch addeed in v3 of this se

[PATCH v3 11/19] qom: field_prop_set_default_value() helper

2020-11-23 Thread Eduardo Habkost
Move code that sets the property default value to a separate function, to reduce duplication and make refactoring easier. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. Hopefully, this will make the series easier to review. The field_prop_set_default_value() w

[PATCH v3 17/19] qom: Delete field_prop_set_default_value_*int()

2020-11-23 Thread Eduardo Habkost
The field_prop_set_default_value_*int() functions can be completely replaced by object_propert_set_default(), we don't need them anymore. Signed-off-by: Eduardo Habkost --- This is a new patch in v3 of this series. In v2 of the series, equivalent changes were part of "qom: Use qlit to represent

[PATCH v3 14/19] qom: Don't ignore defval on UUID property

2020-11-23 Thread Eduardo Habkost
UUID properties were weird because the value of .defval was completely ignored. Fix this by setting the default value to QLIT_QSTR("auto") on the default case, and actually using .defval inside .set_default_value. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series.

[PATCH v3 03/19] qnum: QNumValue type for QNum value literals

2020-11-23 Thread Eduardo Habkost
Provide a separate QNumValue type that can be used for QNum value literals without the referencing counting and memory allocation features provided by QObject. Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Fixed copy-pasta at qnum_from_value() documentation * Removed qnum_get_value() fun

simple aarch64 binary can cause linux-user QEMU to segv in zero_bss()

2020-11-23 Thread Peter Maydell
Somebody reported this on stackoverflow. Before I spend too much time thinking about how this ought to work, does anybody have the elfload.c intended operation in their head still? Bug description and analysis of what goes wrong below: https://stackoverflow.com/questions/64956322/alignment-require

[PATCH v3 04/19] qnum: qnum_value_is_equal() function

2020-11-23 Thread Eduardo Habkost
Extract the QNum value comparison logic to a function that takes QNumValue* as argument. Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Rename function parameters to val_x/val_y * Insert blank line after variable declarations at qnum_is_equal() --- include/qapi/qmp/qnum.h | 1 + qobje

[PATCH v3 19/19] qom: Delete set_default_value_bool()

2020-11-23 Thread Eduardo Habkost
set_default_value_bool() can be completely replaced by object_property_set_default(), we don't need that function anymore. Signed-off-by: Eduardo Habkost --- This is a new patch in v3 of this series. In v2 of the series, equivalent changes were part of "qom: Use qlit to represent property defaul

[PATCH v3 12/19] qom: Replace defval value in Property with QLitObject

2020-11-23 Thread Eduardo Habkost
QLitObject is capable of representing a wider range of values, and it will allow us to simplify a lot of the existing code setting property defaults, later. Replace the bool and union fields with QLitObject. In short, this is just a direct translation from: prop->set_default to prop->defval.t

[PATCH v3 09/19] qlit: Add more test literals to qlit_equal_qobject() test case

2020-11-23 Thread Eduardo Habkost
Add a few examples of each qlit type, to make sure each one compare as equal to itself, but not equal to the other values. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. --- tests/check-qlit.c | 16 1 file changed, 16 insertions(+) diff --git

[PATCH v3 02/19] qnum: Make num_x/num_y variables at qnum_is_equal() const

2020-11-23 Thread Eduardo Habkost
qobject_to() drops const-ness by accident, but our function arguments (x, y) are const. Make num_x/num_y const too. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of the series. --- qobject/qnum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qobjec

[PATCH v3 18/19] qom: Delete set_default_uuid()

2020-11-23 Thread Eduardo Habkost
The function can be completely replaced by object_property_set_default(), we don't need it anymore. Signed-off-by: Eduardo Habkost --- This is a new patch in v3 of this series. In v2 of the series, equivalent changes were part of "qom: Use qlit to represent property defaults". --- hw/core/qdev-

[PATCH v3 06/19] qlit: Rename QLIT_QNUM to QLIT_QNUM_INT

2020-11-23 Thread Eduardo Habkost
Rename the existing QLIT_QNUM macro to indicate it only supports signed int values. We're going to add support to other types of QNums later. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. In v2, the existing QLIT_QNUM() macro was being kept, now it is replac

[PATCH v3 08/19] qlit: Move qlit_equal_qobject() reference values to array

2020-11-23 Thread Eduardo Habkost
Add an array of values to qlit_equal_qobject_test(), so we can extend the test case to compare multiple literals, not just the ones at the existing `qlit` and `qlit_foo` variables. Signed-off-by: Eduardo Habkost --- This is a new patch added in v3 of this series. --- tests/check-qlit.c | 26

[PATCH v3 10/19] qlit: Support all types of QNums

2020-11-23 Thread Eduardo Habkost
Add two new macros to support other types of QNums: QLIT_QNUM_UINT, and QLIT_QNUM_DOUBLE, and include them in the qlit_equal_qobject_test() test case. Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * QLIT_QNUM macro doesn't exist anymore * Addition of the QNumValue field to QLitObject is

[PATCH v3 01/19] qnum: Make qnum_get_double() get const pointer

2020-11-23 Thread Eduardo Habkost
qnum_get_double() won't change the object, the argument can be const. Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo Habkost --- include/qapi/qmp/qnum.h | 2 +- qobject/qnum.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qapi/qmp/qnum.h b/includ

  1   2   3   4   >