* [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy()
@ 2024-03-26 12:26 Igor Mammedov
2024-03-26 12:44 ` Philippe Mathieu-Daudé
2024-03-26 16:03 ` Michael Tokarev
0 siblings, 2 replies; 4+ messages in thread
From: Igor Mammedov @ 2024-03-26 12:26 UTC (permalink / raw)
To: qemu-devel
Cc: anisinha, mst, laurent, qemu-trivial, Michael Tokarev,
Philippe Mathieu-Daudé
QEMU build fails with
hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy'
when it's built with only 'microvm' enabled i.e. with config patch
+++ b/configs/devices/i386-softmmu/default.mak
@@ -26,7 +26,7 @@
# Boards:
#
-CONFIG_ISAPC=y
-CONFIG_I440FX=y
-CONFIG_Q35=y
+CONFIG_ISAPC=n
+CONFIG_I440FX=n
+CONFIG_Q35=n
it happens because I've fogotten/lost smbios_get_table_legacy() stub.
Fix it by adding missing stub as Philippe suggested.
Fixes: b42b0e4daaa5 "smbios: build legacy mode code only for 'pc' machine"
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Singned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
Compile tested only.
While it's fixing bug for off-tree usecase with non-upstream config,
it's trivial enough to go into 9.0 if time frame allows.
Benefit of it going into 9.0 is that folks who play with minimal builds
won't have to carry the patch in their tree.
hw/smbios/smbios_legacy_stub.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/smbios/smbios_legacy_stub.c b/hw/smbios/smbios_legacy_stub.c
index f29b15316c..7d593dca98 100644
--- a/hw/smbios/smbios_legacy_stub.c
+++ b/hw/smbios/smbios_legacy_stub.c
@@ -13,3 +13,8 @@
void smbios_add_usr_blob_size(size_t size)
{
}
+
+uint8_t *smbios_get_table_legacy(size_t *length, Error **errp)
+{
+ g_assert_not_reached();
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy()
2024-03-26 12:26 [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy() Igor Mammedov
@ 2024-03-26 12:44 ` Philippe Mathieu-Daudé
2024-03-26 13:09 ` Philippe Mathieu-Daudé
2024-03-26 16:03 ` Michael Tokarev
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-03-26 12:44 UTC (permalink / raw)
To: Igor Mammedov, qemu-devel
Cc: anisinha, mst, laurent, qemu-trivial, Michael Tokarev
On 26/3/24 13:26, Igor Mammedov wrote:
> QEMU build fails with
> hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy'
> when it's built with only 'microvm' enabled i.e. with config patch
> +++ b/configs/devices/i386-softmmu/default.mak
> @@ -26,7 +26,7 @@
>
> # Boards:
> #
> -CONFIG_ISAPC=y
> -CONFIG_I440FX=y
> -CONFIG_Q35=y
> +CONFIG_ISAPC=n
> +CONFIG_I440FX=n
> +CONFIG_Q35=n
>
> it happens because I've fogotten/lost smbios_get_table_legacy() stub.
>
> Fix it by adding missing stub as Philippe suggested.
>
> Fixes: b42b0e4daaa5 "smbios: build legacy mode code only for 'pc' machine"
> Reported-by: Michael Tokarev <mjt@tls.msk.ru>
> Singned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> Compile tested only.
>
> While it's fixing bug for off-tree usecase with non-upstream config,
> it's trivial enough to go into 9.0 if time frame allows.
> Benefit of it going into 9.0 is that folks who play with minimal builds
> won't have to carry the patch in their tree.
>
>
> hw/smbios/smbios_legacy_stub.c | 5 +++++
> 1 file changed, 5 insertions(+)
Thanks, patch queued.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy()
2024-03-26 12:44 ` Philippe Mathieu-Daudé
@ 2024-03-26 13:09 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-03-26 13:09 UTC (permalink / raw)
To: Igor Mammedov, qemu-devel, Michael Tokarev
Cc: anisinha, mst, laurent, qemu-trivial
On 26/3/24 13:44, Philippe Mathieu-Daudé wrote:
> On 26/3/24 13:26, Igor Mammedov wrote:
>> QEMU build fails with
>> hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy'
>> when it's built with only 'microvm' enabled i.e. with config patch
>> +++ b/configs/devices/i386-softmmu/default.mak
>> @@ -26,7 +26,7 @@
>>
>> # Boards:
>> #
>> -CONFIG_ISAPC=y
>> -CONFIG_I440FX=y
>> -CONFIG_Q35=y
>> +CONFIG_ISAPC=n
>> +CONFIG_I440FX=n
>> +CONFIG_Q35=n
>>
>> it happens because I've fogotten/lost smbios_get_table_legacy() stub.
>>
>> Fix it by adding missing stub as Philippe suggested.
>>
>> Fixes: b42b0e4daaa5 "smbios: build legacy mode code only for 'pc'
>> machine"
>> Reported-by: Michael Tokarev <mjt@tls.msk.ru>
>> Singned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>> ---
>> Compile tested only.
>>
>> While it's fixing bug for off-tree usecase with non-upstream config,
>> it's trivial enough to go into 9.0 if time frame allows.
>> Benefit of it going into 9.0 is that folks who play with minimal builds
>> won't have to carry the patch in their tree.
>>
>>
>> hw/smbios/smbios_legacy_stub.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>
> Thanks, patch queued.
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
BTW I tested using the following patch:
-- >8 --
commit 8be7b26b430d3ab192a2d22215ee512072bd88fb
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: Tue Mar 26 13:52:17 2024 +0100
hw/i386: Add a config to only build the microvm machine
Add a config file to build a binary only containing the
microvm machine.
As suggested in commit d1d5e9eefd ("configure: allow the
selection of alternate config in the build"), it can be
built using:
$ ../configure --without-default-features \
--target-list=x86_64-softmmu \
--with-devices-x86_64=microvm
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff --git a/configs/devices/x86_64-softmmu/microvm.mak
b/configs/devices/x86_64-softmmu/microvm.mak
new file mode 100644
index 0000000000..fe48b5b4a7
--- /dev/null
+++ b/configs/devices/x86_64-softmmu/microvm.mak
@@ -0,0 +1,20 @@
+# SPDX-FileCopyrightText: 2024 Linaro Ltd.
+#
+# Config that only supports the 64-bit microvm machine.
+# This avoids bringing in any of numerous legacy features from
+# the legacy machines or the 32bit platform.
+#
+
+CONFIG_MICROVM=y
+CONFIG_PCI_DEVICES=n
+CONFIG_SMBIOS=y
+CONFIG_SMBIOS_LEGACY=n
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_CRYPTO=y
+CONFIG_VIRTIO_GPU=y
+CONFIG_VIRTIO_INPUT=y
+CONFIG_VIRTIO_NET=y
+CONFIG_VIRTIO_RNG=y
+CONFIG_VIRTIO_SCSI=y
+CONFIG_VIRTIO_SERIAL=y
---
Before:
Undefined symbols for architecture arm64:
"_smbios_get_table_legacy", referenced from:
_fw_cfg_build_smbios in hw_i386_fw_cfg.c.o
ld: symbol(s) not found for architecture arm64
After:
$ ./qemu-system-x86_64 -S -monitor stdio -M microvm
QEMU 8.2.90 monitor - type 'help' for more information
(qemu) info qom-tree
/machine (microvm-machine)
...
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy()
2024-03-26 12:26 [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy() Igor Mammedov
2024-03-26 12:44 ` Philippe Mathieu-Daudé
@ 2024-03-26 16:03 ` Michael Tokarev
1 sibling, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2024-03-26 16:03 UTC (permalink / raw)
To: Igor Mammedov, qemu-devel
Cc: anisinha, mst, laurent, qemu-trivial, Philippe Mathieu-Daudé
26.03.2024 15:26, Igor Mammedov wrote:
> QEMU build fails with
> hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy'
> when it's built with only 'microvm' enabled i.e. with config patch
> +++ b/configs/devices/i386-softmmu/default.mak
> @@ -26,7 +26,7 @@
>
> # Boards:
> #
> -CONFIG_ISAPC=y
> -CONFIG_I440FX=y
> -CONFIG_Q35=y
> +CONFIG_ISAPC=n
> +CONFIG_I440FX=n
> +CONFIG_Q35=n
>
> it happens because I've fogotten/lost smbios_get_table_legacy() stub.
>
> Fix it by adding missing stub as Philippe suggested.
>
> Fixes: b42b0e4daaa5 "smbios: build legacy mode code only for 'pc' machine"
> Reported-by: Michael Tokarev <mjt@tls.msk.ru>
> Singned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Thanks,
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-26 16:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-26 12:26 [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy() Igor Mammedov
2024-03-26 12:44 ` Philippe Mathieu-Daudé
2024-03-26 13:09 ` Philippe Mathieu-Daudé
2024-03-26 16:03 ` Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.