Re: [RFC PATCH 5/6] vfio-pci: Create iommu mapping for msi interrupt

2015-10-06 Thread Alex Williamson
On Tue, 2015-10-06 at 08:32 +, Bhushan Bharat wrote: > > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, October 06, 2015 4:15 AM > > To: Bhushan Bharat-R65777 > > Cc: kvm...@lists.cs.columbia.edu;

Re: [PATCH] KVM: arm/arm64: Fix memory leak if timer initialization fails

2015-10-06 Thread Wei Huang
On 10/06/2015 03:14 AM, Pavel Fedin wrote: > Jump to correct label and free kvm_host_cpu_state > > Signed-off-by: Pavel Fedin > --- > arch/arm/kvm/arm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c >

Re: [RFC PATCH 4/6] vfio: Add interface to iommu-map/unmap MSI pages

2015-10-06 Thread Alex Williamson
On Tue, 2015-10-06 at 09:05 +, Bhushan Bharat wrote: > > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, October 06, 2015 4:15 AM > > To: Bhushan Bharat-R65777 > > Cc: kvm...@lists.cs.columbia.edu;

Re: [kvmtool] Add a link to the lwn.net article

2015-10-06 Thread Will Deacon
Hi Sven, On Sat, Oct 03, 2015 at 10:42:55PM +1000, Sven Dowideit wrote: > Signed-off-by: Sven Dowideit > --- > README | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/README b/README > index 6667f23..5501f05 100644 > --- a/README > +++ b/README > @@ -97,6

Re: [kvm-unit-tests PATCHv3 1/3] arm: Add PMU test

2015-10-06 Thread Andrew Jones
On Tue, Oct 06, 2015 at 01:49:24PM -0400, Christopher Covington wrote: > Beginning with a simple sanity check of the control register, add > a unit test for the ARM Performance Monitors Unit (PMU). > > Signed-off-by: Christopher Covington > --- > arm/pmu.c |

Re: [PATCH] Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS

