public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wrong pa calculation fix (extboot)
@ 2008-04-14 10:38 Nguyen Anh Quynh
  2008-04-14 14:15 ` Anthony Liguori
  0 siblings, 1 reply; 5+ messages in thread
From: Nguyen Anh Quynh @ 2008-04-14 10:38 UTC (permalink / raw)
  To: kvm-devel, Anthony Liguori

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

This patch fixes a wrong calculation in the physical address of
extboot (qemu/hw/extboot.c). Looks like a typo.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: extboot.diff --]
[-- Type: text/x-diff; name=extboot.diff, Size: 553 bytes --]

diff --git a/qemu/hw/extboot.c b/qemu/hw/extboot.c
index 056fb59..0dac34c 100644
--- a/qemu/hw/extboot.c
+++ b/qemu/hw/extboot.c
@@ -81,7 +81,7 @@ static void extboot_write_cmd(void *opaque, uint32_t addr, uint32_t value)
     get_translated_chs(bs, &cylinders, &heads, &sectors);
 
     if (cmd->type == 0x01 || cmd->type == 0x02) {
-	target_ulong pa = cmd->xfer.segment * 16 + cmd->xfer.segment;
+	target_ulong pa = cmd->xfer.segment * 16 + cmd->xfer.offset;
 
 	/* possible buffer overflow */
 	if ((pa + cmd->xfer.nb_sectors * 512) > phys_ram_size)

[-- Attachment #3: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-14 15:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14 10:38 [PATCH] wrong pa calculation fix (extboot) Nguyen Anh Quynh
2008-04-14 14:15 ` Anthony Liguori
2008-04-14 14:47   ` Nguyen Anh Quynh
2008-04-14 15:08     ` Anthony Liguori
2008-04-14 15:13     ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox