RE: Some more basic questions..

2014-05-29 Thread Venkateswara Rao Nandigam
1. How can I ensure that memory for the a guest is available and reserved? In other words, I bring up a Linux VM which has 4G allocated, I want to make sure it has all the 4G available right away. I saw references to balloon driver, it seemed like that was more for dynamic memory exchange

[PATCH v2 3/3] KVM: PPC: Book3S HV: Add H_SET_MODE hcall handling

2014-05-29 Thread Michael Neuling
This adds support for the H_SET_MODE hcall. This hcall is a multiplexer that has several functions, some of which are called rarely, and some which are potentially called very frequently. Here we add support for the functions that set the debug registers CIABR (Completed Instruction Address

Re: [PATCH 1/3] KVM: PPC: Book3S: Controls for in-kernel PAPR hypercall handling

2014-05-29 Thread Alexander Graf
Am 29.05.2014 um 07:27 schrieb Paul Mackerras pau...@samba.org: On Wed, May 28, 2014 at 03:27:32PM +0200, Alexander Graf wrote: On 26.05.14 14:17, Paul Mackerras wrote: +6.8 KVM_CAP_PPC_ENABLE_HCALL + +Architectures: ppc +Parameters: args[0] is the PAPR hcall number +args[1]

Re: [RFC] Implement Batched (group) ticket lock

2014-05-29 Thread Peter Zijlstra
On Wed, May 28, 2014 at 05:46:39PM +0530, Raghavendra K T wrote: In virtualized environment there are mainly three problems related to spinlocks that affect performance. 1. LHP (lock holder preemption) 2. Lock Waiter Preemption (LWP) 3. Starvation/fairness Though ticketlocks solve the

Re: Some more basic questions..

2014-05-29 Thread Zhang Haoyu
Hello, Some more basic questions.. 1. How can I ensure that memory for the a guest is available and reserved? In other words, I bring up a Linux VM which has 4G allocated, I want to make sure it has all the 4G available right away. I saw references to balloon driver, it seemed like that

Re: [PATCH v2 3/3] KVM: PPC: Book3S HV: Add H_SET_MODE hcall handling

2014-05-29 Thread Alexander Graf
Am 29.05.2014 um 08:22 schrieb Michael Neuling mi...@neuling.org: This adds support for the H_SET_MODE hcall. This hcall is a multiplexer that has several functions, some of which are called rarely, and some which are potentially called very frequently. Here we add support for the

powerpc/pseries: Use new defines when calling h_set_mode

2014-05-29 Thread Michael Neuling
+/* Values for 2nd argument to H_SET_MODE */ +#define H_SET_MODE_RESOURCE_SET_CIABR1 +#define H_SET_MODE_RESOURCE_SET_DAWR2 +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE3 +#define H_SET_MODE_RESOURCE_LE4 Much better, but I think you want to make use of

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

2014-05-29 Thread Gleb Natapov
On Thu, May 29, 2014 at 01:40:08PM +0800, Gu Zheng wrote: There was a patch(from Chen Fan, last august) about releasing vcpu when closing vcpu fd http://www.spinics.net/lists/kvm/msg95701.html, but your comment said Attempt where made to make it possible to destroy individual vcpus

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-29 Thread Christoffer Dall
On Wed, May 28, 2014 at 11:42:00AM -0700, Mario Smarduch wrote: emslot dirty_bitmap during and after write protect. -Christoffer Regarding huge pud that's causing some design problems, should huge PUD pages be considered at all? I'm not sure if there is any support for this on

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-29 Thread Christoffer Dall
On Wed, May 28, 2014 at 10:55:54AM -0700, Mario Smarduch wrote: On 05/28/2014 01:09 AM, Christoffer Dall wrote: On Tue, May 27, 2014 at 06:30:23PM -0700, Mario Smarduch wrote: On 05/27/2014 01:19 PM, Christoffer Dall wrote: On Thu, May 15, 2014 at 11:27:31AM -0700, Mario Smarduch wrote:

Re: [PATCH v2 7/9] arm64: KVM: add trap handlers for AArch32 debug registers

2014-05-29 Thread Christoffer Dall
On Wed, May 28, 2014 at 05:00:48PM +0100, Marc Zyngier wrote: On 25/05/14 16:35, Christoffer Dall wrote: On Tue, May 20, 2014 at 05:55:43PM +0100, Marc Zyngier wrote: [...] + + /* DBGDSAR (32bit) */ + { Op1( 0), CRn( 2), CRm( 0), Op2( 0), trap_raz_wi }, + we don't handle access

Re: [PATCH v2 9/9] arm64: KVM: enable trapping of all debug registers

2014-05-29 Thread Christoffer Dall
On Wed, May 28, 2014 at 05:10:02PM +0100, Marc Zyngier wrote: On 25/05/14 16:36, Christoffer Dall wrote: On Tue, May 20, 2014 at 05:55:45PM +0100, Marc Zyngier wrote: Enable trapping of the debug registers, preventing the guests to mess with the host state (and allowing guests to use the

[PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite

2014-05-29 Thread James Hogan
Here are a range of MIPS KVM TE fixes, preferably for v3.16 but I know it's probably a bit late now. Changes are pretty minimal though since v1 so please consider. They can also be found on my kvm_mips_queue branch (and the kvm_mips_timer_v2 tag) here:

[PATCH v2 04/23] MIPS: KVM: Use tlb_write_random

2014-05-29 Thread James Hogan
When MIPS KVM needs to write a TLB entry for the guest it reads the CP0_Random register, uses it to generate the CP_Index, and writes the TLB entry using the TLBWI instruction (tlb_write_indexed()). However there's an instruction for that, TLBWR (tlb_write_random()) so use that instead. This

[PATCH v2 01/23] MIPS: KVM: Allocate at least 16KB for exception handlers

2014-05-29 Thread James Hogan
Each MIPS KVM guest has its own copy of the KVM exception vector. This contains the TLB refill exception handler at offset 0x000, the general exception handler at offset 0x180, and interrupt exception handlers at offset 0x200 in case Cause_IV=1. A common handler is copied to offset 0x2000 and

[PATCH v2 10/23] MIPS: KVM: Deliver guest interrupts after local_irq_disable()

2014-05-29 Thread James Hogan
When about to run the guest, deliver guest interrupts after disabling host interrupts. This should prevent an hrtimer interrupt from being handled after delivering guest interrupts, and therefore not delivering the guest timer interrupt until after the next guest exit. Signed-off-by: James Hogan

[PATCH v2 19/23] MIPS: KVM: Fix kvm_debug bit-rottage

2014-05-29 Thread James Hogan
Fix build errors when DEBUG is defined in arch/mips/kvm/. - The DEBUG code in kvm_mips_handle_tlbmod() was missing some variables. - The DEBUG code in kvm_mips_host_tlb_write() was conditional on an undefined debug variable. - The DEBUG code in kvm_mips_host_tlb_inv() accessed asid_map

[PATCH v2 20/23] MIPS: KVM: Remove ifdef DEBUG around kvm_debug

2014-05-29 Thread James Hogan
kvm_debug() uses pr_debug() which is already compiled out in the absence of a DEBUG define, so remove the unnecessary ifdef DEBUG lines around kvm_debug() calls which are littered around arch/mips/kvm/. As well as generally cleaning up, this prevents future bit-rot due to DEBUG not being commonly

[PATCH v2 07/23] MIPS: KVM: Add CP0_Count/Compare KVM register access

2014-05-29 Thread James Hogan
Implement KVM_{GET,SET}_ONE_REG ioctl based access to the guest CP0 Count and Compare registers. These registers are special in that writing to them has side effects (adjusting the time until the next timer interrupt) and reading of Count depends on the time. Therefore add a couple of callbacks so

[PATCH v2 17/23] MIPS: KVM: Make kvm_mips_comparecount_{func,wakeup} static

2014-05-29 Thread James Hogan
The kvm_mips_comparecount_func() and kvm_mips_comparecount_wakeup() functions are only used within arch/mips/kvm/kvm_mips.c, so make them static. 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:

[PATCH v2 18/23] MIPS: KVM: Whitespace fixes in kvm_mips_callbacks

2014-05-29 Thread James Hogan
Fix whitespace in struct kvm_mips_callbacks function pointers. 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: Ralf Baechle r...@linux-mips.org Cc: linux-m...@linux-mips.org Cc: Sanjay Lal

[PATCH v2 02/23] MIPS: Export local_flush_icache_range for KVM

2014-05-29 Thread James Hogan
Export the local_flush_icache_range function pointer for GPL modules so that it can be used by KVM for syncing the icache after binary translation of trapping instructions. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gleb Natapov g...@kernel.org Cc:

[PATCH v2 03/23] MIPS: KVM: Use local_flush_icache_range to fix RI on XBurst

2014-05-29 Thread James Hogan
MIPS KVM uses mips32_SyncICache to synchronise the icache with the dcache after dynamically modifying guest instructions or writing guest exception vector. However this uses rdhwr to get the SYNCI step, which causes a reserved instruction exception on Ingenic XBurst cores. It would seem to make

[PATCH v2 09/23] MIPS: KVM: Add CP0_HWREna KVM register access

2014-05-29 Thread James Hogan
Implement KVM_{GET,SET}_ONE_REG ioctl based access to the guest CP0 HWREna register. This is so that userland can save and restore its value so that RDHWR instructions don't have to be emulated by the guest. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Paolo Bonzini pbonz...@redhat.com

[PATCH v2 16/23] MIPS: KVM: Add count frequency KVM register

2014-05-29 Thread James Hogan
Expose the KVM guest CP0_Count frequency to userland via a new KVM_REG_MIPS_COUNT_HZ register accessible with the KVM_{GET,SET}_ONE_REG ioctls. When the frequency is altered the bias is adjusted such that the guest CP0_Count doesn't jump discontinuously or lose any timer interrupts.

[PATCH v2 23/23] MIPS: KVM: Remove redundant semicolon

2014-05-29 Thread James Hogan
Remove extra semicolon in kvm_arch_vcpu_dump_regs(). 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: Ralf Baechle r...@linux-mips.org Cc: linux-m...@linux-mips.org Cc: Sanjay Lal

[PATCH v2 11/23] MIPS: KVM: Fix timer race modifying guest CP0_Cause

2014-05-29 Thread James Hogan
The hrtimer callback for guest timer timeouts sets the guest's CP0_Cause.TI bit to indicate to the guest that a timer interrupt is pending, however there is no mutual exclusion implemented to prevent this occurring while the guest's CP0_Cause register is being read-modify-written elsewhere. When

[PATCH v2 05/23] MIPS: KVM: Add CP0_EPC KVM register access

2014-05-29 Thread James Hogan
Contrary to the comment, the guest CP0_EPC register cannot be set via kvm_regs, since it is distinct from the guest PC. Add the EPC register to the KVM_{GET,SET}_ONE_REG ioctl interface. Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gleb Natapov

[PATCH v2 14/23] MIPS: KVM: Override guest kernel timer frequency directly

2014-05-29 Thread James Hogan
The KVM_HOST_FREQ Kconfig symbol was used by KVM guest kernels to override the timer frequency calculation to a value based on the host frequency. Now that the KVM timer emulation is implemented independent of the host timer frequency and defaults to 100MHz, adjust the working of

[PATCH v2 06/23] MIPS: KVM: Move KVM_{GET,SET}_ONE_REG definitions into kvm_host.h

2014-05-29 Thread James Hogan
Move the KVM_{GET,SET}_ONE_REG MIPS register id definitions out of kvm_mips.c to kvm_host.h so that they can be shared between multiple source files. This allows register access to be indirected depending on the underlying implementation (trap emulate or VZ). Signed-off-by: James Hogan

[PATCH v2 21/23] MIPS: KVM: Quieten kvm_info() logging

2014-05-29 Thread James Hogan
The logging from MIPS KVM is fairly noisy with kvm_info() in places where it shouldn't be, such as on VM creation and migration to a different CPU. Replace these kvm_info() calls with kvm_debug(). Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gleb

[PATCH v2 08/23] MIPS: KVM: Add CP0_UserLocal KVM register access

2014-05-29 Thread James Hogan
Implement KVM_{GET,SET}_ONE_REG ioctl based access to the guest CP0 UserLocal register. This is so that userland can save and restore its value. 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:

[PATCH v2 22/23] MIPS: KVM: Remove redundant NULL checks before kfree()

2014-05-29 Thread James Hogan
The kfree() function already NULL checks the parameter so remove the redundant NULL checks before kfree() calls in arch/mips/kvm/. 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: Ralf Baechle

[PATCH v2 13/23] MIPS: KVM: Rewrite count/compare timer emulation

2014-05-29 Thread James Hogan
Previously the emulation of the CPU timer was just enough to get a Linux guest running but some shortcuts were taken: - The guest timer interrupt was hard coded to always happen every 10 ms rather than being timed to when CP0_Count would match CP0_Compare. - The guest's CP0_Count register was

[PATCH v2 12/23] MIPS: KVM: Migrate hrtimer to follow VCPU

2014-05-29 Thread James Hogan
When a VCPU is scheduled in on a different CPU, refresh the hrtimer used for emulating count/compare so that it gets migrated to the same CPU. This should prevent a timer interrupt occurring on a different CPU to where the guest it relates to is running, which would cause the guest timer

[PATCH v2 15/23] MIPS: KVM: Add master disable count interface

2014-05-29 Thread James Hogan
Expose two new virtual registers to userland via the KVM_{GET,SET}_ONE_REG ioctls. KVM_REG_MIPS_COUNT_CTL is for timer configuration fields and just contains a master disable count bit. This can be used by userland to freeze the timer in order to read a consistent state from the timer count value

Re: [RFC] Implement Batched (group) ticket lock

2014-05-29 Thread Raghavendra K T
On 05/29/2014 03:25 AM, Rik van Riel wrote: On 05/28/2014 08:16 AM, Raghavendra K T wrote: This patch looks very promising. Thank you Rik. [...] - My kernbench/ebizzy test on baremetal (32 cpu +ht sandybridge) did not seem to show the impact of extra cmpxchg. but there should be effect

Re: [RFC] Implement Batched (group) ticket lock

2014-05-29 Thread Raghavendra K T
On 05/29/2014 12:16 PM, Peter Zijlstra wrote: On Wed, May 28, 2014 at 05:46:39PM +0530, Raghavendra K T wrote: In virtualized environment there are mainly three problems related to spinlocks that affect performance. 1. LHP (lock holder preemption) 2. Lock Waiter Preemption (LWP) 3.

Re: [PATCH v2 11/23] MIPS: KVM: Fix timer race modifying guest CP0_Cause

2014-05-29 Thread Paolo Bonzini
Il 29/05/2014 11:16, James Hogan ha scritto: Currently this is the only asynchronous modification of guest registers, therefore it is fixed by adjusting the implementations of the kvm_set_c0_guest_cause(), kvm_clear_c0_guest_cause(), and kvm_change_c0_guest_cause() macros which are used for

Re: [PATCH v2 11/23] MIPS: KVM: Fix timer race modifying guest CP0_Cause

2014-05-29 Thread James Hogan
Hi Paolo, On 29/05/14 11:36, Paolo Bonzini wrote: Il 29/05/2014 11:16, James Hogan ha scritto: Currently this is the only asynchronous modification of guest registers, therefore it is fixed by adjusting the implementations of the kvm_set_c0_guest_cause(), kvm_clear_c0_guest_cause(), and

Re: [PATCH v2 11/23] MIPS: KVM: Fix timer race modifying guest CP0_Cause

2014-05-29 Thread Paolo Bonzini
Il 29/05/2014 12:55, James Hogan ha scritto: Shouldn't you have a loop too around the ll/sc? Yes, it has a do {} while () look around the inline asm, although I didn't mention it in the commit message. It's modelled on arch/mips/include/asm/bitops.h. Ugh, sorry---I misread that as a

Re: Question about MSR_K7_HWCR in kvm_set_msr_common

2014-05-29 Thread Jidong Xiao
On Wed, May 28, 2014 at 4:14 AM, Jidong Xiao jidong.x...@gmail.com wrote: Hi, In kvm_set_msr_common(), I see that the follow piece of code will handle the write operation to the register MSR_K7_HWCR. case MSR_K7_HWCR: data = ~(u64)0x40; /* ignore flush filter disable */

Re: [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite

2014-05-29 Thread James Hogan
On 29/05/14 11:36, Paolo Bonzini wrote: Il 29/05/2014 11:16, James Hogan ha scritto: Here are a range of MIPS KVM TE fixes, preferably for v3.16 but I know it's probably a bit late now. Changes are pretty minimal though since v1 so please consider. They can also be found on my kvm_mips_queue

Re: [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite

2014-05-29 Thread Paolo Bonzini
Il 29/05/2014 16:41, James Hogan ha scritto: + +/* If VM clock stopped then state was already saved when it was stopped */ +if (runstate_is_running()) { +ret = kvm_mips_save_count(cs); +if (ret 0) { +return ret; +} +} + You're expecting that

Re: [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite

2014-05-29 Thread James Hogan
Hi Paolo, On 29/05/14 16:23, Paolo Bonzini wrote: Il 29/05/2014 16:41, James Hogan ha scritto: + +/* If VM clock stopped then state was already saved when it was stopped */ +if (runstate_is_running()) { +ret = kvm_mips_save_count(cs); +if (ret 0) { +

Re: [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite

2014-05-29 Thread Paolo Bonzini
Il 29/05/2014 18:27, James Hogan ha scritto: (although as it stands CP0_Count never represents the offset from the VM clock for KVM like it does with a running Count with TCG, so the vmstate is technically incompatible between TCG/KVM). That can be fixed in cpu_save/cpu_load hooks, like

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-29 Thread Mario Smarduch
So this needs to be cleared up given this is key to logging. Cases this code handles during migration - 1. huge page fault described above - write protect fault so you breakup the huge page. 2. All other faults - first time access, pte write protect you again wind up in

Re: Divide error in kvm_unlock_kick()

2014-05-29 Thread Chris Webb
Chris Webb ch...@arachsys.com wrote: My CPU flags inside the crashing guest look like this: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb lm rep_good nopl extd_apicid pni pclmulqdq ssse3 fma cx16

Re: Divide error in kvm_unlock_kick()

2014-05-29 Thread Paolo Bonzini
Il 29/05/2014 19:45, Chris Webb ha scritto: Chris Webb ch...@arachsys.com wrote: My CPU flags inside the crashing guest look like this: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb lm rep_good nopl

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-29 Thread Christoffer Dall
On Thu, May 29, 2014 at 10:08:07AM -0700, Mario Smarduch wrote: So this needs to be cleared up given this is key to logging. Cases this code handles during migration - 1. huge page fault described above - write protect fault so you breakup the huge page. 2. All other faults - first

Re: Divide error in kvm_unlock_kick()

2014-05-29 Thread Chris Webb
Paolo Bonzini pbonz...@redhat.com wrote: Il 29/05/2014 19:45, Chris Webb ha scritto: Chris Webb ch...@arachsys.com wrote: My CPU flags inside the crashing guest look like this: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-29 Thread Mario Smarduch
On 05/29/2014 10:57 AM, Christoffer Dall wrote: On Thu, May 29, 2014 at 10:08:07AM -0700, Mario Smarduch wrote: So this needs to be cleared up given this is key to logging. Cases this code handles during migration - 1. huge page fault described above - write protect fault so you breakup

[PATCH] MIPS: KVM: remove the stale memory alias support function unalias_gfn

2014-05-29 Thread Deng-Cheng Zhu
From: Deng-Cheng Zhu dengcheng@imgtec.com The memory alias support has been removed since a1f4d39500 (KVM: Remove memory alias support). So remove unalias_gfn from the MIPS port. Reviewed-by: James Hogan james.ho...@imgtec.com Signed-off-by: Deng-Cheng Zhu dengcheng@imgtec.com ---

Re: [PATCH] MIPS: KVM: remove the stale memory alias support function unalias_gfn

2014-05-29 Thread Paolo Bonzini
Il 29/05/2014 21:12, Deng-Cheng Zhu ha scritto: kvm_mips.c | 5 - 1 file changed Applied, thanks. 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-info.html

Re: [RFC PATCH v5_v2 01/11] driver core: platform: add device binding path 'driver_override'

2014-05-29 Thread Alex Williamson
On Tue, 2014-05-20 at 19:25 -0500, Kim Phillips wrote: From: Kim Phillips kim.phill...@freescale.com Needed by platform device drivers, such as the vfio-platform driver later in series, in order to bypass the existing OF, ACPI, id_table and name string matches, and successfully be able to be

Re: [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite

2014-05-29 Thread James Hogan
Hi Paolo, On 29/05/14 18:03, Paolo Bonzini wrote: Also, perhaps this bit in kvm_mips_restore_count is unnecessary, and so is env-count_save_time in general: +/* find time to resume the saved timer at */ +now = get_clock(); +count_resume = now - (cpu_get_clock_at(now)

Re: [RFC PATCH v5_v2 01/11] driver core: platform: add device binding path 'driver_override'

2014-05-29 Thread Alexander Graf
On 29.05.14 21:43, Alex Williamson wrote: On Tue, 2014-05-20 at 19:25 -0500, Kim Phillips wrote: From: Kim Phillips kim.phill...@freescale.com Needed by platform device drivers, such as the vfio-platform driver later in series, in order to bypass the existing OF, ACPI, id_table and name

Re: powerpc/pseries: Use new defines when calling h_set_mode

2014-05-29 Thread Alexander Graf
On 29.05.14 09:45, Michael Neuling wrote: +/* Values for 2nd argument to H_SET_MODE */ +#define H_SET_MODE_RESOURCE_SET_CIABR1 +#define H_SET_MODE_RESOURCE_SET_DAWR2 +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE3 +#define H_SET_MODE_RESOURCE_LE4 Much better, but

Re: powerpc/pseries: Use new defines when calling h_set_mode

2014-05-29 Thread Benjamin Herrenschmidt
On Thu, 2014-05-29 at 23:27 +0200, Alexander Graf wrote: On 29.05.14 09:45, Michael Neuling wrote: +/* Values for 2nd argument to H_SET_MODE */ +#define H_SET_MODE_RESOURCE_SET_CIABR1 +#define H_SET_MODE_RESOURCE_SET_DAWR2 +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE3

Get back to me

2014-05-29 Thread Kong Hui
I am a bank director from Hong Kong, I want you to be my partner in a business project of mutual benefit. Get back to me if interested. Thank you, Kong Hui. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [RFC] Implement Batched (group) ticket lock

2014-05-29 Thread Waiman Long
On 05/28/2014 08:16 AM, Raghavendra K T wrote: TODO: - we need an intelligent way to nullify the effect of batching for baremetal (because extra cmpxchg is not required). To do this, you will need to have 2 slightly different algorithms depending on the paravirt_ticketlocks_enabled jump

[PATCH 1/4] perf: Add PEBS virtualization enable for Silvermont

2014-05-29 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com To avoid various problems (like leaking counters) the PEBS virtualization needs white listing per CPU model. Add state to the x86_pmu for this and enable it for Silvermont. Silvermont is currently the only CPU where it is safe to virtualize PEBS, as it

Implement PEBS virtualization for Silvermont

2014-05-29 Thread Andi Kleen
PEBS is very useful (e.g. enabling the more cycles:pp event or memory profiling) Unfortunately it didn't work in virtualization, which is becoming more and more common. This patch kit implements simple PEBS virtualization for KVM on Silvermont CPUs. Silvermont does not have the leak problems that

[PATCH 4/4] kvm: Implement PEBS virtualization

2014-05-29 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com PEBS (Precise Event Bases Sampling) profiling is very powerful, allowing improved sampling precision and much additional information, like address or TSX abort profiling. cycles:p and :pp uses PEBS. This patch enables PEBS profiling in KVM guests. PEBS

[PATCH 2/4] perf: Allow guest PEBS for KVM owned counters

2014-05-29 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com Currently perf unconditionally disables PEBS for guest. Now that we have the infrastructure in place to handle it we can allow it for KVM owned guest events. For the perf needs to know that a event is owned by a guest. Add a new state bit in the perf_event

[PATCH 3/4] perf: Handle guest PEBS events with a fake event

2014-05-29 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com With PEBS virtualization the PEBS record gets delivered to the guest, but the host sees the PMI. This would normally result in a spurious PEBS PMI that is ignored. But we need to inject the PMI into the guest, so that the guest PMI handler can handle the PEBS

NOTICE

2014-05-29 Thread SYSTEM ADMINISTRATION
Attention Email User, Your three (3) incoming mails were placed on pending status due to the recent upgrade in our database, Admin Help desk Support require you to immediately update your account information by following the reference link below to prevent your Email address not to be

Re: Some more basic questions..

2014-05-29 Thread Marcus White
Thanks Zhang and Venkateshwara, some more follow up questions below:) 1. Does -realtime mlock=on allocate all the memory upfront and keep it for the VM, or does it just make sure the memory that is allocated within the guest is not swapped out under host memory pressure? 2. I notice on a 4G

[PATCH v2 3/3] KVM: PPC: Book3S HV: Add H_SET_MODE hcall handling

2014-05-29 Thread Michael Neuling
This adds support for the H_SET_MODE hcall. This hcall is a multiplexer that has several functions, some of which are called rarely, and some which are potentially called very frequently. Here we add support for the functions that set the debug registers CIABR (Completed Instruction Address

Re: [PATCH v2 3/3] KVM: PPC: Book3S HV: Add H_SET_MODE hcall handling

2014-05-29 Thread Alexander Graf
Am 29.05.2014 um 08:22 schrieb Michael Neuling mi...@neuling.org: This adds support for the H_SET_MODE hcall. This hcall is a multiplexer that has several functions, some of which are called rarely, and some which are potentially called very frequently. Here we add support for the

powerpc/pseries: Use new defines when calling h_set_mode

2014-05-29 Thread Michael Neuling
+/* Values for 2nd argument to H_SET_MODE */ +#define H_SET_MODE_RESOURCE_SET_CIABR1 +#define H_SET_MODE_RESOURCE_SET_DAWR2 +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE3 +#define H_SET_MODE_RESOURCE_LE4 Much better, but I think you want to make use of

Re: powerpc/pseries: Use new defines when calling h_set_mode

2014-05-29 Thread Benjamin Herrenschmidt
On Thu, 2014-05-29 at 23:27 +0200, Alexander Graf wrote: On 29.05.14 09:45, Michael Neuling wrote: +/* Values for 2nd argument to H_SET_MODE */ +#define H_SET_MODE_RESOURCE_SET_CIABR1 +#define H_SET_MODE_RESOURCE_SET_DAWR2 +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE3