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

Aurelien Jarno wrote:
> 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?
> 
I don't think it would really make any difference, but is not opposed to 
this solution either.

      reply	other threads:[~2008-03-28 13:03 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 ` [Qemu-devel] " Aurelien Jarno
2008-03-28 12:59   ` Glauber Costa [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=47ECEBB4.2030905@redhat.com \
    --to=gcosta@redhat.com \
    --cc=aurelien@aurel32.net \
    --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).