[Qemu-devel] [PATCH qemu v2 REPOST] pci: Initialize pci_dev->name before use

2017-10-14 Thread Alexey Kardashevskiy
This moves pci_dev->name initialization earlier so pci_dev->bus_master_as could get a name instead of an empty string. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * fixed mistype in the commit log * added "rb" ---

Re: [Qemu-devel] host physical address width issues/questions for x86_64

2017-10-14 Thread Peter Xu
On Fri, Oct 13, 2017 at 11:14:03AM -0600, Alex Williamson wrote: > On Fri, 13 Oct 2017 18:01:44 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Prasad Singamsetty (prasad.singamse...@oracle.com) wrote: > > > Hi, > > > > > > I am new to the alias. I have some questions on

Re: [Qemu-devel] [PATCH qemu v2] pci: Initialize pci_dev->name before use

2017-10-14 Thread Michael S. Tsirkin
On Sun, Oct 15, 2017 at 02:24:17PM +1100, Alexey Kardashevskiy wrote: > On 03/10/17 13:10, Alexey Kardashevskiy wrote: > > On 15/09/17 16:35, Alexey Kardashevskiy wrote: > >> This moves pci_dev->name initialization earlier so > >> pci_dev->bus_master_as could get a name instead of an empty string.

[Qemu-devel] [PULL 25/26] pc: remove useless hot_add_cpu initialisation

2017-10-14 Thread Michael S. Tsirkin
From: Laurent Vivier Since 4458fb3a79 (pc: Eliminate pc_default_machine_options()), hot_add_cpu is set in pc_machine_class_init(), so we don't need to set it in pc_q35_machine_options(), pc_i440fx_machine_options() and xenfv_machine_options(), except to clear it in

[Qemu-devel] [PULL 24/26] isapc: Remove unnecessary migration compatibility code

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost We don't touch isapc when we change guest ABI and add new entries to PC_COMPAT_* or new PCMachineClass compat flags. This means isapc never guaranteed guest ABI and cross-QEMU-version live migration compatibility. There's no point in keeping code for

Re: [Qemu-devel] [PATCH qemu v2] pci: Initialize pci_dev->name before use

2017-10-14 Thread Alexey Kardashevskiy
On 15/10/17 14:31, Michael S. Tsirkin wrote: > On Sun, Oct 15, 2017 at 02:24:17PM +1100, Alexey Kardashevskiy wrote: >> On 03/10/17 13:10, Alexey Kardashevskiy wrote: >>> On 15/09/17 16:35, Alexey Kardashevskiy wrote: This moves pci_dev->name initialization earlier so

Re: [Qemu-devel] [PATCH qemu v2] pci: Initialize pci_dev->name before use

2017-10-14 Thread Michael S. Tsirkin
On Sun, Oct 15, 2017 at 02:24:17PM +1100, Alexey Kardashevskiy wrote: > On 03/10/17 13:10, Alexey Kardashevskiy wrote: > > On 15/09/17 16:35, Alexey Kardashevskiy wrote: > >> This moves pci_dev->name initialization earlier so > >> pci_dev->bus_master_as could get a name instead of an empty string.

[Qemu-devel] [PULL 19/26] xen/pt: Mark TYPE_XEN_PT_DEVICE as hybrid

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost xen-pt doesn't set the is_express field, but is supposed to be able to handle PCI Express devices too. Mark it as hybrid. Suggested-by: Jan Beulich Signed-off-by: Eduardo Habkost Reviewed-by: Michael S.

[Qemu-devel] [PULL 18/26] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost Add INTERFACE_CONVENTIONAL_PCI_DEVICE to all direct subtypes of TYPE_PCI_DEVICE, except: 1) The ones that already have INTERFACE_PCIE_DEVICE set: * base-xhci * e1000e * nvme * pvscsi * vfio-pci * virtio-pci * vmxnet3 2) base-pci-bridge Not all PCI

[Qemu-devel] [PULL 22/26] virtio: fix descriptor counting in virtqueue_pop

2017-10-14 Thread Michael S. Tsirkin
From: Wolfgang Bumiller While changing the s/g list allocation, commit 3b3b0628 also changed the descriptor counting to count iovec entries as split by cpu_physical_memory_map(). Previously only the actual descriptor entries were counted and the split into the iovec

[Qemu-devel] [PULL 23/26] virtio-pci: Replace modern_as with direct access to modern_bar

2017-10-14 Thread Michael S. Tsirkin
From: Alexey Kardashevskiy The modern bar is accessed now via yet another address space created just for that purpose and it does not really need FlatView and dispatch tree as it has a single memory region so it is just a waste of memory. Things get even worse when there are

[Qemu-devel] [PULL 16/26] pci: Add interface names to hybrid PCI devices

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost The following devices support both PCI Express and Conventional PCI, by including special code to handle the QEMU_PCI_CAP_EXPRESS flag and/or conditional pcie_endpoint_cap_init() calls: * vfio-pci (is_express=1, but legacy PCI handled by

[Qemu-devel] [PULL 20/26] pci: Validate interfaces on base_class_init

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost Make sure we don't forget to add the Conventional PCI or PCI Express interface names on PCI device classes in the future. Signed-off-by: Eduardo Habkost Revieed-by: David Gibson Reviewed-by: Marcel

[Qemu-devel] [PULL 14/26] PCI: PCIe access should always be little endian

2017-10-14 Thread Michael S. Tsirkin
From: Matt Redfearn PCIe busses are always little endian, so set the endianness of the memory region to little endian rather than native such that operations work as expected on big endian targets. Signed-off-by: Matt Redfearn Reviewed-by:

[Qemu-devel] [PULL 21/26] hw/gen_pcie_root_port: make IO RO 0 on IO disabled

2017-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum IO_LIMIT and IO_BASE registers should not be writable if gen_pcie_root_port's io-reserve property is set to 0. The COMMAND register should have the IO flag read only. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL 11/26] pci: allow 32-bit PCI IO accesses to pass through the PCI bridge

2017-10-14 Thread Michael S. Tsirkin
From: Mark Cave-Ayland Whilst the underlying PCI bridge implementation supports 32-bit PCI IO accesses, unfortunately they are truncated at the legacy 64K limit. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson

[Qemu-devel] [PULL 15/26] pci: conventional-pci-device and pci-express-device interfaces

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost Those two interfaces will be used to indicate which device types support Conventional PCI or PCI Express buses. Management software will be able to use the qom-list-types QMP command to query that information. Signed-off-by: Eduardo Habkost

[Qemu-devel] [PULL 17/26] pci: Add INTERFACE_PCIE_DEVICE to all PCIe devices

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost Change all devices that set is_express=1 to implement INTERFACE_PCIE_DEVICE. Cc: Keith Busch Cc: Kevin Wolf Cc: Max Reitz Cc: Dmitry Fleytman Cc: Jason Wang

[Qemu-devel] [PULL 09/26] MAINTAINERS: add Dump maintainers

2017-10-14 Thread Michael S. Tsirkin
From: Marc-André Lureau Proposing myself, since I have some familiarity with the code now. Signed-off-by: Marc-André Lureau Acked-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by:

[Qemu-devel] [PULL 12/26] hw/pci-bridge/pcie_pci_bridge: properly handle MSI unavailability case

2017-10-14 Thread Michael S. Tsirkin
From: Aleksandr Bezzubikov QEMU with the pcie-pci-bridge device crashes if the guest board doesn't support MSI, e.g. 'qemu-system-ppc64 -M prep -device pcie-pci-bridge'. This is caused by wrong pcie-pci-bridge instantiation error handling. This patch fixes this issue by

[Qemu-devel] [PULL 13/26] virtio/pci/migration: Convert to VMState

2017-10-14 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Convert the 'modern_state' part of virtio-pci to modern migration macros. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

Re: [Qemu-devel] [PATCH qemu v2] pci: Initialize pci_dev->name before use

2017-10-14 Thread Alexey Kardashevskiy
On 03/10/17 13:10, Alexey Kardashevskiy wrote: > On 15/09/17 16:35, Alexey Kardashevskiy wrote: >> This moves pci_dev->name initialization earlier so >> pci_dev->bus_master_as could get a name instead of an empty string. >> >> Signed-off-by: Alexey Kardashevskiy >> Reviewed-by:

[Qemu-devel] [PULL 03/26] fw_cfg: add write callback

2017-10-14 Thread Michael S. Tsirkin
From: Marc-André Lureau Reintroduce the write callback that was removed when write support was removed in commit 023e3148567ac898c7258138f8e86c3c2bb40d07. Contrary to the previous callback implementation, the write_cb callback is called whenever a write happened, so

[Qemu-devel] [PULL 07/26] kdump: set vmcoreinfo location

2017-10-14 Thread Michael S. Tsirkin
From: Marc-André Lureau kdump header provides offset and size of the vmcoreinfo content, append it if available (skip the ELF note header). crash-7.1.9 was the first version that started looking in the vmcoreinfo data for phys_base instead of in the

[Qemu-devel] [PULL 08/26] scripts/dump-guest-memory.py: add vmcoreinfo

2017-10-14 Thread Michael S. Tsirkin
From: Marc-André Lureau Add a vmcoreinfo ELF note in the dump if vmcoreinfo device has the memory location details. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PULL 26/26] tests/pxe: Test more NICs when running in SPEED=slow mode

2017-10-14 Thread Michael S. Tsirkin
From: Thomas Huth The pxe-test is a very good test to excercise NICs, thus we should use it to test all NICs that can be used by the BIOS for booting via network. However, to avoid that the default testing time increases too much, the additional NICs are only tested in the

[Qemu-devel] [PULL 06/26] dump: update phys_base header field based on VMCOREINFO content

2017-10-14 Thread Michael S. Tsirkin
From: Marc-André Lureau If the guest note is VMCOREINFO, try to get phys_base from it. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[Qemu-devel] [PULL 05/26] dump: add guest ELF note

2017-10-14 Thread Michael S. Tsirkin
From: Marc-André Lureau Read the guest ELF PT_NOTE from guest memory when fw_cfg etc/vmcoreinfo entry provides the location, and write it as an additional note in the dump. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S.

[Qemu-devel] [PULL 01/26] xio3130_downstream: Report error if pcie_chassis_add_slot() failed

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost On commit f8cd1b02 ("pci: Convert to realize"), no error_set*() call was added for the pcie_chassis_add_slot() error case. pcie_chassis_add_slot() errors get ignored, making QEMU crash later. e.g.: $ qemu-system-x86_64 -device ioh3420 -device

[Qemu-devel] [PULL 10/26] virtio/vhost: reset dev->log after syncing

2017-10-14 Thread Michael S. Tsirkin
From: Felipe Franciosi vhost_log_put() is called to decomission the dirty log between qemu and a vhost device when stopping the device. Such a call can happen from migration_completion(). Present code sets dev->log_size to zero too early in vhost_log_put(), causing the sync

[Qemu-devel] [PULL 02/26] pci: Set err to errp directly rather than through error_propagate()

2017-10-14 Thread Michael S. Tsirkin
From: Mao Zhongyi ioh3420_interrupts_init() pass error message to local_err, then propagate it to errp by error_propagate(), which is not necessary. So eliminate it and pass errp directly instead of local_err. Cc: "Michael S. Tsirkin" Cc: Marcel

[Qemu-devel] [PULL 04/26] hw/misc: add vmcoreinfo device

2017-10-14 Thread Michael S. Tsirkin
From: Marc-André Lureau See docs/specs/vmcoreinfo.txt for details. "etc/vmcoreinfo" fw_cfg entry is added when using "-device vmcoreinfo". Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL 00/26] pc, pci, virtio: fixes, features

2017-10-14 Thread Michael S. Tsirkin
The following changes since commit f90ea7ba7c5ae7010ee0ce062207ae42530f57d6: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20171012' into staging (2017-10-12 17:06:50 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

Re: [Qemu-devel] [PATCHv2 00/13] sun4m: sparc32_dma tidy-ups

2017-10-14 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 1508004545-28578-1-git-send-email-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCHv2 00/13] sun4m: sparc32_dma tidy-ups === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will

Re: [Qemu-devel] [PATCH v6 2/7] hw/misc: add vmcoreinfo device

2017-10-14 Thread Michael S. Tsirkin
On Tue, Oct 10, 2017 at 03:01:10PM -0300, Eduardo Habkost wrote: > On Tue, Oct 10, 2017 at 04:06:28PM +0100, Daniel P. Berrange wrote: > > On Tue, Oct 10, 2017 at 05:00:18PM +0200, Marc-André Lureau wrote: > > > Hi > > > > > > On Tue, Oct 10, 2017 at 10:31 AM, Daniel P. Berrange > > >

Re: [Qemu-devel] [PATCH v6 2/7] hw/misc: add vmcoreinfo device

2017-10-14 Thread Michael S. Tsirkin
On Tue, Oct 10, 2017 at 03:01:10PM -0300, Eduardo Habkost wrote: > On Tue, Oct 10, 2017 at 04:06:28PM +0100, Daniel P. Berrange wrote: > > On Tue, Oct 10, 2017 at 05:00:18PM +0200, Marc-André Lureau wrote: > > > Hi > > > > > > On Tue, Oct 10, 2017 at 10:31 AM, Daniel P. Berrange > > >

