Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __UM_VFIO_USER_H
|
|
#define __UM_VFIO_USER_H
|
|
|
|
struct uml_vfio_user_device {
|
|
int device;
|
|
|
|
struct {
|
|
uint64_t size;
|
|
uint64_t offset;
|
|
} *region;
|
|
int num_regions;
|
|
|
|
int32_t *irqfd;
|
|
int irq_count;
|
|
};
|
|
|
|
int uml_vfio_user_open_container(void);
|
|
int uml_vfio_user_setup_iommu(int container);
|
|
|
|
int uml_vfio_user_get_group_id(const char *device);
|
|
int uml_vfio_user_open_group(int group_id);
|
|
int uml_vfio_user_set_container(int container, int group);
|
|
int uml_vfio_user_unset_container(int container, int group);
|
|
|
|
int uml_vfio_user_setup_device(struct uml_vfio_user_device *dev,
|
|
int group, const char *device);
|
|
void uml_vfio_user_teardown_device(struct uml_vfio_user_device *dev);
|
|
|
|
int uml_vfio_user_activate_irq(struct uml_vfio_user_device *dev, int index);
|
|
void uml_vfio_user_deactivate_irq(struct uml_vfio_user_device *dev, int index);
|
|
int uml_vfio_user_update_irqs(struct uml_vfio_user_device *dev);
|
|
|
|
int uml_vfio_user_cfgspace_read(struct uml_vfio_user_device *dev,
|
|
unsigned int offset, void *buf, int size);
|
|
int uml_vfio_user_cfgspace_write(struct uml_vfio_user_device *dev,
|
|
unsigned int offset, const void *buf, int size);
|
|
|
|
int uml_vfio_user_bar_read(struct uml_vfio_user_device *dev, int bar,
|
|
unsigned int offset, void *buf, int size);
|
|
int uml_vfio_user_bar_write(struct uml_vfio_user_device *dev, int bar,
|
|
unsigned int offset, const void *buf, int size);
|
|
|
|
#endif /* __UM_VFIO_USER_H */
|