mirror of
https://github.com/qemu/qemu.git
synced 2025-08-05 02:04:04 +00:00

Thanks to72d277a7
,1ed2cb32
, and others, EDID (Extended Display Identification Data) is propagated by QEMU such that a virtual display presents legitimate metadata (e.g., name, serial number, preferred resolutions, etc.) to its connected guest. This change adds the ability to specify the EDID name for a particular virtio-vga display. Previously, every virtual display would have the same name: "QEMU Monitor". Now, we can inject names of displays in order to test guest behavior that is specific to display names. We provide the ability to inject the display name from the frontend since this is guest visible data. Furthermore, this makes it clear where N potential display outputs would get their name from (which will be added in a future change). Note that we have elected to use a struct here for output data for extensibility - we intend to add per-output fields like resolution in a future change. It should be noted that EDID names longer than 12 bytes will be truncated per spec (I think?). Testing: verified that when I specified 2 outputs for a virtio-gpu with edid_name set, the names matched those that I configured with my vnc display. -display vnc=localhost:0,id=aaa,display=vga,head=0 \ -display vnc=localhost:1,id=bbb,display=vga,head=1 \ -device '{"driver":"virtio-vga", "max_outputs":2, "id":"vga", "outputs":[ { "name":"AAA" }, { "name":"BBB" } ]}' Signed-off-by: Andrew Keesler <ankeesler@google.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20250709121126.2946088-2-ankeesler@google.com>
119 lines
5.6 KiB
C
119 lines
5.6 KiB
C
#ifndef HW_QDEV_PROPERTIES_SYSTEM_H
|
|
#define HW_QDEV_PROPERTIES_SYSTEM_H
|
|
|
|
#include "hw/qdev-properties.h"
|
|
|
|
bool qdev_prop_sanitize_s390x_loadparm(uint8_t *loadparm, const char *str,
|
|
Error **errp);
|
|
|
|
extern const PropertyInfo qdev_prop_chr;
|
|
extern const PropertyInfo qdev_prop_macaddr;
|
|
extern const PropertyInfo qdev_prop_reserved_region;
|
|
extern const PropertyInfo qdev_prop_multifd_compression;
|
|
extern const PropertyInfo qdev_prop_mig_mode;
|
|
extern const PropertyInfo qdev_prop_granule_mode;
|
|
extern const PropertyInfo qdev_prop_zero_page_detection;
|
|
extern const PropertyInfo qdev_prop_losttickpolicy;
|
|
extern const PropertyInfo qdev_prop_blockdev_on_error;
|
|
extern const PropertyInfo qdev_prop_bios_chs_trans;
|
|
extern const PropertyInfo qdev_prop_fdc_drive_type;
|
|
extern const PropertyInfo qdev_prop_drive;
|
|
extern const PropertyInfo qdev_prop_drive_iothread;
|
|
extern const PropertyInfo qdev_prop_netdev;
|
|
extern const PropertyInfo qdev_prop_pci_devfn;
|
|
extern const PropertyInfo qdev_prop_blocksize;
|
|
extern const PropertyInfo qdev_prop_pci_host_devaddr;
|
|
extern const PropertyInfo qdev_prop_uuid;
|
|
extern const PropertyInfo qdev_prop_audiodev;
|
|
extern const PropertyInfo qdev_prop_off_auto_pcibar;
|
|
extern const PropertyInfo qdev_prop_pcie_link_speed;
|
|
extern const PropertyInfo qdev_prop_pcie_link_width;
|
|
extern const PropertyInfo qdev_prop_cpus390entitlement;
|
|
extern const PropertyInfo qdev_prop_iothread_vq_mapping_list;
|
|
extern const PropertyInfo qdev_prop_endian_mode;
|
|
extern const PropertyInfo qdev_prop_vmapple_virtio_blk_variant;
|
|
extern const PropertyInfo qdev_prop_virtio_gpu_output_list;
|
|
|
|
#define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t)
|
|
|
|
#define DEFINE_PROP_CHR(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharBackend)
|
|
#define DEFINE_PROP_NETDEV(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, NICPeers)
|
|
#define DEFINE_PROP_DRIVE(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockBackend *)
|
|
#define DEFINE_PROP_DRIVE_IOTHREAD(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_drive_iothread, BlockBackend *)
|
|
#define DEFINE_PROP_MACADDR(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr)
|
|
#define DEFINE_PROP_RESERVED_REGION(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_reserved_region, ReservedRegion)
|
|
#define DEFINE_PROP_MULTIFD_COMPRESSION(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_multifd_compression, \
|
|
MultiFDCompression)
|
|
#define DEFINE_PROP_MIG_MODE(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_mig_mode, \
|
|
MigMode)
|
|
#define DEFINE_PROP_GRANULE_MODE(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_granule_mode, GranuleMode)
|
|
#define DEFINE_PROP_ZERO_PAGE_DETECTION(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_zero_page_detection, \
|
|
ZeroPageDetection)
|
|
#define DEFINE_PROP_LOSTTICKPOLICY(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_losttickpolicy, \
|
|
LostTickPolicy)
|
|
#define DEFINE_PROP_BLOCKDEV_ON_ERROR(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_blockdev_on_error, \
|
|
BlockdevOnError)
|
|
#define DEFINE_PROP_BIOS_CHS_TRANS(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_bios_chs_trans, int)
|
|
#define DEFINE_PROP_BLOCKSIZE(_n, _s, _f) \
|
|
DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint32_t)
|
|
#define DEFINE_PROP_PCI_HOST_DEVADDR(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress)
|
|
#define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \
|
|
OffAutoPCIBAR)
|
|
#define DEFINE_PROP_PCIE_LINK_SPEED(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_speed, \
|
|
PCIExpLinkSpeed)
|
|
#define DEFINE_PROP_PCIE_LINK_WIDTH(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_width, \
|
|
PCIExpLinkWidth)
|
|
|
|
#define DEFINE_PROP_UUID(_name, _state, _field) \
|
|
DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID, \
|
|
.set_default = true)
|
|
|
|
#define DEFINE_PROP_AUDIODEV(_n, _s, _f) \
|
|
DEFINE_PROP(_n, _s, _f, qdev_prop_audiodev, QEMUSoundCard)
|
|
|
|
#define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \
|
|
DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID)
|
|
|
|
#define DEFINE_PROP_CPUS390ENTITLEMENT(_n, _s, _f, _d) \
|
|
DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_cpus390entitlement, \
|
|
S390CpuEntitlement)
|
|
|
|
#define DEFINE_PROP_IOTHREAD_VQ_MAPPING_LIST(_name, _state, _field) \
|
|
DEFINE_PROP(_name, _state, _field, qdev_prop_iothread_vq_mapping_list, \
|
|
IOThreadVirtQueueMappingList *)
|
|
|
|
#define DEFINE_PROP_ENDIAN(_name, _state, _field, _default) \
|
|
DEFINE_PROP_UNSIGNED(_name, _state, _field, _default, \
|
|
qdev_prop_endian_mode, EndianMode)
|
|
#define DEFINE_PROP_ENDIAN_NODEFAULT(_name, _state, _field) \
|
|
DEFINE_PROP_ENDIAN(_name, _state, _field, ENDIAN_MODE_UNSPECIFIED)
|
|
|
|
#define DEFINE_PROP_VMAPPLE_VIRTIO_BLK_VARIANT(_name, _state, _fld, _default) \
|
|
DEFINE_PROP_UNSIGNED(_name, _state, _fld, _default, \
|
|
qdev_prop_vmapple_virtio_blk_variant, \
|
|
VMAppleVirtioBlkVariant)
|
|
|
|
#define DEFINE_PROP_VIRTIO_GPU_OUTPUT_LIST(_name, _state, _field) \
|
|
DEFINE_PROP(_name, _state, _field, qdev_prop_virtio_gpu_output_list, \
|
|
VirtIOGPUOutputList *)
|
|
|
|
#endif
|