Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Wanpeng Li
On Fri, Jul 04, 2014 at 07:43:14AM +0200, Jan Kiszka wrote: On 2014-07-04 04:52, Wanpeng Li wrote: On Thu, Jul 03, 2014 at 01:27:05PM -0400, Bandan Das wrote: [...] # modprobe kvm_intel ept=0 nested=1 enable_shadow_vmcs=0 The Host CPU - Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz qemu cmd to run

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Wanpeng Li
On Thu, Jul 03, 2014 at 01:15:26AM -0400, Bandan Das wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2014-07-02 08:54, Wanpeng Li wrote: This patch fix bug https://bugzilla.kernel.org/show_bug.cgi?id=72381 If we didn't inject a still-pending event to L1 since nested_run_pending,

Re: [PATCH 0/4] kvm, mem-hotplug: Do not pin ept identity pagetable and apic access page.

2014-07-04 Thread Tang Chen
Hi Gleb, On 07/03/2014 02:04 PM, Gleb Natapov wrote: On Thu, Jul 03, 2014 at 09:17:59AM +0800, Tang Chen wrote: Hi Gleb, On 07/02/2014 05:00 PM, Tang Chen wrote: Hi Gleb, Marcelo, Please help to review this patch-set. NOTE: This patch-set doesn't work properly. ept identity pagetable and

Re: [PATCH v2] powerpc/kvm: support to handle sw breakpoint

2014-07-04 Thread Alexander Graf
On 04.07.14 06:34, Madhavan Srinivasan wrote: On Thursday 03 July 2014 05:21 PM, Alexander Graf wrote: On 01.07.14 10:41, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via

[PATCH] KVM: nVMX: Fix vmptrld fail and vmwrite error when L1 goes down w/ enable_shadow_vmcs

2014-07-04 Thread Wanpeng Li
This bug can be trigger by L1 goes down directly w/ enable_shadow_vmcs. [ 6413.158950] kvm: vmptrld (null)/7800 failed [ 6413.158954] vmwrite error: reg 401e value 4 (err 1) [ 6413.158957] CPU: 0 PID: 4840 Comm: qemu-system-x86 Tainted: G OE 3.16.0kvm+ #2 [

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Jan Kiszka
On 2014-07-04 08:08, Wanpeng Li wrote: On Fri, Jul 04, 2014 at 07:43:14AM +0200, Jan Kiszka wrote: On 2014-07-04 04:52, Wanpeng Li wrote: On Thu, Jul 03, 2014 at 01:27:05PM -0400, Bandan Das wrote: [...] # modprobe kvm_intel ept=0 nested=1 enable_shadow_vmcs=0 The Host CPU - Intel(R)

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Jan Kiszka
On 2014-07-04 08:17, Wanpeng Li wrote: On Thu, Jul 03, 2014 at 01:15:26AM -0400, Bandan Das wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2014-07-02 08:54, Wanpeng Li wrote: This patch fix bug https://bugzilla.kernel.org/show_bug.cgi?id=72381 If we didn't inject a still-pending event

Re: [PATCH 0/7] KVM: PPC: Book3S HV: Enable on little endian hosts

2014-07-04 Thread Alexander Graf
On 17.06.14 18:17, Alexander Graf wrote: So far we've been able to successfully run HV KVM on big endian hosts, but once you dive into little endian land things start to fall apart. This patch set enables HV KVM for little endian hosts. This should be the final piece left missing to get little

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 07:43, Jan Kiszka ha scritto: Which version (hash) of kvm-unit-tests are you using? All tests up to 307621765a are running fine here, but since a0e30e712d not much is completing successfully anymore: Which test failed to init and triggered the change in the patch? The patch was

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Wanpeng Li
On Fri, Jul 04, 2014 at 09:19:54AM +0200, Jan Kiszka wrote: On 2014-07-04 08:08, Wanpeng Li wrote: On Fri, Jul 04, 2014 at 07:43:14AM +0200, Jan Kiszka wrote: On 2014-07-04 04:52, Wanpeng Li wrote: On Thu, Jul 03, 2014 at 01:27:05PM -0400, Bandan Das wrote: [...] # modprobe kvm_intel ept=0

