qemu-e2k/hw/i386
Vincent Bernat 05dfb447a4 hw/smbios: support for type 41 (onboard devices extended information)
Type 41 defines the attributes of devices that are onboard. The
original intent was to imply the BIOS had some level of control over
the enablement of the associated devices.

If network devices are present in this table, by default, udev will
name the corresponding interfaces enoX, X being the instance number.
Without such information, udev will fallback to using the PCI ID and
this usually gives ens3 or ens4. This can be a bit annoying as the
name of the network card may depend on the order of options and may
change if a new PCI device is added earlier on the commande line.
Being able to provide SMBIOS type 41 entry ensure the name of the
interface won't change and helps the user guess the right name without
booting a first time.

This can be invoked with:

    $QEMU -netdev user,id=internet
          -device virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \
          -smbios type=41,designation='Onboard LAN',instance=1,kind=ethernet,pcidev=internet-dev

The PCI segment is assumed to be 0. This should hold true for most
cases.

    $ dmidecode -t 41
    # dmidecode 3.3
    Getting SMBIOS data from sysfs.
    SMBIOS 2.8 present.

    Handle 0x2900, DMI type 41, 11 bytes
    Onboard Device
            Reference Designation: Onboard LAN
            Type: Ethernet
            Status: Enabled
            Type Instance: 1
            Bus Address: 0000:00:09.0

    $ ip -brief a
    lo               UNKNOWN        127.0.0.1/8 ::1/128
    eno1             UP             10.0.2.14/24 fec0::5254:ff:fe00:42/64 fe80::5254:ff:fe00:42/64

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
Message-Id: <20210401171138.62970-1-vincent@bernat.ch>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-05-14 10:26:18 -04:00
..
kvm sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
xen sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
Kconfig hw/misc/pvpanic: split-out generic and bus dependent code 2021-01-29 10:47:28 +00:00
acpi-build.c x86: acpi: use offset instead of pointer when using build_header() 2021-05-04 07:27:37 -04:00
acpi-build.h nvdimm: Use configurable ACPI IO base and size 2020-05-04 10:25:02 -04:00
acpi-common.c acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
acpi-common.h acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
acpi-microvm.c acpi: Move setters/getters of oem fields to X86MachineState 2021-03-22 18:58:19 -04:00
acpi-microvm.h microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
amd_iommu.c amd_iommu: fix wrong MMIO operations 2021-05-14 10:26:18 -04:00
amd_iommu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e820_memory_layout.c hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
e820_memory_layout.h hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
fw_cfg.c hw/smbios: support for type 41 (onboard devices extended information) 2021-05-14 10:26:18 -04:00
fw_cfg.h acpi: factor out fw_cfg_add_acpi_dsdt() 2020-06-24 17:18:28 -04:00
generic_event_device_x86.c acpi: ged: add x86 device variant. 2020-09-17 14:16:19 +02:00
intel_iommu.c dma: Introduce dma_aligned_pow2_mask() 2021-03-12 12:40:10 +00:00
intel_iommu_internal.h intel_iommu: Use correct shift for 256 bits qi descriptor 2020-07-22 07:57:07 -04:00
kvmvapic.c sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
meson.build microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
microvm.c acpi: Move setters/getters of oem fields to X86MachineState 2021-03-22 18:58:19 -04:00
multiboot.c hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c acpi: Move setters/getters of oem fields to X86MachineState 2021-03-22 18:58:19 -04:00
pc_piix.c i386/acpi: restore device paths for pre-5.1 vms 2021-03-02 05:40:35 -05:00
pc_q35.c i386/acpi: restore device paths for pre-5.1 vms 2021-03-02 05:40:35 -05:00
pc_sysfw.c sev/i386: Allow AP booting under SEV-ES 2021-02-16 17:15:39 +01:00
port92.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
trace-events hw/i386/pc: Extract the port92 device 2019-12-17 19:33:51 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vmmouse.c vmmouse: put it into the 'input' category 2021-02-20 12:36:19 +01:00
vmport.c i386: do not use ram_size global 2020-12-10 12:15:08 -05:00
x86-iommu-stub.c hw/i386/x86-iommu: Add missing stubs 2020-01-09 11:41:25 +00:00
x86-iommu.c x86-iommu: Rename QOM type macros 2020-09-02 07:29:25 -04:00
x86.c acpi: Move setters/getters of oem fields to X86MachineState 2021-03-22 18:58:19 -04:00