virt: vbox: Add support for the new VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES ioctl

Add support for the new VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES ioctl, this
is necessary for automatic resizing of the guest resolution to match the
VM-window size to work with the new VMSVGA virtual GPU which is now the
new default in VirtualBox.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1789545
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200709120858.63928-6-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Hans de Goede 2020-07-09 14:08:55 +02:00 committed by Greg Kroah-Hartman
parent 412f84cff0
commit 631beddc54
3 changed files with 200 additions and 1 deletions

View file

@ -257,6 +257,30 @@ VMMDEV_ASSERT_SIZE(vbg_ioctl_change_filter, 24 + 8);
_IOWR('V', 12, struct vbg_ioctl_change_filter)
/** VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES data structure. */
struct vbg_ioctl_acquire_guest_caps {
/** The header. */
struct vbg_ioctl_hdr hdr;
union {
struct {
/** Flags (VBGL_IOC_AGC_FLAGS_XXX). */
__u32 flags;
/** Capabilities to set (VMMDEV_GUEST_SUPPORTS_XXX). */
__u32 or_mask;
/** Capabilities to drop (VMMDEV_GUEST_SUPPORTS_XXX). */
__u32 not_mask;
} in;
} u;
};
VMMDEV_ASSERT_SIZE(vbg_ioctl_acquire_guest_caps, 24 + 12);
#define VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE 0x00000001
#define VBGL_IOC_AGC_FLAGS_VALID_MASK 0x00000001
#define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES \
_IOWR('V', 13, struct vbg_ioctl_acquire_guest_caps)
/** VBG_IOCTL_CHANGE_GUEST_CAPABILITIES data structure. */
struct vbg_ioctl_set_guest_caps {
/** The header. */