Re: [Qemu-devel] [PATCH-4.2 v2 3/5] target/riscv: Create function to test if FP is enabled

2019-08-05 Thread Chih-Min Chao
On Wed, Jul 31, 2019 at 7:39 AM Alistair Francis wrote: > Let's create a function that tests if floating point support is > enabled. We can then protect all floating point operations based on if > they are enabled. > > This patch so far doesn't change anything, it's just preparing for the > Hyper

[Qemu-devel] [RFC PATCH v2 00/17] Add virtual device fuzzing support

2019-08-05 Thread Oleinik, Alexander
Changes since v1 * Split off changes to qos virtio-net and qtest server to other patches * Move vl:main initialization into new func: qemu_init * Moved useful functions from qos-test.c to a separate object * Use struct of function pointers for add_fuzz_target(), instead of arguments * Move

[Qemu-devel] [RFC PATCH v2 01/17] fuzz: Move initialization from main to qemu_init

2019-08-05 Thread Oleinik, Alexander
Using this, we avoid needing a special case to break out of main(), early, when initializing the fuzzer, as we can just call qemu_init. There is still a #define around main(), since it otherwise conflicts with the libfuzzer main(). Signed-off-by: Alexander Oleinik --- include/sysemu/sysemu.h |

[Qemu-devel] [RFC PATCH v2 03/17] fuzz: Keep memory mapped for fork-based fuzzer

2019-08-05 Thread Oleinik, Alexander
Otherwise, the RAM is unmapped from the child-processes, which breaks any fuzz tests relying on DMA. Signed-off-by: Alexander Oleinik --- exec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exec.c b/exec.c index 3e78de3b8f..b3b56db8f0 100644 --- a/exec.c +++ b/exec.c @@ -2317,7 +2317,9

[Qemu-devel] [RFC PATCH v2 02/17] fuzz: Add fuzzer configure options

2019-08-05 Thread Oleinik, Alexander
This adds sanitizer/fuzzer related cflags and adds tests/ to the include path. This include change is needed for qos to build, and is normally located in tests/Makefile.include, but currently the fuzzer builds from the i386-softmmu target, not anything in tests. Signed-off-by: Alexander Oleinik -

[Qemu-devel] [RFC PATCH v2 07/17] fuzz: Add ramfile qemu-file type

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- migration/qemu-file.c | 84 +++ migration/qemu-file.h | 11 ++ 2 files changed, 95 insertions(+) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 0431585502..453e2897d5 100644 --- a/migration/qemu-fi

[Qemu-devel] [RFC PATCH v2 05/17] fuzz: Add direct receive function for qtest server

2019-08-05 Thread Oleinik, Alexander
The direct receive function qtest_server_recv is directly invoked by the qtest client, when the server and client exist within the same process. Signed-off-by: Alexander Oleinik --- include/sysemu/qtest.h | 4 qtest.c| 14 ++ 2 files changed, 18 insertions(+) d

[Qemu-devel] [RFC PATCH v2 09/17] fuzz: hardcode needed objects into i386 target

2019-08-05 Thread Oleinik, Alexander
Temporary solution until there is a better build solution for fuzzers in tests/Makefile.include Signed-off-by: Alexander Oleinik --- target/i386/Makefile.objs | 20 1 file changed, 20 insertions(+) diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs index 48e

[Qemu-devel] [RFC PATCH v2 06/17] fuzz: Add FUZZ_TARGET module type

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- include/qemu/module.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index db3065381d..cb37ef647e 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -46,6 +46,7 @@ typedef enu

[Qemu-devel] [RFC PATCH v2 04/17] fuzz: Skip modules that were already initialized

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- util/module.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/util/module.c b/util/module.c index 142db7e911..3d4380fd47 100644 --- a/util/module.c +++ b/util/module.c @@ -30,6 +30,7 @@ typedef struct ModuleEntry typedef QTAILQ_HEAD(, ModuleEntry)

[Qemu-devel] [RFC PATCH v2 14/17] fuzz: Add forking support to the fuzzer

2019-08-05 Thread Oleinik, Alexander
Forking is a simple way of ensuring that state doesn't leak between runs. This patch depends on a modification to libfuzzer: https://reviews.llvm.org/D65672 Signed-off-by: Alexander Oleinik --- tests/fuzz/fuzzer_hooks.c | 62 +++ tests/fuzz/fuzzer_hooks.h | 21

[Qemu-devel] [RFC PATCH v2 10/17] fuzz: qtest client directly interacts with server

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- tests/libqtest.c | 61 ++-- tests/libqtest.h | 6 + 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 3c5c3f49d8..a9c1dc4fb6 100644 --- a/tests/libqtest.c

