Re: [PATCH v5 1/2] perf,kvm/ppc: Add kvm_perf.h for powerpc

2015-07-31 Thread Scott Wood
[Added KVM lists and a couple relevant people] On Fri, 2015-07-31 at 14:25 +0530, Hemant Kumar wrote: > On 07/30/2015 03:52 AM, Scott Wood wrote: > > On Wed, 2015-07-29 at 16:07 +0530, Hemant Kumar wrote: > > > Hi Scott, > > > > > > On 07/17/2015 01:40 AM, Scott Wood wrote: > > > > On Thu, 2015-0

Re: [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node

2015-07-31 Thread Vlastimil Babka
On 31.7.2015 23:25, David Rientjes wrote: > On Thu, 30 Jul 2015, Vlastimil Babka wrote: > >> diff --git a/mm/huge_memory.c b/mm/huge_memory.c >> index aa58a32..56355f2 100644 >> --- a/mm/huge_memory.c >> +++ b/mm/huge_memory.c >> @@ -2469,7 +2469,7 @@ khugepaged_alloc_page(struct page **hpage, gfp

Re: [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node

2015-07-31 Thread David Rientjes
On Thu, 30 Jul 2015, Vlastimil Babka wrote: > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index aa58a32..56355f2 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -2469,7 +2469,7 @@ khugepaged_alloc_page(struct page **hpage, gfp_t gfp, > struct mm_struct *mm, >*/ >

[PATCH 3.14 125/125] MIPS: KVM: Do not sign extend on unsigned MMIO load

2015-07-31 Thread Greg Kroah-Hartman
3.14-stable review patch. If anyone has any objections, please let me know. -- From: Nicholas Mc Guire commit ed9244e6c534612d2b5ae47feab2f55a0d4b4ced upstream. Fix possible unintended sign extension in unsigned MMIO loads by casting to uint16_t in the case of mmio_needed != 2

[PATCH 3.10 89/89] MIPS: KVM: Do not sign extend on unsigned MMIO load

2015-07-31 Thread Greg Kroah-Hartman
3.10-stable review patch. If anyone has any objections, please let me know. -- From: Nicholas Mc Guire commit ed9244e6c534612d2b5ae47feab2f55a0d4b4ced upstream. Fix possible unintended sign extension in unsigned MMIO loads by casting to uint16_t in the case of mmio_needed != 2

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 11/11] new: arm/barrier-test for memory barriers

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:54:01PM +0100, Alex Bennée wrote: > From: Alex Bennée > > This test has been written mainly to stress multi-threaded TCG behaviour > but will demonstrate failure by default on real hardware. The test takes > the following parameters: > > - "lock" use GCC's locking se

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm: query /dev/kvm for maximum vcpus

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:59PM +0100, Alex Bennée wrote: > From: Alex Bennée > > The previous $(getconf _NPROCESSORS_CONF) isn't correct as the default > maximum VCPU configuration is 4 on arm64 machines which typically have > more actual cores. The kernel should probably bump that up to 8,

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 08/11] arm/unittests.cfg: add the tlbflush tests

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:58PM +0100, Alex Bennée wrote: > --- > arm/unittests.cfg | 24 > 1 file changed, 24 insertions(+) > > diff --git a/arm/unittests.cfg b/arm/unittests.cfg > index ee655b2..19d72ad 100644 > --- a/arm/unittests.cfg > +++ b/arm/unittests.cfg > @@

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 07/11] new arm/tlbflush-test: TLB torture test

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:57PM +0100, Alex Bennée wrote: > This adds a fairly brain dead torture test for TLB flushes intended for > stressing the MTTCG QEMU build. It takes the usual -smp option for > multiple CPUs. > > By default it CPU0 will do a TLBIALL flush after each cycle. You can > pa

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 06/11] lib/arm: add flush_tlb_page mmu function

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:56PM +0100, Alex Bennée wrote: > This introduces a new flush_tlb_page function which does exactly what > you expect. It's going to be useful for the future TLB torture test. > > Signed-off-by: Alex Bennée > --- > lib/arm/asm/mmu.h | 11 +++ > lib/arm64/asm

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 05/11] lib/printf: support the %u unsigned fmt field

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:55PM +0100, Alex Bennée wrote: > --- > lib/printf.c | 13 + > 1 file changed, 13 insertions(+) missing sign-off > > diff --git a/lib/printf.c b/lib/printf.c > index 89308fb..5d83605 100644 > --- a/lib/printf.c > +++ b/lib/printf.c > @@ -180,6 +180,19 @@

Re: 2 times more VMs withOUT KVM

2015-07-31 Thread Pavel Shirshov
Hi Paolo, Thank you for the answer. I suspect that overcommit thing. In my case it's a combination of unused memory and KSM. So hugepages are not so useful as I saw in the presentations. I think it works just for some usecases. Thanks On Fri, Jul 31, 2015 at 12:54 AM, Paolo Bonzini wrote: > >

[kvm-unit-tests PATCH v5 04/11] arm/run: introduce usingkvm var and use it

2015-07-31 Thread Alex Bennée
This makes the script a little cleaner by only checking for KVM support in one place. If KVM isn't available we can fall back to TCG emulation and echo the fact to the screen rather than let QEMU complain. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v2 - rm redundant M= statement

[kvm-unit-tests PATCH v5 09/11] arm: query /dev/kvm for maximum vcpus

2015-07-31 Thread Alex Bennée
From: Alex Bennée The previous $(getconf _NPROCESSORS_CONF) isn't correct as the default maximum VCPU configuration is 4 on arm64 machines which typically have more actual cores. This introduces a simple utility program to query the KVM capabilities and use the correct maximum number of vcpus.

[kvm-unit-tests PATCH v5 00/11] My current MTTCG tests

2015-07-31 Thread Alex Bennée
Hi, This is the current state of my MTTCG tests based on the KVM's unit testing framework. The earlier patches in the series have already been reviewed and will (with the exception of the emacs patch) be making their way upstream. There are a couple of addition to library functions: - printf %u

[kvm-unit-tests PATCH v5 03/11] configure: emit HOST=$host to config.mak

2015-07-31 Thread Alex Bennée
This is useful information for the run scripts to know, especially if they want to drop to using TCG. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v3 - add r-b tag --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index b2ad32a..078b70c 100

[kvm-unit-tests PATCH v5 06/11] lib/arm: add flush_tlb_page mmu function

2015-07-31 Thread Alex Bennée
This introduces a new flush_tlb_page function which does exactly what you expect. It's going to be useful for the future TLB torture test. Signed-off-by: Alex Bennée --- lib/arm/asm/mmu.h | 11 +++ lib/arm64/asm/mmu.h | 8 2 files changed, 19 insertions(+) diff --git a/lib/a

[kvm-unit-tests PATCH v5 08/11] arm/unittests.cfg: add the tlbflush tests

2015-07-31 Thread Alex Bennée
--- arm/unittests.cfg | 24 1 file changed, 24 insertions(+) diff --git a/arm/unittests.cfg b/arm/unittests.cfg index ee655b2..19d72ad 100644 --- a/arm/unittests.cfg +++ b/arm/unittests.cfg @@ -35,3 +35,27 @@ file = selftest.flat smp = $(getconf _NPROCESSORS_CONF) extra

[kvm-unit-tests PATCH v5 07/11] new arm/tlbflush-test: TLB torture test

2015-07-31 Thread Alex Bennée
This adds a fairly brain dead torture test for TLB flushes intended for stressing the MTTCG QEMU build. It takes the usual -smp option for multiple CPUs. By default it CPU0 will do a TLBIALL flush after each cycle. You can pass options via -append to control additional aspects of the test: - "p

[kvm-unit-tests PATCH v5 02/11] README: add some CONTRIBUTING notes

2015-07-31 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v2 - mention consistency v3 - add r-b tag --- README | 26 ++ 1 file changed, 26 insertions(+) diff --git a/README b/README index e9869d1..9389a26 100644 --- a/README +++ b/README @@ -25,3 +25,29 @@ Directory

[kvm-unit-tests PATCH v5 05/11] lib/printf: support the %u unsigned fmt field

2015-07-31 Thread Alex Bennée
--- lib/printf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/printf.c b/lib/printf.c index 89308fb..5d83605 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -180,6 +180,19 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list va) break;

[kvm-unit-tests PATCH v5 01/11] arm/run: set indentation defaults for emacs

2015-07-31 Thread Alex Bennée
Signed-off-by: Alex Bennée --- arm/run | 1 + 1 file changed, 1 insertion(+) diff --git a/arm/run b/arm/run index 662a856..6b42a2e 100755 --- a/arm/run +++ b/arm/run @@ -1,4 +1,5 @@ #!/bin/bash +# -*- sh-basic-offset:8 indent-tabs-mode: t -*- if [ ! -f config.mak ]; then echo run ./c

