Re: [PATCH v2 00/12] linux-user sparc fixes

2019-10-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191025113921.9412-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v2 00/12] linux-user sparc fixes Type: series Message-id: 20191025113921.9412-1-richard.he

Re: USB-audio sound issues with qemu-system-ppc in Linux and Windows.

2019-10-26 Thread Howard Spoelstra
Hi, I'd like to add to the previous report that similar issues are present in OSX (Sierra) builds of qemu-system-ppc. In Mac OS 9.2 and OS X 10.3 guests, sound through the usb-audio device is unrecognisable. After forcibly shutting down Mac OS 9.2 after it becomes unresponsive, qemu crashes. The

Re: [PATCH v1 1/1] opensbi: Upgrade from v0.4 to v0.5

2019-10-26 Thread Philippe Mathieu-Daudé
Hi Alistair, On 10/26/19 1:15 AM, Alistair Francis wrote: This release has: Lot of critical fixes Hypervisor extension support SBI v0.2 base extension support Debug prints support Handle traps when doing unpriv load/store Allow compiling without FP support Use

Re: [PATCH v1 1/1] opensbi: Upgrade from v0.4 to v0.5

2019-10-26 Thread Philippe Mathieu-Daudé
On Sat, Oct 26, 2019 at 10:45 AM Philippe Mathieu-Daudé wrote: > > Hi Alistair, > > On 10/26/19 1:15 AM, Alistair Francis wrote: > > This release has: > > Lot of critical fixes > > Hypervisor extension support > > SBI v0.2 base extension support > > Debug prints support > >

Re: [PULL 0/2] Block patches

2019-10-26 Thread Peter Maydell
On Fri, 25 Oct 2019 at 20:18, Stefan Hajnoczi wrote: > > The following changes since commit 58560ad254fbda71d4daa6622d71683190070ee2: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191024' > into staging (2019-10-24 16:22:58 +0100) > > are available in the Git repository a

Re: USB-audio sound issues with qemu-system-ppc in Linux and Windows.

2019-10-26 Thread BALATON Zoltan
Hello, On Sat, 26 Oct 2019, Howard Spoelstra wrote: I'd like to add to the previous report that similar issues are present in OSX (Sierra) builds of qemu-system-ppc. I think the problem is not specific to host OS so instead of giving debugging info for all hosts which would just confuse anyon

Re: [PATCH v3 5/6] hppa: Add emulation of Artist graphics

2019-10-26 Thread Mark Cave-Ayland
On 25/10/2019 10:31, Sven Schnelle wrote: > Hi Mark, > > On Thu, Oct 24, 2019 at 09:51:31PM +0100, Mark Cave-Ayland wrote: > >> On 22/10/2019 21:59, Sven Schnelle wrote: >> >>> This adds emulation of Artist graphics good enough >>> to get a Text console on both Linux and HP-UX. The >>> X11 serve

Re: USB-audio sound issues with qemu-system-ppc in Linux and Windows.

2019-10-26 Thread BALATON Zoltan
On Sat, 26 Oct 2019, BALATON Zoltan wrote: On Sat, 26 Oct 2019, Howard Spoelstra wrote: I'd like to add to the previous report that similar issues are present in OSX (Sierra) builds of qemu-system-ppc. I think the problem is not specific to host OS so instead of giving debugging info for all

[PATCH] qemu-iotests/iotests.py: improve assert_qmp message

2019-10-26 Thread Vladimir Sementsov-Ogievskiy
Make it obvious, from the two values which is found at path and which is expected. Signed-off-by: Vladimir Sementsov-Ogievskiy --- It's a pain, I can never remember it, and checking each time in source code who is who is boring. tests/qemu-iotests/iotests.py | 4 ++-- 1 file changed, 2 inserti

Re: [PULL 00/12] tcg patch queue

2019-10-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191025142159.12459-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PULL 00/12] tcg patch queue Type: series Message-id: 20191025142159.12459-1-richard.hender...@l

Re: [PATCH] qemu-iotests/iotests.py: improve assert_qmp message

2019-10-26 Thread Philippe Mathieu-Daudé
On 10/26/19 12:12 PM, Vladimir Sementsov-Ogievskiy wrote: Make it obvious, from the two values which is found at path and which is expected. Maybe: "From the two values compared, make it obvious which is found at path, and which is expected." Reviewed-by: Philippe Mathieu-Daudé Signed-o

Re: [PATCH v3 5/6] hppa: Add emulation of Artist graphics

2019-10-26 Thread Philippe Mathieu-Daudé
Hi Sven, On 10/22/19 10:59 PM, Sven Schnelle wrote: This adds emulation of Artist graphics good enough to get a Text console on both Linux and HP-UX. The X11 server from HP-UX also works. Signed-off-by: Sven Schnelle --- hw/display/Kconfig |3 + hw/display/Makefile.objs |1 +

Re: [PATCH 00/20] hw: Clean up hw/i386 headers (and few alpha/hppa)

