[Qemu-devel] [PATCH] hw: edu: drop DO_UPCAST

2018-10-12 Thread Li Qiang
Signed-off-by: Li Qiang --- hw/misc/edu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index 0687ffd343..cdcf550dd7 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -342,7 +342,7 @@ static void *edu_fact_thread(void *opaque) static

[Qemu-devel] [RFC] Require Python 3 for building QEMU

2018-10-12 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- I'd like to do this in QEMU 3.1. I think it's time to drop support for old systems that have only Python 2. We still have a few scripts that are not required for building QEMU that still work only with Python 2 (iotests being the most relevant set). Requiring

[Qemu-devel] [PATCH v2 1/2] libnvdimm: nd_region flush callback support

2018-10-12 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host

[Qemu-devel] [PATCH v2 2/2] virtio-pmem: Add virtio pmem driver

2018-10-12 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into

[Qemu-devel] [PATCH v2 0/2] kvm "fake DAX" device

2018-10-12 Thread Pankaj Gupta
This patch series has implementation for "fake DAX". "fake DAX" is fake persistent memory(nvdimm) in guest which allows to bypass the guest page cache. This also implements a VIRTIO based asynchronous flush mechanism. Sharing guest kernel driver in this patchset with the changes

Re: [Qemu-devel] [PATCH 1/1] i386: Add new model of Cascadelake-Server

2018-10-12 Thread Eduardo Habkost
On Wed, Sep 19, 2018 at 11:11:22AM +0800, Tao Xu wrote: > New CPU models mostly inherit features from ancestor Skylake-Server, > while addin new features: AVX512_VNNI, Intel PT. > SSBD support for speculative execution > side channel mitigations. Comparing to Skylake-Server, the following

Re: [Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-12 Thread Eduardo Habkost
On Fri, Oct 12, 2018 at 11:30:39PM +0200, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > On 12/10/2018 18:53, Cleber Rosa wrote: > > A number of QEMU tests are written in Python, and may benefit > > from an untainted Python venv. > > > > By using make rules, tests that depend on specific Python

[Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-12 Thread Eduardo Habkost
The current virtio-*-pci device types actually represent 3 different types of devices: * virtio 1.0 non-transitional devices * virtio 1.0 transitional devices * virtio 0.9 ("legacy device" in virtio 1.0 terminology) That would be just an annoyance if it didn't break our device/bus compatibility

[Qemu-devel] [PATCH v3 7/8] tests/vm: Do not use -enable-kvm if HOST != TARGET architecture

2018-10-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index b2e0de2022..9f4794898a 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -74,7 +74,7 @@ class BaseVM(object):

[Qemu-devel] [PATCH v3 5/8] tests/vm: Add a BaseVM::arch property

2018-10-12 Thread Philippe Mathieu-Daudé
The 'arch' property gives a hint on which architecture the guest image runs. This can be use to select the correct QEMU binary path. Signed-off-by: Philippe Mathieu-Daudé --- tests/vm/basevm.py | 4 +++- tests/vm/centos | 1 + tests/vm/freebsd | 1 + tests/vm/netbsd | 1 +

[Qemu-devel] [PATCH v3 4/8] tests/vm: Display remaining seconds to wait for a VM to start

2018-10-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/vm/basevm.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 9415e7c33a..81a1cb05dd 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -177,11 +177,14 @@ class

[Qemu-devel] [PATCH v3 3/8] tests/vm: Do not use the -smp option with a single cpu

2018-10-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 2bd32dc6ce..9415e7c33a 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -70,7 +70,7 @@ class BaseVM(object):

[Qemu-devel] [PATCH v3 8/8] tests/vm: Do not abuse parallelism when HOST != TARGET architecture

2018-10-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/vm/basevm.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 9f4794898a..5caf77d6b8 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -200,10 +200,10 @@ class

[Qemu-devel] [PATCH v3 1/8] tests/vm: Extract the kvm_available() handy function

2018-10-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- scripts/qemu.py| 4 tests/vm/basevm.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index f099ce7278..9fc0be4828 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -26,6 +26,10 @@

[Qemu-devel] [PATCH v3 6/8] tests/vm: Let kvm_available() work in cross environments

2018-10-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- scripts/qemu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 9fc0be4828..bcd24aad82 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -27,6 +27,8 @@ LOG = logging.getLogger(__name__) def

[Qemu-devel] [PATCH v3 2/8] tests/vm: Do not abuse parallelism when KVM is not available

2018-10-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- v3: Use default args.jobs v2: Add get_default_jobs (Fam suggestion) --- tests/vm/basevm.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 834bc90cc1..2bd32dc6ce 100755 ---

[Qemu-devel] [PATCH v3 0/8] tests/vm: Improvements when KVM is not available

2018-10-12 Thread Philippe Mathieu-Daudé
Hi Fam, Few patches I added while testing the VM tests without KVM access. I doubt many people want to suffer using TCG for VM testing, but it was handy to debug/support aarch64 VM tests. Also this could be a useful TCG stress test...? Since v2:

[Qemu-devel] [PATCH] tests/vm: Use subprocess.Popen() with to uncompress XZ files

2018-10-12 Thread Philippe Mathieu-Daudé
Avoiding the file copy greatly speeds the process up. Comparison with network file already cached, stopping after build_image(): Before: $ time make vm-build-freebsd real1m38.153s user1m16.871s sys 0m19.325s After: $ time make vm-build-freebsd real0m13.512s user

[Qemu-devel] [RFC PATCH v1 8/8] multi-process QEMU: synchronize RAM between QEMU & remote device

2018-10-12 Thread Jagannathan Raman
- Setup MemoryListener in QEMU to get all updates to sysmem, and forward all RAM updates to remote device process - Remote device process updates its "system_memory" container using shared file descriptors provided by SYNC_SYSMEM message Signed-off-by: Jagannathan Raman --- hw/qemu-proxy.c

[Qemu-devel] [RFC PATCH v1 2/8] multi-process QEMU: define proxy-link object

2018-10-12 Thread Jagannathan Raman
- Define proxy-link object which forms the communication link between QEMU & emulation program. - Add functions to configure members of proxy-link object instance. - Add functions to send and receive messages over the communication channel. - Add GMainLoop to handle events received on the

[Qemu-devel] [RFC PATCH v1 5/8] multi-process QEMU: setup memory manager for remote device

2018-10-12 Thread Jagannathan Raman
- sync_sysmem_msg_t message format is defined. It is used to send file descriptors of the RAM regions to remote device - RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by:

[Qemu-devel] [RFC PATCH v1 0/8] multi-process QEMU

2018-10-12 Thread Jagannathan Raman
Hi The multi-process QEMU project proposal written by John Johnson is copied below. This patchset implements part of the proposal. The goal is to run emulated devices as standalone processes. To begin with, we've chosen to run lsi53c895a as a standalone process /remote device, based on the

[Qemu-devel] [RFC PATCH v1 7/8] multi-process QEMU: introduce proxy object

2018-10-12 Thread Jagannathan Raman
From: Elena Ufimtseva Define PCI Device proxy object as a parent of TYPE_PCI_DEVICE. PCI Proxy Object will register PCI BARs, MemoryRegionOps to handle access to the BARs and forward those to the remote device. PCI Proxy object intercepts config space reads and writes. In case of pci config

[Qemu-devel] [RFC PATCH v1 6/8] multi-process QEMU: remote process initialization

2018-10-12 Thread Jagannathan Raman
Initialize remote process main loop and add the message handling logic. Handle SYNC_SYSMEM message by updating its "system_memory" container using shared file descriptors received from QEMU. Signed-off-by: Jagannathan Raman --- hw/scsi/qemu-scsi-dev.c | 71

[Qemu-devel] [RFC PATCH v1 3/8] multi-process QEMU: setup PCI host bridge for remote device

2018-10-12 Thread Jagannathan Raman
- PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. - remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by: Jagannathan

[Qemu-devel] [RFC PATCH v1 4/8] multi-process QEMU: setup a machine for remote device process

2018-10-12 Thread Jagannathan Raman
- remote-machine object sets up various subsystems of the remote device process. - PCI host bridge is instantiated - RAM, IO & PCI memory regions are initialized Signed-off-by: Jagannathan Raman --- exec.c| 3 +- hw/scsi/qemu-scsi-dev.c | 9 +

[Qemu-devel] [RFC PATCH v1 1/8] multi-process QEMU: build system for remote device process

2018-10-12 Thread Jagannathan Raman
- Makefile changes necessary to support the building of the remote device process is added - functions that are necessary to compile the code, but are not needed at run-time are stubbed out - main() function of remote SCSI device process is implemented Signed-off-by: Jagannathan Raman ---

Re: [Qemu-devel] [PATCH v4 3/3] Travis support for the acceptance tests

2018-10-12 Thread Philippe Mathieu-Daudé
Hi Cleber, On 12/10/2018 18:53, Cleber Rosa wrote: > This enables the execution of the acceptance tests on Travis. > > Because the Travis environment is based on Ubuntu Trusty, it requires > the python3-pip and python3.4-venv packages. > > Signed-off-by: Cleber Rosa > --- > .travis.yml | 5

Re: [Qemu-devel] [PATCH v4 0/3] Bootstrap Python venv and acceptance/functional tests

2018-10-12 Thread Philippe Mathieu-Daudé
On 12/10/2018 18:53, Cleber Rosa wrote: > TL;DR > = > > Allow acceptance tests to be run with `make check-acceptance`. > > Details > === > > This introduces a Python virtual environment that will be setup within > the QEMU build directory, that will contain the exact environment that >

Re: [Qemu-devel] [PATCH v4 2/3] Acceptance tests: add make rule for running them

2018-10-12 Thread Philippe Mathieu-Daudé
On 12/10/2018 18:53, Cleber Rosa wrote: > The acceptance (aka functional, aka Avocado-based) tests are > Python files located in "tests/acceptance" that need to be run > with the Avocado libs and test runner. > > Let's provide a convenient way for QEMU developers to run them, > by making use of

Re: [Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-12 Thread Philippe Mathieu-Daudé
Hi Cleber, On 12/10/2018 18:53, Cleber Rosa wrote: > A number of QEMU tests are written in Python, and may benefit > from an untainted Python venv. > > By using make rules, tests that depend on specific Python libs > can set that rule as a requirement, along with rules that require > the

Re: [Qemu-devel] [PATCH 05/28] target/riscv: Convert RVXI fence insns to decodetree

2018-10-12 Thread Richard Henderson
On 10/12/18 10:30 AM, Bastian Koppelmann wrote: > +%pred 24:4 > +%succ 20:4 ... > +@noargs ... > +@fence . ... . ... %pred %succ ... > +fence 0 000 0 000 @fence > +fence_i 0

Re: [Qemu-devel] [PATCH v3 2/3] linux-user: Define ordinary usbfs ioctls.

2018-10-12 Thread Laurent Vivier
On 08/10/2018 18:35, Cortland Tölva wrote: > Provide ioctl definitions for the generic thunk mechanism to > convert most usbfs calls. Calculate arg size at runtime. > > Signed-off-by: Cortland Tölva > --- > Changes from v1: > move some type definitions to patch 3/3 > Changes from v2: >

[Qemu-devel] [PATCH v4 0/3] Dynamic TLB sizing

2018-10-12 Thread Emilio G. Cota
RFC v3: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg01753.html Changes since RFC v3: - This is now a proper patch series, since it should not (knowingly) break anything. - Rebase on top of rth's tcg-next (ffd8994b90f5), which includes patch 1 from RFC v3. - Make the feature

[Qemu-devel] [PATCH v4 3/3] tcg/i386: enable dynamic TLB sizing

2018-10-12 Thread Emilio G. Cota
As the following experiments show, this a net perf gain, particularly for memory-heavy workloads. Experiments are run on an Intel i7-6700K CPU @ 4.00GHz. 1. System boot + shudown, debian aarch64: - Before (tb-lock-v3): Performance counter stats for 'taskset -c 0 ../img/aarch64/die.sh' (10

[Qemu-devel] [PATCH v4 1/3] cputlb: do not evict empty entries to the vtlb

2018-10-12 Thread Emilio G. Cota
Currently we evict an entry to the victim TLB when it doesn't match the current address. But it could be that there's no match because the current entry is empty (i.e. all -1's, for instance via tlb_flush). Do not evict the entry to the vtlb in that case. This change will help us keep track of

[Qemu-devel] [PATCH v4 2/3] tcg: introduce dynamic TLB sizing

2018-10-12 Thread Emilio G. Cota
Disable for all TCG backends for now. Signed-off-by: Emilio G. Cota --- include/exec/cpu-defs.h | 43 +++- include/exec/cpu_ldst.h | 21 ++ tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h| 1 + tcg/mips/tcg-target.h| 1 +

Re: [Qemu-devel] [PATCH] linux-user: Fix crashes in ioctl(SIOCGIFCONF) when ifc_buf is NULL.

2018-10-12 Thread Laurent Vivier
On 09/10/2018 09:45, Kan Li wrote: > Summary: > This is to fix bug https://bugs.launchpad.net/qemu/+bug/1796754. > It is valid for ifc_buf to be NULL according to > http://man7.org/linux/man-pages/man7/netdevice.7.html. > > Signed-off-by: Kan Li > --- > linux-user/syscall.c | 56

Re: [Qemu-devel] [PATCH] linux-user: Fix crashes in ioctl(SIOCGIFCONF) when ifc_buf is NULL.

2018-10-12 Thread Laurent Vivier
On 09/10/2018 09:45, Kan Li wrote: > Summary: > This is to fix bug https://bugs.launchpad.net/qemu/+bug/1796754. > It is valid for ifc_buf to be NULL according to > http://man7.org/linux/man-pages/man7/netdevice.7.html. > > Signed-off-by: Kan Li > --- > linux-user/syscall.c | 56

Re: [Qemu-devel] [PATCH 04/28] target/riscv: Convert RVXI arithmetic insns to decodetree

2018-10-12 Thread Richard Henderson
On 10/12/18 10:30 AM, Bastian Koppelmann wrote: > +static bool trans_andi(DisasContext *ctx, arg_andi *a, uint32_t insn) > +{ > +gen_arith_imm(ctx, OPC_RISC_ANDI, a->rd, a->rs1, a->imm); > +return true; > +} > +static bool trans_slli(DisasContext *ctx, arg_slli *a, uint32_t insn) > +{ > +

Re: [Qemu-devel] [PATCH v5 21/28] target/mips: Add opcodes for nanoMIPS EVA instructions

2018-10-12 Thread Aleksandar Markovic
> Subject: [PATCH v5 21/28] target/mips: Add opcodes for nanoMIPS EVA > instructions > > From: Dimitrije Nikolic > > Add opcodes for nanoMIPS EVA instructions: CACHEE, LBE, LBUE, LHE, LHUE, LLE, LLWPE, LWE, PREFE, SBE, SCE, SCWPE, SHE, SWE. > > Signed-off-by: Dimitrije Nikolic > Signed-off-by:

Re: [Qemu-devel] [PATCH v5 22/28] target/mips: Add CP0 Config2 to DisasContext

2018-10-12 Thread Aleksandar Markovic
> Subject: [PATCH v5 22/28] target/mips: Add CP0 Config2 to DisasContext > > From: Stefan Markovic > > Add field corresponding to CP0 Config2 to DisasContext. This is needed for availability control via Config2 bits. > > Signed-off-by: Stefan Markovic > Signed-off-by: Aleksandar Markovic > ---

Re: [Qemu-devel] [PATCH v2 2/3] audio: use object link instead ofqdev property to pass wm8750 reference

2018-10-12 Thread Philippe Mathieu-Daudé
Hi Mao, On 12/10/2018 14:30, Philippe Mathieu-Daudé wrote: > Cc'ing Eduardo and Thomas. > > On 12/10/2018 13:51, maozy wrote: >> Hi, Philippe >> >> On 10/12/18 5:53 PM, Philippe Mathieu-Daudé wrote: >>> Hi Mao, >>> >>> On 12/10/2018 10:30, Mao Zhongyi wrote: According to qdev-properties.h,

Re: [Qemu-devel] [PATCH v5 25/28] hw/mips: Add Data Scratch Pad RAM

2018-10-12 Thread Aleksandar Markovic
> Subject: [PATCH v5 25/28] hw/mips: Add Data Scratch Pad RAM > >From: Yongbok Kim > > The optional Data Scratch Pad RAM (DSPRAM) block provides a general scratch pad RAM used for temporary storage of data. The DSPRAM provides a connection to on-chip memory or memory-mapped registers, which are

Re: [Qemu-devel] [PATCH v5 08/28] target/mips: Add CPO PWBase register

2018-10-12 Thread Aleksandar Markovic
> Subject: [PATCH v5 08/28] target/mips: Add CPO PWBase register > > From: Yongbok Kim > >Add PWBase register (CP0 Register 5, Select 5). This and several other patches in this series contain letter "O" instead of digit "0" in their title. This should be corrected. Aleksandar

Re: [Qemu-devel] [PATCH v2] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e

2018-10-12 Thread Laurent Vivier
On 09/10/2018 18:18, Peter Maydell wrote: > Our __get_user_e() and __put_user_e() macros cause newer versions > of clang to generate false-positive -Waddress-of-packed-member > warnings if they are passed the address of a member of a packed > struct (see

Re: [Qemu-devel] [PATCH] linux-user/sparc/signal.c: Remove unnecessary comment

2018-10-12 Thread Laurent Vivier
On 09/10/2018 20:40, Peter Maydell wrote: > Remove a comment suggesting that we need to call tb_flush() > after writing the SPARC signal frame trampoline insns. > This isn't necessary in QEMU, because (even if the guest > architecture requires explicit icache maintenance) we > ensure that memory

Re: [Qemu-devel] [PATCH v5 04/28] linux-user: Add MIPS-specific prctl() options

2018-10-12 Thread Aleksandar Markovic
> Subject: [PATCH v5 04/28] linux-user: Add MIPS-specific prctl() options > > From: Stefan Markovic > >Add MIPS-specific prctl() options TARGET_PR_SET_FP_MODE and TARGET_PR_SET_FP_MODE. These values are essentially copied from linux kernel header include/uapi/linux/prctl.h. > >This is done in a

Re: [Qemu-devel] [PATCH v5 05/28] linux-user: Add infrastructure for handling MIPS-specific prctl()

2018-10-12 Thread Aleksandar Markovic
> Subject: [PATCH v5 05/28] linux-user: Add infrastructure for handling > MIPS-specific prctl() > > From: Stefan Markovic > >Add infrastructure for handling MIPS-specific prctl(). This is, for now, just an empty placeholder. The real handling will be implemented in subsequent patches. > >

Re: [Qemu-devel] [PATCH] Makefile: Install new vgabios binaries

2018-10-12 Thread Philippe Mathieu-Daudé
On 12/10/2018 18:26, Alex Williamson wrote: > Difficult to make use of if not installed > > Fixes: cd1bfd5ef336 ("seabios: update bios and vgabios binaries") > Signed-off-by: Alex Williamson Reviewed-by: Philippe Mathieu-Daudé > --- > > Makefile |1 + > 1 file changed, 1 insertion(+) >

Re: [Qemu-devel] [PATCH 03/28] target/riscv: Convert RVXI load/store insns to decodetree

2018-10-12 Thread Richard Henderson
On 10/12/18 10:30 AM, Bastian Koppelmann wrote: > +} > +static bool trans_lh(DisasContext *ctx, arg_lh *a, uint32_t insn) Watch your spacing. Otherwise, Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 02/28] target/riscv: Convert RVXI branch insns to decodetree

2018-10-12 Thread Richard Henderson
On 10/12/18 10:30 AM, Bastian Koppelmann wrote: > +static bool trans_jal(DisasContext *ctx, arg_jal *a, uint32_t insn) > +{ > +CPURISCVState *env = current_cpu->env_ptr; > +gen_jal(env, ctx, a->rd, a->imm); I think you should go ahead and put env into ctx, which is probably where it

Re: [Qemu-devel] [PATCH 01/28] targer/riscv: Activate decodetree and implemnt LUI & AUIPC

2018-10-12 Thread Richard Henderson
On 10/12/18 10:30 AM, Bastian Koppelmann wrote: > +#define EX_SH(amount) \ > +static int64_t ex_shift_##amount(int imm) \ > +{ \ > +return imm << amount; \ > +} The int64_t return doesn't help, because it'll be stored

Re: [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2018-10-12 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 02:24:27PM +1100, David Gibson wrote: > When the balloon is inflated, we discard memory place in it using madvise() > with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which > sounds like it makes sense but is actually unnecessary. > > The misleadingly

Re: [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2018-10-12 Thread Eric Blake
On 10/12/18 12:41 PM, Richard Henderson wrote: On 10/11/18 8:24 PM, David Gibson wrote: When the balloon is inflated, we discard memory place in it using madvise() with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which sounds like it makes sense but is actually unnecessary.

Re: [Qemu-devel] [PATCH v2 8/8] iscsi: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, open the volume read-write if we have the permissions, but instead of erroring out for read-only volumes, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/iscsi.c | 8 +--- 1 file

[Qemu-devel] [PATCH 28/28] target/riscv: Replace gen_exception_illegal with return false

2018-10-12 Thread Bastian Koppelmann
return false in trans_* instructions is no longer used as a fallback to the old decoder. We can therefore now use 'return false' to indicate an illegal instruction. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- .../riscv/insn_trans/trans_privileged.inc.c | 6 ++

[Qemu-devel] [PATCH 25/28] target/riscv: Remove manual decoding of RV32/64M insn

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvm.inc.c | 55 ++--- target/riscv/translate.c| 266 +++- 2 files changed, 151 insertions(+), 170 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvm.inc.c

[Qemu-devel] [PATCH 23/28] target/riscv: make ADD/SUB/OR/XOR/AND insn use arg lists

2018-10-12 Thread Bastian Koppelmann
manual decoding in gen_arith() is not necessary with decodetree. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 3 ++- target/riscv/insn_trans/trans_rvi.inc.c | 21 ++-- target/riscv/translate.c| 33

[Qemu-devel] [PATCH 27/28] target/riscv: Remove decode_RV32_64G()

2018-10-12 Thread Bastian Koppelmann
decodetree handles all instructions now so the fallback is not necessary anymore. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/translate.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/target/riscv/translate.c

[Qemu-devel] [PATCH 21/28] target/riscv: Replace gen_store() with trans_store()

2018-10-12 Thread Bastian Koppelmann
With decodetree we don't need to convert RISC-V opcodes into to MemOps as gen_store() did. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 31 -- target/riscv/translate.c| 34 -

[Qemu-devel] [PATCH 26/28] target/riscv: Remove gen_system()

2018-10-12 Thread Bastian Koppelmann
with all 16 bit insns moved to decodetree no path is falling back to gen_system(), so we can remove it. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/translate.c | 32 1 file changed, 32 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v2 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-12 Thread Alistair Francis
On Wed, Oct 10, 2018 at 7:27 PM Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > Add support for selecting the Memory Region that the GEM > will do DMA to. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Alistair > --- > hw/net/cadence_gem.c | 59

Re: [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2018-10-12 Thread Richard Henderson
On 10/11/18 8:24 PM, David Gibson wrote: > When the balloon is inflated, we discard memory place in it using madvise() > with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which > sounds like it makes sense but is actually unnecessary. > > The misleadingly named MADV_DONTNEED just

[Qemu-devel] [PATCH 15/28] target/riscv: Convert quadrant 0 of RVXC insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/Makefile.objs | 9 ++- target/riscv/insn16.decode | 55 +++ target/riscv/insn_trans/trans_rvc.inc.c | 89 + target/riscv/translate.c| 88

[Qemu-devel] [PATCH 22/28] target/riscv: Move gen_arith_imm() decoding into trans_* functions

2018-10-12 Thread Bastian Koppelmann
gen_arith_imm() does a lot of decoding manually, which was hard to read in case of the shift instructions and is not necessary anymore with decodetree. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 3 +-

[Qemu-devel] [PATCH 09/28] target/riscv: Convert RV64A insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 13 +++ target/riscv/insn_trans/trans_rva.inc.c | 99 + target/riscv/translate.c| 140 3 files changed, 112 insertions(+), 140

[Qemu-devel] [PATCH 20/28] target/riscv: Replace gen_load() with trans_load()

2018-10-12 Thread Bastian Koppelmann
With decodetree we don't need to convert RISC-V opcodes into to MemOps as gen_load() did. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 44 + target/riscv/translate.c| 20 --- 2 files

[Qemu-devel] [PATCH 17/28] target/riscv: Convert quadrant 2 of RVXC insns to decodetree

2018-10-12 Thread Bastian Koppelmann
This also removes all functions that now became obsolete. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn16.decode | 34 +- target/riscv/insn_trans/trans_rvc.inc.c | 107 + target/riscv/translate.c| 151

Re: [Qemu-devel] [PATCH v2 7/8] gluster: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/gluster.c | 9 + 1 file

[Qemu-devel] [PATCH 10/28] target/riscv: Convert RV32F insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 35 +++ target/riscv/insn_trans/trans_rvf.inc.c | 326 target/riscv/translate.c| 1 + 3 files changed, 362 insertions(+) create mode 100644

[Qemu-devel] [PATCH 12/28] target/riscv: Convert RV32D insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 28 +++ target/riscv/insn_trans/trans_rvd.inc.c | 313 target/riscv/translate.c| 1 + 3 files changed, 342 insertions(+) create mode 100644

[Qemu-devel] [PATCH 11/28] target/riscv: Convert RV64F insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 6 +++ target/riscv/insn_trans/trans_rvf.inc.c | 70 + 2 files changed, 76 insertions(+) diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode index

[Qemu-devel] [PATCH 24/28] target/riscv: Remove shift and slt insn manual decoding

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 79 + target/riscv/translate.c| 59 ++ 2 files changed, 86 insertions(+), 52 deletions(-) diff --git

[Qemu-devel] [PATCH 13/28] target/riscv: Convert RV64D insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 8 + target/riscv/insn_trans/trans_rvd.inc.c | 94 + target/riscv/translate.c| 484 +--- 3 files changed, 103 insertions(+), 483 deletions(-)

[Qemu-devel] [PATCH 07/28] target/riscv: Convert RVXM insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 17 + target/riscv/insn_trans/trans_rvm.inc.c | 87 + target/riscv/translate.c| 10 +-- 3 files changed, 105 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCH 01/28] targer/riscv: Activate decodetree and implemnt LUI & AUIPC

2018-10-12 Thread Bastian Koppelmann
for now only LUI & AUIPC are decoded and translated. If decodetree fails, we falls back to the old decoder. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/Makefile.objs | 10 +++ target/riscv/insn32.decode | 30 +

[Qemu-devel] [PATCH 14/28] target/riscv: Convert RV priv insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode| 13 ++ .../riscv/insn_trans/trans_privileged.inc.c | 111 ++ target/riscv/translate.c | 49 +--- 3 files changed, 125 insertions(+), 48

[Qemu-devel] [PATCH 19/28] target/riscv: Replace gen_branch() with trans_branch()

2018-10-12 Thread Bastian Koppelmann
The latter utilizes argument-sets of decodetree such that no manual decoding is necessary as in gen_branch(). Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 56 + target/riscv/translate.c| 47

[Qemu-devel] [PATCH 02/28] target/riscv: Convert RVXI branch insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 19 + target/riscv/insn_trans/trans_rvi.inc.c | 52 + target/riscv/translate.c| 19 + 3 files changed, 72 insertions(+), 18

[Qemu-devel] [PATCH 04/28] target/riscv: Convert RVXI arithmetic insns to decodetree

2018-10-12 Thread Bastian Koppelmann
we cannot remove the call to gen_arith() in decode_RV32_64G() since it is used to translate multiply instructions. Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 36 target/riscv/insn_trans/trans_rvi.inc.c | 221

[Qemu-devel] [PATCH 18/28] target/riscv: Remove gen_jalr()

2018-10-12 Thread Bastian Koppelmann
trans_jalr() is the only caller, so move the code into trans_jalr(). Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/trans_rvi.inc.c | 27 +- target/riscv/translate.c| 38 - 2 files changed, 26

[Qemu-devel] [PATCH 05/28] target/riscv: Convert RVXI fence insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 8 target/riscv/insn_trans/trans_rvi.inc.c | 20 target/riscv/translate.c| 14 -- 3 files changed, 28 insertions(+), 14

[Qemu-devel] [PATCH 00/28] target/riscv: Convert to decodetree

2018-10-12 Thread Bastian Koppelmann
Hi, this patchset converts the RISC-V decoder to decodetree in three major steps: 1) Convert 32-bit instructions to decodetree [Patch 1-14]: Many of the gen_* functions are called by the decode functions for 16-bit and 32-bit functions. If we move translation code from the gen_*

[Qemu-devel] [PATCH 06/28] target/riscv: Convert RVXI csr insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 8 +++ target/riscv/insn_trans/trans_rvi.inc.c | 79 + target/riscv/translate.c| 43 +- 3 files changed, 88 insertions(+), 42

[Qemu-devel] [PATCH 08/28] target/riscv: Convert RV32A insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 17 +++ target/riscv/insn_trans/trans_rva.inc.c | 175 target/riscv/translate.c| 1 + 3 files changed, 193 insertions(+) create mode 100644

[Qemu-devel] [PATCH 03/28] target/riscv: Convert RVXI load/store insns to decodetree

2018-10-12 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 15 ++ target/riscv/insn_trans/trans_rvi.inc.c | 71 + target/riscv/translate.c| 7 --- 3 files changed, 86 insertions(+), 7 deletions(-) diff

Re: [Qemu-devel] [PATCH v2 6/8] curl: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/curl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer

Re: [Qemu-devel] [RFC 0/5] Improve balloon handling of pagesizes other than 4kiB

2018-10-12 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 02:24:26PM +1100, David Gibson wrote: > The virtio-balloon devices was never really thought out for cases > other than 4kiB pagesize on both guest and host. It works in some > cases, but in others can be ineffectual or even cause guest memory > corruption. > > This series

Re: [Qemu-devel] [PATCH v2 5/8] file-posix: Support auto-read-only option

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/file-posix.c | 13 + 1

[Qemu-devel] [PATCH v4 2/3] Acceptance tests: add make rule for running them

2018-10-12 Thread Cleber Rosa
The acceptance (aka functional, aka Avocado-based) tests are Python files located in "tests/acceptance" that need to be run with the Avocado libs and test runner. Let's provide a convenient way for QEMU developers to run them, by making use of the tests-venv with the required setup. Also, while

[Qemu-devel] [PATCH v4 0/3] Bootstrap Python venv and acceptance/functional tests

2018-10-12 Thread Cleber Rosa
TL;DR = Allow acceptance tests to be run with `make check-acceptance`. Details === This introduces a Python virtual environment that will be setup within the QEMU build directory, that will contain the exact environment that tests may require. There's one current caveat: it requires

[Qemu-devel] [PATCH v4 1/3] Bootstrap Python venv for tests

2018-10-12 Thread Cleber Rosa
A number of QEMU tests are written in Python, and may benefit from an untainted Python venv. By using make rules, tests that depend on specific Python libs can set that rule as a requirement, along with rules that require the presence or installation of specific libraries. The

[Qemu-devel] [PATCH v4 3/3] Travis support for the acceptance tests

2018-10-12 Thread Cleber Rosa
This enables the execution of the acceptance tests on Travis. Because the Travis environment is based on Ubuntu Trusty, it requires the python3-pip and python3.4-venv packages. Signed-off-by: Cleber Rosa --- .travis.yml | 5 + 1 file changed, 5 insertions(+) diff --git a/.travis.yml

[Qemu-devel] [PATCH v5 19/28] target/mips: Improve DSP R2/R3-related naming

2018-10-12 Thread Aleksandar Markovic
From: Stefan Markovic Do following replacements: ASE_DSPR2 -> ASE_DSP_R2 ASE_DSPR3 -> ASE_DSP_R3 check_dspr2() -> check_dsp_r2() check_dspr3() -> check_dsp_r3() Reviewed-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- target/mips/internal.h

Re: [Qemu-devel] [PATCH v2 3/8] block: Require auto-read-only for existing fallbacks

2018-10-12 Thread Eric Blake
On 10/12/18 6:55 AM, Kevin Wolf wrote: Some block drivers have traditionally changed their node to read-only mode without asking the user. This behaviour has been marked deprecated since 2.11, expecting users to provide an explicit read-only=on option. Now that we have auto-read-only=on, enable

[Qemu-devel] [PATCH v5 24/28] hw/mips: Update ITU to utilise SAARI/SAAR registers

2018-10-12 Thread Aleksandar Markovic
From: Yongbok Kim Update the ITU to utilise SAARI/SAAR registers and add new ITU Control Register (ICR0). Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- hw/mips/cps.c | 8 ++ hw/misc/mips_itu.c | 72 +-

[Qemu-devel] [PATCH v5 25/28] hw/mips: Add Data Scratch Pad RAM

2018-10-12 Thread Aleksandar Markovic
From: Yongbok Kim The optional Data Scratch Pad RAM (DSPRAM) block provides a general scratch pad RAM used for temporary storage of data. The DSPRAM provides a connection to on-chip memory or memory-mapped registers, which are accessed in parallel with the L1 data cache to minimize access

[Qemu-devel] [PATCH v5 23/28] target/mips: Implement emulation of nanoMIPS EVA instructions

2018-10-12 Thread Aleksandar Markovic
From: Dimitrije Nikolic Implement emulation of nanoMIPS EVA instructions. They are all part of P.LS.E0 instruction pool, or one of its subpools. Signed-off-by: Dimitrije Nikolic Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 128

[Qemu-devel] [PATCH v5 27/28] target/mips: Add MSA ASE to MIPS64R2-generic CPU

2018-10-12 Thread Aleksandar Markovic
From: Yongbok Kim Add MSA ASE to MIPS64R2-generic CPU. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/translate_init.inc.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/mips/translate_init.inc.c

  1   2   3   >