Index: VirtualBox-6.1.32/src/VBox/Additions/linux/drm/vbox_drv.c =================================================================== --- VirtualBox-6.1.32.orig/src/VBox/Additions/linux/drm/vbox_drv.c +++ VirtualBox-6.1.32/src/VBox/Additions/linux/drm/vbox_drv.c @@ -50,6 +50,19 @@ #include "version-generated.h" #include "revision-generated.h" +/** Detect whether kernel mode setting is OFF. */ +#if defined(CONFIG_VGA_CONSOLE) +# if RTLNX_VER_MIN(5,17,0) +# define VBOX_VIDEO_NOMODESET() drm_firmware_drivers_only() && vbox_modeset == -1 +# elif RTLNX_VER_MIN(4,7,0) +# define VBOX_VIDEO_NOMODESET() vgacon_text_force() && vbox_modeset == -1 +# else /* < 4.7.0 */ +# define VBOX_VIDEO_NOMODESET() 0 +# endif /* < 4.7.0 */ +#else /* !CONFIG_VGA_CONSOLE */ +# define VBOX_VIDEO_NOMODESET() 0 +#endif /* !CONFIG_VGA_CONSOLE */ + static int vbox_modeset = -1; MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); @@ -401,15 +414,13 @@ static struct drm_driver driver = { static int __init vbox_init(void) { printk("vboxvideo: loading version " VBOX_VERSION_STRING " r" __stringify(VBOX_SVN_REV) "\n"); -#if defined(CONFIG_VGA_CONSOLE) || RTLNX_VER_MIN(4,7,0) - if (vgacon_text_force() && vbox_modeset == -1) + if (VBOX_VIDEO_NOMODESET()) { printk("vboxvideo: kernel is running with *nomodeset* parameter,\n"); printk("vboxvideo: please consider either to remove it or load driver\n"); printk("vboxvideo: with parameter modeset=1, unloading\n"); return -EINVAL; } -#endif if (vbox_modeset == 0) { Index: VirtualBox-6.1.32/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c =================================================================== --- VirtualBox-6.1.32.orig/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c +++ VirtualBox-6.1.32/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c @@ -66,6 +66,12 @@ #define VBOXNETADP_FROM_IFACE(iface) ((PVBOXNETADP) ifnet_softc(iface)) +/** Set netdev MAC address. */ +#if RTLNX_VER_MIN(5,17,0) +# define VBOX_DEV_ADDR_SET(dev, addr, len) dev_addr_mod(dev, 0, addr, len) +#else /* < 5.17.0 */ +# define VBOX_DEV_ADDR_SET(dev, addr, len) memcpy(dev->dev_addr, addr, len) +#endif /********************************************************************************************************************************* * Internal Functions * @@ -303,7 +309,7 @@ int vboxNetAdpOsCreate(PVBOXNETADP pThis if (pNetDev->dev_addr) { - memcpy(pNetDev->dev_addr, pMACAddress, ETH_ALEN); + VBOX_DEV_ADDR_SET(pNetDev, pMACAddress, ETH_ALEN); Log2(("vboxNetAdpOsCreate: pNetDev->dev_addr = %.6Rhxd\n", pNetDev->dev_addr)); /*