2019-10-26 Thread Philippe Mathieu-Daudé
Hi, On 10/14/19 4:22 PM, Philippe Mathieu-Daudé wrote: This is a follow-up of Markus's cleanup series: Tame a few "touch this, recompile the world" https://www.mail-archive.com/qemu-devel@nongnu.org/msg635748.html This part is mostly restricted to X86, but since some file from the Alpha/PA-RISC

Re: [PULL 00/39] Misc (mostly x86) patches for 2019-10-24

2019-10-26 Thread Philippe Mathieu-Daudé
On 10/25/19 1:17 PM, Paolo Bonzini wrote: On 25/10/19 12:46, Peter Maydell wrote: x86_register_ferr_irq() is defined in target/i386/fpu_helper.c, which is only built if CONFIG_TCG, but the callers don't seem to be similarly guarded and there's no stub fallback. Indeed, thanks. I'll add an "i

[PATCH] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-26 Thread Tuguoyi
In check_constraints_on_bitmap(), the sanity check on the granularity will cause uint64_t integer left-shift overflow when cluster_size is 2M and the granularity is bigger than 32K which is even smaller than the default value for a qcow2 disk with cluster_size set to 64k or bigger. This patch fix t

Re: [PATCH 00/20] hw: Clean up hw/i386 headers (and few alpha/hppa)

2019-10-26 Thread Laurent Vivier
Le 26/10/2019 à 14:20, Philippe Mathieu-Daudé a écrit : > Hi, > > On 10/14/19 4:22 PM, Philippe Mathieu-Daudé wrote: >> This is a follow-up of Markus's cleanup series: >> Tame a few "touch this, recompile the world" >> https://www.mail-archive.com/qemu-devel@nongnu.org/msg635748.html >> >> This pa

Re: [PULL 00/39] Misc (mostly x86) patches for 2019-10-24

2019-10-26 Thread Paolo Bonzini
On 26/10/19 15:20, Philippe Mathieu-Daudé wrote: > On 10/25/19 1:17 PM, Paolo Bonzini wrote: >> On 25/10/19 12:46, Peter Maydell wrote: >>> >>> x86_register_ferr_irq() is defined in target/i386/fpu_helper.c, >>> which is only built if CONFIG_TCG, but the callers don't >>> seem to be similarly guard

[PULL v2 00/39] Misc (mostly x86) patches for 2019-10-24

2019-10-26 Thread Paolo Bonzini
The following changes since commit e9d42461920f6f40f4d847a5ba18e90d095ed0b9: Merge remote-tracking branch 'remotes/kraxel/tags/audio-20191018-pull-request' into staging (2019-10-18 14:13:11 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[PULL v2 37/39] target/i386: move FERR handling to target/i386

2019-10-26 Thread Paolo Bonzini
Move it out of pc.c since it is strictly tied to TCG. This is almost exclusively code movement, the next patch will implement IGNNE. Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 17 +++-- hw/i386/pc_piix.c| 4 +++- hw/i386/pc_q35.c | 4 +++- include/

Re: [PATCH v2 03/20] piix4: Add a i8259 Interrupt Controller as specified in datasheet

2019-10-26 Thread Philippe Mathieu-Daudé
Hi Li, On 10/21/19 4:59 PM, Li Qiang wrote: Philippe Mathieu-Daudé mailto:phi...@redhat.com>> 于 2019年10月18日周五 下午9:52写道: From: Hervé Poussineau mailto:hpous...@reactos.org>> Add ISA irqs as piix4 gpio in, and CPU interrupt request as piix4 gpio out. Remove i8259 instanciated in

Re: [PATCH v2 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge

2019-10-26 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 10/25/19 12:51 PM, Aleksandar Markovic wrote: On Thursday, October 24, 2019, Aleksandar Markovic mailto:aleksandar.m.m...@gmail.com>> wrote: On Friday, October 18, 2019, Philippe Mathieu-Daudé mailto:phi...@redhat.com>> wrote: Changes since v1 [0]:

Re: [PATCH 0/5] hw/i386/pc: Extract pc_gsi_create() and pc_i8259_create()

2019-10-26 Thread Philippe Mathieu-Daudé
Hi Paolo, On 10/22/19 7:32 PM, Philippe Mathieu-Daudé wrote: On 10/22/19 6:55 PM, Paolo Bonzini wrote: On 18/10/19 15:59, Philippe Mathieu-Daudé wrote: These are few patches extracted from the previous too big series: hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge https://lists.gn

Re: [PATCH v2 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge

2019-10-26 Thread Aleksandar Markovic
On Saturday, October 26, 2019, Philippe Mathieu-Daudé wrote: > Hi Aleksandar, > > On 10/25/19 12:51 PM, Aleksandar Markovic wrote: > >> On Thursday, October 24, 2019, Aleksandar Markovic < >> aleksandar.m.m...@gmail.com > wrote: >> >> >> >> On Friday, Octob

Re: Long term approaches to mitigate device reset issue in vhost-user-scsi

2019-10-26 Thread Michael S. Tsirkin
On Fri, Oct 25, 2019 at 06:40:41AM -0700, Raphael Norwitz wrote: > Hi MST, > > We are trying to develop a long term fix to the following issue with > vhost-user-scsi: > > When a live migration starts, Qemu sends a SET_VRING_ADDR message to > update the VQ's flags (turning log on). We can't distin

Re: [PATCH v14 1/9] esp: add pseudo-DMA as used by Macintosh

2019-10-26 Thread Laurent Vivier
Le 22/10/2019 à 14:21, Philippe Mathieu-Daudé a écrit : > Hi Laurent, > > On 10/22/19 1:17 PM, Laurent Vivier wrote: >> There is no DMA in Quadra 800, so the CPU reads/writes the data from the >> PDMA register (offset 0x100, ESP_PDMA in hw/m68k/q800.c) and copies them >> to/from the memory. >> >>

[PATCH v15 00/11] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-10-26 Thread Laurent Vivier
I'm rebasing some of these patches for seven years now, too many years... if you want to test the machine, I'm sorry, it doesn't boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer, with: ... -M q800 \ -serial non

[PATCH v15 01/11] esp: move handle_ti_cmd() cleanup code to esp_do_dma().

2019-10-26 Thread Laurent Vivier
To prepare following patches move do_cmd and DMA special case from handle_ti() to esp_do_dma(). This part of the code must be only executed with real DMA, not with pseudo-DMA. And PDMA is detected in esp_do_dma(), so move this part of the code in esp_do_dma(). We keep the code in handle_ti_cmd() i

[PATCH v15 02/11] esp: move get_cmd() post-DMA code to get_cmd_cb()

2019-10-26 Thread Laurent Vivier
This will be needed to implement pseudo-DMA Signed-off-by: Laurent Vivier --- hw/scsi/esp.c | 46 +- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 09b28cba17..0230ede21d 100644 --- a/hw/scsi/esp.c +

[PATCH v15 04/11] dp8393x: manage big endian bus

2019-10-26 Thread 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 --- hw/net/dp8393x.c | 88 +++- 1 file ch

[PATCH v15 08/11] hw/m68k: add Nubus macfb video card

2019-10-26 Thread Laurent Vivier
This patch adds support for a graphic framebuffer device. This device can be added as a sysbus device or as a NuBus device. It is accessed as a framebuffer but the color palette can be set. Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed

[PATCH v15 06/11] hw/m68k: implement ADB bus support for via

2019-10-26 Thread Laurent Vivier
VIA needs to be able to poll the ADB interface and to read/write data from/to the bus. This patch adds functions allowing that. Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau Reviewed-by: Thomas Huth --- include/

[PATCH v15 11/11] BootLinuxConsoleTest: Test the Quadra 800

2019-10-26 Thread Laurent Vivier
From: Philippe Mathieu-Daudé This test boots a Linux kernel on a Quadra 800 board and verify the serial is working. Example: $ avocado --show=app,console run -t machine:q800 tests/acceptance/boot_linux_console.py console: ABCFGHIJK console: Linux version 5.2.0-2-m68k (debian-ker...@lists

[PATCH v15 10/11] hw/m68k: define Macintosh Quadra 800

2019-10-26 Thread 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 file=m68k.qcow2,format=q

[PATCH v15 03/11] esp: add pseudo-DMA as used by Macintosh

2019-10-26 Thread Laurent Vivier
There is no DMA in Quadra 800, so the CPU reads/writes the data from the PDMA register (offset 0x100, ESP_PDMA in hw/m68k/q800.c) and copies them to/from the memory. There is a nice assembly loop in the kernel to do that, see linux/drivers/scsi/mac_esp.c:MAC_ESP_PDMA_LOOP(). The start of the tran

[PATCH v15 09/11] hw/m68k: add a dummy SWIM floppy controller

2019-10-26 Thread Laurent Vivier
SWIM (Sander-Wozniak Integrated Machine) is the floppy controller of the 680x0 Macintosh. This patch introduces only the basic support: it allows to switch from IWM (Integrated WOZ Machine) mode to the SWIM mode and makes the linux driver happy. It cannot read any floppy image. Co-developed-by:

[PATCH v15 05/11] hw/m68k: add VIA support

2019-10-26 Thread Laurent Vivier
Inside the 680x0 Macintosh, VIA (Versatile Interface Adapter) is used to interface the keyboard, Mouse, and real-time clock. It also provides control line for the floppy disk driver, video interface, sound circuitry and serial interface. This implementation is based on the MOS6522 object. Co-deve

[PATCH v15 07/11] hw/m68k: add Nubus support

2019-10-26 Thread Laurent Vivier
This patch adds basic support for the NuBus bus. This is used by 680x0 Macintosh. Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth --- include/hw/nubus/mac-nubus-bridge.h | 24 include/hw/nubus/nubus.h|

Re: [PATCH v14 1/9] esp: add pseudo-DMA as used by Macintosh

2019-10-26 Thread Laurent Vivier
Le 25/10/2019 à 16:01, Paolo Bonzini a écrit : > On 22/10/19 13:17, Laurent Vivier wrote: >> +if (s->dma_memory_read) { >> +s->dma_memory_read(s->dma_opaque, &s->cmdbuf[s->cmdlen], len); >> +} else { >> +set_pdma(s, CMD, s->cmdlen, len); >> +s->pd

Re: [PATCH] qemu-iotests/iotests.py: improve assert_qmp message

2019-10-26 Thread Vladimir Sementsov-Ogievskiy
26.10.2019 14:29, Philippe Mathieu-Daudé wrote: > On 10/26/19 12:12 PM, Vladimir Sementsov-Ogievskiy wrote: >> Make it obvious, from the two values which is found at path and which >> is expected. > > Maybe: > > "From the two values compared, make it obvious which is found at path, and > which i

Re: [PATCH] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-26 Thread Vladimir Sementsov-Ogievskiy
26.10.2019 12:19, Tuguoyi wrote: > In check_constraints_on_bitmap(), the sanity check on the > granularity will cause uint64_t integer left-shift overflow > when cluster_size is 2M and the granularity is bigger than > 32K which is even smaller than the default value for a qcow2 > disk with cluster_

[PATCH] MAINTAINERS: add more bitmap-related to Dirty Bitmaps section

2019-10-26 Thread Vladimir Sementsov-Ogievskiy
Let's add bitmaps persistence qcow2 feature and postcopy bitmaps migration to Dirty Bitmaps section. Signed-off-by: Vladimir Sementsov-Ogievskiy --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 556ce0bfe3..51f31b4011 100644 --- a/MAINTAINERS +

Re: [PATCH v15 02/11] esp: move get_cmd() post-DMA code to get_cmd_cb()

2019-10-26 Thread Philippe Mathieu-Daudé
On 10/26/19 6:45 PM, Laurent Vivier wrote: This will be needed to implement pseudo-DMA Signed-off-by: Laurent Vivier :) Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/esp.c | 46 +- 1 file changed, 29 insertions(+), 17 deletions(-) diff --g

Re: [RFC 2/3] block/file-posix: Detect XFS with CONFIG_FALLOCATE

2019-10-26 Thread Nir Soffer
On Fri, Oct 25, 2019 at 1:22 PM Max Reitz wrote: > > We will need this for the next patch. > > Signed-off-by: Max Reitz > --- > block/file-posix.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/block/file-posix.c b/block/file-posix.c > index 695fcf740d..5cd54c8bff 1

Re: [RFC 3/3] block/file-posix: Let post-EOF fallocate serialize

2019-10-26 Thread Nir Soffer
On Fri, Oct 25, 2019 at 1:24 PM Max Reitz wrote: > > The XFS kernel driver has a bug that may cause data corruption for qcow2 > images as of qemu commit c8bb23cbdbe32f. We can work around it by > treating post-EOF fallocates as serializing up until infinity (INT64_MAX > in practice). > > Signed-o

Re: [RFC 0/3] block/file-posix: Work around XFS bug

2019-10-26 Thread Nir Soffer
On Fri, Oct 25, 2019 at 1:11 PM Max Reitz wrote: > > Hi, > > It seems to me that there is a bug in Linux’s XFS kernel driver, as > I’ve explained here: > > https://lists.nongnu.org/archive/html/qemu-block/2019-10/msg01429.html > > In combination with our commit c8bb23cbdbe32f, this may lead to gue

Re: [RFC 0/3] block/file-posix: Work around XFS bug

2019-10-26 Thread Vladimir Sementsov-Ogievskiy
26.10.2019 20:37, Nir Soffer wrote: > On Fri, Oct 25, 2019 at 1:11 PM Max Reitz wrote: >> >> Hi, >> >> It seems to me that there is a bug in Linux’s XFS kernel driver, as >> I’ve explained here: >> >> https://lists.nongnu.org/archive/html/qemu-block/2019-10/msg01429.html >> >> In combination with

Re: [PATCH v3 5/6] hppa: Add emulation of Artist graphics

2019-10-26 Thread Sven Schnelle
Hi Mark, On Sat, Oct 26, 2019 at 10:35:20AM +0100, Mark Cave-Ayland wrote: > > However, the VRAM in Artist is not really exposed to the Host. Instead, > > there's the Chipset inbetween that can do byte swapping (Colormap is LE, > > VRAM is BE) and Bit-to-Byte/Word/Dword conversion. For example yo

[PATCH v3 01/20] MAINTAINERS: Keep PIIX4 South Bridge separate from PC Chipsets

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The PIIX4 Southbridge is not used by the PC machine, but by the Malta board (MIPS). Add a new section to keep it covered. Suggested-by: Michael S. Tsirkin Reviewed-by: Aleksandar Markovic Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINER

[PATCH v3 04/20] Revert "irq: introduce qemu_irq_proxy()"

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé This function isn't used anymore. This reverts commit 22ec3283efba9ba0792790da786d6776d83f2a92. Reviewed-by: Thomas Huth Reviewed-by: Li Qiang Reviewed-by: Esteban Bosse Signed-off-by: Philippe Mathieu-Daudé --- hw/core/irq.c| 14 -- include/hw/

[PATCH v3 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge

2019-10-26 Thread Philippe Mathieu-Daudé
Changes since v2 [0]: - Use a #define - Reword one description - Added review tags (thanks all for reviewing!) Changes since v1 [1]: - Removed patch reintroducing DO_UPCAST() use (thuth) - Took various patches out to reduce series (thuth) - Added review tags (thanks all for reviewing!) $ git back

[PATCH v3 11/20] hw/isa/piix4: Move piix4_create() to hw/isa/piix4.c

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Now that we properly refactored the piix4_create() function, let's move it to hw/isa/piix4.c where it belongs, so it can be reused on other places. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c| 30 ++

[PATCH v3 05/20] piix4: Rename PIIX4 object to piix4-isa

2019-10-26 Thread Philippe Mathieu-Daudé
From: Hervé Poussineau Other piix4 parts are already named piix4-ide and piix4-usb-uhci. Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin Acked-by: Paolo Bonzini Signed-off-by: Hervé Poussineau Message-Id: <20171216090228.28505-15-hpous...@reactos.org> Reviewed-by: Aleksandar

[PATCH v3 02/20] piix4: Add the Reset Control Register

2019-10-26 Thread Philippe Mathieu-Daudé
From: Hervé Poussineau The RCR I/O port (0xcf9) is used to generate a hard reset or a soft reset. Acked-by: Michael S. Tsirkin Acked-by: Paolo Bonzini Signed-off-by: Hervé Poussineau Message-Id: <20171216090228.28505-7-hpous...@reactos.org> Reviewed-by: Aleksandar Markovic Reviewed-by: Li Qi

[PATCH v3 09/20] hw/mips/mips_malta: Create IDE hard drive array dynamically

2019-10-26 Thread Philippe Mathieu-Daudé
In the next commit we'll refactor the PIIX4 code out of mips_malta_init(). As a preliminary step, add the 'ide_drives' variable and create the drive array dynamically. Reviewed-by: Aleksandar Markovic Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_malta.c | 7

[PATCH v3 12/20] hw/i386: Remove obsolete LoadStateHandler::load_state_old handlers

2019-10-26 Thread Philippe Mathieu-Daudé
These devices implemented their load_state_old() handler 10 years ago, previous to QEMU v0.12. Since commit cc425b5ddf removed the pc-0.10 and pc-0.11 machines, we can drop this code. Note: the mips_r4k machine started to use the i8254 device just after QEMU v0.5.0, but the MIPS machine types are

[PATCH v3 03/20] piix4: Add an i8259 Interrupt Controller as specified in datasheet

2019-10-26 Thread Philippe Mathieu-Daudé
From: Hervé Poussineau Add ISA irqs as piix4 gpio in, and CPU interrupt request as piix4 gpio out. Remove i8259 instanciated in malta board, to not have it twice. We can also remove the now unused piix4_init() function. Acked-by: Michael S. Tsirkin Acked-by: Paolo Bonzini Signed-off-by: Hervé

[PATCH v3 06/20] piix4: Add an i8257 DMA Controller as specified in datasheet

2019-10-26 Thread Philippe Mathieu-Daudé
From: Hervé Poussineau The i8257 is not a chipset on the Malta board, but is part of the PIIX4 chipset. Create the i8257 in the PIIX4 code, remove the one instantiated in malta board, to not have it twice. Acked-by: Michael S. Tsirkin Acked-by: Paolo Bonzini Signed-off-by: Hervé Poussineau Me

[PATCH v3 19/20] hw/pci-host: Rename incorrectly named 'piix' as 'i440fx'

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We moved all the PIIX3 southbridge code out of hw/pci-host/piix.c, it now only contains i440FX northbridge code. Rename it to match the chipset modelled. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS |

[PATCH v3 16/20] hw/pci-host/piix: Move i440FX declarations to hw/pci-host/i440fx.h

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The hw/pci-host/piix.c contains a mix of PIIX3 and i440FX chipsets functions. To be able to split it, we need to export some declarations first. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/acpi

[PATCH v3 07/20] piix4: Add an i8254 PIT Controller as specified in datasheet

2019-10-26 Thread Philippe Mathieu-Daudé
From: Hervé Poussineau Remove i8254 instanciated in malta board, to not have it twice. Acked-by: Michael S. Tsirkin Acked-by: Paolo Bonzini Signed-off-by: Hervé Poussineau Message-Id: <20171216090228.28505-10-hpous...@reactos.org> Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Math

[PATCH v3 08/20] piix4: Add a MC146818 RTC Controller as specified in datasheet

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Remove mc146818rtc instanciated in malta board, to not have it twice. Acked-by: Michael S. Tsirkin Acked-by: Paolo Bonzini Signed-off-by: Hervé Poussineau Message-Id: <20171216090228.28505-13-hpous...@reactos.org> [PMD: rebased, set RTC base_year to 2000] Reviewed

[PATCH v3 17/20] hw/pci-host/piix: Fix code style issues

2019-10-26 Thread Philippe Mathieu-Daudé
We will move this code, fix its style first. Reviewed-by: Aleksandar Markovic Reviewed-by: Esteban Bosse Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/piix.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 95b0412

[PATCH v3 10/20] hw/mips/mips_malta: Extract the PIIX4 creation code as piix4_create()

2019-10-26 Thread Philippe Mathieu-Daudé
The Malta board instantiate a PIIX4 chipset doing various calls. Refactor all those related calls into a single function: piix4_create(). Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_malta.c | 47 +++- 1 file cha

[PATCH v3 15/20] hw/pci-host/piix: Define and use the PIIX IRQ Route Control Registers

2019-10-26 Thread Philippe Mathieu-Daudé
The IRQ Route Control registers definitions belong to the PIIX chipset. We were only defining the 'A' register. Define the other B, C and D registers, and use them. Acked-by: Paul Durrant Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/xen/xen-hvm.c |

[PATCH v3 18/20] hw/pci-host/piix: Extract PIIX3 functions to hw/isa/piix3.c

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Move all the PIIX3 functions to a new file: hw/isa/piix3.c. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- Checkpatch warning: ERROR: spaces required around that '*' (ctx:VxV) #312: FILE: hw/isa/piix3.c:248: +.subsections = (cons

[PATCH v3 14/20] hw/pci-host/piix: Move RCR_IOPORT register definition

2019-10-26 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The RCR_IOPORT register belongs to the PIIX chipset. Move the definition to "piix.h", and prepend the PIIX prefix. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- v2: prepend PIIX prefix (Aleksandar) --- hw/i386/acpi-build.c | 2

[PATCH v3 13/20] hw/pci-host/piix: Extract piix3_create()

2019-10-26 Thread Philippe Mathieu-Daudé
Extract the PIIX3 creation code from the i440fx_init() function. Reviewed-by: Aleksandar Markovic Reviewed-by: Esteban Bosse Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/piix.c | 51 -- 1 file changed, 31 insertions(+), 20 deletions(-) diff

[PATCH v3 20/20] hw/pci-host/i440fx: Remove the last PIIX3 traces

2019-10-26 Thread Philippe Mathieu-Daudé
The PIIX3 is not tied to the i440FX and can even be used without it. Move its creation to the machine code (pc_piix.c). We have now removed the last trace of southbridge code in the i440FX northbridge. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c

[PULL 01/25] virtio: basic structure for packed ring

2019-10-26 Thread Michael S. Tsirkin
From: Wei Xu Define packed ring structure according to Qemu nomenclature, field data(wrap counter, etc) are also included. Signed-off-by: Wei Xu Signed-off-by: Jason Wang Signed-off-by: Eugenio Pérez Reviewed-by: Jens Freimann Message-Id: <20191025083527.30803-2-epere...@redhat.com> Reviewed

[PULL 03/25] virtio: Free blk virqueues at unrealize()

2019-10-26 Thread Michael S. Tsirkin
From: Eugenio Pérez The function virtio_del_queue was not called at unrealize() callback. This was detected due to add an allocated element on the vq introduce in future commits (used_elems) and running address sanitizer memory leak detector. Signed-off-by: Eugenio Pérez Message-Id: <201910250

[PULL 04/25] virtio: Free rnd virqueue at unrealize()

2019-10-26 Thread Michael S. Tsirkin
From: Eugenio Pérez The function virtio_del_queue was not called at unrealize() callback. This was detected due to add an allocated element on the vq introduce in future commits (used_elems) and running address sanitizer memory leak detector. Signed-off-by: Eugenio Pérez Message-Id: <201910250

[PULL 00/25] virtio: features, tests

2019-10-26 Thread Michael S. Tsirkin
The following changes since commit 58560ad254fbda71d4daa6622d71683190070ee2: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191024' into staging (2019-10-24 16:22:58 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_

[PULL 02/25] virtio: device/driver area size calculation refactor for split ring

2019-10-26 Thread Michael S. Tsirkin
From: Wei Xu There is slight size difference between split/packed rings. This is the refactor of split ring as well as a helper to expanding device and driver area size calculation for packed ring. Signed-off-by: Wei Xu Signed-off-by: Jason Wang Signed-off-by: Eugenio Pérez Reviewed-by: Jens

[PULL 07/25] vhost_net: enable packed ring support

2019-10-26 Thread Michael S. Tsirkin
From: Jason Wang Signed-off-by: Jason Wang Signed-off-by: Eugenio Pérez Reviewed-by: Jens Freimann Message-Id: <20191025083527.30803-8-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/vhost_net.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PULL 06/25] virtio: event suppression support for packed ring

2019-10-26 Thread Michael S. Tsirkin
From: Jason Wang This patch implements event suppression through device/driver area. Please refer virtio specification for more information. Signed-off-by: Wei Xu Signed-off-by: Jason Wang Signed-off-by: Eugenio Pérez Message-Id: <20191025083527.30803-7-epere...@redhat.com> Reviewed-by: Micha

[PULL 08/25] virtio: add property to enable packed virtqueue

2019-10-26 Thread Michael S. Tsirkin
From: Jason Wang Signed-off-by: Jason Wang Signed-off-by: Eugenio Pérez Reviewed-by: Jens Freimann Message-Id: <20191025083527.30803-9-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 4 +++- 1 file changed, 3 insertions

[PULL 05/25] virtio: basic packed virtqueue support

2019-10-26 Thread Michael S. Tsirkin
From: Jason Wang This patch implements basic support for the packed virtqueue. Compare the split virtqueue which has three rings, packed virtqueue only have one which is supposed to have better cache utilization and more hardware friendly. Please refer virtio specification for more information.

[PULL 09/25] tests/virtio-blk-test: read config space after feature negotiation

2019-10-26 Thread Michael S. Tsirkin
From: Stefan Hajnoczi The VIRTIO Configuration Space cannot be accessed before device feature bits have been read because a driver doesn't know the endianness until it has checked VIRTIO_F_VERSION_1. Fix this problem in preparation for VIRTIO 1.0 support. Signed-off-by: Stefan Hajnoczi Reviewe

[PULL 10/25] libqos: read QVIRTIO_MMIO_VERSION register

2019-10-26 Thread Michael S. Tsirkin
From: Stefan Hajnoczi There was no real virtio-mmio ABI change between Legacy and VIRTIO 1.0 except that the Version field was incremented from 1 to 2. However, QEMU does not allow Legacy drivers to perform VIRTIO 1.0 operations like accessing 64-bit feature bits. Since we will introduce 64-bit

[PULL 11/25] libqos: extend feature bits to 64-bit

2019-10-26 Thread Michael S. Tsirkin
From: Stefan Hajnoczi In VIRTIO 1.0 feature bits changed from 32-bit to 64-bit. (In fact, the transports allow even more feature bits but nothing uses more than 64 bits today.) Add 64-bit feature bit support to virtio-mmio and virtio-pci. This will be necessary for VIRTIO 1.0 support. Signed-

[RFC PATCH v2 16/26] qcow2: Add subcluster support to discard_in_l2_slice()

2019-10-26 Thread Alberto Garcia
Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an image has subclusters. Instead, the individual 'all zeroes' bits must be used. Signed-off-by: Alberto Garcia --- block/qcow2-cluster.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qcow2-cluster.c

[RFC PATCH v2 25/26] qcow2: Allow preallocation and backing files if extended_l2 is set

2019-10-26 Thread Alberto Garcia
Traditional qcow2 images don't allow preallocation if a backing file is set. This is because once a cluster is allocated there is no way to tell that its data should be read from the backing file. Extended L2 entries have individual allocation bits for each subcluster, and therefore it is perfectl

[RFC PATCH v2 13/26] qcow2: Add subcluster support to calculate_l2_meta()

2019-10-26 Thread Alberto Garcia
If an image has subclusters then there are more copy-on-write scenarios that we need to consider. Let's say we have a write request from the middle of subcluster #3 until the end of the cluster: - If the cluster is new, then subclusters #0 to #3 from the old cluster must be copied into the

[RFC PATCH v2 21/26] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2019-10-26 Thread Alberto Garcia
Compressed clusters always have the bitmap part of the extended L2 entry set to 0. Signed-off-by: Alberto Garcia --- block/qcow2-cluster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index acb7226e03..3ba8a98073 100644 --- a/block/qcow2-clust

[RFC PATCH v2 20/26] qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2()

2019-10-26 Thread Alberto Garcia
The L2 bitmap needs to be updated after each write to indicate what new subclusters are now allocated. This needs to happen even if the cluster was already allocated and the L2 entry was otherwise valid. Signed-off-by: Alberto Garcia --- block/qcow2-cluster.c | 16 1 file chang

[RFC PATCH v2 14/26] qcow2: Add subcluster support to qcow2_get_cluster_offset()

2019-10-26 Thread Alberto Garcia
The logic of this function remains pretty much the same, except that it uses count_contiguous_subclusters(), which combines the logic of count_contiguous_clusters() / count_contiguous_clusters_unallocated() and checks individual subclusters. Signed-off-by: Alberto Garcia --- block/qcow2-cluster.

[RFC PATCH v2 19/26] qcow2: Fix offset calculation in handle_dependencies()

2019-10-26 Thread Alberto Garcia
l2meta_cow_start() and l2meta_cow_end() are not necessarily cluster-aligned if the image has subclusters, so update the calculation of old_start and old_end to guarantee that no two requests try to write on the same cluster. Signed-off-by: Alberto Garcia --- block/qcow2-cluster.c | 4 ++-- 1 fil

[RFC PATCH v2 15/26] qcow2: Add subcluster support to zero_in_l2_slice()

2019-10-26 Thread Alberto Garcia
Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an image has subclusters. Instead, the individual 'all zeroes' bits must be used. Signed-off-by: Alberto Garcia --- block/qcow2-cluster.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/block/qcow

[RFC PATCH v2 02/26] qcow2: Split cluster_needs_cow() out of count_cow_clusters()

2019-10-26 Thread Alberto Garcia
We are going to need it in other places. Signed-off-by: Alberto Garcia --- block/qcow2-cluster.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 6c1dcdc781..aa1010a515 100644 --- a/block/

[RFC PATCH v2 03/26] qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied()

2019-10-26 Thread Alberto Garcia
When writing to a qcow2 file there are two functions that take a virtual offset and return a host offset, possibly allocating new clusters if necessary: - handle_copied() looks for normal data clusters that are already allocated and have a reference count of 1. In those clusters we ca

[RFC PATCH v2 26/26] iotests: Add tests for qcow2 images with extended L2 entries

2019-10-26 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/271 | 235 + tests/qemu-iotests/271.out | 183 + tests/qemu-iotests/group | 1 + 3 files changed, 419 insertions(+) create mode 100755 tests/qemu-iotests/271 create mode

[RFC PATCH v2 24/26] qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bit

2019-10-26 Thread Alberto Garcia
Now that the implementation of subclusters is complete we can finally add the necessary options to create and read images with this feature, which we call "extended L2 entries". Signed-off-by: Alberto Garcia --- block/qcow2.c| 46 ++ block/qcow2.h

Re: [RFC PATCH 00/23] Add subcluster allocation to qcow2

2019-10-26 Thread Alberto Garcia
On Wed 23 Oct 2019 12:39:14 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > This is very interesting! Could you please export a branch to look at, > as patches can't be applied on master now :( I just sent a new version with some updates and rebased on top of the current master. Berto

[PULL 19/25] libqos: pass full QVirtQueue to set_queue_address()

2019-10-26 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Instead of just passing the vring page frame number, pass the full QVirtQueue. This will allow the VIRTIO 1.0 transport to program the fine-grained vring address registers in the future. Signed-off-by: Stefan Hajnoczi Reviewed-by: Sergio Lopez Reviewed-by: Thomas Huth R

[PULL 20/25] libqos: add MSI-X callbacks to QVirtioPCIDevice

2019-10-26 Thread Michael S. Tsirkin
From: Stefan Hajnoczi The MSI-X vectors are programmed differently in the VIRTIO 1.0 and Legacy interfaces. Introduce callbacks so different implementations can be used depending on the interface version. Signed-off-by: Stefan Hajnoczi Reviewed-by: Sergio Lopez Reviewed-by: Thomas Huth Messa

[PULL 25/25] virtio: drop unused virtio_device_stop_ioeventfd() function

2019-10-26 Thread Michael S. Tsirkin
From: Stefan Hajnoczi virtio_device_stop_ioeventfd() has not been used since commit 310837de6c1e0badfd736b1b316b1698c53120a7 ("virtio: introduce grab/release_ioeventfd to fix vhost") in 2016. Nowadays ioeventfd is stopped implicitly by the virtio transport when lifecycle events such as the VM pa

[RFC PATCH v2 08/26] qcow2: Add offset_to_sc_index()

2019-10-26 Thread Alberto Garcia
For a given offset, return the subcluster number within its cluster (i.e. with 32 subclusters per cluster it returns a number between 0 and 31). Signed-off-by: Alberto Garcia --- block/qcow2.h | 5 + 1 file changed, 5 insertions(+) diff --git a/block/qcow2.h b/block/qcow2.h index 278ca41314

[RFC PATCH v2 22/26] qcow2: Add subcluster support to handle_alloc_space()

2019-10-26 Thread Alberto Garcia
The bdrv_co_pwrite_zeroes() call here fills complete clusters with zeroes, but it can happen that some subclusters are not part of the write request or the copy-on-write. This patch makes sure that only the affected subclusters are overwritten. A potential improvement would be to also fill with ze

[RFC PATCH v2 06/26] qcow2: Add dummy has_subclusters() function

2019-10-26 Thread Alberto Garcia
This function will be used by the qcow2 code to check if an image has subclusters or not. At the moment this simply returns false. Once all patches needed for subcluster support are ready then QEMU will be able to create and read images with subclusters and this function will return the actual val

[RFC PATCH v2 05/26] qcow2: Document the Extended L2 Entries feature

2019-10-26 Thread Alberto Garcia
Subcluster allocation in qcow2 is implemented by extending the existing L2 table entries and adding additional information to indicate the allocation status of each subcluster. This patch documents the changes to the qcow2 format and how they affect the calculation of the L2 cache size. Signed-of

  1   2   >