[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [PATCH][RFC] gfx_passthru: warning when vgabios rom has invalid checksum



Noboru Iwamatsu wrote:
Hi,

Generally, we should validate the checksum right.

Weidong, have you seen the checksum adjusting?

I only saw it in Q35+IGD.
You know my Q35 is buggy. If this is the only issue of my Q35,
2nd patch (validate and disable) is the best way, I think.

Or, is this a IGD specific issue?
If so, checksum adjusting should be a workaround for IGD pass-through.
I assume IGD's VGABIOS is included in the system BIOS and might be
expanded to the RAM in a different way from the PCI gfx card.
I also found the checksum is invalid on my Q45 platform, of course it works fine with recalculated value.
I attach 3rd patch:
When invalid checksum is detected, adjust it if igd_passthru is enabled. In other case, stop loading.

I tried this on my Q35+IGD, the checksum has been adjusted and worked.

Do you have any idea?
I still prefer to only add a warning message about it, and replace it with recalculated checksum for both IGD and discrete gfx. There might be some discrete gfx cards which also have invalid checksum, and it's likely that it still works with recalculated checksum in guest.

Regards,
Weidong
Regards,
Noboru.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@xxxxxxxxxxxxxx>

Noboru Iwamatsu wrote:
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.
Yes, I ack this one. Acked-by: Weidong Han <weidong.han@xxxxxxxxx>

Regards,
Weidong
Noboru.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@xxxxxxxxxxxxxx>






_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.