[Qemu-devel] [PATCH qemu v16 05/19] vfio: Check that IOMMU MR translates to system address space

2016-05-04 Thread Alexey Kardashevskiy
At the moment IOMMU MR only translate to the system memory. However if some new code changes this, we will need clear indication why it is not working so here is the check. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- Changes: v15: * added some spaces v14: * new to the seri

[Qemu-devel] [PATCH qemu v16 12/19] spapr_pci: Reset DMA config on PHB reset

2016-05-04 Thread Alexey Kardashevskiy
LoPAPR dictates that during system reset all DMA windows must be removed and the default DMA32 window must be created so does the patch. At the moment there is just one window supported so no change in behaviour is expected. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- hw/

[Qemu-devel] [PATCH qemu v16 02/19] memory: Call region_del() callbacks on memory listener unregistering

2016-05-04 Thread Alexey Kardashevskiy
When a new memory listener is registered, listener_add_address_space() is called and which in turn calls region_add() callbacks of memory regions. However when unregistering the memory listener, it is just removed from the listening chain and no region_del() is called. This adds listener_del_addre

[Qemu-devel] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release

2016-05-04 Thread Alexey Kardashevskiy
This postpones VFIO container deinitialization to let region_del() callbacks (called via vfio_listener_release) do proper clean up while the group is still attached to the container. Signed-off-by: Alexey Kardashevskiy --- hw/vfio/common.c | 22 +++--- 1 file changed, 15 insertio

[Qemu-devel] [PATCH qemu v16 08/19] spapr_iommu: Introduce "enabled" state for TCE table

2016-05-04 Thread Alexey Kardashevskiy
Currently TCE tables are created once at start and their sizes never change. We are going to change that by introducing a Dynamic DMA windows support where DMA configuration may change during the guest execution. This changes spapr_tce_new_table() to create an empty zero-size IOMMU memory region (

[Qemu-devel] [PATCH qemu v16 17/19] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO

2016-05-04 Thread Alexey Kardashevskiy
The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - a guest view of the table and a hardware TCE table. If there is no VFIO presense in the address space, then just the guest view is used, if this is the case, it is allocated in the KVM. However since there is no support yet for VFIO

[Qemu-devel] [PATCH qemu v16 04/19] vmstate: Define VARRAY with VMS_ALLOC

2016-05-04 Thread Alexey Kardashevskiy
This allows dynamic allocation for migrating arrays. Already existing VMSTATE_VARRAY_UINT32 requires an array to be pre-allocated, however there are cases when the size is not known in advance and there is no real need to enforce it. This defines another variant of VMSTATE_VARRAY_UINT32 with WMS_

[Qemu-devel] [PATCH qemu v16 11/19] spapr_iommu: Add root memory region

2016-05-04 Thread Alexey Kardashevskiy
We are going to have multiple DMA windows at different offsets on a PCI bus. For the sake of migration, we will have as many TCE table objects pre-created as many windows supported. So we need a way to map windows dynamically onto a PCI bus when migration of a table is completed but at this stage a

[Qemu-devel] [PATCH qemu v16 18/19] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)

2016-05-04 Thread Alexey Kardashevskiy
New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window management. This adds ability to VFIO common code to dynamically allocate/remove DMA windows in the host kernel when new VFIO container is added/removed. This adds VFIO_IOMMU_SPAPR_TCE_CREATE ioctl to vfio_listener_region_add and adds ju

[Qemu-devel] [PATCH qemu v16 14/19] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2)

2016-05-04 Thread Alexey Kardashevskiy
This makes use of the new "memory registering" feature. The idea is to provide the userspace ability to notify the host kernel about pages which are going to be used for DMA. Having this information, the host kernel can pin them all once per user process, do locked pages accounting (once) and not s

[Qemu-devel] [PATCH qemu v16 06/19] spapr_pci: Use correct DMA LIOBN when composing the device tree

2016-05-04 Thread Alexey Kardashevskiy
The user could have picked LIOBN via the CLI but the device tree rendering code would still use the value derived from the PHB index (which is the default fallback if LIOBN is not set in the CLI). This replaces SPAPR_PCI_LIOBN() with the actual DMA LIOBN value. Signed-off-by: Alexey Kardashevskiy

[Qemu-devel] [PATCH qemu v16 03/19] memory: Fix IOMMU replay base address

2016-05-04 Thread Alexey Kardashevskiy
Since a788f227 "memory: Allow replay of IOMMU mapping notifications" when new VFIO listener is added, all existing IOMMU mappings are replayed. However there is a problem that the base address of an IOMMU memory region (IOMMU MR) is ignored which is not a problem for the existing user (which is pse

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-04 Thread David Kiarie
On Wed, May 4, 2016 at 9:12 AM, Jan Kiszka wrote: > On 2016-04-30 00:42, David Kiarie wrote: >> These series adds AMD IOMMU support to Qemu. It's currently in the 9th >> version. >> >> In this series I have (hopefully) addressed all the comments made in the >> previous version. >> I have also te

[Qemu-devel] [PATCH qemu v16 19/19] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-05-04 Thread Alexey Kardashevskiy
This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specification which allows to have additional DMA window(s) The "ddw" property is enabled by default on a PHB but for compatibility the pseries-2.5 machine (TODO: update version) and older disable it. This also creates a s

[Qemu-devel] [PATCH qemu v16 15/19] spapr_pci: Add and export DMA resetting helper

2016-05-04 Thread Alexey Kardashevskiy
This will be later used by the "ibm,reset-pe-dma-window" RTAS handler which resets the DMA configuration to the defaults. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- hw/ppc/spapr_pci.c | 10 -- include/hw/pci-host/spapr.h | 2 ++ 2 files changed, 10 inser

[Qemu-devel] [PATCH qemu v16 07/19] spapr_iommu: Move table allocation to helpers

2016-05-04 Thread Alexey Kardashevskiy
At the moment presence of vfio-pci devices on a bus affect the way the guest view table is allocated. If there is no vfio-pci on a PHB and the host kernel supports KVM acceleration of H_PUT_TCE, a table is allocated in KVM. However, if there is vfio-pci and we do yet not KVM acceleration for these,

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-04 Thread Jan Kiszka
On 2016-05-04 09:05, David Kiarie wrote: > On Wed, May 4, 2016 at 9:12 AM, Jan Kiszka wrote: >> On 2016-04-30 00:42, David Kiarie wrote: >>> These series adds AMD IOMMU support to Qemu. It's currently in the 9th >>> version. >>> >>> In this series I have (hopefully) addressed all the comments mad

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-04 Thread Valentine Sinitsyn
Hi everyone, On 04.05.2016 12:05, David Kiarie wrote: On Wed, May 4, 2016 at 9:12 AM, Jan Kiszka wrote: On 2016-04-30 00:42, David Kiarie wrote: These series adds AMD IOMMU support to Qemu. It's currently in the 9th version. In this series I have (hopefully) addressed all the comments made i

Re: [Qemu-devel] [V9 2/4] hw/i386: ACPI table for AMD IOMMU

2016-05-04 Thread Valentine Sinitsyn
On 29.04.2016 11:09, Jan Kiszka wrote: On 2016-04-25 00:12, David Kiarie wrote: Add IVRS table for AMD IOMMU. Generate IVRS or DMAR depending on emulated IOMMU It seems you lack scope descriptions for the PCI devices in the system. At least, this is what our jailhouse config generator complain

Re: [Qemu-devel] [V9 2/4] hw/i386: ACPI table for AMD IOMMU

2016-05-04 Thread Valentine Sinitsyn
On 29.04.2016 13:28, David Kiarie wrote: On Fri, Apr 29, 2016 at 9:09 AM, Jan Kiszka wrote: On 2016-04-25 00:12, David Kiarie wrote: Add IVRS table for AMD IOMMU. Generate IVRS or DMAR depending on emulated IOMMU It seems you lack scope descriptions for the PCI devices in the system. At le

Re: [Qemu-devel] [PATCH COLO-Frame v16 32/35] net: Add notifier/callback for netdev init

2016-05-04 Thread Hailiang Zhang
On 2016/4/26 14:48, Jason Wang wrote: On 04/08/2016 02:26 PM, zhanghailiang wrote: We can register some callback for this notifier, this will be used by COLO to register a callback which will add each netdev a buffer filter. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang ---

Re: [Qemu-devel] [PATCH COLO-Frame v16 33/35] COLO/filter: add each netdev a buffer filter

2016-05-04 Thread Hailiang Zhang
On 2016/4/26 14:58, Jason Wang wrote: On 04/08/2016 02:26 PM, zhanghailiang wrote: For COLO periodic mode, it need to buffer packets that sent by VM, and we will not release these packets until finish a checkpoint. Here, we add each netdev a buffer-filter that will be controlled by COLO. It i

Re: [Qemu-devel] [PATCH v2 2/2] xen: add pvUSB backend

2016-05-04 Thread Juergen Gross
On 03/05/16 17:06, Anthony PERARD wrote: > On Thu, Mar 10, 2016 at 04:19:30PM +0100, Juergen Gross wrote: >> Add a backend for para-virtualized USB devices for xen domains. >> >> The backend is using host-libusb to forward USB requests from a >> domain via libusb to the real device(s) passed throug

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Eric Blake (ebl...@redhat.com) wrote: >> On 05/03/2016 06:26 AM, Markus Armbruster wrote: >> >> >>> +visit_type_int(vmdesc, "size", &size, &error_abort); >> >>> +visit_start_list(vmdesc, "fields", NULL, 0, &error_abort); >> >>> +visit_

Re: [Qemu-devel] [PATCH] Modify net/socket.c to use functions from include/qemu/sockets.h

2016-05-04 Thread Daniel P. Berrange
On Tue, May 03, 2016 at 11:43:58PM +0530, Ashi wrote: > > > On Tuesday 03 May 2016 07:31 PM, Daniel P. Berrange wrote: > >On Tue, May 03, 2016 at 07:04:17PM +0530, Ashijeet Acharya wrote: > >>From: Ashijeet > >> > >>Replaced connect()/listen()/parse_host_port() in net/socket.c > >>with inet_conn

Re: [Qemu-devel] [PATCH 2/5] migration: Fix a potential issue

2016-05-04 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: > At the end of live migration and before vm_start() on the destination > side, we should make sure all the decompression tasks are finished, if > this can not be guaranteed, the VM may get the incorrect memory data, > or the updated memory may be overwritte

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Eric Blake (ebl...@redhat.com) wrote: > >> On 05/03/2016 06:26 AM, Markus Armbruster wrote: > >> > >> >>> +visit_type_int(vmdesc, "size", &size, &error_abort); > >> >>> +visit_start_list(vmd

Re: [Qemu-devel] [PATCH] migration: Fix multi-thread compression bug

2016-05-04 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Liang Li (liang.z...@intel.com) wrote: >> Recently, a bug related to multiple thread compression feature for >> live migration is reported. The destination side will be blocked >> during live migration if there are heavy workload in host and >> memory intensive

Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin.

2016-05-04 Thread Peter Maydell
On 4 May 2016 at 01:07, Christopher Friedt wrote: > > On May 3, 2016 9:50 AM, "Christopher Friedt" wrote: >> >> On Tue, May 3, 2016 at 3:06 AM, Richard Henderson wrote: >> > On 05/02/2016 03:10 PM, Christopher Friedt wrote: >> >> >> >> %.a: >> >> +ifdef CONFIG_DARWIN >> >> + $(call quiet-

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert" writes: >> >> > * Eric Blake (ebl...@redhat.com) wrote: >> > >> >> -static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *se, >> >> QJSON *vmdesc) >> >> +static void vmstate_

Re: [Qemu-devel] [PATCH] migration: Fix multi-thread compression bug

2016-05-04 Thread Juan Quintela
Liang Li wrote: > Recently, a bug related to multiple thread compression feature for > live migration is reported. The destination side will be blocked > during live migration if there are heavy workload in host and > memory intensive workload in guest, this is most likely to happen > when there i

Re: [Qemu-devel] [PATCH 2/5] migration: Fix a potential issue

2016-05-04 Thread Juan Quintela
Liang Li wrote: > At the end of live migration and before vm_start() on the destination > side, we should make sure all the decompression tasks are finished, if > this can not be guaranteed, the VM may get the incorrect memory data, > or the updated memory may be overwritten by the decompression t

Re: [Qemu-devel] [PATCH 3/5] migration: remove useless code

2016-05-04 Thread Juan Quintela
Liang Li wrote: > page_buffer is set twice repeatedly, remove the previous set. > > Signed-off-by: Liang Li > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > "git-grep assert migration" suggests you do kill the source on certain > programming errors. I'm just trying hard to reduce them; I know I'm not there, but I'd rather we didn't have any - especially on the source

Re: [Qemu-devel] [PATCH RFC 0/8] basic vfio-ccw infrastructure

2016-05-04 Thread Dong Jia
On Fri, 29 Apr 2016 11:17:35 -0600 Alex Williamson wrote: Dear Alex: Thanks for the comments. [...] > > > > The user of vfio-ccw is not limited to Qemu, while Qemu is definitely a > > good example to get understand how these patches work. Here is a little > > bit more detail how an I/O reques

Re: [Qemu-devel] [PATCH 4/5] qemu-file: Fix qemu_put_compression_data flaw

2016-05-04 Thread Juan Quintela
Liang Li wrote: > Current qemu_put_compression_data can only work with no writable > QEMUFile, and can't work with the writable QEMUFile. But it does > not provide any measure to prevent users from using it with a > writable QEMUFile. > > We should fix this flaw to make it works with writable QEMU

Re: [Qemu-devel] [PATCH v4 13/14] tb hash: track translated blocks with qht

2016-05-04 Thread Alex Bennée
Richard Henderson writes: > On 05/03/2016 07:26 AM, Emilio G. Cota wrote: >> On Tue, May 03, 2016 at 08:36:35 +0100, Alex Bennée wrote: >>> Emilio G. Cota writes: static TranslationBlock *tb_find_physical(CPUState *cpu, target_ulong pc,

Re: [Qemu-devel] [PATCH 5/5] migration: refine ram_save_compressed_page

2016-05-04 Thread Juan Quintela
Liang Li wrote: > Use qemu_put_compression_data to do the compression directly > instead of using do_compress_ram_page, avoid some data copy. > very small improvement, at the same time, add code to check > if the compression is successful. > > Signed-off-by: Liang Li > --- > migration/ram.c | 28

[Qemu-devel] [PATCH] gdbstub: set listen backlog to 1

2016-05-04 Thread Peter Wu
Avoid possible connection drops on Linux (when tcp_syncookies is disabled) or fallbacks to SYN cookies with the following kernel warning: TCP: request_sock_TCP: Possible SYN flooding on port 1234. Sending cookies. Check SNMP counters. Since Linux 4.4 (ef547f2ac16b "tcp: remove max_qlen_log"

[Qemu-devel] [PATCH 05/14] stream: Use BlockBackend for I/O

2016-05-04 Thread Kevin Wolf
This changes the streaming block job to use the job's BlockBackend for performing the COR reads. job->bs isn't used by the streaming code any more afterwards. Signed-off-by: Kevin Wolf --- block/block-backend.c | 15 +++ block/io.c | 9 - block/s

[Qemu-devel] [PATCH 03/14] block: Default to enabled write cache in blk_new()

2016-05-04 Thread Kevin Wolf
The existing users of the function are: 1. blk_new_open(), which already enabled the write cache 2. Some test cases that don't care about the setting 3. blockdev_init() for empty drives, where the cache mode is overridden with the value from the options when a medium is inserted Therefore, thi

[Qemu-devel] [PATCH 06/14] mirror: Allow target that already has a BlockBackend

2016-05-04 Thread Kevin Wolf
We had to forbid mirroring to a target BDS that already had a BB attached because the node swapping at job completion would add a second BB and we didn't support multiple BBs on a single BDS at the time. Now we do, so we can lift the restriction. As we allow additional BlockBackends for the target

[Qemu-devel] [PATCH 01/14] block: keep a list of block jobs

2016-05-04 Thread Kevin Wolf
From: Alberto Garcia The current way to obtain the list of existing block jobs is to iterate over all root nodes and check which ones own a job. Since we want to be able to support block jobs in other nodes as well, this patch keeps a list of jobs that is updated every time one is created or des

[Qemu-devel] [PATCH 00/14] block jobs: Convert I/O to BlockBackend

2016-05-04 Thread Kevin Wolf
This series changes the block jobs so that they have a separate BlockBackend for every node on which they perform I/O. This doesn't only get us closer to the goal of only doing I/O through blk_*() from external sources (and block jobs are considered external), but can also later be used to use Bloc

[Qemu-devel] [PATCH 04/14] block: Convert block job core to BlockBackend

2016-05-04 Thread Kevin Wolf
This adds a new BlockBackend field to the BlockJob struct, which coexists with the BlockDriverState while converting the individual jobs. When creating a block job, a new BlockBackend is created on top of the given BlockDriverState, and it is destroyed when the BlockJob ends. The reference to the

[Qemu-devel] [PATCH 10/14] backup: Remove bs parameter from backup_do_cow()

2016-05-04 Thread Kevin Wolf
Now that we pass the job to the function, bs is implied by that. Signed-off-by: Kevin Wolf --- block/backup.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/block/backup.c b/block/backup.c index a57288f..670ba50 100644 --- a/block/backup.c +++ b/block/backup.c

[Qemu-devel] [PATCH 08/14] backup: Don't leak BackupBlockJob in error path

2016-05-04 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/backup.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/backup.c b/block/backup.c index fec45e8..a990cf1 100644 --- a/block/backup.c +++ b/block/backup.c @@ -485,6 +485,7 @@ void backup_start(BlockDriverState *bs, BlockDriverSt

[Qemu-devel] [PATCH 02/14] block: Cancel jobs first in bdrv_close_all()

2016-05-04 Thread Kevin Wolf
So far, bdrv_close_all() first removed all root BlockDriverStates of BlockBackends and monitor owned BDSes, and then assumed that the remaining BDSes must be related to jobs and cancelled these jobs. This order doesn't work that well any more when block jobs use BlockBackends internally because th

[Qemu-devel] [PATCH 11/14] block: Add blk_co_readv/writev()

2016-05-04 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 26 ++ include/sysemu/block-backend.h | 4 trace-events | 2 ++ 3 files changed, 32 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 25bb5ca..8dc3aa5 1006

[Qemu-devel] [PATCH 09/14] backup: Pack Notifier within BackupBlockJob

2016-05-04 Thread Kevin Wolf
From: John Snow Instead of relying on peeking at bs->job, we want to explicitly get a reference to the job that was involved in this notifier callback. Pack the Notifier inside of the BackupBlockJob so we can use container_of to get a reference back to the BackupBlockJob object. This cuts out o

[Qemu-devel] [PATCH 12/14] backup: Use BlockBackend for I/O

2016-05-04 Thread Kevin Wolf
This changes the backup block job to use the job's BlockBackend for performing its I/O. job->bs isn't used by the backup code any more afterwards. Signed-off-by: Kevin Wolf --- block/backup.c | 42 ++ block/block-backend.c | 14 +++

[Qemu-devel] [PATCH 14/14] blockjob: Remove BlockJob.bs

2016-05-04 Thread Kevin Wolf
There is a single remaining user in qemu-img, which can be trivially converted to using BlockJob.blk instead. Signed-off-by: Kevin Wolf --- blockjob.c | 1 - include/block/blockjob.h | 1 - qemu-img.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 13/14] commit: Use BlockBackend for I/O

2016-05-04 Thread Kevin Wolf
This changes the commit block job to use the job's BlockBackend for performing its I/O. job->bs isn't used by the commit code any more afterwards. Signed-off-by: Kevin Wolf --- block/commit.c | 42 +++--- 1 file changed, 27 insertions(+), 15 deletions(-) diff

[Qemu-devel] [PATCH 07/14] mirror: Use BlockBackend for I/O

2016-05-04 Thread Kevin Wolf
This changes the mirror block job to use the job's BlockBackend for performing its I/O. job->bs isn't used by the mirroring code any more afterwards. Signed-off-by: Kevin Wolf --- block/mirror.c | 75 +++--- blockdev.c | 4 +--- 2 files ch

Re: [Qemu-devel] [Qemu-block] [PATCH v4] block: always compile-check debug prints

2016-05-04 Thread Kevin Wolf
Am 29.04.2016 um 07:12 hat Zhou Jie geschrieben: > Files with conditional debug statements should ensure that the printf is > always compiled. This prevents bitrot of the format string of the debug > statement. And switch debug output to stderr. > > Signed-off-by: Zhou Jie > Reviewed-by: Eric Bla

Re: [Qemu-devel] [PATCH] migration: Fix multi-thread compression bug

2016-05-04 Thread Li, Liang Z
> To: Li, Liang Z > Cc: amit.s...@redhat.com; qemu-devel@nongnu.org; dgilb...@redhat.com > Subject: Re: [Qemu-devel] [PATCH] migration: Fix multi-thread compression > bug > > Liang Li wrote: > > Recently, a bug related to multiple thread compression feature for > > live migration is reported. The

Re: [Qemu-devel] [PATCH 2/5] migration: Fix a potential issue

2016-05-04 Thread Li, Liang Z
> -Original Message- > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > Sent: Wednesday, May 04, 2016 4:48 PM > To: Li, Liang Z > Cc: qemu-devel@nongnu.org; quint...@redhat.com; > amit.s...@redhat.com; berra...@redhat.com > Subject: Re: [PATCH 2/5] migration: Fix a potential iss

Re: [Qemu-devel] [PATCH 1/2] block: Invalidate all children

2016-05-04 Thread Kevin Wolf
Am 19.04.2016 um 03:42 hat Fam Zheng geschrieben: > Currently we only recurse to bs->file, which will miss the children in quorum > and VMDK. > > Recurse into the whole subtree to avoid that. > > Signed-off-by: Fam Zheng > --- > block.c | 20 ++-- > 1 file changed, 14 insertions

Re: [Qemu-devel] [PATCH 2/2] block: Inactivate all children

2016-05-04 Thread Kevin Wolf
Am 19.04.2016 um 03:42 hat Fam Zheng geschrieben: > Currently we only inactivate the top BDS. Actually bdrv_inactivate > should be the opposite of bdrv_invalidate_cache. > > Recurse into the whole subtree instead. > > Signed-off-by: Fam Zheng Did you actually test this? I would expect that bs-

[Qemu-devel] [PATCH qemu v16 13/19] memory: Add reporting of supported page sizes

2016-05-04 Thread Alexey Kardashevskiy
Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate uses when translating, however this information is not available outside the translate context for various checks. This adds a get_page_sizes callback to MemoryRegionIOMMUOps and a wrapper for it so IOMMU users (such as VFIO) c

Re: [Qemu-devel] [Nbd] question on ioctl NBD_SET_FLAGS

2016-05-04 Thread Alex Bligh
On 20 Apr 2016, at 17:18, Wouter Verhelst wrote: > Hi Eric, > > On Wed, Apr 20, 2016 at 09:42:02AM -0600, Eric Blake wrote: > [...] >> But in 3.9, the overlap bug was still present, and the set of global >> flags had grown to include NBD_FLAG_NO_ZEROS (commit 038e066), which >> overlaps with NB

Re: [Qemu-devel] [PATCH v6 for-2.7 01/28] s390: use FILE instead of QEMUFile for creating text file

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > The s390 skeys monitor command needs to write out a plain text > file. Currently it is using the QEMUFile class for this, but > work is ongoing to refactor QEMUFile and eliminate much code > related to it. The only feature qemu_fopen() gives over fopen() > is support

Re: [Qemu-devel] [PATCH v6 for-2.7 02/28] io: avoid double-free when closing QIOChannelBuffer

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > The QIOChannelBuffer's close implementation will free > the internal data buffer. It failed to reset the pointer > to NULL though, so when the object is later finalized > it will free it a second time with predictable crash. > > Reviewed-by: Dr. David Alan Gilbert >

Re: [Qemu-devel] [PATCH v6 for-2.7 03/28] migration: remove use of qemu_bufopen from vmstate tests

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > Some of the test-vmstate.c test cases use a temporary file > while others use a memory buffer. To facilitate the future > removal of the qemu_bufopen() function, convert all the tests > to use a temporary file. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by:

[Qemu-devel] [Bug 1574246] Re: Drunken keyboard in go32v2 programs

2016-05-04 Thread felix
I compiled the latest git snapshot (tag: v2.6.0-rc4, calling itself 2.5.94; with GTK frontend) and could only half-reproduce the bug; keys do not longer "jam", but arrow keys are still captured twice. I woudn't make much of that difference; this bug seems very timing-sensitive. It could be that the

Re: [Qemu-devel] [PATCH v6 for-2.7 04/28] migration: ensure qemu_fflush() always writes full data amount

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > The QEMUFile writev_buffer / put_buffer functions are expected > to write out the full set of requested data, blocking until > complete. The qemu_fflush() caller does not expect to deal with > partial writes. Clarify the function comments and add a sanity > check to t

Re: [Qemu-devel] [PATCH v6 for-2.7 05/28] migration: split migration hooks out of QEMUFileOps

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > The QEMUFileOps struct contains the I/O subsystem callbacks > and the migration stage hooks. Split the hooks out into a > separate QEMUFileHooks struct to make it easier to refactor > the I/O side of QEMUFile without affecting the hooks. > > Reviewed-by: Dr. David Ala

Re: [Qemu-devel] [PATCH v6 for-2.7 06/28] migration: introduce set_blocking function in QEMUFileOps

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > Remove the assumption that every QEMUFile implementation has > a file descriptor available by introducing a new function > in QEMUFileOps to change the blocking state of a QEMUFile. > > If not set, it will fallback to the original code using > the get_fd method. > > R

Re: [Qemu-devel] [PATCH v6 for-2.7 07/28] migration: force QEMUFile to blocking mode for outgoing migration

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > Instead of relying on the default QEMUFile I/O blocking flag > state, explicitly turn on blocking I/O for outgoing migration > since it takes place in a background thread. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Daniel P. Berrange Reviewed-by: Juan

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-04 Thread David Kiarie
On Wed, May 4, 2016 at 10:39 AM, Valentine Sinitsyn wrote: > Hi everyone, > > On 04.05.2016 12:05, David Kiarie wrote: >> >> On Wed, May 4, 2016 at 9:12 AM, Jan Kiszka wrote: >>> >>> On 2016-04-30 00:42, David Kiarie wrote: These series adds AMD IOMMU support to Qemu. It's currently in

Re: [Qemu-devel] [PATCH v6 for-2.7 10/28] migration: add reporting of errors for outgoing migration

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > Currently if an application initiates an outgoing migration, > it may or may not, get an error reported back on failure. If > the error occurs synchronously to the 'migrate' command > execution, the client app will see the error message. This > is the case for DNS loo

Re: [Qemu-devel] [PATCH v6 for-2.7 09/28] migration: add helpers for creating QEMUFile from a QIOChannel

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > Currently creating a QEMUFile instance from a QIOChannel is > quite simple only requiring a single call to > qemu_fopen_channel_input or qemu_fopen_channel_output > depending on the end of migration connection. > > When QEMU gains TLS support, however, there will nee

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-04 Thread Valentine Sinitsyn
On 04.05.2016 15:51, David Kiarie wrote: On Wed, May 4, 2016 at 10:39 AM, Valentine Sinitsyn wrote: Hi everyone, On 04.05.2016 12:05, David Kiarie wrote: On Wed, May 4, 2016 at 9:12 AM, Jan Kiszka wrote: On 2016-04-30 00:42, David Kiarie wrote: These series adds AMD IOMMU support to Qem

[Qemu-devel] [PATCH] libqtest: dump child invocation when QTEST_LOG set

2016-05-04 Thread Alex Bennée
The QTEST_LOG environment is used for debugging qtest interactions with a child process. When it is defined we now also dump the invocation line to stderr to make it easier for people to see how QEMU was invoked. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi --- tests/libqtest.c | 6 +

Re: [Qemu-devel] [PATCH v6 for-2.7 09/28] migration: add helpers for creating QEMUFile from a QIOChannel

2016-05-04 Thread Juan Quintela
"Daniel P. Berrange" wrote: > Currently creating a QEMUFile instance from a QIOChannel is > quite simple only requiring a single call to > qemu_fopen_channel_input or qemu_fopen_channel_output > depending on the end of migration connection. > > When QEMU gains TLS support, however, there will nee

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-04 Thread David Kiarie
On 04/05/16 13:58, Valentine Sinitsyn wrote: On 04.05.2016 15:51, David Kiarie wrote: On Wed, May 4, 2016 at 10:39 AM, Valentine Sinitsyn wrote: Hi everyone, On 04.05.2016 12:05, David Kiarie wrote: On Wed, May 4, 2016 at 9:12 AM, Jan Kiszka wrote: On 2016-04-30 00:42, David Kiarie wro

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-04 Thread Valentine Sinitsyn
On 04.05.2016 16:02, David Kiarie wrote: On 04/05/16 13:58, Valentine Sinitsyn wrote: On 04.05.2016 15:51, David Kiarie wrote: On Wed, May 4, 2016 at 10:39 AM, Valentine Sinitsyn wrote: Hi everyone, On 04.05.2016 12:05, David Kiarie wrote: On Wed, May 4, 2016 at 9:12 AM, Jan Kiszka wrot

[Qemu-devel] Migration ToDo list (a.k.a. Rant)

2016-05-04 Thread Juan Quintela
Hi I am lots of times asked about what is the ToDo list for migration, that was on my head, and random notes over my desk, so, trying some organization (Yes, I would put this in the wiki). - migration thread on reception would make trivial to do other things while receiving, and would make

Re: [Qemu-devel] [RFC v2 0/8] KVM PCI/MSI passthrough with mach-virt

2016-05-04 Thread Yehuda Yitschak
Tested-by: Yehuda Yitschak Tested on Armada-7040 using an intel IXGBE (82599ES). > -Original Message- > From: qemu-devel-bounces+yehuday=marvell@nongnu.org > [mailto:qemu-devel-bounces+yehuday=marvell@nongnu.org] On > Behalf Of Eric Auger > Sent: Friday, January 29, 2016 18:54

Re: [Qemu-devel] [PATCH v5 7/9] target-mips: Add nan2008 flavor of ..

2016-05-04 Thread Aleksandar Markovic
> > @@ -8919,7 +8920,11 @@ static void gen_farith (DisasContext *ctx, enum > > fopcode op1, > > TCGv_i64 fp64 = tcg_temp_new_i64(); > > > > gen_load_fpr32(ctx, fp32, fs); > > -gen_helper_float_roundl_s(fp64, cpu_env, fp32); > > +if ((ctx->insn_fla

Re: [Qemu-devel] [PATCH 1/2] e1000: Fixing interrupts pace.

2016-05-04 Thread Shmulik Ladkani
Hi Sameeh, On Thu, 17 Mar 2016 09:37:57 +0200, sam...@daynix.com wrote: > @@ -357,6 +357,14 @@ set_interrupt_cause(E1000State *s, int index, uint32_t > val) > } > mit_update_delay(&mit_delay, s->mac_reg[ITR]); > > +/* > + * According to e1000 SP

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert" writes: > >> "git-grep assert migration" suggests you do kill the source on certain >> programming errors. > > I'm just trying hard to reduce them; I know I'm not there, but I'd rather >

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> "Dr. David Alan Gilbert" writes: > > > >> "git-grep assert migration" suggests you do kill the source on certain > >> programming errors. > > > > I'm just t

[Qemu-devel] [PATCH] Add virtio input device specification.

2016-05-04 Thread Gerd Hoffmann
Resuming the effort to get the input device specs actually merged. Support has been added to the linux kernel version 4.1 and to qemu version 2.4. git branch: https://www.kraxel.org/cgit/virtio-spec/log/?h=virtio-input Rendered versions are available here: https://www.kraxel.org/virtio/virti

[Qemu-devel] [Bug 1577937] [NEW] netbeans not working with std graphic driver

2016-05-04 Thread Veskra
Public bug reported: Qemu Version: QEMU emulator version 2.5.1, Copyright (c) 2003-2008 Fabrice Bellard Launching VM with: sudo qemu-system-x86_64 -enable-kvm -m 1024M ~/guest.vm -usb -vga std Guest: Kali Linux 2016.1 Kernel: 4.4.0-kali1-amd64 Affected Arch: 64bit & 32bit Netbeans failing to st

Re: [Qemu-devel] [PATCH v2 01/13] block: Make sure throttled BDSes always have a BB

2016-05-04 Thread Alberto Garcia
On Fri 22 Apr 2016 07:42:30 PM CEST, Kevin Wolf wrote: > It was already true in principle that a throttled BDS always has a BB > attached, except that the order of operations while attaching or > detaching a BDS to/from a BB wasn't careful enough. > > This commit breaks graph manipulations while I/

Re: [Qemu-devel] [PATCH v2 02/13] block: Introduce BlockBackendPublic

2016-05-04 Thread Alberto Garcia
On Fri 22 Apr 2016 07:42:31 PM CEST, Kevin Wolf wrote: > Some features, like I/O throttling, are implemented outside > block-backend.c, but still want to keep information in BlockBackend, > e.g. list entries that allow keeping a list of BlockBackends. > > In order to avoid exposing the whole struct

Re: [Qemu-devel] Migration ToDo list (a.k.a. Rant)

2016-05-04 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > > Hi > > I am lots of times asked about what is the ToDo list for migration, that > was on my head, and random notes over my desk, so, trying some > organization (Yes, I would put this in the wiki). Let me add: Getting everything to use VMState;

Re: [Qemu-devel] [PATCH v2 03/13] block: throttle-groups: Use BlockBackend pointers internally

2016-05-04 Thread Alberto Garcia
On Fri 22 Apr 2016 07:42:32 PM CEST, Kevin Wolf wrote: > As a first step towards moving I/O throttling to the BlockBackend level, > this patch changes all pointers in struct ThrottleGroup from referencing > a BlockDriverState to referencing a BlockBackend. > > This change is valid because we made s

Re: [Qemu-devel] [PATCH v2 04/13] block: Convert throttle_group_get_name() to BlockBackend

2016-05-04 Thread Alberto Garcia
On Fri 22 Apr 2016 07:42:33 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert" writes: >> >> > * Markus Armbruster (arm...@redhat.com) wrote: >> >> "Dr. David Alan Gilbert" writes: >> > >> >> "git-grep assert migration" suggests you do kill the source on certain

[Qemu-devel] [PATCH 2/3] The only 64bit parameter of muldiv64() is the first one.

2016-05-04 Thread Laurent Vivier
muldiv64() is "uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)" Some time it is used as muldiv64(uint32_t a, uint64_t b, uint32_t c)" This patch is the result of coccinelle script scripts/coccinelle/swap_muldiv64.cocci to reorder arguments. Signed-off-by: Laurent Vivier --- hw/timer/omap

[Qemu-devel] [PATCH 1/3] scripts: add muldiv64() checking coccinelle scripts

2016-05-04 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- scripts/coccinelle/remove_muldiv64.cocci | 6 + scripts/coccinelle/swap_muldiv64.cocci | 46 2 files changed, 52 insertions(+) create mode 100644 scripts/coccinelle/remove_muldiv64.cocci create mode 100644 scripts/coccine

[Qemu-devel] [PATCH 0/3] muldiv64() trivial fixes

2016-05-04 Thread Laurent Vivier
Some fixes in the use of muldiv64() The patches have been generated with the help of coccinelle. The first patch contains the scripts used to generate the two following patches. As it is done for linux, I've added the scripts under scripts/coccinelle. Laurent Vivier (3): scripts: add muldiv64(

[Qemu-devel] [PATCH 3/3] remove useless muldiv64()

2016-05-04 Thread Laurent Vivier
muldiv64(a, 1, b) is like "a / b". This patch is the result of coccinelle script scripts/coccinelle/remove_muldiv64.cocci. Signed-off-by: Laurent Vivier --- hw/usb/hcd-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index e5b535f.

Re: [Qemu-devel] [PATCH v2 06/13] block: Move actual I/O throttling to BlockBackend

2016-05-04 Thread Alberto Garcia
On Fri 22 Apr 2016 07:42:35 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH] Add virtio gpu device specification.

2016-05-04 Thread Gerd Hoffmann
Resuming the effort to get the gpu device specs merged. Support for 2d mode (3d/virgl mode is not covered by this patch) has been added to the linux kernel version 4.2 and to qemu version 2.4. git branch: https://www.kraxel.org/cgit/virtio-spec/commit/?h=virtio-gpu Rendered versions are availa

Re: [Qemu-devel] [PATCH v5 11/14] qemu-io: Switch to byte-based block access

2016-05-04 Thread Kevin Wolf
Am 03.05.2016 um 17:42 hat Eric Blake geschrieben: > blk_write() and blk_read() are now very simple wrappers around > blk_pwrite() and blk_pread(). There's no reason to require > the user to pass in aligned numbers. Keep 'read -p' and > 'write -p' so that I don't have to hunt down and update all

Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-05-04 Thread Marc-André Lureau
Hi On Mon, May 2, 2016 at 2:04 PM, Michael S. Tsirkin wrote: > On Mon, May 02, 2016 at 01:29:18PM +0200, Marc-André Lureau wrote: >> Hi >> >> On Mon, May 2, 2016 at 12:45 PM, Michael S. Tsirkin wrote: >> > 1. Graceful disconnect >> > - One should be able to do vmstop, disconnect, connect then vm

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-04 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> "Dr. David Alan Gilbert" writes: > >> > >> > * Markus Armbruster (arm...@redhat.com) wrote: > >> >> "Dr. David Alan Gilbert" writes: > >> > > >> >> "git-g

  1   2   3   4   >