qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Cc: kvm-devel@lists.sourceforge.net, glommer@gmail.com,
	macro@linux-mips.org, Glauber Costa <gcosta@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] ignore reads to the EOI register.
Date: Fri, 28 Mar 2008 00:39:51 +0100	[thread overview]
Message-ID: <20080327233951.GA5803@volta.aurel32.net> (raw)
In-Reply-To: <12065794361493-git-send-email-gcosta@redhat.com>

On Wed, Mar 26, 2008 at 09:57:16PM -0300, Glauber Costa wrote:
> They seem legal in real hardware, even though the EOI
> is a write-only register. By "legal" I mean they are completely
> ignored, but at least, don't cause any bits to be set at ESR.
> 
> Without this patch, some (very recent) linux git trees will fail
> to boot in i386.
> 
> This is generated from kvm-userspace, but should apply well to
> plain qemu too.
> 
> Signed-off-by: Glauber Costa <gcosta@redhat.com>
> ---
>  qemu/hw/apic.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
> index 92248dd..4102493 100644
> --- a/qemu/hw/apic.c
> +++ b/qemu/hw/apic.c
> @@ -615,6 +615,8 @@ static uint32_t apic_mem_readl(void *opaque, target_phys_addr_t addr)
>          /* ppr */
>          val = apic_get_ppr(s);
>          break;
> +    case 0x0b:
> +        break;

While I agree the guest should not care of the value (it should actually
not read it), wouldn't it be safer to return a default value (0 ?) 
instead of an initialized value?

-- 
  .''`.  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-03-27 23:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27  0:57 [Qemu-devel] [PATCH] ignore reads to the EOI register Glauber Costa
2008-03-27  8:18 ` [Qemu-devel] " Avi Kivity
2008-03-27 11:29   ` Maciej W. Rozycki
     [not found]     ` <87hcesjpqa.fsf@basil.nowhere.org>
2008-03-27 12:55       ` Avi Kivity
2008-03-27 13:36       ` Maciej W. Rozycki
2008-03-27 23:39 ` Aurelien Jarno [this message]
2008-03-28 12:59   ` [Qemu-devel] " 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=20080327233951.GA5803@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=gcosta@redhat.com \
    --cc=glommer@gmail.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=macro@linux-mips.org \
    --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).