[PATCH] target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model

2020-03-15 Thread Xiaoyao Li
Current Icelake-Server CPU model lacks all the features enumerated by MSR_IA32_ARCH_CAPABILITIES. Add them, so that guest of "Icelake-Server" can see all of them. Signed-off-by: Xiaoyao Li --- target/i386/cpu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v5 40/60] target/riscv: vector floating-point merge instructions

2020-03-15 Thread Richard Henderson
On 3/15/20 8:41 PM, LIU Zhiwei wrote: > > > On 2020/3/15 6:47, Richard Henderson wrote: >> On 3/12/20 7:58 AM, LIU Zhiwei wrote: >>> + >>> +/* Vector Floating-Point Merge Instruction */ >>> +static bool opfvf_vfmerge_check(DisasContext *s, arg_rmrr *a) >>> +{ >>> +return

Re: [PATCH v5 22/60] target/riscv: vector integer merge and move instructions

2020-03-15 Thread Richard Henderson
On 3/15/20 7:57 PM, LIU Zhiwei wrote: >> You definitely want to use tcg_gen_gvec_mov (vv), tcg_gen_gvec_dup_i{32,64} >> (vx) and tcg_gen_gvec_dup{8,16,32,64}i (vi). > I have a question here. > > Are these GVEC IRs  proper for any vl, or just when vl equals vlmax? > I see there are some align

Re: [PATCH 05/13] target/rx: CPU definitions

2020-03-15 Thread Yoshinori Sato
On Mon, 16 Mar 2020 00:42:46 +0900, Philippe Mathieu-Daudé wrote: > > Hi Yoshinori, > > On 3/15/20 2:28 PM, Philippe Mathieu-Daudé wrote: > > From: Yoshinori Sato > > > > Reviewed-by: Richard Henderson > > Signed-off-by: Yoshinori Sato > > Signed-off-by: Richard Henderson > > [PMD: Use

[PATCH v2] migration/throttle: Add cpu-throttle-tailslow migration parameter

2020-03-15 Thread Keqian Zhu
At the tail stage of throttling, the Guest is very sensitive to CPU percentage while the @cpu-throttle-increment is excessive usually at tail stage. If this parameter is true, we will compute the ideal CPU percentage used by the Guest, which may exactly makes dirty rate to be dirty rate

[Bug 1866962] Re: [Regression]Powerpc kvm guest unable to start with hugepage backed memory

2020-03-15 Thread Satheesh Rajendran
** Summary changed: - Powerpc kvm guest unable to start with hugepage backed memory + [Regression]Powerpc kvm guest unable to start with hugepage backed memory -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [PATCH v5 40/60] target/riscv: vector floating-point merge instructions

2020-03-15 Thread LIU Zhiwei
On 2020/3/15 6:47, Richard Henderson wrote: On 3/12/20 7:58 AM, LIU Zhiwei wrote: + +/* Vector Floating-Point Merge Instruction */ +static bool opfvf_vfmerge_check(DisasContext *s, arg_rmrr *a) +{ +return (vext_check_isa_ill(s, RVV) && +vext_check_overlap_mask(s, a->rd, a->vm,

Re: [PATCH] target/ppc: Fix rlwinm on ppc64

2020-03-15 Thread David Gibson
On Wed, Mar 11, 2020 at 04:00:22PM +0300, Vitaly Chikunov wrote: > David, > > On Wed, Mar 11, 2020 at 10:15:03AM +1100, David Gibson wrote: > > On Mon, Mar 09, 2020 at 11:45:57PM +0300, Vitaly Chikunov wrote: > > > rlwinm cannot just AND with Mask if shift value is zero on ppc64 when > > > Mask

Re: Upstream QEMU guest support policy ? Re: [PATCH v3 0/2] spapr: Use vIOMMU translation for virtio by default

2020-03-15 Thread David Gibson
On Thu, Mar 12, 2020 at 02:32:11AM -0400, Michael S. Tsirkin wrote: > On Thu, Mar 12, 2020 at 12:10:49PM +1100, David Gibson wrote: > > On Wed, Mar 11, 2020 at 03:33:59AM -0400, Michael S. Tsirkin wrote: > > > On Wed, Mar 11, 2020 at 12:12:47PM +1100, David Gibson wrote: > > > > I am wondering if

Re: [PATCH 3/4] spapr: Rename DT functions to newer naming convention

2020-03-15 Thread David Gibson
On Fri, Mar 13, 2020 at 12:54:37PM +0100, Greg Kurz wrote: > On Fri, 13 Mar 2020 15:05:38 +1100 > David Gibson wrote: > > > In the spapr code we've been gradually moving towards a convention that > > functions which create pieces of the device tree are called spapr_dt_*(). > > This patch speeds

Re: [PATCH v5 22/60] target/riscv: vector integer merge and move instructions

2020-03-15 Thread LIU Zhiwei
On 2020/3/14 15:27, Richard Henderson wrote: On 3/12/20 7:58 AM, LIU Zhiwei wrote: +/* Vector Integer Merge and Move Instructions */ +static bool opivv_vmerge_check(DisasContext *s, arg_rmrr *a) +{ +return (vext_check_isa_ill(s, RVV) && +vext_check_overlap_mask(s, a->rd,

Re: [PATCH 4/4] spapr: Fold spapr_node0_size() into its only caller

2020-03-15 Thread David Gibson
On Fri, Mar 13, 2020 at 10:33:30AM +0100, Greg Kurz wrote: > On Fri, 13 Mar 2020 15:05:39 +1100 > David Gibson wrote: > > > The Real Mode Area (RMA) needs to fit within the NUMA node owning memory > > at address 0. That's usually node 0, but can be a later one if there are > > some nodes which

Re: [PATCH 1/4] spapr: Move creation of ibm, dynamic-reconfiguration-memory dt node

2020-03-15 Thread David Gibson
On Fri, Mar 13, 2020 at 12:30:51PM +0100, Greg Kurz wrote: > On Fri, 13 Mar 2020 15:05:36 +1100 > David Gibson wrote: > > > Currently this node with information about hotpluggable memory is created > > from spapr_dt_cas_updates(). But that's just a hangover from when we > > created it only as a

Re: [PATCH 2/4] spapr: Move creation of ibm,architecture-vec-5 property

2020-03-15 Thread David Gibson
On Fri, Mar 13, 2020 at 12:40:03PM +0100, Greg Kurz wrote: > On Fri, 13 Mar 2020 15:05:37 +1100 > David Gibson wrote: > > > This is currently called from spapr_dt_cas_updates() which is a hang over > > from when we created this only as a diff to the DT at CAS time. Now that > > we fully rebuild

Re: [PATCH qemu] spapr/rtas: Reserve space for RTAS blob and log

2020-03-15 Thread David Gibson
On Mon, Mar 16, 2020 at 12:18:41PM +1100, Alexey Kardashevskiy wrote: > At the moment SLOF reserves space for RTAS and instantiates the RTAS blob > which is 20 bytes binary blob calling an hypercall. The rest of the RTAS > area is a log which SLOF has no idea about but QEMU does. > > This moves

Re: [PATCH 1/1] target/ppc: fix ELFv2 signal handler endianness

2020-03-15 Thread David Gibson
On Sun, Mar 15, 2020 at 07:29:04PM -0500, Vincent Fazio wrote: > Laurent, > > On Sun, Mar 15, 2020 at 1:10 PM Laurent Vivier wrote: > > > > Le 15/03/2020 à 16:52, Vincent Fazio a écrit : > > > From: Vincent Fazio > > > > > > In ELFv2, function pointers are entry points and are in host

Re: [PATCH 0/2] Fix Cooperlake CPU model

2020-03-15 Thread Zhang, Cathy
On 1/7/2020 9:31 PM, Paolo Bonzini wrote: On 25/12/19 07:30, Xiaoyao Li wrote: Current Cooperlake CPU model lacks VMX features which are introduced by Paolo several months ago, and it also lacks 2 security features in MSR_IA32_ARCH_CAPABILITIES disclosed recently. Xiaoyao Li (2):

[PATCH qemu] spapr/rtas: Reserve space for RTAS blob and log

2020-03-15 Thread Alexey Kardashevskiy
At the moment SLOF reserves space for RTAS and instantiates the RTAS blob which is 20 bytes binary blob calling an hypercall. The rest of the RTAS area is a log which SLOF has no idea about but QEMU does. This moves RTAS sizing to QEMU and this overrides the size from SLOF. The only remaining

Re: [PATCH v2 00/12] user-mode: Prune build dependencies (part 1)

2020-03-15 Thread Aleksandar Markovic
On Monday, March 16, 2020, Philippe Mathieu-Daudé wrote: > This is the first part of a series reducing user-mode > dependencies. By stripping out unused code, the build > and testing time is reduced (as is space used by objects). > > Part 1: > - reduce user-mode object list > - remove some

[PATCH v2 8/9] hw/core: Add qdev stub for user-mode

2020-03-15 Thread Philippe Mathieu-Daudé
While user-mode does not use peripherals (devices), it uses a CPU which is a device. In the next commit we will reduce the QAPI generated code for user-mode. Since qdev.c calls qapi_event_send_device_deleted(), let's add a stub for it. Suggested-by: Paolo Bonzini Signed-off-by: Philippe

[PATCH v2 5/9] hw/core/qdev-properties: Export qdev_prop_enum

2020-03-15 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/qdev-properties.h | 1 + hw/core/qdev-properties.c| 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index f161604fb6..134753d595 100644

[PATCH v2 2/9] hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()

2020-03-15 Thread Philippe Mathieu-Daudé
Replace strtoul() by qemu_strtoul() so checkpatch.pl won't complain if we move this code later. Increase the slot and func local variables to unsigned long so that the range check isn't truncated. Remove the 'e == p' test which is done in check_strtox_error(), called by qemu_strtoul().

[PATCH v2 4/9] hw/core/qdev-properties: Export enum-related functions

2020-03-15 Thread Philippe Mathieu-Daudé
We are going to split this file and reuse these static functions. Add the local "qdev-prop-internal.h" header declaring them. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-prop-internal.h | 19 hw/core/qdev-properties.c| 58

Re: [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-03-15 Thread Aleksandar Markovic
On Monday, March 16, 2020, Aleksandar Markovic wrote: > > > On Monday, March 16, 2020, Philippe Mathieu-Daudé > wrote: > >> Move out x86-specific structures from generic machine code. >> >> > Philippe, > > I a kind of have hard time understanding what is achieved with this patch. > Is this pure

[PATCH v2 3/9] hw/core/qdev-properties: Fix code style

2020-03-15 Thread Philippe Mathieu-Daudé
We will soon move this code, fix its style to avoid checkpatch.pl to complain. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/core/qdev-properties.c

[PATCH v2 9/9] qapi: Restrict code generated for user-mode

2020-03-15 Thread Philippe Mathieu-Daudé
A lot of QAPI generated code is never used by user-mode. Rewrite the QAPI_COMMON_MODULES variable one entry per line, and split it in 3 groups: - always used - use by system-mode or tools - only used by system-mode Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé ---

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

2020-03-15 Thread Philippe Mathieu-Daudé
This is the second part of a series reducing user-mode dependencies. By stripping out unused code, the build and testing time is reduced (as is space used by objects). Part 3: - Extract code not related to user-mode from hw/core/qdev-properties.c - Reduce user-mode QAPI generated files Since v1:

[PATCH v2 8/8] qapi/misc: Restrict device memory commands to machine code

2020-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 131 +++ qapi/misc.json | 132 include/hw/mem/memory-device.h | 1 + include/hw/virtio/virtio-pmem.h | 2 +- 4 files changed, 133

[PATCH v2 1/9] hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

2020-03-15 Thread Philippe Mathieu-Daudé
The MACAddr structure contains an array of uint8_t. Previously if a value was out of the [0..255] range, it was silently casted and no input validation was done. Replace strtol() by qemu_strtol() -- so checkpatch.pl won't complain if we move this code later -- and return EINVAL if the input is

[PATCH v2 4/8] qapi/misc: Move query-uuid command with block code

2020-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/block-core.json | 30 ++ qapi/misc.json | 30 -- block/iscsi.c| 2 +- stubs/uuid.c | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git

[PATCH v2 7/8] qapi/misc: Restrict PCI commands to machine code

2020-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 304 ++ qapi/misc.json| 304 -- hw/pci/pci-stub.c | 2 +- hw/pci/pci.c | 2 +- 4 files changed, 306 insertions(+), 306 deletions(-)

[PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code

2020-03-15 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

[PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code

2020-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json| 32 qapi/misc.json | 32 include/hw/rtc/mc146818rtc.h | 2 +- hw/core/qdev-properties.c| 1 + hw/i386/kvm/i8254.c | 2 +- 5

[PATCH v2 6/8] qapi/misc: Restrict ACPI commands to machine code

2020-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json| 154 +++ qapi/misc.json | 154 --- include/hw/acpi/acpi_dev_interface.h | 2 +- hw/acpi/core.c | 2 +- hw/acpi/cpu.c

Re: [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-03-15 Thread Aleksandar Markovic
On Monday, March 16, 2020, Philippe Mathieu-Daudé wrote: > Move out x86-specific structures from generic machine code. > > Philippe, I a kind of have hard time understanding what is achieved with this patch. Is this pure code moving/reorganization? What is the logical connection between this

[PATCH v2 3/8] qapi/misc: Restrict balloon-related commands to machine code

2020-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 83 ++ qapi/misc.json | 83 -- include/sysemu/balloon.h | 2 +- balloon.c | 2 +- hw/virtio/virtio-balloon.c | 2 +-

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

2020-03-15 Thread Philippe Mathieu-Daudé
This is the second part of a series reducing user-mode dependencies. By stripping out unused code, the build and testing time is reduced (as is space used by objects). Part 2: - Extract code not related to user-mode from qapi/misc.json Since v1: - Do not extract the 'add_client' command

[PATCH v2 11/12] target/s390x: Restrict CpuClass::get_crash_info() to system-mode

2020-03-15 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/cpu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 3dd396e870..3b1377c20a 100644 --- a/target/s390x/cpu.c +++

[PATCH v2 7/9] hw/core/qdev-properties: Extract system-mode specific properties

2020-03-15 Thread Philippe Mathieu-Daudé
Move properties specific to machines into a separate file. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties-system.c | 602 ++- hw/core/qdev-properties.c| 590 -- 2 files changed,

[PATCH v2 10/12] target/i386: Restrict CpuClass::get_crash_info() to system-mode

2020-03-15 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 92fafa2659..a84553e50c 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@

[PATCH v2 09/12] arch_init: Remove unused 'qapi-commands-misc.h' include

2020-03-15 Thread Philippe Mathieu-Daudé
Commit ffaee83bcb2 moved qmp_query_target but forgot to remove this include. Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- arch_init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index

[PATCH v2 6/9] hw/core/qdev-properties: Export some integer-related functions

2020-03-15 Thread Philippe Mathieu-Daudé
We are going to split this file and reuse these static functions. Declare them in the local "qdev-prop-internal.h" header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-prop-internal.h | 9 hw/core/qdev-properties.c| 42

[PATCH v2 08/12] exec: Assert CPU migration is not used on user-only build

2020-03-15 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 0cc500d53a..7bc9828c5b 100644 --- a/exec.c +++ b/exec.c @@ -946,7 +946,9 @@ void cpu_exec_realizefn(CPUState *cpu, Error

[PATCH v2 02/12] configure: Avoid building TCG when not needed

2020-03-15 Thread Philippe Mathieu-Daudé
Avoid building TCG when building only tools: ./configure --enable-tools --disable-system --disable-user This saves us from running the soft-float tests enabled since commit 76170102508. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- configure | 4 1 file

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

2020-03-15 Thread Philippe Mathieu-Daudé
Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/cpu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index c0b7023100..b59e09209e 100644 ---

[PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-03-15 Thread Philippe Mathieu-Daudé
Move out x86-specific structures from generic machine code. Acked-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine-target.json | 45 ++ qapi/machine.json | 42 --- target/i386/cpu.c

[PATCH v2 05/12] util/Makefile: Reduce the user-mode object list

2020-03-15 Thread Philippe Mathieu-Daudé
These objects are not required when configured with --disable-system. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- util/Makefile.objs | 59 +- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git

[PATCH v2 06/12] stubs/Makefile: Reduce the user-mode object list

2020-03-15 Thread Philippe Mathieu-Daudé
These stubs are not required when configured with --disable-system. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- stubs/Makefile.objs | 52 ++--- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git

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

2020-03-15 Thread Philippe Mathieu-Daudé
Do not build the virtiofsd helper when configured with --disable-system. Signed-off-by: Philippe Mathieu-Daudé --- v2: Use single line with ifeq='' (lvivier, rth) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index

[PATCH v2 12/12] hw/core: Restrict CpuClass::get_crash_info() to system-mode

2020-03-15 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 7 ++- hw/core/cpu.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 73e9a869a4..48ab5ec3ed 100644 ---

[PATCH v2 04/12] tests/Makefile: Restrict some softmmu-only tests

2020-03-15 Thread Philippe Mathieu-Daudé
In the next commit we are going to remove some objects from the util-obj-y variable (objects which are not used by user-mode, when configured with --disable-system). Then some system-mode tests are going to fail, due to the missing objects: $ make check-unit -k LINKtests/test-iov

[PATCH v2 03/12] tests/Makefile: Only display TCG-related tests when TCG is available

2020-03-15 Thread Philippe Mathieu-Daudé
Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index 67e8fcddda..99db5eb3e0 100644 --- a/tests/Makefile.include

[PATCH v2 00/12] user-mode: Prune build dependencies (part 1)

2020-03-15 Thread Philippe Mathieu-Daudé
This is the first part of a series reducing user-mode dependencies. By stripping out unused code, the build and testing time is reduced (as is space used by objects). Part 1: - reduce user-mode object list - remove some migration code from user-mode - remove cpu_get_crash_info() Since v1: -

[Bug 1867072] Re: ARM: tag bits cleared in FAR_EL1

2020-03-15 Thread Richard Henderson
Fix now in master. ** Changed in: qemu Status: In Progress => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1867072 Title: ARM: tag bits cleared in FAR_EL1 Status in QEMU:

Re: [PATCH 8/9] hw/core: Add qdev stub for user-mode

2020-03-15 Thread Philippe Mathieu-Daudé
On 3/14/20 11:57 AM, Paolo Bonzini wrote: On 14/03/20 11:49, Philippe Mathieu-Daudé wrote: diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index 6215e7c208..89bf247173 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -8,6 +8,7 @@ common-obj-y += vmstate-if.o   #

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

2020-03-15 Thread Richard Henderson
On 3/15/20 4:23 PM, LIU Zhiwei wrote: > Many other fixed point instructions also need vxsat besides vxsrm. Ah yes. > In that cases, can I just define OPIVV2_RM like this: > > #define OPIVV2_RM(NAME, TD, T1, T2, TX1, TX2, HD, HS1, HS2, OP) \ > static inline void

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

2020-03-15 Thread LIU Zhiwei
On 2020/3/15 9:00, Richard Henderson wrote: On 3/14/20 4:12 PM, LIU Zhiwei wrote: I am not sure whether I get it. In my opinion, the code should be modified like static inline int8_t aadd8_rnu(CPURISCVState *env, int8_t a, int8_t b) {     int16_t res = (int16_t)a + (int16_t)b;     uint8_t

Re: [PATCH v2 4/4] linux-user, openrisc: sync syscall numbers with kernel v5.5

2020-03-15 Thread Richard Henderson
On 3/14/20 4:39 AM, Laurent Vivier wrote: > Use helper script scripts/gensyscalls.sh to generate the file. > > Add TARGET_NR_or1k_atomic > Remove useless comments and blank lines. > Define diretly the __NR_XXX64 syscalls rather than using the > intermediate __NR3264 definition. > > Remove wrong

Re: [PATCH v2 1/4] scripts: add a script to generate syscall_nr.h

2020-03-15 Thread Richard Henderson
On 3/14/20 4:39 AM, Laurent Vivier wrote: > +qemu_arch() > +{ > +case "$1" in > +arm64) > +echo "aarch64" > +;; > +*) > +upper "$1" > +;; > +esac > +} I think you can drop the upper here. That distinction is confusing. Anyway, it's only use

Re: [PATCH v2 2/4] linux-user, aarch64: sync syscall numbers with kernel v5.5

2020-03-15 Thread Richard Henderson
On 3/14/20 4:39 AM, Laurent Vivier wrote: > Use helper script scripts/gensyscalls.sh to generate the file. > > This change TARGET_NR_fstatat64 by TARGET_NR_newfstatat that is correct > because definitions from linux are: > > arch/arm64/include/uapi/asm/unistd.h > > #define

Re: [PATCH 05/13] target/rx: CPU definitions

2020-03-15 Thread Richard Henderson
On 3/15/20 6:28 AM, Philippe Mathieu-Daudé wrote: > +#define MMU_MODE0_SUFFIX _all These have been removed. r~

Re: [PATCH 9/9] qapi: Restrict code generated for user-mode

2020-03-15 Thread Richard Henderson
On 3/13/20 11:46 AM, Philippe Mathieu-Daudé wrote: > A lot of QAPI generated code is never used by user-mode. > > Rewrite the QAPI_COMMON_MODULES variable one entry per line, > and split it in 3 groups: > - always used > - use by system-mode or tools > - only used by system-mode > >

Re: [PATCH 6/9] hw/core/qdev-properties: Export some integer-related functions

2020-03-15 Thread Richard Henderson
On 3/13/20 11:46 AM, Philippe Mathieu-Daudé wrote: > We are going to split this file and reuse these static functions. > Declare them in the local "qdev-prop-internal.h" header. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/qdev-prop-internal.h | 9 >

Re: [PATCH 4/9] hw/core/qdev-properties: Export enum-related functions

2020-03-15 Thread Richard Henderson
On 3/13/20 11:46 AM, Philippe Mathieu-Daudé wrote: > We are going to split this file and reuse these static functions. > Add the local "qdev-prop-internal.h" header declaring them. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/qdev-prop-internal.h | 19 >

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

2020-03-15 Thread Richard Henderson
On 3/15/20 3:16 PM, Philippe Mathieu-Daudé wrote: > On 3/15/20 8:40 PM, Richard Henderson wrote: >> On 3/13/20 3:28 PM, Laurent Vivier wrote:   ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) -HELPERS-y += virtiofsd$(EXESUF) -vhost-user-json-y +=

Re: [PATCH 1/9] hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

2020-03-15 Thread Philippe Mathieu-Daudé
On 3/15/20 10:25 PM, Richard Henderson wrote: On 3/13/20 11:45 AM, Philippe Mathieu-Daudé wrote: +if (qemu_strtol(str + pos, , 16, ) < 0 || val > 0xff) { +goto inval; +} This is doing more that *just* using qemu_strtol, it's also validating the input. I don't

Re: [PATCH 7/9] hw/core/qdev-properties: Extract system-mode specific properties

2020-03-15 Thread Richard Henderson
On 3/13/20 11:46 AM, Philippe Mathieu-Daudé wrote: > Move properties specific to machines into a separate file. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/qdev-properties-system.c | 602 ++- > hw/core/qdev-properties.c| 590

Re: [PATCH 3/9] hw/core/qdev-properties: Fix code style

2020-03-15 Thread Richard Henderson
On 3/13/20 11:46 AM, Philippe Mathieu-Daudé wrote: > We will soon move this code, fix its style to avoid checkpatch.pl > to complain. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/qdev-properties.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by:

Re: [PATCH 5/9] hw/core/qdev-properties: Export qdev_prop_enum

2020-03-15 Thread Richard Henderson
On 3/13/20 11:46 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/qdev-properties.h | 1 + > hw/core/qdev-properties.c| 7 +++ > 2 files changed, 8 insertions(+) Reviewed-by: Richard Henderson r~

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

2020-03-15 Thread Philippe Mathieu-Daudé
On 3/15/20 9:39 PM, Richard Henderson wrote: On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- exec.c | 4 1 file changed, 4 deletions(-) diff --git a/exec.c b/exec.c index 7bc9828c5b..f258502966 100644 --- a/exec.c +++ b/exec.c @@ -185,10

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

2020-03-15 Thread Philippe Mathieu-Daudé
On 3/15/20 8:40 PM, Richard Henderson wrote: On 3/13/20 3:28 PM, Laurent Vivier wrote: ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) -HELPERS-y += virtiofsd$(EXESUF) -vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json +HELPERS-$(CONFIG_SOFTMMU) += virtiofsd$(EXESUF)

Re: [PATCH 2/9] hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()

2020-03-15 Thread Richard Henderson
On 3/13/20 11:46 AM, Philippe Mathieu-Daudé wrote: > Replace strtoul() by qemu_strtoul() so checkpatch.pl won't complain > if we move this code later. ... > p = str; > -val = strtoul(p, , 16); > -if (e == p || *e != ':') { > +if (qemu_strtoul(p, , 16, ) < 0 || val > 0x || e

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

2020-03-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200313184607.11792-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

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

2020-03-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200313184607.11792-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 v2 2/2] mmap-alloc: Include osdep.h before checking CONFIG_LINUX

2020-03-15 Thread Michael S. Tsirkin
On Sun, Mar 15, 2020 at 11:45:59AM -0400, Eduardo Habkost wrote: > On Wed, Mar 11, 2020 at 07:23:42PM -0400, Eduardo Habkost wrote: > > The CONFIG_LINUX check at the top of mmap-alloc.c never worked > > because it was done before including osdep.h. > > > > This means MAP_SYNC and

Re: [PATCH 1/9] hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

2020-03-15 Thread Richard Henderson
On 3/13/20 11:45 AM, Philippe Mathieu-Daudé wrote: > +if (qemu_strtol(str + pos, , 16, ) < 0 || val > 0xff) { > +goto inval; > +} This is doing more that *just* using qemu_strtol, it's also validating the input. I don't think you need to adjust the patch, just improve

Re: [PATCH 14/14] hw/core: Restrict CpuClass::get_crash_info() to system-mode

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/core/cpu.h | 7 ++- > hw/core/cpu.c | 2 ++ > 2 files changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 0/2] Fix MAP_SYNC support when host has older glibc version

2020-03-15 Thread Michael S. Tsirkin
On Sun, Mar 15, 2020 at 11:46:04AM -0400, Eduardo Habkost wrote: > On Sat, Mar 14, 2020 at 10:39:11AM +0100, Paolo Bonzini wrote: > > On 12/03/20 00:23, Eduardo Habkost wrote: > > > Changes v1 -> v2: > > > * Use -isystem for $PWD/linux-headers too > > > Reported-by: "Michael S. Tsirkin" > > >

Re: [PATCH 1/9] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-03-15 Thread Richard Henderson
On 3/13/20 11:41 AM, Philippe Mathieu-Daudé wrote: > Move out x86-specific structures from generic machine code. > > Signed-off-by: Philippe Mathieu-Daudé > --- > qapi/machine-target.json | 45 ++ > qapi/machine.json | 42

[PATCH v2] target/arm: Use tcg_gen_gvec_5_ptr for sve FMLA/FCMLA

2020-03-15 Thread Richard Henderson
Now that we can pass 7 parameters, do not encode register operands within simd_data. Reviewed-by: Alex Bennée Reviewed-by: Taylor Simpson Signed-off-by: Richard Henderson --- v2: Remove gen_helper_sve_fmla typedef (phil). --- target/arm/helper-sve.h| 45 +++

Re: [PATCH 13/14] target/s390x: Restrict CpuClass::get_crash_info() to system-mode

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/s390x/cpu.c | 12 +--- > 1 file changed, 5 insertions(+), 7 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 12/14] target/i386: Restrict CpuClass::get_crash_info() to system-mode

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/cpu.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

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

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > exec.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/exec.c b/exec.c > index 7bc9828c5b..f258502966 100644 > --- a/exec.c > +++ b/exec.c > @@ -185,10 +185,6 @@ struct

Re: [PATCH 11/14] target: Restrict write_elfXX_note() handlers to system-mode

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/arm/cpu.h| 10 +- > target/i386/cpu.h | 18 +- > target/ppc/cpu.h| 2 -- > target/s390x/internal.h | 3 ++- >

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

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Commit ffaee83bcb2 moved qmp_query_target but forgot to remove > this include. > > Signed-off-by: Philippe Mathieu-Daudé > --- > arch_init.c | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 08/14] exec: Assert CPU migration is not used on user-only build

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > exec.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

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

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/riscv/cpu.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 06/14] util/Makefile: Reduce the user-mode object list

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > These stubs are not required when configured with --disable-system. > > Signed-off-by: Philippe Mathieu-Daudé > --- > util/Makefile.objs | 59 +- > 1 file changed, 38 insertions(+), 21 deletions(-)

Re: [PATCH 05/14] stubs/Makefile: Reduce the user-mode object list

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > These stubs are not required when configured with --disable-system. > > Signed-off-by: Philippe Mathieu-Daudé > --- > stubs/Makefile.objs | 52 ++--- > 1 file changed, 30 insertions(+), 22 deletions(-)

Re: [PATCH 04/14] tests/Makefile: Restrict some softmmu-only tests

2020-03-15 Thread Richard Henderson
On 3/15/20 1:07 PM, Richard Henderson wrote: > On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: >> These tests fails when configured with --disable-system. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> tests/Makefile.include | 16 >> 1 file changed, 8 insertions(+), 8

Re: [PATCH 04/14] tests/Makefile: Restrict some softmmu-only tests

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > These tests fails when configured with --disable-system. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/Makefile.include | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) So... they don't currently fail

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

2020-03-15 Thread Richard Henderson
On 3/13/20 3:28 PM, Laurent Vivier wrote: >> ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) >> -HELPERS-y += virtiofsd$(EXESUF) >> -vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json >> +HELPERS-$(CONFIG_SOFTMMU) += virtiofsd$(EXESUF) >> +vhost-user-json-$(CONFIG_SOFTMMU)

Re: [PATCH 03/14] tests/Makefile: Only display TCG-related tests when TCG is available

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/Makefile.include | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH] tcg/i386: Bound shift count expanding sari_vec

2020-03-15 Thread Richard Henderson
Ping. On 3/10/20 10:21 PM, Richard Henderson wrote: > A given RISU testcase for SVE can produce > > tcg-op-vec.c:511: do_shifti: Assertion `i >= 0 && i < (8 << vece)' failed. > > because expand_vec_sari gave a shift count of 32 to a MO_32 > vector shift. > > In 44f1441dbe1, we changed from

Re: [PATCH 02/14] configure: Avoid building TCG when not needed

2020-03-15 Thread Richard Henderson
On 3/13/20 11:36 AM, Philippe Mathieu-Daudé wrote: > Avoid building TCG when building only tools: > > ./configure --enable-tools --disable-system --disable-user > > This saves us from running the soft-float tests enabled since > commit 76170102508. > > Signed-off-by: Philippe Mathieu-Daudé >

Re: [PATCH] target/rx/cpu: Use address_space_ldl() to read reset vector address

2020-03-15 Thread Richard Henderson
On 3/15/20 6:48 AM, Philippe Mathieu-Daudé wrote: > From: Philippe Mathieu-Daudé > > The RX code flash is not a Masked ROM but a EEPROM (electrically > erasable programmable flash memory). > When implementing the flash hardware, the rom_ptr() returns NULL > and the reset vector is not set. >

Re: [PATCH v3 2/2] target/arm: kvm: Handle DABT with no valid ISS

2020-03-15 Thread Beata Michalska
On Thu, 12 Mar 2020 at 10:25, Andrew Jones wrote: > > On Thu, Mar 12, 2020 at 12:34:01AM +, Beata Michalska wrote: > > On ARMv7 & ARMv8 some load/store instructions might trigger a data abort > > exception with no valid ISS info to be decoded. The lack of decode info > > makes it at least

Re: [PATCH v3 1/2] target/arm: kvm: Inject events at the last stage of sync

2020-03-15 Thread Beata Michalska
On Thu, 12 Mar 2020 at 16:33, Peter Maydell wrote: > > On Thu, 12 Mar 2020 at 00:34, Beata Michalska > wrote: > > > > KVM_SET_VCPU_EVENTS might actually lead to vcpu registers being modified. > > As such this should be the last step of sync to avoid potential overwriting > > of whatever changes

Re: [PATCH 1/1] target/ppc: fix ELFv2 signal handler endianness

2020-03-15 Thread Laurent Vivier
Le 15/03/2020 à 16:52, Vincent Fazio a écrit : > From: Vincent Fazio > > In ELFv2, function pointers are entry points and are in host endianness. "host endianness" is misleading here. "target endianness" is better. > > Previously, the signal handler would be swapped if the target CPU was a >

Re: [PATCH v4 2/3] mac_via: fix incorrect creation of mos6522 device in mac_via

2020-03-15 Thread Paolo Bonzini
On 15/03/20 15:56, Markus Armbruster wrote: >> >> The question is why they are not, i.e. where does the above reasoning break. > I don't know. But let's for the sake of the argument assume this > actually worked. Asking for help in the monitor then *still* has side > effects visible in the time

  1   2   >