Re: [PATCH 0/3] Add ability to choose MDIO phy number to i.MX processors

2020-07-04 Thread Jean-Christophe DUBOIS
This patch set is to be applied on top of the patch serie recently accepted by Peter on his tree. I guess I will have to wait a bit that his pull request is accepted in mainline before resubmitting my patch. JC Le 03/07/2020 à 22:44, no-re...@patchew.org a écrit : Patchew URL: https://patch

Re: [PATCH v2 1/1] disas: mips: Add Loongson 2F disassembler

2020-07-04 Thread Aleksandar Markovic
On Friday, July 3, 2020, Stefan Brankovic wrote: > Add disassembler for Loongson 2F instruction set. > > Testing is done by comparing qemu disassembly output, obtained by > using -d in_asm command line option, with appropriate objdump output. > > This disassembler is written as a generic disassem

[PATCH] intel_iommu: Use correct shift for 256 bits qi descriptor

2020-07-04 Thread Liu Yi L
In chapter 10.4.23 of VT-d spec 3.0, Descriptor Width bit was introduced in VTD_IQA_REG. Sfotware could set this bit to tell VT-d the QI descriptor from software would be 256 bits. Accordingly, the VTD_IQH_QH_SHIFT should be 5 when descriptor size is 256 bits. This patch adds the DW bit check when

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-07-04 Thread Alex Bennée
Aleksandar Markovic writes: > On Wednesday, July 1, 2020, Alex Bennée wrote: > >> >> Ahmed Karaman writes: >> >> > On Mon, Jun 29, 2020 at 6:03 PM Alex Bennée >> wrote: >> >> >> >> Assuming your test case is constant execution (i.e. runs the same each >> >> time) you could run in through a p

Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Peter Maydell
On Fri, 3 Jul 2020 at 22:55, Philippe Mathieu-Daudé wrote: > > On 7/3/20 11:35 PM, Michele Denber wrote: > > What is TFR? > > TFR() is defined in include/qemu-common.h: Yep; adding #include "qemu-common.h" to tap-solaris.c should fix this (I think we missed tap-solaris.c in the header cleanup o

Re: [PULL 15/29] dwc-hsotg (dwc2) USB host controller register definitions

2020-07-04 Thread Philippe Mathieu-Daudé
Hi Paul, On 6/5/20 6:49 PM, Peter Maydell wrote: > From: Paul Zimmerman > > Import the dwc-hsotg (dwc2) register definitions file from the > Linux kernel. This is a copy of drivers/usb/dwc2/hw.h from the > mainline Linux kernel, the only changes being to the header, and > two instances of 'u32'

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-07-04 Thread Aleksandar Markovic
On Saturday, July 4, 2020, Alex Bennée wrote: > > Aleksandar Markovic writes: > > > On Wednesday, July 1, 2020, Alex Bennée wrote: > > > >> > >> Ahmed Karaman writes: > >> > >> > On Mon, Jun 29, 2020 at 6:03 PM Alex Bennée > >> wrote: > >> >> > >> >> Assuming your test case is constant execut

[PATCH] net/tap-solaris.c: Include qemu-common.h for TFR macro

2020-07-04 Thread Peter Maydell
In commit a8d2532645cf5ce4 we cleaned up usage of the qemu-common.h header so that it was always included from .c files and never from other .h files. We missed adding it to net/tap-solaris.c (which previously was pulling it in via tap-int.h), which broke building on Solaris hosts. Fixes: a8d25326

Re: [PULL 0/7] Block layer patches

2020-07-04 Thread Peter Maydell
On Fri, 3 Jul 2020 at 10:21, Kevin Wolf wrote: > > The following changes since commit 64f0ad8ad8e13257e7c912df470d46784b55c3fd: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-07-02' > into staging (2020-07-02 15:54:09 +0100) > > are available in the Git repository at: > >

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-07-04 Thread Aleksandar Markovic
On Saturday, July 4, 2020, Alex Bennée wrote: > > Aleksandar Markovic writes: > > > On Wednesday, July 1, 2020, Alex Bennée wrote: > > > >> > >> Ahmed Karaman writes: > >> > >> > On Mon, Jun 29, 2020 at 6:03 PM Alex Bennée > >> wrote: > >> >> > >> >> Assuming your test case is constant execut

Re: [PATCH] net/tap-solaris.c: Include qemu-common.h for TFR macro

2020-07-04 Thread Philippe Mathieu-Daudé
On 7/4/20 11:23 AM, Peter Maydell wrote: > In commit a8d2532645cf5ce4 we cleaned up usage of the qemu-common.h header > so that it was always included from .c files and never from other .h files. > We missed adding it to net/tap-solaris.c (which previously was pulling it > in via tap-int.h), which

Re: [PULL 15/29] dwc-hsotg (dwc2) USB host controller register definitions

2020-07-04 Thread Philippe Mathieu-Daudé
On 7/4/20 11:17 AM, Philippe Mathieu-Daudé wrote: > Hi Paul, > > On 6/5/20 6:49 PM, Peter Maydell wrote: >> From: Paul Zimmerman >> >> Import the dwc-hsotg (dwc2) register definitions file from the >> Linux kernel. This is a copy of drivers/usb/dwc2/hw.h from the >> mainline Linux kernel, the onl

Re: [PATCH v3 14/19] .mailmap: Display correct email address for Michael Tokarev

2020-07-04 Thread Philippe Mathieu-Daudé
+Alex/Laurent On 7/2/20 8:45 PM, Michael Tokarev wrote: > 02.07.2020 20:38, Philippe Mathieu-Daudé wrote: >> Fix Michael Tokarev email address in the following commits: >> >> $ git log --committer=mjt@gandalf --oneline > > Heh. It was a misconfiguration on my part which I haven't noticed > for

[RFC v7 00/25] intel_iommu: expose Shared Virtual Addressing to VMs

2020-07-04 Thread Liu Yi L
Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM) on Intel platforms allows address space sharing between device DMA and applications. SVA can reduce programming complexity and enhance security. This QEMU series is intended to expose SVA usage to VMs. i.e. Sharing guest applicati

[RFC v7 01/25] scripts/update-linux-headers: Import iommu.h

2020-07-04 Thread Liu Yi L
From: Eric Auger Update the script to import the new iommu.h uapi header. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Michael S. Tsirkin Cc: Cornelia Huck Cc: Paolo Bonzini Acked-by: Cornelia Huck Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 2 +- 1 file

[RFC v7 02/25] header file update VFIO/IOMMU vSVA APIs kernel 5.8-rc3

2020-07-04 Thread Liu Yi L
The kernel uapi/linux/iommu.h header file includes the extensions for vSVA support. e.g. bind gpasid, iommu fault report related user structures and etc. This commit updates kernel headers from the below branch: https://github.com/luxis1999/linux-vsva.git: vsva-linux-5.8-rc3-v4 Note: this should

[RFC v7 04/25] hw/pci: introduce pci_device_get_iommu_attr()

2020-07-04 Thread Liu Yi L
This patch adds pci_device_get_iommu_attr() to get vIOMMU attributes. e.g. if nesting IOMMU wanted. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun Cc: David Gibson Cc: Michael S. Tsirkin Signed-off-by: Liu Yi L --- hw/pci/pci.c | 35 +++

Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Philippe Mathieu-Daudé
+Eric for macros & errno handling On 7/4/20 11:11 AM, Peter Maydell wrote: > On Fri, 3 Jul 2020 at 22:55, Philippe Mathieu-Daudé wrote: >> >> On 7/3/20 11:35 PM, Michele Denber wrote: >>> What is TFR? >> >> TFR() is defined in include/qemu-common.h: > > Yep; adding #include "qemu-common.h" to

[RFC v7 05/25] intel_iommu: add get_iommu_attr() callback

