From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZ9cC-0006fS-6p for qemu-devel@nongnu.org; Fri, 29 Aug 2008 15:26:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZ9cB-0006f8-Ri for qemu-devel@nongnu.org; Fri, 29 Aug 2008 15:26:35 -0400 Received: from [199.232.76.173] (port=60421 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZ9cB-0006ez-It for qemu-devel@nongnu.org; Fri, 29 Aug 2008 15:26:35 -0400 Received: from yx-out-1718.google.com ([74.125.44.158]:28780) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KZ9cB-0001HB-8D for qemu-devel@nongnu.org; Fri, 29 Aug 2008 15:26:35 -0400 Received: by yx-out-1718.google.com with SMTP id 3so507305yxi.82 for ; Fri, 29 Aug 2008 12:26:34 -0700 (PDT) Message-ID: Date: Fri, 29 Aug 2008 22:26:33 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH v3 1/6] Use IO port for qemu<->guest BIOS communication. In-Reply-To: <20080829190041.GA18301@minantech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080828165232.22851.77678.stgit@gleb-debian.qumranet.com.qumranet.com> <20080828165237.22851.1532.stgit@gleb-debian.qumranet.com.qumranet.com> <20080829190041.GA18301@minantech.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 8/29/08, Gleb Natapov wrote: > On Thu, Aug 28, 2008 at 09:04:11PM +0300, Blue Swirl wrote: > > On 8/28/08, Gleb Natapov wrote: > > > + fw_cfg_add(fw_cfg, FW_CFG_ID, (uint8_t *)&bios_cfg_id, > > > + sizeof(bios_cfg_id)); > > > > On second thought, this is in host byte order, which is not a good idea. > > > > Is there some function to convert from host byte order to target byte > order? Nothing generic like cpu_to_target. Because the only read access method is byte by byte, we could use little endian order and as a side benefit, the numbers would be automatically zero extended as needed.