Re: [Qemu-devel] [PULL v2 0/1] target/alpha: Update firmware image

2019-03-29 Thread Peter Maydell
On Fri, 29 Mar 2019 at 18:07, Richard Henderson wrote: > > The following changes since commit d132baa05ed7a647067c807fd452ec794cc2ecb7: > > Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' > into staging (2019-03-25 17:01:10 +) > > are available in the Git repositor

Re: [Qemu-devel] [PATCH v4 0/4] target/arm: Implement ARMv8.5-BTI for linux-user

2019-03-29 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190330005900.17282-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190330005900.17282-1-richard.hender...@linaro.org Subject: [Qemu-devel] [PATCH v4 0/4] targ

[Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI

2019-03-29 Thread Richard Henderson
There is agreement that there will be a mmap/mprotect bit, although no word yet on the value or the name. Invent a name to make forward progress. The PAGE_TARGET_1 bit, is qemu internal, and allows the target something to query from the guest page tables. Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v4 0/4] target/arm: Implement ARMv8.5-BTI for linux-user

2019-03-29 Thread Richard Henderson
The bits within the elf file that cover this have been published[1], but the change to for use by mmap/mprotect has not. So I've made something up with which to make progress (TARGET_PROT_BTI). I intend to press folk at Linaro Connect next week on publishing the necessary ABI changes for this and

[Qemu-devel] [PATCH v4 4/4] tests/tcg/aarch64: Add bti smoke test

2019-03-29 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tests/tcg/aarch64/bti-1.c | 62 +++ tests/tcg/aarch64/bti-crt.inc.c | 69 +++ tests/tcg/aarch64/Makefile.target | 3 ++ 3 files changed, 134 insertions(+) create mode 100644 tests/tcg/aarch64/bti-

[Qemu-devel] [PATCH 0/5] tests/vm: Python 3, improve image caching, and misc

2019-03-29 Thread Wainer dos Santos Moschetta
Hi all! This series bundles the support to Python3, improvement to image caching, and miscellaneous changes for the vm-test (`make vm-build-*`). Git tree: http://github.com/wainersm/qemu Branch: vm_test_python3_and_misc Travis: https://travis-ci.org/wainersm/qemu/builds/513220300 Below you can

[Qemu-devel] [PATCH 4/5] tests/vm: Fix build-centos docker-based tests run

2019-03-29 Thread Wainer dos Santos Moschetta
`make vm-build-centos` run docker-based tests on CentOS. The created containers should have network otherwise some tests fail. Also fixed the BUILD_SCRIPT template to correctly evaluate "V=1" for verbose output. Signed-off-by: Wainer dos Santos Moschetta --- tests/vm/centos | 6 +++--- 1 file ch

[Qemu-devel] [PATCH 1/5] tests/vm: Use python configured on build

2019-03-29 Thread Wainer dos Santos Moschetta
Changed the vm-test makefile to execute python scripts with the interpreter configured on build. This allows to run vm-test targets properly in Linux distros with Python 3 only support. Signed-off-by: Wainer dos Santos Moschetta --- tests/vm/Makefile.include | 4 ++-- 1 file changed, 2 insertion

[Qemu-devel] [PATCH v4 3/4] linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes

2019-03-29 Thread Richard Henderson
For aarch64, this includes the GNU_PROPERTY_AARCH64_FEATURE_1_BTI bit, which indicates that the image should be mapped with guarded pages. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 79 ++-- 1 file changed, 68 insertions(+), 11 deletions(-

[Qemu-devel] [PATCH 2/5] tests/vm: Port basevm to Python 3

2019-03-29 Thread Wainer dos Santos Moschetta
Fixed tests/vm/basevm.py to run with Python 3: - hashlib.sha1() requires an binary encoded object. - uses floor division ("//") (PEP 238). - decode bytes to unicode when needed. Signed-off-by: Wainer dos Santos Moschetta --- tests/vm/basevm.py | 8 1 file changed, 4 insertions(+), 4

[Qemu-devel] [PATCH v4 1/4] linux-user/aarch64: Reset btype for syscalls and signals

2019-03-29 Thread Richard Henderson
The value of btype for syscalls is CONSTRAINED UNPREDICTABLE, so we need to make sure that the value is 0 before clone, fork, or syscall return. The value of btype for signals is defined, but it does not make sense for a SIGILL handler to enter with the btype set as for the indirect branch that ca

[Qemu-devel] [PATCH 5/5] tests/vm: Add missing variables on help

2019-03-29 Thread Wainer dos Santos Moschetta
Added description of variables missing on vm-test help. Signed-off-by: Wainer dos Santos Moschetta --- tests/vm/Makefile.include | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 6f82676306..c59411bee0 100644 -

[Qemu-devel] [PATCH for 4.1 v2 1/6] linux-user/riscv: Add the CPU type as a comment

2019-03-29 Thread Alistair Francis
Signed-off-by: Alistair Francis --- linux-user/riscv/target_elf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/riscv/target_elf.h b/linux-user/riscv/target_elf.h index a6716a6aac..9dd65652ee 100644 --- a/linux-user/riscv/target_elf.h +++ b/linux-user/riscv/target_elf.h @@ -9,6 +

[Qemu-devel] [PATCH 3/5] tests/vm: Detect the image changed on server

2019-03-29 Thread Wainer dos Santos Moschetta
The current implementation of basevm does not check if the image file to be downloaded has changed on server side before honouring the cache. So any change on server-side file can go unnoticed, keeping the cached image. This change implements a simple mechanism to detect the image file changed by

[Qemu-devel] [PATCH for 4.1 v2 4/6] riscv: virt: Allow specifying a CPU via commandline

2019-03-29 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/riscv/virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index fc4c6b306e..5b25f028ad 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -400,7 +400,7 @@ static void riscv_virt_board_init(Machine

[Qemu-devel] [PATCH for 4.1 v2 5/6] target/riscv: Remove the generic no MMU CPUs

2019-03-29 Thread Alistair Francis
These can now be specified via the command line so we no longer need these. Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 2 -- target/riscv/cpu.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index b6408e0a83..758201331c 100644 --- a/ta

[Qemu-devel] [PATCH for 4.1 v2 6/6] riscv: Add a generic spike machine

2019-03-29 Thread Alistair Francis
Add a generic spike machine (not tied to a version) and deprecate the spike mahines that are tied to a specific version. As we can now specify the CPU via the command line we no londer need specific versions of the spike machines. Signed-off-by: Alistair Francis --- hw/riscv/spike.c | 106 ++

[Qemu-devel] [PATCH for 4.1 v2 3/6] target/riscv: Create settable CPU properties

2019-03-29 Thread Alistair Francis
Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 52 ++ target/riscv/cpu.h | 8 +++ 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 31561c719f..b6408e0a83 100644 --- a/target/ris

[Qemu-devel] [PATCH] migration/ram.c: Fix codes conflict about bitmap_mutex

2019-03-29 Thread Zhang Chen
From: Zhang Chen I found upstream codes conflict with COLO and lead to crash, and I located to this patch: commit 386a907b37a9321bc5d699bc37104d6ffba1b34d Author: Wei Wang Date: Tue Dec 11 16:24:49 2018 +0800 migration: use bitmap_mutex in migration_bitmap_clear_dirty My colleague Wei's pat

[Qemu-devel] [PATCH for 4.1 v2 0/6] RISC-V: Allow specifying CPU ISA via command line

2019-03-29 Thread Alistair Francis
This patch series adds a generic RISC-V CPU that can be generated at run time based on the ISA string specified to QEMU via the -cpu argument. This is supported on the virt and spike boards allowing users to specify the RISC-V extensions as well as the ISA version. As part of the conversion we hav

[Qemu-devel] [PATCH for 4.1 v2 2/6] target/riscv: Fall back to generating a RISC-V CPU

2019-03-29 Thread Alistair Francis
If a user specifies a CPU that we don't understand then we want to fall back to a CPU generated from the ISA string. At the moment the generated CPU is assumed to be a privledge spec version 1.10 CPU with an MMU. This can be changed in the future. Signed-off-by: Alistair Francis --- target/risc

Re: [Qemu-devel] [PATCH 0/5] QEMU VFIO live migration

2019-03-29 Thread Zhao Yan
On Fri, Mar 29, 2019 at 10:26:39PM +0800, Alex Williamson wrote: > On Thu, 28 Mar 2019 22:47:04 -0400 > Zhao Yan wrote: > > > On Fri, Mar 29, 2019 at 12:04:31AM +0800, Alex Williamson wrote: > > > On Thu, 28 Mar 2019 10:21:38 +0100 > > > Erik Skultety wrote: > > > > > > > On Thu, Mar 28, 2019

Re: [Qemu-devel] [PATCH for-4.1 v2 21/36] target/riscv: Use env_cpu, env_archcpu

2019-03-29 Thread Alistair Francis
On Thu, Mar 28, 2019 at 4:30 PM Richard Henderson wrote: > > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h | 5 - > linux-user/riscv/cpu_loop.c | 2 +- > target/riscv/cpu_helper.c | 4 ++-- > target/riscv/csr.c |

Re: [Qemu-devel] [PATCH for-4.0 v3 0/6] NBD server alignment improvement

2019-03-29 Thread Eric Blake
On 3/29/19 11:40 AM, Richard W.M. Jones wrote: > > I tested this version of qemu against the nbdkit test suite and it > passed. > > It also fixes the problem with qemu-img convert: > > $ ./nbdkit -U - memory size=511 --run 'qemu-img convert $nbd /var/tmp/out' > > There are a couple of issues

Re: [Qemu-devel] [PATCH v3 7/6] nbd/client: Ignore inaccessible tail of inconsistent server

2019-03-29 Thread Eric Blake
On 3/29/19 11:54 AM, Vladimir Sementsov-Ogievskiy wrote: > 29.03.2019 19:34, Eric Blake wrote: >> The NBD spec suggests that a server should never advertise a size >> inconsistent with its minimum block alignment, as that tail is >> effectively inaccessible to a compliant client obeying those block

[Qemu-devel] [PATCH] MAINTAINERS: Add unmaintained bitmap file to related field

2019-03-29 Thread Zhang Chen
From: Zhang Chen Add bitmap.h and bitops.h to Dirty Bitmaps field. Signed-off-by: Zhang Chen --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 56139ac8ab..360af3e8ca 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1773,6 +1773,8 @@ S: Supporte

Re: [Qemu-devel] [PATCH] bitops.h: Remove unused bitops function test_and_change_bit()

2019-03-29 Thread Zhang, Chen
About this patch, do we need merge similar function as one with return value? For example: test_and_set_bit()/set_bit(), test_and_clear_bit()/clear_bit(). Thanks Zhang Chen > -Original Message- > From: Zhang, Chen > Sent: Saturday, March 30, 2019 4:05 AM > To: Dr. David Alan Gilbert ; qem

[Qemu-devel] [PATCH] bitops.h: Remove unused bitops function test_and_change_bit()

2019-03-29 Thread Zhang Chen
From: Zhang Chen In current codes we use change_bit() to finish the job. Signed-off-by: Zhang Chen --- include/qemu/bitmap.h | 1 - include/qemu/bitops.h | 15 --- 2 files changed, 16 deletions(-) diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index 5c313346b9..6b71ef

Re: [Qemu-devel] [PATCH] migration: not necessary to check ops again

2019-03-29 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > During each iteration, se->ops is checked before each loop. So it is not > necessary to check it again and simplify the following check a little. > > Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert > --- > migration/savevm.c | 14

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 19:00 hat Vladimir Sementsov-Ogievskiy geschrieben: > 29.03.2019 20:58, Vladimir Sementsov-Ogievskiy wrote: > > 29.03.2019 20:44, Max Reitz wrote: > >> On 29.03.19 18:40, Kevin Wolf wrote: > >>> Am 29.03.2019 um 18:30 hat Max Reitz geschrieben: > On 29.03.19 18:24, Kevin Wolf

Re: [Qemu-devel] [PATCH] migration: comment VMSTATE_UNUSED*() properly

2019-03-29 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It is error prone to use VMSTATE_UNUSED*() sometimes especially when > the size of the migration stream of the field is not the same as the > size of the structure (boolean is one example). Comment it well so > people will be aware of this when people want t

Re: [Qemu-devel] [PATCH v5 5/5] qcow2-refcount: don't mask corruptions under internal errors

2019-03-29 Thread Max Reitz
On 20.03.19 18:26, John Snow wrote: > > > On 2/27/19 8:18 AM, Max Reitz wrote: >> On 27.02.19 14:14, Vladimir Sementsov-Ogievskiy wrote: >>> No reasons for not reporting found corruptions as corruptions in case >>> of some internal errors, especially in case of just failed to fix l2 >>> entry (an

Re: [Qemu-devel] Issues around TYPE_INTERFACE

2019-03-29 Thread Markus Armbruster
Paolo Bonzini writes: > On 18/03/19 13:50, Markus Armbruster wrote: >>> I actually wonder why we even need "OBJECT_CLASS" as it exists here >>> at all. >>> >>> $ git grep 'OBJECT_CLASS\b' | wc -l >>> 38 >>> $ git grep 'OBJECT_CLASS_CHECK\b' | wc -l >>> 196 >>> >>> There's no obvious pattern in wh

[Qemu-devel] [PULL v2 1/1] pc-bios: Update palcode-clipper

2019-03-29 Thread Richard Henderson
Report machine checks to the kernel. It is now using these for probing missing devices. Signed-off-by: Richard Henderson --- pc-bios/palcode-clipper | Bin 155968 -> 156328 bytes roms/qemu-palcode | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/palcode-clippe

[Qemu-devel] [PULL v2 0/1] target/alpha: Update firmware image

2019-03-29 Thread Richard Henderson
The following changes since commit d132baa05ed7a647067c807fd452ec794cc2ecb7: Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2019-03-25 17:01:10 +) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-axp-20190325

Re: [Qemu-devel] [PATCH] Fix 32-bit compilation with gcc 5.5

2019-03-29 Thread Philippe Mathieu-Daudé
Le ven. 29 mars 2019 18:41, Peter Maydell a écrit : > On Fri, 29 Mar 2019 at 17:23, Philippe Mathieu-Daudé > wrote: > > > > Le ven. 29 mars 2019 13:53, Andrew Randrianasulu < > randrianas...@gmail.com> > > a écrit : > > > > > В сообщении от Friday 29 March 2019 11:40:42 Alex Bennée написал(а): >

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 20:58, Vladimir Sementsov-Ogievskiy wrote: > 29.03.2019 20:44, Max Reitz wrote: >> On 29.03.19 18:40, Kevin Wolf wrote: >>> Am 29.03.2019 um 18:30 hat Max Reitz geschrieben: On 29.03.19 18:24, Kevin Wolf wrote: > Am 29.03.2019 um 18:15 hat Max Reitz geschrieben: >> On 29.03.

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 20:44, Max Reitz wrote: > On 29.03.19 18:40, Kevin Wolf wrote: >> Am 29.03.2019 um 18:30 hat Max Reitz geschrieben: >>> On 29.03.19 18:24, Kevin Wolf wrote: Am 29.03.2019 um 18:15 hat Max Reitz geschrieben: > On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: >> bdrv_rep

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Max Reitz
On 29.03.19 18:54, Vladimir Sementsov-Ogievskiy wrote: > 29.03.2019 20:39, Max Reitz wrote: >> On 29.03.19 18:31, Vladimir Sementsov-Ogievskiy wrote: >>> 29.03.2019 20:15, Max Reitz wrote: On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: > bdrv_replace_child() calls bdrv_check_perm()

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 20:39, Max Reitz wrote: > On 29.03.19 18:31, Vladimir Sementsov-Ogievskiy wrote: >> 29.03.2019 20:15, Max Reitz wrote: >>> On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: bdrv_replace_child() calls bdrv_check_perm() with error_abort on loosening permissions. However file

Re: [Qemu-devel] [PATCH 1/2] vl: Fix to create accel compat props before migration object again

2019-03-29 Thread Markus Armbruster
Igor Mammedov writes: > On Fri, 29 Mar 2019 15:34:59 +0100 > Markus Armbruster wrote: > >> Igor Mammedov writes: >> >> > On Wed, 27 Mar 2019 16:03:46 +0100 >> > Markus Armbruster wrote: >> > >> >> Recent commit cda4aa9a5a0 moved block backend creation before machine >> >> property evaluatio

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Max Reitz
On 29.03.19 18:40, Kevin Wolf wrote: > Am 29.03.2019 um 18:30 hat Max Reitz geschrieben: >> On 29.03.19 18:24, Kevin Wolf wrote: >>> Am 29.03.2019 um 18:15 hat Max Reitz geschrieben: On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: > bdrv_replace_child() calls bdrv_check_perm() with

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 18:30 hat Max Reitz geschrieben: > On 29.03.19 18:24, Kevin Wolf wrote: > > Am 29.03.2019 um 18:15 hat Max Reitz geschrieben: > >> On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: > >>> bdrv_replace_child() calls bdrv_check_perm() with error_abort on > >>> loosening permissio

Re: [Qemu-devel] [PATCH] Fix 32-bit compilation with gcc 5.5

2019-03-29 Thread Peter Maydell
On Fri, 29 Mar 2019 at 17:23, Philippe Mathieu-Daudé wrote: > > Le ven. 29 mars 2019 13:53, Andrew Randrianasulu > a écrit : > > > В сообщении от Friday 29 March 2019 11:40:42 Alex Bennée написал(а): > > > This will break 64 bit compiles: > > > > > > ui/curses.c: In function ‘get_ucs’: > > >

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Max Reitz
On 29.03.19 18:31, Vladimir Sementsov-Ogievskiy wrote: > 29.03.2019 20:15, Max Reitz wrote: >> On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: >>> bdrv_replace_child() calls bdrv_check_perm() with error_abort on >>> loosening permissions. However file-locking operations may fail even >>> in

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 20:30, Max Reitz wrote: > On 29.03.19 18:24, Kevin Wolf wrote: >> Am 29.03.2019 um 18:15 hat Max Reitz geschrieben: >>> On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: bdrv_replace_child() calls bdrv_check_perm() with error_abort on loosening permissions. However file-lo

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 20:15, Max Reitz wrote: > On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: >> bdrv_replace_child() calls bdrv_check_perm() with error_abort on >> loosening permissions. However file-locking operations may fail even >> in this case, for example on NFS. And this leads to Qemu crash.

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Max Reitz
On 29.03.19 18:24, Kevin Wolf wrote: > Am 29.03.2019 um 18:15 hat Max Reitz geschrieben: >> On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: >>> bdrv_replace_child() calls bdrv_check_perm() with error_abort on >>> loosening permissions. However file-locking operations may fail even >>> in thi

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] qmp: Add query-qemu-features

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 18:04 hat Kevin Wolf geschrieben: > Am 29.03.2019 um 16:06 hat Eric Blake geschrieben: > > On 3/29/19 8:52 AM, Markus Armbruster wrote: > > > Subjective summary: > > > > > > * For the known use cases, query-qemu-features is merely a crutch for > > > getting information into the

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 18:15 hat Max Reitz geschrieben: > On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: > > bdrv_replace_child() calls bdrv_check_perm() with error_abort on > > loosening permissions. However file-locking operations may fail even > > in this case, for example on NFS. And this lea

Re: [Qemu-devel] [PATCH v3] block/file-posix: do not fail on unlock bytes

2019-03-29 Thread Max Reitz
On 29.03.19 12:04, Vladimir Sementsov-Ogievskiy wrote: > bdrv_replace_child() calls bdrv_check_perm() with error_abort on > loosening permissions. However file-locking operations may fail even > in this case, for example on NFS. And this leads to Qemu crash. > > Let's avoid such errors. Note, that

Re: [Qemu-devel] [PATCH 10/14] usb-mtp: avoid warning about unaligned access to filename

2019-03-29 Thread Peter Maydell
On Fri, 29 Mar 2019 at 15:27, Daniel P. Berrangé wrote: > Yeah this code is even more of a disaster than i realized. This filename > handling is probably CVE worthy. My subjective impression is that hw/usb/dev-mtp.c has also been a fertile source of Coverity scan issues; if anybody with an unders

Re: [Qemu-devel] [PATCH] Fix 32-bit compilation with gcc 5.5

2019-03-29 Thread Philippe Mathieu-Daudé
Le ven. 29 mars 2019 13:53, Andrew Randrianasulu a écrit : > В сообщении от Friday 29 March 2019 11:40:42 Alex Bennée написал(а): > > > > Andrew Randrianasulu writes: > > > > > --- > > > ui/curses.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/ui/curses.c

Re: [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 14:14 hat Markus Armbruster geschrieben: > Markus Armbruster writes: > > > Kevin Wolf writes: > > > >> auto-read-only=on changed its behaviour in file-posix for the 4.0 > >> release. > > > > Commit hash, please. > > I guess it's commit 23dece19da4 "file-posix: Make auto-read-on

Re: [Qemu-devel] [PATCH 3/3] block/stream: introduce a bottom node

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 19:07, Alberto Garcia wrote: > On Fri 29 Mar 2019 02:29:14 PM CET, Andrey Shinkevich wrote: >> @@ -3237,7 +3238,14 @@ void qmp_block_stream(bool has_job_id, const char >> *job_id, const char *device, >> job_flags |= JOB_MANUAL_DISMISS; >> } >> >> -stream_start(has

Re: [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature

2019-03-29 Thread Markus Armbruster
Markus Armbruster writes: > Markus Armbruster writes: > >> Markus Armbruster writes: >> >>> Kevin Wolf writes: >>> auto-read-only=on changed its behaviour in file-posix for the 4.0 release. >>> >>> Commit hash, please. >> >> I guess it's commit 23dece19da4 "file-posix: Make auto-read

Re: [Qemu-devel] [PATCH 1/3] block: include base when checking image chain for block allocation

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 16:29, Andrey Shinkevich wrote: > A caller of the function bdrv_is_allocated_above() may want to > include the base node in the search. It is useful when we have > parallel commit/stream jobs on the same backing image chain. The > base node may be a top one of a parallel job at the same

Re: [Qemu-devel] [PATCH 3/3] block/stream: introduce a bottom node

2019-03-29 Thread Andrey Shinkevich
On 29/03/2019 19:07, Alberto Garcia wrote: > On Fri 29 Mar 2019 02:29:14 PM CET, Andrey Shinkevich wrote: >> @@ -3237,7 +3238,14 @@ void qmp_block_stream(bool has_job_id, const char >> *job_id, const char *device, >> job_flags |= JOB_MANUAL_DISMISS; >> } >> >> -stream_star

Re: [Qemu-devel] [PATCH 1/2] qmp: Add query-qemu-features

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 16:06 hat Eric Blake geschrieben: > On 3/29/19 8:52 AM, Markus Armbruster wrote: > > Subjective summary: > > > > * For the known use cases, query-qemu-features is merely a crutch for > > getting information into the QAPI QMP schema. Such crutches are ugly, > > but in absence

Re: [Qemu-devel] [PATCH 2/3] block/stream: refactor stream_run: drop goto

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
missed From: 29.03.2019 16:29, Andrey Shinkevich wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Andrey Shinkevich > --- > block/stream.c | 13 - > 1 file changed, 4 insertions(+), 9 deletions(-) > > diff --git a/block/stream.c b/block/stream.c > index 6253c

Re: [Qemu-devel] [PATCH v3 4/6] nbd/client: Support qemu-img convert from unaligned size

2019-03-29 Thread Eric Blake
On 3/29/19 10:55 AM, Eric Blake wrote: >>> @@ -966,7 +985,8 @@ int coroutine_fn >>> nbd_client_co_block_status(BlockDriverState *bs, >>> .from = offset, >>> .len = MIN(MIN_NON_ZERO(QEMU_ALIGN_DOWN(INT_MAX, >>> bs->bl.request_al

Re: [Qemu-devel] [PATCH for-4.0 v3 0/6] NBD server alignment improvement

2019-03-29 Thread Richard W.M. Jones
I tested this version of qemu against the nbdkit test suite and it passed. It also fixes the problem with qemu-img convert: $ ./nbdkit -U - memory size=511 --run 'qemu-img convert $nbd /var/tmp/out' There are a couple of issues though (I don't think you'll think they are bugs). Firstly it r

Re: [Qemu-devel] [PATCH for-4.0 v2 0/3] freeze the backing chain earlier in stream_start()

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 15:16 hat Alberto Garcia geschrieben: > On Fri 29 Mar 2019 02:16:16 PM CET, Kevin Wolf wrote: > >> this series fixes the bug that I found the other day and described here: > >> > >>https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00764.html > >>https://lists.gnu.or

[Qemu-devel] [PATCH v3 7/6] nbd/client: Ignore inaccessible tail of inconsistent server

2019-03-29 Thread Eric Blake
The NBD spec suggests that a server should never advertise a size inconsistent with its minimum block alignment, as that tail is effectively inaccessible to a compliant client obeying those block constraints. Although the block layer likes to round up, here, we'd prefer to truncate down to obey the

Re: [Qemu-devel] [PATCH 3/3] block/stream: introduce a bottom node

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 16:29, Andrey Shinkevich wrote: > The bottom node is the intermediate block device that has the base as its > backing image. It is used instead of the base node while a block stream > job is running to avoid dependency on the base that may change due to the > parallel jobs. The change ma

Re: [Qemu-devel] [PATCH 1/2] qmp: Add query-qemu-features

2019-03-29 Thread Markus Armbruster
Eric Blake writes: > On 3/29/19 8:52 AM, Markus Armbruster wrote: > >> The basic idea is simple. Let me explain with an example. >> >> Instead of what I proposed above: >> >> { 'union': 'BlockdevOptions', >>'base': { 'driver': 'BlockdevDriver', >> '*node-name': 's

Re: [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature

2019-03-29 Thread Kevin Wolf
Am 29.03.2019 um 17:19 hat Markus Armbruster geschrieben: > Markus Armbruster writes: > > > Markus Armbruster writes: > > > >> Markus Armbruster writes: > >> > >>> Kevin Wolf writes: > >>> > auto-read-only=on changed its behaviour in file-posix for the 4.0 > release. > >>> > >>> Comm

Re: [Qemu-devel] [RFC PATCH] pci: Use PCI aliases when determining device IOMMU address space

2019-03-29 Thread Alex Williamson
[Cc +Brijesh] Hi Brijesh, will the change below require the IVRS to be updated to include aliases for all BDF ranges behind a conventional bridge? I think the Linux code handles this regardless of the firmware provided aliases, but is it required per spec for the ACPI tables to include bridge ali

Re: [Qemu-devel] [PATCH v3 7/6] nbd/client: Ignore inaccessible tail of inconsistent server

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 19:34, Eric Blake wrote: > The NBD spec suggests that a server should never advertise a size > inconsistent with its minimum block alignment, as that tail is > effectively inaccessible to a compliant client obeying those block > constraints. Although the block layer likes to round up, he

Re: [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature

2019-03-29 Thread Markus Armbruster
Markus Armbruster writes: > Markus Armbruster writes: > >> Kevin Wolf writes: >> >>> auto-read-only=on changed its behaviour in file-posix for the 4.0 >>> release. >> >> Commit hash, please. > > I guess it's commit 23dece19da4 "file-posix: Make auto-read-only > dynamic". > >>> This cha

Re: [Qemu-devel] [PATCH 3/3] block/stream: introduce a bottom node

2019-03-29 Thread Alberto Garcia
On Fri 29 Mar 2019 02:29:14 PM CET, Andrey Shinkevich wrote: > @@ -3237,7 +3238,14 @@ void qmp_block_stream(bool has_job_id, const char > *job_id, const char *device, > job_flags |= JOB_MANUAL_DISMISS; > } > > -stream_start(has_job_id ? job_id : NULL, bs, base_bs, base_name, >

Re: [Qemu-devel] [PATCH 1/2] qmp: Add query-qemu-features

2019-03-29 Thread Markus Armbruster
Kevin Wolf writes: > From: Stefan Hajnoczi > > QMP clients can usually detect the presence of features via schema > introspection. There are rare features that do not involve schema > changes and are therefore impossible to detect with schema > introspection. > > This patch adds the query-qemu-

Re: [Qemu-devel] [PATCH 4/8] i386/kvm: implement 'hv-all' pass-through mode

2019-03-29 Thread Vitaly Kuznetsov
"Dr. David Alan Gilbert" writes: > Yep, that's probably safest; although if you recorded the features used > in the migration stream you could check for those on the destination and > if they mismatch complain then. > There is no clear use-case for hv-all other than development at this moment; a

Re: [Qemu-devel] [PATCH v3 4/6] nbd/client: Support qemu-img convert from unaligned size

2019-03-29 Thread Eric Blake
On 3/29/19 10:26 AM, Vladimir Sementsov-Ogievskiy wrote: > 29.03.2019 7:27, Eric Blake wrote: >> If an NBD server advertises a size that is not a multiple of a sector, >> the block layer rounds up that size, even though we set info.size to >> the exact byte value sent by the server. The block layer

Re: [Qemu-devel] [qemu-s390x] [PATCH 13/14] hw/s390x/ipl: avoid taking address of fields in packed struct

2019-03-29 Thread Thomas Huth
On 29/03/2019 12.11, Daniel P. Berrangé wrote: > Compiling with GCC 9 complains > > hw/s390x/ipl.c: In function ‘s390_ipl_set_boot_menu’: > hw/s390x/ipl.c:256:25: warning: taking address of packed member of ‘struct > QemuIplParameters’ may result in an unaligned pointer value > [-Waddress-of-pac

Re: [Qemu-devel] [PATCH v3 1/6] iotests: Add 241 to test NBD on unaligned images

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 7:27, Eric Blake wrote: > Add a test for the NBD client workaround in the previous patch. previous is "nbd-client: Work around server BLOCK_STATUS misalignment at EOF" I've checked, that before it (in ericb/nbd) test fails and after succeeds: Tested-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [PATCH 2/3] util: add required space to fix checkpatch errors

2019-03-29 Thread Thomas Huth
On 29/03/2019 16.08, Jules Irenge wrote: > Add required space to fix errors issued by checkpatch.pl tool > "ERROR: space required after that ..." > within "util/readline.c" file. > > Signed-off-by: Jules Irenge > --- > util/readline.c | 10 +- > 1 file changed, 5 insertions(+), 5 deleti

Re: [Qemu-devel] [PATCH 1/3] util: add a space before an open parenthesis to fix checkpatch errors

2019-03-29 Thread Thomas Huth
On 29/03/2019 16.08, Jules Irenge wrote: > Add a space before open parenthesis to fix errors issued by checkpatch.pl > "ERROR: space required before the open parenthesis" > within "util/readline.c" file. > > Signed-off-by: Jules Irenge > --- > util/readline.c | 26 +- >

Re: [Qemu-devel] [PATCH 4/8] i386/kvm: implement 'hv-all' pass-through mode

2019-03-29 Thread Dr. David Alan Gilbert
* Vitaly Kuznetsov (vkuzn...@redhat.com) wrote: > In many case we just want to give Windows guests all currently supported > Hyper-V enlightenments and that's where this new mode may come handy. We > pass through what was returned by KVM_GET_SUPPORTED_HV_CPUID. > > hv_cpuid_check_and_set() is modi

Re: [Qemu-devel] [PATCH 10/14] usb-mtp: avoid warning about unaligned access to filename

2019-03-29 Thread Daniel P . Berrangé
On Fri, Mar 29, 2019 at 12:04:45PM +, Peter Maydell wrote: > On Fri, 29 Mar 2019 at 11:22, Daniel P. Berrangé wrote: > > > > The 'filename' field in ObjectInfo struct is declared as a > > zero length array of uint16_t. Accessing it is equivalent > > to taking the address of the field, and taki

Re: [Qemu-devel] [PATCH v3 4/6] nbd/client: Support qemu-img convert from unaligned size

2019-03-29 Thread Vladimir Sementsov-Ogievskiy
29.03.2019 7:27, Eric Blake wrote: > If an NBD server advertises a size that is not a multiple of a sector, > the block layer rounds up that size, even though we set info.size to > the exact byte value sent by the server. The block layer then proceeds > to let us read or query block status on the h

Re: [Qemu-devel] [PATCH 12/14] hw/s390/css: avoid taking address members in packed structs

2019-03-29 Thread Thomas Huth
On 29/03/2019 12.11, Daniel P. Berrangé wrote: > The GCC 9 compiler complains about many places in s390 code > that take the address of members of the 'struct SCHIB' which > is marked packed: > > hw/s390x/css.c: In function ‘sch_handle_clear_func’: > hw/s390x/css.c:698:15: warning: taking address

Re: [Qemu-devel] [PATCH 1/2] vl: Fix to create accel compat props before migration object again

2019-03-29 Thread Igor Mammedov
On Fri, 29 Mar 2019 15:34:59 +0100 Markus Armbruster wrote: > Igor Mammedov writes: > > > On Wed, 27 Mar 2019 16:03:46 +0100 > > Markus Armbruster wrote: > > > >> Recent commit cda4aa9a5a0 moved block backend creation before machine > >> property evaluation. This broke block backends regist

Re: [Qemu-devel] [PATCH for-4.1] hw/ssi/xilinx_spips: Avoid variable length array

2019-03-29 Thread Stefano Garzarella
On Fri, Mar 29, 2019 at 01:50:04PM +, Peter Maydell wrote: > On Fri, 29 Mar 2019 at 13:13, Stefano Garzarella wrote: > > > > On Thu, Mar 28, 2019 at 03:26:35PM +, Peter Maydell wrote: > > > In the stripe8() function we use a variable length array; however > > > we know that the maximum len

Re: [Qemu-devel] [PATCH 0/3] util/readline: coding style clean-up with regards to TABs and spaces

2019-03-29 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190329150844.14180-1-jbi.oct...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190329150844.14180-1-jbi.oct...@gmail.com Subject: [Qemu-devel] [PATCH 0/3] util/readline: coding s

Re: [Qemu-devel] Following up questions related to QEMU and I/O Thread

2019-03-29 Thread Wei Li
Thanks Stefan for your reply and guidance! We spent some time on exploring the multiple I/O Threads approach per your feedback. Based on the perf measurement data, we did see some IOPS improvement for multiple volumes, which is great. :) In addition, IOPS for single Volume will still be a bottl

Re: [Qemu-devel] Issues around TYPE_INTERFACE

2019-03-29 Thread Paolo Bonzini
On 18/03/19 13:50, Markus Armbruster wrote: >> I actually wonder why we even need "OBJECT_CLASS" as it exists here >> at all. >> >> $ git grep 'OBJECT_CLASS\b' | wc -l >> 38 >> $ git grep 'OBJECT_CLASS_CHECK\b' | wc -l >> 196 >> >> There's no obvious pattern in why OBJECT_CLASS is being favoured. >

[Qemu-devel] [PATCH 2/3] util: add required space to fix checkpatch errors

2019-03-29 Thread Jules Irenge
Add required space to fix errors issued by checkpatch.pl tool "ERROR: space required after that ..." within "util/readline.c" file. Signed-off-by: Jules Irenge --- util/readline.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/readline.c b/util/readline.c in

[Qemu-devel] [PATCH 3/3] util: readline: replace tab indent by four spaces to fix checkpatch errors

2019-03-29 Thread Jules Irenge
Replace tab indent by four spaces to fix errors issued by checkpatch.pl tool "ERROR: code indent should never use tabs" within "util/readline.c" file. Signed-off-by: Jules Irenge --- util/readline.c | 102 1 file changed, 51 insertions(+), 51 dele

[Qemu-devel] [PATCH 0/3] util/readline: coding style clean-up with regards to TABs and spaces

2019-03-29 Thread Jules Irenge
Jules Irenge (3): util: add a space before an open parenthesis to fix checkpatch errors util: add required space to fix checkpatch errors util: readline: replace tab indent by four spaces to fix checkpatch errors util/readline.c | 132 1

[Qemu-devel] [PATCH 1/3] util: add a space before an open parenthesis to fix checkpatch errors

2019-03-29 Thread Jules Irenge
Add a space before open parenthesis to fix errors issued by checkpatch.pl "ERROR: space required before the open parenthesis" within "util/readline.c" file. Signed-off-by: Jules Irenge --- util/readline.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff -

Re: [Qemu-devel] [PATCH 1/2] qmp: Add query-qemu-features

2019-03-29 Thread Eric Blake
On 3/29/19 8:52 AM, Markus Armbruster wrote: > The basic idea is simple. Let me explain with an example. > > Instead of what I proposed above: > > { 'union': 'BlockdevOptions', >'base': { 'driver': 'BlockdevDriver', > '*node-name': 'str', > '*disca

Re: [Qemu-devel] [qemu-s390x] [PATCH 11/14] hw/vfio/ccw: avoid taking address members in packed structs

2019-03-29 Thread Eric Farman
On 3/29/19 7:11 AM, Daniel P. Berrangé wrote: The GCC 9 compiler complains about many places in s390 code that take the address of members of the 'struct SCHIB' which is marked packed: hw/vfio/ccw.c: In function ‘vfio_ccw_io_notifier_handler’: hw/vfio/ccw.c:133:15: warning: taking address of

Re: [Qemu-devel] [PATCH 1/2] vl: Fix to create accel compat props before migration object again

2019-03-29 Thread Markus Armbruster
Igor Mammedov writes: > On Wed, 27 Mar 2019 16:03:46 +0100 > Markus Armbruster wrote: > >> Recent commit cda4aa9a5a0 moved block backend creation before machine >> property evaluation. This broke block backends registering migration >> blockers. Commit e60483f2f84 fixed it by moving migration

Re: [Qemu-devel] [PATCH v2 1/3] iotests: Add 241 to test NBD on unaligned images

2019-03-29 Thread Eric Blake
On 3/29/19 2:58 AM, Kevin Wolf wrote: +seq="$(basename $0)" +echo "QA output created by $seq" + +status=1 # failure is the default! + +nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket +rm -f "${TEST_DIR}/qemu-nbd.pid" >>> >>> hmm, strange that we need to remove som

Re: [Qemu-devel] [PATCH 2/2] Add file-posix-dynamic-auto-read-only feature

2019-03-29 Thread Markus Armbruster
Peter Krempa writes: > On Fri, Mar 29, 2019 at 14:05:46 +0100, Markus Armbruster wrote: >> Peter Krempa writes: >> >> [...] >> > Whether there is a static entry in the QMP schema (which feels wrong >> > btw as it does not actually expose something which is regarding the >> > interaction with QM

[Qemu-devel] [PATCH 2/8] i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties()

2019-03-29 Thread Vitaly Kuznetsov
Let's consolidate Hyper-V features handling in hyperv_handle_properties(). The change is necessary to support pass-through 'hv-all' mode as we'll be just copying CPUIDs from KVM instead of filling them in. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm.c | 163 +-

[Qemu-devel] [PATCH 7/8] i386/kvm: hv-tlbflush/ipi require hv-vpindex

2019-03-29 Thread Vitaly Kuznetsov
The corresponding hypercalls require using VP indexes. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 524ee28e9c..976c1d570f 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -119

Re: [Qemu-devel] [PATCH 0/5] QEMU VFIO live migration

2019-03-29 Thread Alex Williamson
On Thu, 28 Mar 2019 22:47:04 -0400 Zhao Yan wrote: > On Fri, Mar 29, 2019 at 12:04:31AM +0800, Alex Williamson wrote: > > On Thu, 28 Mar 2019 10:21:38 +0100 > > Erik Skultety wrote: > > > > > On Thu, Mar 28, 2019 at 04:36:03AM -0400, Zhao Yan wrote: > > > > hi Alex and Dave, > > > > Thanks

[Qemu-devel] [PATCH 5/8] i386/kvm: hv-evmcs requires hv-vapic

2019-03-29 Thread Vitaly Kuznetsov
Enlightened VMCS is enabled by writing to a field in VP assist page and these require virtual APIC. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index af45241adb..9edf76e473 100

  1   2   3   >