Re: [Qemu-block] [PATCH v5 08/11] hw/m68k: add Nubus support for macfb video card

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/display/macfb.c | 56 ++ include/hw/display/macfb.h | 21 + 2 files c

Re: [Qemu-block] [PATCH v5 10/11] dp8393x: manage big endian bus

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier This is needed by Quadra 800, this card can run on little-endian or big-endian bus. Signed-off-by: Laurent Vivier Tested-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hervé Poussineau

Re: [Qemu-block] [PATCH v5 09/11] hw/m68k: add a dummy SWIM floppy controller

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/block/Makefile.objs | 1 + hw/block/swim.c | 415 incl

Re: [Qemu-block] [PATCH v5 03/11] escc: introduce a selector for the register bit

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier On Sparc and PowerMac, the bit 0 of the address selects the register type (control or data) and bit 1 selects the channel (B or A). On m68k Macintosh, the bit 0 selects the channel and bit 1 the register type. This patch i

Re: [Qemu-block] [PATCH v5 07/11] hw/m68k: add Nubus support

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/Makefile.objs| 1 + hw/nubus/Makefile.objs | 4 + hw/nubus/mac-nubus-bridge.c

Re: [Qemu-block] [PATCH v5 05/11] hw/m68k: Apple Sound Chip (ASC) emulation

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier This is broken as the linux driver seems broken too... Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/audio/Makefile.objs | 1 + hw/audio/asc.c | 446 +

Re: [Qemu-block] [PATCH v5 06/11] esp: add pseudo-DMA as used by Macintosh

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/scsi/esp.c | 292 +- include/hw/scsi/esp.h | 7 ++ 2 fil

Re: [Qemu-block] [PATCH v5 01/11] hw/m68k: add via support

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/misc/Makefile.objs | 1 + hw/misc/mac_via.c | 666 ++ in

Re: [Qemu-block] [PATCH v5 04/11] hw/m68k: add macfb video card

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- arch_init.c| 4 + hw/display/Makefile.objs | 1 + hw/display/macfb.c | 419

Re: [Qemu-block] [PATCH v5 02/11] hw/m68k: implement ADB bus support for via

2018-10-29 Thread Hervé Poussineau
Le 29/10/2018 à 14:39, Mark Cave-Ayland a écrit : From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/misc/mac_via.c | 190 ++ include/hw/misc/mac_via.h | 7 ++ 2

[Qemu-block] [PATCH 4/4] nvme: use pci_dev directly in nvme_realize

2018-10-29 Thread Li Qiang
There is no need to make another reference. Signed-off-by: Li Qiang --- hw/block/nvme.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index a406c23..f63e344 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1235,7 +1235,7 @@ st

[Qemu-block] [PATCH 1/4] nvme: use TYPE_NVME instead of constant string

2018-10-29 Thread Li Qiang
Signed-off-by: Li Qiang --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index fc7dacb..676cc48 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1379,7 +1379,7 @@ static void nvme_instance_init(Object *obj) } stati

[Qemu-block] [PATCH 3/4] nvme: check msix_init_exclusive_bar return value

2018-10-29 Thread Li Qiang
As this function can fail. Signed-off-by: Li Qiang --- hw/block/nvme.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 72c9644..a406c23 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1250,7 +1250,10 @@ static void nvme_reali

[Qemu-block] [PATCH 2/4] nvme: ensure the num_queues is not zero

2018-10-29 Thread Li Qiang
When it is zero, it causes segv. Backtrack: Thread 5 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffc6c17700 (LWP 51808)] 0x55acbd90 in nvme_start_ctrl (n=0x624c8100) at hw/block/nvme.c:820 warning: Source file is more recent than executable. 8

[Qemu-block] [PATCH 0/4] nvme: some small fixes

2018-10-29 Thread Li Qiang
Including sanity check and code cleanup. Li Qiang (4): nvme: use TYPE_NVME instead of constant string nvme: ensure the num_queues is not zero nvme: check msix_init_exclusive_bar return value nvme: use pci_dev directly in nvme_realize hw/block/nvme.c | 17 - 1 file changed

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/11] escc: introduce a selector for the register bit

2018-10-29 Thread Philippe Mathieu-Daudé
Hi Marc, Laurent. On Mon, Oct 29, 2018 at 2:43 PM Mark Cave-Ayland wrote: > > From: Laurent Vivier > > On Sparc and PowerMac, the bit 0 of the address > selects the register type (control or data) and > bit 1 selects the channel (B or A). > > On m68k Macintosh, the bit 0 selects the channel and

[Qemu-block] [PATCH] block/nvme: call blk_drain in NVMe reset code to avoid lockups

2018-10-29 Thread Igor Druzhinin
When blk_flush called in NVMe reset path S/C queues are already freed which means that re-entering AIO handling loop having some IO requests unfinished will lockup or crash as their SG structures being potentially reused. Call blk_drain before freeing the queues to avoid this nasty scenario. Signe

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

2018-10-29 Thread Peter Maydell
On 29 October 2018 at 13:56, Stefan Hajnoczi wrote: > The following changes since commit 285278ca785f5fa9a570927e1c0958a2ca2b2150: > > Merge remote-tracking branch 'remotes/famz/tags/testing-pull-request' into > staging (2018-10-27 19:55:08 +0100) > > are available in the Git repository at: > >

Re: [Qemu-block] ping2 Re: [Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-10-29 Thread John Snow
On 10/29/2018 01:52 PM, Vladimir Sementsov-Ogievskiy wrote: > ping2 > > Hi, what about this finally? Looks like everyone see a lot of comments > and thing, that there should be a new version, but actually, there is > almost unrelated discussion and/or answered questions. Only rephrasing > by

[Qemu-block] ping2 Re: [Qemu-devel] [PATCH 4/6] dirty-bitmaps: clean-up bitmaps loading and migration logic

2018-10-29 Thread Vladimir Sementsov-Ogievskiy
ping2 Hi, what about this finally? Looks like everyone see a lot of comments and thing, that there should be a new version, but actually, there is almost unrelated discussion and/or answered questions. Only rephrasing by Eric in patch 2 may be applied, to change something. The series fix the bu

Re: [Qemu-block] could somebody who understands the block refcounting look at CID 1395870, CID 1395871?

2018-10-29 Thread Max Reitz
On 29.10.18 11:51, Peter Maydell wrote: > Hi; could somebody who understands the block layer refcounting have > a look at Coverity issues CID 1395870 and 1395871, please? Don't forget 1395869. > In both > cases, Coverity reports a use-after-free because it thinks that a > sequence where a code pa

[Qemu-block] [PULL 1/2] util: aio-posix: fix a typo

2018-10-29 Thread Stefan Hajnoczi
From: Li Qiang Cc: qemu-triv...@nongnu.org Signed-off-by: Li Qiang Reviewed-by: Peter Maydell Reviewed-by: Fam Zheng Message-id: 1538964972-3223-1-git-send-email-liq...@gmail.com Signed-off-by: Stefan Hajnoczi --- util/aio-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[Qemu-block] [PULL 0/2] Block patches

2018-10-29 Thread Stefan Hajnoczi
The following changes since commit 285278ca785f5fa9a570927e1c0958a2ca2b2150: Merge remote-tracking branch 'remotes/famz/tags/testing-pull-request' into staging (2018-10-27 19:55:08 +0100) are available in the Git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for

[Qemu-block] [PULL 2/2] nvdimm: Add docs hint for Linux driver name

2018-10-29 Thread Stefan Hajnoczi
From: Kees Cook I spent way too much time trying to figure out why the emulated NVDIMM was missing under Linux. In an effort to help others who might be looking for these kinds of things in the future, include a hint. Signed-off-by: Kees Cook Message-id: 20181018201351.GA25286@beast Signed-off-

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

2018-10-29 Thread Stefan Hajnoczi
Sorry, this pull request came out wrong. I will resend. Stefan

[Qemu-block] [PATCH v5 10/11] dp8393x: manage big endian bus

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier This is needed by Quadra 800, this card can run on little-endian or big-endian bus. Signed-off-by: Laurent Vivier Tested-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé --- hw/net/dp8393x.c | 88 1 file ch

[Qemu-block] [0 2/2] nvdimm: Add docs hint for Linux driver name

2018-10-29 Thread Stefan Hajnoczi
From: Kees Cook I spent way too much time trying to figure out why the emulated NVDIMM was missing under Linux. In an effort to help others who might be looking for these kinds of things in the future, include a hint. Signed-off-by: Kees Cook Message-id: 20181018201351.GA25286@beast Signed-off-

[Qemu-block] [PATCH v5 11/11] hw/m68k: define Macintosh Quadra 800

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier If you want to test the machine, it doesn't yet boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer with: ./qemu-system-m68k \ -M q800 \ -serial none -serial mon:stdio \ -m 1000M -drive f

[Qemu-block] [PATCH v5 09/11] hw/m68k: add a dummy SWIM floppy controller

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/block/Makefile.objs | 1 + hw/block/swim.c | 415 include/hw/block/swim.h | 76 + 3 files changed, 4

[Qemu-block] [0 0/2] Block patches

2018-10-29 Thread Stefan Hajnoczi
The following changes since commit 285278ca785f5fa9a570927e1c0958a2ca2b2150: Merge remote-tracking branch 'remotes/famz/tags/testing-pull-request' into staging (2018-10-27 19:55:08 +0100) are available in the Git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for

[Qemu-block] [0 1/2] util: aio-posix: fix a typo

2018-10-29 Thread Stefan Hajnoczi
From: Li Qiang Cc: qemu-triv...@nongnu.org Signed-off-by: Li Qiang Reviewed-by: Peter Maydell Reviewed-by: Fam Zheng Message-id: 1538964972-3223-1-git-send-email-liq...@gmail.com Signed-off-by: Stefan Hajnoczi --- util/aio-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[Qemu-block] [PATCH v5 05/11] hw/m68k: Apple Sound Chip (ASC) emulation

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier This is broken as the linux driver seems broken too... Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/audio/Makefile.objs | 1 + hw/audio/asc.c | 446 + incl

[Qemu-block] [PATCH v5 07/11] hw/m68k: add Nubus support

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/Makefile.objs| 1 + hw/nubus/Makefile.objs | 4 + hw/nubus/mac-nubus-bridge.c | 45 hw/nubus/nubus-bridge.c

[Qemu-block] [PATCH v5 08/11] hw/m68k: add Nubus support for macfb video card

2018-10-29 Thread Mark Cave-Ayland
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/display/macfb.c | 56 ++ include/hw/display/macfb.h | 21 + 2 files changed, 77 insertions(+) diff --git a/hw/display/macfb

[Qemu-block] [PATCH v5 04/11] hw/m68k: add macfb video card

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- arch_init.c| 4 + hw/display/Makefile.objs | 1 + hw/display/macfb.c | 419 + include/hw/display/m

[Qemu-block] [PATCH v5 06/11] esp: add pseudo-DMA as used by Macintosh

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/scsi/esp.c | 292 +- include/hw/scsi/esp.h | 7 ++ 2 files changed, 270 insertions(+), 29 deletions(-) diff --

[Qemu-block] [PATCH v5 01/11] hw/m68k: add via support

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/misc/Makefile.objs | 1 + hw/misc/mac_via.c | 666 ++ include/hw/misc/mac_via.h | 107 3 files changed

[Qemu-block] [PATCH v5 02/11] hw/m68k: implement ADB bus support for via

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/misc/mac_via.c | 190 ++ include/hw/misc/mac_via.h | 7 ++ 2 files changed, 197 insertions(+) diff --git a/hw/misc

[Qemu-block] [PATCH v5 00/11] hw/m68k: add Apple Machintosh Quadra 800 machine

2018-10-29 Thread Mark Cave-Ayland
(MCA: Laurent is AFK today so I'm posting the latest version of this in advance of soft freeze. I've addressed the technical comments, the only outstanding feedback is related to i) should comment blocks copied from Linux headers be removed in patch 1?, ii) is it worth keeping ASC emulation given t

