From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmLMn-000482-Mn for qemu-devel@nongnu.org; Mon, 19 May 2014 07:04:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmLEl-0002px-Pl for qemu-devel@nongnu.org; Mon, 19 May 2014 06:56:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmLEl-0002pq-Do for qemu-devel@nongnu.org; Mon, 19 May 2014 06:56:07 -0400 Date: Mon, 19 May 2014 13:54:57 +0300 From: "Michael S. Tsirkin" Message-ID: <20140519105457.GD29674@redhat.com> References: <1400015769-717-1-git-send-email-somlo@cmu.edu> <1400015769-717-4-git-send-email-somlo@cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400015769-717-4-git-send-email-somlo@cmu.edu> Subject: Re: [Qemu-devel] [PATCH v3 3/3] SMBIOS: Fix type 17 v2.7+ field sizes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gabriel L. Somlo" Cc: pbonzini@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On Tue, May 13, 2014 at 05:16:09PM -0400, Gabriel L. Somlo wrote: > Fields for configured_clock_speed and various voltage values > introduced in v2.7 and v2.8 should be "word", i.e. 16 bits. > > Reported-by: Laszlo Ersek > Signed-off-by: Gabriel Somlo 0 is 0 whatever you do with it. But you wrote it, so if you prefer Reviewed-by: Michael S. Tsirkin > --- > hw/i386/smbios.c | 8 ++++---- > include/hw/i386/smbios.h | 8 ++++---- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c > index 1793821..b3bedde 100644 > --- a/hw/i386/smbios.c > +++ b/hw/i386/smbios.c > @@ -683,10 +683,10 @@ static void smbios_build_type_17_table(unsigned instance, ram_addr_t size) > SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset); > SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part); > t->attributes = 0; /* Unknown */ > - t->configured_clock_speed = cpu_to_le32(0); /* Unknown */ > - t->minimum_voltage = cpu_to_le32(0); /* Unknown */ > - t->maximum_voltage = cpu_to_le32(0); /* Unknown */ > - t->configured_voltage = cpu_to_le32(0); /* Unknown */ > + t->configured_clock_speed = cpu_to_le16(0); /* Unknown */ > + t->minimum_voltage = cpu_to_le16(0); /* Unknown */ > + t->maximum_voltage = cpu_to_le16(0); /* Unknown */ > + t->configured_voltage = cpu_to_le16(0); /* Unknown */ > > SMBIOS_BUILD_TABLE_POST; > } > diff --git a/include/hw/i386/smbios.h b/include/hw/i386/smbios.h > index 5583f60..a3f4d88 100644 > --- a/include/hw/i386/smbios.h > +++ b/include/hw/i386/smbios.h > @@ -182,10 +182,10 @@ struct smbios_type_17 { > uint8_t part_number_str; > uint8_t attributes; > uint32_t extended_size; > - uint32_t configured_clock_speed; > - uint32_t minimum_voltage; > - uint32_t maximum_voltage; > - uint32_t configured_voltage; > + uint16_t configured_clock_speed; > + uint16_t minimum_voltage; > + uint16_t maximum_voltage; > + uint16_t configured_voltage; > } QEMU_PACKED; > > /* SMBIOS type 19 - Memory Array Mapped Address (v2.7) */ > -- > 1.9.0 >