* [PATCH] don't enter guest after SIPI was received by a CPU
@ 2008-09-22 11:28 Gleb Natapov
2008-09-22 16:50 ` Marcelo Tosatti
2008-09-23 8:57 ` Avi Kivity
0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2008-09-22 11:28 UTC (permalink / raw)
To: avi; +Cc: kvm
Don't enter guest after SIPI was issued.
CPU should process SIPI message before entering a guest mode again.
kvm_arch_vcpu_runnable() return true if CPU is in SIPI state, so
we can't call it here.
Signed-off-by: Gleb Natapov <gleb@qumranet.com>
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 61eddbe..612099f 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3239,7 +3239,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
r = 1;
while (r > 0) {
- if (kvm_arch_vcpu_runnable(vcpu))
+ if (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE)
r = vcpu_enter_guest(vcpu, kvm_run);
else {
up_read(&vcpu->kvm->slots_lock);
--
Gleb.
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] don't enter guest after SIPI was received by a CPU
2008-09-22 11:28 [PATCH] don't enter guest after SIPI was received by a CPU Gleb Natapov
@ 2008-09-22 16:50 ` Marcelo Tosatti
2008-09-23 8:57 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2008-09-22 16:50 UTC (permalink / raw)
To: Gleb Natapov; +Cc: avi, kvm
Looks good. Thanks Gleb.
On Mon, Sep 22, 2008 at 02:28:53PM +0300, Gleb Natapov wrote:
> Don't enter guest after SIPI was issued.
>
> CPU should process SIPI message before entering a guest mode again.
> kvm_arch_vcpu_runnable() return true if CPU is in SIPI state, so
> we can't call it here.
>
> Signed-off-by: Gleb Natapov <gleb@qumranet.com>
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 61eddbe..612099f 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3239,7 +3239,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
>
> r = 1;
> while (r > 0) {
> - if (kvm_arch_vcpu_runnable(vcpu))
> + if (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE)
> r = vcpu_enter_guest(vcpu, kvm_run);
> else {
> up_read(&vcpu->kvm->slots_lock);
> --
> Gleb.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] don't enter guest after SIPI was received by a CPU
2008-09-22 11:28 [PATCH] don't enter guest after SIPI was received by a CPU Gleb Natapov
2008-09-22 16:50 ` Marcelo Tosatti
@ 2008-09-23 8:57 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2008-09-23 8:57 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
Gleb Natapov wrote:
> Don't enter guest after SIPI was issued.
>
> CPU should process SIPI message before entering a guest mode again.
> kvm_arch_vcpu_runnable() return true if CPU is in SIPI state, so
> we can't call it here.
>
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-23 8:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 11:28 [PATCH] don't enter guest after SIPI was received by a CPU Gleb Natapov
2008-09-22 16:50 ` Marcelo Tosatti
2008-09-23 8:57 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox