[Qemu-devel] [PATCH v2] Fix type of cluster_index

2019-04-08 Thread Stefan Weil
The type should be the same as the type of cluster_id. This fixed a runtime error reported by sanitizers: /qemu/include/exec/tb-lookup.h:33:35: runtime error: left shift of negative value -1 /qemu/accel/tcg/translate-all.c:1692:34: runtime error: left shift of negative value -1

Re: [Qemu-devel] [PATCH for-4.0] hw/i386/pc: Fix crash when hot-plugging nvdimm on older machine types

2019-04-08 Thread Markus Armbruster
Eduardo Habkost writes: > On Mon, Apr 08, 2019 at 05:06:49PM +0200, Thomas Huth wrote: >> On 08/04/2019 15.45, Wei Yang wrote: > [...] >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c >> > index 6077d27361..b11f3b15c1 100644 >> > --- a/hw/i386/pc.c >> > +++ b/hw/i386/pc.c >> > @@ -2091,6 +2091,9 @@

[Qemu-devel] [PATCH] Fix type of cluster_index

2019-04-08 Thread Stefan Weil
From: Stefan Weil The type should be the same as the type of cluster_id. This fixed a runtime error reported by sanitizers: /qemu/include/exec/tb-lookup.h:33:35: runtime error: left shift of negative value -1 /qemu/accel/tcg/translate-all.c:1692:34: runtime error: left shift of

Re: [Qemu-devel] [PATCH] sd: Fix out-of-bounds assertions

2019-04-08 Thread Markus Armbruster
Lidong Chen writes: > Due to an off-by-one error, the assert statements allow an > out-of-bounds array access. > > Signed-off-by: Lidong Chen > --- > hw/sd/sd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index aaab15f..818f86c 100644

[Qemu-devel] [PATCH] Update configure

2019-04-08 Thread Stefan Weil
The last *.aml file was removed in commit 13b1881aacc7e5018773bd545bbaf8d5476699ee. Signed-off-by: Stefan Weil --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 1c563a7027..9c5d9a8c96 100755 --- a/configure +++ b/configure @@ -7886,7 +7886,6 @@

[Qemu-devel] [PATCH 1/2] i386: Add avx512 state to reginfo_t

2019-04-08 Thread Richard Henderson
The state beyond what is present on the running cpu will be zero. Signed-off-by: Richard Henderson --- risu_reginfo_i386.h | 15 risu_reginfo_i386.c | 194 ++-- test_i386.S | 39 + 3 files changed, 243 insertions(+), 5 deletions(-)

[Qemu-devel] [RISU 0/2] i386 support for avx

2019-04-08 Thread Richard Henderson
It's quite plausible that we should add a command-line argument for risu, similar to the aarch64 --test-sve option, that explicitly limits the size of the vectors to be recorded or compared. Otherwise I worry about the host supporting AVX-N and wanting to test TCG with a narrower vector insns.

[Qemu-devel] [PATCH 2/2] HACK: Test avx2 state

2019-04-08 Thread Richard Henderson
In order to not be a hack, we'd have to test whether avx2 exists. Signed-off-by: Richard Henderson --- test_i386.S | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test_i386.S b/test_i386.S index 05344d7..55815fe 100644 --- a/test_i386.S

[Qemu-devel] [Bug 1823831] [NEW] BSD bootloader halts with hypervisor.framework

2019-04-08 Thread Chen Zhang
Public bug reported: Guest: FreeBSD 12.0 Install CD Host: MacOS 11.14.3 qemu master at 90fb864a7df0a9af677352e94f8225f7b03de922 Command arguments: qemu-system-x86_64 -m 4000m -cdrom Downloads/FreeBSD-12.0-RELEASE- amd64-bootonly.iso When qemu was run with -accel hvf, the bootloader would halt

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: use variable size of flash device to save memory

2019-04-08 Thread Xiang Zheng
On 2019/4/9 0:14, Laszlo Ersek wrote: > On 04/08/19 15:43, Xiang Zheng wrote: >> >> On 2019/4/3 23:35, Laszlo Ersek wrote: I thought about your comments and wrote the following patch (just for test) which uses a file mapping to replace the anonymous mapping. UEFI seems to work

Re: [Qemu-devel] [PATCH] hostmem-file: warn when memory-backend-file, share=on and in incoming migration

2019-04-08 Thread Catherine Ho
Hi Igor On Mon, 8 Apr 2019 at 18:35, Igor Mammedov wrote: > On Sun, 7 Apr 2019 22:19:05 -0400 > Catherine Ho wrote: > > > Currently it is not forbidden to use "-object > memory-backend-file,share=on" > > and together with "-incoming". But after incoming migration is finished, > > the

[Qemu-devel] [PATCH v2 10/10] block/pflash_cfi02: Use the chip erase time specified in the CFI table

2019-04-08 Thread Stephen Checkoway
When erasing the chip, use the typical time specified in the CFI table rather than arbitrarily selecting 5 seconds. Since the currently unconfigurable value set in the table is 12, this means a chip erase takes 4096 ms so this isn't a big change in behavior. Signed-off-by: Stephen Checkoway ---

[Qemu-devel] [PATCH v2 09/10] block/pflash_cfi02: Implement erase suspend/resume

2019-04-08 Thread Stephen Checkoway
During a sector erase (but not a chip erase), the embeded erase program can be suspended. Once suspended, the sectors not selected for erasure may be read and programmed. Autoselect mode is allowed during erase suspend mode. Presumably, CFI queries are similarly allowed so this commit allows them

[Qemu-devel] [PATCH v2 05/10] block/pflash_cfi02: Implement nonuniform sector sizes

2019-04-08 Thread Stephen Checkoway
Some flash chips support sectors of different sizes. For example, the AMD AM29LV160DT has 31 64 kB sectors, one 32 kB sector, two 8 kB sectors, and a 16 kB sector, in that order. The AM29LV160DB has those in the reverse order. The `num-blocks` and `sector-length` properties work exactly as they

[Qemu-devel] [PATCH v2 08/10] block/pflash_cfi02: Implement multi-sector erase

2019-04-08 Thread Stephen Checkoway
After two unlock cycles and a sector erase command, the AMD flash chips start a 50 us erase time out. Any additional sector erase commands add a sector to be erased and restart the 50 us timeout. During the timeout, status bit DQ3 is cleared. After the time out, DQ3 is asserted during erasure.

[Qemu-devel] [PATCH v2 06/10] block/pflash_cfi02: Fix CFI in autoselect mode

2019-04-08 Thread Stephen Checkoway
After a flash device enters CFI mode from autoselect mode, the reset command returns the device to autoselect mode. An additional reset command is necessary to return to read array mode. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 21 +

[Qemu-devel] [PATCH v2 02/10] block/pflash_cfi02: Refactor, NFC intended

2019-04-08 Thread Stephen Checkoway
Simplify and refactor for upcoming commits. In particular, pull out all of the code to modify the status into simple helper functions. Status handling becomes more complex once multiple chips are interleaved to produce a single device. No change in functionality is intended with this commit.

