qemu-e2k/include/hw
Zhenzhong Duan da3e04b26f vfio/pci: Make vfio cdev pre-openable by passing a file handle
This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.

Together with the earlier support of pre-opening /dev/iommu device,
now we have full support of passing a vfio device to unprivileged
qemu by management tool. This mode is no more considered for the
legacy backend. So let's remove the "TODO" comment.

Add helper functions vfio_device_set_fd() and vfio_device_get_name()
to set fd and get device name, they will also be used by other vfio
devices.

There is no easy way to check if a device is mdev with FD passing,
so fail the x-balloon-allowed check unconditionally in this case.

There is also no easy way to get BDF as name with FD passing, so
we fake a name by VFIO_FD[fd].

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2023-12-19 19:03:38 +01:00
..
acpi virtio,pc,pci: features, cleanups 2023-10-23 14:45:29 -07:00
adc
arm hw/arm/stm32f100: Report error when incorrect CPU is used 2023-11-20 15:30:59 +00:00
audio virtio-sound: implement audio output (TX) 2023-11-07 03:39:10 -05:00
block swim: update IWM/ISM register block decoding 2023-10-06 10:33:43 +02:00
char hw/char/stm32f2xx_usart: Add more definitions for CR1 register 2023-11-02 13:36:45 +00:00
core hw/cpu: Update the comments of nr_cores and nr_dies 2023-11-07 13:08:48 +01:00
cpu
cris
cxl hw/cxl: spelling fixes: limitaions, potentialy, intialized 2023-11-15 11:09:17 +03:00
display ramfb: add migration support 2023-10-18 10:10:49 +02:00
dma
firmware
gpio hw/gpio/nrf51: implement DETECT signal 2023-08-22 17:30:59 +01:00
hyperv include/hw/hyperv/dynmem-proto.h: spelling fix: nunber, atleast 2023-11-15 12:06:05 +03:00
i2c hw/i2c: pmbus: add VCAP register 2023-11-07 13:08:49 +01:00
i386 Misc hardware patch queue 2023-11-08 08:32:26 +08:00
ide ide/pci: introduce pci_ide_update_mode() function 2023-11-21 12:45:21 +01:00
input hw/input/stellaris_gamepad: Convert to qemu_input_handler_register() 2023-11-02 12:52:06 +00:00
intc hw/m68k/irqc: Pass CPU using QOM link property 2023-11-01 07:20:34 +01:00
ipack
ipmi
isa hw/isa/vt82c686: Bring back via_isa_set_irq() 2023-11-28 14:26:37 +01:00
loongarch hw/loongarch/virt: Remove unused ISA Bus 2023-10-13 10:03:47 +08:00
m68k hw/char/mcf_uart: Have mcf_uart_create() return DeviceState 2023-11-01 07:31:05 +01:00
mem memory-device: Support empty memory devices 2023-11-03 20:26:59 +01:00
mips hw/mips: Merge 'hw/mips/cpudevs.h' with 'target/mips/cpu.h' 2023-10-19 23:13:27 +02:00
misc hw/misc, hw/ssi: Fix some URLs for AMD / Xilinx models 2023-11-27 15:38:43 +00:00
net include/: spelling fixes 2023-09-08 13:08:52 +03:00
nubus
nvram xlnx-bbram: hw/nvram: Use dot in device type name 2023-10-19 14:32:12 +01:00
openrisc
pci hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2023-11-03 09:20:31 +01:00
pci-bridge hw/cxl: Add a switch mailbox CCI function 2023-11-07 03:39:11 -05:00
pci-host hw/pci-host: Update PHB5 XSCOM registers 2023-11-07 15:49:41 -03:00
ppc ppc patch queue for 2023-11-07: 2023-11-08 20:35:00 +08:00
rdma
remote
riscv riscv: spelling fixes 2023-09-08 13:08:52 +03:00
rtc hw/rtc/aspeed_rtc: Use 64-bit offset for holding time_t difference 2023-08-31 09:45:18 +01:00
rx
s390x * Fix s390x CPU reconfiguration information in the SCLP facility map 2023-11-08 20:34:36 +08:00
scsi scsi: fetch unit attention when creating the request 2023-07-14 11:10:58 +02:00
sd hw/sd: Introduce a "sd-card" SPI variant model 2023-09-01 11:40:04 +02:00
sensor
sh4
southbridge hw/isa/piix: Allow for optional PIT creation in PIIX3 2023-10-22 05:18:17 -04:00
sparc
ssi hw/misc, hw/ssi: Fix some URLs for AMD / Xilinx models 2023-11-27 15:38:43 +00:00
timer
tricore
usb
vfio vfio/pci: Make vfio cdev pre-openable by passing a file handle 2023-12-19 19:03:38 +01:00
virtio hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field 2023-11-27 15:27:39 +00:00
watchdog
xen xen: fix condition for skipping virtio-mmio defines 2023-12-12 11:18:32 +01:00
xtensa
boards.h hw/core/machine: Constify MachineClass::valid_cpu_types[] 2023-11-20 15:30:59 +00:00
clock.h include/: spelling fixes 2023-09-08 13:08:52 +03:00
elf_ops.h include/hw/elf: Remove truncating signed casts 2023-11-06 18:49:34 -08:00
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader-fit.h
loader.h hw/loader: Clean up global variable shadowing in rom_add_file() 2023-11-07 13:08:48 +01:00
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h
qdev-clock.h
qdev-core.h bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
qdev-dma.h
qdev-properties-system.h migration: mode parameter 2023-11-01 16:13:58 +01:00
qdev-properties.h qdev: Rework array properties based on list visitor 2023-11-10 18:19:19 +01:00
register.h
registerfields.h
resettable.h
stream.h
sysbus.h
usb.h
vmstate-if.h