Re: [Qemu-devel] [PATCHv3] block: add event when disk usage exceeds threshold

2014-12-02 Thread Francesco Romani
- Original Message - From: Francesco Romani from...@redhat.com To: Eric Blake ebl...@redhat.com Cc: kw...@redhat.com, lcapitul...@redhat.com, qemu-devel@nongnu.org, stefa...@redhat.com, mdr...@linux.vnet.ibm.com Sent: Tuesday, December 2, 2014 8:47:45 AM Subject: Re: [Qemu-devel]

Re: [Qemu-devel] [PATCH for-2.3 0/6] vmdk: A few small fixes

2014-12-02 Thread Markus Armbruster
Fam Zheng f...@redhat.com writes: Here are some improvements on miscellaneous things such as CID generation, comments, input validation. Fam Zheng (6): vmdk: Use g_random_int to generate CID vmdk: Fix comment to match code of extent lines vmdk: Clean up descriptor file reading

Re: [Qemu-devel] [PATCH v2] e1000: defer packets until BM enabled

2014-12-02 Thread Jason Wang
On Tue, Dec 2, 2014 at 2:06 AM, Michael S. Tsirkin m...@redhat.com wrote: Some guests seem to set BM for e1000 after enabling RX. If packets arrive in the window, device is wedged. Probably works by luck on real hardware, work around this by making can_receive depend on BM. Tested-by:

Re: [Qemu-devel] [PATCH v2 01/13] block: Make essential BlockDriver objects public

2014-12-02 Thread Max Reitz
On 2014-12-01 at 16:59, Eric Blake wrote: On 11/27/2014 07:48 AM, Max Reitz wrote: There are some block drivers which are essential to QEMU and may not be removed: These are raw, file and qcow2 (as the default non-raw format). Make their BlockDriver objects public so they can be directly

Re: [Qemu-devel] [PATCH v2 02/13] block: Omit bdrv_find_format for essential drivers

2014-12-02 Thread Max Reitz
On 2014-12-01 at 17:01, Eric Blake wrote: On 11/27/2014 07:48 AM, Max Reitz wrote: We can always assume raw, file and qcow2 being available; so do not use bdrv_find_format() to locate their BlockDriver objects but statically reference the respective objects. Cc: qemu-sta...@nongnu.org

Re: [Qemu-devel] [PATCH 0/3] blockdev: Add read-only option to change-blockdev

2014-12-02 Thread Max Reitz
On 2014-11-28 at 16:43, Markus Armbruster wrote: Kevin Wolf kw...@redhat.com writes: Am 20.11.2014 um 13:44 hat Max Reitz geschrieben: The 'change' QMP and HMP command allows replacing the medium in drives which support this, e.g. floppy disk drives. For some drives, the medium carries

Re: [Qemu-devel] [PATCH v4 0/3] chardev: Add -qmp-pretty

2014-12-02 Thread Max Reitz
On 2014-11-28 at 16:55, Markus Armbruster wrote: Copying Luiz. Max Reitz mre...@redhat.com writes: This series does not add new functionality. Adding a QMP monitor with prettily formatted JSON output can be done as follows: $ qemu -chardev stdio,id=mon0 -mon

Re: [Qemu-devel] [PATCH v8 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-12-02 Thread Max Reitz
On 2014-12-01 at 19:52, John Snow wrote: On 11/27/2014 04:41 AM, Max Reitz wrote: On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same

Re: [Qemu-devel] [PATCH v3 06/22] qcow2: Helper for refcount array reallocation

2014-12-02 Thread Max Reitz
On 2014-11-28 at 11:46, Stefan Hajnoczi wrote: On Thu, Nov 27, 2014 at 04:11:12PM +0100, Max Reitz wrote: On 2014-11-27 at 16:09, Stefan Hajnoczi wrote: On Thu, Nov 20, 2014 at 06:06:22PM +0100, Max Reitz wrote: +/** + * Reallocates *array so that it can hold new_size entries. *size must

Re: [Qemu-devel] [PATCH v3 07/22] qcow2: Helper function for refcount modification

2014-12-02 Thread Max Reitz
On 2014-11-28 at 12:26, Stefan Hajnoczi wrote: On Thu, Nov 27, 2014 at 04:32:52PM +0100, Max Reitz wrote: On 2014-11-27 at 16:21, Stefan Hajnoczi wrote: On Thu, Nov 20, 2014 at 06:06:23PM +0100, Max Reitz wrote: @@ -583,7 +608,12 @@ static int QEMU_WARN_UNUSED_RESULT

Re: [Qemu-devel] [PATCH v3 10/22] qcow2: refcount_order parameter for qcow2_create2

2014-12-02 Thread Max Reitz
On 2014-11-27 at 17:25, Stefan Hajnoczi wrote: On Thu, Nov 20, 2014 at 06:06:26PM +0100, Max Reitz wrote: @@ -2003,6 +2015,7 @@ static int qcow2_create(const char *filename, QemuOpts *opts, Error **errp) size_t cluster_size = DEFAULT_CLUSTER_SIZE; PreallocMode prealloc; int

Re: [Qemu-devel] [PATCH v3 07/22] qcow2: Helper function for refcount modification

2014-12-02 Thread Max Reitz
On 2014-11-28 at 12:11, Stefan Hajnoczi wrote: On Thu, Nov 20, 2014 at 06:06:23PM +0100, Max Reitz wrote: @@ -1711,7 +1746,7 @@ static int calculate_refcounts(BlockDriverState *bs, BdrvCheckResult *res, static void compare_refcounts(BlockDriverState *bs, BdrvCheckResult *res,

Re: [Qemu-devel] [PATCH v3 18/22] qcow2: Use intermediate helper CB for amend

2014-12-02 Thread Max Reitz
On 2014-11-28 at 15:13, Stefan Hajnoczi wrote: On Thu, Nov 20, 2014 at 06:06:34PM +0100, Max Reitz wrote: @@ -2674,6 +2743,7 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts, bool encrypt; int ret; QemuOptDesc *desc = opts-list-desc; +

Re: [Qemu-devel] Update on TCG Multithreading

2014-12-02 Thread Dr. David Alan Gilbert
* Mark Burton (mark.bur...@greensocs.com) wrote: All - first a huge thanks for those who have contributed, and those who have expressed an interest in helping out. One issue I???d like to see more opinions on is the question of a cache per core, or a shared cache. I have heard anecdotal

Re: [Qemu-devel] [PATCH v2 0/3] block: Don't probe for unknown backing file format

2014-12-02 Thread Kevin Wolf
Am 28.11.2014 um 12:33 hat Stefan Hajnoczi geschrieben: On Tue, Nov 25, 2014 at 06:12:39PM +0100, Kevin Wolf wrote: v2: - Added two patches to make the test case actually work properly and not just by accident on my laptop. [Max] - Fixed comment in test case [Max] Kevin Wolf (3):

Re: [Qemu-devel] [PATCH] qemu-iotests: 060: Filter the real disk size

2014-12-02 Thread Kevin Wolf
Am 27.11.2014 um 15:08 hat Kevin Wolf geschrieben: The real on-disk size of an image depends on things like the host filesystem. _img_info already filters it out, use the function in 060. Signed-off-by: Kevin Wolf kw...@redhat.com Applied to block-next. Kevin

Re: [Qemu-devel] [PATCH] qemu-iotests: 082: Filter the real disk size

2014-12-02 Thread Kevin Wolf
Am 27.11.2014 um 17:28 hat Michael Mueller geschrieben: The real on-disk size of an image depends on things like the host filesystem. _img_info already filters it out, use the function in 082. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com Thanks, applied to the block-next branch.

Re: [Qemu-devel] [PATCH v3 0/7] parallels format support improvements

2014-12-02 Thread Denis V. Lunev
On 06/11/14 15:54, Denis V. Lunev wrote: The patchset implements additional compatibility bits for Parallels format: - initial support of parsing of Parallels DiskDeskriptor.xml Typically Parallels disk bundle consists of several images which are glued by XML disk descriptor. Also XML

Re: [Qemu-devel] [PATCH for-2.3 0/6] vmdk: A few small fixes

2014-12-02 Thread Kevin Wolf
Am 02.12.2014 um 09:28 hat Markus Armbruster geschrieben: Fam Zheng f...@redhat.com writes: Here are some improvements on miscellaneous things such as CID generation, comments, input validation. Fam Zheng (6): vmdk: Use g_random_int to generate CID vmdk: Fix comment to match

Re: [Qemu-devel] [PATCH] target-mips: Output CP0.Config2-5 in the register dump

2014-12-02 Thread Leon Alrae
On 18/11/2014 03:20, Maciej W. Rozycki wrote: @@ -19276,6 +19276,10 @@ void mips_cpu_dump_state(CPUState *cs, F env-CP0_Status, env-CP0_Cause, env-CP0_EPC); cpu_fprintf(f, Config0 0x%08x Config1 0x%08x LLAddr 0x TARGET_FMT_lx \n, env-CP0_Config0,

Re: [Qemu-devel] [Bug 1383857] Re: aarch64: virtio disks don't show up in guest (neither blk nor scsi)

2014-12-02 Thread Christoffer Dall
I was just about to get to testing this stuff, but thanks for working through it on your own, and apologies I didn't get to it before. Cc'ing Marc so he's aware of the progress. -Christoffer On Mon, Dec 1, 2014 at 3:46 PM, Richard Jones rjo...@redhat.com wrote: Finally found the problem, patch

Re: [Qemu-devel] [PATCH v2 01/13] block: Make essential BlockDriver objects public

2014-12-02 Thread Kevin Wolf
Am 27.11.2014 um 15:48 hat Max Reitz geschrieben: There are some block drivers which are essential to QEMU and may not be removed: These are raw, file and qcow2 (as the default non-raw format). Make their BlockDriver objects public so they can be directly referenced throughout the block layer

Re: [Qemu-devel] [PATCH] target-mips: Fix CP0.Config3.ISAOnExc write accesses

2014-12-02 Thread Leon Alrae
On 18/11/2014 03:59, Maciej W. Rozycki wrote: Please note that for this validation I'm using an artificial microMIPS processor that also has an FPU implemented, so that our microMIPS FP support is correctly validated too (I don't really know if there exists any real microMIPS processor

Re: [Qemu-devel] [PATCH v2 03/13] block/vvfat: qcow driver may not be found

2014-12-02 Thread Kevin Wolf
Am 27.11.2014 um 15:48 hat Max Reitz geschrieben: Although virtually impossible right now, bdrv_find_format(qcow) may fail. The vvfat block driver should heed that case. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz mre...@redhat.com I wonder what the subtle breakage would be that we

[Qemu-devel] [PATCH v2 0/7] coroutine: optimizations

2014-12-02 Thread Paolo Bonzini
As discussed in the other thread, this brings speedups from dropping the coroutine mutex (which serializes multiple iothreads, too) and using ELF thread-local storage. The speedup in perf/cost is about 50% (190-125). Windows port tested with tests/test-coroutine.exe under Wine. Paolo v1-v2:

[Qemu-devel] [PATCH v2 3/7] test-coroutine: avoid overflow on 32-bit systems

2014-12-02 Thread Paolo Bonzini
unsigned long is not large enough to represent 10 * duration there. Just use floating point. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- tests/test-coroutine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c

[Qemu-devel] [PATCH v2 1/7] coroutine-ucontext: use __thread

2014-12-02 Thread Paolo Bonzini
ELF thread local storage is about 10% faster on tests/test-coroutine's perf/cost test. The timing on my machine is 190ns per iteration with pthread TLS, 170 with ELF TLS. Based on a patch by Kevin Wolf and Peter Lieven, but redone to follow the model of coroutine-win32.c (including the important

[Qemu-devel] [PATCH v2 7/7] coroutine: try harder not to delete coroutines

2014-12-02 Thread Paolo Bonzini
From: Peter Lieven p...@kamp.de Placing coroutines on the global pool should be preferrable, because it can help all threads. But if the global pool is full, we can still try to save some allocations by stashing completed coroutines on the local pool. This is quite cheap too, because it does

[Qemu-devel] [PATCH v2 2/7] qemu-thread: add per-thread atexit functions

2014-12-02 Thread Paolo Bonzini
Destructors are the main additional feature of pthread TLS compared to __thread. If we were using C++ (hint, hint!) we could have used thread-local objects with a destructor. Since we are not, instead, we add a simple Notifier-based API. Note that the notifier must be per-thread as well. We

[Qemu-devel] [PATCH v2 4/7] QSLIST: add lock-free operations

2014-12-02 Thread Paolo Bonzini
These operations are trivial to implement and do not have ABA problems. They are enough to implement simple multiple-producer, single consumer lock-free lists or, as in the next patch, the multiple consumers can steal a whole batch of elements and process them at their leisure. Signed-off-by:

[Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex

2014-12-02 Thread Paolo Bonzini
This patch removes the mutex by using fancy lock-free manipulation of the pool. Lock-free stacks and queues are not hard, but they can suffer from the ABA problem so they are better avoided unless you have some deferred reclamation scheme like RCU. Otherwise you have to stick with adding to a

[Qemu-devel] [PATCH v2 6/7] coroutine: drop qemu_coroutine_adjust_pool_size

2014-12-02 Thread Paolo Bonzini
This is not needed anymore. The new TLS-based algorithm is adaptive. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/block-backend.c | 4 include/block/coroutine.h | 10 -- qemu-coroutine.c | 4 3 files changed, 18 deletions(-) diff --git

[Qemu-devel] [RFC v2 1/6] bitmap: add atomic set functions

2014-12-02 Thread Stefan Hajnoczi
Use atomic_or() for atomic bitmaps where several threads may set bits at the same time. This avoids the race condition between threads loading an element, bitwise ORing, and then storing the element. When setting all bits in a word we can avoid atomic ops and instead just use an smp_wmb() write

[Qemu-devel] [RFC v2 0/6] memory: make dirty_memory[] accesses atomic

2014-12-02 Thread Stefan Hajnoczi
v2: * Make bitmap_set_atomic() and bitmap_test_and_clear_atomic() faster by replacing the inner loop with cheaper operations. I did use smp_wmb() in bitmap_set_atomic() so that the function is always a write barrier, no matter which code path is taken. [Paolo] The dirty_memory[] bitmap

[Qemu-devel] [RFC v2 6/6] memory: make cpu_physical_memory_sync_dirty_bitmap() fully atomic

2014-12-02 Thread Stefan Hajnoczi
The fast path of cpu_physical_memory_sync_dirty_bitmap() directly manipulates the dirty bitmap. Use atomic_xchg() to make the test-and-clear atomic. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- include/exec/ram_addr.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[Qemu-devel] [RFC v2 2/6] bitmap: add atomic test and clear

2014-12-02 Thread Stefan Hajnoczi
The new bitmap_test_and_clear_atomic() function clears a range and returns whether or not the bits were set. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- include/qemu/bitmap.h | 2 ++ util/bitmap.c | 37 + 2 files changed, 39 insertions(+)

[Qemu-devel] [RFC v2 4/6] migration: move dirty bitmap sync to ram_addr.h

2014-12-02 Thread Stefan Hajnoczi
The dirty memory bitmap is managed by ram_addr.h and copied to migration_bitmap[] periodically during live migration. Move the code to sync the bitmap to ram_addr.h where related code lives. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- arch_init.c | 46

[Qemu-devel] [RFC v2 5/6] memory: replace cpu_physical_memory_reset_dirty() with test-and-clear

2014-12-02 Thread Stefan Hajnoczi
The cpu_physical_memory_reset_dirty() function is sometimes used together with cpu_physical_memory_get_dirty(). This is not atomic since two separate accesses to the dirty memory bitmap are made. Turn cpu_physical_memory_reset_dirty() into the atomic cpu_physical_memory_test_and_clear_dirty().

[Qemu-devel] [RFC v2 3/6] memory: use atomic ops for setting dirty memory bits

2014-12-02 Thread Stefan Hajnoczi
Use set_bit_atomic() and bitmap_set_atomic() so that multiple threads can dirty memory without race conditions. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- I had to get creative to stay under 80 characters per line. I'm open to suggestions if you prefer me to format it another way.

Re: [Qemu-devel] [PATCH] target-mips: Output CP0.Config2-5 in the register dump

2014-12-02 Thread Maciej W. Rozycki
On Tue, 2 Dec 2014, Leon Alrae wrote: @@ -19276,6 +19276,10 @@ void mips_cpu_dump_state(CPUState *cs, F env-CP0_Status, env-CP0_Cause, env-CP0_EPC); cpu_fprintf(f, Config0 0x%08x Config1 0x%08x LLAddr 0x TARGET_FMT_lx \n, env-CP0_Config0,

Re: [Qemu-devel] [PATCH v2 00/13] block: Various Coverity-spotted fixes

2014-12-02 Thread Kevin Wolf
Am 27.11.2014 um 15:48 hat Max Reitz geschrieben: This series fixes various issues spotted by Coverity. None of these is critical; most are just If you do something crazy, qemu-img crashes or But what if there is no qcow2 driver?. Therefore, while these are bug fixes, it is a bit late to try

Re: [Qemu-devel] [PATCH] target-mips: Fix CP0.Config3.ISAOnExc write accesses

2014-12-02 Thread Maciej W. Rozycki
On Tue, 2 Dec 2014, Leon Alrae wrote: Please note that for this validation I'm using an artificial microMIPS processor that also has an FPU implemented, so that our microMIPS FP support is correctly validated too (I don't really know if there exists any real microMIPS processor that

Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex

2014-12-02 Thread Peter Lieven
On 02.12.2014 12:05, Paolo Bonzini wrote: This patch removes the mutex by using fancy lock-free manipulation of the pool. Lock-free stacks and queues are not hard, but they can suffer from the ABA problem so they are better avoided unless you have some deferred reclamation scheme like RCU.

Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex

2014-12-02 Thread Paolo Bonzini
On 02/12/2014 13:09, Peter Lieven wrote: -static void __attribute__((destructor)) coroutine_pool_cleanup(void) -{ -Coroutine *co; -Coroutine *tmp; - -QSLIST_FOREACH_SAFE(co, pool, pool_next, tmp) { -QSLIST_REMOVE_HEAD(pool, pool_next); -

Re: [Qemu-devel] [RFC v2 2/6] bitmap: add atomic test and clear

2014-12-02 Thread Paolo Bonzini
On 02/12/2014 12:23, Stefan Hajnoczi wrote: The new bitmap_test_and_clear_atomic() function clears a range and returns whether or not the bits were set. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- include/qemu/bitmap.h | 2 ++ util/bitmap.c | 37

Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex

2014-12-02 Thread Peter Lieven
On 02.12.2014 13:13, Paolo Bonzini wrote: On 02/12/2014 13:09, Peter Lieven wrote: -static void __attribute__((destructor)) coroutine_pool_cleanup(void) -{ -Coroutine *co; -Coroutine *tmp; - -QSLIST_FOREACH_SAFE(co, pool, pool_next, tmp) { -QSLIST_REMOVE_HEAD(pool,

Re: [Qemu-devel] Vhost-user - multi queue support

2014-12-02 Thread Michael S. Tsirkin
On Tue, Dec 02, 2014 at 11:42:22AM +, Long, Thomas wrote: Hi All, I’m just wondering what the status is with regards to supporting multi-queue in Vhost-user? I see that Nikolaev has developed a patch to support this feature:

[Qemu-devel] [PATCH v3] qtest/bios-tables: Add DMAR aml file and enable intel_iommu for q35

2014-12-02 Thread Vasilis Liaskovitis
We generate the expected DMAR table and enable intel_iommu on q35 to test the table. Signed-off-by: Vasilis Liaskovitis vlias...@gmail.com --- tests/acpi-test-data/q35/DMAR | Bin 0 - 64 bytes tests/bios-tables-test.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode

Re: [Qemu-devel] [PATCH v2] qtest/bios-tables: Add DMAR unit test on intel_iommu for q35

2014-12-02 Thread Vasilis Liaskovitis
On Mon, Nov 23, 2014 at 04:25:05PM +0200, Marcel Apfelbaum wrote: On Mon, 2014-11-24 at 14:37 +0100, Vasilis Liaskovitis wrote: The test enables intel_iommu on q35, looks for and reads the DMAR table as well as its only DRHC structure (for now), checking the header and checksums. Hi

Re: [Qemu-devel] [Xen-devel] [PATCH] increase maxmem before calling xc_domain_populate_physmap

2014-12-02 Thread Stefano Stabellini
On Mon, 1 Dec 2014, Don Slutz wrote: On 12/01/14 10:37, Stefano Stabellini wrote: On Mon, 1 Dec 2014, Don Slutz wrote: On 11/27/14 05:48, Stefano Stabellini wrote: [...] Works fine in both claim modes and with PoD used (maxmem memory). Do not know how to test with tmem. I

Re: [Qemu-devel] [RFC v2 1/6] bitmap: add atomic set functions

2014-12-02 Thread Paolo Bonzini
On 02/12/2014 12:23, Stefan Hajnoczi wrote: Use atomic_or() for atomic bitmaps where several threads may set bits at the same time. This avoids the race condition between threads loading an element, bitwise ORing, and then storing the element. When setting all bits in a word we can avoid

Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex

2014-12-02 Thread Paolo Bonzini
On 02/12/2014 13:18, Peter Lieven wrote: On 02.12.2014 13:13, Paolo Bonzini wrote: On 02/12/2014 13:09, Peter Lieven wrote: -static void __attribute__((destructor)) coroutine_pool_cleanup(void) -{ -Coroutine *co; -Coroutine *tmp; - -QSLIST_FOREACH_SAFE(co, pool, pool_next,

Re: [Qemu-devel] [PATCH] target-i386: Intel xsaves

2014-12-02 Thread Paolo Bonzini
On 02/12/2014 13:19, Wanpeng Li wrote: Add xsaves related definition, it also add corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li wanpeng...@linux.intel.com --- target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15 +++ target-i386/machine.c |

[Qemu-devel] AMD video card passthrough reset issues

2014-12-02 Thread Lucio Andrés Illanes Albornoz
Hello, I'm doing secondary VGA passthrough with an AMD Radeon R7 260X using QEMU v2.1.2 w/ KVM and VFIO on Debian v7.7 (wheezy) (qemu v2.1+dfsg-5~bpo70+1 from wheezy-backports) and kernel version 3.16.5 (from wheezy-backports as well) and Windows 8.1 Update 1 (x64) as the guest OS. At

[Qemu-devel] [RFC PATCH] hw/arm/virt: Add support for NUMA on ARM64

2014-12-02 Thread Shannon Zhao
Add support for NUMA on ARM64. Tested successfully running a guest Linux kernel with the following patch applied: - arm64:numa: adding numa support for arm64 platforms. http://www.spinics.net/lists/arm-kernel/msg365316.html Example qemu command line: qemu-system-aarch64 \ -enable-kvm -smp 4\

[Qemu-devel] [PATCH RFC v5 00/19] qemu: towards virtio-1 host support

2014-12-02 Thread Cornelia Huck
Another iteration of virtio-1 patches for qemu, as always available on git://github.com/cohuck/qemu virtio-1 This one seems to work together with the current vhost-next patches (well, I can ping :) Changes from v4: - add helpers for feature bit manipulation and checking - use 64 bit feature bits

[Qemu-devel] [PATCH RFC v5 03/19] virtio: feature bit manipulation helpers

2014-12-02 Thread Cornelia Huck
Add virtio_{add,clear}_feature helper functions for manipulating a feature bits variable. This has some benefits over open coding: - add check that the bit is in a sane range - make it obvious at a glance what is going on - have a central point to change when we want to extend feature bits

[Qemu-devel] [PATCH RFC v5 04/19] virtio: add feature checking helpers

2014-12-02 Thread Cornelia Huck
Add a helper function for checking whether a bit is set in the guest features for a vdev as well as one that works on a feature bit set. Convert code that open-coded this: It cleans up the code and makes it easier to extend the guest feature bits. Signed-off-by: Cornelia Huck

[Qemu-devel] [PATCH RFC v5 01/19] linux-headers/virtio_config: Update with VIRTIO_F_VERSION_1

2014-12-02 Thread Cornelia Huck
From: Thomas Huth th...@linux.vnet.ibm.com Add the new VIRTIO_F_VERSION_1 definition to the virtio_config.h linux header. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- linux-headers/linux/virtio_config.h |3 +++ 1 file changed,

[Qemu-devel] [PATCH RFC v5 05/19] virtio: support more feature bits

2014-12-02 Thread Cornelia Huck
With virtio-1, we support more than 32 feature bits. Let's extend both host and guest features to 64, which should suffice for a while. vhost and migration have been ignored for now. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/9pfs/virtio-9p-device.c |2 +-

[Qemu-devel] [PATCH RFC v5 02/19] virtio: cull virtio_bus_set_vdev_features

2014-12-02 Thread Cornelia Huck
The only user of this function was virtio-ccw, and it should use virtio_set_features() like everybody else: We need to make sure that bad features are masked out properly, which this function did not do. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck

[Qemu-devel] [PATCH RFC v5 06/19] virtio: endianness checks for virtio 1.0 devices

2014-12-02 Thread Cornelia Huck
Add code that checks for the VERSION_1 feature bit in order to make decisions about the device's endianness. This allows us to support transitional devices. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/virtio/virtio.c|6 +-

[Qemu-devel] [PATCH RFC v5 08/19] dataplane: allow virtio-1 devices

2014-12-02 Thread Cornelia Huck
Handle endianness conversion for virtio-1 virtqueues correctly. Note that dataplane now needs to be built per-target. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/block/dataplane/virtio-blk.c |4 +- hw/scsi/virtio-scsi-dataplane.c |2 +-

[Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Cornelia Huck
For virtio-1 devices, we allow a more complex queue layout that doesn't require descriptor table and rings on a physically-contigous memory area: add virtio_queue_set_rings() to allow transports to set this up. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/virtio/virtio.c

[Qemu-devel] [PATCH RFC v5 12/19] virtio: disallow late feature changes for virtio-1

2014-12-02 Thread Cornelia Huck
For virtio-1 devices, the driver must not attempt to set feature bits after it set FEATURES_OK in the device status. Simply reject it in that case. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/virtio/virtio.c | 16 ++-- include/hw/virtio/virtio.h |2 ++

[Qemu-devel] [PATCH RFC v5 09/19] s390x/css: Add a callback for when subchannel gets disabled

2014-12-02 Thread Cornelia Huck
From: Thomas Huth th...@linux.vnet.ibm.com We need a possibility to run code when a subchannel gets disabled. This patch adds the necessary infrastructure. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/css.c | 12

[Qemu-devel] [PATCH RFC v5 11/19] s390x/virtio-ccw: support virtio-1 set_vq format

2014-12-02 Thread Cornelia Huck
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com ---

[Qemu-devel] [PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0

2014-12-02 Thread Cornelia Huck
virtio-ccw should now have everything in place to operate virtio 1.0 devices, so let's enable revision 1. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/virtio-ccw.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h

[Qemu-devel] [PATCH RFC v5 16/19] virtio-net: support longer header

2014-12-02 Thread Cornelia Huck
virtio-1 devices always use num_buffers in the header, even if mergeable rx buffers have not been negotiated. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/net/virtio-net.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH RFC v5 17/19] virtio-net: enable virtio 1.0

2014-12-02 Thread Cornelia Huck
virtio-net (non-vhost) now should have everything in place to support virtio 1.0: let's enable the feature bit for it. Note that VIRTIO_F_VERSION_1 is technically a transport feature; once every device is ready for virtio 1.0, we can move setting this feature bit out of the individual devices.

[Qemu-devel] [PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call

2014-12-02 Thread Cornelia Huck
From: Thomas Huth th...@linux.vnet.ibm.com Handle the virtio-ccw revision according to what the guest sets. When revision 1 is selected, we have a virtio-1 standard device with byteswapping for the virtio rings. When a channel gets disabled, we have to revert to the legacy behavior in case the

[Qemu-devel] [PATCH RFC v5 18/19] virtio: support revision-specific features

2014-12-02 Thread Cornelia Huck
Devices may support different sets of feature bits depending on which revision they're operating at. Let's give the transport a way to re-query the device about its features when the revision has been changed. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/virtio-ccw.c

[Qemu-devel] [PATCH RFC v5 19/19] virtio-blk: revision specific feature bits

2014-12-02 Thread Cornelia Huck
Wire up virtio-blk to provide different feature bit sets depending on whether legacy or v1.0 has been requested. Note that VERSION_1 is still disabled due to missing ANY_LAYOUT support. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/block/virtio-blk.c | 19 +++ 1

[Qemu-devel] [PATCH RFC v5 13/19] virtio: allow to fail setting status

2014-12-02 Thread Cornelia Huck
virtio-1 allow setting of the FEATURES_OK status bit to fail if the negotiated feature bits are inconsistent: let's fail virtio_set_status() in that case and update virtio-ccw to post an error to the guest. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/virtio-ccw.c |

[Qemu-devel] [PATCH RFC v5 15/19] virtio-net: no writeable mac for virtio-1

2014-12-02 Thread Cornelia Huck
Devices operating as virtio 1.0 may not allow writes to the mac address in config space. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/net/virtio-net.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index d6d1b98..ebbea60 100644

Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex

2014-12-02 Thread Kevin Wolf
Am 02.12.2014 um 13:13 hat Paolo Bonzini geschrieben: On 02/12/2014 13:09, Peter Lieven wrote: -static void __attribute__((destructor)) coroutine_pool_cleanup(void) -{ -Coroutine *co; -Coroutine *tmp; - -QSLIST_FOREACH_SAFE(co, pool, pool_next, tmp) { -

Re: [Qemu-devel] QEMU Advent Calendar has begun - Day 1

2014-12-02 Thread Kashyap Chamarthy
On Mon, Dec 01, 2014 at 04:51:58PM +, Stefan Hajnoczi wrote: Today is the first day of QEMU Advent Calendar 2014, where an interesting and fun QEMU disk image is published every day. http://www.qemu-advent-calendar.org/ I won't spam the mailing list every day but I wanted to let you

Re: [Qemu-devel] [PATCH v3] qtest/bios-tables: Add DMAR aml file and enable intel_iommu for q35

2014-12-02 Thread Marcel Apfelbaum
On Tue, 2014-12-02 at 13:26 +0100, Vasilis Liaskovitis wrote: We generate the expected DMAR table and enable intel_iommu on q35 to test the table. Signed-off-by: Vasilis Liaskovitis vlias...@gmail.com --- tests/acpi-test-data/q35/DMAR | Bin 0 - 64 bytes tests/bios-tables-test.c |

[Qemu-devel] [RFC PATCH 1/3] block: add accounting for merged requests

2014-12-02 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c|2 ++ block/accounting.c |7 +++ block/qapi.c |2 ++ hmp.c |6 +- include/block/accounting.h |3 +++ qapi/block-core.json | 10 +- 6

[Qemu-devel] [RFC PATCH 3/3] virtio-blk: introduce multiread

2014-12-02 Thread Peter Lieven
this patch finally introduce multiread support to virtio-blk while multiwrite support was there for a long time read support was missing. To achieve this the patch does serveral things which might need futher explaination: - the whole merge and multireq logic is moved from block.c into

[Qemu-devel] [RFC PATCH 0/3] virtio-blk: add multiread support

2014-12-02 Thread Peter Lieven
this series adds the long missing multiread support to virtio-blk. some remarks: - i introduced rd_merged and wr_merged block accounting stats to blockstats as a generic interface which can be set from any driver that will introduce multirequst merging in the future. - the knob to disable

[Qemu-devel] [RFC PATCH 2/3] hw/virtio-blk: add a constant for max number of merged requests

2014-12-02 Thread Peter Lieven
As it was not obvious (at least for me) where the 32 comes from; add a constant for it. Signed-off-by: Peter Lieven p...@kamp.de --- hw/block/virtio-blk.c |2 +- include/hw/virtio/virtio-blk.h |4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Michael S. Tsirkin
On Tue, Dec 02, 2014 at 02:00:15PM +0100, Cornelia Huck wrote: For virtio-1 devices, we allow a more complex queue layout that doesn't require descriptor table and rings on a physically-contigous memory area: add virtio_queue_set_rings() to allow transports to set this up. Signed-off-by:

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Cornelia Huck
On Tue, 2 Dec 2014 16:46:28 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Dec 02, 2014 at 02:00:15PM +0100, Cornelia Huck wrote: For virtio-1 devices, we allow a more complex queue layout that doesn't require descriptor table and rings on a physically-contigous memory area: add

Re: [Qemu-devel] [PATCHv3] block: add event when disk usage exceeds threshold

2014-12-02 Thread Stefan Hajnoczi
On Fri, Nov 28, 2014 at 01:31:07PM +0100, Francesco Romani wrote: @@ -82,6 +83,8 @@ BlockDeviceInfo *bdrv_block_device_info(BlockDriverState *bs) info-iops_size = cfg.op_size; } +info-write_threshold = bdrv_usage_threshold_get(bs); Overall looks good but I notice that

Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes

2014-12-02 Thread Stefan Hajnoczi
On Thu, Nov 27, 2014 at 02:39:21PM +1100, Anton Blanchard wrote: Initialise our maximum page size capability to 64kB and increase the page_size variable from 16 to 32 bits. Signed-off-by: Anton Blanchard an...@samba.org -- Covered in NVM Express 1.1 specification 3.1.1 Offset 00h: CAP -

Re: [Qemu-devel] [Bug 1396052] [NEW] migration failed when running BurnInTest in guest

2014-12-02 Thread Stefan Hajnoczi
On Thu, Nov 27, 2014 at 02:50:59PM +0530, Amit Shah wrote: On (Tue) 25 Nov 2014 [09:32:58], z08687 wrote: Public bug reported: Hi, I found a live migration problem and have found out the reason, but I can't fix it up myself. I really need help. When live migration vm and it's

Re: [Qemu-devel] [PATCHv3] block: add event when disk usage exceeds threshold

2014-12-02 Thread Francesco Romani
- Original Message - From: Stefan Hajnoczi stefa...@redhat.com To: Francesco Romani from...@redhat.com Cc: kw...@redhat.com, mdr...@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitul...@redhat.com Sent: Tuesday, December 2, 2014 4:01:17 PM Subject: Re: [Qemu-devel] [PATCHv3]

[Qemu-devel] Vhost-user - multi queue support

2014-12-02 Thread Long, Thomas
Hi All, I'm just wondering what the status is with regards to supporting multi-queue in Vhost-user? I see that Nikolaev has developed a patch to support this feature: https://github.com/SnabbCo/qemu/commit/f41eeccf4ab6ea5970e2941ce2de0aae893b10f9 Are there any current plans to pull either this

[Qemu-devel] [PATCH] target-i386: Intel xsaves

2014-12-02 Thread Wanpeng Li
Add xsaves related definition, it also add corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li wanpeng...@linux.intel.com --- target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15 +++ target-i386/machine.c | 3 ++- 3 files changed, 19 insertions(+), 1

Re: [Qemu-devel] Update on TCG Multithreading

2014-12-02 Thread Kirill Batuzov
On Mon, 1 Dec 2014, Mark Burton wrote: One issue I’d like to see more opinions on is the question of a cache per core, or a shared cache. I have heard anecdotal evidence that a shared cache gives a major performance benefit…. Does anybody have anything more concrete? There is a

Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes

2014-12-02 Thread Kevin Wolf
Am 02.12.2014 um 16:04 hat Stefan Hajnoczi geschrieben: On Thu, Nov 27, 2014 at 02:39:21PM +1100, Anton Blanchard wrote: Initialise our maximum page size capability to 64kB and increase the page_size variable from 16 to 32 bits. Signed-off-by: Anton Blanchard an...@samba.org --

Re: [Qemu-devel] AMD video card passthrough reset issues

2014-12-02 Thread Alex Williamson
On Tue, 2014-12-02 at 13:53 +0100, Lucio Andrés Illanes Albornoz wrote: Hello, I'm doing secondary VGA passthrough with an AMD Radeon R7 260X using QEMU v2.1.2 w/ KVM and VFIO on Debian v7.7 (wheezy) (qemu v2.1 +dfsg-5~bpo70+1 from wheezy-backports) and kernel version 3.16.5 (from

Re: [Qemu-devel] [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Cornelia Huck
On Tue, 2 Dec 2014 15:54:44 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Tue, 2 Dec 2014 16:46:28 +0200 Michael S. Tsirkin m...@redhat.com wrote: pa == -1ULL tricks look quite ugly. Can't we set desc/avail/used unconditionally, and drop the pa value? And have

[Qemu-devel] checkpatch hang (was: [PATCH] target-mips/op_helper.c: Restore the order of helpers)

2014-12-02 Thread Maciej W. Rozycki
Hi Blue Swirl, On Wed, 5 Nov 2014, Maciej W. Rozycki wrote: Restore the order of helpers that used to be: unary operations (generic, then MIPS-specific), binary operations (generic, then MIPS-specific), compare operations. At one point FMA operations were inserted at a random place in

Re: [Qemu-devel] [PATCH] target-arm: ARM64: Adding EL1 AARCH32 guest support for KVM.

2014-12-02 Thread Peter Maydell
On 28 November 2014 at 13:06, Pranavkumar Sawargaonkar pranavku...@linaro.org wrote: In KVM ARM64 one can choose to run guest in 32bit mode i.e EL1 in AARCH32 mode. This patch adds qemu support for running guest EL1 in AARCH32 mode with virt as a machine model. Thanks for sending this patch.

Re: [Qemu-devel] AMD video card passthrough reset issues

2014-12-02 Thread Lucio Andrés Illanes Albornoz
On Tue, 02 Dec 2014 08:26:20 -0700 Alex Williamson alex.william...@redhat.com wrote: All of the Bonaire-based AMD GPUs seems to have issues with reset (R7790, R7 260/X). I've tried to engage AMD on this, but haven't gotten any response on this topic yet. For devices like this that don't

Re: [Qemu-devel] [PATCH v2 01/13] block: Make essential BlockDriver objects public

2014-12-02 Thread Eric Blake
On 12/02/2014 02:11 AM, Max Reitz wrote: -static BlockDriver bdrv_qcow2 = { +BlockDriver *bdrv_qcow2 = (BlockDriver){ Do we want any use of 'const', to avoid accidental manipulation of the pointer and/or pointed-to contents? Sounds good at first, but for instance qemu_opts_create()

[Qemu-devel] [PATCH] tests: Fix bios-tables-test -Werror compilation error

2014-12-02 Thread Maciej W. Rozycki
Fix: .../tests/bios-tables-test.c: In function 'main': .../tests/bios-tables-test.c:796:11: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result [-Werror=unused-result] cc1: all warnings being treated as errors make: *** [tests/bios-tables-test.o] Error 1

Re: [Qemu-devel] Vhost-user - multi queue support

2014-12-02 Thread Olivier MATZ
Hi All, On 12/02/2014 01:24 PM, Michael S. Tsirkin wrote: On Tue, Dec 02, 2014 at 11:42:22AM +, Long, Thomas wrote: Hi All, I’m just wondering what the status is with regards to supporting multi-queue in Vhost-user? I see that Nikolaev has developed a patch to support this feature:

  1   2   >