[Qemu-devel] [PATCH v4] scsi: esp: check length before dma read

2016-06-15 Thread P J P
From: Prasad J Pandit While doing DMA read into ESP command buffer 's->cmdbuf', it could write past the 's->cmdbuf' area, if it was partially filled; ie. 's->cmdlen' wasn't set at the start of the buffer. Check 'len' to avoid OOB access. Also increase the command buffer size to 32, which is maxim

[Qemu-devel] [PATCH 1/3] log: Plug memory leak on multiple -dfilter

2016-06-15 Thread Markus Armbruster
-dfilter overwrites any previous filter. The overwritten filter is leaked. Leaks since the beginning (commit 3514552, v2.6.0). Free it properly. Signed-off-by: Markus Armbruster --- util/log.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/util/log.c b/util/log.c index 5ad72c1..6f

[Qemu-devel] [PATCH 0/3] log: Fix error handling and a memory leak

2016-06-15 Thread Markus Armbruster
log.c has no maintainer. I can take this through my error-next branch. Markus Armbruster (3): log: Plug memory leak on multiple -dfilter log: Fix qemu_set_dfilter_ranges() error reporting log: Fix qemu_set_log_filename() error handling bsd-user/main.c | 3 +- include/qemu/log.h |

[Qemu-devel] [PATCH 3/3] log: Fix qemu_set_log_filename() error handling

2016-06-15 Thread Markus Armbruster
When qemu_set_log_filename() detects an invalid file name, it reports an error, closes the log file (if any), and starts logging to stderr (unless daemonized or nothing is being logged). This is wrong. Asking for an invalid log file on the command line should be fatal. Asking for one in the moni

[Qemu-devel] [PATCH 2/3] log: Fix qemu_set_dfilter_ranges() error reporting

2016-06-15 Thread Markus Armbruster
g_error() is not an acceptable way to report errors to the user: $ qemu-system-x86_64 -dfilter 1000+0 ** (process:17187): ERROR **: Failed to parse range in: 1000+0 Trace/breakpoint trap (core dumped) g_assert() isn't, either: $ qemu-system-x86_64 -dfilter 1000x+64 ** ER

Re: [Qemu-devel] [Bug 739785] Re: qemu-i386 user mode can't fork (bash: fork: Invalid argument)

2016-06-15 Thread Justin Shafer
../qemu-0.14.0/i386-linux-user/qemu-i386 -L ./gnemul/qemu-i386 i386/ls -l dummyfile 0.14.0??? I tried the latest qemu and it worked.. I forget the version.. 1.XX something? I was able to run wine. It could also be your ld.so in gnemul? On Wed, Jun 15, 2016 at 7:41 AM, T. Huth <739...@bugs.launch

[Qemu-devel] [Bug 739785] Re: qemu-i386 user mode can't fork (bash: fork: Invalid argument)

2016-06-15 Thread T. Huth
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/739785 Title: qemu-i386 user mode can't fork (bash: fork: Invalid argument) Status in

Re: [Qemu-devel] [V12 0/4] AMD IOMMU

2016-06-15 Thread Jan Kiszka
On 2016-06-15 19:07, David Kiarie wrote: > On Wed, Jun 15, 2016 at 5:26 PM, Eduardo Habkost wrote: >> On Wed, Jun 15, 2016 at 03:21:48PM +0300, David Kiarie wrote: >>> Hi all, >>> >>> This patchset adds basic AMD IOMMU emulation support to Qemu. >>> >>> Changes since V11 >>>-AMD IOMMU is not s

[Qemu-devel] Odp.: [PATCH 1/9] m25p80: Replace JEDEC ID masking with function.

2016-06-15 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
W dniu 15.06.2016 o 16:05, Cédric Le Goater pisze: On 06/15/2016 03:41 PM, marcin.krzemin...@nokia.com wrote: From: Marcin Krzeminski Instead of always reading and comparing jededc ID, replace it by function. Signed-off-by: Marcin Krzeminski Looks good to me. Some minor comments below.

Re: [Qemu-devel] [PATCH v3] scsi: esp: check length before dma read

2016-06-15 Thread P J P
Hello Paolo, +-- On Wed, 15 Jun 2016, Paolo Bonzini wrote --+ | Actually, the commit message is wrong. The length parameter cannot | exceed the buffer size anymore. It wouldn't exceed after this patch, right? Is it possible 'esp_do_dma' is called via 'esp_transfer_data' with 's->do_cmd' set

[Qemu-devel] [Bug 818647] Re: Getting segmentation fault when trying to boot FreeBSD

2016-06-15 Thread T. Huth
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/818647 Title: Getting segmentation fault when trying to boot FreeBSD Status in QEMU:

[Qemu-devel] [Bug 1195882] Re: Make fails on Centos - can't find autoreconf

