[Qemu-devel] [PATCH 0/3] target-i386: kvm: Use env->mcg_cap when setting up MCE

2015-11-25 Thread Eduardo Habkost
Instead of overwriting env->mcg_cap, make kvm_arch_init_vcpu(), use the value already set at the CPU object when initializing MCE. Except for the new "unsupported MCG_CAPS bits" warning, this patch doesn't change any of the existing QEMU behavior. The previous code set env->mcg_cap to: (MCE_CAP_

[Qemu-devel] [PATCH 2/3] target-i386: kvm: Use env->mcg_cap when setting up MCE

2015-11-25 Thread Eduardo Habkost
When setting up MCE, instead of using the MCE_*_DEF macros directly, just filter the existing env->mcg_cap value. As env->mcg_cap is already initialized as MCE_CAP_DEF|MCE_BANKS_DEF at target-i386/cpu.c:mce_init(), this doesn't change any behavior. But it will allow us to change mce_init() in the

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-25 Thread David Engraf
Am 25.11.2015 um 15:36 schrieb Paolo Bonzini: On 25/11/2015 15:04, David Engraf wrote: No, you don't. Who is reading iothread_locked during qemu_cond_wait_iothread? No one, because it is a thread-local variable whose address is never taken. prepare_mmio_access is reading iothread_locked

Re: [Qemu-devel] [PATCH] Revert "vhost: send SET_VRING_ENABLE at start/stop"

2015-11-25 Thread Thibaut Collet
On Wed, Nov 25, 2015 at 1:42 PM, Michael S. Tsirkin wrote: > This reverts commit 3a12f32229a046f4d4ab0a3a52fb01d2d5a1ab76. > > In case of live migration several queues can be enabled and not only the > first one. So informing backend that only the first queue is enabled is > wrong. > > Reported-by

Re: [Qemu-devel] [RFC PATCH V2 09/10] Qemu/VFIO: Add SRIOV VF migration support

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 11:32:23PM +0800, Lan, Tianyu wrote: > > On 11/25/2015 5:03 AM, Michael S. Tsirkin wrote: > >>>+void vfio_migration_cap_handle(PCIDevice *pdev, uint32_t addr, > >>>+ uint32_t val, int len) > >>>+{ > >>>+VFIOPCIDevice *vdev = DO_UPCAST(VF

Re: [Qemu-devel] [PATCH v2 14/14] iotests: Add "qemu-img map" test for VMDK extents

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/059 | 10 ++ > tests/qemu-iotests/059.out | 38 ++ > 2 files changed, 48 insertions(+) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1

Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051

2015-11-25 Thread Max Reitz
On 24.11.2015 22:17, Sascha Silbe wrote: > Dear Max, Hi! :-) > Max Reitz writes: > >> OK, so it is expected for s390x; however, this is strictly speaking not >> the output file for s390x but for any platform but PC. That's why I'd >> rather not have it in this “generic” reference output. >> >>

Re: [Qemu-devel] [PATCH v2 13/14] qemu-img: Use QAPI visitor to generate JSON

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > A visible improvement is that "filename" is now included in the output > if it's valid. > > Signed-off-by: Fam Zheng > --- > qemu-img.c | 39 --- > tests/qemu-iotests/122.out | 96 > ++

Re: [Qemu-devel] [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 12:21 AM, Lan Tianyu wrote: > On 2015年11月25日 13:30, Alexander Duyck wrote: >> No, what I am getting at is that you can't go around and modify the >> configuration space for every possible device out there. This >> solution won't scale. > > > PCI config space regs are emula

Re: [Qemu-devel] [RESEND RFC 2/6] device_tree: introduce load_device_tree_from_sysfs

2015-11-25 Thread Alex Bennée
Eric Auger writes: > This function returns the host device tree blob from sysfs > (/sys/firmware/devicetree/base). > > This has a runtime dependency on the dtc binary. This functionality > is useful for platform device passthrough where the host device tree > needs to be parsed to feed informati

Re: [Qemu-devel] [PATCH v2 12/14] qemu-img: Make MapEntry a QAPI struct

2015-11-25 Thread Eric Blake
On 11/25/2015 12:39 AM, Fam Zheng wrote: > The "flags" bit mask is expanded to two booleans, "data" and "zero"; > "bs" is replaced with "filename" string. > > Signed-off-by: Fam Zheng > --- > qapi/block-core.json | 28 > qemu-img.c | 48

Re: [Qemu-devel] [RFC PATCH V2 09/10] Qemu/VFIO: Add SRIOV VF migration support

2015-11-25 Thread Lan, Tianyu
On 11/25/2015 5:03 AM, Michael S. Tsirkin wrote: >+void vfio_migration_cap_handle(PCIDevice *pdev, uint32_t addr, >+ uint32_t val, int len) >+{ >+VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev); >+ >+if (addr == vdev->migration_cap + PCI_VF_MIG

[Qemu-devel] [PATCH v1 2/2] target-i386/kvm: Hyper-V SynIC timers MSR's support

2015-11-25 Thread Andrey Smetanin
Hyper-V SynIC timers are host timers that are configurable by guest through corresponding MSR's (HV_X64_MSR_STIMER*). Guest setup and use fired by host events(SynIC interrupt and appropriate timer expiration message) as guest clock events. The state of Hyper-V SynIC timers are stored in correspond

[Qemu-devel] [PATCH v1 3/7] kvm/x86: Rearrange func's declarations inside Hyper-V header

2015-11-25 Thread Andrey Smetanin
This rearrangement places functions declarations together according to their functionality, so future additions will be simplier. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roma

[Qemu-devel] [PATCH v1 1/2] include: update Hyper-V header to include SynIC timers defines

2015-11-25 Thread Andrey Smetanin
This patch brings in the necessary changes from the corresponding kernel patchset. It's included only for completeness; ideally these changes should arrive via the standard kernel header pull. Signed-off-by: Andrey Smetanin CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andr

[Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-25 Thread Andrey Smetanin
The SynIC message protocol mandates that the message slot is claimed by atomically setting message type to something other than HVMSG_NONE. If another message is to be delivered while the slot is still busy, message pending flag is asserted to indicate to the guest that the hypervisor wants to be n

[Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-25 Thread Andrey Smetanin
Per Hyper-V specification (and as required by Hyper-V-aware guests), SynIC provides 4 per-vCPU timers. Each timer is programmed via a pair of MSRs, and signals expiration by delivering a special format message to the configured SynIC message slot and triggering the corresponding synthetic interrup

[Qemu-devel] [PATCH v1 7/7] kvm/x86: Hyper-V SynIC timers

2015-11-25 Thread Andrey Smetanin
Per Hyper-V specification (and as required by Hyper-V-aware guests), SynIC provides 4 per-vCPU timers. Each timer is programmed via a pair of MSRs, and signals expiration by delivering a special format message to the configured SynIC message slot and triggering the corresponding synthetic interrup

[Qemu-devel] [PATCH v1 2/7] drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

2015-11-25 Thread Andrey Smetanin
This struct is required for Hyper-V SynIC timers implementation inside KVM and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into Hyper-V UAPI header. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Hai

[Qemu-devel] [PATCH v1 0/2] QEMU: Hyper-V SynIC timers MSR's support

2015-11-25 Thread Andrey Smetanin
Hyper-V SynIC timers are host timers that are configurable by guest through corresponding MSR's (HV_X64_MSR_STIMER*). Guest setup and use fired by host events(SynIC interrupt and appropriate timer expiration message) as guest clock events. The state of Hyper-V SynIC timers are stored in correspond

[Qemu-devel] [PATCH v1 5/7] kvm/x86: Hyper-V internal helper to read MSR HV_X64_MSR_TIME_REF_COUNT

2015-11-25 Thread Andrey Smetanin
This helper will be used also in Hyper-V SynIC timers implementation. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org ---

[Qemu-devel] [PATCH v1 1/7] drivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header

2015-11-25 Thread Andrey Smetanin
This constant is required for Hyper-V SynIC timers MSR's support by userspace(QEMU). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@n

[Qemu-devel] [PATCH v1 4/7] kvm/x86: Added Hyper-V vcpu_to_hv_vcpu()/hv_vcpu_to_vcpu() helpers

2015-11-25 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.h | 20 ++-- 1 file changed, 14 ins

Re: [Qemu-devel] [trivial for-2.6] util/id: fully allocate names table

2015-11-25 Thread John Snow
On 11/25/2015 03:18 AM, Markus Armbruster wrote: > John Snow writes: > >> Trivial: this array should be allocated to have ID_MAX entries always. >> Otherwise if someone were to forget to expand this table, the assertion >> in the id generator won't actually trigger; it will read junk data. > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] spapr: Add /system-id

2015-11-25 Thread Alexander Graf
On 18.11.15 11:49, David Gibson wrote: > On Wed, Nov 18, 2015 at 06:45:39PM +1100, Alexey Kardashevskiy wrote: >> On 11/09/2015 07:47 PM, David Gibson wrote: >>> On Mon, Nov 09, 2015 at 05:47:17PM +1100, Alexey Kardashevskiy wrote: Section B.6.2.1 Root Node Properties of PAPR specification d

Re: [Qemu-devel] [PATCH for-2.5] vnc: fix segfault

2015-11-25 Thread Anthony PERARD
On Wed, Nov 25, 2015 at 08:09:58AM +0100, Gerd Hoffmann wrote: > Commit "c7628bf vnc: only alloc server surface with clients connected" > missed one rarely used codepath (cirrus with guest drivers using 2d > accel) where we have to check for the server surface being present, > to avoid qemu crashin

Re: [Qemu-devel] [PATCH v3 1/2] qga: flush explicitly when needed

2015-11-25 Thread Laszlo Ersek
On 11/25/15 13:59, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > According to the specification: > http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html > > "the application shall ensure that output is not directly followed by > input without an intervening call

Re: [Qemu-devel] [RFC v1] virtio-crypto specification

2015-11-25 Thread Denis Crasta
+Michal and Sebastian. Denis -Original Message- From: Sethi Varun-B16395 Sent: Wednesday, November 25, 2015 4:41 AM To: Gonglei (Arei) ; virtio-...@lists.oasis-open.org; qemu-devel@nongnu.org Cc: Hanweidong (Randy) ; m...@redhat.com; Claudio Fontana ; Huangpeng (Peter) ; Lauri Leukkun

Re: [Qemu-devel] [PATCH v2 for-2.5? 0/4] qjson: save a lot of memory

2015-11-25 Thread Markus Armbruster
Paolo Bonzini writes: > This patch from 2011 (!) saves about 96% of the allocation cost (down > from 500 MiB to 20 MiB) for check-qjson. Looks good to me apart from the incomplete transition to recursive descent in PATCH 2.

Re: [Qemu-devel] [PATCH 0/2] Fix regression in object creation order

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 11:52, Daniel P. Berrange wrote: > This fixes the regression in object creation warning identified > by Paolo here: > > https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04994.html > > It provides an alternative fix to the original problem, by > simply removing the warnin

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 15:04, David Engraf wrote: >>> >> >> No, you don't. Who is reading iothread_locked during >> qemu_cond_wait_iothread? No one, because it is a thread-local variable >> whose address is never taken. > > prepare_mmio_access is reading iothread_locked by using > qemu_mutex_iothread_l

Re: [Qemu-devel] [RESEND RFC 1/6] hw/vfio/platform: amd-xgbe device

2015-11-25 Thread Alex Bennée
Eric Auger writes: > This patch introduces the amd-xgbe VFIO platform device. It > allows the guest to do passthrough on a device exposing an > "amd,xgbe-seattle-v1a" compat string. > > Signed-off-by: Eric Auger Reviewed-by: Alex Bennée > --- > hw/vfio/Makefile.objs | 1 + > hw/v

[Qemu-devel] [PULL 2/2] block-migration: limit the memory usage

2015-11-25 Thread Juan Quintela
From: Wen Congyang If we set migration speed in a very large value, block-migration will try to read all data to the memory. Because (block_mig_state.submitted + block_mig_state.read_done) * BLOCK_SIZE will be overflow, and it will be always less than rate limit. There is no need to read to

[Qemu-devel] [PULL 1/2] Assume madvise for (no)hugepage works

2015-11-25 Thread Juan Quintela
From: "Dr. David Alan Gilbert" madvise() returns EINVAL in the case of many failures, but also returns it in cases where the host kernel doesn't have THP enabled. Postcopy only really cares that THP is off before it detects faults, and turns it back on afterwards; so we're going to have to assume

Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts

2015-11-25 Thread Markus Armbruster
Paolo Bonzini writes: > JSON is LL(1) and our parser indeed needs only 1 token lookahead. > Saving the parser context is mostly unnecessary; "Mit Kanonen auf Spatzen" (shooting cannons at sparrows). > we can replace it > with peeking at the next

[Qemu-devel] [PULL 0/2] Migration pull request

2015-11-25 Thread Juan Quintela
ommit e85dda8070b20dd8765d52daf64de70a9ccf395f: Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20151125' into staging (2015-11-25 12:09:34 +) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20151125 for you to fetc

[Qemu-devel] [PULL 4/6] raw-posix.c: Make GetBSDPath() handle caching options

2015-11-25 Thread Kevin Wolf
From: Programmingkid Add support for caching options that can be specified from the command line. The CD-ROM raw char device bypasses the host page cache and therefore has alignment requirements. Alignment probing is necessary so only use the raw char device if BDRV_O_NOCACHE is set. This patc

[Qemu-devel] [PULL 1/6] tests/Makefile: Add more dependencies for test-timed-average

2015-11-25 Thread Kevin Wolf
'make check' failed to compile the test case for mingw because of undefined references. Pull in a few more dependencies so that it builds. Signed-off-by: Kevin Wolf Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- tests/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-

[Qemu-devel] [PULL 0/6] Block patches for 2.5.0-rc2

2015-11-25 Thread Kevin Wolf
The following changes since commit 1aae36df4b8ed884c6ef6995e70c67fad79b49df: Merge remote-tracking branch 'remotes/armbru/tags/pull-ivshmem-2015-11-25' into staging (2015-11-25 11:38:03 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for yo

[Qemu-devel] [PULL 6/6] qemu-iotests: Add -nographic when starting QEMU in 119 and 120

2015-11-25 Thread Kevin Wolf
From: Fam Zheng Otherwise, a window flashes on my desktop (built with SDL). Add this as other cases have it. Signed-off-by: Fam Zheng Message-id: 1448245930-15031-1-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/119 | 2 +- tests/qemu-iotests/120 | 2 +- 2 file

[Qemu-devel] [PULL 2/6] test-aio: Fix event notifier cleanup

2015-11-25 Thread Kevin Wolf
One test case closed an event notifier (event_notifier_cleanup()) without first disabling it (set_event_notifier(..., NULL)). This resulted in a leftover handle 0 that was added to each subsequent WaitForMultipleObjects() call, causing the function to fail (invalid handle). Signed-off-by: Kevin Wo

[Qemu-devel] [PULL 5/6] block/qapi: Plug memory leak on query-block error path

2015-11-25 Thread Kevin Wolf
From: Markus Armbruster Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/qapi.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index d20262d..267

[Qemu-devel] [PULL 3/6] nand: fix flash erase when oob is in memory

2015-11-25 Thread Kevin Wolf
From: Ricard Wanderlof For the "main area on file, oob in memory" case, fix the shifts so that we erase the correct number of pages. Signed-off-by: Ricard Wanderlöf Signed-off-by: Kevin Wolf --- hw/block/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nand.

Re: [Qemu-devel] [PATCH for-2.5] qga: Better mapping of SEEK_* in guest-file-seek

2015-11-25 Thread Eric Blake
On 11/25/2015 01:11 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 11/24/2015 11:57 AM, Eric Blake wrote: >>> Exposing OS-specific SEEK_ constants in our qapi was a mistake >>> (if the host has SEEK_CUR as 1, but the guest has it as 2, then >>> the semantics are unclear what should hap

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-25 Thread David Engraf
Am 25.11.2015 um 14:26 schrieb Paolo Bonzini: On 25/11/2015 13:31, David Engraf wrote: Hi Paolo, please check the new version. I removed changing the iothread_locked variable. But I still need to set the correct value of iothread_locked when using qemu_cond_wait. No, you don't. Who is read

Re: [Qemu-devel] [PATCH COLO-Frame v11 10/39] COLO: Implement colo checkpoint protocol

2015-11-25 Thread Eric Blake
On 11/24/2015 12:00 PM, Dr. David Alan Gilbert wrote: > * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: >> We need communications protocol of user-defined to control the checkpoint >> process. >> >> +static int colo_ctl_get(QEMUFile *f, uint32_t require, uint64_t *value) >> +{ >> +int

Re: [Qemu-devel] [PATCH v2 8/8] block: Remove bdrv_states

2015-11-25 Thread Kevin Wolf
Am 10.11.2015 um 04:27 hat Max Reitz geschrieben: > Every entry in this list should be a root BDS and as such either be > anchored to a BlockBackend or be owned by the monitor. > > Signed-off-by: Max Reitz > --- > block.c | 30 +- > blockdev.c

Re: [Qemu-devel] make check failed: rcutorture error

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 02:50, Yijun Zhu wrote: > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k > --verbose -m=quick tests/rcutorture > TEST: tests/rcutorture... (pid=11593) > /rcu/torture/1reader:FAIL > GTester: last random seed: R0

Re: [Qemu-devel] [PATCH v2 1/4] qjson: replace QString in JSONLexer with GString

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 13:48, Markus Armbruster wrote: > Where does the 3 come from? My hat. :) I don't know---it was in the old patches, and I just brought it on. Oh, found it. GString adds 1 to the size (for the \0); allocating 4 bytes probably seemed like a good idea at the time. However, it also

Re: [Qemu-devel] [PULL for-2.5 0/2] xen-20151125

2015-11-25 Thread Peter Maydell
rg/people/sstabellini/qemu-dm.git tags/xen-20151125 > > for you to fetch changes up to 22037db38ccfe497bd13a94edead6657781b9b37: > > xen_disk: Remove ioreq.postsync (2015-11-25 11:04:55 +) > > --

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 13:31, David Engraf wrote: > Hi Paolo, > > please check the new version. I removed changing the iothread_locked > variable. But I still need to set the correct value of iothread_locked > when using qemu_cond_wait. No, you don't. Who is reading iothread_locked during qemu_cond_wa

Re: [Qemu-devel] [PATCH] target-mips/cpu.h: Fix spell error

2015-11-25 Thread Leon Alrae
On 25/11/15 12:57, Dongxue Zhang wrote: > CP0IntCtl_IPPC1, the last letter should be 'i', not 'one'. > > Signed-off-by: Dongxue Zhang > --- > target-mips/cpu.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-mips/cpu.h b/target-mips/cpu.h > index 89c01f7..17817c3

[Qemu-devel] [PATCH v3 2/2] tests: add file-write-read test

2015-11-25 Thread marcandre . lureau
From: Marc-André Lureau This test exhibits a POSIX behaviour regarding switching between write and read. It's undefined result if the application doesn't ensure a flush between the two operations (with glibc, the flush can be implicit when the buffer size is relatively small). The previous commit

[Qemu-devel] [PATCH v3 1/2] qga: flush explicitly when needed

2015-11-25 Thread marcandre . lureau
From: Marc-André Lureau According to the specification: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html "the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning function (fseek(), fsetpos(),

[Qemu-devel] [PATCH v3 0/2] qga: flush explicitly when needed

2015-11-25 Thread marcandre . lureau
From: Marc-André Lureau Without this change, a write() followed by a read() may lose the previously written content, as shown in the following test. v2->v3: - use a RwState tristate enum - reset the state on flush & seek v1->v2: - replace guchar with unsigned char - fix implicitly/explictly - c

[Qemu-devel] [PATCH] target-mips/cpu.h: Fix spell error

2015-11-25 Thread Dongxue Zhang
CP0IntCtl_IPPC1, the last letter should be 'i', not 'one'. Signed-off-by: Dongxue Zhang --- target-mips/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 89c01f7..17817c3 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@

Re: [Qemu-devel] [PATCH v2 1/4] qjson: replace QString in JSONLexer with GString

2015-11-25 Thread Markus Armbruster
Paolo Bonzini writes: > JSONLexer only needs a simple resizable buffer. json-streamer.c > can allocate memory for each token instead of relying on reference > counting of QStrings. On its own, this doesn't really save anything, it merely decouples the lexer's buffer from the rest of the machine

[Qemu-devel] [PATCH] Revert "vhost: send SET_VRING_ENABLE at start/stop"

2015-11-25 Thread Michael S. Tsirkin
This reverts commit 3a12f32229a046f4d4ab0a3a52fb01d2d5a1ab76. In case of live migration several queues can be enabled and not only the first one. So informing backend that only the first queue is enabled is wrong. Reported-by: Thibaut Collet Cc: Yuanhan Liu Signed-off-by: Michael S. Tsirkin --

Re: [Qemu-devel] [RFC v1] virtio-crypto specification

2015-11-25 Thread Varun Sethi
Hi Gonglei, Please find my comments inline. Regards Varun > -Original Message- > From: Gonglei (Arei) [mailto:arei.gong...@huawei.com] > Sent: Wednesday, November 25, 2015 1:14 PM > To: Sethi Varun-B16395 ; virtio-dev@lists.oasis- > open.org; qemu-devel@nongnu.org > Cc: Hanweidong (Randy)

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-25 Thread David Engraf
Hi Paolo, please check the new version. I removed changing the iothread_locked variable. But I still need to set the correct value of iothread_locked when using qemu_cond_wait. This will fix my race condition on Windows when prepare_mmio_access is called and checks if the lock is already held by

Re: [Qemu-devel] [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 01:39:32PM +0800, Lan Tianyu wrote: > On 2015年11月25日 05:20, Michael S. Tsirkin wrote: > > I have to say, I was much more interested in the idea > > of tracking dirty memory. I have some thoughts about > > that one - did you give up on it then? > > No, our finial target is t

Re: [Qemu-devel] [PATCH for-2.5 1/1] vhost-user: do not send SET_VRING_ENABLE at start

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 01:17:53PM +0100, Thibaut Collet wrote: > On Wed, Nov 25, 2015 at 12:04 PM, Michael S. Tsirkin wrote: > > On Wed, Nov 25, 2015 at 09:32:15AM +0800, Yuanhan Liu wrote: > >> On Tue, Nov 24, 2015 at 11:23:34PM +0200, Michael S. Tsirkin wrote: > >> > On Tue, Nov 24, 2015 at 10:

Re: [Qemu-devel] [PATCH for-2.5 1/1] vhost-user: do not send SET_VRING_ENABLE at start

2015-11-25 Thread Thibaut Collet
On Wed, Nov 25, 2015 at 12:04 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 09:32:15AM +0800, Yuanhan Liu wrote: >> On Tue, Nov 24, 2015 at 11:23:34PM +0200, Michael S. Tsirkin wrote: >> > On Tue, Nov 24, 2015 at 10:05:27PM +0100, Thibaut Collet wrote: >> > > On Tue, Nov 24, 2015 at 9:52

Re: [Qemu-devel] [PULL for-2.5 0/5] ivshmem patches for 2.5

2015-11-25 Thread Peter Maydell
On 25 November 2015 at 10:40, Markus Armbruster wrote: > The following changes since commit 4b6eda626fdb8bf90472c6868d502a2ac09abeeb: > > Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into > staging (2015-11-24 17:05:06 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH 0/2] Fix regression in object creation order

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 12:02, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 10:52:27AM +, Daniel P. Berrange wrote: >> This fixes the regression in object creation warning identified >> by Paolo here: >> >> https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04994.html >> >> It provides a

Re: [Qemu-devel] [PATCH v2 12/14] qemu-img: Make MapEntry a QAPI struct

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 08:39, Fam Zheng wrote: > */ > -if (next && > -(next->flags & (BDRV_BLOCK_DATA|BDRV_BLOCK_ZERO)) != > BDRV_BLOCK_DATA) { > -next->flags &= ~BDRV_BLOCK_DATA; > -next->flags |= BDRV_BLOCK_ZERO; > +if (next && !next->data)

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-25 Thread Paolo Bonzini
On 24/11/2015 20:25, Ming Lin wrote: > On Tue, 2015-11-24 at 11:51 +0100, Paolo Bonzini wrote: >> >> On 24/11/2015 08:27, Ming Lin wrote: >>> handle_notify (qemu/hw/block/dataplane/virtio-blk.c:126) >>> aio_dispatch (qemu/aio-posix.c:329) >>> aio_poll (qemu/aio-posix.c:474) >>> iothread_run (qemu

[Qemu-devel] [PULL for-2.5 0/2] xen-20151125

2015-11-25 Thread Stefano Stabellini
The following changes since commit 8337c6cbc37c6b2184f41bab3eaff47d5e68012a: Update version for v2.5.0-rc0 release (2015-11-13 17:10:36 +) are available in the git repository at: git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20151125 for you to fetch changes up to

[Qemu-devel] [PULL for-4.5 2/2] xen_disk: Remove ioreq.postsync

2015-11-25 Thread Stefano Stabellini
From: Alberto Garcia This code has been dead for three years (since commit 7e7b7cba1). Signed-off-by: Alberto Garcia Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini --- hw/block/xen_disk.c |8 1 file changed, 8 deletions(-) diff --git a/hw/block/xen_disk.c b/h

[Qemu-devel] [PULL for-4.5 1/2] xen: fix usage of xc_domain_create in domain builder

2015-11-25 Thread Stefano Stabellini
From: Roger Pau Monne Due to the addition of HVMlite and the requirement to always provide a valid xc_domain_configuration_t, xc_domain_create now always takes an arch domain config, which can be NULL in order to mimic previous behaviour. Add a small stub called xen_domain_create that encapsulat

Re: [Qemu-devel] [PATCH for-2.5 1/1] vhost-user: do not send SET_VRING_ENABLE at start

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 09:32:15AM +0800, Yuanhan Liu wrote: > On Tue, Nov 24, 2015 at 11:23:34PM +0200, Michael S. Tsirkin wrote: > > On Tue, Nov 24, 2015 at 10:05:27PM +0100, Thibaut Collet wrote: > > > On Tue, Nov 24, 2015 at 9:52 PM, Michael S. Tsirkin > > > wrote: > > > > On Tue, Nov 24, 201

Re: [Qemu-devel] [PATCH for-2.5] xen_disk: Remove ioreq.postsync

2015-11-25 Thread Stefano Stabellini
On Wed, 25 Nov 2015, Alberto Garcia wrote: > This code has been dead for three years (since commit 7e7b7cba1). > > Signed-off-by: Alberto Garcia Reviewed-by: Stefano Stabellini Kevin, I'll send it out together with another fix today. > hw/block/xen_disk.c | 8 > 1 file changed, 8

Re: [Qemu-devel] [PATCH 0/2] Fix regression in object creation order

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 10:52:27AM +, Daniel P. Berrange wrote: > This fixes the regression in object creation warning identified > by Paolo here: > > https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04994.html > > It provides an alternative fix to the original problem, by > simply

Re: [Qemu-devel] [Bug 1518969] [NEW] Instance of QEMU doesn't unplug virtio scsi disk after device_del and drive_del commands

2015-11-25 Thread Markus Armbruster
Marian Horban writes: > Public bug reported: > > device_del and drive_del commands don't cause virtio disk detaching > > Steps to reproduce: > 1. Run instance > > 2. Attach virtio scsi disk > > 3. Reboot instance > > 4. Immediately after reboot detach disk with QEMU commands: > device_del > drive

Re: [Qemu-devel] [PATCH] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-11-25 Thread Kevin Wolf
Am 25.11.2015 um 06:43 hat Programmingkid geschrieben: > Mac OS X can be picky when it comes to allowing the user > to use physical devices in QEMU. Most mounted volumes > appear to be off limits to QEMU. If an issue is detected, > a message is displayed showing the user how to unmount a > volume.

[Qemu-devel] [PATCH 0/2] Fix regression in object creation order

2015-11-25 Thread Daniel P. Berrange
This fixes the regression in object creation warning identified by Paolo here: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg04994.html It provides an alternative fix to the original problem, by simply removing the warning message in question. Daniel P. Berrange (2): Revert "exec:

[Qemu-devel] [PATCH 1/2] Revert "exec: silence hugetlbfs warning under qtest"

2015-11-25 Thread Daniel P. Berrange
This reverts commit 1c7ba94a184df1eddd589d5400d879568d3e5d08. That commit changed QEMU initialization order from - object-initial, chardev, qtest, object-late to - chardev, qtest, object-initial, object-late This breaks chardev setups which need to rely on objects having been created. For ex

[Qemu-devel] [PATCH 2/2] exec: remove warning about mempath and hugetlbfs

2015-11-25 Thread Daniel P. Berrange
The gethugepagesize() method in exec.c printed a warning if the file path for "-mem-path" or "-object memory-backend-file" was not on a hugetlbfs filesystem. This warning is bogus, because QEMU functions perfectly well with the path on a regular tmpfs filesystem. Use of hugetlbfs vs tmpfs is a choi

Re: [Qemu-devel] poor virtio-scsi performance (fio testing)

2015-11-25 Thread Vasiliy Tolstov
2015-11-25 13:27 GMT+03:00 Alexandre DERUMIER : > I have tested with a raw file, qemu 2.4 + virtio-scsi (without iothread), I'm > around 25k iops > with an intel ssd 3500. (host cpu are xeon v3 3,1ghz) What scheduler you have on host system? May be my default cfq slowdown? -- Vasiliy Tolstov,

[Qemu-devel] [PULL for-2.5 4/5] ivshmem: Mark questionable socket type test FIXME

2015-11-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 83d7bd3..edb2270 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -939,6 +939,7 @@ static void pci_ivshme

[Qemu-devel] [PULL for-2.5 2/5] qemu-doc: Fix ivshmem usage example with shm=...

2015-11-25 Thread Markus Armbruster
The example suggests you can omit "shm". This isn't true; you must specify exactly one of "shm", "chardev", "memdev". Fix it. Signed-off-by: Markus Armbruster Message-Id: <1448384789-14830-3-git-send-email-arm...@redhat.com> Reviewed-by: Marc-André Lureau --- qemu-doc.texi | 2 +- 1 file chan

[Qemu-devel] [PULL for-2.5 0/5] ivshmem patches for 2.5

2015-11-25 Thread Markus Armbruster
The following changes since commit 4b6eda626fdb8bf90472c6868d502a2ac09abeeb: Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into staging (2015-11-24 17:05:06 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-ivshmem-2015-11-25 for y

[Qemu-devel] [PULL for-2.5 5/5] ivshmem: Rename property memdev to x-memdev for 2.5

2015-11-25 Thread Markus Armbruster
The device's guest interface and its QEMU user interface are flawed^Whotly debated. We'll resolve that in the next development cycle, probably by deprecating the device in favour of a cleaned up, but not quite compatible revision. To avoid adding more baggage to the soon-to-be-deprecated interfac

[Qemu-devel] [PULL for-2.5 3/5] tests/ivshmem-test: Supply missing initializer in get_device()

2015-11-25 Thread Markus Armbruster
If the device isn't found, the assertion uses dev without initialization. Fix that. Signed-off-by: Markus Armbruster Message-Id: <1448384789-14830-4-git-send-email-arm...@redhat.com> Reviewed-by: Marc-André Lureau --- tests/ivshmem-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tes

[Qemu-devel] [PULL for-2.5 1/5] qemu-doc: Fix ivshmem example markup

2015-11-25 Thread Markus Armbruster
Use @var{foo} like we do everywhere else, not . Signed-off-by: Markus Armbruster Message-Id: <1448384789-14830-2-git-send-email-arm...@redhat.com> Reviewed-by: Marc-André Lureau --- qemu-doc.texi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qemu-doc.texi b/qemu-do

Re: [Qemu-devel] [PATCH v6] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-11-25 Thread Kevin Wolf
Am 25.11.2015 um 05:18 hat Programmingkid geschrieben: > > On Nov 24, 2015, at 9:38 AM, Kevin Wolf wrote: > > > > > >> +/* If using a physical device */ > >> +if (strstart(filename, "/dev/", NULL)) { > >> +char bsdPath[MAXPATHLEN]; > >> + > >> +/* If the physical device i

Re: [Qemu-devel] [RESEND RFC 0/6] AMD XGBE KVM platform passthrough

2015-11-25 Thread Christoffer Dall
On Thu, Nov 19, 2015 at 11:44 PM, Alex Williamson wrote: > On Thu, 2015-11-19 at 15:22 +, Eric Auger wrote: >> I am resending this RFC from Oct 12, after kernel 4.4-rc1 and >> QEMU 2.5-rc1, hoping things have calmed down a little bit. >> >> This RFC allows to set up AMD XGBE passthrough. This

Re: [Qemu-devel] poor virtio-scsi performance (fio testing)

2015-11-25 Thread Alexandre DERUMIER
>>I'm try with classic lvm - sometimes i get more iops, but stable results is the same =) I have tested with a raw file, qemu 2.4 + virtio-scsi (without iothread), I'm around 25k iops with an intel ssd 3500. (host cpu are xeon v3 3,1ghz) randrw: (g=0): rw=randrw, bs=4K-4K/4K-4K/4K-4K, ioengine=

Re: [Qemu-devel] [trivial for-2.6] util/id: fully allocate names table

2015-11-25 Thread Markus Armbruster
Kevin Wolf writes: > Am 25.11.2015 um 09:18 hat Markus Armbruster geschrieben: >> John Snow writes: >> >> > Trivial: this array should be allocated to have ID_MAX entries always. >> > Otherwise if someone were to forget to expand this table, the assertion >> > in the id generator won't actually

Re: [Qemu-devel] [RFC V2, PATCH 0/2] Checkpoint-assisted migration proposal

2015-11-25 Thread Bohdan Trach
Hi Eric, On 11/24/2015 06:51 PM, Eric Blake wrote: > This touches the command line, but not any QMP .json files. Is this new > feature properly discoverable using existing QMP commands, or is this > something lacking in the proposal? What exactly discoverability mechanisms must be provided? The

Re: [Qemu-devel] [PATCH v2] vhost: Fix aborting if KVM does not support eventfds

2015-11-25 Thread Pavel Fedin
Hello! > > Or better yet, actually implement host notifiers > > in userspace - should not be that hard to do, just > > do write into eventfd. > > I sent this RFC patch a while back: Thank you very much, but Paolo already pointed it out for me, and i have picked it up: https://lists.gnu.org/ar

Re: [Qemu-devel] poor virtio-scsi performance (fio testing)

2015-11-25 Thread Vasiliy Tolstov
2015-11-25 13:08 GMT+03:00 Alexandre DERUMIER : > Maybe could you try to create 2 disk in your vm, each with 1 dedicated > iothread, > > then try to run fio on both disk at the same time, and see if performance > improve. > Thats fine, but by default i have only one disk inside vm, so i prefer i

Re: [Qemu-devel] KVM/Qemu migration under fast network stress

2015-11-25 Thread Dr. David Alan Gilbert
* Or Gerlitz (gerlitz...@gmail.com) wrote: > Hi, > > When doing live migration with iperf running on the migrated VM > over PV/virtio interface -- it doesn't end when the number of threads > 1 :( > nor when we run an IO (fio) benchmark which gets high-throughput. None > of these tests run over the

Re: [Qemu-devel] poor virtio-scsi performance (fio testing)

2015-11-25 Thread Vasiliy Tolstov
2015-11-25 12:35 GMT+03:00 Stefan Hajnoczi : > You can get better aio=native performance with qemu.git/master. Please > see commit fc73548e444ae3239f6cef44a5200b5d2c3e85d1 ("virtio-blk: use > blk_io_plug/unplug for Linux AIO batching"). Thanks Stefan! Does this patch only for virtio-blk or it ca

Re: [Qemu-devel] poor virtio-scsi performance (fio testing)

2015-11-25 Thread Alexandre DERUMIER
Maybe could you try to create 2 disk in your vm, each with 1 dedicated iothread, then try to run fio on both disk at the same time, and see if performance improve. But maybe they are some write overhead with lvmthin (because of copy on write) and sheepdog. Do you have tried with classic lvm o

[Qemu-devel] [PATCH for-2.5] xen_disk: Remove ioreq.postsync

2015-11-25 Thread Alberto Garcia
This code has been dead for three years (since commit 7e7b7cba1). Signed-off-by: Alberto Garcia --- hw/block/xen_disk.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 02eda6e..8146650 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_

Re: [Qemu-devel] [PATCH for-2.5?] iothread: include id in thread name

2015-11-25 Thread Stefan Hajnoczi
On Tue, Nov 24, 2015 at 02:46:44PM +0100, Paolo Bonzini wrote: > This makes it easier to find the desired thread. Use "IO" plus the id; > even with the 14 character limit on the thread name, enough of the id should > be readable (e.g. "IO iothreadNNN" with three characters for the number). > > Si

Re: [Qemu-devel] some confusion on qemu i/o pocess and the qcow2 format

2015-11-25 Thread Stefan Hajnoczi
On Fri, Nov 20, 2015 at 11:21:14AM +0800, 浩樊啊 wrote: > 1.what is the difference of bdrv_co_readv and bdrv_aio_readv? bdrv_aio_readv() takes a callback function pointer and returns a request struct. The callback will be invoked when the request has completed. bdrv_co_readv() must be called from c

Re: [Qemu-devel] [trivial for-2.6] util/id: fully allocate names table

2015-11-25 Thread Kevin Wolf
Am 25.11.2015 um 09:18 hat Markus Armbruster geschrieben: > John Snow writes: > > > Trivial: this array should be allocated to have ID_MAX entries always. > > Otherwise if someone were to forget to expand this table, the assertion > > in the id generator won't actually trigger; it will read junk

Re: [Qemu-devel] poor virtio-scsi performance (fio testing)

2015-11-25 Thread Stefan Hajnoczi
On Thu, Nov 19, 2015 at 11:16:22AM +0300, Vasiliy Tolstov wrote: > I'm test virtio-scsi on various kernels (with and without scsi-mq) > with deadline io scheduler (best performance). I'm test with lvm thin > volume and with sheepdog storage. Data goes to ssd that have on host > system is about 30K

<    1   2   3   4   >