Re: [Qemu-devel] [PATCH] spapr_cpu_core: instantiate CPUs separately

2017-10-14 Thread David Gibson
On Fri, Oct 13, 2017 at 01:31:44PM +0200, Greg Kurz wrote: > The current code assumes that only the CPU core object holds a > reference on each individual CPU object, and happily frees their > allocated memory when the core is unrealized. This is dangerous > as some other code can legitimely keep

[Qemu-devel] [PATCH v4 7/8] nbd/client: prepare nbd_receive_reply for structured reply

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy In following patch nbd_receive_reply will be used both for simple and structured reply header receiving. NBDReply is altered into union of simple reply header and structured reply chunk header, simple error translation moved to

[Qemu-devel] [PATCH v4 6/8] nbd/client: refactor nbd_receive_starttls

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Split out nbd_request_simple_option to be reused for structured reply option. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake --- v4: reduce redundant traces, typo

[Qemu-devel] [PATCH v4 4/8] nbd: Minimal structured read for server

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Minimal implementation of structured read: one structured reply chunk, no segmentation. Minimal structured error implementation: no text message. Support DF flag, but just ignore it, as there is no segmentation any way. Signed-off-by:

[Qemu-devel] [PATCH v4 3/8] nbd: Expose constants and structs for structured read

2017-10-14 Thread Eric Blake
Upcoming patches will implement the NBD structured reply extension [1] for both client and server roles. Declare the constants, structs, and lookup routines that will be valuable whether the server or client code is backported in isolation. This includes moving one constant from an internal

[Qemu-devel] [PATCH v4 8/8] nbd: Move nbd_read() to common header

2017-10-14 Thread Eric Blake
An upcoming change to block/nbd-client.c will want to read the tail of a structured reply chunk directly from the wire. Move this function to make it easier. Based on a patch from Vladimir Sementsov-Ogievskiy. Signed-off-by: Eric Blake --- include/block/nbd.h | 10

[Qemu-devel] [PATCH v4 2/8] nbd: Move nbd_errno_to_system_errno() to public header

2017-10-14 Thread Eric Blake
This is needed in preparation for structured reply handling, as we will be performing the translation from NBD error to system errno value higher in the stack at block/nbd-client.c. --- include/block/nbd.h | 13 + nbd/nbd-internal.h | 12 nbd/client.c| 32

[Qemu-devel] [PATCH v4 5/8] nbd/server: Include human-readable message in structured errors

2017-10-14 Thread Eric Blake
The NBD spec permits including a human-readable error string if structured replies are in force, so we might as well send the client the message that we logged on any error. Signed-off-by: Eric Blake --- nbd/server.c | 22 -- nbd/trace-events | 2 +-

[Qemu-devel] [PATCH v4 0/8] nbd mimimal structured read

2017-10-14 Thread Eric Blake
As mentioned in my review of Vladimir's v3 of this series [1], I had enough tweaks during my review that it's easier to repost things for another round of discussion, adding some of my patches in between his. I did not include his 13/13 "nbd: Minimal structured read for client", where I had a lot

[Qemu-devel] [PATCH v4 1/8] nbd: Include error names in trace messages

2017-10-14 Thread Eric Blake
NBD errors were originally sent over the wire based on Linux errno values; but not all the world is Linux, and not all platforms share the same values. Since a number isn't very easy to decipher on all platforms, update the trace messages to include the name of NBD errors being sent/received over

[Qemu-devel] [PULL 8/9] nbd/server: simplify reply transmission

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Send qiov via qio_channel_writev_all instead of calling nbd_write twice with a cork. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20171012095319.136610-8-vsement...@virtuozzo.com> [eblake: rebase

[Qemu-devel] [PULL 9/9] nbd: header constants indenting

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Prepare indenting for the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20171012095319.136610-9-vsement...@virtuozzo.com>

[Qemu-devel] [PULL 6/9] nbd/server: do not use NBDReply structure

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy NBDReply structure will be upgraded in future patches to handle both simple and structured replies and will be used only in the client Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id:

[Qemu-devel] [PULL 7/9] nbd/server: refactor nbd_co_send_simple_reply parameters

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Pass client and buffer (*data) parameters directly, to make the function consistent with further structured reply sending functions. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id:

[Qemu-devel] [PULL 4/9] nbd: rename some simple-request related objects to be _simple_

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy To be consistent when their _structured_ analogs will be introduced. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id:

[Qemu-devel] [PULL 2/9] block/nbd-client: assert qiov len once in nbd_co_request

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Also improve the assertion: check that qiov is NULL for other commands than CMD_READ and CMD_WRITE. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id:

[Qemu-devel] [PULL 5/9] nbd/server: structurize simple reply header sending

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Use packed structure instead of pointer arithmetics. Also, merge two redundant traces into one. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20171012095319.136610-5-vsement...@virtuozzo.com>

[Qemu-devel] [PULL 3/9] block/nbd-client: refactor nbd_co_receive_reply

2017-10-14 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Pass handle parameter directly, as the whole request isn't needed. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id:

[Qemu-devel] [PULL 0/9] NBD patches through 14 Oct

2017-10-14 Thread Eric Blake
The following changes since commit f90ea7ba7c5ae7010ee0ce062207ae42530f57d6: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20171012' into staging (2017-10-12 17:06:50 +0100) are available in the git repository at: git://repo.or.cz/qemu/ericb.git

[Qemu-devel] [PULL 1/9] NBD: use g_new() family of functions

2017-10-14 Thread Eric Blake
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20171006235023.11952-22-f4...@amsat.org> Signed-off-by: Eric Blake --- nbd/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-14 Thread Michael S. Tsirkin
On Fri, Oct 13, 2017 at 03:53:26PM +0800, Haozhong Zhang wrote: > On 10/12/17 17:45 +0200, Paolo Bonzini wrote: > > On 12/10/2017 14:45, Haozhong Zhang wrote: > > > Basically, QEMU builds two ROMs for guest, /rom@etc/acpi/tables and > > > /rom@etc/table-loader. The former is unstructured to guest,

Re: [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-14 Thread Michael S. Tsirkin
On Fri, Oct 13, 2017 at 03:46:39PM -0700, Stefano Stabellini wrote: > On Fri, 13 Oct 2017, Jan Beulich wrote: > > >>> On 13.10.17 at 13:13, wrote: > > > To Jan, Andrew, Stefano and Anthony, > > > > > > what do you think about allowing QEMU to build the entire guest ACPI

Re: [Qemu-devel] [PATCHv3 00/13] sun4m: sparc32_dma tidy-ups

2017-10-14 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1508006342-5304-1-git-send-email-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCHv3 00/13] sun4m: sparc32_dma tidy-ups === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCHv3 08/13] sparc32_dma: make esp device child of espdma device

2017-10-14 Thread Mark Cave-Ayland
This makes it possible to reference the esp device from the espdma device as required, and by wiring up the device ourselves in sun4m.c we can drop use of the esp_init() function. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 26

[Qemu-devel] [PATCHv3 11/13] sparc32_dma: introduce new SPARC32_DMA type container object

2017-10-14 Thread Mark Cave-Ayland
Create a new SPARC32_DMA container object (including an appropriate container memory region) and add instances of the SPARC32_ESPDMA_DEVICE and SPARC32_LEDMA_DEVICE as child objects. The benefit is that most of the gpio wiring complexity between esp/espdma and lance/ledma is now hidden within the

[Qemu-devel] [PATCHv3 13/13] sparc32_dma: add len to esp/le DMA memory tracing

2017-10-14 Thread Mark Cave-Ayland
This is surprisingly useful when trying to debug DMA issues. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c |8 hw/dma/trace-events |8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/dma/sparc32_dma.c

[Qemu-devel] [PATCHv3 09/13] lance: move TYPE_LANCE and SysBusPCNetState from lance.c to sun4m.h

2017-10-14 Thread Mark Cave-Ayland
This enables them to be used outside of lance.c. Signed-off-by: Mark Cave-Ayland CC: Jason Wang --- hw/net/lance.c |9 - include/hw/sparc/sun4m.h | 13 + 2 files changed, 13 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCHv3 10/13] sparc32_dma: make lance device child of ledma device

2017-10-14 Thread Mark Cave-Ayland
This makes it possible to reference the lance device from the ledma device as required. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 23 ++- hw/sparc/sun4m.c | 31 +++

[Qemu-devel] [PATCHv3 12/13] sparc32_dma: remove is_ledma hack and replace with memory region alias

2017-10-14 Thread Mark Cave-Ayland
This hack originated from before the memory region API was introduced, and increased the size of the ledma DMA device to capture incorrect accesses beyond the end of the ledma device. A full analysis can be found on Artyom's blog at

[Qemu-devel] [PATCHv3 01/13] sparc32_dma: rename SPARC32_DMA type to SPARC32_DMA_DEVICE

2017-10-14 Thread Mark Cave-Ayland
Also update the function names to match as appropriate. While we're here rename the type from sparc32_dma to sparc32-dma in order to match the current QOM convention. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 67

[Qemu-devel] [PATCHv3 07/13] esp: move TYPE_ESP and SysBusESPState from esp.c to esp.h

2017-10-14 Thread Mark Cave-Ayland
This enables them to be used outside of esp.c. Signed-off-by: Mark Cave-Ayland CC: Paolo Bonzini --- hw/scsi/esp.c | 13 - include/hw/scsi/esp.h | 14 ++ 2 files changed, 14 insertions(+), 13 deletions(-)

[Qemu-devel] [PATCHv3 05/13] sun4m_iommu: move TYPE_SUN4M_IOMMU declaration to sun4m.h

2017-10-14 Thread Mark Cave-Ayland
This is in preparation to allow the type to be used elsewhere. Signed-off-by: Mark Cave-Ayland --- hw/dma/sun4m_iommu.c | 14 -- include/hw/sparc/sun4m.h | 16 2 files changed, 16 insertions(+), 14 deletions(-) diff --git

[Qemu-devel] [PATCHv3 02/13] sparc32_dma: split esp and le into separate DMA devices

2017-10-14 Thread Mark Cave-Ayland
Due to slight differences in behaviour accessing the registers for the esp and le devices, create two separate SPARC32_DMA_DEVICE types and update the sun4m machine to use. Note that by using different device types we already know the size of the register block and the value of is_ledma at init

[Qemu-devel] [PATCHv3 06/13] sparc32_dma: use object link instead of qdev property to pass IOMMU reference

2017-10-14 Thread Mark Cave-Ayland
This enables us to remove the last remaining (opaque) qdev property. Whilst we are here, also update iommu_init() to use TYPE_SUN4M_IOMMU instead of a hardcoded string. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 13 + hw/sparc/sun4m.c

[Qemu-devel] [PATCHv3 00/13] sun4m: sparc32_dma tidy-ups

2017-10-14 Thread Mark Cave-Ayland
This patchset aims to tidy-up the sparc32_dma code by improving the modelling of the espdma/ledma devices using both QOM and the memory API which didn't exist when the code was first written. The result is that it is now possible to remove both the iommu_opaque and is_ledma workarounds from the

[Qemu-devel] [PATCHv3 04/13] sun4m: move DMA device wiring from sparc32_dma_init() to sun4m_hw_init()

2017-10-14 Thread Mark Cave-Ayland
By using the sysbus interface it is possible to wire up the esp/le devices to the sun4m DMA controller directly during sun4m_hw_init() instead of passing qemu_irqs into the sparc32_dma_init() function. This is an intermediate step to allow further reorganisation as more logic is moved into the

[Qemu-devel] [PATCHv3 03/13] sparc32_dma: move type declarations from sparc32_dma.c to sparc32_dma.h

2017-10-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 34 -- include/hw/sparc/sparc32_dma.h | 37 + 2 files changed, 37 insertions(+), 34 deletions(-) diff --git

Re: [Qemu-devel] [PATCHv2 00/13] sun4m: sparc32_dma tidy-ups

2017-10-14 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1508004545-28578-1-git-send-email-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCHv2

Re: [Qemu-devel] [PATCHv2 00/13] sun4m: sparc32_dma tidy-ups

2017-10-14 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1508004545-28578-1-git-send-email-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCHv2 00/13] sun4m: sparc32_dma tidy-ups === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCH 1/3] sun4m: implement IOMMU translation using IOMMU memory region

2017-10-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/dma/sun4m_iommu.c | 62 ++ include/hw/sparc/sun4m.h |5 2 files changed, 67 insertions(+) diff --git a/hw/dma/sun4m_iommu.c b/hw/dma/sun4m_iommu.c index

[Qemu-devel] [PATCH 2/3] sparc32_dma: switch over to using IOMMU memory region and DMA API

2017-10-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c index fbb072a..5438831 100644 --- a/hw/dma/sparc32_dma.c +++

[Qemu-devel] [PATCH 3/3] sun4m_iommu: remove legacy sparc_iommu_memory_rw() function