[kvm-unit-tests PATCH v5 11/11] new: arm/barrier-test for memory barriers

2015-07-31 Thread Alex Bennée
From: Alex Bennée This test has been written mainly to stress multi-threaded TCG behaviour but will demonstrate failure by default on real hardware. The test takes the following parameters: - "lock" use GCC's locking semantics - "excl" use load/store exclusive semantics - "acqrel" use acqu

Re: [kvm-unit-tests RFC PATCH] Add MAINTAINERS file

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 17:06, Alex Bennée wrote: > > I haven't seen this upstream yet. Has this been pushed yet? Nope... Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [kvm-unit-tests RFC PATCH] Add MAINTAINERS file

2015-07-31 Thread Alex Bennée
Paolo Bonzini writes: > Applied as follows: > >> +Maintainers >> +--- >> +M: Paolo Bonzini >> +M: Marcelo Tosatti >> +L: kvm@vger.kernel.org >> +T: git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git >> + >> +Architecture Specific Code: >> +--- >> + >> +ARM

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-07-31 Thread Eric Auger
Hi Andre, On 07/10/2015 04:21 PM, Andre Przywara wrote: > When userland wants to inject a MSI into the guest, we have to use > our data structures to find the LPI number and the VCPU to receive > the interrupt. > Use the wrapper functions to iterate the linked lists and find the > proper Interrupt

Re: [PATCH v2 7/7] KVM: arm: implement kvm_set_msi by gsi direct mapping

2015-07-31 Thread Eric Auger
Hi Andre, On 07/11/2015 01:17 AM, Andre Przywara wrote: > On 09/07/15 09:22, Eric Auger wrote: >> If the ITS modality is not available, let's simply support MSI >> injection by transforming the MSI.data into an SPI ID. >> >> This becomes possible to use KVM_SIGNAL_MSI ioctl for arm too. >> >> Signe

[PATCH kvm-unit-tests] x86: additional debug tests

2015-07-31 Thread Paolo Bonzini
Test the undocumented ICEBP (aka INT1 or INT01) opcode, and test that dr6.BS is not modified by neither watchpoints nor breakpoints. Signed-off-by: Paolo Bonzini --- x86/debug.c | 51 --- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git

Re: [PATCH v7 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP.

2015-07-31 Thread Jan Kiszka
On 2015-07-30 23:19, Steve Rutherford wrote: > On Thu, Jul 30, 2015 at 11:38:20AM +0200, Paolo Bonzini wrote: >> >> >> On 30/07/2015 10:37, Steve Rutherford wrote: >>> This looks a bit non-sensical, but is overprepared for the introduction >>> IOAPIC hotplug, which two patches down the line. Changi

Re: [PATCH 1/2] KVM: x86: set TMR when the interrupt is accepted

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 01:26, Zhang, Yang Z wrote: >>> Do not compute TMR in advance. Instead, set the TMR just before >>> the interrupt is accepted into the IRR. This limits the coupling >>> between IOAPIC and LAPIC. > > Uh.., it back to original way which is wrong. You cannot modify the > apic page(h

Re: [PATCH 1/2] KVM: x86: set TMR when the interrupt is accepted

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 04:49, Steve Rutherford wrote: > Oh... Yeah. That's a damn good point, given that the interrupt can be > injected from another thread while one is in that guest vcpu. > > Easiest time to update the TMR should be on guest entry through > vcpu_scan_ioapic, as before. > > The best wa

Re: 2 times more VMs withOUT KVM

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 01:08, Pavel Shirshov wrote: > Hello, > > Today I was very surprised to see that KVM with enabled HugePages uses > much more memory versus KVM without HugePages enabled. > > I have a server with 386Gb memory. > I have a VM image which allocate up to 3.2Gb memory (libvirt tag). >

Re: [PATCH] vfio: Enable VFIO device for powerpc

2015-07-31 Thread Eric Auger
Hi David, As noticed we did the same on ARM (4.2) for the same reason. Reviewed-by: Eric Auger Best Regards Eric On 07/20/2015 08:12 AM, David Gibson wrote: > ec53500f "kvm: Add VFIO device" added a special KVM pseudo-device which is > used to handle any necessary interactions between KVM an