Re: [PATCH 3/6 v2] KVM: PPC: Book3E: Increase FPU laziness

2014-07-04 Thread Alexander Graf
On 03.07.14 17:46, mihai.cara...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:29 PM To: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org Cc: kvm@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re: [PATCH

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 09:39, Wanpeng Li ha scritto: PASS: test vmxon with FEATURE_CONTROL cleared PASS: test vmxon without FEATURE_CONTROL lock PASS: test enable VMX in FEATURE_CONTROL PASS: test FEATURE_CONTROL lock bit PASS: test vmxon PASS: test vmptrld PASS: test vmclear PASS: test vmptrst PASS:

Re: [PATCH 3/6 v2] KVM: PPC: Book3E: Increase FPU laziness

2014-07-04 Thread Alexander Graf
On 04.07.14 09:46, Alexander Graf wrote: On 03.07.14 17:46, mihai.cara...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:29 PM To: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org Cc: kvm@vger.kernel.org;

Re: [PATCH 5/6 v2] KVM: PPC: Book3E: Add ONE_REG AltiVec support

2014-07-04 Thread Alexander Graf
On 03.07.14 18:11, mihai.cara...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:34 PM To: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org Cc: kvm@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re: [PATCH

Re: [PATCH 1/3] powerpc/kvm: Remove redundant save of SIER AND MMCR2

2014-07-04 Thread Alexander Graf
On 03.07.14 08:12, Joel Stanley wrote: These two registers are already saved in the block above. Aside from being unnecessary, by the time we get down to the second save location r8 no longer contains MMCR2, so we are clobbering the saved value with PMC5. Signed-off-by: Joel Stanley

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Wanpeng Li
On Fri, Jul 04, 2014 at 09:46:38AM +0200, Paolo Bonzini wrote: Il 04/07/2014 09:39, Wanpeng Li ha scritto: PASS: test vmxon with FEATURE_CONTROL cleared PASS: test vmxon without FEATURE_CONTROL lock PASS: test enable VMX in FEATURE_CONTROL PASS: test FEATURE_CONTROL lock bit PASS: test vmxon PASS:

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 09:59, Wanpeng Li ha scritto: You are not running the latest versions of the tests. The last commit in my tree is commit daeec9795d3e6d4e9636588b6cb5fcd6e00d6d46 Author: Bandan Das b...@redhat.com Date: Mon Jun 9 17:04:54 2014 -0400 VMX: Updated test_vmclear and

Re: [RFC PATCH 2/4] KVM: PPC: Book3E: Handle LRAT error exception

2014-07-04 Thread Alexander Graf
On 03.07.14 16:45, Mihai Caraman wrote: Handle LRAT error exception with support for lrat mapping and invalidation. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/include/asm/kvm_ppc.h| 2 +

[PATCH v2] KVM: PPC: e500: Emulate power management control SPR

2014-07-04 Thread Mihai Caraman
For FSL e6500 core the kernel uses power management SPR register (PWRMGTCR0) to enable idle power down for cores and devices by setting up the idle count period at boot time. With the host already controlling the power management configuration the guest could simply benefit from it, so emulate

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Wanpeng Li
On Fri, Jul 04, 2014 at 10:14:34AM +0200, Paolo Bonzini wrote: Il 04/07/2014 09:59, Wanpeng Li ha scritto: You are not running the latest versions of the tests. The last commit in my tree is commit daeec9795d3e6d4e9636588b6cb5fcd6e00d6d46 Author: Bandan Das b...@redhat.com Date: Mon Jun 9

Re: [RFC PATCH 0/4] KVM Book3E support for HTW guests

2014-07-04 Thread Alexander Graf
On 03.07.14 16:45, Mihai Caraman wrote: KVM Book3E support for Hardware Page Tablewalk enabled guests. It looks reasonably straight forward to me, though I have to admit that I find the sind conditions pretty confusing. Scott, would you mind to have a look at this set too? :) Thanks a

Re: [PATCH v2] KVM: PPC: e500: Emulate power management control SPR

2014-07-04 Thread Alexander Graf
On 04.07.14 10:17, Mihai Caraman wrote: For FSL e6500 core the kernel uses power management SPR register (PWRMGTCR0) to enable idle power down for cores and devices by setting up the idle count period at boot time. With the host already controlling the power management configuration the guest

Re: [KVM] About releasing vcpu when closing vcpu fd

2014-07-04 Thread Anshul Makkar
Hi Gu Zheng, Will prefer to wait for the moment . There is no point doing duplicate things in parallel. Thanks Anshul Makkar On Wed, Jul 2, 2014 at 11:43 AM, Igor Mammedov imamm...@redhat.com wrote: On Mon, 30 Jun 2014 16:41:07 +0200 Anshul Makkar anshul.mak...@profitbricks.com wrote: Hi,

RE: [Qemu-devel] [RFC] COLO HA Project proposal

2014-07-04 Thread Dong, Eddie
I didn't quite understand a couple of things though, perhaps you can explain: 1) If we ignore the TCP sequence number problem, in an SMP machine don't we get other randomnesses - e.g. which core completes something first, or who wins a lock contention, so the output stream might not

Re: [Qemu-devel] [RFC] COLO HA Project proposal

2014-07-04 Thread Dr. David Alan Gilbert
* Dong, Eddie (eddie.d...@intel.com) wrote: I didn't quite understand a couple of things though, perhaps you can explain: 1) If we ignore the TCP sequence number problem, in an SMP machine don't we get other randomnesses - e.g. which core completes something first, or who wins

RE: [Qemu-devel] [RFC] COLO HA Project proposal

2014-07-04 Thread Dong, Eddie
Let me clarify on this issue. COLO didn't ignore the TCP sequence number, but uses a new implementation to make the sequence number to be best effort identical between the primary VM (PVM) and secondary VM (SVM). Likely, VMM has to synchronize the emulation of randomization number

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Jan Kiszka
On 2014-07-04 07:43, Jan Kiszka wrote: All tests up to 307621765a are running fine here, but since a0e30e712d not much is completing successfully anymore: enabling apic paging enabled cr0 = 80010011 cr3 = 7fff000 cr4 = 20 PASS: test vmxon with FEATURE_CONTROL cleared PASS: test vmxon

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 11:33, Jan Kiszka ha scritto: The compiler is not aware of the fact that push/pop exists in this function and, thus, places the vmcs parameter on the stack without reserving the space. So the pushfq will overwrite the vmcs pointer and let the function fail. Is that just a

Re: [PATCH v6 19/21] KVM: ARM: vgic: add the GICv3 backend

2014-07-04 Thread Christoffer Dall
On Mon, Jun 30, 2014 at 04:01:48PM +0100, Marc Zyngier wrote: Introduce the support code for emulating a GICv2 on top of GICv3 hardware. Acked-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Marc Zyngier marc.zyng...@arm.com Yay, bisectability and called functions available and

Re: [PATCH 3/4] kvm, memory-hotplug: Update ept identity pagetable when it is migrated.

2014-07-04 Thread Gleb Natapov
On Fri, Jul 04, 2014 at 10:36:06AM +0800, Tang Chen wrote: Hi Gleb, On 07/03/2014 12:34 AM, Gleb Natapov wrote: On Wed, Jul 02, 2014 at 05:00:36PM +0800, Tang Chen wrote: ept identity pagetable is pinned in memory, and as a result it cannot be migrated/hot-removed. But actually it

Re: [PATCH v6 21/21] arm64: KVM: vgic: enable GICv2 emulation on top on GICv3 hardware

2014-07-04 Thread Christoffer Dall
On Mon, Jun 30, 2014 at 04:01:50PM +0100, Marc Zyngier wrote: Add the last missing bits that enable GICv2 emulation on top of GICv3 hardware. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- Acked-by: Christoffer Dall christoffer.d...@linaro.org -- To unsubscribe from this list: send

Re: [PATCH] arm64: KVM: export demux regids as KVM_REG_ARM64

2014-07-04 Thread Christoffer Dall
On Tue, Jul 01, 2014 at 04:56:50PM +0100, Marc Zyngier wrote: On 01/07/14 16:53, Alex Bennée wrote: I suspect this is a -ECUTPASTE fault from the initial implementation. If we don't declare the register ID to be KVM_REG_ARM64 the KVM_GET_ONE_REG implementation kvm_arm_get_reg() returns

Re: [PATCH 4/4] kvm, mem-hotplug: Update apic access page when it is migrated.

2014-07-04 Thread Gleb Natapov
On Fri, Jul 04, 2014 at 10:18:25AM +0800, Tang Chen wrote: Hi Gleb, Thanks for the advices. Please see below. On 07/03/2014 09:55 PM, Gleb Natapov wrote: .. @@ -575,6 +575,7 @@ struct kvm_arch { unsigned int tss_addr; struct page *apic_access_page; + bool

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Jan Kiszka
On 2014-07-04 11:38, Paolo Bonzini wrote: Il 04/07/2014 11:33, Jan Kiszka ha scritto: The compiler is not aware of the fact that push/pop exists in this function and, thus, places the vmcs parameter on the stack without reserving the space. So the pushfq will overwrite the vmcs pointer and

[PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct

2014-07-04 Thread Alexander Graf
When building KVM with a lot of vcores (NR_CPUS is big), we can potentially get out of the ld immediate range for dereferences inside that struct. Move the array to the end of our kvm_arch struct. This fixes compilation issues with NR_CPUS=2048 for me. Signed-off-by: Alexander Graf ag...@suse.de

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Jan Kiszka
On 2014-07-04 12:52, Jan Kiszka wrote: On 2014-07-04 11:38, Paolo Bonzini wrote: Il 04/07/2014 11:33, Jan Kiszka ha scritto: The compiler is not aware of the fact that push/pop exists in this function and, thus, places the vmcs parameter on the stack without reserving the space. So the

Re: [Qemu-devel] [RFC] COLO HA Project proposal

2014-07-04 Thread Andreas Färber
Am 01.07.2014 14:12, schrieb Dr. David Alan Gilbert: Are there any standard APIs for the heartbeet thing we can already tie into? Maybe the http://www.linux-ha.org/wiki/Heartbeat daemon? Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer

Re: [PATCH] KVM: nVMX: Fix IRQs inject to L2 which belong to L1 since race

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 13:07, Jan Kiszka ha scritto: On 2014-07-04 12:52, Jan Kiszka wrote: On 2014-07-04 11:38, Paolo Bonzini wrote: Il 04/07/2014 11:33, Jan Kiszka ha scritto: The compiler is not aware of the fact that push/pop exists in this function and, thus, places the vmcs parameter on the

[PATCH] Add -mno-red-zone to CFLAGS for x86-64

2014-07-04 Thread Jan Kiszka
This is required in order to use the stack in inline assembly (like pushf; pop reg) without clashing with the compiler's stack assignment. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Seen with old gcc 4.5.1. config/config-x86_64.mak | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] Add -mno-red-zone to CFLAGS for x86-64

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 13:46, Jan Kiszka ha scritto: This is required in order to use the stack in inline assembly (like pushf; pop reg) without clashing with the compiler's stack assignment. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Thanks, applying this. Paolo -- To unsubscribe from this

Re: [Qemu-devel] [RFC] COLO HA Project proposal

2014-07-04 Thread Dr. David Alan Gilbert
* Dong, Eddie (eddie.d...@intel.com) wrote: Let me clarify on this issue. COLO didn't ignore the TCP sequence number, but uses a new implementation to make the sequence number to be best effort identical between the primary VM (PVM) and secondary VM (SVM). Likely, VMM has to

[PATCH 0/3] KVM: Document MIPS specifics of KVM API

2014-07-04 Thread James Hogan
A few patches to improve the KVM API documentation, especially with respect to MIPS. James Hogan (3): KVM: Document KVM_SET_SIGNAL_MASK as universal KVM: Reformat KVM_SET_ONE_REG register documentation KVM: MIPS: Document MIPS specifics of KVM API. Documentation/virtual/kvm/api.txt | 287

[PATCH 2/3] KVM: Reformat KVM_SET_ONE_REG register documentation

2014-07-04 Thread James Hogan
Some of the MIPS registers that can be accessed with the KVM_{GET,SET}_ONE_REG interface have fairly long names, so widen the Register column of the table in the KVM_SET_ONE_REG documentation to allow them to fit. Tabs in the table are replaced with spaces at the same time for consistency.

[PATCH 3/3] KVM: MIPS: Document MIPS specifics of KVM API.

2014-07-04 Thread James Hogan
Document the MIPS specific parts of the KVM API, including: - The layout of the kvm_regs structure. - The interrupt number passed to KVM_INTERRUPT. - The registers supported by the KVM_{GET,SET}_ONE_REG interface, and the encoding of those register ids. - That KVM_INTERRUPT and

[PATCH 1/3] KVM: Document KVM_SET_SIGNAL_MASK as universal

2014-07-04 Thread James Hogan
KVM_SET_SIGNAL_MASK is implemented in generic code and isn't x86 specific, so document it as being applicable for all architectures. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gleb Natapov g...@kernel.org Cc: kvm@vger.kernel.org Cc: Randy Dunlap

qemu/kvm memory allocation

2014-07-04 Thread Alexei Fedotov
Hi engineers, Could anyone direct me where memory allocation [1] for a new virtual machine takes place in the code? I want to understand why the memory is initialized with zeroes when I call malloc in a virtual machine. [1] http://www.linux-kvm.org/page/Memory -- With best regards / с

[PATCH] arm64: KVM: allow export and import of generic timer regs

2014-07-04 Thread Alex Bennée
For correct guest suspend/resume behaviour we need to ensure we include the generic timer registers for 64 bit guests. As CONFIG_KVM_ARM_TIMER is always set for arm64 we don't need to worry about null implementations. However I have re-jigged the kvm_arm_timer_set/get_reg declarations to be in the

Re: [PATCH 0/3] KVM: Document MIPS specifics of KVM API

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 16:11, James Hogan ha scritto: A few patches to improve the KVM API documentation, especially with respect to MIPS. Applied (locally for now), thanks. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

RE: [Qemu-devel] [RFC] COLO HA Project proposal

2014-07-04 Thread Dong, Eddie
Thanks Dave: Whether the randomness value/branch/code path the PVM and SVM may have, It is only a performance issue. COLO never assumes the PVM and SVM has same internal Machine state. From correctness p.o.v, as if the PVM and SVM generate Identical response, we can view the SVM is

Re: qemu/kvm memory allocation

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 16:49, Alexei Fedotov ha scritto: Hi engineers, Could anyone direct me where memory allocation [1] for a new virtual machine takes place in the code? I want to understand why the memory is initialized with zeroes when I call malloc in a virtual machine. Nowhere in KVM. Memory

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-07-04 Thread Paolo Bonzini
Il 03/07/2014 17:04, Christoffer Dall ha scritto: Hmmm, I'm really not an expert in the 'established procedures' for what to put in config files etc., but here's my basic take: a) you wouldn't put a config option in Kconfig unless it's comething that's actually configurable or some generic

[PATCH for-2.1] target-i386: Add kvmclock-stable-bit feature bit name

2014-07-04 Thread Eduardo Habkost
KVM_FEATURE_CLOCKSOURCE_STABLE_BIT is enabled by default and supported by KVM. But not having a name defined makes QEMU treat it as an unknown and unmigratable feature flag (as any unknown feature may possibly require state to be migrated), and disable it by default on -cpu host. As a

Re: [PATCH v2] powerpc/kvm: support to handle sw breakpoint

2014-07-04 Thread Madhavan Srinivasan
On Friday 04 July 2014 12:18 PM, Alexander Graf wrote: On 04.07.14 06:34, Madhavan Srinivasan wrote: On Thursday 03 July 2014 05:21 PM, Alexander Graf wrote: On 01.07.14 10:41, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using

[PATCH 3.10 35/46] MIPS: KVM: Remove redundant NULL checks before kfree()

2014-07-04 Thread Greg Kroah-Hartman
3.10-stable review patch. If anyone has any objections, please let me know. -- From: James Hogan james.ho...@imgtec.com commit c6c0a6637f9da54f9472144d44f71cf847f92e20 upstream. The kfree() function already NULL checks the parameter so remove the redundant NULL checks before

Re: [PATCH v2] powerpc/kvm: support to handle sw breakpoint

2014-07-04 Thread Madhavan Srinivasan
On Thursday 03 July 2014 05:21 PM, Alexander Graf wrote: On 01.07.14 10:41, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via Emulation Assistance interrupt, where we check for

[PATCH 3.14 49/59] MIPS: KVM: Remove redundant NULL checks before kfree()

2014-07-04 Thread Greg Kroah-Hartman
3.14-stable review patch. If anyone has any objections, please let me know. -- From: James Hogan james.ho...@imgtec.com commit c6c0a6637f9da54f9472144d44f71cf847f92e20 upstream. The kfree() function already NULL checks the parameter so remove the redundant NULL checks before

[PATCH 3.15 56/66] MIPS: KVM: Remove redundant NULL checks before kfree()

2014-07-04 Thread Greg Kroah-Hartman
3.15-stable review patch. If anyone has any objections, please let me know. -- From: James Hogan james.ho...@imgtec.com commit c6c0a6637f9da54f9472144d44f71cf847f92e20 upstream. The kfree() function already NULL checks the parameter so remove the redundant NULL checks before

Re: [PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct

2014-07-04 Thread Paul Mackerras
On Fri, Jul 04, 2014 at 12:56:58PM +0200, Alexander Graf wrote: When building KVM with a lot of vcores (NR_CPUS is big), we can potentially get out of the ld immediate range for dereferences inside that struct. Move the array to the end of our kvm_arch struct. This fixes compilation issues

Re: [PATCH] ARM: convert all mov.* pc, reg to bx reg for ARMv6+ (part1)

2014-07-04 Thread Tomasz Figa
Hi Russell, On 01.07.2014 18:19, Russell King wrote: ARMv6 and greater introduced a new instruction (bx) which can be used to return from function calls. Recent CPUs perform better when the bx lr instruction is used rather than the mov pc, lr instruction, and this sequence is strongly

[RFC V2 5/7] VSOCK: Introduce vhost-vsock.ko

2014-07-04 Thread Asias He
From: Asias He as...@redhat.com VM sockets vhost transport implementation. This module runs in host kernel. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/vsock.c | 572 ++ drivers/vhost/vsock.h | 4 + 2 files changed, 576

[RFC V2 3/7] VSOCK: Introduce virtio-vsock-common.ko

2014-07-04 Thread Asias He
From: Asias He as...@redhat.com This module contains the common code and header files for the following virtio-vsock and virtio-vhost kernel modules. Signed-off-by: Asias He as...@redhat.com --- include/linux/virtio_vsock.h | 207 include/uapi/linux/virtio_ids.h

[RFC V2 1/7] VSOCK: Introduce vsock_find_unbound_socket and vsock_bind_dgram_generic

2014-07-04 Thread Asias He
From: Asias He as...@redhat.com Signed-off-by: Asias He as...@redhat.com --- include/net/af_vsock.h | 2 ++ net/vmw_vsock/af_vsock.c | 70 2 files changed, 72 insertions(+) diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index

[RFC V2 2/7] VSOCK: Add dgram_skb to vsock_sock

2014-07-04 Thread Asias He
From: Asias He as...@redhat.com Signed-off-by: Asias He as...@redhat.com --- include/net/af_vsock.h | 1 + net/vmw_vsock/af_vsock.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index 88f559a..ef668a0 100644 --- a/include/net/af_vsock.h

[RFC V2 4/7] VSOCK: Introduce virtio-vsock.ko

2014-07-04 Thread Asias He
From: Asias He as...@redhat.com VM sockets virtio transport implementation. This module runs in guest kernel. Signed-off-by: Asias He as...@redhat.com --- net/vmw_vsock/virtio_transport.c | 448 +++ 1 file changed, 448 insertions(+) create mode 100644

[RFC V2 7/7] Disable debug

2014-07-04 Thread Asias He
From: Asias He as...@redhat.com Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/Makefile | 1 - net/vmw_vsock/Makefile | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile index eccff51..6b012b9 100644 --- a/drivers/vhost/Makefile +++

[RFC V2 0/7] Introduce VM Sockets virtio transport

2014-07-04 Thread Asias He
Hello guys, This was V2 of the virtio-vsock back in last October. I do not have time to work on it since then. People are asking the latest status of virtio-vsock from time to time, so I'm sending out the code for people who are interested in. Feel free to grab the code and work on it if you

[RFC V2 6/7] VSOCK: Add Makefile and Kconfig

2014-07-04 Thread Asias He
From: Asias He as...@redhat.com Enable virtio-vsock and vhost-vsock. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/Kconfig | 4 drivers/vhost/Kconfig.vsock | 7 +++ drivers/vhost/Makefile | 5 + net/vmw_vsock/Kconfig | 18 ++

Re: [RFC V2 3/7] VSOCK: Introduce virtio-vsock-common.ko

2014-07-04 Thread Varka Bhadram
On Saturday 05 July 2014 08:53 AM, Asias He wrote: From: Asias He as...@redhat.com This module contains the common code and header files for the following virtio-vsock and virtio-vhost kernel modules. Signed-off-by: Asias He as...@redhat.com --- include/linux/virtio_vsock.h

Re: [RFC V2 4/7] VSOCK: Introduce virtio-vsock.ko

2014-07-04 Thread Varka Bhadram
On Saturday 05 July 2014 08:53 AM, Asias He wrote: From: Asias He as...@redhat.com VM sockets virtio transport implementation. This module runs in guest kernel. Signed-off-by: Asias He as...@redhat.com --- net/vmw_vsock/virtio_transport.c | 448 +++ 1

Re: [PATCH v2] powerpc/kvm: support to handle sw breakpoint

2014-07-04 Thread Alexander Graf
On 04.07.14 06:34, Madhavan Srinivasan wrote: On Thursday 03 July 2014 05:21 PM, Alexander Graf wrote: On 01.07.14 10:41, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via

Re: [PATCH 0/7] KVM: PPC: Book3S HV: Enable on little endian hosts

2014-07-04 Thread Alexander Graf
On 17.06.14 18:17, Alexander Graf wrote: So far we've been able to successfully run HV KVM on big endian hosts, but once you dive into little endian land things start to fall apart. This patch set enables HV KVM for little endian hosts. This should be the final piece left missing to get little

Re: [PATCH 3/6 v2] KVM: PPC: Book3E: Increase FPU laziness

2014-07-04 Thread Alexander Graf
On 03.07.14 17:46, mihai.cara...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:29 PM To: Caraman Mihai Claudiu-B02008; kvm-ppc@vger.kernel.org Cc: k...@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re:

Re: [PATCH 3/6 v2] KVM: PPC: Book3E: Increase FPU laziness

2014-07-04 Thread Alexander Graf
On 04.07.14 09:46, Alexander Graf wrote: On 03.07.14 17:46, mihai.cara...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:29 PM To: Caraman Mihai Claudiu-B02008; kvm-ppc@vger.kernel.org Cc: k...@vger.kernel.org;

Re: [PATCH 5/6 v2] KVM: PPC: Book3E: Add ONE_REG AltiVec support

2014-07-04 Thread Alexander Graf
On 03.07.14 18:11, mihai.cara...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:34 PM To: Caraman Mihai Claudiu-B02008; kvm-ppc@vger.kernel.org Cc: k...@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re:

Re: [PATCH 1/3] powerpc/kvm: Remove redundant save of SIER AND MMCR2

2014-07-04 Thread Alexander Graf
On 03.07.14 08:12, Joel Stanley wrote: These two registers are already saved in the block above. Aside from being unnecessary, by the time we get down to the second save location r8 no longer contains MMCR2, so we are clobbering the saved value with PMC5. Signed-off-by: Joel Stanley

Re: [RFC PATCH 2/4] KVM: PPC: Book3E: Handle LRAT error exception

2014-07-04 Thread Alexander Graf
On 03.07.14 16:45, Mihai Caraman wrote: Handle LRAT error exception with support for lrat mapping and invalidation. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/include/asm/kvm_ppc.h| 2 +

[PATCH v2] KVM: PPC: e500: Emulate power management control SPR

2014-07-04 Thread Mihai Caraman
For FSL e6500 core the kernel uses power management SPR register (PWRMGTCR0) to enable idle power down for cores and devices by setting up the idle count period at boot time. With the host already controlling the power management configuration the guest could simply benefit from it, so emulate

Re: [RFC PATCH 0/4] KVM Book3E support for HTW guests

2014-07-04 Thread Alexander Graf
On 03.07.14 16:45, Mihai Caraman wrote: KVM Book3E support for Hardware Page Tablewalk enabled guests. It looks reasonably straight forward to me, though I have to admit that I find the sind conditions pretty confusing. Scott, would you mind to have a look at this set too? :) Thanks a

Re: [PATCH v2] KVM: PPC: e500: Emulate power management control SPR

2014-07-04 Thread Alexander Graf
On 04.07.14 10:17, Mihai Caraman wrote: For FSL e6500 core the kernel uses power management SPR register (PWRMGTCR0) to enable idle power down for cores and devices by setting up the idle count period at boot time. With the host already controlling the power management configuration the guest

[PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct

2014-07-04 Thread Alexander Graf
When building KVM with a lot of vcores (NR_CPUS is big), we can potentially get out of the ld immediate range for dereferences inside that struct. Move the array to the end of our kvm_arch struct. This fixes compilation issues with NR_CPUS=2048 for me. Signed-off-by: Alexander Graf ag...@suse.de

Re: [PATCH v2] powerpc/kvm: support to handle sw breakpoint

2014-07-04 Thread Madhavan Srinivasan
On Friday 04 July 2014 12:18 PM, Alexander Graf wrote: On 04.07.14 06:34, Madhavan Srinivasan wrote: On Thursday 03 July 2014 05:21 PM, Alexander Graf wrote: On 01.07.14 10:41, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using

Re: [PATCH v2] powerpc/kvm: support to handle sw breakpoint

2014-07-04 Thread Madhavan Srinivasan
On Thursday 03 July 2014 05:21 PM, Alexander Graf wrote: On 01.07.14 10:41, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via Emulation Assistance interrupt, where we check for

Re: [PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct

2014-07-04 Thread Paul Mackerras
On Fri, Jul 04, 2014 at 12:56:58PM +0200, Alexander Graf wrote: When building KVM with a lot of vcores (NR_CPUS is big), we can potentially get out of the ld immediate range for dereferences inside that struct. Move the array to the end of our kvm_arch struct. This fixes compilation issues