Re: [PATCH] KVM/MIPS32: Export min_low_pfn.

2013-05-17 Thread Gleb Natapov
On Fri, May 17, 2013 at 02:42:48PM -0700, David Daney wrote: > On 05/17/2013 02:06 PM, Sanjay Lal wrote: > >The KVM module uses the standard MIPS cache management routines, which use > >min_low_pfn. > >This creates and indirect dependency, requiring min_low_pfn to be exported. > > > >Signed-off-by

Re: [PATCH 3/3] KVM/MIPS32: Fix up KVM breakage caused by d532f3d26716a39dfd4b88d687bd344fbe77e390 which allows ASID mask and increment to be determined @ runtime.

2013-05-17 Thread Gleb Natapov
On Sat, May 18, 2013 at 02:06:36AM +0200, Ralf Baechle wrote: > On Fri, May 17, 2013 at 02:25:12PM -0700, Sanjay Lal wrote: > > Date: Fri, 17 May 2013 14:25:12 -0700 > > From: Sanjay Lal > > To: kvm@vger.kernel.org > > Cc: linux-m...@linux-mips.org, r...@linux-mips.org, g...@redhat.com, > > mto

Re: [PATCH 2/3] KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()

2013-05-17 Thread Gleb Natapov
On Fri, May 17, 2013 at 02:25:11PM -0700, Sanjay Lal wrote: > - As suggested by Gleb, wrap calls to gfn_to_pfn() with > srcu_read_lock/unlock(). > Memory slots should be acccessed from a SRCU read section. > - kvm_mips_map_page() now returns an error code to it's callers, instead of > calling p

Re: [PATCH 3/3] KVM/MIPS32: Fix up KVM breakage caused by d532f3d26716a39dfd4b88d687bd344fbe77e390 which allows ASID mask and increment to be determined @ runtime.

2013-05-17 Thread Ralf Baechle
On Fri, May 17, 2013 at 02:25:12PM -0700, Sanjay Lal wrote: > Date: Fri, 17 May 2013 14:25:12 -0700 > From: Sanjay Lal > To: kvm@vger.kernel.org > Cc: linux-m...@linux-mips.org, r...@linux-mips.org, g...@redhat.com, > mtosa...@redhat.com, Sanjay Lal > Subject: [PATCH 3/3] KVM/MIPS32: Fix up KV

Re: [PATCH] KVM/MIPS32: Export min_low_pfn.

2013-05-17 Thread David Daney
On 05/17/2013 02:06 PM, Sanjay Lal wrote: The KVM module uses the standard MIPS cache management routines, which use min_low_pfn. This creates and indirect dependency, requiring min_low_pfn to be exported. Signed-off-by: Sanjay Lal --- arch/mips/kernel/mips_ksyms.c | 6 ++ 1 file change

[RESEND][PATCH v2] kvm/ppc/booke: Hold srcu lock when calling gfn functions

2013-05-17 Thread Scott Wood
KVM core expects arch code to acquire the srcu lock when calling gfn_to_memslot and similar functions. Signed-off-by: Scott Wood --- Resending as it doesn't seem to have made it to the mailing list archives or patchwork. v2: Eliminate need_srcu and move the locking into the switch cases that nee

[PATCH 3/3] KVM/MIPS32: Fix up KVM breakage caused by d532f3d26716a39dfd4b88d687bd344fbe77e390 which allows ASID mask and increment to be determined @ runtime.

2013-05-17 Thread Sanjay Lal
The ASID paramters have default values which are then patched @ runtime as part of the TLB initialization. The fixup does not work since KVM is a kernel module and we end up with the default mask of 0xfc0 instead of the standard ASID mask of 0xff for MIPS32R2 processors. I've posted the issue on

[PATCH 2/3] KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()

2013-05-17 Thread Sanjay Lal
- As suggested by Gleb, wrap calls to gfn_to_pfn() with srcu_read_lock/unlock(). Memory slots should be acccessed from a SRCU read section. - kvm_mips_map_page() now returns an error code to it's callers, instead of calling panic() if it cannot find a mapping for a particular gfn. Signed-off-b

[PATCH v2 0/3] KVM/MIPS32: Fixes for Linux 3.10

2013-05-17 Thread Sanjay Lal
The following patch set fixes a few issues with KVM/MIPS32 in Linux 3.10. -- Sanjay Lal (3): KVM/MIPS32: Move include/asm/kvm.h => include/uapi/asm/kvm.h since it is a user visible API. KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock() KVM/MIPS32: Fix up KVM breakage c

[PATCH 1/3] KVM/MIPS32: Move include/asm/kvm.h => include/uapi/asm/kvm.h since it is a user visible API.

2013-05-17 Thread Sanjay Lal
Signed-off-by: Sanjay Lal --- arch/mips/include/asm/kvm.h | 55 arch/mips/include/uapi/asm/kvm.h | 55 2 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 arch/mips/include/asm/kvm.h create

[PATCH] KVM/MIPS32: Export min_low_pfn.

2013-05-17 Thread Sanjay Lal
The KVM module uses the standard MIPS cache management routines, which use min_low_pfn. This creates and indirect dependency, requiring min_low_pfn to be exported. Signed-off-by: Sanjay Lal --- arch/mips/kernel/mips_ksyms.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/ker

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-05-17 Thread Kevin Hilman
Frederic Weisbecker writes: > On Fri, May 17, 2013 at 07:09:42AM -0700, Kevin Hilman wrote: >> Frederic Weisbecker writes: >> >> > On Thu, May 16, 2013 at 12:52:03AM +0200, Frederic Weisbecker wrote: >> >> On Mon, Mar 25, 2013 at 02:14:20PM -0700, Kevin Hilman wrote: >> >> > Gleb Natapov write

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-05-17 Thread Frederic Weisbecker
On Fri, May 17, 2013 at 07:09:42AM -0700, Kevin Hilman wrote: > Frederic Weisbecker writes: > > > On Thu, May 16, 2013 at 12:52:03AM +0200, Frederic Weisbecker wrote: > >> On Mon, Mar 25, 2013 at 02:14:20PM -0700, Kevin Hilman wrote: > >> > Gleb Natapov writes: > >> > > >> > > On Sun, Mar 24, 2

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-05-17 Thread Kevin Hilman
Frederic Weisbecker writes: > On Thu, May 16, 2013 at 12:52:03AM +0200, Frederic Weisbecker wrote: >> On Mon, Mar 25, 2013 at 02:14:20PM -0700, Kevin Hilman wrote: >> > Gleb Natapov writes: >> > >> > > On Sun, Mar 24, 2013 at 02:44:26PM +0100, Frederic Weisbecker wrote: >> > >> 2013/3/21 Gleb N

[PATCH 7/8] s390/kvm: avoid automatic sie reentry

2013-05-17 Thread Christian Borntraeger
From: Martin Schwidefsky Do not automatically restart the sie instruction in entry64.S after an interrupt, return to the caller with a reason code instead. That allows to deal with RCU and other conditions in C code. Signed-off-by: Martin Schwidefsky Signed-off-by: Christian Borntraeger --- a

[PATCH 0/8] s390/kvm fixes

2013-05-17 Thread Christian Borntraeger
Gleb, Paolo, Marcelo, here are some low level changes to kvm on s390 that we have been cooking for a while now. Patch "s390/pgtable: fix ipte notify bit" will go via Martins tree into 3.10, but is included to reduce the amount of merge conflicts. Patch "s390: fix gmap_ipte_notifier vs. software

[PATCH 4/8] s390/kvm: Mark if a cpu is in SIE

2013-05-17 Thread Christian Borntraeger
Lets track in a private bit if the sie control block is active. We want to track this as closely as possible, so we also have to instrument the interrupt and program check handler. Lets use the existing HANDLE_SIE_INTERCEPT macro. Signed-off-by: Christian Borntraeger Acked-by: Martin Schwidefsky

[PATCH 2/8] s390/kvm: fix psw rewinding in handle_skey

2013-05-17 Thread Christian Borntraeger
From: Martin Schwidefsky The PSW can wrap if the guest has been running in the 24 bit or 31 bit addressing mode. Use __rewind_psw to find the correct address. Signed-off-by: Martin Schwidefsky Signed-off-by: Christian Borntraeger --- arch/s390/kvm/priv.c | 3 ++- 1 file changed, 2 insertions(

[PATCH 8/8] s390: fix gmap_ipte_notifier vs. software dirty pages

2013-05-17 Thread Christian Borntraeger
On heavy paging load some guest cpus started to loop in gmap_ipte_notify. This was visible as stalled cpus inside the guest. The gmap_ipte_notifier tries to map a user page and then made sure that the pte is valid and writable. Turns out that with the software change bit tracking the pte can become

[PATCH 6/8] s390/kvm: Kick guests out of sie if prefix page host pte is touched

2013-05-17 Thread Christian Borntraeger
The guest prefix pages must be mapped writeable all the time while SIE is running, otherwise the guest might see random behaviour. (pinned at the pte level) Turns out that mlocking is not enough, the page table entry (not the page) might change or become r/o. This patch uses the gmap notifiers to k

[PATCH 1/8] s390/pgtable: fix ipte notify bit

2013-05-17 Thread Christian Borntraeger
Dont use the same bit as user referenced. Signed-off-by: Christian Borntraeger --- arch/s390/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 4105b82..0f0de30 100644 --- a/arch/s3

[PATCH 3/8] s390/kvm: rename RCP_xxx defines to PGSTE_xxx

2013-05-17 Thread Christian Borntraeger
From: Martin Schwidefsky The RCP byte is a part of the PGSTE value, the existing RCP_xxx names are inaccurate. As the defines describe bits and pieces of the PGSTE, the names should start with PGSTE_. The KVM_UR_BIT and KVM_UC_BIT are part of the PGSTE as well, give them better names as well. Si

[PATCH 5/8] s390/kvm: Provide a way to prevent reentering SIE

2013-05-17 Thread Christian Borntraeger
Lets provide functions to prevent KVM from reentering SIE and to kick cpus out of SIE. We cannot use the common kvm_vcpu_kick code, since we need to kick out guests in places that hold architecture specific locks (e.g. pgste lock) which might be necessary on the other cpus - so no waiting possible.

Re: [PATCH] virtio_pci: fix macro exported in uapi

2013-05-17 Thread David Howells
Rusty Russell wrote: > Macro still isn't usable, because userspace can't know whether it's the > new or old. > > We need to either remove it from UAPI, or rename it to > VIRTIO_PCI_CONFIG_OFF. Surely, if userspace is using it as is, you can't remove it, rename it or alter it? David -- To unsub

Re: 2013 Linux Plumbers Virtualization Microconference proposal call for participation

2013-05-17 Thread Stefan Hajnoczi
On Thu, May 16, 2013 at 02:32:30PM -0600, Alex Williamson wrote: > We'd like to hold another virtualization microconference as part of this > year's Linux Plumbers Conference. To do so, we need to show that > there's enough interest, materials, and people willing to attend. Convenience info: Se