qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] SVM: acknowledge interrupt only after it is taken
Date: Sat, 13 Dec 2008 13:33:07 +0100	[thread overview]
Message-ID: <20081213123307.GF17729@volta.aurel32.net> (raw)
In-Reply-To: <1229100521-12665-1-git-send-email-agraf@suse.de>

On Fri, Dec 12, 2008 at 05:48:41PM +0100, Alexander Graf wrote:
> SVM specifies that the V_IRQ mask is only to be removed, if the
> interrupt that is to be delivered actually is delivered.
> 
> As of the SVM rewrite, this mask is always unmasked when the main cpu
> loop is processed, leaving a corner case where calling the interrupt
> handler causes a #PF. In that case (booting Linux / starting gfxboot)
> the current implementation tells the VMM the interrupt is taken, even
> though it is not.
> 
> This patch modifies the VIRQ unmasking to occur after do_interrupt,
> making gfxboot work again.

Thanks, applied.

> ---
>  cpu-exec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/cpu-exec.c b/cpu-exec.c
> index 9a35a59..981ba86 100644
> --- a/cpu-exec.c
> +++ b/cpu-exec.c
> @@ -401,11 +401,11 @@ int cpu_exec(CPUState *env1)
>                              int intno;
>                              /* FIXME: this should respect TPR */
>                              svm_check_intercept(SVM_EXIT_VINTR);
> -                            env->interrupt_request &= ~CPU_INTERRUPT_VIRQ;
>                              intno = ldl_phys(env->vm_vmcb + offsetof(struct vmcb, control.int_vector));
>                              if (loglevel & CPU_LOG_TB_IN_ASM)
>                                  fprintf(logfile, "Servicing virtual hardware INT=0x%02x\n", intno);
>                              do_interrupt(intno, 0, 0, 0, 1);
> +                            env->interrupt_request &= ~CPU_INTERRUPT_VIRQ;
>                              next_tb = 0;
>  #endif
>                          }
> -- 
> 1.5.6
> 
> 
> 
> 

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

      parent reply	other threads:[~2008-12-13 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12 16:48 [Qemu-devel] [PATCH] SVM: acknowledge interrupt only after it is taken Alexander Graf
2008-12-12 16:54 ` Alexander Graf
2008-12-13 12:33 ` Aurelien Jarno [this message]

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=20081213123307.GF17729@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).