2016-06-15 Thread T. Huth
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1195882 Title: Make fails on Centos - can't find autoreconf Status in QEMU: Invalid Bug descripti

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2016-06-15 Thread T. Huth
Patch has been included here a while ago already: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=898ae2846de4dcb1 ... so this ticket could now be marked as fixed. ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-

[Qemu-devel] [Bug 1324112] Re: qemu parallel building error on libcacard.la

2016-06-15 Thread T. Huth
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1324112 Title: qemu parallel building error on libcacard.la Status in QEMU: Fix Rel

[Qemu-devel] [Bug 935945] Re: SLIRP still not working for win32

2016-06-15 Thread T. Huth
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/935945 Title: SLIRP still not working for win32 Status in QEMU: Fix Released Bug d

[Qemu-devel] [Bug 521994] Re: Windows 98 doesn't detect mouse on qemu and SeaBIOS.

2016-06-15 Thread T. Huth
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/521994 Title: Windows 98 doesn't detect mouse on qemu and SeaBIOS. Status in QEMU:

Re: [Qemu-devel] [V12 0/4] AMD IOMMU

2016-06-15 Thread David Kiarie
On Wed, Jun 15, 2016 at 5:26 PM, Eduardo Habkost wrote: > On Wed, Jun 15, 2016 at 03:21:48PM +0300, David Kiarie wrote: >> Hi all, >> >> This patchset adds basic AMD IOMMU emulation support to Qemu. >> >> Changes since V11 >>-AMD IOMMU is not started with -device amd-iommu (with a dependency o

[Qemu-devel] [Bug 1404610] Re: [feature request] HP300 m68k system?

2016-06-15 Thread Laurent Vivier
I have Quadra 800 system emulation in the branch q800-v2.4.0. You can create a bootable disk image following this wiki: https://github.com/vivier/qemu-m68k/wiki But this is not fully functional: fork() doesn't work well... You can also find a working image from: http://landley.net/aboriginal/

[Qemu-devel] [PATCH] pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c

2016-06-15 Thread Lin Ma
In function pci_assign_dev_load_option_rom, For those pci devices don't have 'rom' file under sysfs or if loading ROM from external file, The function returns NULL, and won't set the passed 'size' variable. In these 2 cases, qemu still reports "Invalid ROM" error message, Users may be confused by

Re: [Qemu-devel] [PATCH v2] net: mipsnet: check transmit buffer size before sending

2016-06-15 Thread Peter Maydell
On 15 June 2016 at 09:48, Jason Wang wrote: > I tend to remove mipsnet in the future (maybe 2.8). If we're going to do this then I think: (1) we should remove the whole mipssim machine model, not just its ethernet device (2) we should announce in the 2.7 release notes that we plan to remove i

[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2016-06-15 Thread kachaffeous
I just added the romfile argument to mine, will report back later tonight. (Don't want to reboot now, as my machine will hang and I'm at work) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1580459 T

Re: [Qemu-devel] [PATCH] m25p80: fix test on blk_pread() return value

2016-06-15 Thread Cédric Le Goater
Hello Eric, On 06/13/2016 06:47 PM, Eric Blake wrote: > On 06/13/2016 10:25 AM, Cédric Le Goater wrote: > >> >> It seems that commit 243e6f69c129 ("m25p80: Switch to byte-based block >> access") >> is bringing another issue : >> >> qemu-system-arm: >> /home/legoater/work/qemu/qemu-ast2400-main

[Qemu-devel] [PATCH] pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c

2016-06-15 Thread Lin Ma
In function pci_assign_dev_load_option_rom, For those pci devices don't have 'rom' file under sysfs or if loading ROM from external file, The function returns NULL, and won't set the passed 'size' variable. In these 2 cases, qemu still reports "Invalid ROM" error message, Users may be confused by

Re: [Qemu-devel] [PATCH] vfio: Fix broken EEH

2016-06-15 Thread Alex Williamson
On Wed, 15 Jun 2016 15:03:15 +1000 David Gibson wrote: > On Wed, Jun 15, 2016 at 02:46:23PM +1000, David Gibson wrote: > > On Wed, Jun 15, 2016 at 02:28:27PM +1000, Gavin Shan wrote: > > > vfio_eeh_container_op() is the backend that communicates with > > > host kernel to support EEH functionali

Re: [Qemu-devel] [PATCH v3] scsi: esp: check length before dma read

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 18:16, P J P wrote: > From: Prasad J Pandit > > While doing DMA read into ESP command buffer 's->cmdbuf', the > length parameter could exceed the buffer size. Add check to avoid > OOB access. Also increase the command buffer size to 32, which > is maximum when 's->do_cmd' is set.

Re: [Qemu-devel] [PATCH 5/7] fw_cfg: remove useless casts

2016-06-15 Thread Laszlo Ersek
On 06/15/16 18:14, Laurent Vivier wrote: > This patch is the result of coccinelle script > scripts/coccinelle/typecast.cocci > > CC: Laszlo Ersek > Signed-off-by: Laurent Vivier > --- > hw/nvram/fw_cfg.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/nvram/fw_c

Re: [Qemu-devel] [PATCH v3] scsi: esp: check length before dma read

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 18:16, P J P wrote: > From: Prasad J Pandit > > While doing DMA read into ESP command buffer 's->cmdbuf', the > length parameter could exceed the buffer size. Add check to avoid > OOB access. Also increase the command buffer size to 32, which > is maximum when 's->do_cmd' is set.

Re: [Qemu-devel] [PATCH] scsi: esp: check length before dma read

2016-06-15 Thread P J P
+-- On Wed, 15 Jun 2016, Paolo Bonzini wrote --+ | So a better fix is to change cmdbuf[] to 32 bytes in | include/hw/scsi/esp.h, and define a constant ESP_CMDBUF_SZ equal to 32 | that can be used in handle_ti and in the definition of cmdbuf. Sent a revised patch v3. Thank you. -- Prasad J Pandit /

[Qemu-devel] [PATCH 4/7] tricore: remove useless cast

2016-06-15 Thread Laurent Vivier
This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci CC: Bastian Koppelmann Signed-off-by: Laurent Vivier --- hw/tricore/tricore_testboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboa

[Qemu-devel] [PATCH 7/7] sheepdog: remove useless casts

2016-06-15 Thread Laurent Vivier
This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci CC: Hitoshi Mitake CC: qemu-bl...@nongnu.org Signed-off-by: Laurent Vivier --- block/sheepdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 23fba

[Qemu-devel] [PATCH v3] scsi: esp: check length before dma read

2016-06-15 Thread P J P
From: Prasad J Pandit While doing DMA read into ESP command buffer 's->cmdbuf', the length parameter could exceed the buffer size. Add check to avoid OOB access. Also increase the command buffer size to 32, which is maximum when 's->do_cmd' is set. Reported-by: Li Qiang Signed-off-by: Prasad J

[Qemu-devel] [PATCH 5/7] fw_cfg: remove useless casts

2016-06-15 Thread Laurent Vivier
This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci CC: Laszlo Ersek Signed-off-by: Laurent Vivier --- hw/nvram/fw_cfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 74a0079..9d84129 100644 --- a/

[Qemu-devel] [PATCH 1/7] coccinelle: add a script to remove useless casts

2016-06-15 Thread Laurent Vivier
Script from LKML. Signed-off-by: Laurent Vivier --- scripts/coccinelle/typecast.cocci | 7 +++ 1 file changed, 7 insertions(+) create mode 100644 scripts/coccinelle/typecast.cocci diff --git a/scripts/coccinelle/typecast.cocci b/scripts/coccinelle/typecast.cocci new file mode 100644 index

[Qemu-devel] [PATCH 6/7] crypto: remove useless casts

2016-06-15 Thread Laurent Vivier
This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci CC: Daniel P. Berrange Signed-off-by: Laurent Vivier --- crypto/cipher-builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index 88963f

[Qemu-devel] [PATCH 3/7] s390x: remove useless cast

2016-06-15 Thread Laurent Vivier
This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci CC: Cornelia Huck Signed-off-by: Laurent Vivier --- hw/s390x/sclp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index fca37f5..feeb0da 100644 --- a/hw/s390x/

[Qemu-devel] [PATCH 2/7] linux-user,s390x: remove useless cast

2016-06-15 Thread Laurent Vivier
This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci CC: Riku Voipio CC: Alexander Graf Signed-off-by: Laurent Vivier --- linux-user/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 61c1145..

[Qemu-devel] [PATCH 0/7] Remove useless casts

2016-06-15 Thread Laurent Vivier
This series is the result of the following coccinelle script: @@ type T; T v; @@ - (T *)&v + &v This script removes the cast of a variable when the variable is already of the casting type. The script is added in scripts/coccinelle by the first patch. Laurent

Re: [Qemu-devel] Supplying QCOW2 as 'file' driver to `blockdev-add` results in a QEMU crash

2016-06-15 Thread Eric Blake
On 06/15/2016 09:38 AM, Eric Blake wrote: > On 06/15/2016 09:17 AM, Max Reitz wrote: >> On 15.06.2016 11:58, Kashyap Chamarthy wrote: >>> Seems like supplying "qcow2" file BlockdevDriver option to QMP >>> `blockdev-add` results in a SIGSEGV: >>> >>> [...] >>> Thread 1 "qemu-system-x86" rece

[Qemu-devel] [PATCH 2/2] intel_iommu: Throw hw_error on notify_started

2016-06-15 Thread Alex Williamson
We don't currently support the MemoryRegionIOMMUOps notifier, so throw an error should a device require it. Signed-off-by: Alex Williamson --- hw/i386/intel_iommu.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 347718f..5e

[Qemu-devel] [PATCH 0/2] memory/intel_iommu: Generate error for incompatible usage

2016-06-15 Thread Alex Williamson
VT-d emulation is currently incompatible with device assignment due to intel_iommu's lack of support for memory_region_notify_iommu(). Alexey has proposed a nice addition to the MemoryRegionIOMMUOps structure that adds callbacks when the first iommu notifier is registered and the last is removed.

[Qemu-devel] [PATCH 1/2] memory: Add MemoryRegionIOMMUOps.notify_started/stopped callbacks

2016-06-15 Thread Alex Williamson
From: Alexey Kardashevskiy The IOMMU driver may change behavior depending on whether a notifier client is present. In the case of POWER, this represents a change in the visibility of the IOTLB, for other drivers such as intel-iommu and future AMD-Vi emulation, notifier support is not yet enabled

Re: [Qemu-devel] [PATCH 2/2] qcow2: Avoid making the L1 table too big

2016-06-15 Thread Eric Blake
On 06/15/2016 09:36 AM, Max Reitz wrote: > We refuse to open images whose L1 table we deem "too big". Consequently, > we should not produce such images ourselves. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz > --- > block/qcow2-cluster.c | 2 +- > 1 file changed, 1 insertion(+), 1 d

Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread P J P
+-- On Wed, 15 Jun 2016, Laszlo Ersek wrote --+ | And I guess Prasad will submit a new version of the buffer overflow fix, | on top of this patch, according to your previous message | . Yes, I'm preparing an update. -- Prasad J

[Qemu-devel] [PATCH] ssi: change ssi_slave_init to be a realize ops

2016-06-15 Thread Cédric Le Goater
This enables qemu to handle late inits and report errors. All the SSI slave routine names were changed accordingly. Code was modified to handle errors when possible (m25p80) Tested with the m25p80 slave object. Suggested-by: Paolo Bonzini Signed-off-by: Cédric Le Goater --- Should apply on to

[Qemu-devel] [PATCH 1/2] qemu-img: Use strerror() for generic resize error

2016-06-15 Thread Max Reitz
Emitting the plain error number is not very helpful. Use strerror() instead. Signed-off-by: Max Reitz --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 14e2661..d5ccd9a 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3277,7 +3277,7 @@ s

Re: [Qemu-devel] [PATCH 1/2] qemu-img: Use strerror() for generic resize error

2016-06-15 Thread Eric Blake
On 06/15/2016 09:36 AM, Max Reitz wrote: > Emitting the plain error number is not very helpful. Use strerror() > instead. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 14e2661..d5ccd9a 100

Re: [Qemu-devel] Supplying QCOW2 as 'file' driver to `blockdev-add` results in a QEMU crash

2016-06-15 Thread Eric Blake
On 06/15/2016 09:17 AM, Max Reitz wrote: > On 15.06.2016 11:58, Kashyap Chamarthy wrote: >> Seems like supplying "qcow2" file BlockdevDriver option to QMP >> `blockdev-add` results in a SIGSEGV: >> >> [...] >> Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. >> 0

[Qemu-devel] [PATCH 2/2] qcow2: Avoid making the L1 table too big

2016-06-15 Thread Max Reitz
We refuse to open images whose L1 table we deem "too big". Consequently, we should not produce such images ourselves. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-cluster.c b/block/qc

[Qemu-devel] [PATCH 0/2] qcow2: Avoid making the L1 table too big

2016-06-15 Thread Max Reitz
See https://bugs.launchpad.net/qemu/+bug/1592590 for a bug report. Reproducer: $ ./qemu-img create -f qcow2 test.qcow2 1M Formatting 'test.qcow2', fmt=qcow2 size=1048576 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 $ ./qemu-img resize test.qcow2 10T Image resized. $ .

Re: [Qemu-devel] [PATCH 2/2] block: fix libvirt snapshot with existing bitmaps

2016-06-15 Thread Max Reitz
On 15.06.2016 15:08, Vladimir Sementsov-Ogievskiy wrote: > On 15.06.2016 00:33, Eric Blake wrote: >> On 06/14/2016 11:08 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Fix the following bug: >>> >>> # virsh start test >>> Domain test started >>> >>> # virsh qemu-monitor-command test \ >>>

Re: [Qemu-devel] exec: Safe work in quiescent state

2016-06-15 Thread alvise rigo
On Wed, Jun 15, 2016 at 4:51 PM, Alex Bennée wrote: > > alvise rigo writes: > >> Hi Sergey, >> >> Nice review of the implementations we have so far. >> Just few comments below. >> >> On Wed, Jun 15, 2016 at 2:59 PM, Sergey Fedorov wrote: >>> On 10/06/16 00:51, Sergey Fedorov wrote: For cert

[Qemu-devel] [PATCH 9/9] m25p80: New flash devices.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Macronix: mx66u51235f and mx66u1g45g Micron: mt25ql01g and mt25qu01g Spansion: s25fs512s and s70fs01gs Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/block/m25p80.c b/hw/

Re: [Qemu-devel] Supplying QCOW2 as 'file' driver to `blockdev-add` results in a QEMU crash

2016-06-15 Thread Max Reitz
On 15.06.2016 11:58, Kashyap Chamarthy wrote: > Seems like supplying "qcow2" file BlockdevDriver option to QMP > `blockdev-add` results in a SIGSEGV: > > [...] > Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. > 0x55a0121f in visit_type_BlockdevRef ()

Re: [Qemu-devel] [PULL v2 00/32] pc, pci, virtio: new features, cleanups, fixes

2016-06-15 Thread Peter Maydell
On 14 June 2016 at 20:59, Michael S. Tsirkin wrote: > changes from v1: > - fixed up build on 32 bit > - fixed up build on old glibc > > Peter, I could not reproduce the issue with noipmi that > you reported. Could it be a merge artifact? > I rebased to latest master to help avoid these. N

Re: [Qemu-devel] [PATCH 1/1] vnc: remove unused depth argument in set_pixel_format

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 06:10 PM, Paolo Bonzini wrote: On 15/06/2016 17:07, Denis V. Lunev wrote: On 06/06/2016 12:51 PM, Denis V. Lunev wrote: Spotted by coverity, reported by Paolo. Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gerd Hoffmann Looks like you and Gerd crossed: commit ec9fb41a

Re: [Qemu-devel] [PATCH 1/1] vnc: remove unused depth argument in set_pixel_format

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 17:07, Denis V. Lunev wrote: > On 06/06/2016 12:51 PM, Denis V. Lunev wrote: >> Spotted by coverity, reported by Paolo. >> >> Signed-off-by: Denis V. Lunev >> CC: Paolo Bonzini >> CC: Gerd Hoffmann Looks like you and Gerd crossed: commit ec9fb41a9fad0c7e05b656ae55481a6bd28cab2f

Re: [Qemu-devel] [PATCH 1/1] vnc: remove unused depth argument in set_pixel_format

2016-06-15 Thread Denis V. Lunev
On 06/06/2016 12:51 PM, Denis V. Lunev wrote: Spotted by coverity, reported by Paolo. Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gerd Hoffmann --- ui/vnc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index c862fdc..cc94024 100644 --

[Qemu-devel] [PATCH 1/1] migration: fix inability to save VM after snapshot

2016-06-15 Thread Denis V. Lunev
The following sequence of operations fails: virsh start vm virsh snapshot-create vm virshh save vm --file file with the following error error: Failed to save domain vm to file error: internal error: unable to execute QEMU command 'migrate': There's a migration process in pro

Re: [Qemu-devel] exec: Safe work in quiescent state

2016-06-15 Thread Alex Bennée
Sergey Fedorov writes: > On 10/06/16 00:51, Sergey Fedorov wrote: >> For certain kinds of tasks we might need a quiescent state to perform an >> operation safely. Quiescent state means no CPU thread executing, and >> probably BQL held as well. The tasks could include: > > Considering different

Re: [Qemu-devel] exec: Safe work in quiescent state

2016-06-15 Thread Alex Bennée
alvise rigo writes: > Hi Sergey, > > Nice review of the implementations we have so far. > Just few comments below. > > On Wed, Jun 15, 2016 at 2:59 PM, Sergey Fedorov wrote: >> On 10/06/16 00:51, Sergey Fedorov wrote: >>> For certain kinds of tasks we might need a quiescent state to perform an

Re: [Qemu-devel] [PATCH v3 08/14] block/nbd: Accept SocketAddress

2016-06-15 Thread Max Reitz
On 15.06.2016 01:14, Eric Blake wrote: > On 04/06/2016 12:28 PM, Max Reitz wrote: >> Add a new option "address" to the NBD block driver which accepts a >> SocketAddress. >> >> "path", "host" and "port" are still supported as legacy options and are >> mapped to their corresponding SocketAddress repr

Re: [Qemu-devel] [PATCH] m25p80: provide a realize to support late inits.

2016-06-15 Thread Cédric Le Goater
On 06/15/2016 04:20 PM, Paolo Bonzini wrote: > > > On 15/06/2016 16:00, Cédric Le Goater wrote: >> We also need to realize() the SSISlave part of the object. This is why >> the previous realize() ops is stored in M25P80Class and called in the >> object realize() ops. >> >> This is fully compatibl

[Qemu-devel] [PATCH 7/9] m25p80: Introduce configuration registers.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Configuration registers for Spansion and Macronix devices. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index d1c4d46..21

Re: [Qemu-devel] [V12 0/4] AMD IOMMU

2016-06-15 Thread Eduardo Habkost
On Wed, Jun 15, 2016 at 03:21:48PM +0300, David Kiarie wrote: > Hi all, > > This patchset adds basic AMD IOMMU emulation support to Qemu. > > Changes since V11 >-AMD IOMMU is not started with -device amd-iommu (with a dependency on > Marcel's patches). >-IOMMU commands are represented us

[Qemu-devel] [PATCH 1/9] m25p80: Replace JEDEC ID masking with function.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Instead of always reading and comparing jededc ID, replace it by function. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 49 - 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/hw/block/m25p80.c b/h

Re: [Qemu-devel] [PATCH 6/9] m25p80: Introduce quad and equad modes.

2016-06-15 Thread Cédric Le Goater
On 06/15/2016 03:41 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > Quad and Equad modes for Spansion and Macronix flash devices. > This commit also includes modification and new command to manipulate > quad mode (status registers and dedicated commands). > This work is based

Re: [Qemu-devel] [PATCH] m25p80: provide a realize to support late inits.

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 16:00, Cédric Le Goater wrote: > We also need to realize() the SSISlave part of the object. This is why > the previous realize() ops is stored in M25P80Class and called in the > object realize() ops. > > This is fully compatible with the existing users of m25p80 and it > provides a

[Qemu-devel] [PATCH 8/9] m25p80: Fast read commands family changes.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Add support for Spansion and Macronix flashes. Additionally Numonyx(Micron) move from default in fast read commands family. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 72 --- 1 file changed, 64 insertions

Re: [Qemu-devel] exec: Safe work in quiescent state

2016-06-15 Thread alvise rigo
Hi Sergey, Nice review of the implementations we have so far. Just few comments below. On Wed, Jun 15, 2016 at 2:59 PM, Sergey Fedorov wrote: > On 10/06/16 00:51, Sergey Fedorov wrote: >> For certain kinds of tasks we might need a quiescent state to perform an >> operation safely. Quiescent stat

[Qemu-devel] [PATCH v2] m25p80: provide a realize to support late inits.

2016-06-15 Thread Cédric Le Goater
We also need to realize() the SSISlave part of the object. This is why the previous realize() ops is stored in M25P80Class and called in the object realize() ops. This is fully compatible with the existing users of m25p80 and it provides a way to handle errors on the drive backend. Signed-off-by:

[Qemu-devel] [PATCH 4/9] m25p80: Introduce COLLECTING_VAR_LEN_DATA state.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Some flash allows to stop read at any time. Allow framework to support this. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 6910c52..ca1f882 100644 --- a/hw/bloc

[Qemu-devel] [PATCH 2/9] m25p80: Make a table for JEDEC ID.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Since it is now longer than 4. This work based on Pawel Lenkow changes and the kernel SPI framework. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 61 ++- 1 file changed, 42 insertions(+), 19 deletions(-) d

Re: [Qemu-devel] [PATCH] m25p80: provide a realize to support late inits.

2016-06-15 Thread Cédric Le Goater
On 06/15/2016 04:07 PM, Peter Maydell wrote: > On 15 June 2016 at 15:00, Cédric Le Goater wrote: >> We also need to realize() the SSISlave part of the object. This is why >> the previous realize() ops is stored in M25P80Class and called in the >> object realize() ops. >> >> This is fully compatibl

Re: [Qemu-devel] [PATCH v3 00/20] GICv3 emulation

2016-06-15 Thread Peter Maydell
On 15 June 2016 at 15:02, Shannon Zhao wrote: > I'll try tomorrow. By the way, if we disable secure extension, will the > problem disappear? No; it's because the secure extension is disabled that the problem exists. If security is disabled then the guest gets to use both group 0 and group 1 IRQs

Re: [Qemu-devel] [PATCH] m25p80: provide a realize to support late inits.

2016-06-15 Thread Peter Maydell
On 15 June 2016 at 15:00, Cédric Le Goater wrote: > We also need to realize() the SSISlave part of the object. This is why > the previous realize() ops is stored in M25P80Class and called in the > object realize() ops. > > This is fully compatible with the existing users of m25p80 and it > provide

Re: [Qemu-devel] [PATCH 1/9] m25p80: Replace JEDEC ID masking with function.

2016-06-15 Thread Cédric Le Goater
On 06/15/2016 03:41 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > Instead of always reading and comparing jededc ID, > replace it by function. > > Signed-off-by: Marcin Krzeminski Looks good to me. Some minor comments below. Thanks, C. > --- > hw/block/m25p80.c | 49

Re: [Qemu-devel] [PATCH 4/9] mirror: efficiently zero out target

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 03:34 PM, Eric Blake wrote: On 06/15/2016 02:46 AM, Denis V. Lunev wrote: On 06/15/2016 06:00 AM, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: With a bdrv_co_write_zeroes method on a target BDS zeroes will not be placed into the wire. Thus the target could be v

Re: [Qemu-devel] [PATCH v3 00/20] GICv3 emulation

2016-06-15 Thread Shannon Zhao
On 2016年06月15日 18:10, Peter Maydell wrote: > On 15 June 2016 at 11:06, Peter Maydell wrote: >> > On 15 June 2016 at 10:20, Andrew Jones wrote: >>> >> There may be a bug in the freebsd kernel. Maybe they need the equivalent >>> >> of Linux's 7c9b973061 "irqchip/gic-v3: Configure all interrupts as

[Qemu-devel] [PATCH] m25p80: provide a realize to support late inits.

2016-06-15 Thread Cédric Le Goater
We also need to realize() the SSISlave part of the object. This is why the previous realize() ops is stored in M25P80Class and called in the object realize() ops. This is fully compatible with the existing users of m25p80 and it provides a way to handle errors on the drive backend. Signed-off-by:

[Qemu-devel] [PATCH 3/9] m25p80: Allow more than four banks.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Allow to have more than four 16MiB regions for bigger flash devices. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 342f7c9..6910c52 100644 --- a

[Qemu-devel] [PATCH 0/9] m25p80: Add new 512Mbit and 1Gbit devices.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski This series adds support for new flash devices. Marcin Krzeminski (9): m25p80: Replace JEDEC ID masking with function. m25p80: Make a table for JEDEC ID. m25p80: Allow more than four banks. m25p80: Introduce COLLECTING_VAR_LEN_DATA state. m25p80: Add additional

[Qemu-devel] [PATCH 5/9] m25p80: Add additional flash commands:

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Page program 4byte/quad and erase 32K sectors 4 bytes. Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index ca1f882..55b4377 100644 --- a/hw/block/m25p80.c +++ b/h

[Qemu-devel] [PATCH 6/9] m25p80: Introduce quad and equad modes.

2016-06-15 Thread marcin.krzeminski
From: Marcin Krzeminski Quad and Equad modes for Spansion and Macronix flash devices. This commit also includes modification and new command to manipulate quad mode (status registers and dedicated commands). This work is based on Pawel Lenkow work. Signed-off-by: Marcin Krzeminski --- hw/block

Re: [Qemu-devel] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer

2016-06-15 Thread Paolo Bonzini
On 14/06/2016 23:30, Eric Blake wrote: > We were basing the advertisement of maximum discard and transfer > length off of UINT32_MAX, but since the rest of the block layer > has signed int limits on a transaction, nothing could ever reach > that maximum, and we risk overflowing an int once things

Re: [Qemu-devel] [PATCH v2 04/17] nbd: Allow larger requests

2016-06-15 Thread Paolo Bonzini
On 14/06/2016 23:30, Eric Blake wrote: > The NBD layer was breaking up request at a limit of 2040 sectors > (just under 1M) to cater to old qemu-nbd. But the server limit > was raised to 32M in commit 2d8214885 to match the kernel, more > than three years ago; and the upstream NBD Protocol is pro

Re: [Qemu-devel] [PATCH] m25p80: fix test on blk_pread() return value

2016-06-15 Thread Cédric Le Goater
On 06/15/2016 09:57 AM, Kevin Wolf wrote: > Am 14.06.2016 um 18:02 hat Cédric Le Goater geschrieben: >> On 06/14/2016 10:38 AM, Kevin Wolf wrote: >>> Am 14.06.2016 um 10:02 hat Cédric Le Goater geschrieben: >> #4 0x7fa81c6694ac in bdrv_aligned_pwritev (bs=0x7fa81d4dd050, >> req=, offs

Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 15:16, Laszlo Ersek wrote: > On 06/15/16 14:39, Paolo Bonzini wrote: >> Finally, assert that the other caller of esp_do_dma (esp_transfer_data) >> only transfers data and not a command. This is true because get_cmd >> cancels the old request synchronously before its caller handle_s

Re: [Qemu-devel] [Qemu-devel [RFC] [WIP] v1] Adding feature to reconnect with -r option to migrate command

2016-06-15 Thread Dr. David Alan Gilbert
* Md Haris Iqbal (haris.p...@gmail.com) wrote: > --- > hmp-commands.hx | 10 +--- > hmp.c | 4 ++- > include/migration/migration.h | 1 + > migration/migration.c | 60 > +-- > qapi-schema.json

Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread Laszlo Ersek
On 06/15/16 14:39, Paolo Bonzini wrote: > Avoid duplicated code between esp_do_dma and handle_ti. esp_do_dma > has the same code that handle_ti contains after the call to esp_do_dma; > but the code in handle_ti is never reached (... never reached after esp_do_dma() is called -- it is reached in g

Re: [Qemu-devel] [V12 0/4] AMD IOMMU

2016-06-15 Thread Jan Kiszka
On 2016-06-15 14:21, David Kiarie wrote: > Hi all, > > This patchset adds basic AMD IOMMU emulation support to Qemu. > > Changes since V11 >-AMD IOMMU is not started with -device amd-iommu (with a dependency on > Marcel's patches). s/not/now/ ;) >-IOMMU commands are represented using b

Re: [Qemu-devel] [Qemu-devel [RFC] [WIP] v2] Keeping the Source side alive incase of network failure (Migration recovery from network failure)

2016-06-15 Thread Eric Blake
On 06/15/2016 07:03 AM, Dr. David Alan Gilbert wrote: > * Eric Blake (ebl...@redhat.com) wrote: >> On 06/13/2016 12:38 AM, haris iqbal wrote: >> > ## > { 'enum': 'RunState', >'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', > 'postmigrate',

Re: [Qemu-devel] [PATCH 2/2] block: fix libvirt snapshot with existing bitmaps

2016-06-15 Thread Vladimir Sementsov-Ogievskiy
On 15.06.2016 00:33, Eric Blake wrote: On 06/14/2016 11:08 AM, Vladimir Sementsov-Ogievskiy wrote: Fix the following bug: # virsh start test Domain test started # virsh qemu-monitor-command test \ '{"execute":"block-dirty-bitmap-add",\ "arguments":{"node":"drive0","name":"a

Re: [Qemu-devel] [Qemu-devel [RFC] [WIP] v2] Keeping the Source side alive incase of network failure (Migration recovery from network failure)

2016-06-15 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 06/13/2016 12:38 AM, haris iqbal wrote: > > >>> ## > >>> { 'enum': 'RunState', > >>>'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', > >>> 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', > >>>

Re: [Qemu-devel] [Qemu-devel [RFC] [WIP] v2] Keeping the Source side alive incase of network failure (Migration recovery from network failure)

2016-06-15 Thread Dr. David Alan Gilbert
* Md Haris Iqbal (haris.p...@gmail.com) wrote: > --- > include/migration/migration.h | 1 + > migration/migration.c | 76 > --- > qapi-schema.json | 11 +-- > vl.c | 4 +++ > 4 files changed, 85 insertions

Re: [Qemu-devel] exec: Safe work in quiescent state

2016-06-15 Thread Sergey Fedorov
On 10/06/16 00:51, Sergey Fedorov wrote: > For certain kinds of tasks we might need a quiescent state to perform an > operation safely. Quiescent state means no CPU thread executing, and > probably BQL held as well. The tasks could include: > - Translation buffer flush (user and system-mode) > - Cr

Re: [Qemu-devel] [PATCH] linux-aio: Cancel BH if not needed

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 13:16, Kevin Wolf wrote: > linux-aio uses a BH in order to make sure that the remaining completions > are processed even in nested event loops of completion callbacks in > order to avoid deadlocks. > > There is no need, however, to have the BH overhead for the first call > into qem

[Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread Paolo Bonzini
Avoid duplicated code between esp_do_dma and handle_ti. esp_do_dma has the same code that handle_ti contains after the call to esp_do_dma; but the code in handle_ti is never reached because it is in an "else if". Remove the else and also the pointless return. esp_do_dma also has a partially dead

Re: [Qemu-devel] git master build failure

2016-06-15 Thread Laszlo Ersek
On 06/15/16 12:08, Mark Cave-Ayland wrote: > On 15/06/16 10:48, Andrew Jones wrote: > >> On Wed, Jun 15, 2016 at 08:14:18AM +0100, Mark Cave-Ayland wrote: >>> Hi Peter, >>> >>> Just to let you know that after pulling git master >>> (49237b856ae58ee7955be0b959c504c51b014f20) I see the following bui

Re: [Qemu-devel] [PATCH 4/9] mirror: efficiently zero out target

2016-06-15 Thread Eric Blake
On 06/15/2016 02:46 AM, Denis V. Lunev wrote: > On 06/15/2016 06:00 AM, Eric Blake wrote: >> On 06/14/2016 09:25 AM, Denis V. Lunev wrote: >>> With a bdrv_co_write_zeroes method on a target BDS zeroes will not be >>> placed >>> into the wire. Thus the target could be very efficiently zeroed out. >>

Re: [Qemu-devel] [PATCH] scsi: esp: check length before dma read

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 14:11, Laszlo Ersek wrote: > (1) In my opinion, this check is not sufficient. All of the following > objects: > > - the "len" local variable > - the "ESPState.dma_left" field > - the "ESPState.cmdlen" field > > have type "uint32_t" (that is, "unsigned int"). Therefore the addition

<    1   2   3   >