[Qemu-devel] [RFC PATCH v2 08/17] fuzz: Export the qemu_savevm_live_state function

2019-08-05 Thread Oleinik, Alexander
Skip the header when saving device state, as the header isn't handled by qemu_load_device_state Signed-off-by: Alexander Oleinik --- migration/savevm.c | 9 +++-- migration/savevm.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c

[Qemu-devel] [RFC PATCH v2 17/17] fuzz: Add fuzz accelerator type

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- accel/fuzz.c | 48 +++ include/sysemu/fuzz.h | 15 ++ 2 files changed, 63 insertions(+) create mode 100644 accel/fuzz.c create mode 100644 include/sysemu/fuzz.h diff --git a/accel/fuzz.c b/accel/f

[Qemu-devel] [RFC PATCH v2 12/17] fuzz: Add fuzzer skeleton

2019-08-05 Thread Oleinik, Alexander
The code defines the lifecycle of the fuzzer, and provides rebooting, vmload and device_load as means of resetting state between fuzz runs Signed-off-by: Alexander Oleinik --- tests/fuzz/fuzz.c | 245 ++ tests/fuzz/fuzz.h | 70 + 2 files c

[Qemu-devel] [RFC PATCH v2 13/17] fuzz: Add libqos support to the fuzzer

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- tests/fuzz/qos_fuzz.c| 58 tests/fuzz/qos_fuzz.h| 23 + tests/fuzz/qos_helpers.c | 190 +++ tests/fuzz/qos_helpers.h | 17 4 files changed, 288 insertions(+) create mode 100644 tests/fuzz/qo

[Qemu-devel] [RFC PATCH v2 11/17] fuzz: Move useful qos functions to separate object

2019-08-05 Thread Oleinik, Alexander
These functions are used by both qos-test.c, and the fuzzer. Signed-off-by: Alexander Oleinik --- tests/libqos/qos_external.c | 149 tests/libqos/qos_external.h | 8 ++ tests/qos-test.c| 132 +--- 3 files changed, 158

[Qemu-devel] [RFC PATCH v2 15/17] fuzz: Add general qtest fuzz-target

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- tests/fuzz/qtest_fuzz.c | 260 tests/fuzz/qtest_fuzz.h | 37 ++ 2 files changed, 297 insertions(+) create mode 100644 tests/fuzz/qtest_fuzz.c create mode 100644 tests/fuzz/qtest_fuzz.h diff --git a/tests/fuzz/qt

Re: [Qemu-devel] [Qemu-riscv] [FOR 4.1 PATCH] riscv: roms: Fix make rules for building sifive_u bios

2019-08-05 Thread Chih-Min Chao
On Sat, Aug 3, 2019 at 2:08 PM Bin Meng wrote: > Currently the make rules are wrongly using qemu/virt opensbi image > for sifive_u machine. Correct it. > > Signed-off-by: Bin Meng > > --- > > roms/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/roms/Makefile b/

[Qemu-devel] [RFC PATCH v2 16/17] fuzz: Add virtio-net fuzz targets

2019-08-05 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- tests/fuzz/virtio-net-fuzz.c | 254 +++ 1 file changed, 254 insertions(+) create mode 100644 tests/fuzz/virtio-net-fuzz.c diff --git a/tests/fuzz/virtio-net-fuzz.c b/tests/fuzz/virtio-net-fuzz.c new file mode 100644 index

Re: [Qemu-devel] [PATCH] libqos: Account for the ctrl queue in virtio-net

2019-08-05 Thread Oleinik, Alexander
On Mon, 2019-08-05 at 03:24 +, Oleinik, Alexander wrote: > The number of queues is 2n+1, where n == 1 when multiqueue is > disabled > > Signed-off-by: Alexander Oleinik > --- > > I split this commit out of the fuzz patch-series. > > tests/libqos/virtio-net.c | 1 + > tests/libqos/virtio-ne

[Qemu-devel] [PATCH] numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node

2019-08-05 Thread Tao Xu
Add MachineClass::auto_enable_numa field. When it is true, a NUMA node is expected to be created implicitly. Acked-by: David Gibson Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- This patch has a dependency on https://patchwork.kernel.org/cover/11063235/ -

Re: [Qemu-devel] [RFC PATCH v2 01/17] fuzz: Move initialization from main to qemu_init

2019-08-05 Thread Paolo Bonzini
On 05/08/19 09:11, Oleinik, Alexander wrote: > Using this, we avoid needing a special case to break out of main(), > early, when initializing the fuzzer, as we can just call qemu_init. > There is still a #define around main(), since it otherwise conflicts > with the libfuzzer main(). > > Signed-of

Re: [Qemu-devel] [RFC PATCH v2 02/17] fuzz: Add fuzzer configure options

2019-08-05 Thread Paolo Bonzini
On 05/08/19 09:11, Oleinik, Alexander wrote: > This adds sanitizer/fuzzer related cflags and adds tests/ to the include > path. This include change is needed for qos to build, and is normally > located in tests/Makefile.include, but currently the fuzzer builds from > the i386-softmmu target, not an

Re: [Qemu-devel] [RFC PATCH v2 04/17] fuzz: Skip modules that were already initialized

2019-08-05 Thread Paolo Bonzini
On 05/08/19 09:11, Oleinik, Alexander wrote: > Signed-off-by: Alexander Oleinik > --- > util/module.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/util/module.c b/util/module.c > index 142db7e911..3d4380fd47 100644 > --- a/util/module.c > +++ b/util/module.c > @@ -30,6 +30,7 @

Re: [Qemu-devel] [RFC PATCH v2 07/17] fuzz: Add ramfile qemu-file type

2019-08-05 Thread Paolo Bonzini
On 05/08/19 09:11, Oleinik, Alexander wrote: > +#ifdef CONFIG_FUZZ > +#define INCREMENT 10240 > +static ssize_t ram_writev_buffer(void *opaque, struct iovec *iov, int iovcnt, > +int64_t pos) > +{ > +ram_disk *rd = (ram_disk *)opaque; > +gsize newsize; > +ssize_t total_size = 0;

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-05 Thread Stefan Hajnoczi
On Mon, Aug 05, 2019 at 10:52:21AM +0800, piaojun wrote: > # fio -direct=1 -time_based -iodepth=1 -rw=randwrite -ioengine=libaio -bs=1M > -size=1G -numjob=1 -runtime=30 -group_reporting -name=file > -filename=/mnt/9pshare/file This benchmark configuration (--iodepth=1 --numjobs=1) cannot benefit

Re: [Qemu-devel] [RFC PATCH v2 00/17] Add virtual device fuzzing support

2019-08-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190805071038.32146-1-alx...@bu.edu/ 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 make docke

[Qemu-devel] [Bug 1838946] [NEW] qemu 3.10 golang crash

2019-08-05 Thread Antony Rheneus
Public bug reported: Encountered below crashes in qemu 3.10 arm Also have raised the same in golang groups. But seems like in ARM32 hardware, the below commands works fine, only in qemu if crashes. https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/golang-nuts/1txPOGa4aG

Re: [Qemu-devel] [PATCH v9 17/17] block/io_uring: enable kernel submission polling

2019-08-05 Thread Stefan Hajnoczi
On Fri, Aug 2, 2019 at 12:50 AM Aarushi Mehta wrote: > +rc = io_uring_queue_init(MAX_EVENTS, ring, IORING_SETUP_SQPOLL); > +if (rc == -EOPNOTSUPP) { > +rc = io_uring_queue_init(MAX_EVENTS, ring, 0); > +} IORING_SETUP_SQPOLL is only allowed when the user has CAP_SYS_ADMIN (

Re: [Qemu-devel] [PATCH v2] ivshmem-server: Terminate also on SIGINT

2019-08-05 Thread Stefano Garzarella
On Sat, Aug 03, 2019 at 03:22:04PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > Allows to shutdown a foreground session via ctrl-c. > > Signed-off-by: Jan Kiszka > --- > > Changes in v2: > - adjust error message > > contrib/ivshmem-server/main.c | 5 +++-- > 1 file changed, 3 insertions(

Re: [Qemu-devel] How to configure QEMU to support APIC virtualization

2019-08-05 Thread ddm
Ok, Finally don't have to tangle it ^.^ Thank you very much! At 2019-08-05 13:54:36, "Li Qiang" wrote: ddm 于2019年8月5日周一 下午1:20写道: Hi, As i know, KVM is based on passthrough host cpu to implement full-virtualiztion, if host cpu doesn't support this feature, it's impossible to turn o

Re: [Qemu-devel] [Qemu-ppc] [GIT PULL for qemu-pseries REPOST] pseries: Update SLOF firmware image

2019-08-05 Thread Aravinda Prasad
Alexey/David, With the SLOF changes, QEMU cannot resize the RTAS blob. Resizing is required for FWNMI support which extends the RTAS blob to include an error log upon a machine check. The check to valid RTAS buffer fails in the guest because the rtas-size updated in QEMU is not reflecting in the

[Qemu-devel] [Bug 1838946] Re: qemu 3.10 golang crash

2019-08-05 Thread Peter Maydell
Hi; we very recently fixed a QEMU bug which causes crashes like this for Go binaries running under QEMU's linux-user mode. The fix is in the v4.1.0-rc3 we've just put out and will be in the final 4.1.0 release. Could you retry with that and see if it fixes your problem, please? -- You received th

Re: [Qemu-devel] [PATCH for-4.2 v3 0/2] s390: stop abusing memory_region_allocate_system_memory()

2019-08-05 Thread Igor Mammedov
On Fri, 2 Aug 2019 17:04:21 +0200 Christian Borntraeger wrote: > On 02.08.19 16:59, Christian Borntraeger wrote: > > > > > > On 02.08.19 16:42, Christian Borntraeger wrote: > >> On 02.08.19 15:32, Igor Mammedov wrote: > >>> Changelog: > >>> since v2: > >>> - break migration from old Q

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
02.08.2019 22:21, John Snow wrote: > > > On 8/2/19 2:58 PM, Vladimir Sementsov-Ogievskiy wrote: >> hbitmap_reset is broken: it rounds up the requested region. It leads to >> the following bug, which is shown by fixed test: >> >> assume granularity = 2 >> set(0, 3) # count becomes 4 >> reset(0, 1)

Re: [Qemu-devel] [PATCH] migration/postcopy: PostcopyState is already set in loadvm_postcopy_handle_advise()

2019-08-05 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > PostcopyState is already set to ADVISE at the beginning of > loadvm_postcopy_handle_advise(). > > Remove the redundant set. > > Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert > --- > migration/savevm.c | 2 -- > 1 file changed,

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-05 Thread piaojun
Hi Stefan, On 2019/8/5 16:01, Stefan Hajnoczi wrote: > On Mon, Aug 05, 2019 at 10:52:21AM +0800, piaojun wrote: >> # fio -direct=1 -time_based -iodepth=1 -rw=randwrite -ioengine=libaio -bs=1M >> -size=1G -numjob=1 -runtime=30 -group_reporting -name=file >> -filename=/mnt/9pshare/file > > This b

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
03.08.2019 0:19, Max Reitz wrote: > On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >> hbitmap_reset is broken: it rounds up the requested region. It leads to >> the following bug, which is shown by fixed test: >> >> assume granularity = 2 >> set(0, 3) # count becomes 4 >> reset(0, 1) # coun

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
05.08.2019 12:26, Vladimir Sementsov-Ogievskiy wrote: > 02.08.2019 22:21, John Snow wrote: >> >> >> On 8/2/19 2:58 PM, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume

Re: [Qemu-devel] [Patch v2] migration/postcopy: make PostcopyDiscardState a static variable

2019-08-05 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > In postcopy-ram.c, we provide three functions to discard certain > RAMBlock range: > > * postcopy_discard_send_init() > * postcopy_discard_send_range() > * postcopy_discard_send_finish() > > Currently, we allocate/deallocate PostcopyDiscar

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Kevin Wolf
Am 02.08.2019 um 23:19 hat Max Reitz geschrieben: > On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: > > hbitmap_reset is broken: it rounds up the requested region. It leads to > > the following bug, which is shown by fixed test: > > > > assume granularity = 2 > > set(0, 3) # count becomes 4

Re: [Qemu-devel] [PATCH] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true

2019-08-05 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > There is only one place to set start_postcopy to true, > qmp_migrate_start_postcopy(), which make sure start_postcopy could be > set to true when migrate_postcopy() return true. > > So start_postcopy is true implies the other one. > > Signed-off

Re: [Qemu-devel] [PATCH v2] ivshmem-server: Terminate also on SIGINT

2019-08-05 Thread Jan Kiszka
On 05.08.19 10:33, Stefano Garzarella wrote: > On Sat, Aug 03, 2019 at 03:22:04PM +0200, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Allows to shutdown a foreground session via ctrl-c. >> >> Signed-off-by: Jan Kiszka >> --- >> >> Changes in v2: >> - adjust error message >> >> contrib/ivshmem-se

[Qemu-devel] [PATCH for 4.2 v6 10/22] target/mips: Style improvements in machine.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé --- target/mips/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/mips/machine.c b/target/mi

[Qemu-devel] [PATCH for 4.2 v6 05/22] target/mips: Add support for emulation of CRC32 group of instructions

2019-08-05 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of MIPS' CRC32 (Cyclic Redundancy Check) instructions. Reuse zlib crc32() and Linux crc32c(). Note that, at the time being, there is no MIPS CPU that supports CRC32 instructions (they are an optional part of MIPS64/32 R6 anf nanoMIPS ISAs). Signed-off-by: Yongbok

[Qemu-devel] [PATCH for 4.2 v6 03/22] target/mips: Amend CP0 MemoryMapID register implementation

2019-08-05 Thread Aleksandar Markovic
From: Yongbok Kim Add migration support and fix preprocessor constant name for MemoryMapID register. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 2 +- target/mips/machine.c | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH for 4.2 v6 00/22] target/mips: Misc patches for 4.2

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic This series includes misc MIPS patches intended to be integrated after 4.1 release. v5->v6: - added five more patches on style improvements - added five patches on CP0 cleanup - other minor improvements v4->v5: - fixed more build errors - added five patches

[Qemu-devel] [PATCH for 4.2 v6 06/22] target/mips: Style improvements in cp0_timer.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé --- target/mips/cp0_timer.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) dif

[Qemu-devel] [PATCH for 4.2 v6 13/22] target/mips: Style improvements in mips_int.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic --- hw/mips/mips_int.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c index f899f6c..4c731ab 100644 --- a

[Qemu-devel] [PATCH for 4.2 v6 19/22] target/mips: Clean up handling of CP0 register 30

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Clean up handling of CP0 register 30. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 4db9712..90e9636 100644 --- a/targe

[Qemu-devel] [PATCH for 4.2 v6 02/22] target/mips: Amend CP0 WatchHi register implementation

2019-08-05 Thread Aleksandar Markovic
From: Yongbok Kim WatchHi is extended by the field MemoryMapID with the GINVT instruction. The field is accessible by MTHC0/MFHC0 in 32-bit architectures and DMTC0/ DMFC0 in 64-bit architectures. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 2 +-

[Qemu-devel] [PATCH for 4.2 v6 15/22] target/mips: Style improvements in mips_mipssim.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic --- hw/mips/mips_mipssim.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c inde

[Qemu-devel] [PATCH for 4.2 v6 12/22] target/mips: Style improvements in mips_fulong2e.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic --- hw/mips/mips_fulong2e.c | 96 + 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/hw/mips/mips_fulong2

[Qemu-devel] [PATCH for 4.2 v6 09/22] target/mips: Style improvements in internal.h

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé --- target/mips/internal.h | 57 +++--- 1 file changed, 35 insertions(+), 22 deletions(

[Qemu-devel] [PATCH for 4.2 v6 11/22] target/mips: Style improvements in cps.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic --- hw/mips/cps.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index c84bc64..8fe2f47 100644 --- a/hw/mips/cp

[Qemu-devel] [PATCH for 4.2 v6 07/22] target/mips: Style improvements in cpu.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/target/mips/cpu.c b/ta

[Qemu-devel] [PATCH for 4.2 v6 17/22] target/mips: Clean up handling of CP0 register 24

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Clean up handling of CP0 register 24. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 3cf4c53..28ce30d 100644 --- a/targe

[Qemu-devel] [PATCH for 4.2 v6 18/22] target/mips: Clean up handling of CP0 register 26

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Clean up handling of CP0 register 26. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 28ce30d..4db9712 100644 --- a/targe

[Qemu-devel] [PATCH for 4.2 v6 08/22] target/mips: Style improvements in helper.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic --- target/mips/helper.c | 98 1 file changed, 60 insertions(+), 38 deletions(-) diff --git a/target/mips/helper.c

[Qemu-devel] [PATCH for 4.2 v6 01/22] target/mips: Add support for DSPRAM

2019-08-05 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 laten

[Qemu-devel] [PATCH for 4.2 v6 21/22] target/mips: tests/tcg: Add optional printing of more detailed failure info

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic There is a need for printing input and output data for failure cases, for debugging purpose. This is achieved by this patch, and only if a preprocessor constant is manually set to 1. (Assumption is that the need for such printout is relatively rare.) Signed-off-by: Alek

[Qemu-devel] [PATCH for 4.2 v6 04/22] target/mips: Add support for emulation of GINVT instruction

2019-08-05 Thread Aleksandar Markovic
From: Yongbok Kim Implement emulation of GINVT instruction. As QEMU doesn't support caches and virtualization, this implementation covers only GINVT (Global Invalidate TLB) instruction among TLB-related instructions. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- disas/mips

[Qemu-devel] [PATCH for 4.2 v6 20/22] target/mips: Clean up handling of CP0 register 31

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Clean up handling of CP0 register 31. Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 2 +- target/mips/translate.c | 56 - 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/target/mips/c

[Qemu-devel] [PATCH for 4.2 v6 16/22] target/mips: Clean up handling of CP0 register 0

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Clean up handling of CP0 register 0. Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 3 +++ target/mips/translate.c | 40 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/target/mips/cpu.h b/ta

[Qemu-devel] [PATCH for 4.2 v6 14/22] target/mips: Style improvements in mips_malta.c

2019-08-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Fixes mostly errors and warnings reported by 'checkpatch.pl -f'. Signed-off-by: Aleksandar Markovic --- hw/mips/mips_malta.c | 216 ++- 1 file changed, 128 insertions(+), 88 deletions(-) diff --git a/hw/mips/mips_malta.

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-08-05 Thread Marc Zyngier
On 01/08/2019 09:41, Linus Walleij wrote: > Hi Geert! > > Thanks for this very interesting patch! > > On Fri, Jul 5, 2019 at 6:05 PM Geert Uytterhoeven > wrote: > >> GPIO controllers are exported to userspace using /dev/gpiochip* >> character devices. Access control to these devices is provide

[Qemu-devel] [BUG] gcov support appears to be broken

2019-08-05 Thread Aleksandar Markovic
Hello, according to out docs, here is the procedure that should produce coverage report for execution of the complete "make check": #./configure --enable-gcov #make #make check #make coverage-report It seems that first three commands execute as expected. (For example, there are plenty of files

Re: [Qemu-devel] [RFC PATCH v2 07/17] fuzz: Add ramfile qemu-file type

2019-08-05 Thread Dr. David Alan Gilbert
* Oleinik, Alexander (alx...@bu.edu) wrote: Actually, we've already got a RAM backed QEMU File setup. You create a 'qio_channel_buffer' and use qemu_fopen_channel_* on it; see migration/savevm.c:loadvm_handle_cmd_packaged where we load into one of these buffersa(bioc) and then open it as a QEMU

Re: [Qemu-devel] [RFC PATCH v2 08/17] fuzz: Export the qemu_savevm_live_state function

2019-08-05 Thread Dr. David Alan Gilbert
* Oleinik, Alexander (alx...@bu.edu) wrote: > Skip the header when saving device state, as the header isn't handled by > qemu_load_device_state > > Signed-off-by: Alexander Oleinik > --- > migration/savevm.c | 9 +++-- > migration/savevm.h | 2 ++ > 2 files changed, 9 insertions(+), 2 deleti

Re: [Qemu-devel] qemu-ga -- virtio driver version reporting

2019-08-05 Thread Tomáš Golembiovský
On Sat, Aug 03, 2019 at 05:07:09PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Aug 2, 2019 at 5:12 PM Tomáš Golembiovský wrote: > > > > Hi, > > > > I would like to add version reporting of Windows virtio drivers to qemu-ga. > > Obviously this is specific to Windows as for POSIX systems it co

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-08-05 Thread Linus Walleij
On Mon, Aug 5, 2019 at 12:21 PM Marc Zyngier wrote: > On 01/08/2019 09:41, Linus Walleij wrote: > > I would even go so far as to call it "gpio-virtualization" or > > "gpio-virtualized" rather than "gpio-virtual" so it is clear what the > > intended usecase is. We have a bit of confusion in the ke

Re: [Qemu-devel] [BUG] gcov support appears to be broken

2019-08-05 Thread Peter Maydell
On Mon, 5 Aug 2019 at 11:39, Aleksandar Markovic wrote: > > Hello, according to out docs, here is the procedure that should produce > coverage report for execution of the complete "make check": > > #./configure --enable-gcov > #make > #make check > #make coverage-report > > It seems that first th

Re: [Qemu-devel] [PATCH v2] hmp: Remove migration capabilities from "info migrate"

2019-08-05 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > With the growth of migration capabilities, it is not proper to display > them in "info migrate". Users are recommended to use "info > migrate_capabiltiies" to list them. > > Signed-off-by: Wei Yang > Suggested-by: Dr. David Alan Gilbert > > --

Re: [Qemu-devel] [PATCH v3 12/34] target/arm: Add VHE system register redirection and aliasing

2019-08-05 Thread Alex Bennée
Richard Henderson writes: > Several of the EL1/0 registers are redirected to the EL2 version when in > EL2 and HCR_EL2.E2H is set. Many of these registers have side effects. > Link together the two ARMCPRegInfo structures after they have been > properly instantiated. Install common dispatch r

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 05.08.19 11:45, Vladimir Sementsov-Ogievskiy wrote: > 03.08.2019 0:19, Max Reitz wrote: >> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume granul

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 05.08.19 11:56, Kevin Wolf wrote: > Am 02.08.2019 um 23:19 hat Max Reitz geschrieben: >> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume granular

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: > hbitmap_reset is broken: it rounds up the requested region. It leads to > the following bug, which is shown by fixed test: > > assume granularity = 2 > set(0, 3) # count becomes 4 > reset(0, 1) # count becomes 2 > > But user of the interfac

[Qemu-devel] [PATCH] iotests: Test unaligned blocking mirror write

2019-08-05 Thread Max Reitz
Signed-off-by: Max Reitz --- Hi, this is a test for the mirror bug Vladimir found. Naturally, it depends on some patch to fix it. Based-on: <20190802185830.74648-1-vsement...@virtuozzo.com> --- tests/qemu-iotests/151 | 25 + tests/qemu-iotests/151.out | 4 ++-- 2 fi

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
05.08.2019 14:32, Max Reitz wrote: > On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >> hbitmap_reset is broken: it rounds up the requested region. It leads to >> the following bug, which is shown by fixed test: >> >> assume granularity = 2 >> set(0, 3) # count becomes 4 >> reset(0, 1) # cou

[Qemu-devel] [Bug 1838913] Re: Single-step exceptions incorrectly routed to EL1 when ELD is EL2 (TDE = 1) (qemu version 3.1)

2019-08-05 Thread Peter Maydell
Yes, we're directing single-step exceptions to the wrong EL. (I think this is probably a hangover from the fact that we implemented singlestep at about the same time or before we properly implemented EL2 support, so we haven't shaken out all the "assumes debug EL is EL1" assumptions still.) ** Ch

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 05.08.19 11:45, Vladimir Sementsov-Ogievskiy wrote: > 03.08.2019 0:19, Max Reitz wrote: >> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume granul

[Qemu-devel] [PATCH] mirror: Only mirror granularity-aligned chunks

2019-08-05 Thread Max Reitz
In write-blocking mode, all writes to the top node directly go to the target. We must only mirror chunks of data that are aligned to the job's granularity, because that is how the dirty bitmap works. Therefore, the request alignment for writes must be the job's granularity (in write-blocking mode)

Re: [Qemu-devel] [PATCH] mirror: Only mirror granularity-aligned chunks

2019-08-05 Thread Max Reitz
On 05.08.19 13:49, Max Reitz wrote: > In write-blocking mode, all writes to the top node directly go to the > target. We must only mirror chunks of data that are aligned to the > job's granularity, because that is how the dirty bitmap works. > Therefore, the request alignment for writes must be th

[Qemu-devel] [PATCH for-4.1] util/hbitmap: update orig_size on truncate

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
Without this, hbitmap_next_zero and hbitmap_next_dirty_area are broken after truncate. So, orig_size is broken since it's introduction in 76d570dc495c56bb. Fixes: 76d570dc495c56bb Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi! Here is one more hbitmap bug I noticed. It's my fault, I'm sorr

Re: [Qemu-devel] [PATCH 1/4] virtiofsd: process requests in a thread pool

2019-08-05 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > Introduce a thread pool so that fv_queue_thread() just pops > VuVirtqElements and hands them to the thread pool. For the time being > only one worker thread is allowed since passthrough_ll.c is not > thread-safe yet. Future patches will lift this r

Re: [Qemu-devel] [PATCH v3 01/18] ppc/pnv: Introduce PowerNV machines with fixed CPU models

2019-08-05 Thread David Gibson
On Wed, Jul 31, 2019 at 04:12:16PM +0200, Cédric Le Goater wrote: > Make the current "powernv" machine an abstract type and derive from it > new machines with specific CPU models: power8 and power9. > > The "powernv" machine is now an alias on the "powernv9" machine. > > Signed-off-by: Cédric Le

[Qemu-devel] [PATCH v2] target/riscv: don't overwrite priv_version and resetvec when realizing

2019-08-05 Thread Ivan Grokhotkov
CPU-specific init functions (riscv_*_cpu_init) configure members of CPURISCVState, such as priv_version and resetvec. However riscv_cpu_realize unconditionally overwrites these members. The result is that some CPUs (such as CPU_SIFIVE_U34) are getting created with incorrect priv_version. Only set

Re: [Qemu-devel] [PATCH for-4.1] util/hbitmap: update orig_size on truncate

2019-08-05 Thread Max Reitz
On 05.08.19 14:01, Vladimir Sementsov-Ogievskiy wrote: > Without this, hbitmap_next_zero and hbitmap_next_dirty_area are broken > after truncate. So, orig_size is broken since it's introduction in > 76d570dc495c56bb. > > Fixes: 76d570dc495c56bb > Signed-off-by: Vladimir Sementsov-Ogievskiy > ---

Re: [Qemu-devel] [PATCH 2/4] virtiofsd: prevent FUSE_INIT/FUSE_DESTROY races

