* [PATCH] kvm: svm: count all irq windows exit
@ 2012-03-08 10:07 Jason Wang
2012-03-08 10:40 ` Joerg Roedel
2012-03-09 22:25 ` Marcelo Tosatti
0 siblings, 2 replies; 3+ messages in thread
From: Jason Wang @ 2012-03-08 10:07 UTC (permalink / raw)
To: joerg.roedel, mtosatti, avi, kvm, linux-kernel
Also count the exits of fast-path.
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
arch/x86/kvm/svm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 53efd59..5ef7233 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -3235,6 +3235,7 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
svm_clear_vintr(svm);
svm->vmcb->control.int_ctl &= ~V_IRQ_MASK;
mark_dirty(svm->vmcb, VMCB_INTR);
+ ++svm->vcpu.stat.irq_window_exits;
/*
* If the user space waits to inject interrupts, exit as soon as
* possible
@@ -3242,7 +3243,6 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
if (!irqchip_in_kernel(svm->vcpu.kvm) &&
kvm_run->request_interrupt_window &&
!kvm_cpu_has_interrupt(&svm->vcpu)) {
- ++svm->vcpu.stat.irq_window_exits;
kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
return 0;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm: svm: count all irq windows exit
2012-03-08 10:07 [PATCH] kvm: svm: count all irq windows exit Jason Wang
@ 2012-03-08 10:40 ` Joerg Roedel
2012-03-09 22:25 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2012-03-08 10:40 UTC (permalink / raw)
To: Jason Wang; +Cc: mtosatti, avi, kvm, linux-kernel
On Thu, Mar 08, 2012 at 06:07:56PM +0800, Jason Wang wrote:
> Also count the exits of fast-path.
And align it with how it is counted in VMX.
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
> arch/x86/kvm/svm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 53efd59..5ef7233 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -3235,6 +3235,7 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
> svm_clear_vintr(svm);
> svm->vmcb->control.int_ctl &= ~V_IRQ_MASK;
> mark_dirty(svm->vmcb, VMCB_INTR);
> + ++svm->vcpu.stat.irq_window_exits;
> /*
> * If the user space waits to inject interrupts, exit as soon as
> * possible
> @@ -3242,7 +3243,6 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
> if (!irqchip_in_kernel(svm->vcpu.kvm) &&
> kvm_run->request_interrupt_window &&
> !kvm_cpu_has_interrupt(&svm->vcpu)) {
> - ++svm->vcpu.stat.irq_window_exits;
> kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
> return 0;
> }
>
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm: svm: count all irq windows exit
2012-03-08 10:07 [PATCH] kvm: svm: count all irq windows exit Jason Wang
2012-03-08 10:40 ` Joerg Roedel
@ 2012-03-09 22:25 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2012-03-09 22:25 UTC (permalink / raw)
To: Jason Wang; +Cc: joerg.roedel, avi, kvm, linux-kernel
On Thu, Mar 08, 2012 at 06:07:56PM +0800, Jason Wang wrote:
> Also count the exits of fast-path.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> arch/x86/kvm/svm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-09 22:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 10:07 [PATCH] kvm: svm: count all irq windows exit Jason Wang
2012-03-08 10:40 ` Joerg Roedel
2012-03-09 22:25 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox