Re: Nested paging in nested SVM setup

2014-09-02 Thread Valentine Sinitsyn
Hi Paolo, On 01.09.2014 23:04, Paolo Bonzini wrote: Valentine, can you produce another trace, this time with both kvm and kvmmmu events enabled? I was able to make the trace shorter by grepping only what's happening on a single CPU core (#0):

[PATCH 3/3] KVM: PPC: Book3S PR: Implement ARCH_COMPAT register

2014-09-02 Thread Paul Mackerras
This provides basic support for the KVM_REG_PPC_ARCH_COMPAT register in PR KVM. At present the value is sanity-checked when set, but doesn't actually affect anything yet. Implementing this makes it possible to use a qemu command-line argument such as -cpu host,compat=power7 on a POWER8 machine,

[PATCH 2/3] KVM: PPC: Book3S HV: Only accept host PVR value for guest PVR

2014-09-02 Thread Paul Mackerras
Since the guest can read the machine's PVR (Processor Version Register) directly and see the real value, we should disallow userspace from setting any value for the guest's PVR other than the real host value. Therefore this makes kvm_arch_vcpu_set_sregs_hv() check the supplied PVR value and return

[PATCH 0/3] KVM: PPC: Book3S: Some miscellanous fixes

2014-09-02 Thread Paul Mackerras
This series of patches is based on Alex Graf's kvm-ppc-queue branch. It contains 3 small patches from the tree that we are shipping on POWER8 machines: a fix for an error that we see very occasionally, and two minor improvements. Please apply for 3.18. Paul. ---

[PATCH 1/3] KVM: PPC: Book3S HV: Increase timeout for grabbing secondary threads

2014-09-02 Thread Paul Mackerras
From: Paul Mackerras pau...@au1.ibm.com Occasional failures have been seen with split-core mode and migration where the message KVM: couldn't grab cpu appears. This increases the length of time that we wait from 1ms to 10ms, which seems to work around the issue. Signed-off-by: Paul Mackerras

Re: Nested paging in nested SVM setup

2014-09-02 Thread Valentine Sinitsyn
On 02.09.2014 12:09, Valentine Sinitsyn wrote: https://www.dropbox.com/s/slbxmxyg74wh9hv/l1mmio-cpu0.txt.gz?dl=0 Forgot to say: the user space is vanilla QEMU 2.1.0 here. Valentine -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[Bug 82211] Cannot boot Xen under KVM with X2APIC enabled

2014-09-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=82211 --- Comment #6 from Paolo Bonzini bonz...@gnu.org --- What version of Xen? Can you attach the xen.gz file? -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-02 Thread Amit Shah
On (Mon) 01 Sep 2014 [20:52:46], Zhang Haoyu wrote: Hi, all I start a VM with virtio-serial (default ports number: 31), and found that virtio-blk performance degradation happened, about 25%, this problem can be reproduced 100%. without virtio-serial: 4k-read-random 1186 IOPS

Re: Nested paging in nested SVM setup

2014-09-02 Thread Paolo Bonzini
Il 01/09/2014 21:21, Valentine Sinitsyn ha scritto: Can you retry running the tests with the latest kvm-unit-tests (branch master), gather a trace of kvm and kvmmmu events, and send the compressed trace.dat my way? You mean the trace when the problem reveal itself (not from running tests),

[GIT PULL 0/2] KVM: s390/mm: Two fixes for master (3.17)

2014-09-02 Thread Christian Borntraeger
repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-20140902 for you to fetch changes up to 1951497d90d6754201af3e65241a06f9ef6755cd: KVM: s390/mm: Fix guest storage key corruption in ptep_set_access_flags (2014-09-02 10:30:43 +0200

[GIT PULL 2/2] KVM: s390/mm: Fix guest storage key corruption in ptep_set_access_flags

2014-09-02 Thread Christian Borntraeger
commit 0944fe3f4a32 (s390/mm: implement software referenced bits) triggered another paging/storage key corruption. There is an unhandled invalid-valid pte change where we have to set the real storage key from the pgste. When doing paging a guest page might be swapcache or swap and when faulted in

[GIT PULL 1/2] KVM: s390/mm: Fix storage key corruption during swapping

2014-09-02 Thread Christian Borntraeger
Since 3.12 or more precisely commit 0944fe3f4a32 (s390/mm: implement software referenced bits) guest storage keys get corrupted during paging. This commit added another valid-invalid translation for page tables - namely ptep_test_and_clear_young. We have to transfer the storage key into the pgste

Re: Nested paging in nested SVM setup

2014-09-02 Thread Valentine Sinitsyn
On 02.09.2014 14:25, Paolo Bonzini wrote: I actually meant kvm-unit-tests in order to understand the npt_rsvd failure. (I had sent a separate message for Jailhouse). Oops, sorry for misunderstanding. Uploaded it here: https://www.dropbox.com/s/jp6ohb0ul3d6v4u/npt_rsvd.txt.bz2?dl=0 The

[PATCH v3 0/4] Make kvm_device_ops registration dynamic

2014-09-02 Thread Will Deacon
Hi all, This is version 3 of the patches originally posted here: v1: http://www.spinics.net/lists/kvm-arm/msg10219.html v2: http://www.spinics.net/lists/kvm/msg105197.html Changes since v2 include: - Rebased onto 3.17-rc* (the vgic code changed a lot!) - Added relevant acks The mpic,

[PATCH v3 3/4] KVM: s390: register flic ops dynamically

2014-09-02 Thread Will Deacon
From: Cornelia Huck cornelia.h...@de.ibm.com Using the new kvm_register_device_ops() interface makes us get rid of an #ifdef in common code. Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Will Deacon

[PATCH v3 1/4] KVM: device: add simple registration mechanism for kvm_device_ops

2014-09-02 Thread Will Deacon
kvm_ioctl_create_device currently has knowledge of all the device types and their associated ops. This is fairly inflexible when adding support for new in-kernel device emulations, so move what we currently have out into a table, which can support dynamic registration of ops by new drivers for

[PATCH v3 2/4] KVM: ARM: vgic: register kvm_device_ops dynamically

2014-09-02 Thread Will Deacon
Now that we have a dynamic means to register kvm_device_ops, use that for the ARM VGIC, instead of relying on the static table. Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Acked-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Christoffer Dall

[PATCH v3 4/4] KVM: VFIO: register kvm_device_ops dynamically

2014-09-02 Thread Will Deacon
Now that we have a dynamic means to register kvm_device_ops, use that for the VFIO kvm device, instead of relying on the static table. This is achieved by a module_init call to register the ops with KVM. Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Acked-by: Alex

Re: Nested paging in nested SVM setup

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 08:09, Valentine Sinitsyn ha scritto: https://www.dropbox.com/s/slbxmxyg74wh9hv/l1mmio-cpu0.txt.gz?dl=0 It was taken with kernel 3.16.1 modules with your paging-tmpl.h patch applied. This time, the trace looks somewhat different, however my code still hangs in nested KVM

Re: Nested paging in nested SVM setup

2014-09-02 Thread Valentine Sinitsyn
On 02.09.2014 15:45, Paolo Bonzini wrote: This *is* different though. I don't see any kvm_inj_exception at all (with my patch it should be for vector 0xfe). I've applied the part of your patch, that fixes the uninitialized exception vector problem, otherwise the lockup will trigger before my

Re: Nested paging in nested SVM setup

2014-09-02 Thread Valentine Sinitsyn
On 02.09.2014 15:45, Paolo Bonzini wrote: In any case, the problem seems specific to _writes_ to the APIC page. I'm going to write a testcase for that and see if I can reproduce it now. If you'll need a complete trace, not only CPU 0, please let me know - I'll upload it as well. It's about 17M

Re: Nested paging in nested SVM setup

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 11:16, Valentine Sinitsyn ha scritto: On 02.09.2014 14:25, Paolo Bonzini wrote: I actually meant kvm-unit-tests in order to understand the npt_rsvd failure. (I had sent a separate message for Jailhouse). Oops, sorry for misunderstanding. Uploaded it here:

Re: Nested paging in nested SVM setup

2014-09-02 Thread Valentine Sinitsyn
On 02.09.2014 17:21, Paolo Bonzini wrote: Ugh, there are many bugs and the test is even wrong because the actual error code should be 0x20006 (error while visiting page tables). Well, good they were spotted. :-) Haven't looked at the test code actually, just saw it fails for some reason.

Re: Nested paging in nested SVM setup

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 11:53, Valentine Sinitsyn ha scritto: real_gpa = mmu-translate_gpa(vcpu, gfn_to_gpa(gfn), access); if (real_gpa == UNMAPPED_GVA) -return 0; +goto error; walker-gfn = real_gpa PAGE_SHIFT; So they should look like regular page faults (as they

Re: KVM call for agenda for 2014-09-02

2014-09-02 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please, send any topic that you are interested in covering. As there are no topics, call gets cancelled. Have a nice day, Juan. Thanks, Juan. Call details: 15:00 CEST 13:00 UTC 09:00 EDT Every two weeks By popular demand, a google

[PATCH kvm-unit-tests 0/3] svm: fix expected values and add extra NPT tests

2014-09-02 Thread Paolo Bonzini
The NPT implementation of SVM does not set bits 32 and 33 of EXITINFO1. We want to fix that, so check those fields and also add two extra tests: - reserved bits during page access (the existing test is for reserved bits during page table walks) - test for writes to a read-only page mapped to

[PATCH kvm-unit-tests 1/3] x86: svm: fix exitinfo values for NPT tests

2014-09-02 Thread Paolo Bonzini
The exitinfo values were plain wrong for the page-walk tests (including npt_rsvd), or else they were missing bits 32:33. Expect the right values. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- x86/svm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH kvm-unit-tests 2/3] x86: svm: add page access reserved bit test

2014-09-02 Thread Paolo Bonzini
The reserved bit test was testing faults during page walk, rather than during page access. Add another test that uses large pages to test reserved bits during page access, and rename the old test to indicate what it really covers. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- x86/svm.c |

[PATCH kvm-unit-tests 3/3] x86: svm: add L1 MMIO read-only permission test

2014-09-02 Thread Paolo Bonzini
Test that the emulator correctly injects a nested page fault VMEXIT. Reported-by: Valentine Sinitsyn valentine.sinit...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- x86/svm.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/x86/svm.c

[PATCH 4/4] KVM: x86: propagate exception from permission checks on the nested page fault

2014-09-02 Thread Paolo Bonzini
Currently, if a permission error happens during the translation of the final GPA to HPA, walk_addr_generic returns 0 but does not fill in walker-fault. To avoid this, add an x86_exception* argument to the translate_gpa function, and let it fill in walker-fault. The nested_page_fault field will be

[PATCH 3/4] KVM: x86: inject nested page faults on emulated instructions

2014-09-02 Thread Paolo Bonzini
This is required for the following patch to work correctly. If a nested page fault happens during emulation, we must inject a vmexit, not a page fault. Luckily we already have the required machinery: it is enough to return X86EMUL_INTERCEPTED instead of X86EMUL_PROPAGATE_FAULT. Reported-by:

[PATCH 2/4] KVM: nSVM: propagate the NPF EXITINFO to the guest

2014-09-02 Thread Paolo Bonzini
This is similar to what the EPT code does with the exit qualification. This allows the guest to see a valid value for bits 33:32. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- arch/x86/kvm/paging_tmpl.h | 6 ++ arch/x86/kvm/svm.c | 26 ++ 2 files

[PATCH 1/4] KVM: x86: reserve bit 8 of non-leaf PDPEs and PML4Es in 64-bit mode on AMD

2014-09-02 Thread Paolo Bonzini
Bit 8 would be the global bit, which does not quite make sense for non-leaf page table entries. Intel ignores it; AMD ignores it in PDEs, but reserves it in PDPEs and PML4Es. The SVM test is relying on this behavior, so enforce it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

[PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Paolo Bonzini
Patch 1 implements AMD semantics for non-leaf PDPEs and PML4Es, which are a bit different from Intel. The SVM test relies on this, so fix it. Patch 2 lets nested SVM implement nested page fault correctly. We were not setting bits 32/33. Patches 3 and 4 fix the interaction between emulator and

[PATCH v4 00/14] ivshmem: update documentation, add client/server tools

2014-09-02 Thread David Marchand
Here is a patchset containing an update on ivshmem specs documentation and importing ivshmem server and client tools. These tools have been written from scratch and are not related to what is available in nahanni repository. I put them in contrib/ directory as the qemu-doc.texi was already telling

[PATCH v4 06/14] contrib/ivshmem-server: set client sockets as non blocking

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-server/ivshmem-server.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c index 0afa6e8..e0d4d1d 100644 ---

[PATCH v4 04/14] contrib/ivshmem-*: reuse qemu/queue.h

2014-09-02 Thread David Marchand
Switch to qemu/queue.h strutures. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 17 contrib/ivshmem-client/ivshmem-client.h |7 --- contrib/ivshmem-server/ivshmem-server.c | 33 ---

[PATCH v4 10/14] contrib/ivshmem-server: fix mem leak on error

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-server/ivshmem-server.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c index 15d468c..4732dab 100644 ---

[PATCH v4 09/14] contrib/ivshmem-*: switch to g_malloc0/g_free

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c |9 ++--- contrib/ivshmem-server/ivshmem-server.c | 12 ++-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/contrib/ivshmem-client/ivshmem-client.c

[PATCH v4 02/14] docs: update ivshmem device spec

2014-09-02 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v4 11/14] contrib/ivshmem-*: rework error handling

2014-09-02 Thread David Marchand
Following Gonglei comments, rework error handling using goto. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 17 - contrib/ivshmem-server/ivshmem-server.c | 19 ++- 2 files changed, 18 insertions(+), 18

[PATCH v4 12/14] contrib/ivshmem-*: various fixes

2014-09-02 Thread David Marchand
More fixes following Gonglei comments: - add a missing \n in a debug message. - add an explicit initialisation of sock_fd. - fix a check on vector index. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c |5 +++-- 1 file changed, 3

[PATCH v4 14/14] ivshmem: add check on protocol version in QEMU

2014-09-02 Thread David Marchand
Send a protocol version as the first message from server, clients must close communication if they don't support this protocol version. Older QEMUs should be fine with this change in the protocol since they overrides their own vm_id on reception of an id associated to no eventfd. Signed-off-by:

[PATCH v4 03/14] contrib/ivshmem-*: comply with QEMU coding style

2014-09-02 Thread David Marchand
Fix coding style for structures. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 47 ++- contrib/ivshmem-client/ivshmem-client.h | 76 +++ contrib/ivshmem-client/main.c | 21 -

[PATCH v4 01/14] contrib: add ivshmem client and server

2014-09-02 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com Signed-off-by: David Marchand david.march...@6wind.com ---

[PATCH v4 08/14] contrib/ivshmem-*: plug client and server in QEMU top Makefile

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- Makefile|8 configure |3 +++ contrib/ivshmem-client/Makefile | 29 - contrib/ivshmem-server/Makefile | 29 - 4

[PATCH v4 07/14] contrib/ivshmem-*: add missing const and static attrs

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/main.c |6 +++--- contrib/ivshmem-server/main.c |8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/ivshmem-client/main.c b/contrib/ivshmem-client/main.c index

[PATCH v4 13/14] contrib/ivshmem-server: align server default parameter values

2014-09-02 Thread David Marchand
ivshmem server should use the same default values as hw/misc/ivshmem. Update accordingly. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-server/main.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ivshmem-server/main.c

[PATCH v4 05/14] contrib/ivshmem-*: switch to QEMU headers

2014-09-02 Thread David Marchand
Reuse parsers from QEMU, C99 boolean. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 12 + contrib/ivshmem-client/ivshmem-client.h |4 +- contrib/ivshmem-client/main.c | 12 + contrib/ivshmem-server/ivshmem-server.c

