[Qemu-devel] [Bug 1639394] [NEW] Unable to boot Solaris 8/9 x86 under Fedora 24

2016-11-04 Thread xtrondo
Public bug reported: qemu-system-x86_64 -version QEMU emulator version 2.6.2 (qemu-2.6.2-4.fc24), Copyright (c) 2003-2008 Fabrice Bellard Try several ways without success, I think it was a regression because problem seems to be related with ide fixed on 0.6.0: - int13 CDROM BIOS fix (aka Solari

Re: [Qemu-devel] [PATCH for-2.8] block: Don't mark node clean after failed flush

2016-11-04 Thread Denis V. Lunev
On 11/05/2016 02:03 AM, Kevin Wolf wrote: > Commit 3ff2f67a changed bdrv_co_flush() so that no flush is issues if > the image hasn't been dirtied since the last flush. This is not quite > correct: The condition should be that the image hasn't been dirtied > since the last _successful_ flush. This p

[Qemu-devel] [PATCH] RBD: Add support readv,writev for rbd

2016-11-04 Thread jazeltq
From: tianqing Rbd can do readv and writev directly, so wo do not need to transform iov to buf or vice versa any more. Signed-off-by: tianqing --- block/rbd.c | 124 1 file changed, 124 insertions(+) diff --git a/block/rbd.c b/block

[Qemu-devel] [PATCH] Add support readv,writev for rbd

2016-11-04 Thread jazeltq
From: tianqing Rbd can do readv, and writev, so wo do not need to transform iov to buf or vice versa any more. Signed-off-by: tianqing --- block/rbd.c | 124 1 file changed, 124 insertions(+) diff --git a/block/rbd.c b/block/rbd.c i

[Qemu-devel] [PATCH] Add support readv,writev for rbd

2016-11-04 Thread jazeltq
From: tianqing Rbd can do readv, and writev, so wo do not need to transform iov to buf or vice versa any more. Signed-off-by: tianqing --- block/rbd.c | 124 1 file changed, 124 insertions(+) diff --git a/block/rbd.c b/block/rbd.c i

[Qemu-devel] [PATCH v6 09/10] vmxnet3: remove unnecessary internal msix flag

2016-11-04 Thread Cao jin
Internal flag msix_used is unnecessary, it has the same effect as msix_enabled(). The corresponding msi flag is already dropped in commit 1070048e. CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Reviewed-by: Dmitry Fleytman Si

[Qemu-devel] [PATCH v6 08/10] vmxnet3: fix reference leak issue

2016-11-04 Thread Cao jin
On migration target, msix_vector_use() will be called in vmxnet3_post_load() in second time, without a matching second call to msi_vector_unuse(), which results in vector reference leak. CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Michael S. Tsirkin Reviewed-by: Markus Armbru

[Qemu-devel] [PATCH v6 07/10] megasas: undo the overwrites of msi user configuration

2016-11-04 Thread Cao jin
Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin --- hw/scsi/megasas.c | 7 +++ 1 file changed, 3

[Qemu-devel] [PATCH v6 00/10] Convert msix_init() to error

2016-11-04 Thread Cao jin
v6 changelog: 1. re-spin vfio-pci related code on patch 3: for -ENOTSUP, report & free Error, for other error, propagate the Error. (Marcel) CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Alex Williamso

[Qemu-devel] [PATCH v6 03/10] pci: Convert msix_init() to Error and fix callers to check it

2016-11-04 Thread Cao jin
msix_init() reports errors with error_report(), which is wrong when it's used in realize(). The same issue was fixed for msi_init() in commit 1108b2f. For some devices(like e1000e, vmxnet3) who won't fail because of msix_init's failure, suppress the error report by passing NULL error object. Bon

[Qemu-devel] [PATCH v6 04/10] megasas: change behaviour of msix switch

2016-11-04 Thread Cao jin
Resolve the TODO, msix=auto means msix on; if user specify msix=on, then device creation fail on msix_init failure. Also undo the overwrites of user configuration of msix. CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum Reviewed-by: Mar

[Qemu-devel] [PATCH v6 05/10] hcd-xhci: change behaviour of msix switch

2016-11-04 Thread Cao jin
Resolve the TODO, msix=auto means msix on; if user specify msix=on, then device creation fail on msix_init failure. CC: Gerd Hoffmann CC: Michael S. Tsirkin CC: Markus Armbruster CC: Marcel Apfelbaum Reviewed-by: Gerd Hoffmann Reviewed-by: Markus Armbruster Signed-off-by: Cao jin --- hw/u

[Qemu-devel] [PATCH v6 01/10] msix: Follow CODING_STYLE

2016-11-04 Thread Cao jin
CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin --- hw/pci/msix.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 0ec1cb1..0cee631 100644 --- a/hw/pci/msix.

[Qemu-devel] [PATCH v6 02/10] hcd-xhci: check & correct param before using it

2016-11-04 Thread Cao jin
usb_xhci_realize() corrects invalid values of property "intrs" automatically, but the uncorrected value is passed to msi_init(), which chokes on invalid values. Delay that until after the correction. Resources allocated by usb_xhci_init() are leaked when msi_init() fails. Fix by calling it after

[Qemu-devel] [PATCH v6 06/10] megasas: remove unnecessary megasas_use_msix()

2016-11-04 Thread Cao jin
Also move certain hunk above, to place msix init related code together. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin --- hw/scsi/megasas.c | 19 ++- 1 file chan

[Qemu-devel] [PATCH v6 10/10] msi_init: convert assert to return -errno

2016-11-04 Thread Cao jin
According to the disscussion: http://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg08215.html Let leaf function returns reasonable -errno, let caller decide how to handle the return value. Suggested-by: Markus Armbruster CC: Markus Armbruster CC: Michael S. Tsirkin CC: Marcel Apfelbaum

[Qemu-devel] [PATCH v1 1/1] cadence_uart: Check baud rate generator and divider values on migration

2016-11-04 Thread Alistair Francis
The Cadence UART device emulator calculates speed by dividing the baud rate by a 'baud rate generator' & 'baud rate divider' value. The device specification defines these register values to be non-zero and within certain limits. Checks were recently added when writing to these registers but not whe

Re: [Qemu-devel] virtio-serial guest agent channel timing requirements

2016-11-04 Thread Laszlo Ersek
On 11/04/16 23:18, Stefan Hajnoczi wrote: > On Fri, Nov 4, 2016 at 9:46 PM, Matt Broadstone wrote: >> I've progressed with creating my own agent, and have successfully been >> able to communicate over virtio-serial channels in order to provide >> two-way communication between hypervisor and guest.

Re: [Qemu-devel] Wiki documentation organization

2016-11-04 Thread Programmingkid
On Nov 4, 2016, at 6:32 PM, Paolo Bonzini wrote: > > > - Original Message - >> From: "Programmingkid" >> To: "Paolo Bonzini" , "qemu-devel qemu-devel" >> >> Sent: Friday, November 4, 2016 11:05:57 PM >> Subject: Wiki documentation organization >> >> It looks like the QEMU wiki is be

[Qemu-devel] [Bug 590552] Re: New default network card doesn't work with tap networking

2016-11-04 Thread Gabriele Tozzi
Thank you for your interest but after more than 6 years I can't even remember what this bug was about. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/590552 Title: New default network card doesn't w

[Qemu-devel] [PATCH for-2.8] block: Don't mark node clean after failed flush

2016-11-04 Thread Kevin Wolf
Commit 3ff2f67a changed bdrv_co_flush() so that no flush is issues if the image hasn't been dirtied since the last flush. This is not quite correct: The condition should be that the image hasn't been dirtied since the last _successful_ flush. This patch changes the logic accordingly. Without this

Re: [Qemu-devel] [QEMU PATCH] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Paolo Bonzini
> > But that's why separating the two cases brings us the best of both worlds. > > If migrating a paused guest, there's no need for any adjustment, so no > > advance_clock hack. If pausing at the end of migration, there's no need > > to pause kvmclock (this patch is effectively working around 00f4

Re: [Qemu-devel] Wiki documentation organization

2016-11-04 Thread Paolo Bonzini
- Original Message - > From: "Programmingkid" > To: "Paolo Bonzini" , "qemu-devel qemu-devel" > > Sent: Friday, November 4, 2016 11:05:57 PM > Subject: Wiki documentation organization > > It looks like the QEMU wiki is being organized into folders. I'm thinking the > page http://wiki.

Re: [Qemu-devel] [PULL v3 00/30] Misc patches for 2016-10-31

2016-11-04 Thread Eric Blake
On 11/04/2016 05:24 PM, Eric Blake wrote: > On 11/04/2016 05:02 PM, Max Reitz wrote: > >>> Eric Blake (16): >>> nbd: Add qemu-nbd -D for human-readable description >>> nbd: Treat flags vs. command type as separate fields >>> nbd: Rename NBDRequest to NBDRequestData >>> nbd:

Re: [Qemu-devel] [PULL v3 00/30] Misc patches for 2016-10-31

2016-11-04 Thread Eric Blake
On 11/04/2016 05:02 PM, Max Reitz wrote: >> Eric Blake (16): >> nbd: Add qemu-nbd -D for human-readable description >> nbd: Treat flags vs. command type as separate fields >> nbd: Rename NBDRequest to NBDRequestData >> nbd: Rename NbdClientSession to NBDClientSession >>

Re: [Qemu-devel] virtio-serial guest agent channel timing requirements

2016-11-04 Thread Stefan Hajnoczi
On Fri, Nov 4, 2016 at 9:46 PM, Matt Broadstone wrote: > I've progressed with creating my own agent, and have successfully been > able to communicate over virtio-serial channels in order to provide > two-way communication between hypervisor and guest. My problem now > seems to be related to _when_

[Qemu-devel] [Bug 1639225] Re: qcow2 - filesize 8.1Petabyte

2016-11-04 Thread Max Reitz
Well, that's too bad. At least it's non-fatal, which means that qemu will only refuse to read that single cluster (still, it will stop convert from working because that requires the whole image to be readable). So another idea would be to use qemu-nbd and the nbd kernel module to bind the image to

[Qemu-devel] Wiki documentation organization

2016-11-04 Thread Programmingkid
It looks like the QEMU wiki is being organized into folders. I'm thinking the page http://wiki.qemu.org/Documentation/Platforms/ should be a listing of all the platforms QEMU currently supports. The list would be links to their respective pages. Example: Platforms available in QEMU: ARM i386/x

Re: [Qemu-devel] [QEMU PATCH] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Marcelo Tosatti
On Fri, Nov 04, 2016 at 05:29:36PM -0400, Paolo Bonzini wrote: > > > >> No, the one that forced Marcelo to add the 10 minute limit to the > > >> advance_clock. We wouldn't need this advance_clock hack if we could > > >> just call KVM_GET_CLOCK like we did before 00f4d64ee76e ("kvmclock: > > >> cl

Re: [Qemu-devel] [PATCH v1 02/30] target-sparc: store cpu super- and hypervisor flags in TB

2016-11-04 Thread Richard Henderson
On 11/04/2016 02:50 PM, Artyom Tarasenko wrote: Suggested-by: Richard Henderson Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 17 + target-sparc/translate.c | 24 +++- 2 files changed, 36 insertions(+), 5 deletions(-) Reviewed-by: Richard

Re: [Qemu-devel] [PATCH v1 01/30] target-sparc: ignore MMU-faults if MMU is disabled in hypervisor mode

2016-11-04 Thread Richard Henderson
On 11/04/2016 02:50 PM, Artyom Tarasenko wrote: +if (is_exec) { /* XXX has_hypervisor */ +if (env->lsu & (IMMU_E)) { +cpu_raise_exception_ra(env, TT_CODE_ACCESS, GETPC()); +} else if (cpu_has_hypervisor(env) && !(env->hpstate & HS_PRIV)) { +cpu_raise_ex

Re: [Qemu-devel] [PULL v3 00/30] Misc patches for 2016-10-31

2016-11-04 Thread Max Reitz
On 02.11.2016 09:32, Paolo Bonzini wrote: > The following changes since commit 39542105bbb19c690219d2f22844d8dfbd9bba05: > > Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging > (2016-11-01 12:48:07 +) > > are available in the git repository at: > > git://github

[Qemu-devel] [PATCH v11 17/22] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-04 Thread Kirti Wankhede
Updated vfio_platform_common.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Id87cd6b78ae901610b39bf957974baa6f40cd7b0 --- drivers/vfio/platform/vfio_platform_common.c | 31 +++- 1 file changed, 8 inserti

[Qemu-devel] [PATCH v11 20/22] docs: Sysfs ABI for mediated device framework

2016-11-04 Thread Kirti Wankhede
Added details of sysfs ABI for mediated device framework Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Icb0fd4ed58a2fa793fbcb1c3d5009a4403c1f3ac --- Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ 1 file changed, 111 insertions(+) create mode 1

[Qemu-devel] [PATCH v11 18/22] vfio: Define device_api strings

2016-11-04 Thread Kirti Wankhede
Defined device API strings. Vendor driver using mediated device framework should use corresponding string for device_api attribute. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I42d29f475f02a7132ce13297fbf2b48f1da10995 --- include/uapi/linux/vfio.h | 10 ++ 1 file cha

[Qemu-devel] [PATCH v11 15/22] vfio: Introduce vfio_set_irqs_validate_and_prepare()

2016-11-04 Thread Kirti Wankhede
Vendor driver using mediated device framework would use same mechnism to validate and prepare IRQs. Introducing this function to reduce code replication in multiple drivers. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Ie201f269dda0713ca18a07dc4852500bd8b48309 --- drivers/vfi

[Qemu-devel] [PATCH v11 14/22] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-11-04 Thread Kirti Wankhede
Update msix_sparse_mmap_cap() to use vfio_info_add_capability() Update region type capability to use vfio_info_add_capability() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I52bb28c7875a6da5a79ddad1843e6088aff58a45 --- drivers/vfio/pci/vfio_pci.c | 49 ++--

[Qemu-devel] [PATCH v11 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-04 Thread Kirti Wankhede
Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers about DMA_UNMAP. Exported two APIs vfio_register_notifier() and vfio_unregister_notifier(). Notifier should be registered, if external user wants to use vfio_pin_pages()/vfio_unpin_pages() APIs to pin/unpin pages. Vendor driver

[Qemu-devel] [PATCH v11 10/22] vfio iommu type1: Add support for mediated devices

2016-11-04 Thread Kirti Wankhede
VFIO IOMMU drivers are designed for the devices which are IOMMU capable. Mediated device only uses IOMMU APIs, the underlying hardware can be managed by an IOMMU domain. Aim of this change is: - To use most of the code of TYPE1 IOMMU driver for mediated devices - To support direct assigned device

[Qemu-devel] [PATCH v11 08/22] vfio iommu type1: Add find_iommu_group() function

2016-11-04 Thread Kirti Wankhede
Add find_iommu_group() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I9d372f1ebe9eb01a5a21374b8a2b03f7df73601f --- drivers/vfio/vfio_iommu_type1.c | 58 - 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/drivers/vfio/vfio_

[Qemu-devel] [PATCH v11 07/22] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-11-04 Thread Kirti Wankhede
Update arguments of vaddr_get_pfn() to take struct mm_struct *mm as input argument. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I885fd4cd4a9f66f4ee2c1caf58267464ec239f52 --- drivers/vfio/vfio_iommu_type1.c | 30 +++--- 1 file changed, 23 insertions(+)

[Qemu-devel] [PATCH v11 21/22] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-11-04 Thread Kirti Wankhede
The Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mediated-device.txt | 103 ++- samples/vfio-mdev/Makefile | 13 + sampl

[Qemu-devel] [PATCH v11 06/22] vfio iommu type1: Update arguments of vfio_lock_acct

2016-11-04 Thread Kirti Wankhede
Updated arguments of vfio_lock_acct to take mm structure as input argument Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I5d3673cc9d3786bb436b395d5f74537f1a36da80 --- drivers/vfio/vfio_iommu_type1.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-)

[Qemu-devel] [PATCH v11 22/22] MAINTAINERS: Add entry VFIO based Mediated device drivers

2016-11-04 Thread Kirti Wankhede
Adding myself as a maintainer of mediated device framework, a sub module of VFIO. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I58f6717783e0d4008ca31f4a5c4494696bae8571 --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS inde

Re: [Qemu-devel] [QEMU PATCH] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Paolo Bonzini
> >> No, the one that forced Marcelo to add the 10 minute limit to the > >> advance_clock. We wouldn't need this advance_clock hack if we could > >> just call KVM_GET_CLOCK like we did before 00f4d64ee76e ("kvmclock: > >> clock should count only if vm is running"). > > > > There are two cases: >

[Qemu-devel] [PATCH v11 05/22] vfio iommu: Added pin and unpin callback functions to vfio_iommu_driver_ops

2016-11-04 Thread Kirti Wankhede
Added two new callback functions to struct vfio_iommu_driver_ops. Backend IOMMU module that supports pining and unpinning pages for mdev devices should provide these functions. Added APIs for pining and unpining pages to VFIO module. These calls back into backend iommu module to actually pin and un

[Qemu-devel] [PATCH v11 12/22] vfio: Add notifier callback to parent's ops structure of mdev

2016-11-04 Thread Kirti Wankhede
Add a notifier calback to parent's ops structure of mdev device so that per device notifer for vfio module is registered through vfio_mdev module. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637 --- drivers/vfio/mdev/vfio_mdev.c | 19 +++

[Qemu-devel] [PATCH v11 19/22] docs: Add Documentation for Mediated devices

2016-11-04 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d --- Documentation/vfio-mediated-device.txt | 298 + 1 file

[Qemu-devel] [PATCH v11 03/22] vfio: Rearrange functions to get vfio_group from dev

2016-11-04 Thread Kirti Wankhede
This patch rearranges functions to get vfio_group from device Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I1f93262bdbab75094bc24b087b29da35ba70c4c6 --- drivers/vfio/vfio.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/vf

[Qemu-devel] [PATCH v11 01/22] vfio: Mediated device Core driver

2016-11-04 Thread Kirti Wankhede
Design for Mediated Device Driver: Main purpose of this driver is to provide a common interface for mediated device management that can be used by different drivers of different devices. This module provides a generic interface to create the device, add it to mediated bus, add device to IOMMU grou

[Qemu-devel] [PATCH v11 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-04 Thread Kirti Wankhede
Add task structure to vfio_dma. Add address space structure. Each vfio_dma structure points to the address space of the task who mapped it. List of address spaces is maintained in vfio_iommu structure. >From DMA_MAP call if address space already exist in address space list, vfio_dma points to it. I

[Qemu-devel] [PATCH v11 16/22] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-04 Thread Kirti Wankhede
Updated vfio_pci.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I9f3daba89d8dba5cb5b01a8cff420412f30686c7 --- drivers/vfio/pci/vfio_pci.c | 34 +++--- 1 file changed, 7 insertions(+), 27 deletions(-)

[Qemu-devel] [PATCH v11 00/22] Add Mediated device support

2016-11-04 Thread Kirti Wankhede
This series adds Mediated device support to Linux host kernel. Purpose of this series is to provide a common interface for mediated device management that can be used by different devices. This series introduces Mdev core module that creates and manages mediated devices, VFIO based driver for media

[Qemu-devel] [PATCH v11 04/22] vfio: Common function to increment container_users

2016-11-04 Thread Kirti Wankhede
This change rearrange functions to have common function to increment container_users Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I8bdeb352bc8439b107ffd519480fd4dc238677f2 --- drivers/vfio/vfio.c | 34 +- 1 file changed, 21 insertions(+), 13 de

[Qemu-devel] [PATCH v1 30/30] target-sparc: fix up niagara machine

2016-11-04 Thread Artyom Tarasenko
Remove the Niagara stub implementation from sun4u.c and add a machine, compatible with Legion simulator from the OpenSPARC T1 project. The machine uses the firmware supplied with the OpenSPARC T1 project, http://download.oracle.com/technetwork/systems/opensparc/OpenSPARCT1_Arch.1.5.tar.bz2 in the

[Qemu-devel] [PATCH v11 13/22] vfio: Introduce common function to add capabilities

2016-11-04 Thread Kirti Wankhede
Vendor driver using mediated device framework should use vfio_info_add_capability() to add capabilities. Introduced this function to reduce code duplication in vendor drivers. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I6fca329fa2291f37a2c859d0bc97574d9e2ce1a6 --- drivers/v

[Qemu-devel] [PATCH v11 02/22] vfio: VFIO based driver for Mediated devices

2016-11-04 Thread Kirti Wankhede
vfio_mdev driver registers with mdev core driver. mdev core driver creates mediated device and calls probe routine of vfio_mdev driver for each device. Probe routine of vfio_mdev driver adds mediated device to VFIO core module This driver forms a shim layer that pass through VFIO devices operation

Re: [Qemu-devel] alpha platform is missing files after initrd load

2016-11-04 Thread Richard Henderson
On 11/04/2016 01:40 PM, Laszlo Ersek wrote: For the 4.7 kernel, we had enough ram to unpack the (large) initrd; with the 4.8 kernel, we ran out. The 4.8 kernel did in fact print an (obscure) error message to that effect, which had not been noticed. Was it Unpacking initramfs... Initramfs

[Qemu-devel] [PATCH v1 29/30] target-sparc: move common cpu initialisation routines to sparc64.c

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- hw/sparc64/Makefile.objs | 1 + hw/sparc64/sparc64.c | 378 + hw/sparc64/sun4u.c | 348 + hw/timer/sun4v-rtc.c | 2 +-

[Qemu-devel] [PATCH v1 24/30] target-sparc: add more registers to dump_mmu

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target-sparc/mmu_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c index fa70dc0..8b4664d 100644 --- a/target-sparc/mmu_helper.c +++ b/target-sparc/mmu_helper.c @

[Qemu-devel] [PATCH v1 28/30] target-sparc: implement sun4v RTC

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- MAINTAINERS | 6 +++ hw/timer/Makefile.objs | 2 + hw/timer/sun4v-rtc.c | 102 +++ include/hw/timer/sun4v-rtc.h | 1 + 4 files changed, 111 insertions(+) create mode 100644 hw/timer/s

[Qemu-devel] [PATCH v1 27/30] target-sparc: add ST_BLKINIT_ ASIs for UA2005+ CPUs

2016-11-04 Thread Artyom Tarasenko
In OpenSPARC T1+ TWINX ASIs in store instructions are aliased with Block Initializing Store ASIs. "UltraSPARC T1 Supplement Draft D2.1, 14 May 2007" describes them in the chapter "5.9 Block Initializing Store ASIs" Integer stores of all sizes are allowed with these ASIs. Signed-off-by: Artyom Ta

[Qemu-devel] [PATCH v1 21/30] target-sparc: simplify ultrasparc_tsb_pointer

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/ldst_helper.c | 51 ++ 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 4b8ca69..0447d4e 100644 --- a/target-sparc/ldst_helper.

[Qemu-devel] [PATCH v1 23/30] target-sparc: implement auto-demapping for UA2005 CPUs

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/ldst_helper.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 0447d4e..57b3b97 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -21

[Qemu-devel] [PATCH v1 25/30] target-sparc: implement UA2005 ASI_MMU (0x21)

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/ldst_helper.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 57b3b97..d34795a 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper

[Qemu-devel] [PATCH v1 19/30] target-sparc: use SparcV9MMU type for sparc64 I/D-MMUs

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- linux-user/main.c | 2 +- target-sparc/cpu.h | 48 +- target-sparc/ldst_helper.c | 8 target-sparc/machine.c | 4 ++-- 4 files changed, 25 insertions(+), 37 deletions(-) diff --git a/

[Qemu-devel] [PATCH v1 20/30] target-sparc: implement UA2005 TSB Pointers

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 2 + target-sparc/ldst_helper.c | 124 + 2 files changed, 104 insertions(+), 22 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 8ce7197..7b6565d 100644 --- a/tar

[Qemu-devel] [PATCH v1 13/30] target-sparc: implement UA2005 rdhpstate and wrhpstate instructions

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target-sparc/translate.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 68677d3..7e399a3 100644 --- a/target-sparc/translate.c +++ b/target-spa

[Qemu-devel] [PATCH v1 18/30] target-sparc: replace the last tlb entry when no free entries left

2016-11-04 Thread Artyom Tarasenko
Implement the behavior described in the chapter 13.9.11 of UltraSPARC T1™ Supplement to the UltraSPARC Architecture 2005: "If a TLB Data-In replacement is attempted with all TLB entries locked and valid, the last TLB entry (entry 63) is replaced." Signed-off-by: Artyom Tarasenko --- target-spar

[Qemu-devel] [PATCH v1 16/30] target-sparc: allow priveleged ASIs in hyperprivileged mode

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/ldst_helper.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 387732d..301616b 100644 --- a/target-sparc/ldst_helper.c +++ b/target-s

[Qemu-devel] [PATCH v1 22/30] target-sparc: allow 256M sized pages

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/mmu_helper.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c index 044e88c..fa70dc0 100644 --- a/target-sparc/mmu_helper.c +++ b/target-sparc/mmu_helper.c

[Qemu-devel] [PATCH v1 10/30] target-sparc: hypervisor mode takes over nucleus mode

2016-11-04 Thread Artyom Tarasenko
Accordinf to UA2005, 9.3.3 "Address Space Identifiers", "In hyperprivileged mode, all instruction fetches and loads and stores with implicit ASIs use a physical address, regardless of the value of TL". Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 4 ++-- target-sparc/translat

[Qemu-devel] [PATCH v1 11/30] target-sparc: implement UA2005 hypervisor traps

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 1 + target-sparc/int64_helper.c | 37 - target-sparc/win_helper.c | 6 ++ 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 4f

[Qemu-devel] [PATCH v1 12/30] target-sparc: implement UA2005 GL register

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.c | 13 ++--- target-sparc/cpu.h | 2 ++ target-sparc/helper.h | 1 + target-sparc/int64_helper.c | 6 ++ target-sparc/translate.c| 3 +-- target-sparc/win_helper.c | 40

[Qemu-devel] [PATCH v1 15/30] target-sparc: use direct address translation in hyperprivileged mode

2016-11-04 Thread Artyom Tarasenko
Please note that QEMU doesn't impelement Real->Physical address translation. The "Real Address" is always the "Physical Address". Suggested-by: Richard Henderson Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 7 +++ target-sparc/translate.c | 2 +- 2 files changed, 4 inserti

[Qemu-devel] [PATCH v1 08/30] target-sparc: implement UA2005 scratchpad registers

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/asi.h | 1 + target-sparc/cpu.h | 1 + target-sparc/ldst_helper.c | 24 3 files changed, 26 insertions(+) diff --git a/target-sparc/asi.h b/target-sparc/asi.h index c9a1849..d8d6284 100644 --- a/target-sp

[Qemu-devel] [PATCH v1 17/30] target-sparc: ignore writes to UA2005 CPU mondo queue register

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target-sparc/ldst_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 301616b..d524aaa 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.

[Qemu-devel] [PATCH v1 09/30] target-sparc: implement UltraSPARC-T1 Strand status ASR

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target-sparc/translate.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 0b0cde1..b898898 100644 --- a/target-sparc/translate.c +++ b/target-sparc/transla

[Qemu-devel] [PATCH v1 14/30] target-sparc: fix immediate UA2005 traps

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 7e399a3..23d4673 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -3298,7 +3298,7 @@ st

[Qemu-devel] [PATCH v1 05/30] target-sparc: add UltraSPARC T1 TLB #defines

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 4 1 file changed, 4 insertions(+) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index b41f5c5..f2e923d 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -336,6 +336,10 @@ enum { #define TTE_PGSIZE_UA2005(tte) ((

[Qemu-devel] [PATCH v1 07/30] target-sparc: simplify replace_tlb_entry by using TTE_PGSIZE

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target-sparc/ldst_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 043cbf8..68eca86 100644 --- a/target-sparc/ldst_helper.c +++ b/targ

[Qemu-devel] [PATCH v1 04/30] target-sparc: add UA2005 TTE bit #defines

2016-11-04 Thread Artyom Tarasenko
Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 17 + 1 file changed, 17 insertions(+) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 687e158..b41f5c5 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -304,19 +304,36 @@ enum { #define TTE_W_OK_BIT

[Qemu-devel] [PATCH v1 06/30] target-sparc: on UA2005 don't deliver Interrupt_level_n IRQs in hypervisor mode

2016-11-04 Thread Artyom Tarasenko
As described in Chapter 5.7.6 of the UltraSPARC Architecture 2005, outstanding disrupting exceptions that are destined for privileged mode can only cause a trap when the virtual processor is in nonprivileged or privileged mode and PSTATE.ie = 1. At all other times, they are held pending. Signed-o

[Qemu-devel] [PATCH v1 00/30] target-sparc: add niagara OpenSPARC T1 sun4v emulation

2016-11-04 Thread Artyom Tarasenko
This patch series adds a Niagara OpenSPARC T1 sun4v machine. The most important new feature: it can boot Solaris 10 / sparc64. The machine uses a firmware released by Sun as a part of the OpenSPARC project. The series are available under: https://github.com/artyom-tarasenko/qemu/tree/sun4v-v1 The

[Qemu-devel] [PATCH v1 02/30] target-sparc: store cpu super- and hypervisor flags in TB

2016-11-04 Thread Artyom Tarasenko
Suggested-by: Richard Henderson Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 17 + target-sparc/translate.c | 24 +++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index e0b2806..68e3

[Qemu-devel] [PATCH v1 03/30] target-sparc: use explicit mmu register pointers

2016-11-04 Thread Artyom Tarasenko
Use explicit register pointers while accessing D/I-MMU registers. Call cpu_unassigned_access on access to missing registers. Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson --- target-sparc/cpu.h | 4 +++ target-sparc/ldst_helper.c | 66 ++

[Qemu-devel] [PATCH v1 01/30] target-sparc: ignore MMU-faults if MMU is disabled in hypervisor mode

2016-11-04 Thread Artyom Tarasenko
while IMMU/DMMU is disabled - ignore MMU-faults in hypervisorv mode or if CPU doesn't have hypervisor - signal TT_INSN_REAL_TRANSLATION_MISS/TT_DATA_REAL_TRANSLATION_MISS otherwise Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 2 ++ target-sparc/ldst_helper.c | 15 +++

Re: [Qemu-devel] [QEMU PATCH] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Radim Krčmář
2016-11-04 16:29-0200, Marcelo Tosatti: > On Fri, Nov 04, 2016 at 06:34:20PM +0100, Radim Krčmář wrote: >> 2016-11-04 14:24-0200, Marcelo Tosatti: >> > On Fri, Nov 04, 2016 at 04:48:28PM +0100, Radim Krčmář wrote: >> >> 2016-11-04 16:33+0100, Paolo Bonzini: >> >> > On 04/11/2016 16:25, Radim Krčmář

Re: [Qemu-devel] alpha platform is missing files after initrd load

2016-11-04 Thread Laszlo Ersek
On 11/04/16 17:37, Richard Henderson wrote: > On 11/04/2016 05:08 AM, Stefan Hajnoczi wrote: >> On Thu, Oct 20, 2016 at 12:45:37PM +0200, Dennis Luehring wrote: >>> qemu: 2.7.x (git head) >>> platform: Alpha (Clipper) >> >> Two options: >> >> 1. Not many people use Alpha. You may need to debug thi

Re: [Qemu-devel] [PATCH] x86: Fix x86_64 'g' packet response to gdb from 32-bit mode.

2016-11-04 Thread Doug Evans
On Fri, Nov 4, 2016 at 12:01 PM, Pedro Alves wrote: > On 11/04/2016 04:34 PM, Peter Maydell wrote: >> On 4 November 2016 at 16:29, Richard Henderson wrote: >>> On 11/03/2016 05:35 PM, Doug Evans wrote: The remote protocol can't handle flipping back and forth between 32-bit and 64-b

Re: [Qemu-devel] [PATCH] x86: Fix x86_64 'g' packet response to gdb from 32-bit mode.

2016-11-04 Thread Pedro Alves
On 11/04/2016 04:34 PM, Peter Maydell wrote: > On 4 November 2016 at 16:29, Richard Henderson wrote: >> On 11/03/2016 05:35 PM, Doug Evans wrote: >>> >>> The remote protocol can't handle flipping back and forth >>> between 32-bit and 64-bit regs. To compensate, pretend "as if" >>> on 64-bit cpu wh

Re: [Qemu-devel] [QEMU PATCH v2] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Juan Quintela
Marcelo Tosatti wrote: > This patch, relative to pre-copy migration codepath, > measures the time between vm_stop() and pre_save(), > which includes copying the remaining RAM to destination, > and advances the clock by that amount. > > In a VM with 5 seconds downtime, this reduces the guest > cloc

Re: [Qemu-devel] [QEMU PATCH] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Marcelo Tosatti
On Fri, Nov 04, 2016 at 06:34:20PM +0100, Radim Krčmář wrote: > 2016-11-04 14:24-0200, Marcelo Tosatti: > > On Fri, Nov 04, 2016 at 04:48:28PM +0100, Radim Krčmář wrote: > >> 2016-11-04 16:33+0100, Paolo Bonzini: > >> > On 04/11/2016 16:25, Radim Krčmář wrote: > >> >>> > > >> >>> > +if (s

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-04 Thread Ketan Nilangekar
> On Nov 4, 2016, at 2:49 AM, Stefan Hajnoczi wrote: > >> On Thu, Oct 20, 2016 at 01:31:15AM +, Ketan Nilangekar wrote: >> 2. The idea of having multi-threaded epoll based network client was to drive >> more throughput by using multiplexed epoll implementation and (fairly) >> distributing

Re: [Qemu-devel] [QEMU PATCH] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Marcelo Tosatti
On Fri, Nov 04, 2016 at 06:39:18PM +0100, Radim Krčmář wrote: > 2016-11-04 15:07-0200, Marcelo Tosatti: > > On Fri, Nov 04, 2016 at 04:25:23PM +0100, Radim Krčmář wrote: > >> > +/* > >> > + * Transition from VM-running to VM-stopped via migration? > >> > + * Record when the

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-04 Thread Ketan Nilangekar
> On Nov 4, 2016, at 2:52 AM, Stefan Hajnoczi wrote: > >> On Thu, Oct 20, 2016 at 01:31:15AM +, Ketan Nilangekar wrote: >> 2. The idea of having multi-threaded epoll based network client was to drive >> more throughput by using multiplexed epoll implementation and (fairly) >> distributing

[Qemu-devel] [Bug 1639225] Re: qcow2 - filesize 8.1Petabyte

2016-11-04 Thread minecraft7net
# qemu-img convert -f qcow2 -O qcow2 vsys19_ssd1.qcow2 1.qcow2 qcow2: Image is corrupt: Data cluster offset 0x10001091b0400 unaligned (L2 offset: 0x1000e, L2 index: 0x90c); further non-fatal corruption events will be suppressed -- You received this bug notification because you are a member

[Qemu-devel] [Bug 1639322] [NEW] pasting into ppc64 serial console kills qemu

2016-11-04 Thread Michal Suchanek
Public bug reported: - run qemu-system-ppc64 - when X window appears press Ctrl+Alt+3 - paste any text longer than 16 characters qemu-system-ppc64: /home/abuild/rpmbuild/BUILD/qemu-2.6.1/hw/char/spapr_vty.c:40: vty_receive: Assertion `(dev->in - dev->out) < 16' failed. Aborted (core dumped) B

Re: [Qemu-devel] [PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info

2016-11-04 Thread Dave Hansen
Please squish this and patch 5 together. It makes no sense to separate them. > +static void send_unused_pages_info(struct virtio_balloon *vb, > + unsigned long req_id) > +{ > + struct scatterlist sg_in; > + unsigned long pfn = 0, bmap_len, pfn_limit, last_pfn,

Re: [Qemu-devel] [QEMU PATCH] kvmclock: advance clock by time window between vm_stop and pre_save

2016-11-04 Thread Radim Krčmář
2016-11-04 15:07-0200, Marcelo Tosatti: > On Fri, Nov 04, 2016 at 04:25:23PM +0100, Radim Krčmář wrote: >> > +/* >> > + * Transition from VM-running to VM-stopped via migration? >> > + * Record when the VM was stopped. >> > + */ >> > + >> > +if (state == RUN_

  1   2   3   >