From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: [PATCH] hvmloader: Fix Parsing Etherboot Roms to Avoid Infinite Loop Date: Wed, 09 Apr 2008 15:37:37 +0900 Message-ID: <47FC6431.30903@ab.jp.nec.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060106070006020004020904" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: keir.fraser@eu.citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060106070006020004020904 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Hi, The new etherboot parsing, introduced in cs 17372, causes an infinite loop when the HVM guest has a vif device other than rtl8139. The attached patch will fix this problem. Regards, ----------------------- Yosuke Iwamatsu NEC Corporation --------------060106070006020004020904 Content-Type: all/allfiles; name="fix_parse_etherboot.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix_parse_etherboot.patch" hvmloader: Fix parsing Etherboot roms to avoid an infinite loop. Signed-off-by: Yosuke Iwamatsu diff -r 324f772239a7 tools/firmware/hvmloader/hvmloader.c --- a/tools/firmware/hvmloader/hvmloader.c Tue Apr 08 09:46:57 2008 +0100 +++ b/tools/firmware/hvmloader/hvmloader.c Wed Apr 09 15:31:21 2008 +0900 @@ -378,7 +378,10 @@ static int scan_etherboot_nic(void *copy strncmp(pcih->signature, "PCIR", 4) || (pcih->vendor_id != vendor_id) || (pcih->device_id != device_id) ) + { + rom = (char *)rom + rom->rom_size * 512; continue; + } /* Find the PnP expansion header (if any). */ pnph = ((rom->expansion_header_offset != 0) --------------060106070006020004020904 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060106070006020004020904--