[Qemu-block] [PATCH v5 03/11] escc: introduce a selector for the register bit

2018-10-29 Thread Mark Cave-Ayland
From: Laurent Vivier On Sparc and PowerMac, the bit 0 of the address selects the register type (control or data) and bit 1 selects the channel (B or A). On m68k Macintosh, the bit 0 selects the channel and bit 1 the register type. This patch introduces a new parameter (bit_swap) to the device i

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] nvme: free cmbuf in nvme_exit

2018-10-29 Thread Philippe Mathieu-Daudé
On 29/10/18 7:29, Li Qiang wrote: This avoid a memory leak in unhotplug nvme device. Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé --- hw/block/nvme.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 359a06d0ad..09d7c90259 1006

Re: [Qemu-block] [PULL 00/20] Trivial patches patches

2018-10-29 Thread Peter Maydell
On 26 October 2018 at 16:31, Laurent Vivier wrote: > The following changes since commit 808ebd66e467f77c0d1f8c6346235f81e9c99cf2: > > Merge remote-tracking branch 'remotes/riscv/tags/riscv-for-master-3.1-sf0' > into staging (2018-10-25 17:41:03 +0100) > > are available in the Git repository at:

[Qemu-block] could somebody who understands the block refcounting look at CID 1395870, CID 1395871?

2018-10-29 Thread Peter Maydell
Hi; could somebody who understands the block layer refcounting have a look at Coverity issues CID 1395870 and 1395871, please? In both cases, Coverity reports a use-after-free because it thinks that a sequence where a code path might (conditionally) end up calling blk_deref() twice could be freeing