From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [Qemu-devel] [PATCH] ignore reads to the EOI register. Date: Fri, 28 Mar 2008 09:59:32 -0300 Message-ID: <47ECEBB4.2030905@redhat.com> References: <12065794361493-git-send-email-gcosta@redhat.com> <20080327233951.GA5803@volta.aurel32.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org, macro@linux-mips.org To: Aurelien Jarno Return-path: In-Reply-To: <20080327233951.GA5803@volta.aurel32.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org 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 >> --- >> 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. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace