qemu/util
Yi Liu d6b5c4c1b5 util/char_dev: Add open_cdev()
/dev/vfio/devices/vfioX may not exist. In that case it is still possible
to open /dev/char/$major:$minor instead. Add helper function to abstract
the cdev open.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Eric Auger <eric.auger@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
..
aio-posix.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
aio-posix.h aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
aio-wait.c aio-wait: avoid AioContext lock in aio_wait_bh_oneshot() 2023-05-10 14:15:13 +02:00
aio-win32.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
aiocb.c
async.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
atomic64.c
base64.c
bitmap.c
bitops.c replace TABs with spaces 2023-03-20 12:43:50 +01:00
block-helpers.c
block-helpers.h
buffer.c
bufferiszero.c util/bufferiszero: Use i386 host/cpuinfo.h 2023-05-23 16:51:13 -07:00
cacheflush.c util/cacheflush: Avoid possible redundant dcache flush on Darwin 2023-06-13 11:28:58 +02:00
chardev_open.c util/char_dev: Add open_cdev() 2023-12-19 19:03:38 +01:00
compatfd.c
coroutine-sigaltstack.c osdep: set _FORTIFY_SOURCE=2 when optimization is enabled 2023-10-04 09:52:06 -04:00
coroutine-ucontext.c osdep: set _FORTIFY_SOURCE=2 when optimization is enabled 2023-10-04 09:52:06 -04:00
coroutine-windows.c build: move coroutine backend selection to meson 2023-05-18 08:53:52 +02:00
cpuinfo-aarch64.c *: Delete checks for old host definitions 2023-09-19 13:20:54 -04:00
cpuinfo-i386.c host/include/i386: Implement clmul.h 2023-09-15 13:57:00 +00:00
cpuinfo-loongarch.c util: Add cpuinfo for loongarch64 2023-11-06 08:27:21 -08:00
cpuinfo-ppc.c util: spelling fixes 2023-08-31 19:47:43 +02:00
crc-ccitt.c
crc32c.c igb: Implement Rx SCTP CSO 2023-05-23 15:20:15 +08:00
cutils.c cutils: Fix get_relocated_path on Windows 2023-10-19 23:13:27 +02:00
dbus.c
defer-call.c util/defer-call: move defer_call() to util/ 2023-10-31 15:41:42 +01:00
drm.c
envlist.c replace TABs with spaces 2023-03-20 12:43:50 +01:00
error-report.c
error.c util/error: Fix use-after-free errors reported by Coverity 2023-04-06 12:38:42 -04:00
event_notifier-posix.c
event_notifier-win32.c
fdmon-epoll.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
fdmon-io_uring.c aio-posix: zero out io_uring sqe user_data 2023-08-30 07:39:59 -04:00
fdmon-poll.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
fifo8.c
filemonitor-inotify.c util/filemonitor-inotify.c: spelling fix: kenel 2023-11-15 12:06:05 +03:00
filemonitor-stub.c
getauxval.c
guest-random.c util/guest-random: Clean up global variable shadowing 2023-10-06 13:27:48 +02:00
hbitmap.c hbitmap: fix hbitmap_status() return value for first dirty bit case 2023-02-17 14:34:24 +01:00
hexdump.c
host-utils.c
id.c
int128.c include/qemu/int128: Use Int128 structure for TCI 2023-02-04 06:19:42 -10:00
interval-tree.c util/interval-tree: Check root for null in interval_tree_iter_first 2023-08-09 09:26:32 -07:00
iov.c util/iov: Avoid dynamic stack allocation 2023-09-07 20:32:11 -05:00
iova-tree.c
keyval.c
lockcnt.c
log.c util/log: re-allow switching away from stderr log file 2023-10-07 19:02:33 +02:00
main-loop.c util: spelling fixes 2023-08-31 19:47:43 +02:00
memalign.c
memfd.c
meson.build util/char_dev: Add open_cdev() 2023-12-19 19:03:38 +01:00
mmap-alloc.c util/mmap-alloc: qemu_fd_getfs() 2023-04-24 11:29:00 +02:00
module.c
notify.c
nvdimm-utils.c
osdep.c
oslib-posix.c util: Delete checks for old host definitions 2023-09-15 05:26:50 -07:00
oslib-win32.c win32: avoid discarding the exception handler 2023-10-03 15:05:20 +04:00
path.c
qdist.c util: spelling fixes 2023-08-31 19:47:43 +02:00
qemu-co-shared-resource.c
qemu-co-timeout.c
qemu-config.c error: Drop superfluous #include "qapi/qmp/qerror.h" 2023-02-23 13:56:14 +01:00
qemu-coroutine-io.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
qemu-coroutine-lock.c atomics: eliminate mb_read/mb_set 2023-06-06 09:42:14 +02:00
qemu-coroutine-sleep.c
qemu-coroutine.c meson: do not use set10 2023-10-17 15:20:53 +02:00
qemu-option.c
qemu-print.c
qemu-progress.c
qemu-sockets.c util: spelling fixes 2023-08-31 19:47:43 +02:00
qemu-thread-common.h
qemu-thread-posix.c qemu-thread-posix: cleanup, fix, document QemuEvent 2023-03-07 12:38:40 +01:00
qemu-thread-win32.c qemu-thread-win32: cleanup, fix, document QemuEvent 2023-03-07 12:38:40 +01:00
qemu-timer-common.c
qemu-timer.c
qht.c util/qht: use striped locks under TSAN 2023-02-02 11:48:20 +00:00
qsp.c accel/tcg: include cs_base in our hash calculations 2023-06-01 11:05:05 -04:00
qtree.c tcg: use QTree instead of GTree 2023-03-28 15:23:10 -07:00
range.c util/range.c: spelling fix: inbetween 2023-11-15 12:06:05 +03:00
rcu.c util: spelling fixes 2023-08-31 19:47:43 +02:00
readline.c readline: Extract readline_add_completion_of() from monitor 2023-02-04 07:56:54 +01:00
reserved-region.c util/reserved-region: Add new ReservedRegion helpers 2023-11-03 09:20:31 +01:00
selfmap.c util/selfmap: Use dev_t and ino_t in MapInfo 2023-09-01 13:34:03 -07:00
stats64.c stat64: Add stat64_set() operation 2023-04-27 16:39:43 +02:00
sys_membarrier.c
systemd.c systemd: Also clear LISTEN_FDNAMES during systemd socket activation 2023-05-03 14:00:08 -05:00
thread-context.c
thread-pool.c virtio: use defer_call() in virtio_irqfd_notify() 2023-10-31 15:42:14 +01:00
throttle.c throttle: use THROTTLE_MAX/ARRAY_SIZE for hard code 2023-08-29 10:49:24 +02:00
timed-average.c
trace-events console/win32: allocate shareable display surface 2023-06-27 17:08:56 +02:00
trace.h
transactions.c
unicode.c
uri.c Updated the FSF address to <https://www.gnu.org/licenses/> 2023-02-27 09:15:39 +01:00
userfaultfd.c util/userfaultfd: Support /dev/userfaultfd 2023-02-11 16:51:09 +01:00
uuid.c util/uuid: Add UUID_STR_LEN definition 2023-11-03 09:20:31 +01:00
vfio-helpers.c util/vfio-helpers: Use g_file_read_link() 2023-05-24 09:21:22 +02:00
vhost-user-server.c export/vhost-user-blk: Fix consecutive drains 2023-11-28 14:56:32 +01:00
yank.c