2020-07-04 Thread Liu Yi L
Return vIOMMU attribute to caller. e.g. VFIO call via PCI layer. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Liu Yi L --- hw/i386/intel_iommu.c | 23 +++ 1 file changed, 23 insertions(+

[RFC v7 03/25] hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps

2020-07-04 Thread Liu Yi L
This patch modifies pci_setup_iommu() to set PCIIOMMUOps instead of setting PCIIOMMUFunc. PCIIOMMUFunc is used to get an address space for a PCI device in vendor specific way. The PCIIOMMUOps still offers this functionality. But using PCIIOMMUOps leaves space to add more iommu related vendor specif

[RFC v7 07/25] vfio: check VFIO_TYPE1_NESTING_IOMMU support

2020-07-04 Thread Liu Yi L
VFIO needs to check VFIO_TYPE1_NESTING_IOMMU support with Kernel before further using it. e.g. requires to check IOMMU UAPI support. Referred patch from Eric Auger: https://patchwork.kernel.org/patch/11040499/ Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun Cc: David Gibs

[RFC v7 11/25] vfio/common: provide PASID alloc/free hooks

2020-07-04 Thread Liu Yi L
This patch defines vfio_host_iommu_context_info, implements the PASID alloc/free hooks defined in HostIOMMUContextClass. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun Cc: David Gibson Cc: Alex Williamson Signed-off-by: Liu Yi L --- hw/vfio/common.c

[RFC v7 18/25] intel_iommu: bind/unbind guest page table to host

2020-07-04 Thread Liu Yi L
This patch captures the guest PASID table entry modifications and propagates the changes to host to setup dual stage DMA translation. The guest page table is configured as 1st level page table (GVA->GPA) whose translation result would further go through host VT-d 2nd level page table(GPA->HPA) unde

[RFC v7 16/25] vfio: add bind stage-1 page table support

2020-07-04 Thread Liu Yi L
This patch adds bind_stage1_pgtbl() definition in HostIOMMUContextClass, also adds corresponding implementation in VFIO. This is to expose a way for vIOMMU to setup dual stage DMA translation for passthru devices on hardware. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun

[RFC v7 06/25] vfio: pass nesting requirement into vfio_get_group()

2020-07-04 Thread Liu Yi L
This patch passes the nesting requirement into vfio_get_group() to indicate whether VFIO_TYPE1_NESTING_IOMMU is required. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun Cc: David Gibson Cc: Alex Williamson Signed-off-by: Liu Yi L --- hw/vfio/ap.c | 2

[RFC v7 17/25] intel_iommu: sync IOMMU nesting cap info for assigned devices

2020-07-04 Thread Liu Yi L
For assigned devices, Intel vIOMMU which wants to build DMA protection based on physical IOMMU nesting paging should check the IOMMU nesting support in host side. The host will return IOMMU nesting cap info to user-space (e.g. VFIO returns IOMMU nesting cap info for nesting type IOMMU). vIOMMU need

[RFC v7 23/25] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-07-04 Thread Liu Yi L
This patch propagates PASID-based iotlb invalidation to host. Intel VT-d 3.0 supports nested translation in PASID granular. Guest SVA support could be implemented by configuring nested translation on specific PASID. This is also known as dual stage DMA translation. Under such configuration, guest

[RFC v7 19/25] intel_iommu: replay pasid binds after context cache invalidation

2020-07-04 Thread Liu Yi L
This patch replays guest pasid bindings after context cache invalidation. This is a behavior to ensure safety. Actually, programmer should issue pasid cache invalidation with proper granularity after issuing a context cache invalidation. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc:

[RFC v7 08/25] hw/iommu: introduce HostIOMMUContext

2020-07-04 Thread Liu Yi L
Currently, many platform vendors provide the capability of dual stage DMA address translation in hardware. For example, nested translation on Intel VT-d scalable mode, nested stage translation on ARM SMMUv3, and etc. In dual stage DMA address translation, there are two stages address translation, s

[RFC v7 22/25] intel_iommu: process PASID-based iotlb invalidation

2020-07-04 Thread Liu Yi L
This patch adds the basic PASID-based iotlb (piotlb) invalidation support. piotlb is used during walking Intel VT-d 1st level page table. This patch only adds the basic processing. Detailed handling will be added in next patch. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bon

[RFC v7 09/25] hw/pci: introduce pci_device_set/unset_iommu_context()

2020-07-04 Thread Liu Yi L
For nesting IOMMU translation capable platforms, vIOMMUs running on such system could be implemented upon physical IOMMU nested paging (VFIO case). vIOMMU advertises such implementation by "want_nested" attribute to PCIe devices (e.g. VFIO PCI). Once "want_nested" is satisfied, device (VFIO case) s

[RFC v7 25/25] intel_iommu: modify x-scalable-mode to be string option

2020-07-04 Thread Liu Yi L
Intel VT-d 3.0 introduces scalable mode, and it has a bunch of capabilities related to scalable mode translation, thus there are multiple combinations. While this vIOMMU implementation wants simplify it for user by providing typical combinations. User could config it by "x-scalable-mode" option. Th

[RFC v7 10/25] intel_iommu: add set/unset_iommu_context callback

2020-07-04 Thread Liu Yi L
This patch adds set/unset_iommu_context() impelementation in Intel vIOMMU. PCIe devices (VFIO case) sets HostIOMMUContext to vIOMMU as an ack of vIOMMU's "want_nested" attribute. Thus vIOMMU could build DMA protection based on nested paging of host IOMMU. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter X

[RFC v7 12/25] vfio: init HostIOMMUContext per-container

2020-07-04 Thread Liu Yi L
In this patch, QEMU firstly gets iommu info from kernel to check the supported capabilities by a VFIO_IOMMU_TYPE1_NESTING iommu. And inits HostIOMMUContet instance. For vfio-pci devices, it could use pci_device_set/unset_iommu() to expose host iommu context to vIOMMU emulators. vIOMMU emulators co

[RFC v7 13/25] intel_iommu: add virtual command capability support

2020-07-04 Thread Liu Yi L
This patch adds virtual command support to Intel vIOMMU per Intel VT-d 3.1 spec. And adds two virtual commands: allocate pasid and free pasid. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Reviewed-by: Peter Xu Signed-off-b

[RFC v7 14/25] intel_iommu: process PASID cache invalidation

2020-07-04 Thread Liu Yi L
This patch adds PASID cache invalidation handling. When guest enabled PASID usages (e.g. SVA), guest software should issue a proper PASID cache invalidation when caching-mode is exposed. This patch only adds the draft handling of pasid cache invalidation. Detailed handling will be added in subseque

[RFC v7 15/25] intel_iommu: add PASID cache management infrastructure

2020-07-04 Thread Liu Yi L
This patch adds a PASID cache management infrastructure based on new added structure VTDPASIDAddressSpace, which is used to track the PASID usage and future PASID tagged DMA address translation support in vIOMMU. struct VTDPASIDAddressSpace { VTDBus *vtd_bus; uint8_t devfn;

[RFC v7 20/25] intel_iommu: do not pass down pasid bind for PASID #0

2020-07-04 Thread Liu Yi L
RID_PASID field was introduced in VT-d 3.0 spec, it is used for DMA requests w/o PASID in scalable mode VT-d. It is also known as IOVA. And in VT-d 3.1 spec, there is definition on it: "Implementations not supporting RID_PASID capability (ECAP_REG.RPS is 0b), use a PASID value of 0 to perform addr

[RFC v7 21/25] vfio: add support for flush iommu stage-1 cache

2020-07-04 Thread Liu Yi L
This patch adds flush_stage1_cache() definition in HostIOMUContextClass. And adds corresponding implementation in VFIO. This is to expose a way for vIOMMU to flush stage-1 cache in host side since guest owns stage-1 translation structures in dual stage DMA translation configuration. Cc: Kevin Tian

[RFC v7 24/25] intel_iommu: process PASID-based Device-TLB invalidation

2020-07-04 Thread Liu Yi L
This patch adds an empty handling for PASID-based Device-TLB invalidation. For now it is enough as it is not necessary to propagate it to host for passthru device and also there is no emulated device has device tlb. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Ri

Re: [RFC v7 00/25] intel_iommu: expose Shared Virtual Addressing to VMs

2020-07-04 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1593862609-36135-1-git-send-email-yi.l@intel.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Thomas Huth
On 03/07/2020 23.35, Michele Denber wrote: > >> >> It appears that _IOR & friends are defined in >> /usr/include/sys/ioccom.h, but I can't figure out how to point gmake >> to that.  Do I need some sort of "-I" in the Makefile? >> >> >> When I built QEMU 2.12, I ran into this too and ended up just

[Bug 1886225] Re: [Feature request] Oracle Solaris 11.4 VM image

2020-07-04 Thread Thomas Huth
Solaris is not open anymore, so I don't think that you can get a distributable VM so easily. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1886225 Title: [Feature request] Oracle Solaris 11.4 VM im

Re: [PATCH v2 16/44] qapi: Make visitor functions taking Error ** return bool, not void

2020-07-04 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 02.07.2020 18:49, Markus Armbruster wrote: >> See recent commit "error: Document Error API usage rules" for >> rationale. >> >> Signed-off-by: Markus Armbruster >> --- >> docs/devel/qapi-code-gen.txt | 51 +-- >> include/qapi/clone-visitor.h |

Re: [PATCH v2 19/44] block/parallels: Simplify parallels_open() after previous commit

2020-07-04 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 02.07.2020 18:49, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> Reviewed-by: Eric Blake >> --- >> block/parallels.c | 7 ++- >> 1 file changed, 2 insertions(+), 5 deletions(-) >> >> diff --git a/block/parallels.c b/block/parallels.

Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Peter Maydell
On Sat, 4 Jul 2020 at 12:30, Philippe Mathieu-Daudé wrote: > Any idea what means TFR? I understand it keeps retrying while > interrupted, but can't find the origin of that abbreviation. Probably it stands for "temporary failure retry" -- glibc provides essentially the same primitive in unistd.h a

Re: [PULL 00/14] s390x update

2020-07-04 Thread Peter Maydell
On Fri, 3 Jul 2020 at 11:06, Cornelia Huck wrote: > > The following changes since commit 64f0ad8ad8e13257e7c912df470d46784b55c3fd: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-07-02' > into staging (2020-07-02 15:54:09 +0100) > > are available in the Git repository at:

Re: [PULL 00/41] virtio,acpi: features, fixes, cleanups.

2020-07-04 Thread Peter Maydell
On Fri, 3 Jul 2020 at 10:03, Michael S. Tsirkin wrote: > > The following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab: > > hw/misc/pca9552: Add missing TypeInfo::class_size field (2020-06-29 > 21:16:10 +0100) > > are available in the Git repository at: > > git://git.kernel.or

Re: [PATCH v2 25/44] qom: Use return values to check for error where that's simpler

2020-07-04 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 02.07.2020 18:49, Markus Armbruster wrote: >> When using the Error object to check for error, we need to receive it >> into a local variable, then propagate() it to @errp. >> >> Using the return value permits allows receiving it straight to @errp. >> >> Sign

[Bug 1881648] Re: `qemu-img info` reports an incorrect actual-size when the underlying posix filesystem has transparent compression

2020-07-04 Thread Ubuntu QA Website
This bug has been reported on the Ubuntu ISO testing tracker. A list of all reports related to this bug can be found here: http://iso.qa.ubuntu.com/qatracker/reports/bugs/1881648 ** Tags added: iso-testing -- You received this bug notification because you are a member of qemu- devel-ml, which i

[PATCH 02/26] hw/ppc/sam460ex: Add missing 'hw/pci/pci.h' header

2020-07-04 Thread Philippe Mathieu-Daudé
This file uses pci_create_simple() and PCI_DEVFN() which are both declared in "hw/pci/pci.h". This include is indirectly included by an USB header. As we want to reduce the USB header inclusions later, include the PCI header now, to avoid later: hw/ppc/sam460ex.c:397:5: error: implicit declarati

[PATCH 00/26] hw/usb: Give it love, reduce 'hw/usb.h' inclusion out of hw/usb/

2020-07-04 Thread Philippe Mathieu-Daudé
Hi, This is the second time I try to replace a magic typename string by a constant, and Zoltan warns me this is counter productive as "hw/usb.h" pulls in an insane amount of code. Time to give the usb subsystem some love and move forward. This series can be decomposed as follow: 1-2:prelim

[PATCH 01/26] hw/arm/sbsa-ref: Remove unused 'hw/usb.h' header

2020-07-04 Thread Philippe Mathieu-Daudé
This file doesn't access anything from "hw/usb.h", remove its inclusion. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/sbsa-ref.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index e40c868a82..021e7c1b8b 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/s

[PATCH 03/26] hw/usb: Remove unused VM_USB_HUB_SIZE definition

2020-07-04 Thread Philippe Mathieu-Daudé
Commit a5d2f7273c ("qdev/usb: make qemu aware of usb busses") removed the last use of VM_USB_HUB_SIZE, 11 years ago. Time to drop it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h | 4 1 file changed, 4 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index e29a37

[PATCH 04/26] hw/usb: Reduce 'exec/memory.h' inclusion

2020-07-04 Thread Philippe Mathieu-Daudé
"exec/memory.h" is only required by "hw/usb/hcd-musb.h". Include it there directly. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h | 1 - include/hw/usb/hcd-musb.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index

[PATCH 07/26] hw/usb/hcd-dwc2: Restrict some headers to source

2020-07-04 Thread Philippe Mathieu-Daudé
The header "usb/hcd-dwc2.h" doesn't need to include "qemu/timer.h", "sysemu/dma.h", "hw/irq.h" (the types required are forward declared). Include them in the source file which is the only one requiring the function declarations. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-dwc2.h | 3 ---

[PATCH 10/26] hw/usb/hcd-ehci: Move few definitions from header to source

2020-07-04 Thread Philippe Mathieu-Daudé
Move definitions only useful for hcd-ehci.c to this source file. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ehci.h | 11 --- hw/usb/hcd-ehci.c | 12 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 57b38cf

[PATCH 05/26] hw/usb/desc: Add missing header

2020-07-04 Thread Philippe Mathieu-Daudé
This header uses the USBPacket and USBDevice types which are forward declared in "hw/usb.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/desc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/desc.h b/hw/usb/desc.h index 4d81c68e0e..92594fbe29 100644 --- a/hw/usb/desc.h +++ b/hw/

[PATCH 06/26] hw/usb/hcd-dwc2: Remove unnecessary includes

2020-07-04 Thread Philippe Mathieu-Daudé
"qemu/error-report.h" and "qemu/main-loop.h" are not used. Remove them. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-dwc2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c index 72cbd051f3..590e75b455 100644 --- a/hw/usb/hcd-dwc2.c +++ b/hw/usb/

[PATCH 08/26] hw/usb/hcd-dwc2: Restrict 'dwc2-regs.h' scope

2020-07-04 Thread Philippe Mathieu-Daudé
We only use these register definitions in files under the hw/usb/ directory. Keep that header local by moving it there. Signed-off-by: Philippe Mathieu-Daudé --- {include/hw => hw}/usb/dwc2-regs.h | 0 hw/usb/hcd-dwc2.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) ren

[PATCH 11/26] hw/usb/hcd-xhci: Add missing header

2020-07-04 Thread Philippe Mathieu-Daudé
This header uses the USBPort type which is forward declared by "hw/usb.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 946af51fc2..8edbdc2c3e 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/

[PATCH 09/26] hw/usb/hcd-ehci: Remove unnecessary include

2020-07-04 Thread Philippe Mathieu-Daudé
As "qemu/main-loop.h" is not used, remove it. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ehci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 1495e8f7fa..256fb91e0c 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -34,7 +34,6 @@

[PATCH 15/26] hw/usb: Add new 'usb-quirks.h' local header

2020-07-04 Thread Philippe Mathieu-Daudé
Only redirect.c consumes the quirks API. Reduce the big "hw/usb.h" header by moving the quirks related declaration into their own header. As nothing out of hw/usb/ requires it, keep it local. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/usb-quirks.h | 27 +++ include/

[PATCH 12/26] hw/usb/hcd-musb: Restrict header scope

2020-07-04 Thread Philippe Mathieu-Daudé
"hcd-musb.h" is only required by USB device implementions. As we keep these implementations in the hw/usb/ directory, move the header there. Signed-off-by: Philippe Mathieu-Daudé --- {include/hw => hw}/usb/hcd-musb.h | 0 hw/usb/hcd-musb.c | 2 +- hw/usb/tusb6010.c

[PATCH 17/26] hw/usb/bus: Rename usb_get_dev_path() as usb_get_full_dev_path()

2020-07-04 Thread Philippe Mathieu-Daudé
If the device has USB_DEV_FLAG_FULL_PATH set, usb_get_dev_path() returns the full port path. Rename the function accordingly. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index f8901e8

[PATCH 13/26] hw/usb/desc: Reduce some declarations scope

2020-07-04 Thread Philippe Mathieu-Daudé
USBDescString is forward-declared. Only bus.c uses the usb_device_get_product_desc() and usb_device_get_usb_desc() function. Move all that to the "desc.h" header to reduce the big "hw/usb.h" header a bit. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/desc.h| 10 ++ include/hw/usb.

[PATCH 14/26] hw/usb/quirks: Rename included source with '.inc.c' suffix

2020-07-04 Thread Philippe Mathieu-Daudé
This file is not a header, but contains source code which is included and compiled once. We use the '.inc.c' suffix in few other cases in the repository. Follow the same convention with this file. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/quirks.c | 2 +- hw/usb/{quirks.

[PATCH 19/26] hw/ppc/spapr: Use usb_get_port_path()

2020-07-04 Thread Philippe Mathieu-Daudé
To avoid to access the USBDevice internals, and use the recently added usb_get_port_path() helper instead. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f6f034d039..221d3e7a

[PATCH 18/26] hw/usb/bus: Add usb_get_port_path()

2020-07-04 Thread Philippe Mathieu-Daudé
Refactor usb_get_full_dev_path() to take a 'want_full_path' argument, and add usb_get_port_path() which returns a short path. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h | 10 ++ hw/usb/bus.c | 18 +- 2 files changed, 23 insertions(+), 5 deletions(-) d

[PATCH 16/26] hw/usb/bus: Simplify usb_get_dev_path()

2020-07-04 Thread Philippe Mathieu-Daudé
Simplify usb_get_dev_path() a bit. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/bus.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 111c3af7c1..f8901e822c 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -580,19 +580

[PATCH 26/26] MAINTAINERS: Cover dwc-hsotg (dwc2) USB host controller emulation

2020-07-04 Thread Philippe Mathieu-Daudé
Add an section for the dwc2 host controller emulation introduced in commit 153ef1662c. Cc: Paul Zimmerman Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2566566d72..e3f895bc6e 100644 --- a/MAINTAINE

[PATCH 20/26] hw/usb: Introduce "hw/usb/usb.h" public API

2020-07-04 Thread Philippe Mathieu-Daudé
Only the USB devices require to access the USB internal APIs. The rest of the code base only wants to consume USB devices with a generic API. Move the generic declarations to the new "hw/usb/usb.h" header. Reported-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h

Re: [PATCH] linux-user: mremap fails with EFAULT if address range overlaps with stack guard

2020-07-04 Thread Tobias Koch
Ping On 6/16/20 12:10 AM, Tobias Koch wrote: > Ok, so according to the manpage, mremap generates EFAULT when "the range > old_address to old_address+old_size is an > invalid virtual memory address for this process". This is what the kernel > does for the stack guard. However, the > mappings in s

[PATCH 23/26] hw/usb/usb-hcd: Use EHCI type definitions

2020-07-04 Thread Philippe Mathieu-Daudé
Various machine/board/soc models create EHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-b

[PATCH 21/26] hw/usb: Move internal API to local 'usb-internal.h' header

2020-07-04 Thread Philippe Mathieu-Daudé
Only the files under hw/usb/ require access to the USB internal API. Move include/hw/usb.h to hw/usb/usb-internal.h to reduce its scope. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/desc.h | 2 +- hw/usb/hcd-dwc2.h | 2 +- hw/usb/hcd-ehci.h

QEMU | Pipeline #163098346 has failed for master | 21d0bafb

2020-07-04 Thread GitLab via
Your pipeline has failed. Project: QEMU ( https://gitlab.com/qemu-project/qemu ) Branch: master ( https://gitlab.com/qemu-project/qemu/-/commits/master ) Commit: 21d0bafb ( https://gitlab.com/qemu-project/qemu/-/commit/21d0bafbfe415e5c0f8109a98848c46f7d871c73 ) Commit Message: Merge remote-tr

[PATCH 22/26] hw/usb/usb-hcd: Use OHCI type definitions

2020-07-04 Thread Philippe Mathieu-Daudé
Various machine/board/soc models create OHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-b

[PATCH 24/26] hw/usb/usb-hcd: Use UHCI type definitions

2020-07-04 Thread Philippe Mathieu-Daudé
Various machine/board/soc models create UHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-b

[PATCH 25/26] hw/usb/usb-hcd: Use XHCI type definitions

2020-07-04 Thread Philippe Mathieu-Daudé
Various machine/board/soc models create XHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-b

Re: [PATCH] tests/acceptance: Add a test for the sun4u sparc64 machine

2020-07-04 Thread Philippe Mathieu-Daudé
On 7/2/20 4:10 PM, Thomas Huth wrote: > We can use the image from the advent calendar 2018 to test the sun4u > machine. It's not using the "QEMU advent calendar" string, so we can > not use the do_test_advcal_2018() from boot_linux_console.py, thus > let's also put it into a separate file to also b

Re: [PULL 0/5] migration queue

2020-07-04 Thread Peter Maydell
On Fri, 3 Jul 2020 at 16:30, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit 6651620b92bc08cde07cb500e9a43dba7bd9b2b7: > > Merge remote-tracking branch > 'remotes/kraxel/tags/seabios-20200702-pull-request' into staging (2020-07-03

Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Michele Denber
On 07/03/20 17:55, Philippe Mathieu-Daudé wrote: TFR() is defined in include/qemu-common.h: #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) Ah ha, thank you. It figures, the one place I didn't look. I assumed that QEMU would know how to find its own things so TFR m

Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Michele Denber
On 07/04/20 08:02, Thomas Huth wrote: TFR is a macro that is defined in our qemu-common.h header ... does it work if you add a #include "qemu-common.h" somewhere at the beginning of net/tap-solaris.c ? Yes, thank you, that fixed it: root@hemlock:~/qemu-5.0.0# gmake -j16 gmake[1]: Entering direc

[PATCH v2 01/23] qom/object: Update documentation

2020-07-04 Thread Philippe Mathieu-Daudé
The documentation was introduced in 2f28d2ff9dc, then 0d09e41a51 and a27bd6c77 moved the headers around. Update the comment. Signed-off-by: Philippe Mathieu-Daudé --- include/qom/object.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qom/object.h b/include/qom

[RFC PATCH v2 00/23] hw/qdev: Warn when using pre-qdev/QOM devices

2020-07-04 Thread Philippe Mathieu-Daudé
This is a trivial RFC series to anotate pre-qdev/QOM devices so developers using them without knowing they are not QOM'ified yet can realize it and convert them if/when they have time. qdev/QOM devices are introspectable, so easier to test or even fuzz. Since RFC v1: - Addressed bonzini comments,

[RFC PATCH v2 02/23] hw/core/qdev: Add qdev_warn_deprecated_function_used() helper

2020-07-04 Thread Philippe Mathieu-Daudé
When built with --enable-qdev-deprecation-warning, calling qdev_warn_deprecated_function_used() will emit a warning such: $ qemu-system-arm -M verdex ... qemu-system-arm: warning: use of deprecated non-qdev/non-qom code in pxa2xx_lcdc_init() qemu-system-arm: warning: use of deprecated non-q

[RFC PATCH v2 06/23] hw/char/parallel: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/parallel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/char/parallel.c b/hw/char/parallel.c index c0f34bf924..02eb1a7ef4 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@

[RFC PATCH v2 03/23] hw/arm/omap: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/omap1.c| 6 ++ hw/char/omap_uart.c | 5 + hw/misc/omap_gpmc.c | 3 +++ hw/misc/omap_l4.c | 3 +++ hw/misc/omap_sdrc.c | 3 +++ hw/sd/omap_mmc.c

[RFC PATCH v2 05/23] hw/arm/nseries: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/nseries.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 428a2a2c5a..e647ec32e3 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -44,6 +44,

[RFC PATCH v2 07/23] hw/display/blizzard: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/blizzard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/blizzard.c b/hw/display/blizzard.c index 105241577d..74557b152b 100644 --- a/hw/display/blizzard.c +++ b/hw/displa

[RFC PATCH v2 08/23] hw/display/ramfb: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/ramfb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index 79b9754a58..a4a427e5c7 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@

[RFC PATCH v2 04/23] hw/arm/pxa2xx: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/pxa2xx.c | 3 +++ hw/display/pxa2xx_lcd.c | 3 +++ hw/input/pxa2xx_keypad.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index f104a33463..a

[RFC PATCH v2 09/23] hw/display/tc6393xb: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/tc6393xb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c index 49a676d1b0..e4900e9502 100644 --- a/hw/display/tc6393xb.c +++ b/hw/displa

[RFC PATCH v2 10/23] hw/display/vga-isa-mm: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga-isa-mm.c | 5 + hw/display/vga.c| 3 +++ 2 files changed, 8 insertions(+) diff --git a/hw/display/vga-isa-mm.c b/hw/display/vga-isa-mm.c index 7321b7a06d..3e62389b63 100644 -

[RFC PATCH v2 16/23] hw/misc/cbus: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/cbus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/misc/cbus.c b/hw/misc/cbus.c index 3c3721ad2d..24e197684f 100644 --- a/hw/misc/cbus.c +++ b/hw/misc/cbus.c @@ -25,6 +25,7 @@ #in

[RFC PATCH v2 13/23] hw/input/lasips2: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/input/lasips2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 0786e57338..452244f037 100644 --- a/hw/input/lasips2.c +++ b/hw/in

[RFC PATCH v2 11/23] hw/dma/etraxfs_dma: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/etraxfs_dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/dma/etraxfs_dma.c b/hw/dma/etraxfs_dma.c index c4334e87bf..d2f7e7ca9d 100644 --- a/hw/dma/etraxfs_dma.c +++

[RFC PATCH v2 21/23] hw/riscv: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- hw/riscv/riscv_htif.c | 4 hw/riscv/sifive_uart.c | 4 2 files changed, 8 insertions(+) diff --git a/hw/riscv/riscv_htif.c b/hw/riscv/riscv_htif.c index ca87a5cf9

[RFC PATCH v2 12/23] hw/dma/soc_dma: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/soc_dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/dma/soc_dma.c b/hw/dma/soc_dma.c index 3a430057f5..22fd8c38b0 100644 --- a/hw/dma/soc_dma.c +++ b/hw/dma/soc_dma.c @@ -21,6 +21

[RFC PATCH v2 22/23] hw/usb/hcd-musb: Emit warning when old code is used

2020-07-04 Thread Philippe Mathieu-Daudé
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-musb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index 85f5ff5bd4..f09464ed5e 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -26,

  1   2   3   >