smbios_build_type_8_table should use T8_BASE.
cover smbios_build_type_8_table should use T8_BASE.
It should use T8_BASE instead of T0_BASE.
Felix Wu (1):
SMBIOS type 8 should use T8_BASE.
hw/smbios/smbios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0.275.g3460e3d667-goog
PATCH 1/1 SMBIOS type 8 should use T8_BASE.
--- hw/smbios/smbios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/smbios/smbios.c +2 -1
@@ -591,6 +591,7 @@ bool smbios_skip_table(uint8_t type, bool required_table)#define T2_BASE 0x200#define T3_BASE 0x300#define T4_BASE 0x400 +#define T8_BASE 0x800#define T11_BASE 0xe00#define T16_BASE 0x1000
@@ -775,7 +776,7 @@ static void smbios_build_type_8_table(void)struct type8_instance *t8; QTAILQ_FOREACH(t8, &type8, next) { -SMBIOS_BUILD_TABLE_PRE (8 ,T0_BASE + instance, true); +SMBIOS_BUILD_TABLE_PRE (8 ,T8_BASE + instance, true);SMBIOS_TABLE_SET_STR (8 , internal_reference_str, t8->internal_reference);SMBIOS_TABLE_SET_STR (8 , external_reference_str, t8->external_reference);
Signature · 1 line
2.43.0.275.g3460e3d667-goog
Re: [PATCH 1/1] SMBIOS type 8 should use T8_BASE.
On Thu, 11 Jan 2024 19:25:22 +0000
Felix Wu <[email protected]> wrote:
it is missing Signed-off tag a minimum, and also commit message should describe in more detail what's wrong and what's breaks and how it's being fixed with references to spec preferably.
please see https://www.qemu.org/docs/master/devel/submitting-a-patch.html
for requirements to commit message of the patch.
Quoted 17 lines
--- hw/smbios/smbios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/smbios/smbios.c +1
-0@@ -591,6 +591,7 @@ bool smbios_skip_table(uint8_t type, bool required_table)#define T2_BASE 0x200#define T3_BASE 0x300#define T4_BASE 0x400 +#define T8_BASE 0x800#define T11_BASE 0xe00#define T16_BASE 0x1000
hw/smbios/smbios.c static void smbios_build_type_8_table(void) · line 779
Quoted 5 lines
hw/smbios/smbios.c +1
-1@@ -775,7 +776,7 @@ static void smbios_build_type_8_table(void)struct type8_instance *t8; QTAILQ_FOREACH(t8, &type8, next) { -SMBIOS_BUILD_TABLE_PRE (8 ,T0_BASE + instance, true); +SMBIOS_BUILD_TABLE_PRE (8 ,T8_BASE + instance, true);
we can't do that unconditionally as it will break live migration where firmware reading this might get part of broken tables (on source host) and 2nd part of fixed ones (from target host).
So we need to use T0_base for old machine types and T8_BASE for default/new machine types.
for example see how 'pcmc->smbios_uuid_encoded' is used. unless it's x86 specific, this should be done for affected machine types.
Quoted 2 lines
hw/smbios/smbios.c +0
-0SMBIOS_TABLE_SET_STR (8 , internal_reference_str, t8->internal_reference);SMBIOS_TABLE_SET_STR (8 , external_reference_str, t8->external_reference);
Re: [PATCH 1/1] SMBIOS type 8 should use T8_BASE.
Quoted 9 lines · On Wed, 17 Jan 2024 09:38:47 +0100 Igor Mammedov <[email protected]> wrote:
On Thu, 11 Jan 2024 19:25:22 +0000
Felix Wu <[email protected]> wrote:it is missing Signed-off tag a minimum, and also commit message should describe in more detail what's wrong and what's breaks and how it's being fixed with references to spec preferably.
please see https://www.qemu.org/docs/master/devel/submitting-a-patch.html
for requirements to commit message of the patch.
on top of that pls consider adding test case for it in tests/qtest/bios-tables-test.c
Quoted 35 lines
Quoted 17 lines
--- hw/smbios/smbios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/smbios/smbios.c +1
-0@@ -591,6 +591,7 @@ bool smbios_skip_table(uint8_t type, bool required_table)#define T2_BASE 0x200#define T3_BASE 0x300#define T4_BASE 0x400 +#define T8_BASE 0x800#define T11_BASE 0xe00#define T16_BASE 0x1000hw/smbios/smbios.c static void smbios_build_type_8_table(void) · line 779
Quoted 5 lines
hw/smbios/smbios.c +1
-1@@ -775,7 +776,7 @@ static void smbios_build_type_8_table(void)struct type8_instance *t8; QTAILQ_FOREACH(t8, &type8, next) { -SMBIOS_BUILD_TABLE_PRE (8 ,T0_BASE + instance, true); +SMBIOS_BUILD_TABLE_PRE (8 ,T8_BASE + instance, true);we can't do that unconditionally as it will break live migration where firmware reading this might get part of broken tables (on source host) and 2nd part of fixed ones (from target host).
So we need to use
T0_basefor old machine types andT8_BASEfor default/new machine types.
for example see how 'pcmc->smbios_uuid_encoded' is used. unless it's x86 specific, this should be done for affected machine types.Quoted 2 lines
hw/smbios/smbios.c +0
-0SMBIOS_TABLE_SET_STR (8 , internal_reference_str, t8->internal_reference);SMBIOS_TABLE_SET_STR (8 , external_reference_str, t8->external_reference);