Skip to content

Commit a5e6e65

Browse files
kraxelAlex Williamson
authored andcommitted
sample: vfio bochs vbe display (host device for bochs-drm)
Display device, demo-ing the vfio dmabuf display interface (VFIO_GFX_PLANE_TYPE_DMABUF). Compatible enough to qemu stdvga that bochs-drm.ko can be used as guest driver. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent cacade1 commit a5e6e65

3 files changed

Lines changed: 1420 additions & 0 deletions

File tree

‎samples/Kconfig‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,19 @@ config SAMPLE_VFIO_MDEV_MDPY_FB
132132
help
133133
Guest fbdev driver for the virtual display sample driver.
134134

135+
config SAMPLE_VFIO_MDEV_MBOCHS
136+
tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
137+
depends on VFIO_MDEV_DEVICE && m
138+
help
139+
Build a virtual display sample driver for use as a VFIO
140+
mediated device. It supports the region display interface
141+
(VFIO_GFX_PLANE_TYPE_DMABUF).
142+
Emulate enough of qemu stdvga to make bochs-drm.ko happy.
143+
That is basically the vram memory bar and the bochs dispi
144+
interface vbe registers in the mmio register bar.
145+
Specifically it does *not* include any legacy vga stuff.
146+
Device looks a lot like "qemu -device secondary-vga".
147+
135148
config SAMPLE_STATX
136149
bool "Build example extended-stat using code"
137150
depends on BROKEN

‎samples/vfio-mdev/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
obj-$(CONFIG_SAMPLE_VFIO_MDEV_MTTY) += mtty.o
22
obj-$(CONFIG_SAMPLE_VFIO_MDEV_MDPY) += mdpy.o
33
obj-$(CONFIG_SAMPLE_VFIO_MDEV_MDPY_FB) += mdpy-fb.o
4+
obj-$(CONFIG_SAMPLE_VFIO_MDEV_MBOCHS) += mbochs.o

0 commit comments

Comments
 (0)