mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
VFIO updates 2023-02-16
* Initial v2 migration support for vfio (Avihai Horon) * Add Cédric as vfio reviewer (Cédric Le Goater) -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEQvbATlQL0amee4qQI5ubbjuwiyIFAmPumhUbHGFsZXgud2ls bGlhbXNvbkByZWRoYXQuY29tAAoJECObm247sIsijnMP/0Rz/lsGxym76mXtr5WY OR5SDFpifpaUVi+1xTugYFPnZvN+RdnlcLrcp1g8G+lmd4ANqwT0b9XTTTI8WTau DhSHW/05WgAOrf/jOSV29oNSf7jtGJZcDbAy8f5NXxwK/IRlJEDJfCaqxwYSyYf1 nfC0ZwMTrBrA6pzF5OzIJSkhl/uPwlTsBxRnbN86Z22rE128ASjUtj1jir4rPLg0 ClUn7Rrdk/Y6uXIB9c6TFC+wmG0QAVsklWIeNLUFWUak4H0gqp7AUmMlJV99i5Q7 3H4Zjspwn79llvGm4X1QpuLaop2QaIQaW4FTpzRSftelEosjIjkTCMrWTb4MKff1 cgT0dmC1Hht+zQ0MPbmgeaiwPH/V7r+J9GffG6p2b4itdHmrKVsqKQMSQS/IJFBw eiO1rENRXNcTnC29jPUhe1IS1DEwCNkWm9NgJoC5WPJYQXsiEvo4YDH/30FnByXg KQdd5OxR7o6qJM5e4PUn4wd9sHsYU8IsIEJdKnynoS9qUdPqv0tJ+tLYWcBhQPJq M8R+mDwImMzw0bgurg4607VgL9HJEXna2rgdd5hcMq88M+M5OpmowXlk4TTY4Ha9 lmWSndYJG6npNY4NXcxbe4x5H8ndvHcO+g3weynsxPFjnL959NzQyWNFXFDBqBg3 fhNVqYTrMOcEN5uv18o+mnsG =oK7/ -----END PGP SIGNATURE----- Merge tag 'vfio-updates-20230216.0' of https://gitlab.com/alex.williamson/qemu into staging VFIO updates 2023-02-16 * Initial v2 migration support for vfio (Avihai Horon) * Add Cédric as vfio reviewer (Cédric Le Goater) # -----BEGIN PGP SIGNATURE----- # # iQJPBAABCAA5FiEEQvbATlQL0amee4qQI5ubbjuwiyIFAmPumhUbHGFsZXgud2ls # bGlhbXNvbkByZWRoYXQuY29tAAoJECObm247sIsijnMP/0Rz/lsGxym76mXtr5WY # OR5SDFpifpaUVi+1xTugYFPnZvN+RdnlcLrcp1g8G+lmd4ANqwT0b9XTTTI8WTau # DhSHW/05WgAOrf/jOSV29oNSf7jtGJZcDbAy8f5NXxwK/IRlJEDJfCaqxwYSyYf1 # nfC0ZwMTrBrA6pzF5OzIJSkhl/uPwlTsBxRnbN86Z22rE128ASjUtj1jir4rPLg0 # ClUn7Rrdk/Y6uXIB9c6TFC+wmG0QAVsklWIeNLUFWUak4H0gqp7AUmMlJV99i5Q7 # 3H4Zjspwn79llvGm4X1QpuLaop2QaIQaW4FTpzRSftelEosjIjkTCMrWTb4MKff1 # cgT0dmC1Hht+zQ0MPbmgeaiwPH/V7r+J9GffG6p2b4itdHmrKVsqKQMSQS/IJFBw # eiO1rENRXNcTnC29jPUhe1IS1DEwCNkWm9NgJoC5WPJYQXsiEvo4YDH/30FnByXg # KQdd5OxR7o6qJM5e4PUn4wd9sHsYU8IsIEJdKnynoS9qUdPqv0tJ+tLYWcBhQPJq # M8R+mDwImMzw0bgurg4607VgL9HJEXna2rgdd5hcMq88M+M5OpmowXlk4TTY4Ha9 # lmWSndYJG6npNY4NXcxbe4x5H8ndvHcO+g3weynsxPFjnL959NzQyWNFXFDBqBg3 # fhNVqYTrMOcEN5uv18o+mnsG # =oK7/ # -----END PGP SIGNATURE----- # gpg: Signature made Thu 16 Feb 2023 21:03:17 GMT # gpg: using RSA key 42F6C04E540BD1A99E7B8A90239B9B6E3BB08B22 # gpg: issuer "alex.williamson@redhat.com" # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full] # gpg: aka "Alex Williamson <alex@shazbot.org>" [full] # gpg: aka "Alex Williamson <alwillia@redhat.com>" [full] # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" [full] # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * tag 'vfio-updates-20230216.0' of https://gitlab.com/alex.williamson/qemu: MAINTAINERS: Add myself as VFIO reviewer docs/devel: Align VFIO migration docs to v2 protocol vfio: Alphabetize migration section of VFIO trace-events file vfio/migration: Remove VFIO migration protocol v1 vfio/migration: Implement VFIO migration protocol v2 vfio/migration: Rename functions/structs related to v1 protocol vfio/migration: Move migration v1 logic to vfio_migration_init() vfio/migration: Block multiple devices migration vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one vfio/migration: Allow migration without VFIO IOMMU dirty tracking support vfio/migration: Fix NULL pointer dereference bug linux-headers: Update to v6.2-rc8 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
9b0699ab80
19 changed files with 625 additions and 609 deletions
|
@ -61,11 +61,11 @@ typedef struct VFIORegion {
|
|||
typedef struct VFIOMigration {
|
||||
struct VFIODevice *vbasedev;
|
||||
VMChangeStateEntry *vm_state;
|
||||
VFIORegion region;
|
||||
uint32_t device_state;
|
||||
int vm_running;
|
||||
Notifier migration_state;
|
||||
uint64_t pending_bytes;
|
||||
uint32_t device_state;
|
||||
int data_fd;
|
||||
void *data_buffer;
|
||||
size_t data_buffer_size;
|
||||
} VFIOMigration;
|
||||
|
||||
typedef struct VFIOAddressSpace {
|
||||
|
@ -218,6 +218,8 @@ typedef QLIST_HEAD(VFIOGroupList, VFIOGroup) VFIOGroupList;
|
|||
extern VFIOGroupList vfio_group_list;
|
||||
|
||||
bool vfio_mig_active(void);
|
||||
int vfio_block_multiple_devices_migration(Error **errp);
|
||||
void vfio_unblock_multiple_devices_migration(void);
|
||||
int64_t vfio_mig_bytes_transferred(void);
|
||||
|
||||
#ifdef CONFIG_LINUX
|
||||
|
|
|
@ -743,6 +743,35 @@ extern "C" {
|
|||
*/
|
||||
#define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4)
|
||||
|
||||
/*
|
||||
* Vivante TS (tile-status) buffer modifiers. They can be combined with all of
|
||||
* the color buffer tiling modifiers defined above. When TS is present it's a
|
||||
* separate buffer containing the clear/compression status of each tile. The
|
||||
* modifiers are defined as VIVANTE_MOD_TS_c_s, where c is the color buffer
|
||||
* tile size in bytes covered by one entry in the status buffer and s is the
|
||||
* number of status bits per entry.
|
||||
* We reserve the top 8 bits of the Vivante modifier space for tile status
|
||||
* clear/compression modifiers, as future cores might add some more TS layout
|
||||
* variations.
|
||||
*/
|
||||
#define VIVANTE_MOD_TS_64_4 (1ULL << 48)
|
||||
#define VIVANTE_MOD_TS_64_2 (2ULL << 48)
|
||||
#define VIVANTE_MOD_TS_128_4 (3ULL << 48)
|
||||
#define VIVANTE_MOD_TS_256_4 (4ULL << 48)
|
||||
#define VIVANTE_MOD_TS_MASK (0xfULL << 48)
|
||||
|
||||
/*
|
||||
* Vivante compression modifiers. Those depend on a TS modifier being present
|
||||
* as the TS bits get reinterpreted as compression tags instead of simple
|
||||
* clear markers when compression is enabled.
|
||||
*/
|
||||
#define VIVANTE_MOD_COMP_DEC400 (1ULL << 52)
|
||||
#define VIVANTE_MOD_COMP_MASK (0xfULL << 52)
|
||||
|
||||
/* Masking out the extension bits will yield the base modifier. */
|
||||
#define VIVANTE_MOD_EXT_MASK (VIVANTE_MOD_TS_MASK | \
|
||||
VIVANTE_MOD_COMP_MASK)
|
||||
|
||||
/* NVIDIA frame buffer modifiers */
|
||||
|
||||
/*
|
||||
|
|
|
@ -159,8 +159,10 @@ static inline uint32_t ethtool_cmd_speed(const struct ethtool_cmd *ep)
|
|||
* in its bus driver structure (e.g. pci_driver::name). Must
|
||||
* not be an empty string.
|
||||
* @version: Driver version string; may be an empty string
|
||||
* @fw_version: Firmware version string; may be an empty string
|
||||
* @erom_version: Expansion ROM version string; may be an empty string
|
||||
* @fw_version: Firmware version string; driver defined; may be an
|
||||
* empty string
|
||||
* @erom_version: Expansion ROM version string; driver defined; may be
|
||||
* an empty string
|
||||
* @bus_info: Device bus address. This should match the dev_name()
|
||||
* string for the underlying bus device, if there is one. May be
|
||||
* an empty string.
|
||||
|
@ -179,10 +181,6 @@ static inline uint32_t ethtool_cmd_speed(const struct ethtool_cmd *ep)
|
|||
*
|
||||
* Users can use the %ETHTOOL_GSSET_INFO command to get the number of
|
||||
* strings in any string set (from Linux 2.6.34).
|
||||
*
|
||||
* Drivers should set at most @driver, @version, @fw_version and
|
||||
* @bus_info in their get_drvinfo() implementation. The ethtool
|
||||
* core fills in the other fields using other driver operations.
|
||||
*/
|
||||
struct ethtool_drvinfo {
|
||||
uint32_t cmd;
|
||||
|
@ -1737,6 +1735,13 @@ enum ethtool_link_mode_bit_indices {
|
|||
ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 90,
|
||||
ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 91,
|
||||
ETHTOOL_LINK_MODE_10baseT1L_Full_BIT = 92,
|
||||
ETHTOOL_LINK_MODE_800000baseCR8_Full_BIT = 93,
|
||||
ETHTOOL_LINK_MODE_800000baseKR8_Full_BIT = 94,
|
||||
ETHTOOL_LINK_MODE_800000baseDR8_Full_BIT = 95,
|
||||
ETHTOOL_LINK_MODE_800000baseDR8_2_Full_BIT = 96,
|
||||
ETHTOOL_LINK_MODE_800000baseSR8_Full_BIT = 97,
|
||||
ETHTOOL_LINK_MODE_800000baseVR8_Full_BIT = 98,
|
||||
|
||||
/* must be last entry */
|
||||
__ETHTOOL_LINK_MODE_MASK_NBITS
|
||||
};
|
||||
|
@ -1848,6 +1853,7 @@ enum ethtool_link_mode_bit_indices {
|
|||
#define SPEED_100000 100000
|
||||
#define SPEED_200000 200000
|
||||
#define SPEED_400000 400000
|
||||
#define SPEED_800000 800000
|
||||
|
||||
#define SPEED_UNKNOWN -1
|
||||
|
||||
|
|
|
@ -197,6 +197,10 @@
|
|||
*
|
||||
* 7.37
|
||||
* - add FUSE_TMPFILE
|
||||
*
|
||||
* 7.38
|
||||
* - add FUSE_EXPIRE_ONLY flag to fuse_notify_inval_entry
|
||||
* - add FOPEN_PARALLEL_DIRECT_WRITES
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FUSE_H
|
||||
|
@ -228,7 +232,7 @@
|
|||
#define FUSE_KERNEL_VERSION 7
|
||||
|
||||
/** Minor version number of this interface */
|
||||
#define FUSE_KERNEL_MINOR_VERSION 37
|
||||
#define FUSE_KERNEL_MINOR_VERSION 38
|
||||
|
||||
/** The node ID of the root inode */
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
@ -300,6 +304,7 @@ struct fuse_file_lock {
|
|||
* FOPEN_CACHE_DIR: allow caching this directory
|
||||
* FOPEN_STREAM: the file is stream-like (no file position at all)
|
||||
* FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE)
|
||||
* FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode
|
||||
*/
|
||||
#define FOPEN_DIRECT_IO (1 << 0)
|
||||
#define FOPEN_KEEP_CACHE (1 << 1)
|
||||
|
@ -307,6 +312,7 @@ struct fuse_file_lock {
|
|||
#define FOPEN_CACHE_DIR (1 << 3)
|
||||
#define FOPEN_STREAM (1 << 4)
|
||||
#define FOPEN_NOFLUSH (1 << 5)
|
||||
#define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6)
|
||||
|
||||
/**
|
||||
* INIT request/reply flags
|
||||
|
@ -487,6 +493,12 @@ struct fuse_file_lock {
|
|||
*/
|
||||
#define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0)
|
||||
|
||||
/**
|
||||
* notify_inval_entry flags
|
||||
* FUSE_EXPIRE_ONLY
|
||||
*/
|
||||
#define FUSE_EXPIRE_ONLY (1 << 0)
|
||||
|
||||
enum fuse_opcode {
|
||||
FUSE_LOOKUP = 1,
|
||||
FUSE_FORGET = 2, /* no reply */
|
||||
|
@ -915,7 +927,7 @@ struct fuse_notify_inval_inode_out {
|
|||
struct fuse_notify_inval_entry_out {
|
||||
uint64_t parent;
|
||||
uint32_t namelen;
|
||||
uint32_t padding;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
struct fuse_notify_delete_out {
|
||||
|
|
|
@ -614,6 +614,9 @@
|
|||
#define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */
|
||||
#define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */
|
||||
#define KEY_DICTATE 0x24a /* Start or Stop Voice Dictation Session (HUTRR99) */
|
||||
#define KEY_CAMERA_ACCESS_ENABLE 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */
|
||||
#define KEY_CAMERA_ACCESS_DISABLE 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */
|
||||
#define KEY_CAMERA_ACCESS_TOGGLE 0x24d /* Toggles the current state of the camera access control. (HUTRR72) */
|
||||
|
||||
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
|
||||
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
|
||||
|
|
|
@ -1058,6 +1058,7 @@
|
|||
/* Precision Time Measurement */
|
||||
#define PCI_PTM_CAP 0x04 /* PTM Capability */
|
||||
#define PCI_PTM_CAP_REQ 0x00000001 /* Requester capable */
|
||||
#define PCI_PTM_CAP_RES 0x00000002 /* Responder capable */
|
||||
#define PCI_PTM_CAP_ROOT 0x00000004 /* Root capable */
|
||||
#define PCI_PTM_GRANULARITY_MASK 0x0000FF00 /* Clock granularity */
|
||||
#define PCI_PTM_CTRL 0x08 /* PTM Control */
|
||||
|
@ -1119,6 +1120,7 @@
|
|||
#define PCI_DOE_STATUS_DATA_OBJECT_READY 0x80000000 /* Data Object Ready */
|
||||
#define PCI_DOE_WRITE 0x10 /* DOE Write Data Mailbox Register */
|
||||
#define PCI_DOE_READ 0x14 /* DOE Read Data Mailbox Register */
|
||||
#define PCI_DOE_CAP_SIZEOF 0x18 /* Size of DOE register block */
|
||||
|
||||
/* DOE Data Object - note not actually registers */
|
||||
#define PCI_DOE_DATA_OBJECT_HEADER_1_VID 0x0000ffff
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#define VIRTIO_BT_F_VND_HCI 0 /* Indicates vendor command support */
|
||||
#define VIRTIO_BT_F_MSFT_EXT 1 /* Indicates MSFT vendor support */
|
||||
#define VIRTIO_BT_F_AOSP_EXT 2 /* Indicates AOSP vendor support */
|
||||
#define VIRTIO_BT_F_CONFIG_V2 3 /* Use second version configuration */
|
||||
|
||||
enum virtio_bt_config_type {
|
||||
VIRTIO_BT_CONFIG_TYPE_PRIMARY = 0,
|
||||
|
@ -28,4 +29,11 @@ struct virtio_bt_config {
|
|||
uint16_t msft_opcode;
|
||||
} QEMU_PACKED;
|
||||
|
||||
struct virtio_bt_config_v2 {
|
||||
uint8_t type;
|
||||
uint8_t alignment;
|
||||
uint16_t vendor;
|
||||
uint16_t msft_opcode;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_VIRTIO_BT_H */
|
||||
|
|
|
@ -57,6 +57,9 @@
|
|||
* Steering */
|
||||
#define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */
|
||||
#define VIRTIO_NET_F_NOTF_COAL 53 /* Device supports notifications coalescing */
|
||||
#define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */
|
||||
#define VIRTIO_NET_F_GUEST_USO6 55 /* Guest can handle USOv6 in. */
|
||||
#define VIRTIO_NET_F_HOST_USO 56 /* Host can handle USO in. */
|
||||
#define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */
|
||||
#define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */
|
||||
#define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */
|
||||
|
@ -130,6 +133,7 @@ struct virtio_net_hdr_v1 {
|
|||
#define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */
|
||||
#define VIRTIO_NET_HDR_GSO_UDP 3 /* GSO frame, IPv4 UDP (UFO) */
|
||||
#define VIRTIO_NET_HDR_GSO_TCPV6 4 /* GSO frame, IPv6 TCP */
|
||||
#define VIRTIO_NET_HDR_GSO_UDP_L4 5 /* GSO frame, IPv4& IPv6 UDP (USO) */
|
||||
#define VIRTIO_NET_HDR_GSO_ECN 0x80 /* TCP has ECN set */
|
||||
uint8_t gso_type;
|
||||
__virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue