qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] SMBIOS: Update Type 0 struct generator for mach


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH] SMBIOS: Update Type 0 struct generator for machines >= 2.1
Date: Tue, 13 May 2014 18:49:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/13/14 17:56, Gabriel L. Somlo wrote:
> On Tue, May 13, 2014 at 05:16:24PM +0200, Laszlo Ersek wrote:
>> The idea and the implementation in this patch seems fine to me (and
>> thanks for it!), except I object to the conversion of
>> "bios_characteristics" to uint64_t. I think that will break when you
>> emulate eg. an x86_64 target (ie. an SMBIOS-consuming, little endian
>> guest) on a big endian host (where you produce the SMBIOS payload).
>>
>> If you back out the changes to "bios_characteristics", I'll add my R-b.
> 
> Would it be acceptable if I used
> 
>       t->bios_characteristics = cpu_to_le64(0x08);
> 
> instead ? The smbios spec pdf does say "QWORD", after all :)

Fine by me.

> If that's a bad idea for some other reason I haven't figured
> out yet, I have no problem backing it out...
> 
> Thanks,
> --Gabriel
> 
> PS Now that you mention emulating x86_64 on a BE machine, I think
> there may actually be a few more places that require cpu_to_le*()
> wrappers...

Oops... Sorry! :)

BTW can you also consult the seabios list about hardcoding the "virtual
machine" bit? I don't think it should hurt, but early exposure is good.

Thank you
Laszlo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]