All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>, Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH 2/2] deal with interrupt shadow state for emulated instruction
Date: Sun, 10 May 2009 16:09:48 +0300	[thread overview]
Message-ID: <4A06D21C.2060008@redhat.com> (raw)
In-Reply-To: <1241814187-5973-3-git-send-email-glommer@redhat.com>

Glauber Costa wrote:
> we currently unblock shadow interrupt state when we skip an instruction,
> but failing to do so when we actually emulate one. This blocks interrupts
> in key instruction blocks, in particular sti; hlt; sequences
>
> If the instruction emulated is an sti, we have to block shadow interrupts.
> The same goes for mov ss. pop ss also needs it, but we don't currently
> emulate it.
>
> Without this patch, I cannot boot gpxe option roms at vmx machines.
> This is described at https://bugzilla.redhat.com/show_bug.cgi?id=494469
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 3d8fcc5..c456aa5 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -2362,7 +2362,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
>  			u16 error_code,
>  			int emulation_type)
>  {
> -	int r;
> +	int r, shadow_mask;
>  	struct decode_cache *c;
>  
>  	kvm_clear_exception_queue(vcpu);
> @@ -2415,7 +2415,12 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
>  		return EMULATE_DONE;
>  	}
>  
> +	vcpu->arch.emulate_ctxt.interruptibility = 0;
>   

If the instruction is sti or mov ss, this is ouput only.  Otherwise, it 
is an input/output parameter.

To reduce confusion suggest moving this statement to x86_emulate_insn, 
so it can be an output-only parameter.


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


  reply	other threads:[~2009-05-10 13:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 20:23 [PATCH 0/2] Deal with shadow interrupts after emulated instructions Glauber Costa
2009-05-08 20:23 ` [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow Glauber Costa
2009-05-08 20:23   ` [PATCH 2/2] deal with interrupt shadow state for emulated instruction Glauber Costa
2009-05-10 13:09     ` Avi Kivity [this message]
2009-05-10 13:07   ` [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow Avi Kivity
2009-05-10  8:15 ` [PATCH 0/2] Deal with shadow interrupts after emulated instructions Gleb Natapov
  -- strict thread matches above, loose matches on Subject: below --
2009-05-12 15:13 Glauber Costa
2009-05-12 15:13 ` [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow Glauber Costa
2009-05-12 15:13   ` [PATCH 2/2] deal with interrupt shadow state for emulated instruction Glauber Costa
2009-05-12 18:14     ` Avi Kivity
2009-05-12 20:21 [PATCH 0/2] Deal with shadow interrupts after emulated instructions Glauber Costa
2009-05-12 20:21 ` [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow Glauber Costa
2009-05-12 20:21   ` [PATCH 2/2] deal with interrupt shadow state for emulated instruction Glauber Costa

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=4A06D21C.2060008@redhat.com \
    --to=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=glommer@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.