2015-10-06 Thread Bandan Das
Joerg Roedel writes: > On Thu, Oct 01, 2015 at 06:31:27PM -0400, Bandan Das wrote: >> >> @@ -514,7 +514,7 @@ static void skip_emulated_instruction(struct kvm_vcpu >> >> *vcpu) >> >> struct vcpu_svm *svm = to_svm(vcpu); >> >> >> >> if (svm->vmcb->control.next_rip != 0) {

Re: [PATCH] Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS

2015-10-06 Thread Bandan Das
Joerg Roedel writes: > On Mon, Oct 05, 2015 at 01:42:43PM -0400, Bandan Das wrote: >> Joerg Roedel writes: >> >> > On Mon, Oct 05, 2015 at 12:54:43PM -0400, Bandan Das wrote: >> >> Joerg Roedel writes: >> >> The problems is that the next_rip

Re: [Qemu-devel] [kvm-unit-tests PATCHv3 2/3] arm: pmu: Check cycle count increases

2015-10-06 Thread Andrew Jones
On Tue, Oct 06, 2015 at 01:49:25PM -0400, Christopher Covington wrote: > Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, > even for the smallest delta of two subsequent reads. > > Signed-off-by: Christopher Covington > --- > arm/pmu.c | 29

Re: [kvm-unit-tests PATCHv3 3/3] arm: pmu: Add CPI checking

2015-10-06 Thread Andrew Jones
On Tue, Oct 06, 2015 at 01:49:26PM -0400, Christopher Covington wrote: > Check the numbers of cycles per instruction (CPI) implied by ARM PMU > cycle counter values. Check that in -icount mode these strictly > match the specified rate. > > Signed-off-by: Christopher Covington

Re: [PATCH 2/2] KVM: x86: fix edge EOI and IOAPIC reconfig race

2015-10-06 Thread Radim Krčmář
2015-08-15 02:00+0200, Paolo Bonzini: >On 14/08/2015 10:38, Radim Krčmář wrote: >>> How do you reproduce the bug? >> I run rhel4 (2.6.9) kernel on 2 VCPUs and frequently alternate >> smp_affinity of "timer". The bug is hit within seconds. > > Nice, I'll try to make a unit test for it on the

RE: [RFC PATCH 3/6] vfio: Extend iommu-info to return MSIs automap state

2015-10-06 Thread Bhushan Bharat
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, October 06, 2015 4:15 AM > To: Bhushan Bharat-R65777 > Cc: kvm...@lists.cs.columbia.edu; kvm@vger.kernel.org; > christoffer.d...@linaro.org;

RE: [RFC PATCH 4/6] vfio: Add interface to iommu-map/unmap MSI pages

2015-10-06 Thread Bhushan Bharat
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, October 06, 2015 4:15 AM > To: Bhushan Bharat-R65777 > Cc: kvm...@lists.cs.columbia.edu; kvm@vger.kernel.org; > christoffer.d...@linaro.org;

[PATCH] KVM: arm/arm64: Fix memory leak if timer initialization fails

2015-10-06 Thread Pavel Fedin
Jump to correct label and free kvm_host_cpu_state Signed-off-by: Pavel Fedin --- arch/arm/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index dc017ad..78b2869 100644 --- a/arch/arm/kvm/arm.c +++

PING: [PATCH v4 0/7] KVM: arm64: Implement API for vGICv3 live migration

2015-10-06 Thread Pavel Fedin
Hello! Sorry if you're terribly busy, but... small gentle PING... Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia > -Original Message- > From: kvmarm-boun...@lists.cs.columbia.edu > [mailto:kvmarm-boun...@lists.cs.columbia.edu] On > Behalf Of Pavel

RE: [RFC PATCH 5/6] vfio-pci: Create iommu mapping for msi interrupt

2015-10-06 Thread Bhushan Bharat
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, October 06, 2015 4:15 AM > To: Bhushan Bharat-R65777 > Cc: kvm...@lists.cs.columbia.edu; kvm@vger.kernel.org; > christoffer.d...@linaro.org;

[kvm-unit-tests PATCHv3 3/3] arm: pmu: Add CPI checking

2015-10-06 Thread Christopher Covington
Check the numbers of cycles per instruction (CPI) implied by ARM PMU cycle counter values. Check that in -icount mode these strictly match the specified rate. Signed-off-by: Christopher Covington --- arm/pmu.c | 72

[kvm-unit-tests PATCHv3 1/3] arm: Add PMU test

2015-10-06 Thread Christopher Covington
Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington --- arm/pmu.c | 66 + arm/unittests.cfg | 5

[kvm-unit-tests PATCHv3 2/3] arm: pmu: Check cycle count increases

2015-10-06 Thread Christopher Covington
Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington --- arm/pmu.c | 29 + 1 file changed, 29 insertions(+) diff --git a/arm/pmu.c

[kvm-unit-tests PATCHv3] ARM PMU tests

2015-10-06 Thread Christopher Covington
Changes from v2: * Explicit test for monotonically increasing cycle count * Tests now pass or fail * Tests broken into functions * Tests/functions broken into separate patches in series * Style improvements as suggested by Wei Huang and Linux checkpatch.pl * Spelling and comment improvements --

Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform

2015-10-06 Thread Houcheng Lin
Hi, There are 7 sources still call basename() directly and block/vvfat.c define its own static basename() function. Please see the grep below: ➜ qemu git:(patch-v4) ✗ grep "basename(" **/*.c | grep -v get_basename fsdev/virtfs-proxy-helper.c:basename(prog)); hw/vfio/pci.c:

RE: [RFC PATCH 1/6] vfio: Add interface for add/del reserved iova region

2015-10-06 Thread Bhushan Bharat
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, October 06, 2015 4:15 AM > To: Bhushan Bharat-R65777 > Cc: kvm...@lists.cs.columbia.edu; kvm@vger.kernel.org; > christoffer.d...@linaro.org;

Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform

2015-10-06 Thread Stefan Hajnoczi
On Sat, Oct 03, 2015 at 12:44:14PM +0800, Houcheng Lin wrote: > diff --git a/configure b/configure > index d7c24cd..cda88c1 100755 > --- a/configure > +++ b/configure > @@ -567,7 +567,6 @@ fi > > # host *BSD for user mode > HOST_VARIANT_DIR="" > - > case $targetos in > CYGWIN*) >

Re: [PATCH kvmtool] Skip a few messages by default: command line args; flat binary; earlyprintk.

2015-10-06 Thread Dimitri John Ledkov
Hello, A bit of context. I'm from Clear Linux* Project for Intel Architecture and we use lkvm as the hypervisor in Clear Containers for Docker Engine http://blog.surgut.co.uk/2015/09/clear-containers-for-docker-engine.html For us, we really do not want any output coming from the hypervisor, or

Re: VM exit profiling

2015-10-06 Thread Prateek Sharma
On Tue, Oct 6, 2015 at 6:50 PM, David Matlack wrote: > Have you tried perf kvm stat? e.g. > > perf kvm stat record -a sleep 10 # record all vmexits for 10 seconds > perf kvm stat report --event=vmexit > > This gives per-exit counts and min/max/avg latencies. > > Alternatively

VM exit profiling

2015-10-06 Thread Prateek Sharma
Hello all, There used to be perf scripts to do exit-level profiling of VMs (number of exits, time spent per exit, etc). I am using kernel version 3.19, and the perf utility which ships with it has a perf-kvm option, but that only reports total number of exits, and not the reason/latency.

Re: VM exit profiling

2015-10-06 Thread David Matlack
Have you tried perf kvm stat? e.g. perf kvm stat record -a sleep 10 # record all vmexits for 10 seconds perf kvm stat report --event=vmexit This gives per-exit counts and min/max/avg latencies. Alternatively you can record the raw events kvm:kvm_exit and kvm:kvm_entry and process the data

Re: [PATCH] iommu/s390: add iommu api for s390 pci devices

2015-10-06 Thread Joerg Roedel
On Thu, Oct 01, 2015 at 07:30:28PM +0200, Gerald Schaefer wrote: > Yes, the DMA API is already implemented in arch/s390/pci/pci_dma.c. > I thought about moving it over to the new location in drivers/iommu/, > but I don't see any benefit from it. Okay, this is true for now. At some point we

Re: [PATCH] iommu/s390: add iommu api for s390 pci devices

2015-10-06 Thread Joerg Roedel
On Thu, Aug 27, 2015 at 03:33:03PM +0200, Gerald Schaefer wrote: > This adds an IOMMU API implementation for s390 PCI devices. > > Reviewed-by: Sebastian Ott > Signed-off-by: Gerald Schaefer > --- > MAINTAINERS | 7 +

Re: [PATCH] Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS

2015-10-06 Thread Joerg Roedel
On Mon, Oct 05, 2015 at 01:42:43PM -0400, Bandan Das wrote: > Joerg Roedel writes: > > > On Mon, Oct 05, 2015 at 12:54:43PM -0400, Bandan Das wrote: > >> Joerg Roedel writes: > >> The problems is that the next_rip field could be stale. If the processor > >>

RE: [RFC PATCH 6/6] arm-smmu: Allow to set iommu mapping for MSI

2015-10-06 Thread Bhushan Bharat
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, October 06, 2015 4:25 AM > To: Bhushan Bharat-R65777 > Cc: kvm...@lists.cs.columbia.edu; kvm@vger.kernel.org; > christoffer.d...@linaro.org;

Re: [PATCH] Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS

2015-10-06 Thread Joerg Roedel
On Thu, Oct 01, 2015 at 06:31:27PM -0400, Bandan Das wrote: > >> @@ -514,7 +514,7 @@ static void skip_emulated_instruction(struct kvm_vcpu > >> *vcpu) > >>struct vcpu_svm *svm = to_svm(vcpu); > >> > >>if (svm->vmcb->control.next_rip != 0) { > >> -

Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-10-06 Thread Paolo Bonzini
On 06/10/2015 06:06, Haozhong Zhang wrote: > Alternatively, it's also possible to follow David's comment to use > divq on x86_64 to keep both precision and safety. On i386, it just > falls back to above truncating approach. khz is just 32 bits, so we can do a 96/32 division. And because this

Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform

2015-10-06 Thread Paolo Bonzini
Just a couple comments since I reviewed the previous versions... On 06/10/2015 11:47, Stefan Hajnoczi wrote: > > #include > > -#include > > #include > > #include > > #include > > What is the justification for this? Do you know why io.h was included > before? No reason, the same patch

Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-10-06 Thread Haozhong Zhang
On Tue, Oct 06, 2015 at 12:40:49PM +0200, Paolo Bonzini wrote: > > > On 06/10/2015 06:06, Haozhong Zhang wrote: > > Alternatively, it's also possible to follow David's comment to use > > divq on x86_64 to keep both precision and safety. On i386, it just > > falls back to above truncating

Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform

2015-10-06 Thread Eric Blake
On 10/06/2015 03:47 AM, Stefan Hajnoczi wrote: > On Sat, Oct 03, 2015 at 12:44:14PM +0800, Houcheng Lin wrote: >> diff --git a/configure b/configure >> index d7c24cd..cda88c1 100755 >> +++ b/include/qemu/osdep.h >> @@ -74,6 +74,14 @@ typedef unsigned intuint_fast16_t; >> typedef

Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform

2015-10-06 Thread Paolo Bonzini
On 06/10/2015 14:13, Eric Blake wrote: > > If you are already writing code to be ported to both Unixy and > windows systems, you are better off rolling your own alternative to > basename (or better, using something else that has already rolled a > portable version for you - while I know gnulib

Re: [PATCH kvmtool] Skip a few messages by default: command line args; flat binary; earlyprintk.

2015-10-06 Thread Will Deacon
On Wed, Sep 30, 2015 at 05:11:15PM +0100, Andre Przywara wrote: > On 29/09/15 17:59, Dimitri John Ledkov wrote: > > The partial command line args & earlyprintk=serial are still enabled > > in the debug mode. Warning that a flat binary kernel image is attemped > > to be loaded is completely

Re: [RFC PATCH 3/6] vfio: Extend iommu-info to return MSIs automap state

2015-10-06 Thread Alex Williamson
On Tue, 2015-10-06 at 08:53 +, Bhushan Bharat wrote: > > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, October 06, 2015 4:15 AM > > To: Bhushan Bharat-R65777 > > Cc: kvm...@lists.cs.columbia.edu;

Re: [RFC PATCH 1/6] vfio: Add interface for add/del reserved iova region

2015-10-06 Thread Alex Williamson
On Tue, 2015-10-06 at 09:39 +, Bhushan Bharat wrote: > > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, October 06, 2015 4:15 AM > > To: Bhushan Bharat-R65777 > > Cc: kvm...@lists.cs.columbia.edu;