2017-10-14 Thread Mark Cave-Ayland
With the switch to the IOMMU memory region and DMA API, this is no longer required. Signed-off-by: Mark Cave-Ayland --- hw/dma/sun4m_iommu.c | 33 - include/hw/sparc/sun4m.h | 16 2 files changed, 49

[Qemu-devel] [PATCH 0/3] sun4m: implement memory region IOMMU translation and DMA API

2017-10-14 Thread Mark Cave-Ayland
The original sun4m IOMMU/DMA code dates from before the introduction of the QEMU memory region API (in particular IOMMU memory regions) and the DMA API. This patchset removes these sun4m-specific implementations and replaces them with the more up-to-date QEMU APIs instead. Signed-off-by: Mark

[Qemu-devel] [PATCHv2 12/13] sparc32_dma: remove is_ledma hack and replace with memory region alias

2017-10-14 Thread Mark Cave-Ayland
This hack originated from before the memory region API was introduced, and increased the size of the ledma DMA device to capture incorrect accesses beyond the end of the ledma device. A full analysis can be found on Artyom's blog at

[Qemu-devel] [PATCHv2 10/13] sparc32_dma: make lance device child of ledma device

2017-10-14 Thread Mark Cave-Ayland
This makes it possible to reference the lance device from the ledma device as required. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 23 ++- hw/sparc/sun4m.c | 31 +++

[Qemu-devel] [PATCHv2 09/13] lance: move TYPE_LANCE and SysBusPCNetState from lance.c to sun4m.h

2017-10-14 Thread Mark Cave-Ayland
This enables them to be used outside of lance.c. Signed-off-by: Mark Cave-Ayland CC: Jason Wang --- hw/net/lance.c |9 - include/hw/sparc/sun4m.h | 13 + 2 files changed, 13 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCHv2 08/13] sparc32_dma: make esp device child of espdma device

2017-10-14 Thread Mark Cave-Ayland
This makes it possible to reference the esp device from the espdma device as required, and by wiring up the device ourselves in sun4m.c we can drop use of the esp_init() function. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 26

[Qemu-devel] [PATCHv2 05/13] sun4m_iommu: move TYPE_SUN4M_IOMMU declaration to sun4m.h

2017-10-14 Thread Mark Cave-Ayland
This is in preparation to allow the type to be used elsewhere. Signed-off-by: Mark Cave-Ayland --- hw/dma/sun4m_iommu.c | 14 -- include/hw/sparc/sun4m.h | 16 2 files changed, 16 insertions(+), 14 deletions(-) diff --git

[Qemu-devel] [PATCHv2 13/13] sparc32_dma: add len to esp/le DMA memory tracing

2017-10-14 Thread Mark Cave-Ayland
This is surprisingly useful when trying to debug DMA issues. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c |8 hw/dma/trace-events |8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/dma/sparc32_dma.c

[Qemu-devel] [PATCHv2 11/13] sparc32_dma: introduce new SPARC32_DMA type container object

2017-10-14 Thread Mark Cave-Ayland
Create a new SPARC32_DMA container object (including an appropriate container memory region) and add instances of the SPARC32_ESPDMA_DEVICE and SPARC32_LEDMA_DEVICE as child objects. The benefit is that most of the gpio wiring complexity between esp/espdma and lance/ledma is now hidden within the

[Qemu-devel] [PATCHv2 03/13] sparc32_dma: move type declarations from sparc32_dma.c to sparc32_dma.h

2017-10-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 34 -- include/hw/sparc/sparc32_dma.h | 37 + 2 files changed, 37 insertions(+), 34 deletions(-) diff --git

[Qemu-devel] [PATCHv2 01/13] sparc32_dma: rename SPARC32_DMA type to SPARC32_DMA_DEVICE

2017-10-14 Thread Mark Cave-Ayland
Also update the function names to match as appropriate. While we're here rename the type from sparc32_dma to sparc32-dma in order to match the current QOM convention. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 67

[Qemu-devel] [PATCHv2 07/13] esp: move TYPE_ESP and SysBusESPState from esp.c to esp.h

2017-10-14 Thread Mark Cave-Ayland
This enables them to be used outside of esp.c. Signed-off-by: Mark Cave-Ayland CC: Paolo Bonzini --- hw/scsi/esp.c | 13 - include/hw/scsi/esp.h | 13 + 2 files changed, 13 insertions(+), 13 deletions(-)

[Qemu-devel] [PATCHv2 06/13] sparc32_dma: use object link instead of qdev property to pass IOMMU reference

