Re: [v5][PATCH] KVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state

2013-11-18 Thread “tiejun.chen”
On 10/23/2013 09:26 AM, Tiejun Chen wrote: We enter with interrupts disabled in hardware, but we need to call RECONCILE_IRQ_STATE anyway to ensure that the software state is kept in sync instead of calling hard_irq_disable() directly. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- v5:

Re: [PATCH 0/4 v3] kvm: powerpc: use cache attributes from linux pte

2013-11-18 Thread Scott Wood
On Fri, 2013-11-15 at 11:01 +0530, Bharat Bhushan wrote: From: Bharat Bhushan bharat.bhus...@freescale.com v2-v3 - Returning pte pointer rather than pte as suggested by Scott - Also removed PAGE_SPLITTING as this need to be handled by caller v1-v2 - Removed _PAGE_BUSY loop as

Re: [PATCH v3] powerpc: kvm: optimize sc 1 as fast return

2013-11-18 Thread Alexander Graf
On 17.11.2013, at 20:09, Liu Ping Fan qemul...@gmail.com wrote: In some scene, e.g openstack CI, PR guest can trigger sc 1 frequently, this patch optimizes the path by directly delivering BOOK3S_INTERRUPT_SYSCALL to HV guest, so powernv can return to HV guest without heavy exit, i.e, no need

Re: Interface to enable in-kernel hcall handling

2013-11-18 Thread Alexander Graf
On 16.11.2013, at 03:59, Paul Mackerras pau...@samba.org wrote: I have been thinking about adding an interface to PPC KVM's PAPR emulation to allow userspace to control whether or not individual hypercalls or groups of hypercalls get handled in the kernel (vs. being passed up to userspace to

Re: [PATCH v4] powerpc: kvm: fix rare but potential deadlock scene

2013-11-18 Thread Alexander Graf
On 16.11.2013, at 01:55, Paul Mackerras pau...@samba.org wrote: On Fri, Nov 15, 2013 at 04:35:00PM +0800, Liu Ping Fan wrote: Since kvmppc_hv_find_lock_hpte() is called from both virtmode and realmode, so it can trigger the deadlock. Suppose the following scene: Two physical cpuM, cpuN,

Re: [PATCH 0/4] KVM: PPC: Book3S HV: Bug fixes for 3.13

2013-11-18 Thread Alexander Graf
On 16.11.2013, at 01:46, Paul Mackerras pau...@samba.org wrote: This series fixes some nasty bugs that have recently been found in HV KVM on PPC. The series is against the 'queue' branch of the KVM tree. I would like to see all of these go into 3.13. The first patch fixes a regression

Re: [v5][PATCH] KVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state

2013-11-18 Thread Scott Wood
On Mon, 2013-11-18 at 16:09 -0500, Alexander Graf wrote: On 18.11.2013, at 03:34, “tiejun.chen” tiejun.c...@windriver.com wrote: On 10/23/2013 09:26 AM, Tiejun Chen wrote: We enter with interrupts disabled in hardware, but we need to call RECONCILE_IRQ_STATE anyway to ensure that the

Re: Interface to enable in-kernel hcall handling

2013-11-18 Thread Paul Mackerras
On Mon, Nov 18, 2013 at 04:31:39PM -0500, Alexander Graf wrote: On 16.11.2013, at 03:59, Paul Mackerras pau...@samba.org wrote: I have been thinking about adding an interface to PPC KVM's PAPR emulation to allow userspace to control whether or not individual hypercalls or groups of

[PATCH RESEND v4] powerpc: kvm: fix rare but potential deadlock scene

2013-11-18 Thread Liu Ping Fan
Since kvmppc_hv_find_lock_hpte() is called from both virtmode and realmode, so it can trigger the deadlock. Suppose the following scene: Two physical cpuM, cpuN, two VM instances A, B, each VM has a group of vcpus. If on cpuM, vcpu_A_1 holds bitlock X (HPTE_V_HVLOCK), then is switched out, and

[PATCH v3] powerpc: kvm: optimize sc 1 as fast return

2013-11-18 Thread Liu Ping Fan
In some scene, e.g openstack CI, PR guest can trigger sc 1 frequently, this patch optimizes the path by directly delivering BOOK3S_INTERRUPT_SYSCALL to HV guest, so powernv can return to HV guest without heavy exit, i.e, no need to swap TLB, HTAB,.. etc Signed-off-by: Liu Ping Fan