Re: [Qemu-devel] [PATCH v5 27/27] qemu-iotests: Add test case 153 for image locking

2016-05-25 Thread Max Reitz
On 17.05.2016 09:35, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/153 | 197 + > tests/qemu-iotests/153.out | 426 > + > tests/qemu-iotests/group | 1 + > 3 files changed, 624

Re: [Qemu-devel] [PATCH v3 05/15] block: Convert block job core to BlockBackend

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > 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

Re: [Qemu-devel] [PATCH v3 07/15] stream: Use BlockBackend for I/O

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > 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 > Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH v2 2/3] atomics: emit an smp_read_barrier_depends() barrier only for Sparc and Thread Sanitizer

2016-05-25 Thread Emilio G. Cota
On Wed, May 25, 2016 at 14:16:56 +0200, Paolo Bonzini wrote: > On 24/05/2016 22:06, Emilio G. Cota wrote: > > For correctness, smp_read_barrier_depends() is only required to > > emit a barrier on Sparc hosts. However, we are currently emitting > > a consume fence unconditionally. > > Let's say

Re: [Qemu-devel] [PATCH v5 26/27] block: Turn on image locking by default

2016-05-25 Thread Max Reitz
On 17.05.2016 09:35, Fam Zheng wrote: > Now that test cases are covered, we can turn it on. > > Signed-off-by: Fam Zheng > --- > blockdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP

[Qemu-devel] [Bug 1585533] Re: cache-miss-rate / Invalid JSON

2016-05-25 Thread Paolo Bonzini
Marc, what distro are you running on? QEMU 2.3 is not maintained anymore upstream, so unless you are running on Ubuntu (and then we can reuse this bug tracker) you'll have to reopen the bug in your distro. -- You received this bug notification because you are a member of qemu- devel-ml, which

[Qemu-devel] [RFC PATCH V4 1/4] colo-compare: introduce colo compare initialization

2016-05-25 Thread Zhang Chen
Packets coming from the primary char indev will be sent to outdev Packets coming from the secondary char dev will be dropped usage: primary: -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66 -chardev

Re: [Qemu-devel] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all()

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > 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

Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-25 Thread Zhou Jie
Hi, Alex >> Do we even need a timer? What if we simply spin? >> >> for (i = 0; i < 1000; i++) { >> if (vdev->pci_aer_resume_signaled) { >> break; >> } >> g_usleep(1000); >> } >> >> if (i == 1000) { >> /* We failed */ >> } else { >> /* Proceed with reset */ >> } >> >>

Re: [Qemu-devel] [patch v6 11/12] vfio: register aer resume notification handler for aer resume

2016-05-25 Thread Alex Williamson
On Wed, 25 May 2016 11:45:11 +0300 "Michael S. Tsirkin" wrote: > On Tue, May 24, 2016 at 08:54:06PM -0600, Alex Williamson wrote: > > On Tue, 24 May 2016 13:49:12 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Apr 26, 2016 at 08:48:15AM -0600, Alex

Re: [Qemu-devel] [PATCH RFC kernel] balloon: speed up inflating/deflating process

2016-05-25 Thread Li, Liang Z
> > > Interesting. How about instead of tell host, we do multiple scans, > > > each time ignoring pages out of range? > > > > > > for (pfn = min pfn; pfn < max pfn; pfn += 1G) { > > > foreach page > > > if page pfn < pfn || page pfn >= pfn + 1G > > >

[Qemu-devel] [PATCH] 9p: getattr: use fstat if we have a fd

2016-05-25 Thread Greg Kurz
If we have an opened fd, it is better to call fstat() as the underlying file may have been unlinked and lstat() will fail. Signed-off-by: Greg Kurz --- This QEMU patch goes with the create-unlink-getattr fix at:

Re: [Qemu-devel] [PATCH 12/13] vmdk: Convert to bdrv_co_pwrite_zeroes()

2016-05-25 Thread Eric Blake
On 05/25/2016 08:23 AM, Kevin Wolf wrote: > Am 25.05.2016 um 00:25 hat Eric Blake geschrieben: >> Another step on our continuing quest to switch to byte-based >> interfaces. >> >> Signed-off-by: Eric Blake >> --- >> block/vmdk.c | 13 ++--- >> 1 file changed, 6

Re: [Qemu-devel] [PATCH v3 01/15] block: Rename blk_write_zeroes()

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > From: Eric Blake > > Commit 983a1600 changed the semantics of blk_write_zeroes() to > be byte-based rather than sector-based, but did not change the > name, which is an open invitation for other code to misuse the > function. Renaming

Re: [Qemu-devel] [PATCH 00/23] GICv3 emulation

2016-05-25 Thread Shannon Zhao
On 2016年05月10日 01:29, Peter Maydell wrote: > This series implements emulation of the GICv3 interrupt controller. > It is based to some extent on previous patches from Shlomo and > Pavel, but the bulk of it has turned out to be new code. (The > combination of changing the underlying data

Re: [Qemu-devel] [PATCH v3 09/15] mirror: Use BlockBackend for I/O

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > 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 > Reviewed-by: Eric Blake > --- >

Re: [Qemu-devel] [PATCH v3 13/15] backup: Use BlockBackend for I/O

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > 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 > Reviewed-by: Eric Blake > --- >

[Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model

2016-05-25 Thread xiaoqiang zhao
* drop qemu_char_get_next_serial and use chardev prop * add pl011_create wrapper function to create pl011 uart device * change affected board code to use the new way Signed-off-by: xiaoqiang zhao --- hw/arm/bcm2835_peripherals.c | 16 +++--- hw/arm/highbank.c

[Qemu-devel] [PATCH 5/6] hw/char: QOM'ify xilinx_uartlite model

2016-05-25 Thread xiaoqiang zhao
* drop qemu_char_get_next_serial and use chardev prop * create xilinx_uartlite_create wrapper function to create xilinx_uartlite device * change affected board code to use the new way Signed-off-by: xiaoqiang zhao --- hw/char/xilinx_uartlite.c| 10 +

[Qemu-devel] [PATCH v2 1/4] xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions

2016-05-25 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add a secure prop to en/disable ARM Security Extensions. This is particularly useful for KVM runs. Default to disabled to match the behavior of KVM. This changes the default setup from having the ARM Security Extensions to not longer having

Re: [Qemu-devel] [PATCH v2 0/3] linux-user: netlink support

2016-05-25 Thread Riku Voipio
On Tue, May 24, 2016 at 02:08:14PM +0100, Peter Maydell wrote: > On 24 May 2016 at 13:54, Riku Voipio wrote: > > On tiistaina 24. toukokuuta 2016 15.05.08 EEST, Riku Voipio wrote: > >> > >> Ok, fair enough, applied. > > > > > > dropped since the build failed on squeeze. I take

Re: [Qemu-devel] [PATCH 0/3] Qemu: scsi: megasas: various OOB r/w access checks

2016-05-25 Thread Paolo Bonzini
On 25/05/2016 12:31, P J P wrote: > From: Prasad J Pandit > > Hello, > > Multiple OOB r/w access issues were reported by Li Qiang, in SCSI MegaRAID SAS > Host bus Adapter emulation. Please see below proposed patches to fix these > issues. Thanks, queued. Paolo

Re: [Qemu-devel] [PATCH v6 for-2.7 25/28] migration: define 'tls-creds' and 'tls-hostname' migration parameters

2016-05-25 Thread Amit Shah
On (Wed) 27 Apr 2016 [11:05:15], Daniel P. Berrange wrote: > Define two new migration parameters to be used with TLS encryption. > The 'tls-creds' parameter provides the ID of an instance of the > 'tls-creds' object type, or rather a subclass such as 'tls-creds-x509'. > Providing these credentials

Re: [Qemu-devel] [PATCH v2 1/3] docs/atomics: update atomic_read/set comparison with Linux

2016-05-25 Thread Paolo Bonzini
On 24/05/2016 22:06, Emilio G. Cota wrote: > Recently Linux did a mass conversion of its atomic_read/set calls > so that they at least are READ/WRITE_ONCE. See Linux's commit > 62e8a325 ("atomic, arch: Audit atomic_{read,set}()"). It seems though > that their documentation hasn't been updated to

[Qemu-devel] [PATCH v3 09/15] mirror: Use BlockBackend for I/O

2016-05-25 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 Reviewed-by: Eric Blake --- block/mirror.c | 70

Re: [Qemu-devel] [PATCH v2] nbd: Don't trim unrequested bytes

2016-05-25 Thread Kevin Wolf
Am 25.05.2016 um 13:25 hat Eric Blake geschrieben: > On 05/25/2016 04:59 AM, Eric Blake wrote: > > +/* Ignore unaligned head or tail, until block layer adds byte > > + * interface */ > > +if (request.len >= BDRV_SECTOR_SIZE) { > > +request.len -= (request.from +

[Qemu-devel] [RFC PATCH V4 3/4] colo-compare: introduce packet comparison thread

2016-05-25 Thread Zhang Chen
if packets are same, we send primary packet and drop secondary packet, otherwise notify COLO do checkpoint. Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c|

Re: [Qemu-devel] [PATCH 06/13] qcow2: Convert to bdrv_co_pwrite_zeroes()

2016-05-25 Thread Kevin Wolf
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben: > Another step on our continuing quest to switch to byte-based > interfaces. > > There are still opportunities to optimize the qcow2 handling > of zero clusters. For example, if the backing file only has > non-zero data in the portion about to

Re: [Qemu-devel] ARM IRQ Generation

2016-05-25 Thread Peter Maydell
On 25 May 2016 at 13:42, Karthik wrote: > Okay, understood. I`ll hold the IRQ line until CPU acknowledges the > interrupt. > > By the way, is there a distinction between edge and level triggered > interrupt in the qemu or it is up to the emulation implementation? In

Re: [Qemu-devel] [PATCH 6/6] char: get rid of qemu_char_get_next_serial

2016-05-25 Thread Paolo Bonzini
On 25/05/2016 12:58, xiaoqiang zhao wrote: > since there is no user of qemu_char_get_next_serial any more, > it's time to let it go away. > > Signed-off-by: xiaoqiang zhao > --- > include/sysemu/char.h | 1 - > qemu-char.c | 16 > 2 files

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

2016-05-25 Thread Alex Williamson
On Wed, 25 May 2016 16:34:37 +1000 David Gibson wrote: > On Fri, May 13, 2016 at 04:24:53PM -0600, Alex Williamson wrote: > > On Fri, 13 May 2016 17:16:48 +1000 > > Alexey Kardashevskiy wrote: > > > > > On 05/06/2016 08:39 AM, Alex Williamson

Re: [Qemu-devel] [PATCH 10/13] raw-posix: Convert to bdrv_co_pwrite_zeroes()

2016-05-25 Thread Kevin Wolf
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben: > Another step on our continuing quest to switch to byte-based > interfaces. > > Signed-off-by: Eric Blake > --- > block/raw-posix.c | 37 +++-- > trace-events | 2 +- > 2 files changed,

Re: [Qemu-devel] [PATCH 11/13] raw_bsd: Convert to bdrv_co_pwrite_zeroes()

2016-05-25 Thread Kevin Wolf
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben: > Another step on our continuing quest to switch to byte-based > interfaces. > > Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH 13/13] block: Kill bdrv_co_write_zeroes()

2016-05-25 Thread Kevin Wolf
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben: > Now that all drivers have been converted to a byte interface, > we no longer need a sector interface. > > Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-05-25 Thread Vladimir Sementsov-Ogievskiy
Hi! Are you going to update the series in the near future? On 08.03.2016 07:44, Fam Zheng wrote: v4: Rebase. Add rev-by from John in patches 1-5, 7, 8. Remove BdrvDirtyBitmap typedef from dirty-bitmap.h in patch 4. [Max] Add assertion on bm->meta in patch 9. [John] Two major

Re: [Qemu-devel] [PATCH v3 06/15] block: Make blk_co_preadv/pwritev() public

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > Also add trace points now that the function can be directly called. > > Signed-off-by: Kevin Wolf > --- > block/block-backend.c | 21 ++--- > include/sysemu/block-backend.h | 6 ++ > trace-events

Re: [Qemu-devel] [PATCH 09/13] qed: Convert to bdrv_co_pwrite_zeroes()

2016-05-25 Thread Kevin Wolf
Am 25.05.2016 um 16:28 hat Eric Blake geschrieben: > On 05/25/2016 08:07 AM, Kevin Wolf wrote: > > Am 25.05.2016 um 00:25 hat Eric Blake geschrieben: > >> Another step on our continuing quest to switch to byte-based > >> interfaces. > >> > >> Kill an abuse of the comma operator while at it

Re: [Qemu-devel] [PATCH v3 15/15] blockjob: Remove BlockJob.bs

2016-05-25 Thread Max Reitz
On 25.05.2016 14:29, Kevin Wolf wrote: > There is a single remaining user in qemu-img, and another one in a test > case, both of which can be trivially converted to using BlockJob.blk > instead. > > Signed-off-by: Kevin Wolf > --- > blockjob.c| 1 - >

Re: [Qemu-devel] [RFC PATCH 3/3] tcg: Add frontend support for fence gen in ARMv7

2016-05-25 Thread Richard Henderson
On 05/24/2016 10:18 AM, Pranith Kumar wrote: -/* We don't emulate caches so these are a no-op. */ +if (TCG_TARGET_HAS_fence) { +tcg_gen_fence(); +} This should then be unconditional. r~

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Richard Henderson
On 05/24/2016 10:18 AM, Pranith Kumar wrote: Signed-off-by: Pranith Kumar --- tcg/i386/tcg-target.h | 1 + tcg/i386/tcg-target.inc.c | 9 + tcg/tcg-opc.h | 2 +- tcg/tcg.c | 1 + 4 files changed, 12 insertions(+), 1 deletion(-)

[Qemu-devel] [PULL 03/31] block: Let bdrv_open_inherit() return the snapshot

2016-05-25 Thread Kevin Wolf
From: Max Reitz If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that snapshot BDS should be returned instead of the BDS under it. This has worked so far because (nearly) all users of BDRV_O_SNAPSHOT use blk_new_open() to create the BDS tree. bdrv_append()

[Qemu-devel] [PULL 11/31] block: Introduce bdrv_replace_child()

2016-05-25 Thread Kevin Wolf
This adds a common function that is called when attaching a new child to a parent, removing a child from a parent and when reconfiguring the graph so that an existing child points to a different node now. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake

[Qemu-devel] [PULL 05/31] block: Drop blk_new_with_bs()

2016-05-25 Thread Kevin Wolf
From: Max Reitz Its only caller is blk_new_open(), so we can just inline it there. The bdrv_new_root() call is dropped in the process because we can just let bdrv_open() create the BDS. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 08/31] block: Assert !bs->refcnt in bdrv_close()

2016-05-25 Thread Kevin Wolf
From: Max Reitz The only caller of bdrv_close() left is bdrv_delete(). We may as well assert that, in a way (there are some things in bdrv_close() that make more sense under that assumption, such as the call to bdrv_release_all_dirty_bitmaps() which in turn assumes that no

[Qemu-devel] [PULL 19/31] block: Cancel jobs first in bdrv_close_all()

2016-05-25 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

[Qemu-devel] [PULL 28/31] backup: Remove bs parameter from backup_do_cow()

2016-05-25 Thread Kevin Wolf
Now that we pass the job to the function, bs is implied by that. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- block/backup.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff

[Qemu-devel] [PULL 25/31] mirror: Use BlockBackend for I/O

2016-05-25 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 Reviewed-by: Eric Blake Reviewed-by: Max Reitz ---

Re: [Qemu-devel] [RFC v2 03/11] docs: new design document multi-thread-tcg.txt (DRAFTING)

2016-05-25 Thread Sergey Fedorov
On 25/05/16 21:03, Paolo Bonzini wrote: >> The page table seems to be protected by 'mmap_lock' in user mode >> emulation but by 'tb_lock' in system mode emulation. It may turn to be >> possible to read it safely even with no lock held. > Yes, it is possible to at least follow the radix tree safely

Re: [Qemu-devel] [PATCH v2 2/4] xlnx-zynqmp: Make the RPU subsystem optional

2016-05-25 Thread Alistair Francis
On Wed, May 25, 2016 at 3:52 AM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > The way we currently model the RPU subsystem is of quite > limited use. In addition to that, it causes problems for > KVM and for GDB debugging. > > Make

[Qemu-devel] [PULL 00/31] Block layer patches

2016-05-25 Thread Kevin Wolf
The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[Qemu-devel] [PULL 02/31] block: Drop useless bdrv_new() call

2016-05-25 Thread Kevin Wolf
From: Max Reitz bdrv_append_temp_snapshot() uses bdrv_new() to create an empty BDS before invoking bdrv_open() on that BDS. This is probably a relict from when it used to do some modifications on that empty BDS, but now that is unnecessary, so we can just set bs_snapshot to

[Qemu-devel] [PULL 01/31] block: Fix bdrv_next() memory leak

2016-05-25 Thread Kevin Wolf
The bdrv_next() users all leaked the BdrvNextIterator after completing the iteration. Simply changing bdrv_next() to free the iterator before returning NULL at the end of list doesn't work because some callers exit the loop before looking at all BDSes. This patch moves the BdrvNextIterator from

[Qemu-devel] [PULL 13/31] block: Fix reconfiguring graph with drained nodes

2016-05-25 Thread Kevin Wolf
When changing the BlockDriverState that a BdrvChild points to while the node is currently drained, we must call the .drained_end() parent callback. Conversely, when this means attaching a new node that is already drained, we need to call .drained_begin(). bdrv_root_attach_child() takes now an

[Qemu-devel] [PULL 10/31] block: Drop errp parameter from blk_new()

2016-05-25 Thread Kevin Wolf
From: Max Reitz blk_new() cannot fail so its Error ** parameter has become superfluous. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/block-backend.c | 9 ++--- blockdev.c | 6 +-

[Qemu-devel] [PULL 15/31] dma-helpers: change interface to byte-based

2016-05-25 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- dma-helpers.c| 14 +++--- hw/block/nvme.c | 6 +++--- hw/ide/ahci.c| 6 -- hw/ide/core.c| 8 +---

[Qemu-devel] [PULL 18/31] block: keep a list of block jobs

2016-05-25 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

[Qemu-devel] [PULL 27/31] backup: Pack Notifier within BackupBlockJob

2016-05-25 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

[Qemu-devel] [PULL 14/31] block: Propagate .drained_begin/end callbacks

2016-05-25 Thread Kevin Wolf
When draining intermediate nodes (i.e. nodes that aren't the root node for at least one of their parents; with node references, the user can always configure the graph to create this situation), we need to propagate the .drained_begin/end callbacks all the way up to the root for the drain to be

[Qemu-devel] [PULL 23/31] stream: Use BlockBackend for I/O

2016-05-25 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 Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia

Re: [Qemu-devel] [PATCH v2 4/4] xlnx-zynqmp: Use the in kernel GIC model for KVM runs

2016-05-25 Thread Alistair Francis
On Wed, May 25, 2016 at 3:52 AM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Use the in kernel GIC model when running with KVM enabled. > > Reviewed-by: Peter Maydell > Signed-off-by: Edgar E. Iglesias

[Qemu-devel] [PULL 12/31] block: Make bdrv_drain() use bdrv_drained_begin/end()

2016-05-25 Thread Kevin Wolf
Until now, bdrv_drained_begin() used bdrv_drain() internally to drain the queue. This is kind of backwards and caused quiescing code to be duplicated because bdrv_drained_begin() had to ensure that no new requests come in even after bdrv_drain() returns, whereas bdrv_drain() had to have them

[Qemu-devel] [PULL 04/31] tests: Drop BDS from test-throttle.c

2016-05-25 Thread Kevin Wolf
From: Max Reitz Now that throttling has been moved to the BlockBackend level, we do not need to create a BDS along with the BB in the I/O throttling test. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 21/31] block: Convert block job core to BlockBackend

2016-05-25 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] [PULL 26/31] backup: Don't leak BackupBlockJob in error path

2016-05-25 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- 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 ---

Re: [Qemu-devel] [RFC v2 03/11] docs: new design document multi-thread-tcg.txt (DRAFTING)

2016-05-25 Thread Paolo Bonzini
> The page table seems to be protected by 'mmap_lock' in user mode > emulation but by 'tb_lock' in system mode emulation. It may turn to be > possible to read it safely even with no lock held. Yes, it is possible to at least follow the radix tree safely with no lock held. The fields in the

Re: [Qemu-devel] [PATCH 1/5] block: split write_zeroes always

2016-05-25 Thread Eric Blake
On 05/17/2016 10:34 AM, Kevin Wolf wrote: > Am 17.05.2016 um 11:15 hat Denis V. Lunev geschrieben: >> We should split requests even if they are less than write_zeroes_alignment. >> For example we can have the following request: >> offset 62k >> size 4k >> write_zeroes_alignment 64k >> The

Re: [Qemu-devel] [PATCH v2 1/4] xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions

2016-05-25 Thread Alistair Francis
On Wed, May 25, 2016 at 3:52 AM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a secure prop to en/disable ARM Security Extensions. > This is particularly useful for KVM runs. > > Default to disabled to match the behavior of

[Qemu-devel] [PULL 09/31] block: Drop bdrv_parent_cb_...() from bdrv_close()

2016-05-25 Thread Kevin Wolf
From: Max Reitz bdrv_close() now asserts that the BDS's refcount is 0, therefore it cannot have any parents and the bdrv_parent_cb_change_media() call is a no-op. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 06/31] block: Drop bdrv_new_root()

2016-05-25 Thread Kevin Wolf
From: Max Reitz It is unused now, so we may just as well drop it. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c | 5

[Qemu-devel] [PULL 24/31] mirror: Allow target that already has a BlockBackend

2016-05-25 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

[Qemu-devel] [PULL 22/31] block: Make blk_co_preadv/pwritev() public

2016-05-25 Thread Kevin Wolf
Also add trace points now that the function can be directly called. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block/block-backend.c | 21

[Qemu-devel] [PULL 17/31] block: Rename blk_write_zeroes()

2016-05-25 Thread Kevin Wolf
From: Eric Blake Commit 983a1600 changed the semantics of blk_write_zeroes() to be byte-based rather than sector-based, but did not change the name, which is an open invitation for other code to misuse the function. Renaming to pwrite_zeroes() makes it more in line with other

Re: [Qemu-devel] [PATCH v3] xen-hvm: ignore background I/O sections

2016-05-25 Thread Paolo Bonzini
- Original Message - > From: "Anthony PERARD" > To: "Paul Durrant" > Cc: qemu-devel@nongnu.org, xen-de...@lists.xenproject.org, "Stefano > Stabellini" , "Paolo > Bonzini" > Sent:

[Qemu-devel] [PULL 31/31] blockjob: Remove BlockJob.bs

2016-05-25 Thread Kevin Wolf
There is a single remaining user in qemu-img, and another one in a test case, both of which can be trivially converted to using BlockJob.blk instead. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- blockjob.c

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Jianjun Duan
I will try to explain my design rationale in details here. 1 QTAILQ should only be accessed using the interfaces defined in queue.h. Its structs should not be directly used. So I created interfaces in queue.h to query about its layout. If the implementation is changed, these interfaces should be

[Qemu-devel] [PATCH v1 1/1] zynqmp: Add the ZCU102 board

2016-05-25 Thread Alistair Francis
Most Zynq UltraScale+ users will be targetting and using the ZCU102 board instead of the development focused EP108. To make our QEMU machine names clearer add a ZCU102 machine model. Signed-off-by: Alistair Francis --- There are differences between the two boards,

[Qemu-devel] [PATCH v7 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-25 Thread Alistair Francis
If the caller didn't specify an architecture for the ELF machine the load_elf() function will auto detect it based on the ELF file. Signed-off-by: Alistair Francis --- V7: - Fix typo hw/core/loader.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Alex Bennée
Richard Henderson writes: > On 05/24/2016 10:18 AM, Pranith Kumar wrote: >> Signed-off-by: Pranith Kumar >> --- >> tcg/i386/tcg-target.h | 1 + >> tcg/i386/tcg-target.inc.c | 9 + >> tcg/tcg-opc.h | 2 +- >> tcg/tcg.c

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Sergey Fedorov
On 25/05/16 22:25, Alex Bennée wrote: > Richard Henderson writes: >> On 05/24/2016 10:18 AM, Pranith Kumar wrote: >>> Signed-off-by: Pranith Kumar >>> --- >>> tcg/i386/tcg-target.h | 1 + >>> tcg/i386/tcg-target.inc.c | 9 + >>> tcg/tcg-opc.h

Re: [Qemu-devel] [PATCH v2 3/4] xlnx-zynqmp: Delay realization of GIC until post CPU realization

2016-05-25 Thread Alistair Francis
On Wed, May 25, 2016 at 3:52 AM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Delay the realization of the GIC until after CPUs are > realized. This is needed for KVM as the in-kernel GIC > model will fail if it is realized with no

[Qemu-devel] [PULL 20/31] block: Default to enabled write cache in blk_new()

2016-05-25 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,

[Qemu-devel] [PULL 16/31] dma-helpers: change BlockBackend to opaque value in DMAIOFunc

2016-05-25 Thread Kevin Wolf
From: Paolo Bonzini Callers of dma_blk_io have no way to pass extra data to the DMAIOFunc, because the original callback and opaque are gone by the time DMAIOFunc is called. On the other hand, the BlockBackend is usually derived from those extra data that you could pass to

[Qemu-devel] [PULL 07/31] block: Make bdrv_open() return a BDS

2016-05-25 Thread Kevin Wolf
From: Max Reitz There are no callers to bdrv_open() or bdrv_open_inherit() left that pass a pointer to a non-NULL BDS pointer as the first argument of these functions, so we can finally drop that parameter and just make them return the new BDS. Generally, the following

[Qemu-devel] [PULL 30/31] commit: Use BlockBackend for I/O

2016-05-25 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 Reviewed-by: Eric Blake Reviewed-by: Max Reitz ---

[Qemu-devel] [PULL 29/31] backup: Use BlockBackend for I/O

2016-05-25 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 Reviewed-by: Eric Blake Reviewed-by: Max Reitz ---

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Paolo Bonzini
> >> +/* > >> + * Following 3 fields are for VMStateField which needs customized > >> handling, > >> + * such as QTAILQ in qemu/queue.h, lists, and tree. > >> + */ > >> +const void *meta_data; > >> +int (*extend_get)(QEMUFile *f, const void *metadata, void *opaque); > >> +

Re: [Qemu-devel] [PATCH v6 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-25 Thread Alistair Francis
On Tue, May 24, 2016 at 3:08 PM, Cleber Rosa wrote: > > On 05/13/2016 05:37 PM, Alistair Francis wrote: >> >> >> +if (elf_machine < 1) { >> +/* The caller didn't specify and ARCH, we can figure it out */ > > > Spotted a comment typo: s/and/an/ Thanks, sending a

[Qemu-devel] [PATCH v7 0/3] Add a generic loader

2016-05-25 Thread Alistair Francis
This work is based on the original work by Li Guang with extra features added by Peter C and myself. The idea of this loader is to allow the user to load multiple images or values into QEMU at startup. Memory values can be loaded like this: -device

[Qemu-devel] [PATCH v7 3/3] docs: Add a generic loader explanation document

2016-05-25 Thread Alistair Francis
Signed-off-by: Alistair Francis --- V6: - Fixup documentation V4: - Re-write to be more comprehensive docs/generic-loader.txt | 54 + 1 file changed, 54 insertions(+) create mode 100644 docs/generic-loader.txt diff

[Qemu-devel] [PATCH v7 2/3] generic-loader: Add a generic loader

2016-05-25 Thread Alistair Francis
Add a generic loader to QEMU which can be used to load images or set memory values. Signed-off-by: Alistair Francis --- V7: - Rebase V6: - Add error checking V5: - Rebase V4: - Allow the loader to work with every architecture - Move the file to hw/core -

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Paolo Bonzini
> 1 QTAILQ should only be accessed using the interfaces defined in > queue.h. Its structs should not be directly used. So I created > interfaces in queue.h to query about its layout. If the implementation > is changed, these interfaces should be changed accordingly. Code using > these interfaces

Re: [Qemu-devel] [RFC PATCH v4 1/3] Mediated device Core driver

2016-05-25 Thread Alex Williamson
On Wed, 25 May 2016 01:28:15 +0530 Kirti Wankhede wrote: > 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 differnt drivers of different > devices. > > This module

[Qemu-devel] [PULL 1/1] qdev: Start disentangling bus from device

2016-05-25 Thread Andreas Färber
Move bus type and related APIs to a separate file bus.c. This is a first step in breaking up qdev.c into more manageable chunks. Reviewed-by: Peter Maydell [AF: Rebased onto osdep.h] Signed-off-by: Andreas Färber --- hw/core/Makefile.objs | 1 +

[Qemu-devel] [PULL 0/1] QOM devices patch queue 2016-05-25

2016-05-25 Thread Andreas Färber
Hello Peter, This is my QOM (devices) patch queue. Please pull. I've needed to build-fix it twice by now, so if I fixed the #includes wrongly please pick it up as patch and tweak it or apply a cleanup on top. Thanks, Andreas P.S. I don't seem to have a MAINTAINERS patch to go with it yet, but

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Pranith Kumar
On Wed, May 25, 2016 at 3:25 PM, Alex Bennée wrote: > Should we make the emitting of the function call/TCGop conditional on > MTTCG being enabled? If we are running in round-robin mode there is no > need to issue any fence operations. > Also, we should check if SMP(> 1

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Pranith Kumar
On Wed, May 25, 2016 at 3:43 PM, Sergey Fedorov wrote: > > I think it would better not to defer native support for the operation. > It should be relatively simple instruction. Otherwise we could wind up > deferring this indefinitely. > Agreed. I will go with the native

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Jianjun Duan
On 05/25/2016 12:22 PM, Paolo Bonzini wrote: >> 1 QTAILQ should only be accessed using the interfaces defined in >> queue.h. Its structs should not be directly used. So I created >> interfaces in queue.h to query about its layout. If the implementation >> is changed, these interfaces should be

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Richard Henderson
On 05/25/2016 12:25 PM, Alex Bennée wrote: That would solves the problem of converting the various backends piecemeal - although obviously we should move to all backends having "native" support ASAP. However by introducing expensive substitute functions we will slow down the translations as each

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Sergey Fedorov
On 25/05/16 22:59, Pranith Kumar wrote: > On Wed, May 25, 2016 at 3:43 PM, Sergey Fedorov wrote: >> I think it would better not to defer native support for the operation. >> It should be relatively simple instruction. Otherwise we could wind up >> deferring this

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Pranith Kumar
Hi Richard, Thank you for the helpful comments. On Wed, May 25, 2016 at 1:35 PM, Richard Henderson wrote: > On 05/24/2016 10:18 AM, Pranith Kumar wrote: >> diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h >> index 92be341..93ea42e 100644 >> ---

  1   2   3   4   >