[PATCH Kernel v22 4/8] vfio iommu: Add ioctl definition for dirty pages tracking

2020-05-18 Thread Kirti Wankhede
IOMMU container maintains a list of all pages pinned by vfio_pin_pages API. All pages pinned by vendor driver through this API should be considered as dirty during migration. When container consists of IOMMU capable device and all pages are pinned and mapped, then all pages are marked dirty. Added

[PATCH Kernel v22 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-18 Thread Kirti Wankhede
DMA mapped pages, including those pinned by mdev vendor drivers, might get unpinned and unmapped while migration is active and device is still running. For example, in pre-copy phase while guest driver could access those pages, host device or vendor driver can dirty these mapped pages. Such pages

[PATCH Kernel v22 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking

2020-05-18 Thread Kirti Wankhede
VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: - Start dirty pages tracking while migration is active - Stop dirty pages tracking. - Get dirty pages bitmap. Its user space application's responsibility to copy content of dirty pages from source to destination during migration. To

[PATCH QEMU v22 02/18] vfio: Add function to unmap VFIO region

2020-05-18 Thread Kirti Wankhede
This function will be used for migration region. Migration region is mmaped when migration starts and will be unmapped when migration is complete. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Cornelia Huck --- hw/vfio/common.c | 30

[PATCH QEMU v22 04/18] vfio: Add save and load functions for VFIO PCI devices

2020-05-18 Thread Kirti Wankhede
These functions save and restore PCI device specific data - config space of PCI device. Tested save and restore with MSI and MSIX type. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 163 ++

[PATCH QEMU v22 08/18] vfio: Register SaveVMHandlers for VFIO device

2020-05-18 Thread Kirti Wankhede
Define flags to be used as delimeter in migration file stream. Added .save_setup and .save_cleanup functions. Mapped & unmapped migration region from these functions at source during saving or pre-copy phase. Set VFIO device state depending on VM's state. During live migration, VM is running when

Re: [PATCH 12/24] MAINTAINERS: Make section PowerNV cover pci-host/pnv* as well

2020-05-18 Thread David Gibson
On Mon, May 18, 2020 at 07:03:56AM +0200, Markus Armbruster wrote: > Cc: Cédric Le Goater > Cc: David Gibson > Cc: qemu-...@nongnu.org > Signed-off-by: Markus Armbruster Acked-by: David Gibson > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MAINTAINERS

[PATCH v3] docs/s390x: document vfio-ccw

2020-05-18 Thread Cornelia Huck
Add a basic example for passing a dasd via vfio-ccw. Signed-off-by: Cornelia Huck --- v2->v3: moved uuid generation (Thomas) --- docs/system/s390x/vfio-ccw.rst | 77 ++ docs/system/target-s390x.rst | 1 + 2 files changed, 78 insertions(+) create mode 100644

Re: [PATCH] net: Do not include a newline in the id of -nic devices

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 9:43 AM, Thomas Huth wrote: The '\n' sneaked in by accident here, an "id" string should really not contain a newline character at the end. Fixes: 78cd6f7bf6b ('net: Add a new convenience option "--nic" ...') Signed-off-by: Thomas Huth --- net/net.c | 2 +- 1 file changed, 1

[PATCH Kernel v22 1/8] vfio: UAPI for migration interface for device state

2020-05-18 Thread Kirti Wankhede
- Defined MIGRATION region type and sub-type. - Defined vfio_device_migration_info structure which will be placed at the 0th offset of migration region to get/set VFIO device related information. Defined members of structure and usage on read/write access. - Defined device states and state

[PATCH Kernel v22 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu

2020-05-18 Thread Kirti Wankhede
Calculate and cache pgsize_bitmap when iommu->domain_list is updated and iommu->external_domain is set for mdev device. Add iommu->lock protection when cached pgsize_bitmap is accessed. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- drivers/vfio/vfio_iommu_type1.c | 88

[PATCH Kernel v22 2/8] vfio iommu: Remove atomicity of ref_count of pinned pages

2020-05-18 Thread Kirti Wankhede
vfio_pfn.ref_count is always updated while holding iommu->lock, using atomic variable is overkill. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Eric Auger Reviewed-by: Cornelia Huck --- drivers/vfio/vfio_iommu_type1.c | 9 + 1 file changed, 5 insertions(+), 4

Re: [PATCH v2 1/3] docs/s390x: document the virtual css

2020-05-18 Thread Cornelia Huck
On Sun, 17 May 2020 19:39:24 +0200 Thomas Huth wrote: > On 15/05/2020 17.15, Cornelia Huck wrote: > > Add some hints about "devno" rules. > > > > Signed-off-by: Cornelia Huck > > --- > > docs/system/s390x/css.rst| 86 > > docs/system/target-s390x.rst |

Re: [PATCH v2 3/3] docs/s390x: document vfio-ccw

2020-05-18 Thread Cornelia Huck
On Sun, 17 May 2020 19:52:43 +0200 Thomas Huth wrote: > On 15/05/2020 17.15, Cornelia Huck wrote: > > Add a basic example for passing a dasd via vfio-ccw. > > > > Signed-off-by: Cornelia Huck > > --- > > docs/system/s390x/vfio-ccw.rst | 72 ++ > >

[PATCH QEMU v22 12/18] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled

2020-05-18 Thread Kirti Wankhede
Signed-off-by: Kirti Wankhede --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index 52f1a4cd37f0..5b868fe5eab3 100644 --- a/memory.c +++ b/memory.c @@ -1788,7 +1788,7 @@ bool memory_region_is_ram_device(MemoryRegion *mr) uint8_t

[PATCH QEMU v22 15/18] vfio: Add vfio_listener_log_sync to mark dirty pages

2020-05-18 Thread Kirti Wankhede
vfio_listener_log_sync gets list of dirty pages from container using VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all devices are stopped and saving state. Return early for the RAM block section of mapped MMIO region. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia ---

[PATCH QEMU v22 16/18] vfio: Add ioctl to get dirty pages bitmap during dma unmap.

2020-05-18 Thread Kirti Wankhede
With vIOMMU, IO virtual address range can get unmapped while in pre-copy phase of migration. In that case, unmap ioctl should return pages pinned in that range and QEMU should find its correcponding guest physical addresses and report those dirty. Note: This patch is not yet tested. I'm trying to

[PATCH QEMU v22 07/18] vfio: Add migration state change notifier

2020-05-18 Thread Kirti Wankhede
Added migration state change notifier to get notification on migration state change. These states are translated to VFIO device state and conveyed to vendor driver. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 30 ++

Re: [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization"

2020-05-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200518051945.8621-1-arm...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization"

2020-05-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200518051945.8621-1-arm...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash export

[PATCH Kernel v22 0/8] Add UAPIs to support migration for VFIO devices

2020-05-18 Thread Kirti Wankhede
Hi, This patch set adds: * IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap with respect to IOMMU container rather than per device. All pages pinned by vendor driver through vfio_pin_pages external API has to be marked as dirty during migration. When IOMMU capable device is present

[PATCH Kernel v22 7/8] vfio iommu: Add migration capability to report supported features

2020-05-18 Thread Kirti Wankhede
Added migration capability in IOMMU info chain. User application should check IOMMU info chain for migration capability to use dirty page tracking feature provided by kernel module. User application must check page sizes supported and maximum dirty bitmap size returned by this capability structure

[PATCH Kernel v22 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages

2020-05-18 Thread Kirti Wankhede
Added a check such that only singleton IOMMU groups can pin pages. >From the point when vendor driver pins any pages, consider IOMMU group dirty page scope to be limited to pinned pages. To optimize to avoid walking list often, added flag pinned_page_dirty_scope to indicate if all of the

[PATCH QEMU v22 03/18] vfio: Add vfio_get_object callback to VFIODeviceOps

2020-05-18 Thread Kirti Wankhede
Hook vfio_get_object callback for PCI devices. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Suggested-by: Cornelia Huck Reviewed-by: Cornelia Huck --- hw/vfio/pci.c | 8 include/hw/vfio/vfio-common.h | 1 + 2 files changed, 9 insertions(+) diff --git

[PATCH QEMU v22 00/18] Add migration support for VFIO devices

2020-05-18 Thread Kirti Wankhede
Hi, This Patch set adds migration support for VFIO devices in QEMU. This Patch set include patches as below: Patch 1: - Define KABI for VFIO device for migration support for device state and newly added ioctl definations to get dirty pages bitmap. This is a placeholder patch. Patch 2-4: -

[PATCH QEMU v22 01/18] vfio: KABI for migration interface - Kernel header placeholder

2020-05-18 Thread Kirti Wankhede
Kernel header patches are being reviewed along with kernel side changes. This patch is only for place holder. This patch include all changes in vfio.h from above patch set Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- linux-headers/linux/vfio.h | 318

[PATCH QEMU v22 06/18] vfio: Add VM state change handler to know state of VM

2020-05-18 Thread Kirti Wankhede
VM state change handler gets called on change in VM's state. This is used to set VFIO device state to _RUNNING. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 87 +++ hw/vfio/trace-events | 2 +

[PATCH QEMU v22 17/18] vfio: Make vfio-pci device migration capable

2020-05-18 Thread Kirti Wankhede
If device is not failover primary device call vfio_migration_probe() and vfio_migration_finalize() functions for vfio-pci device to enable migration for vfio PCI device which support migration. Removed vfio_pci_vmstate structure. Removed migration blocker from VFIO PCI device specific structure

[PATCH QEMU v22 14/18] vfio: Add function to start and stop dirty pages tracking

2020-05-18 Thread Kirti Wankhede
Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking for VFIO devices. Signed-off-by: Kirti Wankhede --- hw/vfio/migration.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index

[PATCH QEMU v22 18/18] qapi: Add VFIO devices migration stats in Migration stats

2020-05-18 Thread Kirti Wankhede
Added amount of bytes transferred to the target VM by all VFIO devices Signed-off-by: Kirti Wankhede --- hw/vfio/common.c| 20 hw/vfio/migration.c | 10 +- include/qemu/vfio-helpers.h | 3 +++ migration/migration.c | 12

Re: [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization"

2020-05-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200518051945.8621-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200518051945.8621-1-arm...@redhat.com Subject: [PATCH not-for-merge 0/5] Instrumentation for "Fixes

Re: Onboard audio devices and -audiodev none

2020-05-18 Thread Gerd Hoffmann
On Mon, May 18, 2020 at 06:59:01AM +0200, Markus Armbruster wrote: > Gerd Hoffmann writes: > > > On Fri, May 15, 2020 at 09:06:20AM +0200, Markus Armbruster wrote: > >> Watch this: > >> > >> $ aarch64-softmmu/qemu-system-aarch64 -S -nodefaults -accel qtest > >> -display none -M

Re: Null-pointer dereference through virtio-balloon

2020-05-18 Thread David Hildenbrand
On 16.05.20 13:35, Philippe Mathieu-Daudé wrote: > +David (virtio-balloon maintainer) > > On Mon, May 11, 2020 at 6:42 AM Alexander Bulekov wrote: >> >> Hello, >> While fuzzing, I found an input that triggers a null-ptr dereference in >> aio_bh_enqueue, through virtio-balloon. Based on the

Re: [PATCH v2 0/3] s390x: improve documentation

2020-05-18 Thread Cornelia Huck
On Fri, 15 May 2020 17:15:15 +0200 Cornelia Huck wrote: > The documentation for the s390x system emulation target still has quite > a bit of room for improvement, so I started adding some device documentation. > > v1->v2: > - css.rst: added example for cssid == 0 (Thomas) > - css.rst: mention

[PATCH QEMU v22 11/18] iommu: add callback to get address limit IOMMU supports

2020-05-18 Thread Kirti Wankhede
Add optional method to get address limit IOMMU supports Signed-off-by: Kirti Wankhede --- hw/i386/intel_iommu.c | 9 + include/exec/memory.h | 18 ++ memory.c | 11 +++ 3 files changed, 38 insertions(+) diff --git a/hw/i386/intel_iommu.c

[PATCH QEMU v22 10/18] vfio: Add load state functions to SaveVMHandlers

2020-05-18 Thread Kirti Wankhede
Sequence during _RESUMING device state: While data for this device is available, repeat below steps: a. read data_offset from where user application should write data. b. write data of data_size to migration region from data_offset. c. write data_size which indicates vendor driver that data is

[PATCH QEMU v22 05/18] vfio: Add migration region initialization and finalize function

2020-05-18 Thread Kirti Wankhede
- Migration functions are implemented for VFIO_DEVICE_TYPE_PCI device in this patch series. - VFIO device supports migration or not is decided based of migration region query. If migration region query is successful and migration region initialization is successful then migration is

[PATCH QEMU v22 09/18] vfio: Add save state functions to SaveVMHandlers

2020-05-18 Thread Kirti Wankhede
Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy functions. These functions handles pre-copy and stop-and-copy phase. In _SAVING|_RUNNING device state or pre-copy phase: - read pending_bytes. If pending_bytes > 0, go through below steps. - read data_offset - indicates

[PATCH QEMU v22 13/18] vfio: Get migration capability flags for container

2020-05-18 Thread Kirti Wankhede
Added helper functions to get IOMMU info capability chain. Added function to get migration capability information from that capability chain for IOMMU container. Similar change was proposed earlier: https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg03759.html Signed-off-by: Kirti Wankhede

Re: [PATCH QEMU v22 00/18] Add migration support for VFIO devices

2020-05-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1589782398-24406-1-git-send-email-kwankh...@nvidia.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST

Re: [PATCH QEMU v22 00/18] Add migration support for VFIO devices

2020-05-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1589782398-24406-1-git-send-email-kwankh...@nvidia.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

[PATCH] net: Do not include a newline in the id of -nic devices

2020-05-18 Thread Thomas Huth
The '\n' sneaked in by accident here, an "id" string should really not contain a newline character at the end. Fixes: 78cd6f7bf6b ('net: Add a new convenience option "--nic" ...') Signed-off-by: Thomas Huth --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] net: use peer when purging queue in qemu_flush_or_purge_queue_packets()

2020-05-18 Thread Philippe Mathieu-Daudé
Hi Jason, On 5/18/20 5:34 AM, Jason Wang wrote: On 2020/5/11 下午12:21, Alexander Bulekov wrote: On 200511 1204, Jason Wang wrote: The sender of packet will be checked in the qemu_net_queue_purge() but we use NetClientState not its peer when trying to purge the incoming queue in

Re: [PATCH 21/24] sparc/leon3: Fix to put grlib,* devices on sysbus

2020-05-18 Thread Fred Konrad
Le 5/18/20 à 7:04 AM, Markus Armbruster a écrit : leon3_generic_hw_init() creates a "grlib,ahbpnp" and a "grlib,apbpnp" sysbus device in a way that leaves them unplugged. Create them the common way that puts them into the main system bus. Affects machine leon3_generic. Visible in "info

Re: [PATCH 02/24] display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge"

2020-05-18 Thread Fred Konrad
Le 5/18/20 à 7:03 AM, Markus Armbruster a écrit : xlnx_dp_init() creates these two devices, but they're never realized. Affects machine xlnx-zcu102. I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then we've always been missing these two

Re: Onboard audio devices and -audiodev none

2020-05-18 Thread Markus Armbruster
Gerd Hoffmann writes: > On Mon, May 18, 2020 at 06:59:01AM +0200, Markus Armbruster wrote: >> Gerd Hoffmann writes: >> >> > On Fri, May 15, 2020 at 09:06:20AM +0200, Markus Armbruster wrote: >> >> Watch this: >> >> >> >> $ aarch64-softmmu/qemu-system-aarch64 -S -nodefaults -accel qtest

[Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery

2020-05-18 Thread Philippe Mathieu-Daudé
The implementation could be similar to the temperature sensor interface proposed here: https://www.mail-archive.com/qemu-block@nongnu.org/msg65192.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1874676] Re: [Feature request] MDIO bus

2020-05-18 Thread Thomas Huth
** Changed in: qemu Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1874676 Title: [Feature request] MDIO bus Status in QEMU: New Bug description: Various

[Bug 1874678] Re: [Feature request] python-qemu package

2020-05-18 Thread Thomas Huth
** Changed in: qemu Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1874678 Title: [Feature request] python-qemu package Status in QEMU: New Bug description:

[Bug 1874674] Re: [Feature request] acceptance test class to run user-mode binaries

2020-05-18 Thread Thomas Huth
** Changed in: qemu Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1874674 Title: [Feature request] acceptance test class to run user-mode binaries Status in

[PATCH v1 3/3] virtio-balloon: unref the iothread when unrealizing

2020-05-18 Thread David Hildenbrand
We took a reference when realizing, so let's drop that reference when unrealizing. Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc: Wei Wang Cc: Alexander Duyck Cc: Michael S. Tsirkin Cc: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand ---

[PATCH v1 2/3] virtio-balloon: fix free page hinting check on unrealize

2020-05-18 Thread David Hildenbrand
Checking against guest features is wrong. We allocated data structures based on host features. We can rely on "free_page_bh" as an indicator whether to un-do stuff instead. Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc: Wei Wang Cc: Michael S. Tsirkin Cc: Philippe

Re: [PATCH v2 1/8] s390/sclp: get machine once during read scp/cpu info

2020-05-18 Thread David Hildenbrand
On 16.05.20 00:20, Collin Walling wrote: > Functions within read scp/cpu info will need access to the machine > state. Let's make a call to retrieve the machine state once and > pass the appropriate data to the respective functions. > > Signed-off-by: Collin Walling > --- > hw/s390x/sclp.c | 8

Re: [PATCH 11/24] pnv/phb4: Bury unwanted "pnv-phb4-pec-stack" devices

2020-05-18 Thread Greg Kurz
On Mon, 18 May 2020 07:03:55 +0200 Markus Armbruster wrote: > The number of stacks is controlled by property "num-stacks". > pnv_pec_instance_init() creates the maximum supported number, because > the property has not been set then. pnv_pec_realize() realizes only > the wanted number. Works,

Re: [PATCH 15/24] macio: Fix macio-bus to be a subtype of System bus

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 7:03 AM, Markus Armbruster wrote: The devices we plug into the macio-bus are all sysbus devices (DeviceClass member bus_type is TYPE_SYSTEM_BUS), but macio-bus does not derive from TYPE_SYSTEM_BUS. Fix that. "info qtree" now shows the devices' mmio ranges, as it should Cc: Mark

Re: [PATCH v2 6/8] s390/sclp: add extended-length sccb support for kvm guest

2020-05-18 Thread Janosch Frank
On 5/16/20 12:20 AM, Collin Walling wrote: > As more features and facilities are added to the Read SCP Info (RSCPI) > response, more space is required to store them. The space used to store > these new features intrudes on the space originally used to store CPU > entries. This means as more

Re: [PATCH 13/24] ppc4xx: Drop redundant device realization

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 7:03 AM, Markus Armbruster wrote: object_property_set_bool(OBJECT(dev), true, "realized", ...) right after qdev_init_nofail(dev) does nothing, because qdev_init_nofail() already realizes. Drop. Cc: BALATON Zoltan Signed-off-by: Markus Armbruster --- hw/ppc/ppc440_uc.c | 2 -- 1

Re: checkpatch error checking target arch in libvhost-user

2020-05-18 Thread Marc-André Lureau
Hi On Mon, May 18, 2020 at 3:37 AM Raphael Norwitz wrote: > Hey Marc-Andre, > > I'm working on a patchset with changes to libvhost-user. I'm hitting the > following checkpatch error: > > Checking 0011-Lift-max-ram-slots-limit-in-libvhost-user.patch... > WARNING: architecture specific defines

Re: [PATCH 20/24] riscv: Fix type of SiFive[EU]SocState, member parent_obj

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 7:04 AM, Markus Armbruster wrote: Device "riscv.sifive.e.soc" is a direct subtype of TYPE_DEVICE, but its instance struct SiFiveESoCState's member @parent_obj is SysBusDevice instead of DeviceState. Correct that. Same for "riscv.sifive.u.soc"'s instance struct SiFiveUSoCState. Cc:

Re: [PATCH v1 2/3] virtio-balloon: fix free page hinting check on unrealize

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 10:37 AM, David Hildenbrand wrote: Checking against guest features is wrong. We allocated data structures based on host features. We can rely on "free_page_bh" as an indicator whether to un-do stuff instead. Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc:

Re: [PATCH v1 0/3] virtio-balloon: free page hinting fixes

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 10:37 AM, David Hildenbrand wrote: Some fixes for VIRTIO_BALLOON_F_FREE_PAGE_HINT. First issue was reported by Alexander Bulekov [1], the other ones were discovered by me when digging into the details. [1] https://lkml.kernel.org/r/20200511044121.eihns2tdimdzg...@mozz.bu.edu David

Re: [PATCH v1 1/3] virtio-balloon: fix free page hinting without an iothread

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 10:37 AM, David Hildenbrand wrote: In case we don't have an iothread, we mark the feature as abscent but still add the queue. 'free_page_bh' remains set to NULL. qemu-system-i386 \ -M microvm \ -nographic \ -device virtio-balloon-device,free-page-hint=true

Re: [PATCH v1 3/3] virtio-balloon: unref the iothread when unrealizing

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 10:37 AM, David Hildenbrand wrote: We took a reference when realizing, so let's drop that reference when unrealizing. Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc: Wei Wang Cc: Alexander Duyck Cc: Michael S. Tsirkin Cc: Philippe Mathieu-Daudé

RE: [PATCH v5 0/6] colo-compare bugfixes

2020-05-18 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Friday, May 15, 2020 7:11 PM > To: qemu-devel > Cc: Zhang, Chen ; Li Zhijian > ; Jason Wang ; Marc- > André Lureau ; Paolo Bonzini > > Subject: [PATCH v5 0/6] colo-compare bugfixes > > Hello Everyone, > Here are fixes for bugs that I

[Bug 1837094] Re: UndefinedBehaviorSanitizer crash around slirp::ip_reass()

2020-05-18 Thread Philippe Mathieu-Daudé
Fixed in QEMU release v5.0.0 ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1837094 Title: UndefinedBehaviorSanitizer crash around

[PATCH] travis.yml: Use clang++ in the Clang tests

2020-05-18 Thread Thomas Huth
Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C compiler. Signed-off-by: Thomas Huth ---

[PATCH v1 0/3] virtio-balloon: free page hinting fixes

2020-05-18 Thread David Hildenbrand
Some fixes for VIRTIO_BALLOON_F_FREE_PAGE_HINT. First issue was reported by Alexander Bulekov [1], the other ones were discovered by me when digging into the details. [1] https://lkml.kernel.org/r/20200511044121.eihns2tdimdzg...@mozz.bu.edu David Hildenbrand (3): virtio-balloon: fix free page

Re: [PATCH v2 2/8] s390/sclp: check sccb len before filling in data

2020-05-18 Thread Janosch Frank
On 5/16/20 12:20 AM, Collin Walling wrote: > The SCCB must be checked for a sufficient length before it is filled > with any data. If the length is insufficient, then the SCLP command > is suppressed and the proper response code is set in the SCCB header. > > Fixes: 832be0d8a3bb ("s390x: sclp:

[PATCH v1 1/3] virtio-balloon: fix free page hinting without an iothread

2020-05-18 Thread David Hildenbrand
In case we don't have an iothread, we mark the feature as abscent but still add the queue. 'free_page_bh' remains set to NULL. qemu-system-i386 \ -M microvm \ -nographic \ -device virtio-balloon-device,free-page-hint=true \ -nographic \ -display none \

Re: [PATCH 07/24] auxbus: Fix aux-to-i2c-bridge to be a subtype of aux-slave

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 7:03 AM, Markus Armbruster wrote: We plug aux-to-i2c-bridge into the aux-bus, even though its DeviceClass member bus_type is null, not TYPE_AUX_BUS. Fix that by deriving it from TYPE_AUX_SLAVE instead of TYPE_DEVICE. Cc: KONRAD Frederic Signed-off-by: Markus Armbruster ---

Re: [PATCH 24/24] qdev: Assert onboard devices all get realized properly

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 7:04 AM, Markus Armbruster wrote: This would have caught some of the bugs I just fixed. Signed-off-by: Markus Armbruster --- hw/core/qdev.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 0df995eb94..fe2dea8968 100644

Re: [PATCH] travis.yml: Use clang++ in the Clang tests

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 10:33 AM, Thomas Huth wrote: Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-18 Thread Dima Stepanov
On Sat, May 16, 2020 at 11:20:03AM +0800, Li Feng wrote: > Hi, Dima. > This abort is what I have mentioned in my previous email. Yes, i understood it and this abort() message was fixed by the previous patch. But since we try new postphone approach this patch isn't working and we need to get the

Re: [PATCH v7 0/6] gpio: Add GPIO Aggregator

2020-05-18 Thread Linus Walleij
Hi Geert, I have queued this v7 patch set in an immutable branch for testing and also merged to my "devel" branch for testing. If all goes well it also hits linux-next soon. Yours, Linus Walleij

[Bug 1837094] Re: UndefinedBehaviorSanitizer crash around slirp::ip_reass()

2020-05-18 Thread Philippe Mathieu-Daudé
I apologize for not understanding this bug was a security issue, and not insisting on it. It has been fixed in SLiRP by "Fix use-afte-free in ip_reass() (CVE-2020-1983)": https://gitlab.freedesktop.org/slirp/libslirp/commit/9bd6c591 And in QEMU by commit 7769c23774 "slirp: update to fix

Re: [PATCH v7 3/6] gpiolib: Add support for GPIO lookup by line name

2020-05-18 Thread Linus Walleij
On Mon, May 11, 2020 at 4:53 PM Geert Uytterhoeven wrote: > Currently a GPIO lookup table can only refer to a specific GPIO by a > tuple, consisting of a GPIO controller label and a GPIO offset inside > the controller. > > However, a GPIO may also carry a line name, defined by DT or ACPI. > If

[PATCH] travis.yml: Use clang++ in the Clang tests

2020-05-18 Thread Thomas Huth
Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C compiler. Signed-off-by: Thomas Huth ---

Re: [PATCH] net: use peer when purging queue in qemu_flush_or_purge_queue_packets()

2020-05-18 Thread Jason Wang
On 2020/5/18 下午4:00, Philippe Mathieu-Daudé wrote: Hi Jason, On 5/18/20 5:34 AM, Jason Wang wrote: On 2020/5/11 下午12:21, Alexander Bulekov wrote: On 200511 1204, Jason Wang wrote: The sender of packet will be checked in the qemu_net_queue_purge() but we use NetClientState not its peer when

Re: [PATCH v2 3/8] s390/sclp: rework sclp boundary and length checks

2020-05-18 Thread Janosch Frank
On 5/16/20 12:20 AM, Collin Walling wrote: > Rework the SCLP boundary check to account for different SCLP commands > (eventually) allowing different boundary sizes. > > Move the length check code into a separate function, and introduce a > new function to determine the length of the read SCP data

Re: [PATCH 21/24] sparc/leon3: Fix to put grlib,* devices on sysbus

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 7:04 AM, Markus Armbruster wrote: leon3_generic_hw_init() creates a "grlib,ahbpnp" and a "grlib,apbpnp" sysbus device in a way that leaves them unplugged. Create them the common way that puts them into the main system bus. Affects machine leon3_generic. Visible in "info qtree":

Re: [PATCH v7 0/6] gpio: Add GPIO Aggregator

2020-05-18 Thread Geert Uytterhoeven
Hi Linus, On Mon, May 18, 2020 at 10:17 AM Linus Walleij wrote: > I have queued this v7 patch set in an immutable branch for testing and also > merged to my "devel" branch for testing. > > If all goes well it also hits linux-next soon. Thank a lot! Back to the QEMU side... Gr{oetje,eeting}s,

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-18 Thread Dima Stepanov
On Mon, May 18, 2020 at 10:52:08AM +0800, Jason Wang wrote: > > On 2020/5/16 上午11:20, Li Feng wrote: > >Hi, Dima. > >This abort is what I have mentioned in my previous email. > >I have triggered this crash without any fix a week ago. > >And I have written a test patch to let

RE: [PATCH 0/5] colo: Introduce resource agent and test suite/CI

2020-05-18 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Monday, May 11, 2020 8:27 PM > To: qemu-devel > Cc: Alberto Garcia ; Dr. David Alan Gilbert > ; Zhang, Chen > Subject: [PATCH 0/5] colo: Introduce resource agent and test suite/CI > > Hello Everyone, > These patches introduce a

Re: [PATCH 0/2] exec/memory: Enforce checking MemTxResult values

2020-05-18 Thread Peter Maydell
On Sun, 17 May 2020 at 17:48, Philippe Mathieu-Daudé wrote: > > Various places ignore the MemTxResult indicator of > transaction failed. Some cases might be justified > (DMA?) while other are probably bugs. To avoid > ignoring transaction errors, suggestion is to mark > functions returning

Re: Patch to fix missing Exec field in qemu.desktop

2020-05-18 Thread Daniel P . Berrangé
On Sat, May 16, 2020 at 02:42:47PM +, Victor Lavaud via wrote: > > > > Sent with ProtonMail Secure Email. > > From 207a1a34accdc5b563d29484292829a4193c35f8 Mon Sep 17 00:00:00 2001 > From: Victor Lavaud > Date: Sat, 16 May 2020 16:33:00 +0200 > Subject: [PATCH] Fix missing Exec field in

[PATCH 0/4] hw/arm: Replace hw_error() by qemu_log_mask()

2020-05-18 Thread Philippe Mathieu-Daudé
When fuzzing the devices, we don't want the whole process to exit calling hw_error(). Replace these calls by qemu_log_mask LOG_GUEST_ERROR/LOG_UNIMP when possible. Philippe Mathieu-Daudé (4): hw/arm/integratorcp: Replace hw_error() by qemu_log_mask() hw/arm/pxa2xx: Replace hw_error() by

[PATCH 2/4] hw/arm/pxa2xx: Replace hw_error() by qemu_log_mask()

2020-05-18 Thread Philippe Mathieu-Daudé
hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/pxa2xx_gpio.c| 7

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-18 Thread Dr. David Alan Gilbert
* Dima Stepanov (dimas...@yandex-team.ru) wrote: > On Mon, May 18, 2020 at 10:50:39AM +0800, Jason Wang wrote: > > > > On 2020/5/16 上午12:54, Dima Stepanov wrote: > > >On Thu, May 14, 2020 at 03:34:24PM +0800, Jason Wang wrote: > > >>On 2020/5/13 下午5:47, Dima Stepanov wrote: > > > case

[PATCH 4/4] hw/timer/exynos4210_mct: Replace hw_error() by qemu_log_mask()

2020-05-18 Thread Philippe Mathieu-Daudé
hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/exynos4210_mct.c |

Re: [PATCH 3/4] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask()

2020-05-18 Thread Edgar E. Iglesias
On Mon, May 18, 2020 at 11:52:02AM +0200, Philippe Mathieu-Daudé wrote: > hw_error() calls exit(). This a bit overkill when we can log > the accesses as unimplemented or guest error. > > When fuzzing the devices, we don't want the whole process to > exit. Replace some hw_error() calls by

Re: [PATCH v2 11/13] audio: deprecate -soundhw pcspk

2020-05-18 Thread Gerd Hoffmann
On Fri, May 15, 2020 at 05:08:23PM +0200, Ján Tomko wrote: > On a Friday in 2020, Gerd Hoffmann wrote: > > Add deprecation message to the audio init function. > > > > Factor out audio initialization and call that from > > both audio init and realize, so setting audiodev via > > -global is enough

Re: [RFC] Various questions about TCG implementation, DRM patches dealing with pointers over guest-host barrier.

2020-05-18 Thread Peter Maydell
On Mon, 18 May 2020 at 00:23, Catherine A. Frederick wrote: > Hi, I've been patching TCG for my own purposes recently and I was > wondering a few things. That being: > > - Is the TCG backend expected to handle bad cases for instructions? I > was wondering as I found a situation where a very large

Re: [PATCH 13/24] ppc4xx: Drop redundant device realization

2020-05-18 Thread BALATON Zoltan
On Mon, 18 May 2020, Markus Armbruster wrote: object_property_set_bool(OBJECT(dev), true, "realized", ...) right after qdev_init_nofail(dev) does nothing, because qdev_init_nofail() already realizes. Drop. Cc: BALATON Zoltan Shouldn't this Cc line come after the --- so it's not included in

Re: [PATCH v2 11/13] audio: deprecate -soundhw pcspk

2020-05-18 Thread Daniel P . Berrangé
On Mon, May 18, 2020 at 12:16:28PM +0200, Gerd Hoffmann wrote: > On Fri, May 15, 2020 at 05:08:23PM +0200, Ján Tomko wrote: > > On a Friday in 2020, Gerd Hoffmann wrote: > > > Add deprecation message to the audio init function. > > > > > > Factor out audio initialization and call that from > > >

Re: [PATCH 18/24] display/sm501 display/ati: Fix to realize "i2c-ddc"

2020-05-18 Thread BALATON Zoltan
On Mon, 18 May 2020, Markus Armbruster wrote: sm501_init() and ati_vga_realize() create an "i2c-ddc" device, but neglect to realize it. Affects machines sam460ex, shix, r2d, and fulong2e. I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then

Re: [PATCH 18/24] display/sm501 display/ati: Fix to realize "i2c-ddc"

2020-05-18 Thread Philippe Mathieu-Daudé
On 5/18/20 12:39 PM, BALATON Zoltan wrote: On Mon, 18 May 2020, Markus Armbruster wrote: sm501_init() and ati_vga_realize() create an "i2c-ddc" device, but neglect to realize it.  Affects machines sam460ex, shix, r2d, and fulong2e. I wonder how this ever worked.  If the "device becomes real

Re: [PATCH v1 0/3] virtio-balloon: free page hinting fixes

2020-05-18 Thread David Hildenbrand
On 18.05.20 11:20, Philippe Mathieu-Daudé wrote: > On 5/18/20 10:37 AM, David Hildenbrand wrote: >> Some fixes for VIRTIO_BALLOON_F_FREE_PAGE_HINT. First issue was reported by >> Alexander Bulekov [1], the other ones were discovered by me when digging >> into the details. >> >> [1]

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-18 Thread Dima Stepanov
On Mon, May 18, 2020 at 10:50:39AM +0800, Jason Wang wrote: > > On 2020/5/16 上午12:54, Dima Stepanov wrote: > >On Thu, May 14, 2020 at 03:34:24PM +0800, Jason Wang wrote: > >>On 2020/5/13 下午5:47, Dima Stepanov wrote: > > case CHR_EVENT_CLOSED: > > /* a close event may happen

[PATCH] hw/m68k/mcf52xx: Replace hw_error() by qemu_log_mask()

2020-05-18 Thread Philippe Mathieu-Daudé
hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daudé --- hw/m68k/mcf5206.c | 7

[PATCH 3/4] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask()

2020-05-18 Thread Philippe Mathieu-Daudé
hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daudé --- hw/char/xilinx_uartlite.c |

  1   2   3   4   5   >