Re: [PATCH v5 18/60] target/riscv: vector integer divide instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > Signed-off-by: LIU Zhiwei > --- > target/riscv/helper.h | 33 +++ > target/riscv/insn32.decode | 8 +++ > target/riscv/insn_trans/trans_rvv.inc.c | 10 > target/riscv/vector_helper.c| 74 +

Re: [PATCH v5 17/60] target/riscv: vector single-width integer multiply instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +static int64_t do_mulhsu_d(int64_t s2, uint64_t s1) > +{ > +uint64_t hi_64, lo_64, abs_s2 = s2; > + > +if (s2 < 0) { > +abs_s2 = -s2; > +} > +mulu64(&lo_64, &hi_64, abs_s2, s1); > +if ((int64_t)(s2 ^ s1) < 0) { Why would the sign

Re: [PATCH v5 16/60] target/riscv: vector integer min/max instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +/* Vector Integer Min/Max Instructions */ > +GEN_OPIVV_GVEC_TRANS(vminu_vv, umin) > +GEN_OPIVV_GVEC_TRANS(vmin_vv, smin) > +GEN_OPIVV_GVEC_TRANS(vmaxu_vv, umax) > +GEN_OPIVV_GVEC_TRANS(vmax_vv, smax) > +GEN_OPIVX_TRANS(vminu_vx, opivx_check) > +GEN_OPIVX_T

Re: [PATCH v5 15/60] target/riscv: vector integer comparison instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +/* Vector Integer Comparison Instructions */ > +#define DO_MSEQ(N, M) ((N == M) ? 1 : 0) > +#define DO_MSNE(N, M) ((N != M) ? 1 : 0) > +#define DO_MSLTU(N, M) ((N < M) ? 1 : 0) > +#define DO_MSLT(N, M) ((N < M) ? 1 : 0) > +#define DO_MSLEU(N, M) ((N <= M) ?

Re: [PATCH v5 11/60] target/riscv: vector integer add-with-carry / subtract-with-borrow instructions

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 14:16, Richard Henderson wrote: On 3/13/20 10:58 PM, Richard Henderson wrote: C ? N + M <= N : N + M < N Ho hum. N + M + 1 <= N. I'm sure you saw the typo... You give the corner case and the very precise answer. Thanks very much. Zhiwei r~

Re: [PATCH v5 11/60] target/riscv: vector integer add-with-carry / subtract-with-borrow instructions

2020-03-13 Thread Richard Henderson
On 3/13/20 10:58 PM, Richard Henderson wrote: > C ? N + M <= N : N + M < N Ho hum. N + M + 1 <= N. I'm sure you saw the typo... r~

Re: [PATCH v5 14/60] target/riscv: vector narrowing integer right shift instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > Signed-off-by: LIU Zhiwei > --- > target/riscv/helper.h | 13 > target/riscv/insn32.decode | 6 ++ > target/riscv/insn_trans/trans_rvv.inc.c | 91 + > target/riscv/vector_helper.c| 14

Re: [PATCH v5 11/60] target/riscv: vector integer add-with-carry / subtract-with-borrow instructions

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 13:58, Richard Henderson wrote: On 3/12/20 7:58 AM, LIU Zhiwei wrote: +#define DO_MADC(N, M, C) ((__typeof(N))(N + M + C) < N ? 1 : 0) Incorrect. E.g N = 1, M = UINT_MAX, C = 1, adds to 1, which is not less than N, despite the carry-out. Yes, it really the corner case. I shoul

Re: [PATCH v5 13/60] target/riscv: vector single-width bit shift instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +#define GEN_OPIVX_GVEC_SHIFT_TRANS(NAME, GVSUF) > \ > +static bool trans_##NAME(DisasContext *s, arg_rmrr *a) > \ > +{ > \ > +

Re: [PATCH v5 12/60] target/riscv: vector bitwise logical instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > Signed-off-by: LIU Zhiwei > --- > target/riscv/helper.h | 25 > target/riscv/insn32.decode | 9 + > target/riscv/insn_trans/trans_rvv.inc.c | 11 ++ > target/riscv/vector_helper.c| 51

Re: [PATCH v5 11/60] target/riscv: vector integer add-with-carry / subtract-with-borrow instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +#define DO_MADC(N, M, C) ((__typeof(N))(N + M + C) < N ? 1 : 0) Incorrect. E.g N = 1, M = UINT_MAX, C = 1, adds to 1, which is not less than N, despite the carry-out. You want C ? N + M <= N : N + M < N > +#define DO_MSBC(N, M, C) ((__typeof(N))(N -

Re: [PATCH v5 10/60] target/riscv: vector widening integer add and subtract

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > Signed-off-by: LIU Zhiwei > --- > target/riscv/helper.h | 49 > target/riscv/insn32.decode | 16 +++ > target/riscv/insn_trans/trans_rvv.inc.c | 154 > target/riscv/vector_helper.c

Re: [PATCH v5 09/60] target/riscv: vector single-width integer add and subtract

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +if (a->vm && s->vl_eq_vlmax) { \ > +tcg_gen_gvec_##GVSUF(8 << s->sew, vreg_ofs(s, a->rd), \ > +vreg_ofs(s, a->rs2), vreg_ofs(s, a->rs1), \ > +MAXSZ(s), MAXSZ(s));

Re: [PATCH v5 08/60] target/riscv: add vector amo operations

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 12:28, Richard Henderson wrote: On 3/12/20 7:58 AM, LIU Zhiwei wrote: +static gen_helper_amo *const fnsw[9] = { ... +static gen_helper_amo *const fnsd[18] = { ... +fn = fnsw[seq]; +#ifdef TARGET_RISCV64 +if (s->sew == 3) { +fn = fnsd[seq];

Re: [PATCH 1/3] Use &error_abort instead of separate assert()

2020-03-13 Thread Markus Armbruster
Alexander Bulekov writes: > On 200313 1805, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster > > >> index 1a99277d60..aa9eee6ebf 100644 >> --- a/tests/qtest/fuzz/qos_fuzz.c >> +++ b/tests/qtest/fuzz/qos_fuzz.c >> @@ -57,8 +57,7 @@ static void qos_set_machines_devices_available(void)

Re: [PATCH v5 08/60] target/riscv: add vector amo operations

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +static gen_helper_amo *const fnsw[9] = { ... > +static gen_helper_amo *const fnsd[18] = { ... > +fn = fnsw[seq]; > +#ifdef TARGET_RISCV64 > +if (s->sew == 3) { > +fn = fnsd[seq]; > +} > +#endif This indexing is wr

Re: [PATCH v1] mips/mips_malta: Allow more than 2G RAM

2020-03-13 Thread Aleksandar Markovic
On Thu, Mar 5, 2020 at 11:18 AM Philippe Mathieu-Daudé wrote: > > Please post new patches as v2, and do not post them as reply to v1. > > On 3/3/20 1:41 AM, Jiaxun Yang wrote: > > When malta is coupled with MIPS64 cpu which have 64bit > > address space, it is possible to have more than 2G RAM. > >

RE: [PATCH v4] hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()

2020-03-13 Thread Chenqun (kuhn)
>-Original Message- >From: Peter Maydell [mailto:peter.mayd...@linaro.org] >Sent: Friday, March 13, 2020 10:29 PM >To: Chenqun (kuhn) >Cc: QEMU Developers ; QEMU Trivial triv...@nongnu.org>; Zhanghailiang ; >Euler Robot ; Jason Wang >; Peter Chubb >Subject: Re: [PATCH v4] hw/net/imx_fec:

Re: [PATCH] linux-user: Update TASK_UNMAPPED_BASE for aarch64

2020-03-13 Thread Aleksandar Markovic
On Fri, Mar 13, 2020 at 1:28 AM Lirong Yuan wrote: > > This change updates TASK_UNMAPPED_BASE (the base address for guest programs) > for aarch64. It is needed to allow qemu to work with Thread Sanitizer (TSan), > which has specific boundary definitions for memory mappings on different > platfo

Re: [PATCH v2 2/2] target/riscv: Add a sifive-e34 cpu type

2020-03-13 Thread Bin Meng
On Sat, Mar 14, 2020 at 3:35 AM Corey Wharton wrote: > > The sifive-e34 cpu type is the same as the sifive-e31 with the > single precision floating-point extension enabled. > > Signed-off-by: Corey Wharton > --- > v2: Added missing RVU flag > > target/riscv/cpu.c | 10 ++ > target/riscv/

Re: [PATCH v5 07/60] target/riscv: add fault-only-first unit stride load

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > The unit-stride fault-only-fault load instructions are used to > vectorize loops with data-dependent exit conditions(while loops). > These instructions execute as a regular load except that they > will only take a trap on element 0. > > Signed-off-by: LIU Zh

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 9:26, Richard Henderson wrote: On 3/13/20 2:32 PM, LIU Zhiwei wrote: +/* check functions */ +static bool vext_check_isa_ill(DisasContext *s, target_ulong isa) +{ +    return !s->vill && ((s->misa & isa) == isa); +} I don't think we need a new function to check ISA. I don't thin

Re: [PATCH v5 06/60] target/riscv: add vector index load and store instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +static inline void vext_ldst_index(void *vd, void *v0, target_ulong base, > +void *vs2, CPURISCVState *env, uint32_t desc, > +vext_get_index_addr get_index_addr, > +vext_ldst_elem_fn ldst_elem, > +vext_ld_clear_elem clear_elem

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > Vector strided operations access the first memory element at the base address, > and then access subsequent elements at address increments given by the byte > offset contained in the x register specified by rs2. > > Vector unit-stride operations access eleme

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread Richard Henderson
On 3/13/20 2:32 PM, LIU Zhiwei wrote: >>> +/* check functions */ >>> +static bool vext_check_isa_ill(DisasContext *s, target_ulong isa) >>> +{ >>> +    return !s->vill && ((s->misa & isa) == isa); >>> +} >> I don't think we need a new function to check ISA. > I don't think so. > > Although there i

Re: [PATCH v5 04/60] target/riscv: add vector configure instruction

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +static bool trans_vsetvl(DisasContext *ctx, arg_vsetvl * a) > +{ > +TCGv s1, s2, dst; > +s2 = tcg_temp_new(); > +dst = tcg_temp_new(); > + > +/* Using x0 as the rs1 register specifier, encodes an infinite AVL */ > +if (a->rs1 == 0) { > +

Re: [PATCH v5 03/60] target/riscv: support vector extension csr

2020-03-13 Thread Richard Henderson
On 3/12/20 7:58 AM, LIU Zhiwei wrote: > The v0.7.1 specification does not define vector status within mstatus. > A future revision will define the privileged portion of the vector status. > > Signed-off-by: LIU Zhiwei > --- > target/riscv/cpu_bits.h | 15 + > target/riscv/csr.c | 75

Re: [PATCH v5 08/60] target/riscv: add vector amo operations

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 8:02, Alistair Francis wrote: On Thu, Mar 12, 2020 at 8:15 AM LIU Zhiwei wrote: Vector AMOs operate as if aq and rl bits were zero on each element with regard to ordering relative to other instructions in the same hart. Vector AMOs provide no ordering guarantee between element o

Re: [PATCH 2/9] qapi/misc: Move add_client command with chardev code

2020-03-13 Thread Marc-André Lureau
Hi On Fri, Mar 13, 2020 at 7:42 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Without looking at the rest of the series, I fail to see the improvement, quite the opposite. A bit of context? > --- > qapi/char.json | 32 > qapi/m

Re: [PATCH v8 0/4] linux-user: generate syscall_nr.sh for RISC-V

2020-03-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1584143748.git.alistair.fran...@wdc.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v8 0/4] linux-user: generate syscall_nr.sh for RISC-V Message-id: cover.1584143748.git.alistai

Re: [PATCH 2/4] usb-serial: chunk data to wMaxPacketSize

2020-03-13 Thread Samuel Thibault
Jason Andryuk, le jeu. 12 mars 2020 08:55:21 -0400, a ecrit: > usb-serial has issues with xHCI controllers where data is lost in the > VM. Inspecting the URBs in the guest, EHCI starts every 64 byte boundary > (wMaxPacketSize) with a header. EHCI hands packets into > usb_serial_token_in() with si

[PATCH v8 4/4] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel

2020-03-13 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Laurent Vivier --- linux-user/riscv/syscall32_nr.h | 295 +++ linux-user/riscv/syscall64_nr.h | 301 linux-user/riscv/syscall_nr.h | 294 +-- 3 files changed, 5

[PATCH v8 3/4] linux-user: Support futex_time64

2020-03-13 Thread Alistair Francis
Add support for host and target futex_time64. If futex_time64 exists on the host we try that first before falling back to the standard futux syscall. Signed-off-by: Alistair Francis --- linux-user/syscall.c | 144 +++ 1 file changed, 131 insertions(+), 13

[PATCH v8 2/4] linux-user/syscall: Add support for clock_gettime64/clock_settime64

2020-03-13 Thread Alistair Francis
Add support for the clock_gettime64/clock_settime64 syscalls. If your host is 64-bit or is 32-bit with the *_time64 syscall then the timespec will correctly be a 64-bit time_t. Otherwise the host will return a 32-bit time_t which will be rounded to 64-bits. This will be incorrect after y2038. Sig

[PATCH v8 1/4] linux-user: Protect more syscalls

2020-03-13 Thread Alistair Francis
New y2038 safe 32-bit architectures (like RISC-V) don't support old syscalls with a 32-bit time_t. The kernel defines new *_time64 versions of these syscalls. Add some more #ifdefs to syscall.c in linux-user to allow us to compile without these old syscalls. Signed-off-by: Alistair Francis Review

[PATCH v8 0/4] linux-user: generate syscall_nr.sh for RISC-V

2020-03-13 Thread Alistair Francis
This series updates the RISC-V syscall_nr.sh based on the 5.5 kernel. There are two parts to this. One is just adding the new syscalls, the other part is updating the RV32 syscalls to match the fact that RV32 is a 64-bit time_t architectures (y2038) safe. We need to make some changes to syscall.c

Re: [PATCH v5 08/60] target/riscv: add vector amo operations

2020-03-13 Thread Alistair Francis
On Thu, Mar 12, 2020 at 8:15 AM LIU Zhiwei wrote: > > Vector AMOs operate as if aq and rl bits were zero on each element > with regard to ordering relative to other instructions in the same hart. > Vector AMOs provide no ordering guarantee between element operations > in the same vector AMO instru

Re: [PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-13 Thread Samuel Thibault
Jason Andryuk, le jeu. 12 mars 2020 08:55:20 -0400, a ecrit: > We'll be adding a loop, so move the code into a helper function. breaks > are replaced with returns. > > Signed-off-by: Jason Andryuk Reviewed-by: Samuel Thibault > --- > hw/usb/dev-serial.c | 77 +

Re: [PATCH] linux-user: Update TASK_UNMAPPED_BASE for aarch64

2020-03-13 Thread Lirong Yuan
On Fri, Mar 13, 2020 at 2:45 PM Laurent Vivier wrote: > Le 13/03/2020 à 01:28, Lirong Yuan a écrit : > > This change updates TASK_UNMAPPED_BASE (the base address for guest > programs) for aarch64. It is needed to allow qemu to work with Thread > Sanitizer (TSan), which has specific boundary defin

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 3:17 PM LIU Zhiwei wrote: > > > > On 2020/3/14 6:05, Alistair Francis wrote: > > On Fri, Mar 13, 2020 at 2:32 PM LIU Zhiwei wrote: > >> > >> > >> On 2020/3/14 4:38, Alistair Francis wrote: > >>> On Thu, Mar 12, 2020 at 8:09 AM LIU Zhiwei wrote: > Vector strided opera

Re: [PATCH v3 15/16] hw/i386/vmport: Add support for CMD_GETHZ

2020-03-13 Thread Liran Alon
On 13/03/2020 22:07, Philippe Mathieu-Daudé wrote: On 3/12/20 5:54 PM, Liran Alon wrote: diff --git a/include/hw/i386/vmport.h b/include/hw/i386/vmport.h index 34cc050b1ffa..aee809521aa0 100644 --- a/include/hw/i386/vmport.h +++ b/include/hw/i386/vmport.h @@ -12,6 +12,7 @@ typedef enum {

Re: [PATCH v3 08/16] hw/i386/vmport: Define enum for all commands

2020-03-13 Thread Liran Alon
On 13/03/2020 22:05, Philippe Mathieu-Daudé wrote: On 3/13/20 8:59 PM, Philippe Mathieu-Daudé wrote: On 3/12/20 5:54 PM, Liran Alon wrote: --- a/include/hw/i386/vmport.h +++ b/include/hw/i386/vmport.h @@ -4,12 +4,21 @@   #define TYPE_VMPORT "vmport"   typedef uint32_t (VMPortReadFunc)(void *o

Re: [PATCH v5 07/60] target/riscv: add fault-only-first unit stride load

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 6:24, Alistair Francis wrote: On Thu, Mar 12, 2020 at 8:13 AM LIU Zhiwei wrote: The unit-stride fault-only-fault load instructions are used to vectorize loops with data-dependent exit conditions(while loops). These instructions execute as a regular load except that they will onl

Re: [PATCH v3 08/16] hw/i386/vmport: Define enum for all commands

2020-03-13 Thread Liran Alon
On 13/03/2020 21:59, Philippe Mathieu-Daudé wrote: On 3/12/20 5:54 PM, Liran Alon wrote: No functional change. Defining an enum for all VMPort commands have the following advantages: * It gets rid of the error-prone requirement to update VMPORT_ENTRIES when new VMPort commands are added to QE

Re: [PATCH v3 07/16] hw/i386/vmport: Introduce vmport.h

2020-03-13 Thread Liran Alon
On 13/03/2020 21:57, Philippe Mathieu-Daudé wrote: On 3/12/20 5:54 PM, Liran Alon wrote: No functional change. This is mere refactoring. Suggested-by: Michael S. Tsirkin Signed-off-by: Liran Alon ---   hw/i386/pc.c |  1 +   hw/i386/vmmouse.c    |  1 +   hw/i386/vmport.c 

Re: [PATCH] docs/conf.py: Raise ConfigError for bad Sphinx Python version

2020-03-13 Thread John Snow
On 3/13/20 12:36 PM, Peter Maydell wrote: > Raise ConfigError rather than VersionRequirementError when we detect > that the Python being used by Sphinx is too old. > > Currently the way we flag the Python version problem up to the user > causes Sphinx to print an unnecessary Python stack trace

Re: [PATCH 01/14] Makefile: Only build virtiofsd if system-mode is enabled

2020-03-13 Thread Laurent Vivier
Le 13/03/2020 à 19:36, Philippe Mathieu-Daudé a écrit : > Do not build the virtiofsd helper when configured with > --disable-system. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > inde

Re: [PATCH v1 1/1] target/riscv: Don't set write permissions on dirty PTEs

2020-03-13 Thread Alistair Francis
On Thu, Mar 12, 2020 at 10:26 PM Richard Henderson wrote: > > On 3/12/20 3:10 PM, Alistair Francis wrote: > >> I still think this must be a guest (or nested guest) bug related to > >> clearing > >> PTE bits and failing to flush the TLB properly. > > > > It think so as well now. I have changed the

Re: [PATCH v5 07/60] target/riscv: add fault-only-first unit stride load

2020-03-13 Thread Alistair Francis
On Thu, Mar 12, 2020 at 8:13 AM LIU Zhiwei wrote: > > The unit-stride fault-only-fault load instructions are used to > vectorize loops with data-dependent exit conditions(while loops). > These instructions execute as a regular load except that they > will only take a trap on element 0. > > Signed-

Re: [PATCH v7 3/4] linux-user: Support futex_time64

2020-03-13 Thread Laurent Vivier
Le 13/03/2020 à 23:13, Alistair Francis a écrit : > On Fri, Mar 13, 2020 at 3:12 PM Alistair Francis wrote: >> >> On Fri, Mar 13, 2020 at 1:14 AM Laurent Vivier wrote: >>> >>> Le 12/03/2020 à 23:13, Alistair Francis a écrit : Add support for host and target futex_time64. If futex_time64 exis

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 6:05, Alistair Francis wrote: On Fri, Mar 13, 2020 at 2:32 PM LIU Zhiwei wrote: On 2020/3/14 4:38, Alistair Francis wrote: On Thu, Mar 12, 2020 at 8:09 AM LIU Zhiwei wrote: Vector strided operations access the first memory element at the base address, and then access subseq

Re: [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs()

2020-03-13 Thread BALATON Zoltan
On Fri, 13 Mar 2020, BALATON Zoltan wrote: The pci_ide_create_devs() function takes a hd_table parameter but all callers just pass what ide_drive_get() returns so we can do it locally simplifying callers and removing hd_table parameter. Signed-off-by: BALATON Zoltan --- hw/alpha/dp264.c

Re: [PATCH v7 3/4] linux-user: Support futex_time64

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 1:14 AM Laurent Vivier wrote: > > Le 12/03/2020 à 23:13, Alistair Francis a écrit : > > Add support for host and target futex_time64. If futex_time64 exists on > > the host we try that first before falling back to the standard futux > > syscall. > > > > Signed-off-by: Alist

Re: [PATCH v7 3/4] linux-user: Support futex_time64

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 3:12 PM Alistair Francis wrote: > > On Fri, Mar 13, 2020 at 1:14 AM Laurent Vivier wrote: > > > > Le 12/03/2020 à 23:13, Alistair Francis a écrit : > > > Add support for host and target futex_time64. If futex_time64 exists on > > > the host we try that first before falling

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Eric Blake
On 3/13/20 4:54 PM, Markus Armbruster wrote: I append my hacked up version of auto-propagated-errp.cocci. It produces the same patch as yours for the complete tree. // Use ERRP_AUTO_PROPAGATE (see include/qapi/error.h) // // // Usage example: // spatch --sp-file scripts/coccinelle/auto-p

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 2:32 PM LIU Zhiwei wrote: > > > > On 2020/3/14 4:38, Alistair Francis wrote: > > On Thu, Mar 12, 2020 at 8:09 AM LIU Zhiwei wrote: > >> Vector strided operations access the first memory element at the base > >> address, > >> and then access subsequent elements at address

Re: [PATCH 0/4] linux-user: generate syscall_nr.h from linux unistd.h

2020-03-13 Thread Laurent Vivier
Le 10/03/2020 à 12:07, Laurent Vivier a écrit : > This series adds a script to generate syscall_nr.h for > architectures that don't use syscall.tbl but asm-generic/unistd.h > > The script uses several cpp passes and filters result with a grep/sed/tr > sequence. > The result must be checked before

Re: [PATCH] net: Complete qapi-fication of netdev_add

2020-03-13 Thread Markus Armbruster
It's too late in my day for a full review. Just one observation for now. Eric Blake writes: > We've had all the required pieces for doing a type-safe representation > of netdev_add as a flat union for quite some time now (since > 0e55c381f6 in v2.7.0, released in 2016), but did not make the fin

Re: [PATCH 5/5] block/io: auto-no-fallback for write-zeroes

2020-03-13 Thread Eric Blake
On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: NBD driver may has max_pwrite_zeroes but doesn't has max_pwrite_zeroes_no_fallback limit. This means, that (when BDRV_REQ_NO_FALLBACK is supported) it is beneficial to try send request with BDRV_REQ_NO_FALLBACK instead of splitting the reques

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 13.03.2020 18:42, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 12.03.2020 19:36, Markus Armbruster wrote: I may have a second look tomorrow with fresher eyes, but let's get this out now as is. Vladimir Sementso

Re: [PATCH v4 00/21] linux-user: generate syscall_nr.sh

2020-03-13 Thread Laurent Vivier
Le 10/03/2020 à 11:33, Laurent Vivier a écrit : > This series copies the files syscall.tbl from linux v5.5 and generates > the file syscall_nr.h from them. > > This is done for all the QEMU targets that have a syscall.tbl > in the linux source tree: mips, mips64, i386, x86_64, sparc, s390x, > ppc,

Re: [PATCH v5 60/60] target/riscv: configure and turn on vector extension from command line

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 5:41, Alistair Francis wrote: On Thu, Mar 12, 2020 at 10:00 AM LIU Zhiwei wrote: Vector extension is default off. The only way to use vector extension is 1. use cpu rv32 or rv64 2. turn on it by command line "-cpu rv64,v=true,vlen=128,elen=64,vext_spec=v0.7.1". vlen is the vect

Re: [PATCH v7 4/4] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel

2020-03-13 Thread Laurent Vivier
Le 12/03/2020 à 23:14, Alistair Francis a écrit : > Signed-off-by: Alistair Francis > Reviewed-by: Laurent Vivier > --- > linux-user/riscv/syscall32_nr.h | 295 +++ > linux-user/riscv/syscall64_nr.h | 301 > linux-user/riscv/syscall_nr

Re: [PATCH v7 2/4] linux-user/syscall: Add support for clock_gettime64/clock_settime64

2020-03-13 Thread Laurent Vivier
Le 12/03/2020 à 23:13, Alistair Francis a écrit : > Add support for the clock_gettime64/clock_settime64 syscalls. > > If your host is 64-bit or is 32-bit with the *_time64 syscall then the > timespec will correctly be a 64-bit time_t. Otherwise the host will > return a 32-bit time_t which will be

Re: [PATCH 4/5] block/io: fix bdrv_co_do_pwrite_zeroes head calculation

2020-03-13 Thread Eric Blake
On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: It's wrong to update head using num in this place, as num may be reduced during the iteration, and we'll have wrong head value on next iteration. Instead update head at iteration end. Cc: qemu-sta...@nongnu.org Signed-off-by: Vladimir Semen

Re: [PATCH v7 1/4] linux-user: Protect more syscalls

2020-03-13 Thread Laurent Vivier
Le 12/03/2020 à 23:13, Alistair Francis a écrit : > New y2038 safe 32-bit architectures (like RISC-V) don't support old > syscalls with a 32-bit time_t. The kernel defines new *_time64 versions > of these syscalls. Add some more #ifdefs to syscall.c in linux-user to > allow us to compile without th

Re: [PATCH] linux-user: Update TASK_UNMAPPED_BASE for aarch64

2020-03-13 Thread Laurent Vivier
Le 13/03/2020 à 01:28, Lirong Yuan a écrit : > This change updates TASK_UNMAPPED_BASE (the base address for guest programs) > for aarch64. It is needed to allow qemu to work with Thread Sanitizer (TSan), > which has specific boundary definitions for memory mappings on different > platforms: > ht

Re: [PATCH] linux-user: Update TASK_UNMAPPED_BASE for aarch64

2020-03-13 Thread Laurent Vivier
Le 13/03/2020 à 01:28, Lirong Yuan a écrit : > This change updates TASK_UNMAPPED_BASE (the base address for guest programs) > for aarch64. It is needed to allow qemu to work with Thread Sanitizer (TSan), > which has specific boundary definitions for memory mappings on different > platforms: > ht

Re: [PATCH v2] linux-user: fix socket() strace

2020-03-13 Thread Laurent Vivier
Le 12/03/2020 à 17:55, Laurent Vivier a écrit : > print_socket_type() doesn't manage flags and the correct type cannot > be displayed > > Signed-off-by: Laurent Vivier > --- > > Notes: > v2: replace gemu_log() by qemu_log() as it has been removed from qemu > > linux-user/strace.c | 8 +

Re: [PATCH v5 60/60] target/riscv: configure and turn on vector extension from command line

2020-03-13 Thread Alistair Francis
On Thu, Mar 12, 2020 at 10:00 AM LIU Zhiwei wrote: > > Vector extension is default off. The only way to use vector extension is > 1. use cpu rv32 or rv64 > 2. turn on it by command line > "-cpu rv64,v=true,vlen=128,elen=64,vext_spec=v0.7.1". > > vlen is the vector register length, default value is

Re: [PATCH v6 1/4] qcow2: introduce compression type feature

2020-03-13 Thread Eric Blake
On 3/12/20 4:22 AM, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be c

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread LIU Zhiwei
On 2020/3/14 4:38, Alistair Francis wrote: On Thu, Mar 12, 2020 at 8:09 AM LIU Zhiwei wrote: Vector strided operations access the first memory element at the base address, and then access subsequent elements at address increments given by the byte offset contained in the x register specified

[PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header

2020-03-13 Thread BALATON Zoltan
There are several definitions of MAX_IDE_BUS in different boards (some of them unused) with the same value. Move it to include/hw/ide/internal.h to have it in a central place. Signed-off-by: BALATON Zoltan --- hw/alpha/dp264.c | 2 -- hw/hppa/machine.c | 2 -- hw/i386/pc_piix.c

[PATCH 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h

2020-03-13 Thread BALATON Zoltan
After previous clean ups we can drop direct inclusion of hw/ide.h from several places. Signed-off-by: BALATON Zoltan --- hw/hppa/hppa_sys.h | 1 - hw/hppa/machine.c | 1 - hw/i386/pc_piix.c | 1 - hw/isa/piix4.c | 1 - hw/mips/mips_fulong2e.c | 1 - hw/ppc/mac_newworld.

[PATCH 1/8] hw/ide: Get rid of piix3_init functions

2020-03-13 Thread BALATON Zoltan
This removes pci_piix3_ide_init() and pci_piix3_xen_ide_init() functions similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan --- hw/i386/pc_piix.c | 10 +- hw/ide/pci.c | 1 + hw/ide/piix.c | 21 + include/hw/ide.h | 2 -- 4 files

[PATCH 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h

2020-03-13 Thread BALATON Zoltan
We can move it next to the MAX_IDE_BUS define now that less files use it. Signed-off-by: BALATON Zoltan --- include/hw/ide.h | 2 -- include/hw/ide/internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index d52c211f32..c5ce5

[PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs()

2020-03-13 Thread BALATON Zoltan
The pci_ide_create_devs() function takes a hd_table parameter but all callers just pass what ide_drive_get() returns so we can do it locally simplifying callers and removing hd_table parameter. Signed-off-by: BALATON Zoltan --- hw/alpha/dp264.c | 13 +++-- hw/i386/pc_piix.c

[PATCH 3/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h

2020-03-13 Thread BALATON Zoltan
After previous patches we don't need hw/pci/pci.h any more in hw/ide.h. Some files depended on implicit inclusion by this header which are also fixed up here. Signed-off-by: BALATON Zoltan --- hw/ide/ahci_internal.h| 1 + include/hw/ide.h | 1 - include/hw/ide/pci.h

[PATCH 2/8] hw/ide: Get rid of piix4_init function

2020-03-13 Thread BALATON Zoltan
This removes pci_piix4_ide_init() function similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan --- hw/ide/piix.c| 12 +--- hw/isa/piix4.c | 5 - include/hw/ide.h | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/ide/piix.c b/hw

[PATCH 0/8] Misc hw/ide legacy clean up

2020-03-13 Thread BALATON Zoltan
These are some clean ups to remove more legacy init functions and lessen dependence on include/hw/ide.h with some simplifications in board code. There should be no functional change. BALATON Zoltan (8): hw/ide: Get rid of piix3_init functions hw/ide: Get rid of piix4_init function hw/ide: Re

[PATCH 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors

2020-03-13 Thread BALATON Zoltan
Spaces are required around a + operator and if statements should have braces even for single line. Also make it simpler by reversing the condition instead of breaking the loop. Signed-off-by: BALATON Zoltan --- hw/ide/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v5 06/60] target/riscv: add vector index load and store instructions

2020-03-13 Thread Alistair Francis
On Thu, Mar 12, 2020 at 8:11 AM LIU Zhiwei wrote: > > Vector indexed operations add the contents of each element of the > vector offset operand specified by vs2 to the base effective address > to give the effective address of each element. > > Signed-off-by: LIU Zhiwei Reviewed-by: Alistair Fran

Re: [PATCH 0/9] user-mode: Prune build dependencies (part 2)

2020-03-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200313184153.11275-1-phi...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #

Re: [PATCH 0/9] user-mode: Prune build dependencies (part 2)

2020-03-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200313184153.11275-1-phi...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash export

Re: [PATCH 3/5] block: add max_pwrite_zeroes_no_fallback to BlockLimits

2020-03-13 Thread Eric Blake
On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: NBD spec is updated, so that max_block doesn't relate to Maybe: The NBD spec was recently updated to clarify that max_block... NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which mirrors Qemu flag BDRV_REQ_NO_FALLBACK). To drop the re

Re: [PATCH 0/7] via-ide: fixes and improvements

2020-03-13 Thread BALATON Zoltan
On Fri, 13 Mar 2020, John Snow wrote: On 3/13/20 4:24 AM, Mark Cave-Ayland wrote: Following on from the earlier thread "Implement "non 100% native mode" in via-ide", here is an updated patchset based upon the test cases sent to me off-list. The VIA IDE controller is similar to early versions of

Re: [PATCH v13 Kernel 7/7] vfio: Selective dirty page tracking if IOMMU backed device pins pages

2020-03-13 Thread Alex Williamson
On Thu, 12 Mar 2020 23:23:27 +0530 Kirti Wankhede wrote: > Added a check such that only singleton IOMMU groups can pin pages. > From the point when vendor driver pins any pages, consider IOMMU group > dirty page scope to be limited to pinned pages. > > To optimize to avoid walking list often, ad

Re: [PATCH v5 05/60] target/riscv: add vector stride load and store instructions

2020-03-13 Thread Alistair Francis
On Thu, Mar 12, 2020 at 8:09 AM LIU Zhiwei wrote: > > Vector strided operations access the first memory element at the base address, > and then access subsequent elements at address increments given by the byte > offset contained in the x register specified by rs2. > > Vector unit-stride operation

Re: [PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-03-13 Thread Brijesh Singh
On 3/13/20 7:44 AM, Halil Pasic wrote: > [..] >>> CCing Tom. @Tom does vhost-vsock work for you with SEV and current qemu? >>> >>> Also, one can specify iommu_platform=on on a device that ain't a part of >>> a secure-capable VM, just for the fun of it. And that breaks >>> vhost-vsock. Or is setti

[PATCH 6/9] qapi/misc: Restrict query-vm-generation-id command to machine code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 20 qapi/misc.json| 21 - hw/acpi/vmgenid.c | 2 +- stubs/vmgenid.c | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index c

Re: [PATCH v3 15/16] hw/i386/vmport: Add support for CMD_GETHZ

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/12/20 5:54 PM, Liran Alon wrote: This command returns to guest information on LAPIC bus frequency and TSC frequency. One can see how this interface is used by Linux vmware_platform_setup() introduced in Linux commit 88b094fb8d4f ("x86: Hypervisor detection and get tsc_freq from hypervisor")

Re: [PATCH v3 08/16] hw/i386/vmport: Define enum for all commands

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/13/20 8:59 PM, Philippe Mathieu-Daudé wrote: On 3/12/20 5:54 PM, Liran Alon wrote: No functional change. Defining an enum for all VMPort commands have the following advantages: * It gets rid of the error-prone requirement to update VMPORT_ENTRIES when new VMPort commands are added to QEMU.

Re: [PATCH 09/14] exec: Drop redundant #ifdeffery

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 11:38 AM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > exec.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/exec.c b/exec.c > index 7bc9828c5b..f258502966 100644 > --- a/exec.c > ++

Re: [PATCH 10/14] arch_init: Remove unused 'qapi-commands-misc.h' include

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 11:44 AM Philippe Mathieu-Daudé wrote: > > Commit ffaee83bcb2 moved qmp_query_target but forgot to remove > this include. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > arch_init.c | 1 - > 1 file changed, 1 deletion(-) > > di

Re: [PATCH 07/14] target/riscv/cpu: Restrict CPU migration to system-mode

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 11:39 AM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c >

Re: [PATCH v2 2/2] target/riscv: Add a sifive-e34 cpu type

2020-03-13 Thread Alistair Francis
On Fri, Mar 13, 2020 at 12:37 PM Corey Wharton wrote: > > The sifive-e34 cpu type is the same as the sifive-e31 with the > single precision floating-point extension enabled. > > Signed-off-by: Corey Wharton Reviewed-by: Alistair Francis Alistair > --- > v2: Added missing RVU flag > > target/

Re: [PATCH v3 08/16] hw/i386/vmport: Define enum for all commands

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/12/20 5:54 PM, Liran Alon wrote: No functional change. Defining an enum for all VMPort commands have the following advantages: * It gets rid of the error-prone requirement to update VMPORT_ENTRIES when new VMPort commands are added to QEMU. * It makes it clear to know by looking at one plac

Re: [PATCH v3 07/16] hw/i386/vmport: Introduce vmport.h

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/12/20 5:54 PM, Liran Alon wrote: No functional change. This is mere refactoring. Suggested-by: Michael S. Tsirkin Signed-off-by: Liran Alon --- hw/i386/pc.c | 1 + hw/i386/vmmouse.c| 1 + hw/i386/vmport.c | 1 + include/hw/i386/pc.h | 13 ---

Re: [PATCH v3 05/16] hw/i386/vmport: Introduce vmware-vmx-version property

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/12/20 5:54 PM, Liran Alon wrote: vmware-vmx-version is a number returned from CMD_GETVERSION which specifies to guest VMware Tools the the host VMX version. If the host reports a number that is different than what the guest VMware Tools expects, it may force guest to upgrade VMware Tools. (S

Re: [PATCH v3 02/16] hw/i386/vmport: Add device properties

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/12/20 5:54 PM, Liran Alon wrote: No functional change. This is done as a preparation for the following patches that will introduce several device properties. Reviewed-by: Nikita Leshenko Signed-off-by: Liran Alon --- hw/i386/vmport.c | 6 ++ 1 file changed, 6 insertions(+) diff -

  1   2   3   4   >