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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19.11.2013, at 07:12, Liu Ping Fan <kernelfans@xxxxxxxxx> 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 to swap TLB, HTAB,.. etc
> 
> Signed-off-by: Liu Ping Fan <pingfank@xxxxxxxxxxxxxxxxxx>
> ---
> v3: add some document

This is v4 I think

> ---
> arch/powerpc/kvm/book3s_hv.c            | 10 ++++------
> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 19 ++++++++++++++++++-
> 2 files changed, 22 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 62a2b5a..1addb1a 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -628,12 +628,10 @@ static int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
> 		/* hcall - punt to userspace */
> 		int i;
> 
> -		if (vcpu->arch.shregs.msr & MSR_PR) {
> -			/* sc 1 from userspace - reflect to guest syscall */
> -			kvmppc_book3s_queue_irqprio(vcpu, BOOK3S_INTERRUPT_SYSCALL);
> -			r = RESUME_GUEST;
> -			break;
> -		}
> +		/* hypercall with MSR_PR has already been handled in rmode,
> +		 * and never reaches here.
> +		 */

It would've been nice to also mention the real mode hypercall handling, but I can just post a follow-up patch for that one.


Thanks, applied to kvm-ppc-queue.

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux