From: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
To: Ian.Jackson@eu.citrix.com
Cc: xen-devel@lists.xensource.com, weidong.han@intel.com
Subject: Re: Re: [PATCH][RFC] gfx_passthru: warning when vgabios rom has invalid checksum
Date: Wed, 24 Feb 2010 10:34:49 +0900 [thread overview]
Message-ID: <4B848239.2060603@jp.fujitsu.com> (raw)
In-Reply-To: <19332.6040.166229.889595@mariner.uk.xensource.com>
[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]
Hi,
> Weidong Han writes ("Re: [Xen-devel] Re: [PATCH][RFC] gfx_passthru: warning when vgabios rom has invalid checksum"):
>> Now I understand. Because your Q35 works with recalculated checksum, I
>> prefer to only add a warning message, and continue to load rom for gfx
>> passthru.
>
> Having read this thread I'm still a bit confused. The problem is that
> the VGA BIOS on the graphics card is broken and has a broken checksum,
> and the proposed workaround is to recalculate the checksum for the
> benefit of the guest ?
In the native environment, the VGABIOS, the expansion ROM on the
graphics card, is placed into the 0C0000h address space, and then
executed. Of course, the checksum of the ROM must be valid.
After this initialization, the system BIOS, the actual BIOS of the M/B,
can resize the expansion ROM code to reduce the amount of occupied
space. If the system BIOS resizes it, a new checksum must be calculated
and stored in the ROM image that is on the RAM.
So, normally, shadowed VGABIOS, that is placed in 0C0000h, is already
modified and its checksum must be recalculated.
Qemu-dm copies 0C0000h's contents of the dom0 to guest's 0C0000h.
Guest re-uses dom0's used-up VGABIOS.
The problem that I mentioned is about this recalculated checksum.
System BIOS must guarantee the checksum after the resizing, but,
some M/B does not.
However, after adjusting the checksum, guest seems to work, and
current qemu-dm does so. The buggy system BIOS might just forgets
to recalculate.
Should we check strictly here?
> Does this incorrectly checksummed BIOS work natively (ie without
> passthrough) and if so why is passthrough different ? Alternatively
> if it doesn't work native why are we trying to make it work with
> passthrough ?
>
> On another level, Weidong, are you suggesting you'd like to see Noboru
> produce a different patch which just produces a warning ?
I sent "just warning" patch on the first of this thread.
I resend it.
Noboru.
Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
[-- Attachment #2: vgabios-checksum-warn.patch --]
[-- Type: text/plain, Size: 464 bytes --]
diff --git a/hw/pass-through.c b/hw/pass-through.c
index ecb3d6f..fadd358 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -4262,7 +4262,10 @@ static int setup_vga_pt(void)
for ( c = (char*)bios; c < ((char*)bios + bios_size); c++ )
checksum += *c;
if ( checksum )
+ {
bios[bios_size - 1] -= checksum;
+ PT_LOG("vga bios checksum is adjusted!\n");
+ }
cpu_physical_memory_rw(0xc0000, bios, bios_size, 1);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-02-24 1:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 5:45 [PATCH][RFC] gfx_passthru: warning when vgabios rom has invalid checksum Noboru Iwamatsu
2010-02-22 7:21 ` Weidong Han
2010-02-22 8:00 ` Noboru Iwamatsu
2010-02-22 8:56 ` Weidong Han
2010-02-22 9:47 ` Noboru Iwamatsu
2010-02-22 10:08 ` Weidong Han
2010-02-23 17:59 ` Ian Jackson
2010-02-24 1:34 ` Noboru Iwamatsu [this message]
2010-02-24 2:50 ` Weidong Han
2010-02-25 4:54 ` Noboru Iwamatsu
2010-02-25 5:53 ` Weidong Han
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=4B848239.2060603@jp.fujitsu.com \
--to=n_iwamatsu@jp.fujitsu.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=weidong.han@intel.com \
--cc=xen-devel@lists.xensource.com \
/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.