Re: [RFC v4 00/11] blkio: add libblkio BlockDriver

2022-08-31 Thread Stefan Hajnoczi
On Tue, Aug 23, 2022 at 08:31:03PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 8/23/22 01:23, Stefan Hajnoczi wrote: > > The remainder of the patch series reworks the existing QEMU > > bdrv_register_buf() > > API so virtio-blk emulation efficiently map guest RAM for libblkio - some > >

Re: [PATCH v4 12/12] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-08-31 Thread Bernhard Beschow
Am 31. August 2022 16:30:10 UTC schrieb BALATON Zoltan : >On Wed, 31 Aug 2022, Bernhard Beschow wrote: >> According to good QOM practice, an object should only deal with objects >> of its own sub tree. Having devices create an alias on the machine >> object doesn't respect this good practice. To

Re: [PATCH v4 12/12] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-08-31 Thread BALATON Zoltan
On Wed, 31 Aug 2022, Bernhard Beschow wrote: According to good QOM practice, an object should only deal with objects of its own sub tree. Having devices create an alias on the machine object doesn't respect this good practice. To resolve this, create the alias in the machine's code.

[PATCH v4 12/12] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-08-31 Thread Bernhard Beschow
According to good QOM practice, an object should only deal with objects of its own sub tree. Having devices create an alias on the machine object doesn't respect this good practice. To resolve this, create the alias in the machine's code. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c

[PATCH v4 08/12] hw/isa/vt82c686: Instantiate USB functions in host device

2022-08-31 Thread Bernhard Beschow
The USB functions can be enabled/disabled through the ISA function. Also its interrupt routing can be influenced there. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 hw/mips/fuloong2e.c | 3 --- hw/ppc/pegasos2.c | 4 3 files changed, 12 insertions(+), 7

[PATCH v4 06/12] hw/isa/vt82c686: Instantiate IDE function in host device

2022-08-31 Thread Bernhard Beschow
The IDE function is closely tied to the ISA function (e.g. the IDE interrupt routing happens there), so it makes sense that the IDE function is instantiated within the south bridge itself. Signed-off-by: Bernhard Beschow --- configs/devices/mips64el-softmmu/default.mak | 1 - hw/isa/Kconfig

[PATCH v4 11/12] hw/isa/vt82c686: Embed RTCState in host device

2022-08-31 Thread Bernhard Beschow
Embed the rtc in the host device, analoguous to the other child devices and analoguous to PIIX4. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index

[PATCH v4 05/12] hw/isa/vt82c686: Introduce TYPE_VIA_IDE define

2022-08-31 Thread Bernhard Beschow
Establishes consistency with other (VIA) devices. Signed-off-by: Bernhard Beschow --- hw/ide/via.c | 2 +- hw/mips/fuloong2e.c | 2 +- hw/ppc/pegasos2.c | 2 +- include/hw/isa/vt82c686.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v4 03/12] hw/isa/vt82c686: Prefer pci_address_space() over get_system_memory()

2022-08-31 Thread Bernhard Beschow
Unlike get_system_memory(), pci_address_space() respects the memory tree available to the parent device. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 9d12e1cae4..5582c0b179

[PATCH v4 02/12] hw/isa/vt82c686: Resolve unneeded attribute

2022-08-31 Thread Bernhard Beschow
Now that also the super io device is realized in the common realize method, the isa_bus attribute can be turned into a temporary. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/isa/vt82c686.c

[PATCH v4 10/12] hw/isa/vt82c686: Instantiate AC97 and MC97 functions in host device

2022-08-31 Thread Bernhard Beschow
The AC97 function's wakeup status is wired to the PM function and both the AC97 and MC97 interrupt routing is determined by the ISA function. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 16 hw/mips/fuloong2e.c | 4 hw/ppc/pegasos2.c | 5 - 3 files

[PATCH v4 09/12] hw/isa/vt82c686: Instantiate PM function in host device

2022-08-31 Thread Bernhard Beschow
The PM controller has activity bits which monitor activity of other built-in devices in the host device. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 13 + hw/mips/fuloong2e.c | 2 +- hw/ppc/pegasos2.c | 3 +-- include/hw/isa/vt82c686.h | 2 -- 4

[PATCH v4 01/12] hw/isa/vt82c686: Resolve chip-specific realize methods

2022-08-31 Thread Bernhard Beschow
The object creation now happens in chip-specific init methods which allows the realize methods to be consolidated into one method. Shifting the logic into the init methods has the addidional advantage that the parent object's init methods are called implicitly - like constructors in

[PATCH v4 07/12] hw/isa/vt82c686: Introduce TYPE_VT82C686B_USB_UHCI define

2022-08-31 Thread Bernhard Beschow
Suggested-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/mips/fuloong2e.c| 4 ++-- hw/ppc/pegasos2.c | 4 ++-- hw/usb/vt82c686-uhci-pci.c | 4 ++-- include/hw/isa/vt82c686.h | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/mips/fuloong2e.c

[PATCH v4 04/12] hw/isa/vt82c686: Reuse errp

2022-08-31 Thread Bernhard Beschow
Rather than terminating abruptly, make use of the already present errp and propagate the error to the caller. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index

[PATCH v4 00/12] Instantiate VT82xx functions in host device

2022-08-31 Thread Bernhard Beschow
v3: * Fix in comment: AC97 Modem -> MC97 Modem (Zoltan) * Introduce TYPE_VT82C686B_USB_UHCI define (Zoltan) * Introduce TYPE_VIA_IDE define (for consistency) v3: * Replace pre increment by post increment in for loop (Zoltan) * Move class defines close to where the class is defined (Zoltan)

Re: [PATCH 03/51] block: Unify the get_tmp_filename() implementation

2022-08-31 Thread Daniel P . Berrangé
On Wed, Aug 31, 2022 at 04:54:41PM +0400, Marc-André Lureau wrote: > Hi Bin > > On Wed, Aug 24, 2022 at 1:42 PM Bin Meng wrote: > > > From: Bin Meng > > > > At present get_tmp_filename() has platform specific implementations > > to get the directory to use for temporary files. Switch over to

Re: [PATCH 08/51] block/vvfat: Unify the mkdir() call

2022-08-31 Thread Marc-André Lureau
Hi On Wed, Aug 24, 2022 at 2:20 PM Bin Meng wrote: > From: Bin Meng > > There is a difference in the mkdir() call for win32 and non-win32 > platforms, and currently is handled in the codes with #ifdefs. > > glib provides a portable g_mkdir_with_parents() API and we can use > it to unify the

Re: [PATCH 03/51] block: Unify the get_tmp_filename() implementation

2022-08-31 Thread Marc-André Lureau
Hi Bin On Wed, Aug 24, 2022 at 1:42 PM Bin Meng wrote: > From: Bin Meng > > At present get_tmp_filename() has platform specific implementations > to get the directory to use for temporary files. Switch over to use > g_get_tmp_dir() which works on all supported platforms. > > It "works" quite

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-31 Thread Akihiko Odaki
On Wed, Aug 31, 2022 at 5:18 PM Markus Armbruster wrote: > > Alex Williamson writes: > > > On Tue, 30 Aug 2022 13:37:35 +0200 > > Markus Armbruster wrote: > >>if (!offset) { > >>offset = pci_find_space(pdev, size); > >>/* out of PCI config space is programming

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-31 Thread Sam Li
Markus Armbruster 于2022年8月31日周三 16:35写道: > > Sam Li writes: > > > Markus Armbruster 于2022年8月30日周二 19:57写道: > >> > >> Sam Li writes: > >> > >> > By adding zone management operations in BlockDriver, storage controller > >> > emulation can use the new block layer APIs including Report Zone and >

Re: [PATCH v8 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-31 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2022年8月30日周二 19:57写道: >> >> Sam Li writes: >> >> > By adding zone management operations in BlockDriver, storage controller >> > emulation can use the new block layer APIs including Report Zone and >> > four zone management operations (open, close, finish,

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-31 Thread Markus Armbruster
Alex Williamson writes: > On Tue, 30 Aug 2022 13:37:35 +0200 > Markus Armbruster wrote: >>if (!offset) { >>offset = pci_find_space(pdev, size); >>/* out of PCI config space is programming error */ >>assert(offset); >>} else { >>/*