From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNUPM-0007kX-EV for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:13:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNUPK-0007jL-Ad for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:13:07 -0400 Received: from [199.232.76.173] (port=51508 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNUPK-0007jE-2b for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:13:06 -0400 Received: from wr-out-0506.google.com ([64.233.184.226]:51088) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNUPJ-0003zj-Va for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:13:06 -0400 Received: by wr-out-0506.google.com with SMTP id c46so4041780wra.18 for ; Mon, 28 Jul 2008 08:13:05 -0700 (PDT) Message-ID: <488DE1E0.1070005@codemonkey.ws> Date: Mon, 28 Jul 2008 10:12:32 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <488DC8B2.1070009@redhat.com> <20080728141515.GJ3196@minantech.com> <488DD98D.5010907@codemonkey.ws> <488DDA93.4070702@redhat.com> <488DDF8B.8020103@codemonkey.ws> <488DE142.1060100@redhat.com> In-Reply-To: <488DE142.1060100@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/3]: Add UUID command-line option Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Lalancette Cc: Gleb Natapov , qemu-devel@nongnu.org Chris Lalancette wrote: > Anthony Liguori wrote: > >>> Hm, but that's basically what this does, in combination with the Bochs BIOS. >>> Once the Bochs BIOS reaches the rombios32 code, it makes the calls into the >>> device model VMware backdoor to get the UUID. Assuming this all succeeds, the >>> Bochs BIOS then plumbs it into the SMBIOS tables. >>> >>> >> Are there patches for the Bochs BIOS to do this? Why wouldn't it just >> use CMOS to get at the UUID? >> > > Yeah, there's a uuid_probe() function that's already been merged into the Bochs > BIOS, and subsequently to most of the downstream projects (including KVM). > > void uuid_probe(void) > { > #ifdef BX_QEMU > uint32_t eax, ebx, ecx, edx; > > // check if backdoor port exists > asm volatile ("outl %%eax, %%dx" > : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) > : "a" (0x564d5868), "c" (0xa), "d" (0x5658)); > if (ebx == 0x564d5868) { > uint32_t *uuid_ptr = (uint32_t *)bios_uuid; > // get uuid > asm volatile ("outl %%eax, %%dx" > : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) > : "a" (0x564d5868), "c" (0x13), "d" (0x5658)); > uuid_ptr[0] = eax; > uuid_ptr[1] = ebx; > uuid_ptr[2] = ecx; > uuid_ptr[3] = edx; > } else > #endif > { > // UUID not set > memset(bios_uuid, 0, 16); > } > } > That makes me sad that they merged that. What a terribly complicated way to do something that's relatively simple. Regards, Anthony Liguori > Later on in the rombios32 code the bios_uuid[] is used to build up the SMBIOS > tables. > > Chris Lalancette >