Re: [PATCH] vfio/migration: Improve to read/write full migration region per chunk

2021-11-22 Thread Yishai Hadas
Gentle ping for review, CCing more people who may be involved. Thanks, Yishai On 11/11/2021 11:50 AM, Yishai Hadas wrote: Upon reading/writing the migration data there is no real reason to limit the read/write system call from the file to be 8 bytes. In addition, there is no reason to depend o

Re: [PATCH v2 0/4] linux-user: Fix getdents alignment issues (#704)

2021-11-22 Thread Laurent Vivier
Le 14/11/2021 à 11:35, Richard Henderson a écrit : There are a number of alignement issues flagged up by clang, this attempts to fix only one of them: getdents. Changes for v2: * Do not QEMU_BUILD_BUG_ON for size mismatch, as this triggers for i386 host. r~ Richard Henderson (4): l

Re: [PATCH] linux-user: fix Coverity CID 1464101

2021-11-22 Thread Laurent Vivier
Le 21/11/2021 à 16:17, Laurent Vivier a écrit : target_mmap() can fail and return -1, but we don't check for that and instead assume it's always valid. Fixes: db2af69d6ba8 ("linux-user: Add infrastructure for a signal trampoline page") Cc: richard.hender...@linaro.org Reported-by: Peter Maydell

Re: [PATCH v3 3/3] cpus-common: implement dirty limit on vCPU

2021-11-22 Thread Hyman Huang
在 2021/11/22 15:35, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirtyrate given by user. introduce qmp commands set-dirty-limit/cancel-dirty-limit

[PULL 5/5] linux-user: fix Coverity CID 1464101

2021-11-22 Thread Laurent Vivier
target_mmap() can fail and return -1, but we don't check for that and instead assume it's always valid. Fixes: db2af69d6ba8 ("linux-user: Add infrastructure for a signal trampoline page") Cc: richard.hender...@linaro.org Reported-by: Peter Maydell Signed-off-by: Laurent Vivier Reviewed-by: Rich

[PULL 2/5] linux-user: Always use flexible arrays for dirent d_name

2021-11-22 Thread Laurent Vivier
From: Richard Henderson We currently use a flexible array member for target_dirent, but use incorrectly fixed length arrays for target_dirent64, linux_dirent and linux_dirent64. This requires that we adjust the definition of the VFAT READDIR ioctls which hard-code the 256 namelen size into the i

[PULL 1/5] linux-user: Split out do_getdents, do_getdents64

2021-11-22 Thread Laurent Vivier
From: Richard Henderson Retain all 3 implementations of getdents for now. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <2024103539.298686-2-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 325 +

[PULL 0/5] Linux user for 6.2 patches

2021-11-22 Thread Laurent Vivier
ll-request for you to fetch changes up to 802ae45e94151a6d3ee20eadcb865cf6c875df34: linux-user: fix Coverity CID 1464101 (2021-11-22 09:17:08 +0100) linux-user pull request 20211122 Fixes for CID 1464101 and

Re: [PATCH v11 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-22 Thread gaosong
Hi Richard, Sorry for the late reply. On 2021/11/20 下午4:56, Richard Henderson wrote: On 11/20/21 9:52 AM, gaosong wrote: You're right, gen_set_gpr not need EXT_NONE at all, and we need not condition around gen_set_gpr. I think that if we know the dst_ext is EXT_NONE, we do't need gen_set_gpr.

[PULL 4/5] linux-user: Rewrite do_getdents, do_getdents64

2021-11-22 Thread Laurent Vivier
From: Richard Henderson Always allocate host storage; this ensures that the struct is sufficiently aligned for the host. Merge the three host implementations of getdents via a few ifdefs. Utilize the same method for do_getdents64. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/704 Sig

[PULL 3/5] linux-user: Fix member types of target_dirent64

2021-11-22 Thread Laurent Vivier
From: Richard Henderson The host uint64_t (etc) does not have the correct alignment constraint as the guest: use abi_* types. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <2024103539.298686-4-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier -

Re: [PATCH v11 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-22 Thread Richard Henderson
On 11/22/21 9:23 AM, gaosong wrote: On 2021/11/20 下午4:56, Richard Henderson wrote: On 11/20/21 9:52 AM, gaosong wrote: You're right, gen_set_gpr not need EXT_NONE at all, and we need not condition around gen_set_gpr. I think that if we know the dst_ext is EXT_NONE, we do't need gen_set_gpr.

Re: [PATCH v2 1/2] docs: Drop deprecated 'props' from object-add

2021-11-22 Thread Markus Armbruster
"Rao, Lei" writes: > From: "Rao, Lei" > > In commit 5024340745 "qapi/qom: Drop deprecated 'props' from > object-add" (v6.0.0), we also should update documents. > > Signed-off-by: Lei Rao Reviewed-by: Markus Armbruster

Re: [PATCH v2 2/2] docs: Use double quotes instead of single quotes for COLO

2021-11-22 Thread Markus Armbruster
"Rao, Lei" writes: > From: "Rao, Lei" > > Signed-off-by: Lei Rao Reviewed-by: Markus Armbruster

Re: [PATCH v3 3/3] cpus-common: implement dirty limit on vCPU

2021-11-22 Thread Markus Armbruster
Hyman Huang writes: > =E5=9C=A8 2021/11/22 15:35, Markus Armbruster =E5=86=99=E9=81=93: >> huang...@chinatelecom.cn writes: >> >>> From: Hyman Huang(=E9=BB=84=E5=8B=87) >>> >>> implement dirtyrate calculation periodically basing on >>> dirty-ring and throttle vCPU until it reachs the quota >>>

Re: [RFC v2 PATCH 07/13] KVM: Handle page fault for fd based memslot

2021-11-22 Thread Chao Peng
On Sat, Nov 20, 2021 at 09:55:29AM +0800, Yao Yuan wrote: > On Fri, Nov 19, 2021 at 09:47:33PM +0800, Chao Peng wrote: > > Current code assume the private memory is persistent and KVM can check > > with backing store to see if private memory exists at the same address > > by calling get_pfn(alloc=f

Re: [PATCH v3 3/3] cpus-common: implement dirty limit on vCPU

2021-11-22 Thread Hyman Huang
在 2021/11/22 17:10, Markus Armbruster 写道: Hyman Huang writes: =E5=9C=A8 2021/11/22 15:35, Markus Armbruster =E5=86=99=E9=81=93: huang...@chinatelecom.cn writes: From: Hyman Huang(=E9=BB=84=E5=8B=87) implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU unt

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-22 Thread David Hildenbrand
On 19.11.21 17:00, Jason Gunthorpe wrote: > On Fri, Nov 19, 2021 at 04:39:15PM +0100, David Hildenbrand wrote: > >>> If qmeu can put all the guest memory in a memfd and not map it, then >>> I'd also like to see that the IOMMU can use this interface too so we >>> can have VFIO working in this confi

Re: [PATCH 03/11] multifd: Fill offset and block for reception

2021-11-22 Thread Juan Quintela
Richard Henderson wrote: > On 11/19/21 5:58 PM, Juan Quintela wrote: >> We were using the iov directly, but we will need this info on the >> following patch. >> Signed-off-by: Juan Quintela >> --- >> migration/multifd.c | 2 ++ >> 1 file changed, 2 insertions(+) >> diff --git a/migration/multi

Re: [PATCH 06/11] migration: Move iov from pages to params

2021-11-22 Thread Juan Quintela
Richard Henderson wrote: > On 11/19/21 5:58 PM, Juan Quintela wrote: >> static int nocomp_send_prepare(MultiFDSendParams *p, uint32_t used, >> Error **errp) >> { >> +MultiFDPages_t *pages = p->pages; >> + >> +for (int i = 0; i < used; i++) { >> +

Re: [PULL 0/2] riscv-to-apply queue

2021-11-22 Thread Richard Henderson
repository at: g...@github.com:alistair23/qemu.git tags/pull-riscv-to-apply-20211122 for you to fetch changes up to 526e7443027c71fe7b04c29df529e1f9f425f9e3: hw/misc/sifive_u_otp: Do not reset OTP content on hardware reset (2021-11-22 10:4

Re: [PATCH 35/35] test/tcg/ppc64le: Add float reference files

2021-11-22 Thread Richard Henderson
On 11/21/21 6:47 PM, Cédric Le Goater wrote: I am getting an error with this test. See below. ...  ### Rounding to nearest  from single: f32(-nan:0xffa0) -  to double: f64(-nan:0x00fff4) (INVALID) +  to double: f64(-nan:0x00fff4) (OK) Well that's disconcerting.

Re: [PATCH 1/2] docs: Fix botched rST conversion of 'submitting-a-patch.rst'

2021-11-22 Thread Thomas Huth
On 19/11/2021 20.31, Kashyap Chamarthy wrote: I completely botched up the merged[0] rST conversion of this document by accidentally dropping entire hunks (!) of text. :-( I made it very hard for reviewers to spot it, as the omitted text was buried deep in the document. To fix my hatchet job, I

Re: [PATCH 35/35] test/tcg/ppc64le: Add float reference files

2021-11-22 Thread Cédric Le Goater
On 11/22/21 10:43, Richard Henderson wrote: On 11/21/21 6:47 PM, Cédric Le Goater wrote: I am getting an error with this test. See below. ...   ### Rounding to nearest   from single: f32(-nan:0xffa0) -  to double: f64(-nan:0x00fff4) (INVALID) +  to double: f64(-nan:0x00fff4

Re: [PATCH 1/2] docs: Fix botched rST conversion of 'submitting-a-patch.rst'

2021-11-22 Thread Kashyap Chamarthy
On Mon, Nov 22, 2021 at 10:51:15AM +0100, Thomas Huth wrote: > On 19/11/2021 20.31, Kashyap Chamarthy wrote: > > I completely botched up the merged[0] rST conversion of this document by > > accidentally dropping entire hunks (!) of text. :-( I made it very hard > > for reviewers to spot it, as the

Re: [PATCH 1/2] docs: Fix botched rST conversion of 'submitting-a-patch.rst'

2021-11-22 Thread Thomas Huth
On 22/11/2021 11.20, Kashyap Chamarthy wrote: On Mon, Nov 22, 2021 at 10:51:15AM +0100, Thomas Huth wrote: On 19/11/2021 20.31, Kashyap Chamarthy wrote: I completely botched up the merged[0] rST conversion of this document by accidentally dropping entire hunks (!) of text. :-( I made it very h

[PATCH v7 04/31] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Acked-by: Richard Henderson --- tcg/loongarch64/tcg-insn-defs.c.inc | 979 1 file changed, 979 insertions(+) create mode 100644 tcg/loongarch64/tcg-insn-defs.c.inc diff --git a/tcg/loongarch64/tcg-insn-defs.c.inc b/tcg/loongarch64/tcg-in

[PATCH v7 00/31] LoongArch64 port of QEMU TCG

2021-11-22 Thread WANG Xuerui
Hi all, This is a port of QEMU TCG to the brand-new CPU architecture LoongArch, introduced by Loongson with their 3A5000 chips. Tests (run with `ninja test`) all passed, as usual; I also boot-tested x86_64 (Debian and Gentoo installation CDs) and install-tested aarch64 (Debian netboot installer),

[PATCH v7 03/31] tcg/loongarch64: Add the tcg-target.h file

2021-11-22 Thread WANG Xuerui
Support for all optional TCG ops are initially marked disabled; the bits are to be set in individual commits later. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.h | 180 +++ 1 file c

[PATCH v7 02/31] MAINTAINERS: Add tcg/loongarch64 entry with myself as maintainer

2021-11-22 Thread WANG Xuerui
I ported the initial code, so I should maintain it of course. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d3879aa3c1..a638fb6b31 100644 ---

[PATCH v7 01/31] elf: Add machine type value for LoongArch

2021-11-22 Thread WANG Xuerui
This is already officially allocated as recorded in GNU binutils repo [1], and the description is updated in [2]. Add to enable further work. [1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4cf2ad720078a9f490dd5b5bc8893a926479196e [2]: https://sourceware.org/git/?p=binutils-gdb.gi

[PATCH v7 07/31] tcg/loongarch64: Implement necessary relocation operations

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 66 1 file changed, 66 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 64e57bd055..fbacaef862 100644 --- a/tcg/l

[PATCH v7 09/31] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.c.inc | 137 +++ 1 file changed, 137 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index f12

[PATCH v7 05/31] tcg/loongarch64: Add register names, allocation order and input/output sets

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 118 +++ 1 file changed, 118 insertions(+) create mode 100644 tcg/loongarch64/tcg-target.c.inc diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target

[PATCH v7 06/31] tcg/loongarch64: Define the operand constraints

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-str.h | 28 +++ tcg/loongarch64/tcg-target.c.inc | 52 2 files changed, 80 insertions(+) create mode 100644 tcg/loongarc

[PATCH v7 16/31] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 91 tcg/loongarch64/tcg-target.h | 4 +- 3 files changed, 94 insertions(+),

[PATCH v7 17/31] tcg/loongarch64: Implement add/sub ops

2021-11-22 Thread WANG Xuerui
The neg_i{32,64} ops is fully expressible with sub, so omitted for simplicity. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 2 ++ tcg/loongarch64/tcg-target.c.inc | 38

[PATCH v7 11/31] tcg/loongarch64: Implement sign-/zero-extension ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 82 tcg/loongarch64/tcg-target.h | 24 3 files changed, 95 insertio

[PATCH v7 08/31] tcg/loongarch64: Implement the memory barrier op

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.c.inc | 32 1 file changed, 32 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index fbac

[PATCH v7 18/31] tcg/loongarch64: Implement mul/mulsh/muluh/div/divu/rem/remu ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 65 tcg/loongarch64/tcg-target.h | 16 +++ 3 files changed, 74 insertion

[PATCH v7 14/31] tcg/loongarch64: Implement bswap{16,32,64} ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target.c.inc | 32 tcg/loongarch64/tcg-target.h | 10 +- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/tcg/loongar

[PATCH v7 12/31] tcg/loongarch64: Implement not/and/or/xor/nor/andc/orc ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 88 tcg/loongarch64/tcg-target.h | 16 ++--- 3 files changed, 98 insertions(

[PATCH v7 10/31] tcg/loongarch64: Implement goto_ptr

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 17 + tcg/loongarch64/tcg-target.c.inc | 15 +++ 2 files changed, 32 insertions(+) create mode 100644 tcg/loongarch64/tcg-tar

[PATCH v7 30/31] configure, meson.build: Mark support for loongarch64 hosts

2021-11-22 Thread WANG Xuerui
Example output of `uname -a` on an initial Gentoo LA64 port, running the upstream submission version of Linux (with some very minor patches not influencing output here): > Linux 5.14.0-10342-g37a00851b145 #5 SMP PREEMPT Tue Aug 10 > 12:56:24 PM CST 2021 loongarch64 GNU/Linux And the same on the

[PATCH v7 23/31] tcg/loongarch64: Add softmmu load/store helpers, implement qemu_ld/qemu_st ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 353 +++ 2 files changed, 355 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h b/tcg/loongarch64/tcg-target-

[PATCH v7 15/31] tcg/loongarch64: Implement clz/ctz ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 42 tcg/loongarch64/tcg-target.h | 8 +++--- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/tcg

[PATCH v7 21/31] tcg/loongarch64: Implement tcg_out_call

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 34 1 file changed, 34 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 682bf76ceb..e470d7e145 100644 --- a/tcg/l

[PATCH v7 26/31] tcg/loongarch64: Implement tcg_target_init

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 2d066a035d..ff167d686b 100644 --- a/tcg/loonga

[PATCH v7 13/31] tcg/loongarch64: Implement deposit/extract ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 21 + tcg/loongarch64/tcg-target.h | 8 3 files changed, 26 insertions(+),

Re: [PATCH for-6.2] Fix some typos in documentation (found by codespell)

2021-11-22 Thread Thomas Huth
On 19/11/2021 11.15, Stefan Weil wrote: Am 18.11.21 um 00:27 schrieb Philippe Mathieu-Daudé: On 11/17/21 22:07, Stefan Weil wrote: Signed-off-by: Stefan Weil ---   docs/devel/multi-process.rst    | 2 +-   docs/devel/qgraph.rst   | 2 +-   docs/devel/writing-monitor-comm

[PATCH v7 22/31] tcg/loongarch64: Implement simple load/store ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 131 +++ 2 files changed, 132 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con

[PATCH v7 20/31] tcg/loongarch64: Implement setcond ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 69 2 files changed, 70 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h b/tcg/loongarch64/tcg-target-co

[PATCH v7 27/31] tcg/loongarch64: Register the JIT

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 44 1 file changed, 44 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index ff167d686b..8ce30ecae5 100644 --- a/tcg/l

[PATCH v7 19/31] tcg/loongarch64: Implement br/brcond ops

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 53 2 files changed, 54 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-s

[PATCH v7 31/31] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab

2021-11-22 Thread WANG Xuerui
Normally this would be based on qemu/debian10 or qemu/ubuntu2004, but after a week-long struggle, I still cannot build stage2 gcc with the known-good LoongArch toolchain sources, so I chose the least-resistance path with Gentoo as base image. As this image is not expected to be re-built by CI, like

[PATCH] hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition

2021-11-22 Thread Philippe Mathieu-Daudé
While both MII_ANAR_TX / MII_ANLPAR_TX have the same value, the ANAR and ANLPAR registers are different, so technically the ANLPAR register have to use the MII_ANLPAR_TX definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/allwinner_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH v7 24/31] tcg/loongarch64: Implement tcg_target_qemu_prologue

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 68 1 file changed, 68 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index c92587c823..a806e3352e 100644 --- a/tcg/l

[PATCH v7 29/31] accel/tcg/user-exec: Implement CPU-specific signal handler for loongarch64 hosts

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/host/loongarch64/host-signal.h | 82 +++ 1 file changed, 82 insertions(+) create mode 100644 linux-user/host/loongarch64/host-signal.h diff --git a/linux-user/host/

Re: [PATCH-for-6.2? 0/2] hw/intc/arm_gicv3: Introduce CONFIG_ARM_GIC_TCG Kconfig selector

2021-11-22 Thread Peter Maydell
On Mon, 15 Nov 2021 at 22:36, Philippe Mathieu-Daudé wrote: > > The GICv3 ITS support has been introduced uring the 6.2 development > window (commits 18f6290a6a9..17fb5e36aab). This device is for > emulation. When building virtualization-only binary, it might be > desirable to not include this dev

[PATCH v7 28/31] linux-user: Add safe syscall handling for loongarch64 hosts

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- linux-user/host/loongarch64/hostdep.h | 34 .../host/loongarch64/safe-syscall.inc.S | 80 +++ 2 files changed, 114 insertions(+) create mode 100644 linux-user/host/loongarch64/hostdep.h create

[PATCH v7 25/31] tcg/loongarch64: Implement exit_tb/goto_tb

2021-11-22 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index a806e3352e..2d066a035d 100644 --- a/tcg/loongarch64/tc

Re: [PATCH v2 1/2] docs: Drop deprecated 'props' from object-add

2021-11-22 Thread Thomas Huth
On 22/11/2021 08.49, Rao, Lei wrote: From: "Rao, Lei" In commit 5024340745 "qapi/qom: Drop deprecated 'props' from object-add" (v6.0.0), we also should update documents. Signed-off-by: Lei Rao --- docs/COLO-FT.txt| 16 docs/system/authz.rst | 26 ++---

[PATCH v2 0/5] Check PMP rules num before propagation

2021-11-22 Thread LIU Zhiwei
In this patch set, fix pmp propagation to tlb and replace pmp_is_range_in_tlb with a more straightforward function pmp_adjust_tlb_size. v2: move pmp rules num check to pmp_is_range_in_tlb define pmp_adjust_tlb_size to replace pmp_is_range_in_tlb LIU Zhiwei (5): target/riscv: Check PMP rule

[PATCH] hw/misc/auxbus: Improve aux_bus_init() docstring

2021-11-22 Thread Philippe Mathieu-Daudé
Mention in aux_bus_init() docstring that the AUXBus is not simply initialized, it is also allocated. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/auxbus.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/hw/misc/auxbus.h b/include/hw/misc/auxb

[PATCH] hw/scsi: Fix scsi_bus_init_named() docstring

2021-11-22 Thread Philippe Mathieu-Daudé
Commit 739e95f5741 ("scsi: Replace scsi_bus_new() with scsi_bus_init(), scsi_bus_init_named()") forgot to rename scsi_bus_init() in the function documentation string. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/scsi/scsi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [PATCH] hw/scsi: Fix scsi_bus_init_named() docstring

2021-11-22 Thread Peter Maydell
On Mon, 22 Nov 2021 at 10:47, Philippe Mathieu-Daudé wrote: > > Commit 739e95f5741 ("scsi: Replace scsi_bus_new() with > scsi_bus_init(), scsi_bus_init_named()") forgot to rename > scsi_bus_init() in the function documentation string. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/

[PATCH v2 4/5] target/riscv: Rename pmp_is_range_in_tlb

2021-11-22 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/cpu_helper.c | 2 +- target/riscv/pmp.c| 2 +- target/riscv/pmp.h| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 3f53744897..cf8109197d 100644 --- a/target

Re: [PATCH] ui/vnc-clipboard: fix adding notifier twice

2021-11-22 Thread Vladimir Sementsov-Ogievskiy
21.11.2021 22:12, Nikta Lapshin wrote: On 11/10/21 13:38, Vladimir Sementsov-Ogievskiy wrote: vnc_server_cut_text_caps() is not guaranteed to be called only once. If it called twice, we finally call notifier_list_add() twice with same element. Which leads to loopback QLIST. So, on next notifie

Re: [PULL 0/5] Linux user for 6.2 patches

2021-11-22 Thread Richard Henderson
com/vivier/qemu.git tags/linux-user-for-6.2-pull-request for you to fetch changes up to 802ae45e94151a6d3ee20eadcb865cf6c875df34: linux-user: fix Coverity CID 1464101 (2021-11-22 09:17:08 +0100) linux-user pull request 20211122

[PATCH v2 1/5] target/riscv: Check PMP rules num before propagation

2021-11-22 Thread LIU Zhiwei
When an address is in [0-4K) and no pmp rule configured, the tlb_size will be set to 1. This is caused by pmp_get_tlb_size return a value 1. if (pmp_sa >= tlb_sa && pmp_ea <= tlb_ea) { return pmp_ea - pmp_sa + 1; } Here pmp_sa == 0 and pmp_ea == 0. Signed-off-by: LIU Zhiwei --- target/ris

[PATCH v2 2/5] target/riscv: Give a more generic size for tlb

2021-11-22 Thread LIU Zhiwei
As the caller has given a tlb size parameter, we should use it to keep pace with it. Signed-off-by: LIU Zhiwei --- target/riscv/cpu_helper.c | 5 + target/riscv/pmp.c| 7 --- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/c

Re: [PATCH 35/35] test/tcg/ppc64le: Add float reference files

2021-11-22 Thread Richard Henderson
On 11/22/21 10:43 AM, Richard Henderson wrote: On 11/21/21 6:47 PM, Cédric Le Goater wrote: I am getting an error with this test. See below. ...   ### Rounding to nearest   from single: f32(-nan:0xffa0) -  to double: f64(-nan:0x00fff4) (INVALID) +  to double: f64(-nan:0x00fff40

[PATCH v2 5/5] target/riscv: Modify return and parameter type for pmp_adjust_tlb_size

2021-11-22 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/cpu_helper.c | 3 ++- target/riscv/pmp.c| 13 +++-- target/riscv/pmp.h| 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index cf8109197d..45e29e6c01 1

[PATCH v2 3/5] target/riscv: Discard return value for pmp_is_range_in_tlb

2021-11-22 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/pmp.c | 11 ++- target/riscv/pmp.h | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index ca38087574..4850a9cc5d 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -620,16 +

Re: [PATCH 3/3] hw/input/pckbd: Rename i8042_setup_a20_line() and its a20 irq argument

2021-11-22 Thread Peter Maydell
On Fri, 5 Nov 2021 at 17:21, Philippe Mathieu-Daudé wrote: > > 'a20_out' is an input IRQ, rename it as 'a20_input'. > i8042_setup_a20_line() doesn't take a Device parameter > but an ISADevice one. Rename it as i8042_isa_*() to > make it explicit. > > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [PATCH-for-6.2 0/2] hw/scsi/megasas: Avoid overflowing the SGL buffer

2021-11-22 Thread Darren Kenny
For the series: Reviewed-by: Darren Kenny Thanks, Darren. On Friday, 2021-11-19 at 21:11:39 +01, Philippe Mathieu-Daudé wrote: > Fix issue #521 reported by Alex some months ago: > https://gitlab.com/qemu-project/qemu/-/issues/521 > > Philippe Mathieu-Daudé (2): > hw/scsi/megasas: Fails comma

Re: [PATCH-for-6.2] qom/object: Ignore global properties with empty name

2021-11-22 Thread Darren Kenny
On Friday, 2021-11-19 at 12:32:29 +01, Philippe Mathieu-Daudé wrote: > When using -global, properties might have empty name/value. > > This fixes this legitimate use case: > > $ qemu-system-x86_64 -global driver=isa-fdc > qemu-system-x86_64: ../../devel/qemu/qapi/string-input-visitor.c:394: >

Re: [PATCH v3 3/3] cpus-common: implement dirty limit on vCPU

2021-11-22 Thread Markus Armbruster
Hyman Huang writes: > 在 2021/11/22 17:10, Markus Armbruster 写道: >> Hyman Huang writes: >> >>> =E5=9C=A8 2021/11/22 15:35, Markus Armbruster =E5=86=99=E9=81=93: huang...@chinatelecom.cn writes: > From: Hyman Huang(=E9=BB=84=E5=8B=87) > > implement dirtyrate calculation per

[PATCH] s390x/ipl: support extended kernel command line size

2021-11-22 Thread Marc Hartmayer
In the past s390 used a fixed command line length of 896 bytes. This has changed with the Linux commit 5ecb2da660ab ("s390: support command lines longer than 896 bytes"). There is now a parm area indicating the maximum command line size. This parm area has always been initialized to zero, so with o

Re: [PATCH v3 3/3] hw/i386: expose a "smbios-entry-point-type" PC machine property

2021-11-22 Thread Gerd Hoffmann
On Tue, Nov 02, 2021 at 07:25:25AM -0400, Michael S. Tsirkin wrote: > On Tue, Nov 02, 2021 at 09:51:35AM +0100, Philippe Mathieu-Daudé wrote: > > On 10/26/21 17:11, Eduardo Habkost wrote: > > > The i440fx and Q35 machine types are both hardcoded to use the > > > legacy SMBIOS 2.1 (32-bit) entry poi

Re: [PATCH v11 19/26] linux-user: Add LoongArch signal support

2021-11-22 Thread gaosong
Hi Richard, On 2021/11/20 下午6:33, Richard Henderson wrote: Drop all of the the inline markers. +{ +    int i; + +    __put_user(env->pc, &sc->sc_pc); + +    __put_user(0, &sc->sc_gpr[0]); +    for (i = 1; i < 32; ++i) { +    __put_user(env->gpr[i], &sc->sc_gpr[i]); +    } + +    for (i =

Re: [PATCH v11 19/26] linux-user: Add LoongArch signal support

2021-11-22 Thread chen huacai
Hi, all, On Mon, Nov 22, 2021 at 7:41 PM gaosong wrote: > > Hi Richard, > > On 2021/11/20 下午6:33, Richard Henderson wrote: > > > Drop all of the the inline markers. > > +{ > +int i; > + > +__put_user(env->pc, &sc->sc_pc); > + > +__put_user(0, &sc->sc_gpr[0]); > +for (i = 1; i < 32

Re: [PATCH] s390x/ipl: support extended kernel command line size

2021-11-22 Thread David Hildenbrand
On 22.11.21 12:29, Marc Hartmayer wrote: > In the past s390 used a fixed command line length of 896 bytes. This has > changed > with the Linux commit 5ecb2da660ab ("s390: support command lines longer than > 896 > bytes"). There is now a parm area indicating the maximum command line size. > This

Re: [PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-22 Thread Peter Maydell
On Wed, 17 Nov 2021 at 16:12, Richard Henderson wrote: > > The current api from safe_syscall_base() is to return -errno, which is > the interface provided by *some* linux kernel abis. The wrapper macro, > safe_syscall(), detects error, stores into errno, and returns -1, to > match the api of the

Re: [PATCH v1] virtio-mem: Don't skip alignment checks when warning about block size

2021-11-22 Thread David Hildenbrand
On 12.10.21 09:27, Michael S. Tsirkin wrote: > On Mon, Oct 11, 2021 at 07:33:05PM +0200, David Hildenbrand wrote: >> If we warn about the block size being smaller than the default, we skip >> some alignment checks. >> >> This can currently only fail on x86-64, when specifying a block size of >> 1 M

Re: [PATCH-for-6.2? 0/2] hw/intc/arm_gicv3: Introduce CONFIG_ARM_GIC_TCG Kconfig selector

2021-11-22 Thread Philippe Mathieu-Daudé
On 11/22/21 11:59, Peter Maydell wrote: > On Mon, 15 Nov 2021 at 22:36, Philippe Mathieu-Daudé > wrote: >> >> The GICv3 ITS support has been introduced uring the 6.2 development >> window (commits 18f6290a6a9..17fb5e36aab). This device is for >> emulation. When building virtualization-only binary

Re: [PATCH-for-6.2?] ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd

2021-11-22 Thread Philippe Mathieu-Daudé
On 11/21/21 18:22, Dongwon Kim wrote: > The dmabuf often becomes invalid right after unblocking pipeline > and graphic_hw_gl_flushed in case a new scanout blob is submitted > because the dmabuf associated with the current guest scanout is > freed after swapping. > > So both graphic_hw_gl_block and

Re: [PATCH 2/2] ui: fix incorrect pointer position on highdpi with gtk

2021-11-22 Thread Philippe Mathieu-Daudé
On 11/21/21 07:55, Alexander Orzechowski wrote: > Signed-off-by: Alexander Orzechowski > --- > ui/gtk.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/ui/gtk.c b/ui/gtk.c > index d2892ea6b4..b2670142b5 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c > @@ -838,10

Re: [PATCH 1/2] ui: fix incorrect scaling on highdpi with gtk/opengl

2021-11-22 Thread Philippe Mathieu-Daudé
On 11/21/21 07:55, Alexander Orzechowski wrote: > Signed-off-by: Alexander Orzechowski > --- > ui/gtk-gl-area.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] MAINTAINERS: Add myself as a reviewer for Hyper-V VMBus

2021-11-22 Thread Philippe Mathieu-Daudé
On 11/20/21 19:46, Maciej S. Szmigiero wrote: > From: "Maciej S. Szmigiero" > > This way there is at least some contact point for incoming patches. > > We'll see whether the code still gets just a random patch a few times > a year or whether it requires a permanent maintainer to take care of it.

Re: [PATCH 1/2] docs: Fix botched rST conversion of 'submitting-a-patch.rst'

2021-11-22 Thread Kashyap Chamarthy
On Mon, Nov 22, 2021 at 11:36:54AM +0100, Thomas Huth wrote: > On 22/11/2021 11.20, Kashyap Chamarthy wrote: > > On Mon, Nov 22, 2021 at 10:51:15AM +0100, Thomas Huth wrote: [...] > > > I'll add the link to https://wiki.qemu.org/Contribute/SpellCheck again. > > > > Please don't -- I intentionall

Re: [PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-22 Thread Richard Henderson
On 11/22/21 12:55 PM, Peter Maydell wrote: - /* This is the entry point for making a system call. The calling + /* +* This is the entry point for making a system call. The calling * convention here is that of a C varargs function with the * first argument a

Re: [PATCH v11 19/26] linux-user: Add LoongArch signal support

2021-11-22 Thread Richard Henderson
On 11/22/21 12:41 PM, gaosong wrote: Hi Richard, On 2021/11/20 下午6:33, Richard Henderson wrote: Drop all of the the inline markers. +{ +    int i; + +    __put_user(env->pc, &sc->sc_pc); + +    __put_user(0, &sc->sc_gpr[0]); +    for (i = 1; i < 32; ++i) { +    __put_user(env->gpr[i], &s

Re: [PATCH 1/2] docs: Fix botched rST conversion of 'submitting-a-patch.rst'

2021-11-22 Thread Thomas Huth
On 22/11/2021 13.19, Kashyap Chamarthy wrote: On Mon, Nov 22, 2021 at 11:36:54AM +0100, Thomas Huth wrote: On 22/11/2021 11.20, Kashyap Chamarthy wrote: On Mon, Nov 22, 2021 at 10:51:15AM +0100, Thomas Huth wrote: [...] I'll add the link to https://wiki.qemu.org/Contribute/SpellCheck again.

[PULL 0/8] Fixes 20211122 patches

2021-11-22 Thread Gerd Hoffmann
The following changes since commit c5fbdd60cf1fb52f01bdfe342b6fa65d5343e1b1: Merge tag 'qemu-sparc-20211121' of git://github.com/mcayland/qemu into staging (2021-11-21 14:12:25 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/fixes-20211122-pull-re

[PULL 5/8] migration: fix dump-vmstate with modules

2021-11-22 Thread Gerd Hoffmann
From: Laurent Vivier To work correctly -dump-vmstate and vmstate-static-checker.py need to dump all the supported vmstates. But as some devices can be modules, they are not loaded at startup and not dumped. Fix that by loading all available modules before dumping the machine vmstate. Fixes: 7ab

[PULL 3/8] ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd

2021-11-22 Thread Gerd Hoffmann
From: Dongwon Kim The dmabuf often becomes invalid right after unblocking pipeline and graphic_hw_gl_flushed in case a new scanout blob is submitted because the dmabuf associated with the current guest scanout is freed after swapping. So both graphic_hw_gl_block and graphic_hw_gl_flushed should

[PULL 1/8] ui: fix incorrect scaling on highdpi with gtk/opengl

2021-11-22 Thread Gerd Hoffmann
From: Alexander Orzechowski Signed-off-by: Alexander Orzechowski Message-Id: <20211121065504.29101-2-orzechowski.alexan...@gmail.com> [ kraxel: codestyle fix ] Signed-off-by: Gerd Hoffmann --- ui/gtk-gl-area.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/gtk-

[PULL 2/8] ui: fix incorrect pointer position on highdpi with gtk

2021-11-22 Thread Gerd Hoffmann
From: Alexander Orzechowski Signed-off-by: Alexander Orzechowski Message-Id: <20211121065504.29101-3-orzechowski.alexan...@gmail.com> [ kraxel: codestyle fix ] Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/gtk.c

[PULL 7/8] microvm: add missing g_free() call

2021-11-22 Thread Gerd Hoffmann
Fixes: CID 1465240 Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211108130718.840216-2-kra...@redhat.com> --- hw/i386/microvm-dt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c index 6ee6c42904d2..a6a59a6e12cd

  1   2   3   >