public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] KVM: VMX: Leave atomic context while emulating real mode
       [not found] <20080820140100.07333250A43@il.qumranet.com>
@ 2008-09-10 14:12 ` Laurent Vivier
  2008-09-10 14:57   ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2008-09-10 14:12 UTC (permalink / raw)
  To: Avi Kivity; +Cc: KVM

Le mercredi 20 août 2008 à 14:01 +0000, Avi Kivity a écrit :
> From: Avi Kivity <avi@qumranet.com>
> 
> Emulation requires access to user memory, and potentially schedules.
> 
> Signed-off-by: Avi Kivity <avi@qumranet.com>
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index d5d25a2..81c121c 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -2911,6 +2911,9 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
>  	struct vcpu_vmx *vmx = to_vmx(vcpu);
>  	int err;
>  
> +	preempt_enable();
> +	local_irq_enable();
> +
>  	while (!guest_state_valid(vcpu)) {
>  		err = emulate_instruction(vcpu, kvm_run, 0, 0, 0);
>  
> @@ -2932,6 +2935,9 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
>  			schedule();
>  	}
>  
> +	local_irq_disable();
> +	preempt_enable();

should be a preempt_disable() ?

>  	/* Guest state should be valid now, no more emulation should be needed */
>  	vmx->emulation_required = 0;
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
-- 
----------------- Laurent.Vivier@bull.net  ------------------
  "La perfection est atteinte non quand il ne reste rien à
ajouter mais quand il ne reste rien à enlever." Saint Exupéry


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: VMX: Leave atomic context while emulating real mode
  2008-09-10 14:12 ` [PATCH] KVM: VMX: Leave atomic context while emulating real mode Laurent Vivier
@ 2008-09-10 14:57   ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-09-10 14:57 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: KVM

Laurent Vivier wrote:
>>  	int err;
>>  
>> +	preempt_enable();
>> +	local_irq_enable();
>> +
>>  	while (!guest_state_valid(vcpu)) {
>>  		err = emulate_instruction(vcpu, kvm_run, 0, 0, 0);
>>  
>> @@ -2932,6 +2935,9 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
>>  			schedule();
>>  	}
>>  
>> +	local_irq_disable();
>> +	preempt_enable();
>>     
>
> should be a preempt_disable() ?
>   

Yes.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-10 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080820140100.07333250A43@il.qumranet.com>
2008-09-10 14:12 ` [PATCH] KVM: VMX: Leave atomic context while emulating real mode Laurent Vivier
2008-09-10 14: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