From: Laurent Vivier <Laurent.Vivier@bull.net>
To: Avi Kivity <avi@qumranet.com>
Cc: KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: VMX: Leave atomic context while emulating real mode
Date: Wed, 10 Sep 2008 16:12:09 +0200 [thread overview]
Message-ID: <1221055929.4232.11.camel@frecb07144> (raw)
In-Reply-To: <20080820140100.07333250A43@il.qumranet.com>
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
next parent reply other threads:[~2008-09-10 14:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080820140100.07333250A43@il.qumranet.com>
2008-09-10 14:12 ` Laurent Vivier [this message]
2008-09-10 14:57 ` [PATCH] KVM: VMX: Leave atomic context while emulating real mode Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1221055929.4232.11.camel@frecb07144 \
--to=laurent.vivier@bull.net \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox