Re: [PATCH V2] Documentation/kvm: Update cpuid documentation for steal time and pv eoi

2013-09-12 Thread Raghavendra K T
On 09/12/2013 11:14 AM, Michael S. Tsirkin wrote: On Wed, Sep 04, 2013 at 02:18:46PM +0530, Raghavendra K T wrote: [...] -- +KVM_FEATURE_STEAL_TIME || 5 || Steal time available at msr +

[PATCH V3] Documentation/kvm: Update cpuid documentation for steal time and pv eoi

2013-09-12 Thread Raghavendra K T
Thanks Michael S Tsirkin for rewriting the description and suggestions. Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- Changes in V3: Keep msr specific info only as suggested by Michael. Documentation/virtual/kvm/cpuid.txt | 7 +++ 1 file changed, 7 insertions(+)

Re: No such device error when mounting immediately after formatting

2013-09-12 Thread Stefan Hajnoczi
On Tue, Sep 10, 2013 at 04:39:56PM +, Prantis, Kelsey wrote: We have a cluster of 7 KVM vms on a host. The host OS is Fedora 18, and the guest OS is Centos 6.4. Installed kvm/qemu/kernel packages are as follows: qemu-system-x86-1.2.2-11.fc18.x86_64 qemu-common-1.2.2-11.fc18.x86_64

Re: [PATCH V3] Documentation/kvm: Update cpuid documentation for steal time and pv eoi

2013-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2013 at 01:00:11PM +0530, Raghavendra K T wrote: Thanks Michael S Tsirkin for rewriting the description and suggestions. Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Acked-by: Michael S. Tsirkin m...@redhat.com --- Changes in V3: Keep msr specific

[PATCH 1/8] KVM: s390: Remove dead rerun vcpu code

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com The need for SIE_INTERCEPT_RERUNVCPU has been removed long ago already, with the following commit: f7850c92884b40915001e332a0a33ed4f10158e8 [S390] remove kvm mmu reload on s390 Since the remainders are dead code, they are now removed by

[PATCH 3/8] KVM: s390: Push run loop into __vcpu_run

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com Moved the do-while loop from kvm_arch_vcpu_ioctl_run into __vcpu_run and the calling of kvm_handle_sie_intercept() into vcpu_post_run() (so we can add the srcu locks in a proper way in the next patch). Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com

[PATCH 5/8] KVM: s390: Allow NULL parameter for kvm_s390_get_regs_rre

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com We're not always interested in both registers that are specified for an RRE instruction. So allow NULL as parameter, too, to indicate that we do not need the corresponding value. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-by: Cornelia

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

2013-09-12 Thread Christian Borntraeger
Paolo, Gleb, here is a bunch of patch for kvm on s390. The first 4 patches restructure the code to protect most of vcpu_run with the kvm-srcu lock. The old code was structured in way that adding the lock was more complicated than necessary, therefore, the rework. The last 4 patches deal with

[PATCH 7/8] KVM: s390: Implement TEST BLOCK

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com This patch provides a simple version for the mandatory TEST BLOCK instruction interception, so that guests that use this instruction do not crash anymore. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck

[PATCH 8/8] KVM: s390: Intercept SCK instruction

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com Interception of the SET CLOCK instruction is mandatory, so this patch provides a simple handler for this instruction (by setting up the epoch field in the sie_block). Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Acked-by: Cornelia Huck

[PATCH 6/8] KVM: s390: Helper for converting real addresses to absolute

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com Added a separate helper function that translates guest real addresses to guest absolute addresses by applying the prefix of the guest CPU. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com

[PATCH 2/8] KVM: s390: Split up __vcpu_run into three parts

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com In preparation for the following patch (which will change the indentation of __vcpu_run quite a bit), this patch puts most of the code from __vcpu_run into separate functions. The first function handles the code that runs before the SIE instruction and

[PATCH 4/8] KVM: s390: Lock kvm-srcu at the appropriate places

