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

[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 i

[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 pgs

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 environm

[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, f

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

2014-09-02 Thread Will Deacon
From: Cornelia Huck Using the new kvm_register_device_ops() interface makes us get rid of an #ifdef in common code. Cc: Gleb Natapov Cc: Paolo Bonzini Signed-off-by: Cornelia Huck Signed-off-by: Will Deacon --- arch/s390/kvm/kvm-s390.c | 3 ++- arch/s390/kvm/kvm-s390.h | 1 + include/linux/

[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 virt

[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 Cc: Paolo Bonzini Acked-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Will Deacon --- include/linux/kvm_host.h | 1 - virt/kvm/ar

[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 Cc: Paolo Bonzini Acked-by: Alex Williamson Signed-off-by: Will Deacon -

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 neste

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 c

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 c

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: > https://www.drop

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. V

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 fau

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

2014-09-02 Thread Juan Quintela
Juan Quintela 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 cale

[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 an

[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 --- x86/svm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x86/svm.c b/x86/svm.c index

[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 --- x86/svm.c | 50

[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 Signed-off-by: Paolo Bonzini --- x86/svm.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/x86/svm.c b/x86/svm.c index df316b5..85bb1fa 100644 --- 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 b

[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: Valen

[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 --- arch/x86/kvm/paging_tmpl.h | 6 ++ arch/x86/kvm/svm.c | 26 ++ 2 files changed, 28 insertions(+)

[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 --- arch/x86/kvm/cpuid.h | 8 +

[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 n

[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 --- 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 --- a/contrib/ivshmem-server/ivshmem-

[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 --- contrib/ivshmem-client/ivshmem-client.c | 17 contrib/ivshmem-client/ivshmem-client.h |7 --- contrib/ivshmem-server/ivshmem-server.c | 33 --- contrib/ivshmem-server/ivsh

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

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand --- 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 --- a/contrib/ivshmem-server/ivshmem-se

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

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand --- 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 b/contrib/ivshmem-client/ivshmem-client

[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 Reviewed-by: Claudio Fontana -

[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 --- contrib/ivshmem-client/ivshmem-client.c | 17 - contrib/ivshmem-server/ivshmem-server.c | 19 ++- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/c

[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 --- contrib/ivshmem-client/ivshmem-client.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[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: Da

[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 --- contrib/ivshmem-client/ivshmem-client.c | 47 ++- contrib/ivshmem-client/ivshmem-client.h | 76 +++ contrib/ivshmem-client/main.c | 21 - contrib/ivshmem-server/

[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 Signed-off-by: David Marchand --- contrib/ivshmem-client/Makefile | 2

[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 --- Makefile|8 configure |3 +++ contrib/ivshmem-client/Makefile | 29 - contrib/ivshmem-server/Makefile | 29 - 4 files changed, 11 insertions

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

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand --- 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 f8a7b66..a8e1586 100644 --- a/contrib/iv

[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 --- contrib/ivshmem-server/main.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c index

[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 --- 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 | 14 +- contrib/iv

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): > K

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 sti

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 migrate

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 pass

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 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 masked and disabled aut

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 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. > > > > Signed-off-by:

[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 e

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 implement

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 > --- > arch/x86/kvm/pa

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 wrote: > From: David Matlack > > 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 vcpu that is handling an exit. > > I

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 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

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 Jun

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

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

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 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 MMIO_

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 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 reply to p

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); - svm->vmcb->con

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 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 b

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 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 dmest to the

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

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 > Signed-off-by: David Ma

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. > > Sign

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 > --- > contrib/ivshmem-client/ivshmem-client.c | 12 + > contrib/ivshmem-client/ivshmem-client.h |4 +- > contrib/ivshmem-client/main.c | 12 + > con

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 cont

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, fo

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 gue

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 --- 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 "unsubscribe kvm" in the body

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 --- Created attachment 149111 --> https://bugzilla.kernel.org/attachment.cgi?id=149111&action=edit xen.gz file -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe f

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: fi