Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Benjamin Herrenschmidt
On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable and coherent (set M bit) otherwise this page is treated as I/O and map this as cache inhibited and guarded (set I + G) This helps setting proper MMU mapping for direct assigned device.

Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Alexander Graf
On 26.07.2013, at 10:26, Benjamin Herrenschmidt wrote: On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable and coherent (set M bit) otherwise this page is treated as I/O and map this as cache inhibited and guarded (set I + G) This helps

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
-Original Message- From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org] Sent: Friday, July 26, 2013 1:57 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc-...@lists.ozlabs.org; ag...@suse.de; Wood Scott-B07421; Bhushan Bharat-R65777

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Friday, July 26, 2013 2:20 PM To: Benjamin Herrenschmidt Cc: Bhushan Bharat-R65777; kvm-...@vger.kernel.org; kvm@vger.kernel.org;

[PATCH 3/8] KVM: s390: allow sie enablement for multi-threaded programs

2013-07-26 Thread Christian Borntraeger
From: Martin Schwidefsky schwidef...@de.ibm.com Improve the code to upgrade the standard 2K page tables to 4K page tables with PGSTEs to allow the operation to happen when the program is already multi-threaded. Signed-off-by: Martin Schwidefsky schwidef...@de.ibm.com Signed-off-by: Christian

[PATCH 1/8] KVM: s390: move kvm_guest_enter,exit closer to sie

2013-07-26 Thread Christian Borntraeger
From: Dominik Dingel din...@linux.vnet.ibm.com Any uaccess between guest_enter and guest_exit could trigger a page fault, the page fault handler would handle it as a guest fault and translate a user address as guest address. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Signed-off-by:

[PATCH 0/8] KVM: s390: fixes and cleanup

2013-07-26 Thread Christian Borntraeger
Gleb, Paolo, here are some fixes and cleanups for KVM/s390. The first two patches KVM: s390: move kvm_guest_enter,exit closer to sie and KVM: s390: fix pfmf non-quiescing control handling should go into 3.11. Everything else looks more like 3.12. Please apply. Christian Dominik Dingel (2):

[PATCH 2/8] KVM: s390: fix pfmf non-quiescing control handling

2013-07-26 Thread Christian Borntraeger
From: Heiko Carstens heiko.carst...@de.ibm.com Fix the test within handle_pfmf() if the host has the NQ key-setting facility installed. Right now the code would incorrectly generate a program check in the guest if the NQ control bit for a pfmf request was set and if the host has the NQ

[PATCH 4/8] KVM: s390: fix task size check

2013-07-26 Thread Christian Borntraeger
From: Martin Schwidefsky schwidef...@de.ibm.com The gmap_map_segment function uses PGDIR_SIZE in the check for the maximum address in the tasks address space. This incorrectly limits the amount of memory usable for a kvm guest to 4TB. The correct limit is (1UL 53). As the TASK_SIZE has different

[PATCH 8/8] KVM: s390: Make KVM_HVA_ERR_BAD usable on s390

2013-07-26 Thread Christian Borntraeger
From: Dominik Dingel din...@linux.vnet.ibm.com Current common code uses PAGE_OFFSET to indicate a bad host virtual address. As this check won't work on architectures that don't map kernel and user memory into the same address space (e.g. s390), such architectures can now provide their own

[PATCH 6/8] KVM: s390: Fix sparse warnings in priv.c

2013-07-26 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com sparse complained about the missing UL postfix for long constants. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/priv.c

[PATCH 5/8] KVM: s390: declare virtual HW facilities

2013-07-26 Thread Christian Borntraeger
From: Michael Mueller m...@linux.vnet.ibm.com The patch renames the array holding the HW facility bitmaps. This allows to interprete the variable as set of virtual machine specific virtual facilities. The basic idea is to make virtual facilities externally managable in future. An availability

[PATCH 7/8] KVM: s390: Add helper function for setting condition code

2013-07-26 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com Introduced a helper function for setting the CC in the guest PSW to improve the readability of the code. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/kvm-s390.h | 7

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Friday, July 26, 2013 2:20 PM To: Benjamin Herrenschmidt Cc: Bhushan Bharat-R65777; kvm-...@vger.kernel.org; kvm@vger.kernel.org;

[RFC 0/2] KVM: s390: add floating irq controller

2013-07-26 Thread Jens Freimann
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 migration and for hardening the reset code by allowing user space to explicitly remove all pending floating

[RFC 1/2] KVM: s390: add and extend interrupt information data structs

2013-07-26 Thread Jens Freimann
With the currently available struct kvm_s390_interrupt it is not possible to inject all kinds of interrupts as defined in the z/Architecture. Add interruption parameters to the structures to make sure we can inject all kinds of interrupts and move it to kvm.h Signed-off-by: Jens Freimann

[RFC 2/2] KVM: s390: add floating irq controller

2013-07-26 Thread Jens Freimann
This patch adds a floating irq controller as a kvm_device. It will be necesary for migration of floating interrupts as well as for hardening the reset code by allowing user space to explicitly remove all pending floating interrupts. Signed-off-by: Jens Freimann jf...@linux.vnet.ibm.com ---

kernel 3.10.1 - NMI received for unknown reason

2013-07-26 Thread Stefan Pietsch
Hi all, starting a virtual machine (Debian sid) with KVM on my host running kernel 3.10.1 (Debian 3.10-1-686-pae) produces these messages: [ 765.522920] Uhhuh. NMI received for unknown reason 31 on CPU 0. [ 765.522927] Do you have a strange power saving mode enabled? [ 765.522930] Dazed and

Re: kernel 3.10.1 - NMI received for unknown reason

2013-07-26 Thread Gleb Natapov
On Fri, Jul 26, 2013 at 08:25:19PM +0200, Stefan Pietsch wrote: Hi all, starting a virtual machine (Debian sid) with KVM on my host running kernel 3.10.1 (Debian 3.10-1-686-pae) produces these messages: Are those messages printed by a host or a guest? [ 765.522920] Uhhuh. NMI received

WARNING : Faculty/Staff july mail/quota upgrade notification!

2013-07-26 Thread Berry Angus @ Berry
*** FACULTY/STAFF: JANUARY - JULY MAILBOX QUOTA UPGRADE Mailbox Quota Size: 100 % Current Mailbox Quota: 97.9% Important Notice: Mailbox SEND or RECEIVE operations will be deactivated

[PULL 03/25] target-s390x: Fix CPUState rework fallout

2013-07-26 Thread Andreas Färber
From: Christian Borntraeger borntrae...@de.ibm.com Commit f17ec444c3d39f76bcd8b71c2c05d5754bfe333e exec: Change cpu_memory_rw_debug() argument to CPUState missed to update s390x KVM code, breaking the build. Let's fix it up. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com

[PULL 02/25] kvm: Change prototype of kvm_update_guest_debug()

2013-07-26 Thread Andreas Färber
From: Stefan Weil s...@weilnetz.de Passing a CPUState pointer instead of a CPUArchState pointer eliminates the last target dependent data type in sysemu/kvm.h. It also simplifies the code. Signed-off-by: Stefan Weil s...@weilnetz.de Acked-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by:

Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Benjamin Herrenschmidt
On Fri, 2013-07-26 at 15:03 +, Bhushan Bharat-R65777 wrote: Will not searching the Linux PTE is a overkill? That's the best approach. Also we are searching it already to resolve the page fault. That does mean we search twice but on the other hand that also means it's hot in the cache.

Re: [PATCH 2/2] kvm: powerpc: set cache coherency only for kernel managed pages

2013-07-26 Thread Scott Wood
On 07/25/2013 03:50:42 AM, Gleb Natapov wrote: Why ppc uses page_is_ram() for mmap? How should I know? But looking at the function it does it only as a fallback if ppc_md.phys_mem_access_prot() is not provided. Making access to MMIO noncached as a safe fallback makes sense. There's only one

Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Alexander Graf
On 26.07.2013, at 10:26, Benjamin Herrenschmidt wrote: On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable and coherent (set M bit) otherwise this page is treated as I/O and map this as cache inhibited and guarded (set I + G) This helps

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
-Original Message- From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org] Sent: Friday, July 26, 2013 1:57 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; linuxppc-...@lists.ozlabs.org; ag...@suse.de; Wood Scott-B07421; Bhushan

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Friday, July 26, 2013 2:20 PM To: Benjamin Herrenschmidt Cc: Bhushan Bharat-R65777; kvm-ppc@vger.kernel.org; k...@vger.kernel.org;

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Friday, July 26, 2013 2:20 PM To: Benjamin Herrenschmidt Cc: Bhushan Bharat-R65777; kvm-ppc@vger.kernel.org; k...@vger.kernel.org;

Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Benjamin Herrenschmidt
On Fri, 2013-07-26 at 15:03 +, Bhushan Bharat-R65777 wrote: Will not searching the Linux PTE is a overkill? That's the best approach. Also we are searching it already to resolve the page fault. That does mean we search twice but on the other hand that also means it's hot in the cache.

Re: [PATCH 2/2] kvm: powerpc: set cache coherency only for kernel managed pages

2013-07-26 Thread Scott Wood
On 07/25/2013 03:50:42 AM, Gleb Natapov wrote: Why ppc uses page_is_ram() for mmap? How should I know? But looking at the function it does it only as a fallback if ppc_md.phys_mem_access_prot() is not provided. Making access to MMIO noncached as a safe fallback makes sense. There's only one