2019-08-05 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > When running with multiple threads it can be tricky to handle > FUSE_INIT/FUSE_DESTROY in parallel with other request types or in > parallel with themselves. Serialize FUSE_INIT and FUSE_DESTROY so that > malicious clients cannot trigger race condit

Re: [Qemu-devel] [PATCH] iotests: Test unaligned blocking mirror write

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
05.08.2019 14:35, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > Hi, this is a test for the mirror bug Vladimir found. Naturally, it > depends on some patch to fix it. > > Based-on: <20190802185830.74648-1-vsement...@virtuozzo.com> > --- > tests/qemu-iotests/151 | 25 +

Re: [Qemu-devel] [RFC PATCH 0/2] establish nesting rule of BQL vs cpu-exclusive

2019-08-05 Thread Roman Kagan
On Fri, Jun 21, 2019 at 12:49:07PM +, Roman Kagan wrote: > On Thu, Jun 06, 2019 at 01:22:33PM +, Roman Kagan wrote: > > On Mon, May 27, 2019 at 11:05:38AM +, Roman Kagan wrote: > > > On Thu, May 23, 2019 at 12:31:16PM +0100, Alex Bennée wrote: > > > > > > > > Roman Kagan writes: > > >

[Qemu-devel] [PATCH] Makefile: Drop $(DESTDIR) from generated FW paths

2019-08-05 Thread Michal Privoznik
The way that generating firmware descriptor files work is that for every input file, every occurrence of @DATADIR@ within the file is replaced with $(DESTDIR)$(qemu_datadir). This works as long as DESTDIR is empty. But in some cases (e.g. on my Gentoo box), compilation is done in one dir, then the

Re: [Qemu-devel] [PATCH] mirror: Only mirror granularity-aligned chunks

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
05.08.2019 14:49, Max Reitz wrote: > In write-blocking mode, all writes to the top node directly go to the > target. We must only mirror chunks of data that are aligned to the > job's granularity, because that is how the dirty bitmap works. > Therefore, the request alignment for writes must be the

Re: [Qemu-devel] [PATCH] Makefile: Drop $(DESTDIR) from generated FW paths

2019-08-05 Thread Peter Maydell
On Mon, 5 Aug 2019 at 13:54, Michal Privoznik wrote: > > The way that generating firmware descriptor files work is that > for every input file, every occurrence of @DATADIR@ within the > file is replaced with $(DESTDIR)$(qemu_datadir). This works as > long as DESTDIR is empty. But in some cases (e

Re: [Qemu-devel] [PATCH v3 00/34] target/arm: Implement ARMv8.1-VHE

2019-08-05 Thread Alex Bennée
Richard Henderson writes: > About half of this patch set is cleanup of the qemu tlb handling > leading up to the actual implementation of VHE, and the biggest > piece of that: The EL2&0 translation regime. > > Changes since v2: > * arm_mmu_idx was incomplete; test TGE+E2H not just E2H. > *

[Qemu-devel] [PATCH 0/2] target/arm: Fix routing of singlestep exceptions

2019-08-05 Thread Peter Maydell
Bug https://bugs.launchpad.net/qemu/+bug/1838913 reports that when doing architectural singlestepping we send the singlestep exceptions to EL1, even if the guest has configured the debug exception level to be EL2 or EL3. This patchset fixes that, by putting the debug target EL into the TB flags an

[Qemu-devel] [PATCH 2/2] target/arm: Fix routing of singlestep exceptions

2019-08-05 Thread Peter Maydell
When generating an architectural single-step exception we were routing it to the "default exception level", which is to say the same exception level we execute at except that EL0 exceptions go to EL1. This is incorrect because the debug exception level can be configured by the guest for situations

[Qemu-devel] [PATCH 1/2] target/arm: Factor out 'generate singlestep exception' function

2019-08-05 Thread Peter Maydell
Factor out code to 'generate a singlestep exception', which is currently repeated in four places. To do this we need to also pull the identical copies of the gen-exception() function out of translate-a64.c and translate.c into translate.h. (There is a bug in the code: we're taking the exception t

Re: [Qemu-devel] [PATCH v2 0/9] add failover feature for assigned network devices

2019-08-05 Thread Jens Freimann
On Fri, Aug 02, 2019 at 11:22:10AM -0400, Michael S. Tsirkin wrote: On Fri, Aug 02, 2019 at 05:05:56PM +0200, Jens Freimann wrote: This is implementing the host side of the net_failover concept (https://www.kernel.org/doc/html/latest/networking/net_failover.html) Changes since v1: [...] Di

  1   2   3   >