[Qemu-devel] [PATCH v2 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-04-08 Thread Stephen Checkoway
It's common for multiple narrow flash chips to be hooked up in parallel to support wider buses. For example, four 8-bit wide flash chips (x8) may be combined in parallel to produce a 32-bit wide device. Similarly, two 16-bit wide chips (x16) may be combined. This commit introduces `device-width`

[Qemu-devel] [PATCH v2 07/10] block/pflash_cfi02: Fix reset command not ignored during erase

2019-04-08 Thread Stephen Checkoway
When the flash device is performing a chip erase, all commands are ignored. When it is performing a sector erase, only the erase suspend command is valid, which is currently not supported. In particular, the reset command should not cause the device to reset to read array mode while programming

[Qemu-devel] [PATCH v2 03/10] block/pflash_cfi02: Fix command address comparison

2019-04-08 Thread Stephen Checkoway
Most AMD commands only examine 11 bits of the address. This masks the addresses used in the comparison to 11 bits. The exceptions are word or sector addresses which use offset directly rather than the shifted offset, boff. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 8

[Qemu-devel] [PATCH v2 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-08 Thread Stephen Checkoway
Test the AMD command set for parallel flash chips. This test uses an ARM musicpal board with a pflash drive to test the following list of currently-supported commands. - Autoselect - CFI - Sector erase - Chip erase - Program - Unlock bypass - Reset Signed-off-by: Stephen Checkoway ---

[Qemu-devel] [PATCH v2 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-08 Thread Stephen Checkoway
The goal of this patch series implement the following AMD command-set parallel flash functionality: - flash interleaving; - nonuniform sector sizes; - erase suspend/resume commands; and - multi-sector erase. During refactoring and implementation, I discovered several bugs that are fixed here as

Re: [Qemu-devel] [PATCH] sd: Fix out-of-bounds assertions

2019-04-08 Thread Li Qiang
Lidong Chen 于2019年4月9日周二 上午3:51写道: > Due to an off-by-one error, the assert statements allow an > out-of-bounds array access. > > Signed-off-by: Lidong Chen > Reviewed-by: Li Qiang > --- > hw/sd/sd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/sd/sd.c

Re: [Qemu-devel] [PATCH for-4.0] hw/i386/pc: Fix crash when hot-plugging nvdimm on older machine types

2019-04-08 Thread Eduardo Habkost
On Mon, Apr 08, 2019 at 05:06:49PM +0200, Thomas Huth wrote: > On 08/04/2019 15.45, Wei Yang wrote: [...] > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > index 6077d27361..b11f3b15c1 100644 > > --- a/hw/i386/pc.c > > +++ b/hw/i386/pc.c > > @@ -2091,6 +2091,9 @@ static void

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 0/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-04-08 Thread Michael Roth
Quoting Greg Kurz (2019-04-08 11:31:56) > On Mon, 8 Apr 2019 14:21:50 +1000 > David Gibson wrote: > > > On Fri, Mar 29, 2019 at 01:29:51PM +0100, Greg Kurz wrote: > > > On Thu, 28 Mar 2019 15:39:45 -0300 > > > "Maxiwell S. Garcia" wrote: > > > > > > > Hi, > > > > > > > > On Thu, Mar 28,

Re: [Qemu-devel] [RISU PATCH 0/5] Fix RISU build for i386

2019-04-08 Thread Richard Henderson
On 4/8/19 8:27 AM, Jan Bobek wrote: > 1. Most of it is just moving stuff around, however I've implemented >reginfo_dump_mismatch (based on reginfo_dump and code in other >architectures) and defined EAX as the param register. There is no >support for more registers yet, that will need

Re: [Qemu-devel] [PATCH] sd: Fix out-of-bounds assertions

2019-04-08 Thread Lidong Chen
Hi Philippe, On 4/8/2019 2:27 PM, Philippe Mathieu-Daudé wrote: Hi Lidong On 4/8/19 9:04 PM, Lidong Chen wrote: Due to an off-by-one error, the assert statements allow an out-of-bounds array access. ... which can't happen. Thus harmless for 4.0. I suppose this is a static analysis warning

Re: [Qemu-devel] [Qemu-stable] [PATCH] megasas: fix mapped frame size

2019-04-08 Thread Michael Roth
Quoting Peter Lieven (2019-04-04 07:10:15) > the current value of 1024 bytes (16 * MFI_FRAME_SIZE) we map is not enough to > hold > the maximum number of scatter gather elements we advertise. We actually need a > maximum of 2048 bytes. This is 128 max sg elements * 16 bytes (sizeof (union >

Re: [Qemu-devel] [PATCH for-4.0] hw/i386/pc: Fix crash when hot-plugging nvdimm on older machine types

2019-04-08 Thread Wei Yang
On Mon, Apr 08, 2019 at 05:06:49PM +0200, Thomas Huth wrote: >On 08/04/2019 15.45, Wei Yang wrote: >> On Sun, Apr 07, 2019 at 11:23:14AM +0200, Thomas Huth wrote: >>> QEMU currently crashes when you try to hot-plug an "nvdimm" device >>> on older machine types: >>> >>> $ qemu-system-x86_64

Re: [Qemu-devel] [PATCH] sd: Fix out-of-bounds assertions

2019-04-08 Thread Philippe Mathieu-Daudé
Hi Lidong On 4/8/19 9:04 PM, Lidong Chen wrote: > Due to an off-by-one error, the assert statements allow an > out-of-bounds array access. ... which can't happen. Thus harmless for 4.0. I suppose this is a static analysis warning and you didn't triggered it while tracing. Thanks for cleaning

Re: [Qemu-devel] [PATCH 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1554755001.git.stephen.checko...@oberlin.edu/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: cover.1554755001.git.stephen.checko...@oberlin.edu Subject: [Qemu-devel] [PATCH 00/10]

[Qemu-devel] [PATCH 08/10] block/pflash_cfi02: Implement multi-sector erase

2019-04-08 Thread Stephen Checkoway
After two unlock cycles and a sector erase command, the AMD flash chips start a 50 us erase time out. Any additional sector erase commands add a sector to be erased and restart the 50 us timeout. During the timeout, status bit DQ3 is cleared. After the time out, DQ3 is asserted during erasure.

[Qemu-devel] [PATCH 02/10] block/pflash_cfi02: Refactor, NFC intended

2019-04-08 Thread Stephen Checkoway
From: Stephen Checkoway Simplify and refactor for upcoming commits. In particular, pull out all of the code to modify the status into simple helper functions. Status handling becomes more complex once multiple chips are interleaved to produce a single device. No change in functionality is

[Qemu-devel] [PATCH 09/10] block/pflash_cfi02: Implement erase suspend/resume

2019-04-08 Thread Stephen Checkoway
During a sector erase (but not a chip erase), the embeded erase program can be suspended. Once suspended, the sectors not selected for erasure may be read and programmed. Autoselect mode is allowed during erase suspend mode. Presumably, CFI queries are similarly allowed so this commit allows them

[Qemu-devel] [PATCH 03/10] block/pflash_cfi02: Fix command address comparison

2019-04-08 Thread Stephen Checkoway
From: Stephen Checkoway Most AMD commands only examine 11 bits of the address. This masks the addresses used in the comparison to 11 bits. The exceptions are word or sector addresses which use offset directly rather than the shifted offset, boff. Signed-off-by: Stephen Checkoway ---

[Qemu-devel] [PATCH 10/10] block/pflash_cfi02: Use the chip erase time specified in the CFI table

2019-04-08 Thread Stephen Checkoway
When erasing the chip, use the typical time specified in the CFI table rather than arbitrarily selecting 5 seconds. Since the currently unconfigurable value set in the table is 12, this means a chip erase takes 4096 ms so this isn't a big change in behavior. Signed-off-by: Stephen Checkoway ---

[Qemu-devel] [PATCH 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-04-08 Thread Stephen Checkoway
It's common for multiple narrow flash chips to be hooked up in parallel to support wider buses. For example, four 8-bit wide flash chips (x8) may be combined in parallel to produce a 32-bit wide device. Similarly, two 16-bit wide chips (x16) may be combined. This commit introduces `device-width`

[Qemu-devel] [PATCH 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-08 Thread Stephen Checkoway
From: Stephen Checkoway Test the AMD command set for parallel flash chips. This test uses an ARM musicpal board with a pflash drive to test the following list of currently-supported commands. - Autoselect - CFI - Sector erase - Chip erase - Program - Unlock bypass - Reset Signed-off-by: Stephen

[Qemu-devel] [PATCH 07/10] block/pflash_cfi02: Fix reset command not ignored during erase

2019-04-08 Thread Stephen Checkoway
When the flash device is performing a chip erase, all commands are ignored. When it is performing a sector erase, only the erase suspend command is valid, which is currently not supported. In particular, the reset command should not cause the device to reset to read array mode while programming

[Qemu-devel] [PATCH 06/10] block/pflash_cfi02: Fix CFI in autoselect mode

2019-04-08 Thread Stephen Checkoway
After a flash device enters CFI mode from autoselect mode, the reset command returns the device to autoselect mode. An additional reset command is necessary to return to read array mode. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 21 +

[Qemu-devel] [PATCH 05/10] block/pflash_cfi02: Implement nonuniform sector sizes

2019-04-08 Thread Stephen Checkoway
Some flash chips support sectors of different sizes. For example, the AMD AM29LV160DT has 31 64 kB sectors, one 32 kB sector, two 8 kB sectors, and a 16 kB sector, in that order. The AM29LV160DB has those in the reverse order. The `num-blocks` and `sector-length` properties work exactly as they

[Qemu-devel] [PATCH 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-08 Thread Stephen Checkoway
The goal of this patch series implement the following AMD command-set parallel flash functionality: - flash interleaving; - nonuniform sector sizes; - erase suspend/resume commands; and - multi-sector erase. During refactoring and implementation, I discovered several bugs that are fixed here as

[Qemu-devel] [Bug 1823790] [NEW] QEMU forces systemd into tight loop

2019-04-08 Thread Matthias Lüscher
Public bug reported: While building Debian images for embedded ARM target systems I detected that QEMU seems to force newer systemd daemons into a tight loop. My setup is the following: Host machine: Ubuntu 18.04, amd64 LXD container: Debian Buster, arm64, systemd 241 QEMU: qemu-aarch64-static,

[Qemu-devel] [PATCH 02/5] hw/timer: qemu_system_reset() replaced by watchdog_perform_action()

2019-04-08 Thread sohailalvi2236
From: Sohail Alvi Signed-off-by: SohailAlvi The watchdog_perform_action() function has been added in place of qemu_system_reset where watchdog was triggered. Changes have been made according to the previous suggestions given by Peter Maydell. The patch was tested with scripts/checkpatch.pl

Re: [Qemu-devel] [PATCH v4 1/6] vfio-ccw: make it safe to access channel programs

2019-04-08 Thread Eric Farman
On 4/8/19 1:07 PM, Cornelia Huck wrote: On Mon, 8 Apr 2019 13:02:12 -0400 Farhan Ali wrote: On 03/01/2019 04:38 AM, Cornelia Huck wrote: When we get a solicited interrupt, the start function may have been cleared by a csch, but we still have a channel program structure allocated. Make it

[Qemu-devel] [PATCH] qxl: fix -Waddress-of-packed-member

2019-04-08 Thread Marc-André Lureau
The GCC9 compiler complains about QXL code that takes the address of members of the 'struct QXLReleaseRing' which is marked packed: CC hw/display/qxl.o /home/elmarco/src/qemu/hw/display/qxl.c: In function ‘init_qxl_ram’: /home/elmarco/src/qemu/hw/display/qxl.c:50:19: warning: taking

Re: [Qemu-devel] [PATCH] sd: Fix out-of-bounds assertions

2019-04-08 Thread Marc-André Lureau
On Mon, Apr 8, 2019 at 9:51 PM Lidong Chen wrote: > > Due to an off-by-one error, the assert statements allow an > out-of-bounds array access. > > Signed-off-by: Lidong Chen Reviewed-by: Marc-André Lureau > --- > hw/sd/sd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff

[Qemu-devel] [PATCH] sd: Fix out-of-bounds assertions

2019-04-08 Thread Lidong Chen
Due to an off-by-one error, the assert statements allow an out-of-bounds array access. Signed-off-by: Lidong Chen --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index aaab15f..818f86c 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@

Re: [Qemu-devel] How to correctly use more than 2 floppy drives?

2019-04-08 Thread John Snow
On 4/8/19 1:38 AM, Markus Armbruster wrote: > Hervé Poussineau writes: > >> Le 05/04/2019 à 12:29, Philippe Mathieu-Daudé a écrit : >>> Hi, >>> >>> I am trying to understand the possible values for the MAX_FD variable >>> used by the floppy controller model (hw/block/fdc.c). >>> >>> Looking

[Qemu-devel] [PULL 2/2] linux-user: rename gettid() to sys_gettid() to avoid clash with glibc

2019-04-08 Thread Laurent Vivier
From: Daniel P. Berrangé The glibc-2.29.9000-6.fc31.x86_64 package finally includes the gettid() function as part of unistd.h when __USE_GNU is defined. This clashes with linux-user code which unconditionally defines this function name itself.

[Qemu-devel] [PULL 1/2] linux-user: assume __NR_gettid always exists

2019-04-08 Thread Laurent Vivier
From: Daniel P. Berrangé The gettid syscall was introduced in Linux 2.4.11. This is old enough that we can assume it always exists and thus not bother with the conditional backcompat logic. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier

[Qemu-devel] [PULL 0/2] Linux user for 4.0 patches

2019-04-08 Thread Laurent Vivier
The following changes since commit f55a585d1037e5de6088f25e75443c2776786e29: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2019-04-07 14:54:55 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user-for-4.0-pull-request

Re: [Qemu-devel] [PATCH 02/15] block/ssh: Do not report read/write/flush errors to the user

2019-04-08 Thread Eric Blake
On 4/8/19 3:36 AM, Markus Armbruster wrote: > Callbacks ssh_co_readv(), ssh_co_writev(), ssh_co_flush() report > errors to the user with error_printf(). They shouldn't, it's their > caller's job. Replace by a suitable trace point. > > Perhaps we should convert this part of the block driver

Re: [Qemu-devel] [PULL 0/2] Block layer patches

2019-04-08 Thread Peter Maydell
On Mon, 8 Apr 2019 at 17:35, Kevin Wolf wrote: > > The following changes since commit f55a585d1037e5de6088f25e75443c2776786e29: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2019-04-07 14:54:55 +0100) > > are available in the Git repository at: > >

Re: [Qemu-devel] [PATCH v2] qcow2: discard bitmap when removed

2019-04-08 Thread Max Reitz
On 28.02.19 10:26, Andrey Shinkevich wrote: > When a bitmap is removed, we can clean some space on the disk. The size > of a cluster may be larger, so is the size of the bitmap that includes > many clusters. Some bitmaps can be as large as tens of megabytes. > The flag QCOW2_DISCARD_ALWAYS allows

[Qemu-devel] [PULL 4/4] nbd/client: Fix error message for server with unusable sizing

2019-04-08 Thread Eric Blake
Add a missing space to the error message used when giving up on a server that insists on an alignment which renders the last few bytes of the export unreadable. Fixes: 3add3ab78 Signed-off-by: Eric Blake Message-Id: <20190404145226.32649-1-ebl...@redhat.com> Reviewed-by: Kevin Wolf ---

Re: [Qemu-devel] [PATCH 14/15] char: Make -chardev help print to stdout

2019-04-08 Thread Eric Blake
On 4/8/19 3:36 AM, Markus Armbruster wrote: > Command line help explicitly requested by the user should be printed > to stdout, not stderr. We do elsewhere. Adjust -chardev to match: > use qemu_printf() instead of error_printf(). Plain printf() would be > wrong because we need to print to the

[Qemu-devel] [PULL 2/4] nbd/server: Trace client noncompliance on unaligned requests

2019-04-08 Thread Eric Blake
We've recently added traces for clients to flag server non-compliance; let's do the same for servers to flag client non-compliance. According to the spec, if the client requests NBD_INFO_BLOCK_SIZE, it is promising to send all requests aligned to those boundaries. Of course, if the client does

[Qemu-devel] [PULL 1/4] nbd/server: Fix blockstatus trace

2019-04-08 Thread Eric Blake
Don't increment remaining_bytes until we know that we will actually be including the current block status extent in the reply; otherwise, the value traced will include a bytes value that is oversized by the length of the next block status extent which did not get sent because it instead ended the

[Qemu-devel] [PULL 3/4] nbd/server: Don't fail NBD_OPT_INFO for byte-aligned sources

2019-04-08 Thread Eric Blake
In commit 0c1d50bd, I added a couple of TODO comments about whether we consult bl.request_alignment when responding to NBD_OPT_INFO. At the time, qemu as server was hard-coding an advertised alignment of 512 to clients that promised to obey constraints, and there was no function for getting at a

[Qemu-devel] [PULL 0/4] NBD patches for 4.0-rc3

2019-04-08 Thread Eric Blake
The following changes since commit 2c573106279495795449b0d0373464b597dfe316: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-04-08' into staging (2019-04-08 15:21:11 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git

Re: [Qemu-devel] [PATCH] powerpc: fix denorm float->double conversion

2019-04-08 Thread Richard Henderson
On 3/23/19 12:24 PM, Sergei Trofimovich wrote: > Here denormalization conversion has a few bugs: > - significand (abs_arg) has 32-bit unsigned wraparound in > ret |= abs_arg << (shift + 29); > - significand does not drop explicit leading '1' in denorm > 'float' when converting to normalized

Re: [Qemu-devel] [PATCH 01/15] qemu-img: Use error_vreport() in error_exit()

2019-04-08 Thread Eric Blake
On 4/8/19 3:36 AM, Markus Armbruster wrote: > error_exit() uses low-level error_printf() to report errors. > Modernize it to use error_vreport(). > > Cc: Kevin Wolf > Cc: Max Reitz > Cc: qemu-bl...@nongnu.org > Signed-off-by: Markus Armbruster > --- > qemu-img.c | 6 ++ > 1 file changed,

[Qemu-devel] [RISU PATCH 5/5] risu_i386: remove old unused code

2019-04-08 Thread Jan Bobek
The code being removed is a remnant of the past implementation; it has since been replaced by its more powerful, architecture-independent counterpart in reginfo.c. Signed-off-by: Jan Bobek --- risu_i386.c | 58 - 1 file changed, 58

Re: [Qemu-devel] Whither qemu's ssh driver? (was: Re: [PATCH 02/15] block/ssh: Do not report read/write/flush errors to the user)

2019-04-08 Thread Max Reitz
On 08.04.19 19:22, Richard W.M. Jones wrote: > I don't know much about this patch which looks like internal qemu > rearrangements so I guess fine. However I do have a few things to say > about the ssh driver ... > > As you know I wrote this a few years ago, and it uses libssh2. > libssh2 has not

[Qemu-devel] [RISU PATCH 4/5] risu_i386: implement missing CPU-specific functions

2019-04-08 Thread Jan Bobek
risu_i386.c is expected to implement the following functions: - advance_pc - get_reginfo_paramreg, set_ucontext_paramreg - get_risuop - get_pc This patch adds the necessary code. (We use EAX as the parameter register.) Signed-off-by: Jan Bobek --- risu_i386.c | 31

[Qemu-devel] [RISU PATCH 2/5] risu_i386: move reginfo-related code to risu_reginfo_i386.c

2019-04-08 Thread Jan Bobek
In order to build risu successfully for i386, we need files risu_reginfo_i386.{h,c}; this patch adds the latter by extracting the relevant code from risu_i386.c. This patch is pure code motion; no functional changes were made. Signed-off-by: Jan Bobek --- risu_i386.c | 54

[Qemu-devel] [RISU PATCH 1/5] risu_i386: move reginfo_t and related defines to risu_reginfo_i386.h

2019-04-08 Thread Jan Bobek
In order to build risu successfully for i386, we need files risu_reginfo_i386.{h,c}; this patch adds the former by extracting the relevant code from risu_i386.c. This patch is pure code motion; no functional changes were made. Signed-off-by: Jan Bobek --- risu_i386.c | 23

[Qemu-devel] [RISU PATCH 3/5] risu_reginfo_i386: implement arch-specific reginfo interface

2019-04-08 Thread Jan Bobek
CPU-specific code in risu_reginfo_* is expected to define and export the following symbols: - arch_long_opts, arch_extra_help, process_arch_opt - reginfo_size - reginfo_init - reginfo_is_eq - reginfo_dump, reginfo_dump_mismatch Make risu_reginfo_i386.c implement this interface. Signed-off-by:

[Qemu-devel] [RISU PATCH 0/5] Fix RISU build for i386

2019-04-08 Thread Jan Bobek
Hi all, here's a patch series that tries to fix the (currently broken) build of RISU for i386. With the patches applied, I am able to successfully cross-compile and run RISU for i386 on my x86_64 laptop running Debian 10 with: $ CC='cc -m32 -std=c99' LD='ld -m32' AS='nasm -f elf32' ARCH=i386

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

2019-04-08 Thread Andrey Shinkevich
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 may take place due to a filter node as well that is

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

2019-04-08 Thread Andrey Shinkevich
This patch is used in the 'block/stream: introduce a bottom node' that is following. Instead of the base node, the caller may pass the node that has the base as its backing image to the function bdrv_is_allocated_above() with a new parameter include_base = true and get rid of the dependency on the

[Qemu-devel] [PATCH v4 0/3] block/stream: get rid of the base

2019-04-08 Thread Andrey Shinkevich
This series introduces a bottom intermediate node that eliminates the dependency on the base that may change while stream job is running. It happens when stream/commit parallel jobs are running on the same backing chain. The base node of the stream job may be a top node of the parallel commit job

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

2019-04-08 Thread Andrey Shinkevich
From: Vladimir Sementsov-Ogievskiy The goto is unnecessary in the stream_run() since the common exit code was removed in the commit eb23654dbe43b549ea2a9ebff9d8e: "jobs: utilize job_exit shim". Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Alberto

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

2019-04-08 Thread Andrey Shinkevich
On 08/04/2019 18:39, Alberto Garcia wrote: > On Fri 05 Apr 2019 06:56:19 PM CEST, Andrey Shinkevich wrote: >> @@ -232,8 +232,13 @@ void stream_start(const char *job_id, BlockDriverState >> *bs, >> StreamBlockJob *s; >> BlockDriverState *iter; >> bool bs_read_only; >> +

Re: [Qemu-devel] Whither qemu's ssh driver?

2019-04-08 Thread Richard W.M. Jones
On Mon, Apr 08, 2019 at 08:07:00PM +0200, Markus Armbruster wrote: > "Richard W.M. Jones" writes: > > > I don't know much about this patch which looks like internal qemu > > rearrangements so I guess fine. However I do have a few things to say > > about the ssh driver ... > > > > As you know I

Re: [Qemu-devel] Whither qemu's ssh driver?

2019-04-08 Thread Markus Armbruster
"Richard W.M. Jones" writes: > I don't know much about this patch which looks like internal qemu > rearrangements so I guess fine. However I do have a few things to say > about the ssh driver ... > > As you know I wrote this a few years ago, and it uses libssh2. > libssh2 has not evolved as

[Qemu-devel] Whither qemu's ssh driver? (was: Re: [PATCH 02/15] block/ssh: Do not report read/write/flush errors to the user)

2019-04-08 Thread Richard W.M. Jones
I don't know much about this patch which looks like internal qemu rearrangements so I guess fine. However I do have a few things to say about the ssh driver ... As you know I wrote this a few years ago, and it uses libssh2. libssh2 has not evolved as quickly as we'd like and it may be better to

Re: [Qemu-devel] [PATCH v4 1/6] vfio-ccw: make it safe to access channel programs

2019-04-08 Thread Farhan Ali
On 04/08/2019 01:07 PM, Cornelia Huck wrote: On Mon, 8 Apr 2019 13:02:12 -0400 Farhan Ali wrote: On 03/01/2019 04:38 AM, Cornelia Huck wrote: When we get a solicited interrupt, the start function may have been cleared by a csch, but we still have a channel program structure allocated.

Re: [Qemu-devel] [PATCH] qemu_system_reset_request() in hw/ corresponding to watchdog that has triggered replaced by watchdog_perform_action().

2019-04-08 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190408145721.15881-1-sohailalvi2...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190408145721.15881-1-sohailalvi2...@gmail.com Subject: [Qemu-devel] [PATCH]

Re: [Qemu-devel] [PATCH v4 1/6] vfio-ccw: make it safe to access channel programs

2019-04-08 Thread Cornelia Huck
On Mon, 8 Apr 2019 13:02:12 -0400 Farhan Ali wrote: > On 03/01/2019 04:38 AM, Cornelia Huck wrote: > > When we get a solicited interrupt, the start function may have > > been cleared by a csch, but we still have a channel program > > structure allocated. Make it safe to call the cp accessors in

Re: [Qemu-devel] [PATCH v4 1/6] vfio-ccw: make it safe to access channel programs

2019-04-08 Thread Farhan Ali
On 03/01/2019 04:38 AM, Cornelia Huck wrote: When we get a solicited interrupt, the start function may have been cleared by a csch, but we still have a channel program structure allocated. Make it safe to call the cp accessors in any case, so we can call them unconditionally. While at it,

Re: [Qemu-devel] [RFC PATCH 0/2] implement the failover feature for assigned network devices

2019-04-08 Thread Dr. David Alan Gilbert
* Jens Freimann (jfreim...@redhat.com) wrote: > On Mon, Apr 08, 2019 at 10:16:50AM +0100, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Fri, Apr 05, 2019 at 09:56:29AM +0100, Dr. David Alan Gilbert wrote: > > > > * Jens Freimann (jfreim...@redhat.com)

Re: [Qemu-devel] [PULL 0/3] Fixes for libqos

2019-04-08 Thread Peter Maydell
On Mon, 8 Apr 2019 at 12:09, Thomas Huth wrote: > > Hi Peter, > > the following changes since commit f55a585d1037e5de6088f25e75443c2776786e29: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2019-04-07 14:54:55 +0100) > > are available in the Git repository

[Qemu-devel] [PULL 2/2] hmp: Fix drive_add ... format=help crash

2019-04-08 Thread Kevin Wolf
From: Markus Armbruster drive_new() returns null without setting an error when it provided help. add_init_drive() assumes null means failure, and crashes trying to report a null error. Fixes: c4f26c9f37ce511e5fe629c21c180dc6eb7c5a25 Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster

[Qemu-devel] [PULL 1/2] block: Forward 'discard' to temporary overlay

2019-04-08 Thread Kevin Wolf
When bdrv_temp_snapshot_options() is called for snapshot=on, the 'discard' option in the options QDict hasn't been parsed and merged into the flags yet. So copy the dict entry to make sure that the temporary overlay enables discard when it was requested for the drive. Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 0/2] Block layer patches

2019-04-08 Thread Kevin Wolf
The following changes since commit f55a585d1037e5de6088f25e75443c2776786e29: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2019-04-07 14:54:55 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch

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

2019-04-08 Thread Peter Krempa
On Mon, Apr 08, 2019 at 16:35:39 +0200, Kevin Wolf wrote: > This series adds optional feature lists to struct definitions in the > QAPI schema and makes use of them to advertise the new behaviour of > auto-read-only=on in file-posix. > > Kevin Wolf (4): > qapi: Support features for structs >

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 0/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-04-08 Thread Greg Kurz
On Mon, 8 Apr 2019 14:21:50 +1000 David Gibson wrote: > On Fri, Mar 29, 2019 at 01:29:51PM +0100, Greg Kurz wrote: > > On Thu, 28 Mar 2019 15:39:45 -0300 > > "Maxiwell S. Garcia" wrote: > > > > > Hi, > > > > > > On Thu, Mar 28, 2019 at 02:21:51PM +0100, Greg Kurz wrote: > > > > On Wed, 27

[Qemu-devel] [PATCH v2 2/2] block: avoid recursive block_status call if possible

2019-04-08 Thread Vladimir Sementsov-Ogievskiy
drv_co_block_status digs bs->file for additional, more accurate search for hole inside region, reported as DATA by bs since 5daa74a6ebc. This accuracy is not free: assume we have qcow2 disk. Actually, qcow2 knows, where are holes and where is data. But every block_status request calls lseek

[Qemu-devel] [PATCH v2 for 4.1 0/2] avoid lseek on block_status

2019-04-08 Thread Vladimir Sementsov-Ogievskiy
Hi! It's a continuation for "[PATCH] qcow2: avoid lseek on block_status if possible" https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06598.html performance results for block-status on tmpfs [tests originally by Kevin, now they are in 01]: ./tests/perf/block/qcow2/convert-blockstatus

[Qemu-devel] [PATCH v2 1/2] tests/perf: Test lseek influence on qcow2 block-status

2019-04-08 Thread Vladimir Sementsov-Ogievskiy
Block layer may recursively check block_status in file child of qcow2, if qcow2 driver returned DATA. There are several test cases to check influence of lseek on block_status performance. To see real difference run on tmpfs. Tests originally created by Kevin, I just refactored and put them

Re: [Qemu-devel] [PATCH 11/15] monitor error: Make printf()-like functions return a value

2019-04-08 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Markus Armbruster writes: > > > printf() & friends return the number of characters written on success, > > negative value on error. > > > > monitor_printf(), monitor_vfprintf(), monitor_vprintf(), > > error_printf(), error_printf_unless_qmp(),

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: use variable size of flash device to save memory

2019-04-08 Thread Laszlo Ersek
On 04/08/19 15:43, Xiang Zheng wrote: > > On 2019/4/3 23:35, Laszlo Ersek wrote: >>> I thought about your comments and wrote the following patch (just for test) >>> which uses a file mapping to replace the anonymous mapping. UEFI seems to >>> work >>> fine. So why not use a file mapping to read

Re: [Qemu-devel] [PATCH v2] hmp: Fix drive_add ... format=help crash

2019-04-08 Thread Philippe Mathieu-Daudé
On 4/8/19 5:30 PM, Markus Armbruster wrote: > drive_new() returns null without setting an error when it provided > help. add_init_drive() assumes null means failure, and crashes trying > to report a null error. > > Fixes: c4f26c9f37ce511e5fe629c21c180dc6eb7c5a25 > Cc: qemu-sta...@nongnu.org >

Re: [Qemu-devel] [PATCH v2] hmp: Fix drive_add ... format=help crash

2019-04-08 Thread Kevin Wolf
Am 08.04.2019 um 17:30 hat Markus Armbruster geschrieben: > drive_new() returns null without setting an error when it provided > help. add_init_drive() assumes null means failure, and crashes trying > to report a null error. > > Fixes: c4f26c9f37ce511e5fe629c21c180dc6eb7c5a25 > Cc:

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

2019-04-08 Thread Andrey Shinkevich
On 08/04/2019 18:39, Alberto Garcia wrote: > On Fri 05 Apr 2019 06:56:19 PM CEST, Andrey Shinkevich wrote: >> @@ -232,8 +232,13 @@ void stream_start(const char *job_id, BlockDriverState >> *bs, >> StreamBlockJob *s; >> BlockDriverState *iter; >> bool bs_read_only; >> +

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

2019-04-08 Thread Alberto Garcia
On Fri 05 Apr 2019 06:56:19 PM CEST, Andrey Shinkevich wrote: > @@ -232,8 +232,13 @@ void stream_start(const char *job_id, BlockDriverState > *bs, > StreamBlockJob *s; > BlockDriverState *iter; > bool bs_read_only; > +BlockDriverState *bottom = NULL; > +int basic_flags =

Re: [Qemu-devel] [PATCH v2] hmp: Fix drive_add ... format=help crash

2019-04-08 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > drive_new() returns null without setting an error when it provided > help. add_init_drive() assumes null means failure, and crashes trying > to report a null error. > > Fixes: c4f26c9f37ce511e5fe629c21c180dc6eb7c5a25 > Cc: qemu-sta...@nongnu.org >

[Qemu-devel] [PATCH v2] hmp: Fix drive_add ... format=help crash

2019-04-08 Thread Markus Armbruster
drive_new() returns null without setting an error when it provided help. add_init_drive() assumes null means failure, and crashes trying to report a null error. Fixes: c4f26c9f37ce511e5fe629c21c180dc6eb7c5a25 Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster --- v2: Make

  1   2   3   >