Re: [PATCH 0/8] s390/kvm fixes

2013-05-21 Thread Martin Schwidefsky
On Sun, 19 May 2013 11:49:43 +0300 Gleb Natapov g...@redhat.com wrote: Hi Christian, On Fri, May 17, 2013 at 02:41:30PM +0200, Christian Borntraeger wrote: Gleb, Paolo, Marcelo, here are some low level changes to kvm on s390 that we have been cooking for a while now. Patch

Re: [PATCH v3 03/13] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-21 Thread Xiao Guangrong
On 05/19/2013 12:52 PM, Jun Nakajima wrote: From: Nadav Har'El n...@il.ibm.com This is the first patch in a series which adds nested EPT support to KVM's nested VMX. Nested EPT means emulating EPT for an L1 guest so that L1 can use EPT when running a nested guest L2. When L1 uses EPT, it

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

2013-05-21 Thread Gleb Natapov
On Sun, May 19, 2013 at 10:36:32AM -0400, Sanjay Lal wrote: On May 19, 2013, at 8:52 AM, Gleb Natapov wrote: On Sat, May 18, 2013 at 06:54:24AM -0700, Sanjay Lal wrote: - As suggested by Gleb, wrap calls to gfn_to_pfn() with srcu_read_lock/unlock(). Memory slots should be acccessed

Re: [PATCH v3 04/13] nEPT: Define EPT-specific link_shadow_page()

2013-05-21 Thread Xiao Guangrong
On 05/19/2013 12:52 PM, Jun Nakajima wrote: From: Nadav Har'El n...@il.ibm.com Since link_shadow_page() is used by a routine in mmu.c, add an EPT-specific link_shadow_page() in paging_tmp.h, rather than moving it. Signed-off-by: Nadav Har'El n...@il.ibm.com Signed-off-by: Jun Nakajima

Re: [PATCH v3 03/13] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-21 Thread Xiao Guangrong
On 05/21/2013 03:52 PM, Xiao Guangrong wrote: On 05/19/2013 12:52 PM, Jun Nakajima wrote: From: Nadav Har'El n...@il.ibm.com This is the first patch in a series which adds nested EPT support to KVM's nested VMX. Nested EPT means emulating EPT for an L1 guest so that L1 can use EPT when

Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-21 Thread Michael S. Tsirkin
On Tue, May 21, 2013 at 01:11:28PM +0800, Jason Wang wrote: On 05/21/2013 09:26 AM, Narasimhan, Sriram wrote: -Original Message- From: Michael S. Tsirkin [mailto:m...@redhat.com] Sent: Monday, May 20, 2013 2:59 AM To: Narasimhan, Sriram Cc: ru...@rustcorp.com.au;

Re: [PATCH v6 3/7] KVM: MMU: fast invalidate all pages

2013-05-21 Thread Gleb Natapov
On Mon, May 20, 2013 at 05:40:47PM -0300, Marcelo Tosatti wrote: On Mon, May 20, 2013 at 11:15:45PM +0300, Gleb Natapov wrote: On Mon, May 20, 2013 at 04:46:24PM -0300, Marcelo Tosatti wrote: On Fri, May 17, 2013 at 05:12:58AM +0800, Xiao Guangrong wrote: The current kvm_mmu_zap_all is

Re: [PATCH v6 3/7] KVM: MMU: fast invalidate all pages

2013-05-21 Thread Gleb Natapov
On Tue, May 21, 2013 at 11:36:57AM +0800, Xiao Guangrong wrote: So its better to just if (need_resched()) { kvm_mmu_complete_zap_page(list); is kvm_mmu_commit_zap_page()? Also we need to check that someone waits on mmu_lock before entering here.

Re: [PATCH v3 05/13] nEPT: MMU context for nested EPT

2013-05-21 Thread Xiao Guangrong
On 05/19/2013 12:52 PM, Jun Nakajima wrote: From: Nadav Har'El n...@il.ibm.com KVM's existing shadow MMU code already supports nested TDP. To use it, we need to set up a new MMU context for nested EPT, and create a few callbacks for it (nested_ept_*()). This context should also use the EPT

Re: [PATCH 0/8] s390/kvm fixes

2013-05-21 Thread Gleb Natapov
On Fri, May 17, 2013 at 02:41:30PM +0200, Christian Borntraeger wrote: Gleb, Paolo, Marcelo, Applied, thanks. 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

Re: [PATCH v3 03/13] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-21 Thread Gleb Natapov
On Tue, May 21, 2013 at 04:30:13PM +0800, Xiao Guangrong wrote: @@ -772,6 +810,7 @@ static gpa_t FNAME(gva_to_gpa_nested)(struct kvm_vcpu *vcpu, gva_t vaddr, return gpa; } +#endif Strange! Why does nested ept not need these functions? How to emulate the instruction

Re: [PATCH v3 10/13] nEPT: Nested INVEPT

2013-05-21 Thread Xiao Guangrong
On 05/19/2013 12:52 PM, Jun Nakajima wrote: From: Nadav Har'El n...@il.ibm.com If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table

Re: I/O port permission bit inheritance between threads

2013-05-21 Thread Joerg Roedel
Hey Stephen, On Mon, May 20, 2013 at 02:24:31PM -0700, Stephen Hemminger wrote: ioperm() inheritance across threads is different in KVM then when run on physical hardware. The following program runs on physical hardware but get SEGV under KVM. It appears that the I/O permission bits are

Re: I/O port permission bit inheritance between threads

2013-05-21 Thread Gleb Natapov
On Tue, May 21, 2013 at 11:50:30AM +0200, Joerg Roedel wrote: Hey Stephen, On Mon, May 20, 2013 at 02:24:31PM -0700, Stephen Hemminger wrote: ioperm() inheritance across threads is different in KVM then when run on physical hardware. The following program runs on physical hardware but

Re: [PATCH v3 13/13] nEPT: Inject EPT violation/misconfigration

2013-05-21 Thread Xiao Guangrong
On 05/19/2013 12:52 PM, Jun Nakajima wrote: Add code to detect EPT misconfiguration and inject it to L1 VMM. Also, it injects more correct exit qualification upon EPT violation to L1 VMM. Now L1 can correctly go to ept_misconfig handler (instead of wrongly going to fast_page_fault), it will

Re: [PATCH v3 03/13] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-21 Thread Xiao Guangrong
On 05/21/2013 05:01 PM, Gleb Natapov wrote: On Tue, May 21, 2013 at 04:30:13PM +0800, Xiao Guangrong wrote: @@ -772,6 +810,7 @@ static gpa_t FNAME(gva_to_gpa_nested)(struct kvm_vcpu *vcpu, gva_t vaddr, return gpa; } +#endif Strange! Why does nested ept not need these functions? How

Re: KVM call agenda for 2013-05-21

2013-05-21 Thread Anthony Liguori
Michael S. Tsirkin m...@redhat.com writes: On Mon, May 20, 2013 at 12:57:47PM +0200, Juan Quintela wrote: Hi Please, send any topic that you are interested in covering. Thanks, Juan. Generating acpi tables. Cc'd a bunch of people who might be interested in this topic. Unfortunately

[PATCH] kvm tools: add status notification hook to virtio-mmio

2013-05-21 Thread Marc Zyngier
Patch e03b449cbddf (kvm tools: add status notification hook for virtio) converted virtio-net to use a new notification mechanism, but unfortunately left virtio-mmio behind. The direct consequence is that both arm and arm64 guests are left without any form of networking. Not good. Bring

Re: KVM call agenda for 2013-05-21

2013-05-21 Thread Michael S. Tsirkin
On Tue, May 21, 2013 at 07:18:58AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, May 20, 2013 at 12:57:47PM +0200, Juan Quintela wrote: Hi Please, send any topic that you are interested in covering. Thanks, Juan. Generating acpi tables.

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-21 Thread Peter Zijlstra
On Sun, May 19, 2013 at 07:40:09PM +0300, Michael S. Tsirkin wrote: OK I get it. So let me correct myself. The simple code that does something like this under a spinlock: preempt_disable pagefault_disable error = copy_to_user pagefault_enable

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-21 Thread Peter Zijlstra
On Sun, May 19, 2013 at 12:35:26PM +0300, Michael S. Tsirkin wrote: --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -198,7 +198,6 @@ void might_fault(void); #else static inline void might_fault(void) { - might_sleep(); This removes potential resched points

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-21 Thread Peter Zijlstra
On Sun, May 19, 2013 at 12:35:26PM +0300, Michael S. Tsirkin wrote: On Thu, May 16, 2013 at 08:40:41PM +0200, Peter Zijlstra wrote: On Thu, May 16, 2013 at 02:16:10PM +0300, Michael S. Tsirkin wrote: There are several ways to make sure might_fault calling function does not sleep. One

Re: [PATCH v4 13/32] arm64: KVM: MMIO access backend

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:41PM +0100, Marc Zyngier wrote: Define the necessary structures to perform an MMIO access. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Catalin Marinas catalin.mari...@arm.com -- To

Re: KVM call agenda for 2013-05-21

2013-05-21 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please, send any topic that you are interested in covering. As our fearless leader is missing, we cancell the call. (mst agreed on irc) See you next week. Later, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body

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

2013-05-21 Thread Sanjay Lal
On May 21, 2013, at 1:00 AM, Gleb Natapov wrote: On Sun, May 19, 2013 at 10:36:32AM -0400, Sanjay Lal wrote: On May 19, 2013, at 8:52 AM, Gleb Natapov wrote: On Sat, May 18, 2013 at 06:54:24AM -0700, Sanjay Lal wrote: - As suggested by Gleb, wrap calls to gfn_to_pfn() with

Re: KVM call agenda for 2013-05-21

2013-05-21 Thread Anthony Liguori
Michael S. Tsirkin m...@redhat.com writes: On Tue, May 21, 2013 at 07:18:58AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, May 20, 2013 at 12:57:47PM +0200, Juan Quintela wrote: Hi Please, send any topic that you are interested in covering.

Re: [PATCH v4 14/32] arm64: KVM: guest one-reg interface

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:42PM +0100, Marc Zyngier wrote: Let userspace play with the guest registers. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- /dev/null +++ b/arch/arm64/kvm/guest.c ... +static int get_core_reg(struct

Re: KVM call agenda for 2013-05-21

2013-05-21 Thread Juan Quintela
Anthony Liguori anth...@codemonkey.ws wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, May 21, 2013 at 07:18:58AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, May 20, 2013 at 12:57:47PM +0200, Juan Quintela wrote: Hi Please, send any

Re: [PATCH v4 14/32] arm64: KVM: guest one-reg interface

2013-05-21 Thread Marc Zyngier
On 21/05/13 15:30, Catalin Marinas wrote: On Tue, May 14, 2013 at 03:13:42PM +0100, Marc Zyngier wrote: Let userspace play with the guest registers. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- /dev/null +++

Re: [PATCH v4 15/32] arm64: KVM: hypervisor initialization code

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:43PM +0100, Marc Zyngier wrote: --- /dev/null +++ b/arch/arm64/kvm/hyp-init.S ... + .text + .pushsection.hyp.idmap.text, ax + + .align 11 + +__kvm_hyp_init: + .global __kvm_hyp_init + +ENTRY(__kvm_hyp_init_vector) Why do you need both

Re: [PATCH v4 15/32] arm64: KVM: hypervisor initialization code

2013-05-21 Thread Marc Zyngier
On 21/05/13 15:40, Catalin Marinas wrote: On Tue, May 14, 2013 at 03:13:43PM +0100, Marc Zyngier wrote: --- /dev/null +++ b/arch/arm64/kvm/hyp-init.S ... +.text +.pushsection.hyp.idmap.text, ax + +.align 11 + +__kvm_hyp_init: +.global __kvm_hyp_init +

Re: [PATCH v4 16/32] arm64: KVM: HYP mode world switch implementation

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:44PM +0100, Marc Zyngier wrote: +// void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa); +ENTRY(__kvm_tlb_flush_vmid_ipa) + kern_hyp_va x0 + ldr x2, [x0, #KVM_VTTBR] + msr vttbr_el2, x2 + isb + + /* +

Re: [PATCH v4 17/32] arm64: KVM: Exit handling

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:45PM +0100, Marc Zyngier wrote: Handle the exit of a VM, decoding the exit reason from HYP mode and calling the corresponding handler. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Catalin

Re: [PATCH v4 18/32] arm64: KVM: Plug the VGIC

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:46PM +0100, Marc Zyngier wrote: Add support for the in-kernel GIC emulation. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Catalin Marinas catalin.mari...@arm.com -- To unsubscribe from this

Re: I/O port permission bit inheritance between threads

2013-05-21 Thread Stephen Hemminger
On Tue, 21 May 2013 13:01:18 +0300 Gleb Natapov g...@redhat.com wrote: On Tue, May 21, 2013 at 11:50:30AM +0200, Joerg Roedel wrote: Hey Stephen, On Mon, May 20, 2013 at 02:24:31PM -0700, Stephen Hemminger wrote: ioperm() inheritance across threads is different in KVM then when run

Re: [PATCH v4 19/32] arm64: KVM: Plug the arch timer

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:47PM +0100, Marc Zyngier wrote: Add support for the in-kernel timer emulation. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com I think same comment as one of the previous patches, you could get rid of some

Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS

2013-05-21 Thread Gleb Natapov
On Mon, May 20, 2013 at 02:01:26PM -0700, David Daney wrote: From: David Daney david.da...@cavium.com Because not all 256 CP0 registers are ever implemented, we need a different method of manipulating them. Use the KVM_GET_MSRS/KVM_SET_MSRS mechanism as x86 does for its MSRs. Have you

Re: [PATCH v4 20/32] arm64: KVM: PSCI implementation

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:48PM +0100, Marc Zyngier wrote: Wire the PSCI backend into the exit handling code. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Catalin Marinas catalin.mari...@arm.com -- To unsubscribe from

Re: [PATCH v4 21/32] arm64: KVM: Build system integration

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:49PM +0100, Marc Zyngier wrote: --- /dev/null +++ b/arch/arm64/kvm/Kconfig ... +config KVM_ARM_VGIC +bool + depends on KVM_ARM_HOST OF + select HAVE_KVM_IRQCHIP + ---help--- + Adds support for a hardware assisted, in-kernel GIC

Re: [PATCH v4 31/32] arm64: KVM: MAINTAINERS update

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 03:13:59PM +0100, Marc Zyngier wrote: Elect myself as the KVM/arm64 maintainer. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Acked-by: Catalin Marinas catalin.mari...@arm.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message

Re: [PATCH v3 0/7] ARM: KVM: various mmu related fixes for 3.10

2013-05-21 Thread Catalin Marinas
On Tue, May 14, 2013 at 12:11:33PM +0100, Marc Zyngier wrote: This patch series fixes a number of of KVM/ARM issues that have either been spotted during the review of the arm64 code, or while reworking related code. Only the first patch fixes a potential (if unlikely) problem, the others

Re: [PATCH v4 21/32] arm64: KVM: Build system integration

2013-05-21 Thread Paolo Bonzini
- Messaggio originale - Da: Catalin Marinas catalin.mari...@arm.com A: Marc Zyngier marc.zyng...@arm.com Cc: linux-arm-ker...@lists.infradead.org, kvm...@lists.cs.columbia.edu, kvm@vger.kernel.org, Will Deacon will.dea...@arm.com, pbonz...@redhat.com, g...@redhat.com, Christopher

Re: [PATCH v4 21/32] arm64: KVM: Build system integration

2013-05-21 Thread Marc Zyngier
On 21/05/13 17:09, Paolo Bonzini wrote: - Messaggio originale - Da: Catalin Marinas catalin.mari...@arm.com A: Marc Zyngier marc.zyng...@arm.com Cc: linux-arm-ker...@lists.infradead.org, kvm...@lists.cs.columbia.edu, kvm@vger.kernel.org, Will Deacon will.dea...@arm.com,

Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS

2013-05-21 Thread David Daney
On 05/21/2013 08:37 AM, Gleb Natapov wrote: On Mon, May 20, 2013 at 02:01:26PM -0700, David Daney wrote: From: David Daney david.da...@cavium.com Because not all 256 CP0 registers are ever implemented, we need a different method of manipulating them. Use the KVM_GET_MSRS/KVM_SET_MSRS

Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS

2013-05-21 Thread Gleb Natapov
On Tue, May 21, 2013 at 09:21:06AM -0700, David Daney wrote: On 05/21/2013 08:37 AM, Gleb Natapov wrote: On Mon, May 20, 2013 at 02:01:26PM -0700, David Daney wrote: From: David Daney david.da...@cavium.com Because not all 256 CP0 registers are ever implemented, we need a different method

Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS

2013-05-21 Thread David Daney
On 05/21/2013 09:28 AM, Gleb Natapov wrote: On Tue, May 21, 2013 at 09:21:06AM -0700, David Daney wrote: On 05/21/2013 08:37 AM, Gleb Natapov wrote: On Mon, May 20, 2013 at 02:01:26PM -0700, David Daney wrote: From: David Daney david.da...@cavium.com Because not all 256 CP0 registers are

Re: [Qemu-devel] KVM call agenda for 2013-05-21

2013-05-21 Thread Andreas Färber
Am 21.05.2013 16:34, schrieb Juan Quintela: Anthony Liguori anth...@codemonkey.ws wrote: Maybe we could use a wiki page to setup a rolling agenda? I think this could be easier for everybody involved. Especially because you just look if there is anything to discuss? On the other hand, the

Re: [PATCH v4 16/32] arm64: KVM: HYP mode world switch implementation

2013-05-21 Thread Marc Zyngier
On 21/05/13 16:16, Catalin Marinas wrote: On Tue, May 14, 2013 at 03:13:44PM +0100, Marc Zyngier wrote: +// void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa); +ENTRY(__kvm_tlb_flush_vmid_ipa) + kern_hyp_va x0 + ldr x2, [x0, #KVM_VTTBR] + msr

Re: [Qemu-devel] KVM call agenda for 2013-05-21

2013-05-21 Thread Michael S. Tsirkin
On Tue, May 21, 2013 at 06:40:18PM +0200, Andreas Färber wrote: Am 21.05.2013 16:34, schrieb Juan Quintela: Anthony Liguori anth...@codemonkey.ws wrote: Maybe we could use a wiki page to setup a rolling agenda? I think this could be easier for everybody involved. Especially because

Re: KVM call agenda for 2013-05-21

2013-05-21 Thread Michael S. Tsirkin
On Tue, May 21, 2013 at 09:29:07AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, May 21, 2013 at 07:18:58AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, May 20, 2013 at 12:57:47PM +0200, Juan Quintela wrote:

Re: KVM call agenda for 2013-05-21

2013-05-21 Thread Anthony Liguori
Michael S. Tsirkin m...@redhat.com writes: On Tue, May 21, 2013 at 09:29:07AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, May 21, 2013 at 07:18:58AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, May 20, 2013 at

[PATCH v4 0/6] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-21 Thread David Daney
From: David Daney david.da...@cavium.com The initial patch set implementing MIPS KVM does not handle 64-bit guests or use of the FPU. This patch set corrects these ABI issues, and does some very minor clean up. Chandes from v3: Use KVM_SET_ONE_REG instead of KVM_SET_MSRS. Added

[PATCH v4 2/6] mips/kvm: Fix ABI for use of 64-bit registers.

2013-05-21 Thread David Daney
From: David Daney david.da...@cavium.com All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. Signed-off-by: David Daney david.da...@cavium.com --- arch/mips/include/asm/kvm.h | 16 +++- 1 file changed, 11 insertions(+), 5

[PATCH v4 1/6] mips/kvm: Fix ABI for use of FPU.

2013-05-21 Thread David Daney
From: David Daney david.da...@cavium.com Define a non-empty struct kvm_fpu. Signed-off-by: David Daney david.da...@cavium.com --- arch/mips/include/asm/kvm.h | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/asm/kvm.h

[PATCH v4 6/6] mips/kvm: Use ENOIOCTLCMD to indicate unimplemented ioctls.

2013-05-21 Thread David Daney
From: David Daney david.da...@cavium.com The Linux Way is to return -ENOIOCTLCMD to the vfs when an unimplemented ioctl is requested. Do this in kvm_mips instead of a random mixture of -ENOTSUPP and -EINVAL. Signed-off-by: David Daney david.da...@cavium.com --- arch/mips/kvm/kvm_mips.c | 18

[PATCH v4 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG

2013-05-21 Thread David Daney
From: David Daney david.da...@cavium.com Because not all 256 CP0 registers are ever implemented, we need a different method of manipulating them. Use the KVM_SET_ONE_REG/KVM_GET_ONE_REG mechanism. Code related to implementing KVM_SET_ONE_REG/KVM_GET_ONE_REG is consolidated in to

[PATCH v4 4/6] mips/kvm: Use ARRAY_SIZE() instead of hardcoded constants in kvm_arch_vcpu_ioctl_{s,g}et_regs

2013-05-21 Thread David Daney
From: David Daney david.da...@cavium.com Also we cannot set special zero register, so force it to zero. Signed-off-by: David Daney david.da...@cavium.com --- arch/mips/kvm/kvm_mips.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kvm/kvm_mips.c

[PATCH v4 3/6] mips/kvm: Fix name of gpr field in struct kvm_regs.

2013-05-21 Thread David Daney
From: David Daney david.da...@cavium.com Signed-off-by: David Daney david.da...@cavium.com --- arch/mips/include/asm/kvm.h | 3 ++- arch/mips/kvm/kvm_mips.c| 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h index

Re: [PATCH v3 04/13] nEPT: Define EPT-specific link_shadow_page()

2013-05-21 Thread Nakajima, Jun
Sure. Thanks for the suggestion. On Tue, May 21, 2013 at 1:15 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 05/19/2013 12:52 PM, Jun Nakajima wrote: From: Nadav Har'El n...@il.ibm.com Since link_shadow_page() is used by a routine in mmu.c, add an EPT-specific

Re: [PATCH v3 03/13] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-21 Thread Nakajima, Jun
On Tue, May 21, 2013 at 4:05 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 05/21/2013 05:01 PM, Gleb Natapov wrote: On Tue, May 21, 2013 at 04:30:13PM +0800, Xiao Guangrong wrote: @@ -772,6 +810,7 @@ static gpa_t FNAME(gva_to_gpa_nested)(struct kvm_vcpu *vcpu, gva_t vaddr,

Re: [PATCH v3 05/13] nEPT: MMU context for nested EPT

2013-05-21 Thread Nakajima, Jun
On Tue, May 21, 2013 at 1:50 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 05/19/2013 12:52 PM, Jun Nakajima wrote: From: Nadav Har'El n...@il.ibm.com KVM's existing shadow MMU code already supports nested TDP. To use it, we need to set up a new MMU context for nested EPT, and

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-21 Thread Marcelo Tosatti
On Sun, May 19, 2013 at 05:06:37PM +1000, Vadim Rozenfeld wrote: The following patch allows to activate a partition reference time enlightenment that is based on the host platform's support for an Invariant Time Stamp Counter (iTSC). NOTE: This code will survive migration due to lack of VM

Re: [RFC PATCH v2 1/2] add support for Hyper-V reference time counter

2013-05-21 Thread Marcelo Tosatti
On Sun, May 19, 2013 at 05:06:36PM +1000, Vadim Rozenfeld wrote: Signed-off: Peter Lieven p...@dlh.net Signed-off: Gleb Natapov g...@redhat.com Signed-off: Vadim Rozenfeld vroze...@redhat.com v1 - v2 1. mark TSC page dirty as suggested by Eric Northup digitale...@google.com and Gleb

Re: [PATCH v3 03/13] nEPT: Add EPT tables support to paging_tmpl.h

2013-05-21 Thread Xiao Guangrong
On 05/22/2013 06:26 AM, Nakajima, Jun wrote: On Tue, May 21, 2013 at 4:05 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 05/21/2013 05:01 PM, Gleb Natapov wrote: On Tue, May 21, 2013 at 04:30:13PM +0800, Xiao Guangrong wrote: @@ -772,6 +810,7 @@ static gpa_t

Re: [PATCH v6 3/7] KVM: MMU: fast invalidate all pages

2013-05-21 Thread Marcelo Tosatti
On Tue, May 21, 2013 at 11:36:57AM +0800, Xiao Guangrong wrote: On 05/21/2013 04:40 AM, Marcelo Tosatti wrote: On Mon, May 20, 2013 at 11:15:45PM +0300, Gleb Natapov wrote: On Mon, May 20, 2013 at 04:46:24PM -0300, Marcelo Tosatti wrote: On Fri, May 17, 2013 at 05:12:58AM +0800, Xiao

Re: [PATCH v6 3/7] KVM: MMU: fast invalidate all pages

2013-05-21 Thread Marcelo Tosatti
On Tue, May 21, 2013 at 11:39:03AM +0300, Gleb Natapov wrote: Any pages with stale information will be zapped by kvm_mmu_zap_all(). When that happens, page faults will take place which will automatically use the new generation number. So still not clear why is this necessary. This

Re: [RFC PATCH v2 1/2] add support for Hyper-V reference time counter

2013-05-21 Thread Gleb Natapov
On Tue, May 21, 2013 at 09:46:14PM -0300, Marcelo Tosatti wrote: On Sun, May 19, 2013 at 05:06:36PM +1000, Vadim Rozenfeld wrote: Signed-off: Peter Lieven p...@dlh.net Signed-off: Gleb Natapov g...@redhat.com Signed-off: Vadim Rozenfeld vroze...@redhat.com v1 - v2 1. mark TSC page

Re: [RFC PATCH v2 1/2] add support for Hyper-V reference time counter

2013-05-21 Thread Marcelo Tosatti
On Wed, May 22, 2013 at 06:28:47AM +0300, Gleb Natapov wrote + case HV_X64_MSR_TIME_REF_COUNT: r = true; break; } @@ -1827,6 +1829,29 @@ static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data) if (__copy_to_user((void __user

Re: [RFC PATCH v2 1/2] add support for Hyper-V reference time counter

2013-05-21 Thread Gleb Natapov
On Wed, May 22, 2013 at 12:32:57AM -0300, Marcelo Tosatti wrote: On Wed, May 22, 2013 at 06:28:47AM +0300, Gleb Natapov wrote + case HV_X64_MSR_TIME_REF_COUNT: r = true; break; } @@ -1827,6 +1829,29 @@ static int

[PATCH] kvm: add detail error message when fail to add ioeventfd

2013-05-21 Thread Amos Kong
I try to hotplug 28 * 8 multiple-function devices to guest with old host kernel, ioeventfds in host kernel will be exhausted, then qemu fails to allocate ioeventfds for blk/nic devices. It's better to add detail error here. Signed-off-by: Amos Kong ak...@redhat.com --- kvm-all.c |4 1