Re: [PATCH 0/3] fix bugs with stale or corrupt MMIO caches

2014-09-02 Thread Paolo Bonzini
Il 29/08/2014 12:31, Paolo Bonzini ha scritto: David and Xiao, here's my take on the MMIO generation patches. Now with documentation, too. :) Please review! David Matlack (2): kvm: fix potentially corrupt mmio cache kvm: x86: fix stale mmio cache bug Paolo Bonzini (1): KVM: do

Re: [Qemu-devel] [question] e1000 interrupt storm happenedbecauseofits correspondingioapic-irr bit always set

2014-09-02 Thread Michael S. Tsirkin
On Thu, Aug 28, 2014 at 08:55:18PM +0800, Zhang Haoyu wrote: Hi Jason, I tested below patch, it's okay, the e1000 interrupt storm disappeared. But I am going to make a bit change on it, could you help review it? Currently, we call ioapic_service() immediately when we find the irq is still

Re: [PATCH v4 4/6] kvm, mem-hotplug: Reload L1' apic access page on migration in vcpu_enter_guest().

2014-09-02 Thread Gleb Natapov
On Wed, Aug 27, 2014 at 06:17:39PM +0800, Tang Chen wrote: apic access page is pinned in memory. As a result, it cannot be migrated/hot-removed. Actually, it is not necessary to be pinned. The hpa of apic access page is stored in VMCS APIC_ACCESS_ADDR pointer. When the page is migrated,

Re: [PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Valentine Sinitsyn
Hi Paolo, On 02.09.2014 21:13, Paolo Bonzini wrote: Patches 3 and 4 fix the interaction between emulator and nested EPT/NPT, which was reported by Valentine. I can confirm the initial bug I observed is fixed with these patches (applied to 3.16.1). All tests in kvm-unit-test's master also

Re: [RFC PATCH v6 15/20] vfio/platform: support for maskable and automasked interrupts

2014-09-02 Thread Antonios Motakis
On Sun, Jun 8, 2014 at 12:17 PM, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Jun 05, 2014 at 07:03:23PM +0200, Antonios Motakis wrote: Adds support to mask interrupts, and also for automasked interrupts. Level sensitive interrupts are exposed as automasked interrupts and are

Re: [RFC PATCH v6 14/20] vfio/platform: initial interrupts support

2014-09-02 Thread Antonios Motakis
On Sun, Jun 8, 2014 at 12:09 PM, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Jun 05, 2014 at 07:03:22PM +0200, Antonios Motakis wrote: This patch allows to set an eventfd for a patform device's interrupt, and also to trigger the interrupt eventfd from userspace for testing.

[PATCH] powerpc/kvm/cma: Fix panic introduces by signed shift operation

2014-09-02 Thread Laurent Dufour
fc95ca7284bc54953165cba76c3228bd2cdb9591 introduces a memset in kvmppc_alloc_hpt since the general CMA doesn't clear the memory it allocates. However, the size argument passed to memset is computed from a signed value and its signed bit is extended by the cast the compiler is doing. This lead to

Re: [PATCH kvm-unit-tests 1/3] x86: svm: fix exitinfo values for NPT tests

2014-09-02 Thread Joerg Roedel
On Tue, Sep 02, 2014 at 05:05:26PM +0200, Paolo Bonzini wrote: The exitinfo values were plain wrong for the page-walk tests (including npt_rsvd), or else they were missing bits 32:33. Expect the right values. Are bits 32:33 really emulated? IIRC they were not emulated in the inital

Re: [PATCH 2/4] KVM: nSVM: propagate the NPF EXITINFO to the guest

2014-09-02 Thread Joerg Roedel
Ah, here you add emulation of these bits. On Tue, Sep 02, 2014 at 05:13:48PM +0200, Paolo Bonzini wrote: This is similar to what the EPT code does with the exit qualification. This allows the guest to see a valid value for bits 33:32. Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

Re: [PATCH 2/3] kvm: fix potentially corrupt mmio cache

2014-09-02 Thread David Matlack
On Fri, Aug 29, 2014 at 3:31 AM, Paolo Bonzini pbonz...@redhat.com wrote: From: David Matlack dmatl...@google.com vcpu exits and memslot mutations can run concurrently as long as the vcpu does not aquire the slots mutex. Thus it is theoretically possible for memslots to change underneath a

Re: [PATCH 2/4] KVM: nSVM: propagate the NPF EXITINFO to the guest

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 18:33, Joerg Roedel ha scritto: Ah, here you add emulation of these bits. On Tue, Sep 02, 2014 at 05:13:48PM +0200, Paolo Bonzini wrote: This is similar to what the EPT code does with the exit qualification. This allows the guest to see a valid value for bits 33:32.

Re: [PATCH 0/3] fix bugs with stale or corrupt MMIO caches

2014-09-02 Thread David Matlack
On Tue, Sep 2, 2014 at 8:42 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 29/08/2014 12:31, Paolo Bonzini ha scritto: David and Xiao, here's my take on the MMIO generation patches. Now with documentation, too. :) Please review! David Matlack (2): kvm: fix potentially corrupt mmio cache

Re: [PATCH 2/3] kvm: fix potentially corrupt mmio cache

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 18:44, David Matlack ha scritto: -#define MMIO_GEN_SHIFT 19 -#define MMIO_GEN_LOW_SHIFT 9 -#define MMIO_GEN_LOW_MASK ((1 MMIO_GEN_LOW_SHIFT) - 1) +#define MMIO_GEN_SHIFT 20 +#define MMIO_GEN_LOW_SHIFT

Re: [PATCH 0/3] fix bugs with stale or corrupt MMIO caches

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 18:47, David Matlack ha scritto: Ping? Sorry for the delay. I think the patches look good. And patch 3/3 still fixes the bug I was originally seeing, so I'm happy :). I just had one small comment (see my reply to patch 2/3). I answered that question now. Can I add your

Re: [PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 18:02, Valentine Sinitsyn ha scritto: I can confirm the initial bug I observed is fixed with these patches (applied to 3.16.1). All tests in kvm-unit-test's master also pass, except for ioio which is (probably) affected by another (unrelated) bug fixed by Jan back in June but

Re: [PATCH 2/4] KVM: nSVM: propagate the NPF EXITINFO to the guest

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 18:46, Paolo Bonzini ha scritto: How about an io-port emulated on L1 but passed through to L2 by the nested hypervisor. On emulation of INS or OUTS, KVM would need to read/write to an L2 address space, It would need to read/write to *L1* (that's where the VMCB's IOIO map

Re: [PATCH 2/4] KVM: nSVM: propagate the NPF EXITINFO to the guest

2014-09-02 Thread Joerg Roedel
On Tue, Sep 02, 2014 at 06:46:06PM +0200, Paolo Bonzini wrote: Il 02/09/2014 18:33, Joerg Roedel ha scritto: Comment is true, but doesn't make the check below obsolete, no? No, it doesn't. I'll rewrite it as /* * This cannot happen unless the guest is playing TOCTTOU games,

Re: [PATCH 2/3] kvm: fix potentially corrupt mmio cache

2014-09-02 Thread David Matlack
On Tue, Sep 2, 2014 at 9:49 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 02/09/2014 18:44, David Matlack ha scritto: -#define MMIO_GEN_SHIFT 19 -#define MMIO_GEN_LOW_SHIFT 9 -#define MMIO_GEN_LOW_MASK ((1 MMIO_GEN_LOW_SHIFT) - 1) +#define

Re: [PATCH 0/3] fix bugs with stale or corrupt MMIO caches

2014-09-02 Thread David Matlack
On Tue, Sep 2, 2014 at 9:50 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 02/09/2014 18:47, David Matlack ha scritto: Ping? Sorry for the delay. I think the patches look good. And patch 3/3 still fixes the bug I was originally seeing, so I'm happy :). I just had one small comment (see my

Re: [PATCH 2/4] KVM: nSVM: propagate the NPF EXITINFO to the guest

2014-09-02 Thread Avi Kivity
On 09/02/2014 07:46 PM, Paolo Bonzini wrote: */ if (unlikely(real_gfn == UNMAPPED_GVA)) goto error; @@ -1974,10 +1974,28 @@ static void nested_svm_inject_npf_exit(struct kvm_vcpu *vcpu, { struct vcpu_svm *svm = to_svm(vcpu); -

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-02 Thread Andrey Korolyov
On Tue, Sep 2, 2014 at 10:36 AM, Amit Shah amit.s...@redhat.com wrote: On (Mon) 01 Sep 2014 [20:52:46], Zhang Haoyu wrote: Hi, all I start a VM with virtio-serial (default ports number: 31), and found that virtio-blk performance degradation happened, about 25%, this problem can be

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-02 Thread Amit Shah
On (Tue) 02 Sep 2014 [22:05:45], Andrey Korolyov wrote: Can confirm serious degradation comparing to the 1.1 with regular serial output - I am able to hang VM forever after some tens of seconds after continuously printing dmest to the ttyS0. VM just ate all available CPU quota during test

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-02 Thread Andrey Korolyov
On Tue, Sep 2, 2014 at 10:11 PM, Amit Shah amit.s...@redhat.com wrote: On (Tue) 02 Sep 2014 [22:05:45], Andrey Korolyov wrote: Can confirm serious degradation comparing to the 1.1 with regular serial output - I am able to hang VM forever after some tens of seconds after continuously printing

Re: kvm-unit-test failures

2014-09-02 Thread Chris J Arges
On 08/31/2014 11:05 AM, Paolo Bonzini wrote: Il 29/08/2014 23:05, Chris J Arges ha scritto: And indeed there is a condition where matched already_matched are both true. In this case we don't zero or increment nr_vcpus_matched_tsc. Incrementing nr_vcpus_matched_tsc in that last else clause

Re: [PATCH v4 01/14] contrib: add ivshmem client and server

2014-09-02 Thread Eric Blake
On 09/02/2014 09:25 AM, David Marchand wrote: When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com

Re: [PATCH v4 02/14] docs: update ivshmem device spec

2014-09-02 Thread Eric Blake
On 09/02/2014 09:25 AM, David Marchand wrote: Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it.

Re: [PATCH v4 05/14] contrib/ivshmem-*: switch to QEMU headers

2014-09-02 Thread Eric Blake
On 09/02/2014 09:25 AM, David Marchand wrote: Reuse parsers from QEMU, C99 boolean. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 12 + contrib/ivshmem-client/ivshmem-client.h |4 +- contrib/ivshmem-client/main.c |

Re: [PATCH v4 00/14] ivshmem: update documentation, add client/server tools

2014-09-02 Thread Eric Blake
On 09/02/2014 09:25 AM, David Marchand wrote: Here is a patchset containing an update on ivshmem specs documentation and importing ivshmem server and client tools. These tools have been written from scratch and are not related to what is available in nahanni repository. I put them in contrib/

Re: [RFC v2 0/9] KVM-VFIO IRQ forward control

2014-09-02 Thread Alex Williamson
On Mon, 2014-09-01 at 14:52 +0200, Eric Auger wrote: This RFC proposes an integration of ARM: Forwarding physical interrupts to a guest VM (http://lwn.net/Articles/603514/) in KVM. It enables to transform a VFIO platform driver IRQ into a forwarded IRQ. The direct benefit is that, for a

issue with network on debian jessie with kvm/qemu

2014-09-02 Thread Robin Cook
Hey all, From all the manuals, faqs, howtos, etc. It looks like I have everything configured correctly and everything but the networking is working. Can anyone suggest what I might have wrong? On the network the host and anything on the actual network can ping the guest VM. But the guest

Re: [PATCH v4 4/6] kvm, mem-hotplug: Reload L1' apic access page on migration in vcpu_enter_guest().

2014-09-02 Thread tangchen
Hi Gleb, On 09/03/2014 12:00 AM, Gleb Natapov wrote: .. +static void vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu) +{ + /* +* apic access page could be migrated. When the page is being migrated, +* GUP will wait till the migrate entry is replaced with the new pte

Re: [PATCH v4 5/6] kvm, mem-hotplug: Reload L1's apic access page on migration when L2 is running.

2014-09-02 Thread tangchen
Hi Gleb, By the way, when testing nested vm, I started L1 and L2 vm with -cpu XXX, -x2apic But with or with out this patch 5/6, when migrating apic access page, the nested vm didn't corrupt. We cannot migrate L2 vm because it pinned some other pages in memory. Without this patch, if we

[Bug 82211] Cannot boot Xen under KVM with X2APIC enabled

2014-09-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=82211 --- Comment #7 from Zhou, Chao chao.z...@intel.com --- xen verion: 4.4-unstable. xen.gz file is attached -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line

KVM Test report, kernel fd275235... qemu 8b303011...

2014-09-02 Thread Hu, Robert
Hi All, This is KVM upstream test result against kvm.git next branch and qemu.git master branch. kvm.git next branch: fd2752352bbc98850d83b5448a288d8991590317 based on kernel 3.17.0-rc1 qemu.git master branch: 8b3030114a449e66c68450acaac4b66f26d91416 We found two new bugs and

[Bug 82211] Cannot boot Xen under KVM with X2APIC enabled

2014-09-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=82211 --- Comment #8 from Zhou, Chao chao.z...@intel.com --- Created attachment 149111 -- https://bugzilla.kernel.org/attachment.cgi?id=149111action=edit xen.gz file -- You are receiving this mail because: You are watching the assignee of the bug.

Re: [PATCH 0/3] fix bugs with stale or corrupt MMIO caches

2014-09-02 Thread Xiao Guangrong
On 09/02/2014 11:42 PM, Paolo Bonzini wrote: Il 29/08/2014 12:31, Paolo Bonzini ha scritto: David and Xiao, here's my take on the MMIO generation patches. Now with documentation, too. :) Please review! David Matlack (2): kvm: fix potentially corrupt mmio cache kvm: x86: fix stale mmio

[PATCH 0/3] KVM: PPC: Book3S: Some miscellanous fixes

2014-09-02 Thread Paul Mackerras
This series of patches is based on Alex Graf's kvm-ppc-queue branch. It contains 3 small patches from the tree that we are shipping on POWER8 machines: a fix for an error that we see very occasionally, and two minor improvements. Please apply for 3.18. Paul. ---

[PATCH 2/3] KVM: PPC: Book3S HV: Only accept host PVR value for guest PVR

2014-09-02 Thread Paul Mackerras
Since the guest can read the machine's PVR (Processor Version Register) directly and see the real value, we should disallow userspace from setting any value for the guest's PVR other than the real host value. Therefore this makes kvm_arch_vcpu_set_sregs_hv() check the supplied PVR value and return

[PATCH 3/3] KVM: PPC: Book3S PR: Implement ARCH_COMPAT register

2014-09-02 Thread Paul Mackerras
This provides basic support for the KVM_REG_PPC_ARCH_COMPAT register in PR KVM. At present the value is sanity-checked when set, but doesn't actually affect anything yet. Implementing this makes it possible to use a qemu command-line argument such as -cpu host,compat=power7 on a POWER8 machine,

[PATCH 1/3] KVM: PPC: Book3S HV: Increase timeout for grabbing secondary threads

2014-09-02 Thread Paul Mackerras
From: Paul Mackerras pau...@au1.ibm.com Occasional failures have been seen with split-core mode and migration where the message KVM: couldn't grab cpu appears. This increases the length of time that we wait from 1ms to 10ms, which seems to work around the issue. Signed-off-by: Paul Mackerras

[PATCH] powerpc/kvm/cma: Fix panic introduces by signed shift operation

2014-09-02 Thread Laurent Dufour
fc95ca7284bc54953165cba76c3228bd2cdb9591 introduces a memset in kvmppc_alloc_hpt since the general CMA doesn't clear the memory it allocates. However, the size argument passed to memset is computed from a signed value and its signed bit is extended by the cast the compiler is doing. This lead to