Re: [RFC PATCH] PPC: KVM: vfio kvm device: support spapr tce

2013-10-04 Thread Alexey Kardashevskiy
On 10/05/2013 11:52 AM, Alexey Kardashevskiy wrote: > On 05.10.2013 2:05, Alex Williamson wrote: >> On Fri, 2013-10-04 at 22:24 +1000, Alexey Kardashevskiy wrote: >>> This is a very rough change set required for ppc64 to use this KVM device. >>> >>> vfio_rm.c is a piece of code which is going to be

Re: [RFC PATCH] PPC: KVM: vfio kvm device: support spapr tce

2013-10-04 Thread Alexey Kardashevskiy
On 05.10.2013 2:05, Alex Williamson wrote: > On Fri, 2013-10-04 at 22:24 +1000, Alexey Kardashevskiy wrote: >> This is a very rough change set required for ppc64 to use this KVM device. >> >> vfio_rm.c is a piece of code which is going to be called from the realmode >> (MMU off), >> and I will put

Re: [PATCH] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Alexander Graf
On 05.10.2013, at 01:45, Paul Mackerras wrote: > On Fri, Oct 04, 2013 at 03:00:11PM +0200, Alexander Graf wrote: >> >> On 04.10.2013, at 14:35, Paul Mackerras wrote: >> >>> On Fri, Oct 04, 2013 at 02:27:02PM +0200, Alexander Graf wrote: On 04.10.2013, at 14:23, Alexander Graf wrote:

Re: [PATCH v2 0/2] KVM: s390: add floating irq controller

2013-10-04 Thread Alexander Graf
On 06.09.2013, at 15:30, Christian Borntraeger wrote: > On 06/09/13 14:19, Jens Freimann wrote:> This series adds a kvm_device that > acts as a irq controller for floating >> interrupts. As a first step it implements functionality to retrieve and >> inject >> interrupts for the purpose of migr

Re: [PATCH v2 2/2] KVM: s390: add floating irq controller

2013-10-04 Thread Alexander Graf
On 06.09.2013, at 14:19, Jens Freimann wrote: > This patch adds a floating irq controller as a kvm_device. > It will be necessary for migration of floating interrupts as well > as for hardening the reset code by allowing user space to explicitly > remove all pending floating interrupts. > > Sign

Re: [PATCH] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Paul Mackerras
On Fri, Oct 04, 2013 at 03:00:11PM +0200, Alexander Graf wrote: > > On 04.10.2013, at 14:35, Paul Mackerras wrote: > > > On Fri, Oct 04, 2013 at 02:27:02PM +0200, Alexander Graf wrote: > >> > >> On 04.10.2013, at 14:23, Alexander Graf wrote: > >> > >>> > >>> On 03.10.2013, at 06:14, Paul Macke

Re: [PATCH 2/2] KVM: PPC: Book3S HV: Better handling of exceptions that happen in real mode

2013-10-04 Thread Paul Mackerras
On Fri, Oct 04, 2013 at 02:56:31PM +0200, Alexander Graf wrote: > > On 04.10.2013, at 14:33, Paul Mackerras wrote: > > > On Fri, Oct 04, 2013 at 01:59:25PM +0200, Alexander Graf wrote: > >> > >> On 04.10.2013, at 13:45, Paul Mackerras wrote: > >> > >>> When an interrupt or exception happens in

Re: [PATCH v2 1/2] KVM: s390: add and extend interrupt information data structs

2013-10-04 Thread Alexander Graf
On 06.09.2013, at 14:19, Jens Freimann wrote: > With the currently available struct kvm_s390_interrupt it is not possible to > inject every kind of interrupt as defined in the z/Architecture. Add > additional interruption parameters to the structures and move it to kvm.h > > Signed-off-by: Jens

[RFC PATCH] vfio-pci: Disallow device from using NoSnoop transactions

2013-10-04 Thread Alex Williamson
NoSnoop is a PCIe attribute that allows devices to issue transactions that bypass cache. If devices are allowed to do this then the hypervisor must emulate instructions like WBINVD or else drivers in the guest have no way to synchronize RAM for the device. Instead of forcing WBINVD when a device

[PATCH 0/2] VFIO pull request fixes

2013-10-04 Thread Alex Williamson
Bugs found by Paolo and Alexey. I'll include these in my next pull request. Thanks, Alex --- Alex Williamson (2): vfio-pci: Add dummy PCI ROM write accessor vfio-pci: Fix endian issues in vfio_pci_size_rom() hw/misc/vfio.c | 10 -- 1 file changed, 8 insertions(+), 2 de

[PATCH 2/2] vfio-pci: Fix endian issues in vfio_pci_size_rom()

2013-10-04 Thread Alex Williamson
VFIO is always little endian so do byte swapping of our mask on the way in and byte swapping of the size on the way out. Signed-off-by: Alex Williamson Reported-by: Alexey Kardashevskiy --- hw/misc/vfio.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/vfio.c

[PATCH 1/2] vfio-pci: Add dummy PCI ROM write accessor

2013-10-04 Thread Alex Williamson
Just to be sure we don't jump off any NULL pointer cliffs. Signed-off-by: Alex Williamson Reported-by: Paolo Bonzini --- hw/misc/vfio.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 68e25bd..1fbc40b 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/v

Re: [PATCH 2/3] kvm/ppc: IRQ disabling cleanup

2013-10-04 Thread Scott Wood
On Fri, 2013-09-06 at 01:06 +0200, Alexander Graf wrote: > On 06.09.2013, at 00:09, Scott Wood wrote: > > > On Thu, 2013-07-11 at 01:09 +0200, Alexander Graf wrote: > >> On 11.07.2013, at 01:08, Scott Wood wrote: > >> > >>> On 07/10/2013 06:04:53 PM, Alexander Graf wrote: > On 11.07.2013, at

[PATCH v3 1/2] KVM: ARM: Support hugetlbfs backed huge pages

2013-10-04 Thread Christoffer Dall
Support huge pages in KVM/ARM and KVM/ARM64. The pud_huge checking on the unmap path may feel a bit silly as the pud_huge check is always defined to false, but the compiler should be smart about this. Note: This deals only with VMAs marked as huge which are allocated by users through hugetlbfs on

[PATCH v3 2/2] KVM: ARM: Transparent huge page (THP) support

2013-10-04 Thread Christoffer Dall
Support transparent huge pages in KVM/ARM and KVM/ARM64. The transparent_hugepage_adjust is not very pretty, but this is also how it's solved on x86 and seems to be simply an artifact on how THPs behave. This should eventually be shared across architectures if possible, but that can always be cha

[PATCH v3 0/2] KVM/ARM Huge pages support

2013-10-04 Thread Christoffer Dall
This small series adds support for Transparent Huge Pages and hugetlbfs pages for KVM on the arm and arm64 architectures. Measurements have shown that using huge pages in for stage-2 mappings provides up to more than 15% performance increase for some workloads. The patch series applies to kvm/nex

Re: [RFC PATCH] PPC: KVM: vfio kvm device: support spapr tce

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 22:24 +1000, Alexey Kardashevskiy wrote: > This is a very rough change set required for ppc64 to use this KVM device. > > vfio_rm.c is a piece of code which is going to be called from the realmode > (MMU off), > and I will put everything spapr-related under #ifdef CONFIG_SPA

Re: [PATCH v2 1/2] KVM: ARM: Support hugetlbfs backed huge pages

2013-10-04 Thread Christoffer Dall
On Fri, Oct 04, 2013 at 09:50:35AM +0100, Marc Zyngier wrote: > Hi Christoffer, > > On 03/10/13 21:36, Christoffer Dall wrote: > > Support huge pages in KVM/ARM and KVM/ARM64. The pud_huge checking on > > the unmap path may feel a bit silly as the pud_huge check is always > > defined to false, bu

RE: [PATCH 1/3 v6] kvm: powerpc: keep only pte search logic in lookup_linux_pte

2013-10-04 Thread Bhushan Bharat-R65777
Adding Paul > -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Friday, October 04, 2013 8:49 PM > To: Bhushan Bharat-R65777 > Cc: kvm@vger.kernel.org; kvm-...@vger.kernel.org; Wood Scott-B07421; > b...@kernel.crashing.org; Bhushan Bharat-R65777 > Subject: Re: [PATCH

Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

2013-10-04 Thread Kashyap Chamarthy
On Fri, Oct 4, 2013 at 6:38 PM, Gleb Natapov wrote: > On Fri, Oct 04, 2013 at 04:05:50PM +0300, Gleb Natapov wrote: >> On Fri, Oct 04, 2013 at 06:03:33PM +0530, Kashyap Chamarthy wrote: >> > On Fri, Oct 4, 2013 at 3:09 PM, Gleb Natapov wrote: >> > > On Fri, Oct 04, 2013 at 03:03:17PM +0530, Kashy

Re: [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 22:13 +1000, Alexey Kardashevskiy wrote: > On 10/04/2013 01:39 AM, Alex Williamson wrote: > > During vfio-pci initfn, the device is not always in a state where the > > option ROM can be read. In the case of graphics cards, there's often > > no per function reset, which means

Re: [PATCH 1/3 v6] kvm: powerpc: keep only pte search logic in lookup_linux_pte

2013-10-04 Thread Alexander Graf
On 04.10.2013, at 16:55, Bharat Bhushan wrote: > lookup_linux_pte() was searching for a pte and also sets access > flags is writable. This function now searches only pte while > access flag setting is done explicitly. > > This pte lookup is not kvm specific, so moved to common code (asm/pgtable.

[PATCH 2/3 v6] kvm: booke: clear host tlb reference flag on guest tlb invalidation

2013-10-04 Thread Bharat Bhushan
On booke, "struct tlbe_ref" contains host tlb mapping information (pfn: for guest-pfn to pfn, flags: attribute associated with this mapping) for a guest tlb entry. So when a guest creates a TLB entry then "struct tlbe_ref" is set to point to valid "pfn" and set attributes in "flags" field of the ab

[PATCH 1/3 v6] kvm: powerpc: keep only pte search logic in lookup_linux_pte

2013-10-04 Thread Bharat Bhushan
lookup_linux_pte() was searching for a pte and also sets access flags is writable. This function now searches only pte while access flag setting is done explicitly. This pte lookup is not kvm specific, so moved to common code (asm/pgtable.h) My Followup patch will use this on booke. Signed-off-by

[PATCH 3/3 v6] kvm: powerpc: use caching attributes as per linux pte

2013-10-04 Thread Bharat Bhushan
KVM uses same WIM tlb attributes as the corresponding qemu pte. For this we now search the linux pte for the requested page and get these cache caching/coherency attributes from pte. Signed-off-by: Bharat Bhushan --- v5->v6 - no change arch/powerpc/include/asm/kvm_host.h |2 +- arch/powerp

[PATCH 0/3 v6] kvm: powerpc: use cache attributes from linux pte

2013-10-04 Thread Bharat Bhushan
From: Bharat Bhushan kvm: powerpc: use cache attributes from linux pte First patch is moving functions/logic in common code so they can be used on booke also. Second and Third patch is actually setting caching attributes (TLB.WIMGE) using corresponding Linux pte. v5-v6 - First three patches a

Re: [PATCH] trace-cmd: Report unknown VMX exit reasons with code

2013-10-04 Thread Steven Rostedt
On Fri, 04 Oct 2013 15:40:29 +0200 Jan Kiszka wrote: > Ping. While my other patch of that time was merged, this one didn't make > it yet. Any open issues? Hmm, no. Not sure how I missed this one. Probably because it didn't have the 2/2 patch format and I thought there was only one patch? I'll

Re: [PATCH 3/4] kvm: Create non-coherent DMA registeration

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 20:02 +1000, Alexey Kardashevskiy wrote: > On 10/02/2013 06:15 AM, Alex Williamson wrote: > > We currently use some ad-hoc arch variables tied to legacy KVM device > > assignment to manage emulation of instructions that depend on whether > > non-coherent DMA is present. Creat

Re: [PATCH -V2] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Alexander Graf
On 03.10.2013, at 09:58, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > This was introduced by 85a0d845d8 ("KVM: PPC: Book3S PR: Allocate > kvm_vcpu structs from kvm_vcpu_cache"). > > arch/powerpc/kvm/book3s_pr.c: In function 'kvmppc_core_vcpu_create': > arch/powerpc/kvm/book3s_pr.c:11

Re: [PATCH] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Aneesh Kumar K.V
Alexander Graf writes: > On 04.10.2013, at 14:23, Alexander Graf wrote: > >> >> On 03.10.2013, at 06:14, Paul Mackerras wrote: >> >>> On Wed, Oct 02, 2013 at 08:08:44PM +0530, Aneesh Kumar K.V wrote: From: "Aneesh Kumar K.V" This was introduced by 85a0d845d8bb5df5d2669416212f56

Re: [PATCH 0/6 v5] kvm: powerpc: use cache attributes from linux pte

2013-10-04 Thread Alexander Graf
On 19.09.2013, at 08:02, Bharat Bhushan wrote: > From: Bharat Bhushan > > First patch is a typo fix where book3e define _PAGE_LENDIAN while it > should be defined as _PAGE_ENDIAN. This seems to show that this is never > exercised :-) > > Second and third patch is to allow guest controlling "G

Re: [PATCH 0/4 v6] KVM :PPC: Userspace Debug support

2013-10-04 Thread Alexander Graf
On 04.07.2013, at 08:57, Bharat Bhushan wrote: > From: Bharat Bhushan > > Note: These patches depends on https://lkml.org/lkml/2013/7/4/49. > > This patchset adds the userspace debug support for booke/bookehv. > this is tested on powerpc e500v2/e500mc devices. Thanks, applied to kvm-ppc-queue

Re: [PATCH] trace-cmd: Report unknown VMX exit reasons with code

2013-10-04 Thread Jan Kiszka
On 2013-08-11 09:59, Jan Kiszka wrote: > From: Jan Kiszka > > Allows to parse the result even if the KVM plugin does not yet > understand a specific exit code. > > Signed-off-by: Jan Kiszka > --- > plugin_kvm.c | 12 > 1 files changed, 8 insertions(+), 4 deletions(-) > > diff -

Re: [RFC PATCH] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-04 Thread Aneesh Kumar K.V
Cédric Le Goater writes: > MMIO emulation reads the last instruction executed by the guest > and then emulates. If the guest is running in Little Endian mode, > the instruction needs to be byte-swapped before being emulated. > > This patch stores the last instruction in the endian order of the >

RE: [PATCH 4/6 v5] kvm: powerpc: keep only pte search logic in lookup_linux_pte

2013-10-04 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Friday, October 04, 2013 6:57 PM > To: Bhushan Bharat-R65777 > Cc: b...@kernel.crashing.org; pau...@samba.org; kvm@vger.kernel.org; kvm- > p...@vger.kernel.org; linuxppc-...@lists.ozlabs.org; Wood Scott-B07421; >

Re: [PATCH 2/2] kvm: ppc: booke: check range page invalidation progress on page setup

2013-10-04 Thread Alexander Graf
On 07.08.2013, at 12:03, Bharat Bhushan wrote: > When the MM code is invalidating a range of pages, it calls the KVM > kvm_mmu_notifier_invalidate_range_start() notifier function, which calls > kvm_unmap_hva_range(), which arranges to flush all the TLBs for guest pages. > However, the Linux PTEs

Re: [PATCH 1/2] kvm: powerpc: mark page accessed when mapping a guest page

2013-10-04 Thread Alexander Graf
On 07.08.2013, at 12:03, Bharat Bhushan wrote: > Mark the guest page as accessed so that there is likely > less chances of this page getting swap-out. > > Signed-off-by: Bharat Bhushan Thanks, applied to kvm-ppc-queue. Alex > --- > arch/powerpc/kvm/e500_mmu_host.c |3 +++ > 1 files chang

Re: [PATCH 4/6 v5] kvm: powerpc: keep only pte search logic in lookup_linux_pte

2013-10-04 Thread Alexander Graf
On 19.09.2013, at 08:02, Bharat Bhushan wrote: > lookup_linux_pte() was searching for a pte and also sets access > flags is writable. This function now searches only pte while > access flag setting is done explicitly. > > This pte lookup is not kvm specific, so moved to common code (asm/pgtable.

Re: [PATCH] KVM: PPC: Book3S HV: Fix typo in saving DSCR

2013-10-04 Thread Alexander Graf
On 21.09.2013, at 01:53, Paul Mackerras wrote: > This fixes a typo in the code that saves the guest DSCR (Data Stream > Control Register) into the kvm_vcpu_arch struct on guest exit. The > effect of the typo was that the DSCR value was saved in the wrong place, > so changes to the DSCR by the gu

Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

2013-10-04 Thread Gleb Natapov
On Fri, Oct 04, 2013 at 04:05:50PM +0300, Gleb Natapov wrote: > On Fri, Oct 04, 2013 at 06:03:33PM +0530, Kashyap Chamarthy wrote: > > On Fri, Oct 4, 2013 at 3:09 PM, Gleb Natapov wrote: > > > On Fri, Oct 04, 2013 at 03:03:17PM +0530, Kashyap Chamarthy wrote: > > >> Discussed with Gleb on IRC: I'l

Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

2013-10-04 Thread Gleb Natapov
On Fri, Oct 04, 2013 at 06:03:33PM +0530, Kashyap Chamarthy wrote: > On Fri, Oct 4, 2013 at 3:09 PM, Gleb Natapov wrote: > > On Fri, Oct 04, 2013 at 03:03:17PM +0530, Kashyap Chamarthy wrote: > >> Discussed with Gleb on IRC: I'll have to try with kvm.git > > I just compiled kernel from kvm.git qu

Re: [PATCH] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Alexander Graf
On 04.10.2013, at 14:35, Paul Mackerras wrote: > On Fri, Oct 04, 2013 at 02:27:02PM +0200, Alexander Graf wrote: >> >> On 04.10.2013, at 14:23, Alexander Graf wrote: >> >>> >>> On 03.10.2013, at 06:14, Paul Mackerras wrote: >>> On Wed, Oct 02, 2013 at 08:08:44PM +0530, Aneesh Kumar K.V w

Re: [PATCH 2/2] KVM: PPC: Book3S HV: Better handling of exceptions that happen in real mode

2013-10-04 Thread Alexander Graf
On 04.10.2013, at 14:33, Paul Mackerras wrote: > On Fri, Oct 04, 2013 at 01:59:25PM +0200, Alexander Graf wrote: >> >> On 04.10.2013, at 13:45, Paul Mackerras wrote: >> >>> When an interrupt or exception happens in the guest that comes to the >>> host, the CPU goes to hypervisor real mode (MMU

Re: [RFC PATCH] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-04 Thread Alexander Graf
On 03.10.2013, at 13:03, Cédric Le Goater wrote: > MMIO emulation reads the last instruction executed by the guest > and then emulates. If the guest is running in Little Endian mode, > the instruction needs to be byte-swapped before being emulated. > > This patch stores the last instruction in t

Re: [PATCH] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Paul Mackerras
On Fri, Oct 04, 2013 at 02:27:02PM +0200, Alexander Graf wrote: > > On 04.10.2013, at 14:23, Alexander Graf wrote: > > > > > On 03.10.2013, at 06:14, Paul Mackerras wrote: > > > >> On Wed, Oct 02, 2013 at 08:08:44PM +0530, Aneesh Kumar K.V wrote: > >>> From: "Aneesh Kumar K.V" > >>> > >>> Thi

Re: [PATCH 2/2] KVM: PPC: Book3S HV: Better handling of exceptions that happen in real mode

2013-10-04 Thread Paul Mackerras
On Fri, Oct 04, 2013 at 01:59:25PM +0200, Alexander Graf wrote: > > On 04.10.2013, at 13:45, Paul Mackerras wrote: > > > When an interrupt or exception happens in the guest that comes to the > > host, the CPU goes to hypervisor real mode (MMU off) to handle the > > exception but doesn't change th

Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

2013-10-04 Thread Kashyap Chamarthy
On Fri, Oct 4, 2013 at 3:09 PM, Gleb Natapov wrote: > On Fri, Oct 04, 2013 at 03:03:17PM +0530, Kashyap Chamarthy wrote: >> Discussed with Gleb on IRC: I'll have to try with kvm.git I just compiled kernel from kvm.git queue on both L0 and L1. For completeness' sake, this how I did: $ git de

Re: [PATCH] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Alexander Graf
On 04.10.2013, at 14:23, Alexander Graf wrote: > > On 03.10.2013, at 06:14, Paul Mackerras wrote: > >> On Wed, Oct 02, 2013 at 08:08:44PM +0530, Aneesh Kumar K.V wrote: >>> From: "Aneesh Kumar K.V" >>> >>> This was introduced by 85a0d845d8bb5df5d2669416212f56cbe1474c6b >> >> It's a good idea

Exchanged packet at the end of the migration

2013-10-04 Thread Daniele
Hi all, with purposes of test, I'm performing some migration of virtual machines using kvm and libvirt. To evaluate their performance I need to understand exactly what is the instant when the migration is fully complete. To achieve it I'm analysing with wireshark the network interface of the dest

[RFC PATCH] PPC: KVM: vfio kvm device: support spapr tce

2013-10-04 Thread Alexey Kardashevskiy
This is a very rough change set required for ppc64 to use this KVM device. vfio_rm.c is a piece of code which is going to be called from the realmode (MMU off), and I will put everything spapr-related under #ifdef CONFIG_SPAPR_TCE_IOMMU, it is just friday and I have to run :) This is an RFC but

Re: [PATCH] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-04 Thread Alexander Graf
On 03.10.2013, at 06:14, Paul Mackerras wrote: > On Wed, Oct 02, 2013 at 08:08:44PM +0530, Aneesh Kumar K.V wrote: >> From: "Aneesh Kumar K.V" >> >> This was introduced by 85a0d845d8bb5df5d2669416212f56cbe1474c6b > > It's a good idea to give the headline of the commit as well as the ID. > I al

Re: [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-04 Thread Alexey Kardashevskiy
On 10/04/2013 01:39 AM, Alex Williamson wrote: > During vfio-pci initfn, the device is not always in a state where the > option ROM can be read. In the case of graphics cards, there's often > no per function reset, which means we have host driver state affecting > whether the option ROM is usable.

Re: [PATCH 2/2] KVM: PPC: Book3S HV: Better handling of exceptions that happen in real mode

2013-10-04 Thread Alexander Graf
On 04.10.2013, at 13:45, Paul Mackerras wrote: > When an interrupt or exception happens in the guest that comes to the > host, the CPU goes to hypervisor real mode (MMU off) to handle the > exception but doesn't change the MMU context. After saving a few > registers, we then clear the "in guest"

[PATCH 0/2] KVM: PPC: Some more fixes for HV KVM

2013-10-04 Thread Paul Mackerras
Here are two small patches for HV KVM. The first patch in this series corrects some silly errors in one of the patches I sent recently. The second gives us a way to detect when we get an exception in the HV guest entry/exit code, and is a prerequisite for the HV/PR unification patches that Aneesh

[PATCH 1/2] KVM: PPC: Book3S HV: Add missing break statements in ONE_REG switches

2013-10-04 Thread Paul Mackerras
This adds break statements after the KVM_REG_PPC_PPR case in kvmppc_get_one_reg() and kvmppc_set_one_reg(). The error was introduced in commit d3ecc54390 ("KVM: PPC: Book3S HV: Support POWER6 compatibility mode on POWER7"). That commit also forgot to update Documentation/virtual/kvm/api.txt with

[PATCH 2/2] KVM: PPC: Book3S HV: Better handling of exceptions that happen in real mode

2013-10-04 Thread Paul Mackerras
When an interrupt or exception happens in the guest that comes to the host, the CPU goes to hypervisor real mode (MMU off) to handle the exception but doesn't change the MMU context. After saving a few registers, we then clear the "in guest" flag. If, for any reason, we get an exception in the re

Re: [PATCH 1/2] kvm/powerpc: rename kvm_hypercall() to epapr_hypercall()

2013-10-04 Thread Alexander Graf
On 04.10.2013, at 06:26, Bhushan Bharat-R65777 wrote: > > >> -Original Message- >> From: Wood Scott-B07421 >> Sent: Thursday, October 03, 2013 12:04 AM >> To: Alexander Graf >> Cc: Bhushan Bharat-R65777; kvm-...@vger.kernel.org; kvm@vger.kernel.org; >> Bhushan >> Bharat-R65777 >> Subje

Re: [PATCH uq/master] kvmvapic: Prevent reading beyond the end of guest RAM

2013-10-04 Thread Gleb Natapov
On Mon, Sep 30, 2013 at 12:35:13PM +0200, Jan Kiszka wrote: > rom_state_paddr is guest provided (caller address of outw(VAPIC_PORT) + > writen 16-bit value) and can be influenced to point beyond the end of > the host memory backing the guest's RAM. Make sure we do not use this > pointer to actually

Re: [PATCH 3/4] kvm: Create non-coherent DMA registeration

2013-10-04 Thread Alexey Kardashevskiy
On 10/02/2013 06:15 AM, Alex Williamson wrote: > We currently use some ad-hoc arch variables tied to legacy KVM device > assignment to manage emulation of instructions that depend on whether > non-coherent DMA is present. Create an interface for this so that we > can register coherency for other d

Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

2013-10-04 Thread Gleb Natapov
On Fri, Oct 04, 2013 at 03:03:17PM +0530, Kashyap Chamarthy wrote: > Discussed with Gleb on IRC: I'll have to try with kvm.git and a simple > qemu-kvm command line. > And try to disable shadow vmcs on the host just to rule it out. > Thanks, Gleb. > > On Fri, Oct 4, 2013 at 2:01 PM, Kashyap Chama

Re: [nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

2013-10-04 Thread Kashyap Chamarthy
Discussed with Gleb on IRC: I'll have to try with kvm.git and a simple qemu-kvm command line. Thanks, Gleb. On Fri, Oct 4, 2013 at 2:01 PM, Kashyap Chamarthy wrote: > I have EPT enabled on L0, disabled on L1, and when attempted to boot > an L2 guest, it results in cursor just blinking on the ser

Re: [PATCH 3/3] KVM: ARM: Transparent huge pages and hugetlbfs support

2013-10-04 Thread Marc Zyngier
On 2013-10-03 21:33, Christoffer Dall wrote: On Mon, Sep 23, 2013 at 11:11:07AM +0100, Marc Zyngier wrote: [...] > > +static bool transparent_hugepage_adjust(pfn_t *pfnp, phys_addr_t *ipap) > +{ > + pfn_t pfn = *pfnp; > + gfn_t gfn = *ipap >> PAGE_SHIFT; > + > + if (PageTra

Re: [PATCH v2 2/2] KVM: ARM: Transparent huge page (THP) support

2013-10-04 Thread Marc Zyngier
On 03/10/13 21:36, Christoffer Dall wrote: > Support transparent huge pages in KVM/ARM and KVM/ARM64. The > transparent_hugepage_adjust is not very pretty, but this is also how > it's solved on x86 and seems to be simply an artifact on how THPs > behave. This should eventually be shared across ar

Re: [PATCH v2 1/2] KVM: ARM: Support hugetlbfs backed huge pages

2013-10-04 Thread Marc Zyngier
Hi Christoffer, On 03/10/13 21:36, Christoffer Dall wrote: > Support huge pages in KVM/ARM and KVM/ARM64. The pud_huge checking on > the unmap path may feel a bit silly as the pud_huge check is always > defined to false, but the compiler should be smart about this. > > Note: This deals only with

[nvmx testing, linux on linux] Disabling EPT in L1 renders L2 stuck on boot

2013-10-04 Thread Kashyap Chamarthy
I have EPT enabled on L0, disabled on L1, and when attempted to boot an L2 guest, it results in cursor just blinking on the serial console. (All of them are Fedora 19 minimal guests.) To be clear, by "disable" I mean, the below KVM parameter is N $ cat /sys/module/kvm_intel/parameters/ep