2013-09-12 Thread Christian Borntraeger
From: Thomas Huth th...@linux.vnet.ibm.com The kvm-srcu lock has to be held while accessing the memory of guests and during certain other actions. This patch now adds the locks to the __vcpu_run function so that all affected code is protected now (and additionally to the KVM_S390_STORE_STATUS

Re: [PATCH 2/8] KVM: s390: Split up __vcpu_run into three parts

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 10:33, Christian Borntraeger ha scritto: vcpu-arch.sie_block-icptcode = 0; - VCPU_EVENT(vcpu, 6, entering sie flags %x, -atomic_read(vcpu-arch.sie_block-cpuflags)); - trace_kvm_s390_sie_enter(vcpu, -

Re: [PATCH 2/8] KVM: s390: Split up __vcpu_run into three parts

2013-09-12 Thread Christian Borntraeger
On 12/09/13 10:59, Paolo Bonzini wrote: Il 12/09/2013 10:33, Christian Borntraeger ha scritto: vcpu-arch.sie_block-icptcode = 0; -VCPU_EVENT(vcpu, 6, entering sie flags %x, - atomic_read(vcpu-arch.sie_block-cpuflags)); -trace_kvm_s390_sie_enter(vcpu, -

Re: [PATCH 2/8] KVM: s390: Split up __vcpu_run into three parts

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 11:09, Christian Borntraeger ha scritto: I don't have this VCPU_EVENT in kvm/queue, it is after preempt_enable: Huh? This was moved with commit 2b29a9fdcb92bfc6b6f4c412d71505869de61a56 Author: Dominik Dingel din...@linux.vnet.ibm.com Date: Fri Jul 26 15:04:00 2013 +0200

Possible virtNTP?

2013-09-12 Thread Duncan Innes
Hi folks, Is it possible/practical/desireable to develop a paravirt interface to allow NTP requests from guests to be serviced directly by the current host? i.e. rather than run a comprehensive NTP config on each host guest, just run a good NTP config on the hosts and let the guests

Re: [uq/master qemu PATCH] fix steal time MSR vmsd callback to proper opaque type

2013-09-12 Thread Paolo Bonzini
Il 03/09/2013 23:55, Marcelo Tosatti ha scritto: Convert steal time MSR vmsd callback pointer to proper X86CPU type. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/target-i386/machine.c b/target-i386/machine.c index dc81cde..e568da2 100644 --- a/target-i386/machine.c

Re: [uq/master][PATCH 0/3] Fix initialization bugs in kvmvapic

2013-09-12 Thread Paolo Bonzini
Il 03/09/2013 18:08, Jan Kiszka ha scritto: Addresses the issue Daniel reported in http://thread.gmane.org/gmane.comp.emulators.qemu/231577 CC: qemu-sta...@nongnu.org Jan Kiszka (3): kvmvapic: Catch invalid ROM size kvmvapic: Enter inactive state on hardware reset kvmvapic:

Re: [PATCH] KVM: nEPT: reset PDPTR register cache on nested vmentry emulation

2013-09-12 Thread Paolo Bonzini
Il 02/09/2013 14:25, Gleb Natapov ha scritto: After nested vmentry stale cache can be used to reload L2 PDPTR pointers which will cause L2 guest to fail. Fix it by invalidating cache on nested vmentry emulation. https://bugzilla.kernel.org/show_bug.cgi?id=60830 Signed-off-by: Gleb Natapov

Re: [PATCH v3 0/6] KVM: nVMX: Enable unrestricted guest mode and fix some nEPT issues

2013-09-12 Thread Paolo Bonzini
Il 08/08/2013 16:26, Jan Kiszka ha scritto: These patches apply on top of kvm.git queue. Changes in v3: - rebased over queue - added Do not set identity page map for L2 - dropped Fix guest CR3 read-back on VM-exit Jan Kiszka (6): KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in

Re: [PATCH v2] KVM: x86 emulator: emulate RETF imm

2013-09-12 Thread Paolo Bonzini
Il 09/09/2013 17:40, Bruce Rogers ha scritto: Opcode CA This gets used by a DOS based NetWare guest. Signed-off-by: Bruce Rogers brog...@suse.com --- arch/x86/kvm/emulate.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c

Re: [PATCH 0/2] kvm: fix a bug and remove a redundancy in async_pf

2013-09-12 Thread Paolo Bonzini
Il 04/09/2013 22:32, Radim Krčmář ha scritto: I did not reproduce the bug fixed in [1/2], but there are not that many reasons why we could not unload a module, so the spot is quite obvious. Radim Krčmář (2): kvm: free resources after canceling async_pf kvm: remove .done from struct

Re: [PATCH] KVM: Add documentation for kvm-srcu lock

2013-09-12 Thread Paolo Bonzini
Il 09/09/2013 17:32, Thomas Huth ha scritto: This patch documents the kvm-srcu lock (using the information from a mail which has been posted by Marcelo Tosatti to the kvm mailing list some months ago, see the following URL for details:

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

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 10:33, Christian Borntraeger ha scritto: Paolo, Gleb, here is a bunch of patch for kvm on s390. The first 4 patches restructure the code to protect most of vcpu_run with the kvm-srcu lock. The old code was structured in way that adding the lock was more complicated than

Re: [stable-3.4] possibly revert KVM: X86 emulator: fix source operand decoding...

2013-09-12 Thread Greg KH
On Tue, Sep 10, 2013 at 01:05:21PM +0200, Paolo Bonzini wrote: Il 04/09/2013 18:44, Paul Gortmaker ha scritto: Hi Greg, The 3.4.44+ cherry pick: commit 5b5b30580218eae22609989546bac6e44d0eda6e Author: Gleb Natapov g...@redhat.com Date: Wed Apr 24

[RFC PATCH 2/3] vfio: Add check extension interface to external user support

2013-09-12 Thread Alex Williamson
This adds the ability for an external user to check VFIO extensions. The first one we care about is support for IOMMU cache coherency. Without this, external users, like KVM, would need to assume the IOMMU allows No-Snoop transactions which are not coherent with processor cache. Signed-off-by:

[RFC PATCH] vfio-pci: Make use of new KVM-VFIO device

2013-09-12 Thread Alex Williamson
Add and remove groups from the KVM virtual VFIO device as we make use of them. This allows KVM to optimize for performance and correctness based on properties of the group. Signed-off-by: Alex Williamson alex.william...@redhat.com --- This patch is enabled by: [RFC PATCH 0/3] kvm/vfio: Manage

[RFC PATCH 0/3] kvm/vfio: Manage KVM IOMMU coherency with virtual VFIO device

2013-09-12 Thread Alex Williamson
See patch 3/3 for a description of exactly why we need this. I know POWER folks are also interested in making use of VFIO's external user interface from KVM and Alexey's proposed patches have a similar device tailored for SPAPR use there. I'm hoping that we can make the base device common and

[RFC PATCH 1/3] kvm: Destroy free KVM devices on release

2013-09-12 Thread Alex Williamson
The KVM device interface allocates a struct kvm_device and calls kvm_device_ops.create on it from KVM VM ioctl KVM_CREATE_DEVICE. This returns a file descriptor to the user for them to set/get/check further attributes. On closing the file descriptor, one would assume that kvm_device_ops.destroy

[RFC PATCH 3/3] kvm: Add VFIO device for handling IOMMU cache coherency

2013-09-12 Thread Alex Williamson
So far we've succeeded at making KVM and VFIO mostly unaware of each other, but there's any important point where that breaks down. Intel VT-d hardware may or may not support snoop control. When snoop control is available, intel-iommu promotes No-Snoop transactions on PCIe to be cache coherent.

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Alexander Graf
On 05.08.2013, at 23:26, Paul Mackerras wrote: This makes it possible to have both PR and HV guests running concurrently on one machine, by deferring the decision about which type of KVM to use for each guest until it either enables the PAPR capability or runs a vcpu. (Of course, this is

Re: [PATCH 20/23] KVM: PPC: Book3S PR: Better handling of host-side read-only pages

2013-09-12 Thread Alexander Graf
On 05.08.2013, at 23:27, Paul Mackerras wrote: Currently we request write access to all pages that get mapped into the guest, even if the guest is only loading from the page. This reduces the effectiveness of KSM because it means that we unshare every page we access. Also, we always set

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Paul Mackerras
On Thu, Sep 12, 2013 at 05:56:11PM -0500, Alexander Graf wrote: On 05.08.2013, at 23:26, Paul Mackerras wrote: This makes it possible to have both PR and HV guests running concurrently on one machine, by deferring the decision about which type of KVM to use for each guest until it

Re: [PATCH 20/23] KVM: PPC: Book3S PR: Better handling of host-side read-only pages

2013-09-12 Thread Paul Mackerras
On Thu, Sep 12, 2013 at 06:01:37PM -0500, Alexander Graf wrote: On 05.08.2013, at 23:27, Paul Mackerras wrote: Currently we request write access to all pages that get mapped into the guest, even if the guest is only loading from the page. This reduces the effectiveness of KSM because

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Benjamin Herrenschmidt
On Fri, 2013-09-13 at 10:17 +1000, Paul Mackerras wrote: Aneesh and I are currently investigating an alternative approach, which is much more like the x86 way of doing things. We are looking at splitting the code into three modules: a kvm_pr.ko module with the PR-specific bits, a kvm_hv.ko

The state of vmexit/vmenter MSR store/load in nested vmx

2013-09-12 Thread Arthur Chunqi Li
Hi Jan and maillist, Does nest VMX support vmexit MSR store/load and vmenter MSR load now? I tried to set VM-exit MSR-store address with valid address and set VM-exit MSR-store count to 1, then the vmenter fails. Anything else should I set to use these features? Arthur -- Arthur Chunqi Li

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Alexander Graf
Am 12.09.2013 um 20:31 schrieb Benjamin Herrenschmidt b...@kernel.crashing.org: On Fri, 2013-09-13 at 10:17 +1000, Paul Mackerras wrote: Aneesh and I are currently investigating an alternative approach, which is much more like the x86 way of doing things. We are looking at splitting the

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Alexander Graf
Am 12.09.2013 um 19:17 schrieb Paul Mackerras pau...@samba.org: On Thu, Sep 12, 2013 at 05:56:11PM -0500, Alexander Graf wrote: On 05.08.2013, at 23:26, Paul Mackerras wrote: This makes it possible to have both PR and HV guests running concurrently on one machine, by deferring the

Re: The state of vmexit/vmenter MSR store/load in nested vmx

2013-09-12 Thread Gleb Natapov
On Fri, Sep 13, 2013 at 10:08:09AM +0800, Arthur Chunqi Li wrote: Hi Jan and maillist, Does nest VMX support vmexit MSR store/load and vmenter MSR load now? I tried to set VM-exit MSR-store address with valid address and set VM-exit MSR-store count to 1, then the vmenter fails. Anything else

RE: vfio for platform devices - 9/5/2012 - minutes

2013-09-12 Thread Bhushan Bharat-R65777
-Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, September 11, 2013 10:45 PM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Sethi Varun-B16395; Bhushan Bharat-R65777; 'Peter Maydell'; 'Santosh Shukla'; 'Alexander Graf'; 'Antonios

Re: vfio for platform devices - 9/5/2012 - minutes

2013-09-12 Thread Scott Wood
On Thu, 2013-09-12 at 04:18 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, September 11, 2013 10:45 PM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Sethi Varun-B16395; Bhushan Bharat-R65777;

Re: vfio for platform devices - 9/5/2012 - minutes

2013-09-12 Thread Alexander Graf
On 12.09.2013, at 13:10, Scott Wood wrote: On Thu, 2013-09-12 at 04:18 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, September 11, 2013 10:45 PM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421;

Re: vfio for platform devices - 9/5/2012 - minutes

2013-09-12 Thread Scott Wood
On Thu, 2013-09-12 at 16:23 -0500, Alexander Graf wrote: On 12.09.2013, at 13:10, Scott Wood wrote: On Thu, 2013-09-12 at 04:18 -0500, Bhushan Bharat-R65777 wrote: and device disabling is not a standard like PCI. Do you think that we might need to do some device specific handling.

Re: vfio for platform devices - 9/5/2012 - minutes

2013-09-12 Thread Alexander Graf
On 12.09.2013, at 16:45, Scott Wood wrote: On Thu, 2013-09-12 at 16:23 -0500, Alexander Graf wrote: On 12.09.2013, at 13:10, Scott Wood wrote: On Thu, 2013-09-12 at 04:18 -0500, Bhushan Bharat-R65777 wrote: and device disabling is not a standard like PCI. Do you think that we might need

Re: vfio for platform devices - 9/5/2012 - minutes

2013-09-12 Thread Scott Wood
On Thu, 2013-09-12 at 16:48 -0500, Alexander Graf wrote: On 12.09.2013, at 16:45, Scott Wood wrote: On Thu, 2013-09-12 at 16:23 -0500, Alexander Graf wrote: On 12.09.2013, at 13:10, Scott Wood wrote: On Thu, 2013-09-12 at 04:18 -0500, Bhushan Bharat-R65777 wrote: and device disabling

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Alexander Graf
On 05.08.2013, at 23:26, Paul Mackerras wrote: This makes it possible to have both PR and HV guests running concurrently on one machine, by deferring the decision about which type of KVM to use for each guest until it either enables the PAPR capability or runs a vcpu. (Of course, this is

Re: [PATCH 20/23] KVM: PPC: Book3S PR: Better handling of host-side read-only pages

2013-09-12 Thread Paul Mackerras
On Thu, Sep 12, 2013 at 06:01:37PM -0500, Alexander Graf wrote: On 05.08.2013, at 23:27, Paul Mackerras wrote: Currently we request write access to all pages that get mapped into the guest, even if the guest is only loading from the page. This reduces the effectiveness of KSM because

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Paul Mackerras
On Thu, Sep 12, 2013 at 05:56:11PM -0500, Alexander Graf wrote: On 05.08.2013, at 23:26, Paul Mackerras wrote: This makes it possible to have both PR and HV guests running concurrently on one machine, by deferring the decision about which type of KVM to use for each guest until it

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Benjamin Herrenschmidt
On Fri, 2013-09-13 at 10:17 +1000, Paul Mackerras wrote: Aneesh and I are currently investigating an alternative approach, which is much more like the x86 way of doing things. We are looking at splitting the code into three modules: a kvm_pr.ko module with the PR-specific bits, a kvm_hv.ko

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Alexander Graf
Am 12.09.2013 um 19:17 schrieb Paul Mackerras pau...@samba.org: On Thu, Sep 12, 2013 at 05:56:11PM -0500, Alexander Graf wrote: On 05.08.2013, at 23:26, Paul Mackerras wrote: This makes it possible to have both PR and HV guests running concurrently on one machine, by deferring the

Re: [PATCH 19/23] KVM: PPC: Book3S: Select PR vs HV separately for each guest

2013-09-12 Thread Alexander Graf
Am 12.09.2013 um 20:31 schrieb Benjamin Herrenschmidt b...@kernel.crashing.org: On Fri, 2013-09-13 at 10:17 +1000, Paul Mackerras wrote: Aneesh and I are currently investigating an alternative approach, which is much more like the x86 way of doing things. We are looking at splitting the