Re: [Qemu-block] bug in reopen arch

2018-06-22 Thread Kevin Wolf
(Berto, I'm CCing you just because this is about reopen, so you might have thoughts about it. But it's not really related to what you're currently working on.) Am 21.06.2018 um 19:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > 21.06.2018 20:17, Kevin Wolf wrote: > > Am 21.06.2018 um 17:55 hat

Re: [Qemu-block] [PATCH v3 2/2] block/file-posix: reconfigure aio on iothread start

2018-06-22 Thread Kevin Wolf
Am 22.06.2018 um 04:25 hat Fam Zheng geschrieben: > On Thu, 06/21 15:21, Nishanth Aravamudan wrote: > > When the AioContext changes, we need to associate a LinuxAioState with > > the new AioContext. Use the bdrv_attach_aio_context callback and call > > the new aio_setup_linux_aio(), which will allo

Re: [Qemu-block] bug in reopen arch

2018-06-22 Thread Vladimir Sementsov-Ogievskiy
22.06.2018 11:56, Kevin Wolf wrote: (Berto, I'm CCing you just because this is about reopen, so you might have thoughts about it. But it's not really related to what you're currently working on.) Am 21.06.2018 um 19:44 hat Vladimir Sementsov-Ogievskiy geschrieben: 21.06.2018 20:17, Kevin Wolf w

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Christian Borntraeger
On 06/15/2018 04:21 PM, Kevin Wolf wrote: > The -drive option serial was deprecated in QEMU 2.10. It's time to > remove it. > > Tests need to be updated to set the serial number with -global instead > of using the -drive option. libvirt 4.5 still creates those (at least on s390x)

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: Implement co versions of discard/flush

2018-06-22 Thread Eric Blake
On 06/21/2018 12:19 PM, Kevin Wolf wrote: This simplifies file-posix by implementing the coroutine variants of the discard and flush BlockDriver callbacks. These were the last remaining users of paio_submit(), which can be removed now. Signed-off-by: Kevin Wolf --- block/file-posix.c | 72 +++

[Qemu-block] request a revert for "block: Remove deprecated -drive option serial" (was block: Remove deprecated -drive option serial)

2018-06-22 Thread Christian Borntraeger
adding more CC. On 06/22/2018 01:38 PM, Christian Borntraeger wrote: > > On 06/15/2018 04:21 PM, Kevin Wolf wrote: >> The -drive option serial was deprecated in QEMU 2.10. It's time to >> remove it. >> >> Tests need to be updated to set the serial number with -global instead >> of using the -driv

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Kevin Wolf
Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: > > On 06/15/2018 04:21 PM, Kevin Wolf wrote: > > The -drive option serial was deprecated in QEMU 2.10. It's time to > > remove it. > > > > Tests need to be updated to set the serial number with -global instead > > of using the -drive

Re: [Qemu-block] bug in reopen arch

2018-06-22 Thread Kevin Wolf
Am 22.06.2018 um 13:17 hat Vladimir Sementsov-Ogievskiy geschrieben: > 22.06.2018 11:56, Kevin Wolf wrote: > > (Berto, I'm CCing you just because this is about reopen, so you might > > have thoughts about it. But it's not really related to what you're > > currently working on.) > > > > Am 21.06.20

[Qemu-block] [PATCH] nbd/server: Silence gcc false positive

2018-06-22 Thread Eric Blake
The code has a while() loop that always initialized 'end', and the loop always executes at least once (as evidenced by the assert() just prior to the loop). But some versions of gcc still complain that 'end' is used uninitialized, so silence them. Signed-off-by: Eric Blake --- Peter, do you wan

Re: [Qemu-block] [PATCH] nbd/server: Silence gcc false positive

2018-06-22 Thread Peter Maydell
On 22 June 2018 at 13:58, Eric Blake wrote: > The code has a while() loop that always initialized 'end', and > the loop always executes at least once (as evidenced by the assert() > just prior to the loop). But some versions of gcc still complain > that 'end' is used uninitialized, so silence the

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Christian Borntraeger
On 06/22/2018 02:55 PM, Kevin Wolf wrote: > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: >> >> On 06/15/2018 04:21 PM, Kevin Wolf wrote: >>> The -drive option serial was deprecated in QEMU 2.10. It's time to >>> remove it. >>> >>> Tests need to be updated to set the serial numbe

[Qemu-block] [PATCH 3/5] nvme: Proper state handling on enable/disable

2018-06-22 Thread Shimi Gersner
When device transitions from CC.EN=1 to CC.EN=0 (Controller Reset) it should properly reset its state, currently device only partially clears its state. Following actions were added to controller reset phase - Clear CC and CSTS completely - Clear and deassert irqs - On shutdown, leave state as is

[Qemu-block] [PATCH 4/5] nvme: Fix phantom irq raise

2018-06-22 Thread Shimi Gersner
CQ irq is asserted when requested are ready for the guest to collect. On edge cases, irq is raised when there is no actual request pending on the queue. Irq is raised for a CQ from nvme_post_cqes uncondtionally if there are processes requests or not. nvme_post_cqes is triggered through timer in tw

[Qemu-block] [PATCH 1/5] nvme: PCI/e configuration from specification

2018-06-22 Thread Shimi Gersner
PCI/e configuration currently does not meets specifications. Patch includes various configuration changes to support specifications - BAR2 to return zero when read and CMD.IOSE is not set. - Expose NVME configuration through IO space (Optional). - PCI Power Management v1.2. - PCIe Function Level R

[Qemu-block] [PATCH 2/5] nvme: CQ/SQ proper validation & status code

2018-06-22 Thread Shimi Gersner
Device fails to properly comply CQ/SQ id validation. nvme_check_[cs]id was used for both validation of the id and to check if the id is used. Function was split and into two seperate functions and used properly on CQ/SQ creation/deletion. When id check is failed a proper error should be returned

[Qemu-block] [PATCH 5/5] nvme: Missing MSI message upon partial CQ read

2018-06-22 Thread Shimi Gersner
When MSIx interrupts are enabled, each CQ is associated with a vector which is expected to be called upon ready data in the CQ buffer. After guest reads from the buffer, it updates the processed buffer position using a CQ dedicated DB. Upon reading only partial data from the CQ buffer, device fail

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Christian Borntraeger
On 06/22/2018 03:36 PM, Christian Borntraeger wrote: > > > On 06/22/2018 02:55 PM, Kevin Wolf wrote: >> Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: >>> >>> On 06/15/2018 04:21 PM, Kevin Wolf wrote: The -drive option serial was deprecated in QEMU 2.10. It's time to r

Re: [Qemu-block] [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Daniel P . Berrangé
On Fri, Jun 22, 2018 at 03:36:50PM +0200, Christian Borntraeger wrote: > > > On 06/22/2018 02:55 PM, Kevin Wolf wrote: > > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: > >> > >> On 06/15/2018 04:21 PM, Kevin Wolf wrote: > >>> The -drive option serial was deprecated in QEMU 2.10.

Re: [Qemu-block] [PATCH] nbd/server: Silence gcc false positive

2018-06-22 Thread Peter Maydell
On 22 June 2018 at 13:59, Peter Maydell wrote: > On 22 June 2018 at 13:58, Eric Blake wrote: >> The code has a while() loop that always initialized 'end', and >> the loop always executes at least once (as evidenced by the assert() >> just prior to the loop). But some versions of gcc still compla

Re: [Qemu-block] [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Daniel P . Berrangé
On Fri, Jun 22, 2018 at 04:19:29PM +0200, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: > >> > >> On 06/15/2018 04:21 PM, Kevin Wolf wrote: > >> > The -drive option serial was deprecated in QEMU 2.10. It's time to > >> > remove

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Markus Armbruster
Kevin Wolf writes: > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: >> >> On 06/15/2018 04:21 PM, Kevin Wolf wrote: >> > The -drive option serial was deprecated in QEMU 2.10. It's time to >> > remove it. >> > >> > Tests need to be updated to set the serial number with -global ins

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Kevin Wolf
Am 22.06.2018 um 15:36 hat Christian Borntraeger geschrieben: > > > On 06/22/2018 02:55 PM, Kevin Wolf wrote: > > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: > >> > >> On 06/15/2018 04:21 PM, Kevin Wolf wrote: > >>> The -drive option serial was deprecated in QEMU 2.10. It's time

Re: [Qemu-block] [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Daniel P . Berrangé
On Fri, Jun 22, 2018 at 03:25:19PM +0100, Daniel P. Berrangé wrote: > On Fri, Jun 22, 2018 at 04:19:29PM +0200, Markus Armbruster wrote: > > Kevin Wolf writes: > > > > > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: > > >> > > >> On 06/15/2018 04:21 PM, Kevin Wolf wrote: > > >> >

Re: [Qemu-block] [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Daniel P . Berrangé
On Fri, Jun 22, 2018 at 04:25:13PM +0200, Kevin Wolf wrote: > Am 22.06.2018 um 15:36 hat Christian Borntraeger geschrieben: > > > > > > On 06/22/2018 02:55 PM, Kevin Wolf wrote: > > > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: > > >> > > >> On 06/15/2018 04:21 PM, Kevin Wolf wr

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Christian Borntraeger
On 06/22/2018 04:25 PM, Kevin Wolf wrote: > Am 22.06.2018 um 15:36 hat Christian Borntraeger geschrieben: >> >> >> On 06/22/2018 02:55 PM, Kevin Wolf wrote: >>> Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: On 06/15/2018 04:21 PM, Kevin Wolf wrote: > The -drive opti

Re: [Qemu-block] [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Eric Blake
On 06/22/2018 09:30 AM, Daniel P. Berrangé wrote: Perhaps we could use a more structured notification, to make detecting use of deprecated features programmatically trivial. A QMP event might do. Libvirt currently has CI that is largely focused on unit testing. We recently did some work, howev

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Peter Maydell
On 22 June 2018 at 15:38, Christian Borntraeger wrote: > So if everyone has adopted we can certainly follow our deprecation policy. > Now if deprecation breaks some real world cases it makes no sense to > "insist" on that deprecation policy. Really: If latest greatest libvirt > does not work 2 wee

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Kevin Wolf
Am 22.06.2018 um 16:38 hat Christian Borntraeger geschrieben: > > > On 06/22/2018 04:25 PM, Kevin Wolf wrote: > > Am 22.06.2018 um 15:36 hat Christian Borntraeger geschrieben: > >> > >> > >> On 06/22/2018 02:55 PM, Kevin Wolf wrote: > >>> Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieb

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd/server: Silence gcc false positive

2018-06-22 Thread Eric Blake
On 06/22/2018 07:58 AM, Eric Blake wrote: The code has a while() loop that always initialized 'end', and the loop always executes at least once (as evidenced by the assert() just prior to the loop). But some versions of gcc still complain that 'end' is used uninitialized, so silence them. Signe

[Qemu-block] [PATCH] nbd/server: Fix dirty bitmap logic regression

2018-06-22 Thread Eric Blake
In my hurry to fix a build failure, I introduced a logic bug. The assertion conditional is backwards, meaning that qemu will now abort instead of reporting dirty bitmap status. The bug can only be tickled by an NBD client using an exported dirty bitmap (which is still an experimental QMP command),

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Daniel P . Berrangé
On Fri, Jun 22, 2018 at 04:25:13PM +0200, Kevin Wolf wrote: > Am 22.06.2018 um 15:36 hat Christian Borntraeger geschrieben: > > > > > > On 06/22/2018 02:55 PM, Kevin Wolf wrote: > > > Am 22.06.2018 um 13:38 hat Christian Borntraeger geschrieben: > > >> > > >> On 06/15/2018 04:21 PM, Kevin Wolf wr

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Christian Borntraeger
On 06/22/2018 05:01 PM, Kevin Wolf wrote: > Am 22.06.2018 um 16:38 hat Christian Borntraeger geschrieben: >> >> >> On 06/22/2018 04:25 PM, Kevin Wolf wrote: >>> Am 22.06.2018 um 15:36 hat Christian Borntraeger geschrieben: On 06/22/2018 02:55 PM, Kevin Wolf wrote: > Am 22.06.2

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd/server: Silence gcc false positive

2018-06-22 Thread no-reply
ch 'test' 6489e4b10c Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180622' into staging 10e84d2504 xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom() aea21afaef vl.c: Don't zero-initialize statics for serial_hds

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd/server: Silence gcc false positive

2018-06-22 Thread Peter Maydell
new branch 'test' > 6489e4b10c Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20180622' into staging > 10e84d2504 xen: Don't use memory_region_init_ram_nomigrate() in > pci_assign_dev_load_option_rom() > aea21afaef vl.c: Don't zero-init

Re: [Qemu-block] [PATCH v3 1/2] linux-aio: properly bubble up errors from initialization

2018-06-22 Thread Nishanth Aravamudan
On 22.06.2018 [10:21:19 +0800], Fam Zheng wrote: > On Thu, 06/21 15:21, Nishanth Aravamudan wrote: > > laio_init() can fail for a couple of reasons, which will lead to a NULL > > pointer dereference in laio_attach_aio_context(). > > > > To solve this, add a aio_setup_linux_aio() function which is

Re: [Qemu-block] [PATCH v3 2/2] block/file-posix: reconfigure aio on iothread start

2018-06-22 Thread Nishanth Aravamudan
On 22.06.2018 [11:02:06 +0200], Kevin Wolf wrote: > Am 22.06.2018 um 04:25 hat Fam Zheng geschrieben: > > On Thu, 06/21 15:21, Nishanth Aravamudan wrote: > > > When the AioContext changes, we need to associate a LinuxAioState with > > > the new AioContext. Use the bdrv_attach_aio_context callback a

Re: [Qemu-block] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-06-22 Thread Kevin Wolf
Am 22.06.2018 um 17:40 hat Daniel P. Berrangé geschrieben: > On Fri, Jun 22, 2018 at 04:25:13PM +0200, Kevin Wolf wrote: > > This was in fact one release longer than our deprecation policy says. > > Are we serious about the deprecation policy or aren't we? > > > > I might consider reverting a chan

[Qemu-block] [PATCH v4] linux-aio: properly bubble up errors from initialization

2018-06-22 Thread Nishanth Aravamudan
laio_init() can fail for a couple of reasons, which will lead to a NULL pointer dereference in laio_attach_aio_context(). To solve this, add a aio_setup_linux_aio() function which is called early in raw_open_common. If this fails, propagate the error up. The signature of aio_get_linux_aio() was no

Re: [Qemu-block] [qemu-s390x] request a revert for "block: Remove deprecated -drive option serial" (was block: Remove deprecated -drive option serial)

2018-06-22 Thread Thomas Huth
On 22.06.2018 14:51, Christian Borntraeger wrote: > adding more CC. > > On 06/22/2018 01:38 PM, Christian Borntraeger wrote: >> >> On 06/15/2018 04:21 PM, Kevin Wolf wrote: >>> The -drive option serial was deprecated in QEMU 2.10. It's time to >>> remove it. >>> >>> Tests need to be updated to set

[Qemu-block] [PATCH] migration: Appease coverity, skip empty block trees

2018-06-22 Thread John Snow
If a tree consists exclusively of implicit filter nodes, we might crash QEMU. This configuration should not exist in practice, but if it did, skipping it would be fine. For the purposes of debug builds, throw an assert to remind us that this configuration is truly unexpected, but if it's compiled

Re: [Qemu-block] [Qemu-devel] [PATCH] migration: Appease coverity, skip empty block trees

2018-06-22 Thread Philippe Mathieu-Daudé
On 06/22/2018 05:11 PM, John Snow wrote: > If a tree consists exclusively of implicit filter nodes, we might crash > QEMU. This configuration should not exist in practice, but if it did, > skipping it would be fine. > > For the purposes of debug builds, throw an assert to remind us that > this con

Re: [Qemu-block] [Qemu-devel] [PATCH] migration: Appease coverity, skip empty block trees

2018-06-22 Thread John Snow
On 06/22/2018 04:24 PM, Philippe Mathieu-Daudé wrote: > On 06/22/2018 05:11 PM, John Snow wrote: >> If a tree consists exclusively of implicit filter nodes, we might crash >> QEMU. This configuration should not exist in practice, but if it did, >> skipping it would be fine. >> >> For the purpose

Re: [Qemu-block] [Qemu-devel] [PATCH] migration: Appease coverity, skip empty block trees

2018-06-22 Thread Philippe Mathieu-Daudé
On 06/22/2018 05:35 PM, John Snow wrote: > On 06/22/2018 04:24 PM, Philippe Mathieu-Daudé wrote: >> On 06/22/2018 05:11 PM, John Snow wrote: >>> If a tree consists exclusively of implicit filter nodes, we might crash >>> QEMU. This configuration should not exist in practice, but if it did, >>> skip