2017-10-14 Thread Mark Cave-Ayland
This enables us to remove the last remaining (opaque) qdev property. Whilst we are here, also update iommu_init() to use TYPE_SUN4M_IOMMU instead of a hardcoded string. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 13 + hw/sparc/sun4m.c

[Qemu-devel] [PATCHv2 02/13] sparc32_dma: split esp and le into separate DMA devices

2017-10-14 Thread Mark Cave-Ayland
Due to slight differences in behaviour accessing the registers for the esp and le devices, create two separate SPARC32_DMA_DEVICE types and update the sun4m machine to use. Note that by using different device types we already know the size of the register block and the value of is_ledma at init

[Qemu-devel] [PATCHv2 00/13] sun4m: sparc32_dma tidy-ups

2017-10-14 Thread Mark Cave-Ayland
This patchset aims to tidy-up the sparc32_dma code by improving the modelling of the espdma/ledma devices using both QOM and the memory API which didn't exist when the code was first written. The result is that it is now possible to remove both the iommu_opaque and is_ledma workarounds from the

[Qemu-devel] [PATCHv2 04/13] sun4m: move DMA device wiring from sparc32_dma_init() to sun4m_hw_init()

2017-10-14 Thread Mark Cave-Ayland
By using the sysbus interface it is possible to wire up the esp/le devices to the sun4m DMA controller directly during sun4m_hw_init() instead of passing qemu_irqs into the sparc32_dma_init() function. This is an intermediate step to allow further reorganisation as more logic is moved into the

Re: [Qemu-devel] [PATCH 0/8] sun4m : sparc32_dma tidy-ups

2017-10-14 Thread Mark Cave-Ayland
On 10/10/17 09:21, Artyom Tarasenko wrote: > On Mon, Oct 9, 2017 at 11:06 PM, Mark Cave-Ayland > wrote: >> This patchset aims to tidy-up the sparc32_dma code by improving the >> modelling of the espdma/ledma devices using both QOM and the memory >> API which didn't

Re: [Qemu-devel] QEMU without X11 support

2017-10-14 Thread Peter Maydell
On 14 October 2017 at 17:38, Philippe Mathieu-Daudé wrote: >>> Hello, is it possible to run (or rebuild modifying build flags) QEMU >>> without support for X11 window system integration? >> >> ./configure --disable-gtk --disable-sdl --disable-opengl > > Is there some interest in

Re: [Qemu-devel] [PATCH] tco: add trace events

2017-10-14 Thread Philippe Mathieu-Daudé
Hi Paolo, On 10/12/2017 10:54 AM, Paolo Bonzini wrote: > Add trace events to the PCH watchdog timer, it can be useful to see how > the guest is using it. > > Signed-off-by: Paolo Bonzini > --- > hw/acpi/tco.c| 11 +-- > hw/acpi/trace-events | 4 > 2

Re: [Qemu-devel] [PATCH v2] oslib-posix: Fix compiler warning and some data types

2017-10-14 Thread Philippe Mathieu-Daudé
Hi Stefan, On 10/13/2017 02:48 AM, Stefan Weil wrote: > diff --git a/util/oslib-posix.c b/util/oslib-posix.c > index 80086c549f..beef148c96 100644 > --- a/util/oslib-posix.c > +++ b/util/oslib-posix.c > @@ -59,8 +59,8 @@ > > struct MemsetThread { > char *addr; > -uint64_t numpages; >

Re: [Qemu-devel] QEMU without X11 support

2017-10-14 Thread Philippe Mathieu-Daudé
>> Hello, is it possible to run (or rebuild modifying build flags) QEMU >> without support for X11 window system integration? > > ./configure --disable-gtk --disable-sdl --disable-opengl Is there some interest in adding a simpler --disable-x11 option?

Re: [Qemu-devel] [PATCH] futex: add missing header guards

2017-10-14 Thread Philippe Mathieu-Daudé
Cc: trivial On 10/13/2017 06:30 PM, Emilio G. Cota wrote: > The header file was introduced by fbcc3e5 ("qemu-thread: optimize QemuLockCnt > with futexes on Linux", 2017-01-16) without header guards. Add them. > > Signed-off-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH 2/4] multiboot: load any machine type of ELF

2017-10-14 Thread Peter Maydell
On 14 October 2017 at 00:21, Eduardo Habkost wrote: > I don't believe the spec restricts that, but I don't see why it > would be useful to load an ELF file that doesn't match the target > architecture (e.g. loading non-x86 ELF files on a x86 machine > like PC). Agreed. If we

  1   2   >