From ae2df53d7cdb086ba6774aa29f49406035dd04b8974ee575864d6cf906719343 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Sat, 16 Apr 2016 11:47:44 +0000 Subject: [PATCH 1/5] Accepting request 390257 from home:lwfinger:branches:Virtualization Fix for page-cache-release() no longer in kernel OBS-URL: https://build.opensuse.org/request/show/390257 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=250 --- vbox-replace-page-cache-release.diff | 35 ++++++++++++++++++++++++++++ virtualbox.changes | 6 +++++ virtualbox.spec | 3 +++ 3 files changed, 44 insertions(+) create mode 100644 vbox-replace-page-cache-release.diff diff --git a/vbox-replace-page-cache-release.diff b/vbox-replace-page-cache-release.diff new file mode 100644 index 0000000..23f365a --- /dev/null +++ b/vbox-replace-page-cache-release.diff @@ -0,0 +1,35 @@ +Index: VirtualBox-5.0.17/src/VBox/Additions/linux/sharedfolders/regops.c +=================================================================== +--- VirtualBox-5.0.17.orig/src/VBox/Additions/linux/sharedfolders/regops.c ++++ VirtualBox-5.0.17/src/VBox/Additions/linux/sharedfolders/regops.c +@@ -712,7 +712,7 @@ int sf_write_end(struct file *file, stru + } + + unlock_page(page); +- page_cache_release(page); ++ put_page(page); + + return nwritten; + } +Index: VirtualBox-5.0.17/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +=================================================================== +--- VirtualBox-5.0.17.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c ++++ VirtualBox-5.0.17/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +@@ -578,7 +578,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR + { + if (!PageReserved(pMemLnx->apPages[iPage])) + SetPageDirty(pMemLnx->apPages[iPage]); +- page_cache_release(pMemLnx->apPages[iPage]); ++ put_page(pMemLnx->apPages[iPage]); + } + + if (pTask && pTask->mm) +@@ -1081,7 +1081,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser + { + if (!PageReserved(pMemLnx->apPages[rc])) + SetPageDirty(pMemLnx->apPages[rc]); +- page_cache_release(pMemLnx->apPages[rc]); ++ put_page(pMemLnx->apPages[rc]); + } + + up_read(&pTask->mm->mmap_sem); diff --git a/virtualbox.changes b/virtualbox.changes index b5d5d27..e7f8193 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 15 19:17:58 UTC 2016 - Larry.Finger@lwfinger.net + +- Fix build error caused by removal of macro page_cache_release() from kernel. + File "vbox-replace-page-cache-release.diff" is used to modify code to use put_page() instead. + ------------------------------------------------------------------- Mon Apr 4 00:01:12 UTC 2016 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index c27b98b..3da0173 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -87,6 +87,8 @@ Patch109: vbox-usb-warning.diff Patch110: VirtualBox-5.0.17-r106108-r106140.patch # Prevent Guest Additions from creating wrong SONAME Patch111: vbox_prevent_wrong_SONAME.patch +# Fix removal of page_cache_release() macro in 4.6 kernels +Patch112: vbox-replace-page-cache-release.diff # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -319,6 +321,7 @@ This package contains icons for guest desktop files that were created on the des %patch109 -p1 %patch110 -p0 %patch111 -p1 +%patch112 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf #copy kbuild config From f725b69be85c351d5776d3bbd4a26106bbf3c56790790f2e195fc80e1500244e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 20 Apr 2016 17:24:34 +0000 Subject: [PATCH 2/5] Accepting request 390825 from home:lwfinger:branches:Virtualization =Version bump to 5.0.18 OBS-URL: https://build.opensuse.org/request/show/390825 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=251 --- UserManual.pdf | 4 +- VirtualBox-5.0.17-patched.tar.bz2 | 3 - VirtualBox-5.0.17-r106108-r106140.patch | 267 ------------------------ VirtualBox-5.0.18-patched.tar.bz2 | 3 + vbox-replace-page-cache-release.diff | 35 ---- virtualbox.changes | 34 +++ virtualbox.spec | 8 +- 7 files changed, 40 insertions(+), 314 deletions(-) delete mode 100644 VirtualBox-5.0.17-patched.tar.bz2 delete mode 100644 VirtualBox-5.0.17-r106108-r106140.patch create mode 100644 VirtualBox-5.0.18-patched.tar.bz2 delete mode 100644 vbox-replace-page-cache-release.diff diff --git a/UserManual.pdf b/UserManual.pdf index 617f972..8e01de5 100644 --- a/UserManual.pdf +++ b/UserManual.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:695b21a9460b46629d5917c2a7651302044620d730e038c1e69398467392a911 -size 3489132 +oid sha256:3d42ff4874bf755bbd24926ecce68ceace8f00f9a098f829ecf2dcb66040354e +size 3492049 diff --git a/VirtualBox-5.0.17-patched.tar.bz2 b/VirtualBox-5.0.17-patched.tar.bz2 deleted file mode 100644 index 1750822..0000000 --- a/VirtualBox-5.0.17-patched.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fe6c170f395ae3caa10e1f06ffb5999e3258bbf37723ce7fa0c7ed7ac5e76cce -size 77502602 diff --git a/VirtualBox-5.0.17-r106108-r106140.patch b/VirtualBox-5.0.17-r106108-r106140.patch deleted file mode 100644 index 5df91ec..0000000 --- a/VirtualBox-5.0.17-r106108-r106140.patch +++ /dev/null @@ -1,267 +0,0 @@ -Index: src/VBox/Additions/linux/drm/vbox_drv.h -=================================================================== ---- src/VBox/Additions/linux/drm/vbox_drv.h (revision 106108) -+++ src/VBox/Additions/linux/drm/vbox_drv.h (revision 106140) -@@ -118,6 +118,9 @@ - - struct mutex hw_mutex; - bool isr_installed; -+ /** Have we finished fbdev initialisation? We limit reported display -+ * modes to 800x600 until this point to get a sensible console size. */ -+ bool fbdev_init; - struct work_struct hotplug_work; - }; - -Index: src/VBox/Additions/linux/drm/vbox_mode.c -=================================================================== ---- src/VBox/Additions/linux/drm/vbox_mode.c (revision 106108) -+++ src/VBox/Additions/linux/drm/vbox_mode.c (revision 106140) -@@ -426,11 +426,15 @@ - { - struct vbox_connector *vbox_connector = NULL; - struct drm_display_mode *mode = NULL; -+ struct vbox_private *vbox = NULL; - unsigned num_modes = 0; - int preferred_width, preferred_height; - - LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector)); - vbox_connector = to_vbox_connector(connector); -+ vbox = connector->dev->dev_private; -+ if (!vbox->fbdev_init) -+ return drm_add_modes_noedid(connector, 800, 600); - num_modes = drm_add_modes_noedid(connector, 2560, 1600); - preferred_width = vbox_connector->mode_hint.width ? vbox_connector->mode_hint.width : 1024; - preferred_height = vbox_connector->mode_hint.height ? vbox_connector->mode_hint.height : 768; -@@ -691,5 +695,8 @@ - static int vbox_cursor_move(struct drm_crtc *crtc, - int x, int y) - { -+ struct vbox_private *vbox = crtc->dev->dev_private; -+ -+ VBoxHGSMICursorPosition(&vbox->submit_info, true, x, y, NULL, NULL); - return 0; - } -Index: src/VBox/Additions/linux/drm/vbox_fb.c -=================================================================== ---- src/VBox/Additions/linux/drm/vbox_fb.c (revision 106108) -+++ src/VBox/Additions/linux/drm/vbox_fb.c (revision 106140) -@@ -438,6 +438,7 @@ - ret = drm_fb_helper_initial_config(&fbdev->helper, 32); - if (ret) - goto fini; -+ vbox->fbdev_init = true; - - LogFunc(("vboxvideo: %d\n", __LINE__)); - return 0; -Index: src/VBox/Additions/linux/drm/vbox_drv.c -=================================================================== ---- src/VBox/Additions/linux/drm/vbox_drv.c (revision 106108) -+++ src/VBox/Additions/linux/drm/vbox_drv.c (revision 106140) -@@ -257,7 +257,7 @@ - /* Do not load if any of the virtual consoles is in graphics mode to be - * sure that we do not pick a fight with a user-mode driver or VESA. */ - for (i = 0; i < MAX_NR_CONSOLES - 1; ++i) -- if (vc_cons[i].d->vc_mode == KD_GRAPHICS) -+ if (vc_cons[i].d && vc_cons[i].d->vc_mode == KD_GRAPHICS) - return -EINVAL; - - return drm_pci_init(&driver, &vbox_pci_driver); -Index: src/VBox/Additions/linux/installer/vboxadd-x11.sh -=================================================================== ---- src/VBox/Additions/linux/installer/vboxadd-x11.sh (revision 106108) -+++ src/VBox/Additions/linux/installer/vboxadd-x11.sh (revision 106140) -@@ -424,7 +424,7 @@ - } - # Do not install if we can use the kernel driver. - case `uname -r` in -- 1.* | 2.* | 3.[0-9].* | 3.11 ) ;; -+ 1.* | 2.* | 3.[0-9].* | 3.10.* ) ;; - * ) vboxvideo_src="" ;; - esac - ;; -Index: src/VBox/Additions/common/crOpenGL/egl.c -=================================================================== ---- src/VBox/Additions/common/crOpenGL/egl.c (revision 106108) -+++ src/VBox/Additions/common/crOpenGL/egl.c (revision 106140) -@@ -910,6 +910,13 @@ - return setEGLError(EGL_BAD_MATCH); - } - -+DECLEXPORT(EGLBoolean) eglSwapInterval (EGLDisplay dpy, EGLint interval) -+{ -+ NOREF(dpy); -+ NOREF(interval); -+ return EGL_TRUE; -+} -+ - typedef void (*VBEGLFuncPtr)(void); - DECLEXPORT(VBEGLFuncPtr)eglGetProcAddress(const char *pszName) - { -Index: src/VBox/Additions/x11/vboxvideo/vboxvideo.c -=================================================================== ---- src/VBox/Additions/x11/vboxvideo/vboxvideo.c (revision 106108) -+++ src/VBox/Additions/x11/vboxvideo/vboxvideo.c (revision 106140) -@@ -1010,102 +1010,8 @@ - } - #endif - --#ifdef VBOXVIDEO_13 -+#ifndef VBOXVIDEO_13 - --static void setVirtualSizeRandR12(ScrnInfoPtr pScrn, bool fScreenInitTime) --{ -- VBOXPtr pVBox = VBOXGetRec(pScrn); -- unsigned i; -- unsigned cx = 0; -- unsigned cy = 0; -- -- for (i = 0; i < pVBox->cScreens; ++i) -- { -- if ( pVBox->fHaveHGSMIModeHints && pVBox->pScreens[i].afHaveLocation) -- { -- pVBox->pScreens[i].paCrtcs->x = pVBox->pScreens[i].aPreferredLocation.x; -- pVBox->pScreens[i].paCrtcs->y = pVBox->pScreens[i].aPreferredLocation.y; -- } -- if ( pVBox->pScreens[i].paOutputs->status == XF86OutputStatusConnected -- && pVBox->pScreens[i].paCrtcs->x + pVBox->pScreens[i].aPreferredSize.cx < VBOX_VIDEO_MAX_VIRTUAL -- && pVBox->pScreens[i].paCrtcs->y + pVBox->pScreens[i].aPreferredSize.cy < VBOX_VIDEO_MAX_VIRTUAL) -- { -- cx = max(cx, pVBox->pScreens[i].paCrtcs->x + pVBox->pScreens[i].aPreferredSize.cx); -- cy = max(cy, pVBox->pScreens[i].paCrtcs->y + pVBox->pScreens[i].aPreferredSize.cy); -- } -- } -- if (cx != 0 && cy != 0) -- { -- /* Do not set the virtual resolution in limited context as that can -- * cause problems setting up RandR 1.2 which needs it set to the -- * maximum size at this point. */ -- if (!fScreenInitTime) -- { -- TRACE_LOG("cx=%u, cy=%u\n", cx, cy); -- xf86ScrnToScreen(pScrn)->width = cx; -- xf86ScrnToScreen(pScrn)->height = cy; -- xf86ScrnToScreen(pScrn)->mmWidth = cx * 254 / 960; -- xf86ScrnToScreen(pScrn)->mmHeight = cy * 254 / 960; -- adjustScreenPixmap(pScrn, cx, cy); -- vbvxSetSolarisMouseRange(cx, cy); -- } -- } --} -- --static void setScreenSizesRandR12(ScrnInfoPtr pScrn, bool fScreenInitTime) --{ -- VBOXPtr pVBox = VBOXGetRec(pScrn); -- unsigned i; -- -- for (i = 0; i < pVBox->cScreens; ++i) -- { -- if (!pVBox->pScreens[i].afConnected) -- continue; -- /* The Crtc can get "unset" if the screen was disconnected previously. -- * I couldn't find an API to re-set it which did not have side-effects. -- */ -- pVBox->pScreens[i].paOutputs->crtc = pVBox->pScreens[i].paCrtcs; -- xf86CrtcSetMode(pVBox->pScreens[i].paCrtcs, pVBox->pScreens[i].paOutputs->probed_modes, RR_Rotate_0, -- pVBox->pScreens[i].paCrtcs->x, pVBox->pScreens[i].paCrtcs->y); -- if (!fScreenInitTime) -- RRCrtcNotify(pVBox->pScreens[i].paCrtcs->randr_crtc, pVBox->pScreens[i].paOutputs->randr_output->modes[0], -- pVBox->pScreens[i].paCrtcs->x, pVBox->pScreens[i].paCrtcs->y, RR_Rotate_0, --#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5 -- NULL, --#endif -- 1, &pVBox->pScreens[i].paOutputs->randr_output); -- } --} -- --static void setSizesRandR12(ScrnInfoPtr pScrn, bool fScreenInitTime) --{ -- VBOXPtr pVBox = VBOXGetRec(pScrn); -- -- if (!fScreenInitTime) -- { --# if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5 -- RRGetInfo(xf86ScrnToScreen(pScrn), TRUE); --# else -- RRGetInfo(xf86ScrnToScreen(pScrn)); --# endif -- } -- setVirtualSizeRandR12(pScrn, fScreenInitTime); -- setScreenSizesRandR12(pScrn, fScreenInitTime); -- if (!fScreenInitTime) -- { -- /* We use RRScreenSizeSet() here and not RRScreenSizeNotify() because -- * the first also pushes the virtual screen size to the input driver. -- * We were doing this manually by setting screenInfo.width and height -- * and calling xf86UpdateDesktopDimensions() where appropriate, but this -- * failed on Ubuntu 12.04.0 due to a problematic X server back-port. */ -- RRScreenSizeSet(xf86ScrnToScreen(pScrn), xf86ScrnToScreen(pScrn)->width, xf86ScrnToScreen(pScrn)->height, -- xf86ScrnToScreen(pScrn)->mmWidth, xf86ScrnToScreen(pScrn)->mmHeight); -- RRTellChanged(xf86ScrnToScreen(pScrn)); -- } --} -- --#else -- - #define PREFERRED_MODE_ATOM_NAME "VBOXVIDEO_PREFERRED_MODE" - - static void setSizesRandR11(ScrnInfoPtr pScrn) -@@ -1131,7 +1037,11 @@ - - TRACE_LOG("fScreenInitTime=%d\n", (int)fScreenInitTime); - #ifdef VBOXVIDEO_13 -- setSizesRandR12(pScrn, fScreenInitTime); -+# if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5 -+ RRGetInfo(xf86ScrnToScreen(pScrn), TRUE); -+# else -+ RRGetInfo(xf86ScrnToScreen(pScrn)); -+# endif - #else - setSizesRandR11(pScrn); - #endif -@@ -1246,8 +1156,6 @@ - if (ShadowFBInit2(pScreen, NULL, vbvxHandleDirtyRect) != TRUE) - return FALSE; - VBoxInitialiseSizeHints(pScrn); -- /* Get any screen size hints from HGSMI. */ -- vbvxReadSizesAndCursorIntegrationFromHGSMI(pScrn, NULL); - - #ifdef VBOXVIDEO_13 - /* Initialise CRTC and output configuration for use with randr1.2. */ -@@ -1304,7 +1212,9 @@ - } - - /* set first video mode */ -- setSizesAndCursorIntegration(pScrn, true); -+ if (!xf86SetDesiredModes(pScrn)) { -+ return FALSE; -+ } - #else - /* set first video mode */ - setModeRandR11(pScrn, pScrn->currentMode, true, false, 0, 0); -@@ -1368,8 +1278,9 @@ - vboxEnableVbva(pScrn); - /* Re-set video mode */ - #ifdef VBOXVIDEO_13 -- vbvxReadSizesAndCursorIntegrationFromHGSMI(pScrn, NULL); -- setSizesAndCursorIntegration(pScrn, false); -+ if (!xf86SetDesiredModes(pScrn)) { -+ return FALSE; -+ } - #else - updateGraphicsCapability(pScrn, TRUE); - setModeRandR11(pScrn, pScrn->currentMode, false, true, cXOverRide, cYOverRide); -Index: src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm -=================================================================== ---- src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm (revision 106108) -+++ src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm (revision 106140) -@@ -88,6 +88,10 @@ - if (self) - m_pCallbacks = [[NSMutableArray alloc] init]; - -+ /* Gently disable El Capitan tries to break everything with the Enter Full Screen action. -+ * S.a. https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/ for reference. */ -+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"]; -+ - return self; - } - diff --git a/VirtualBox-5.0.18-patched.tar.bz2 b/VirtualBox-5.0.18-patched.tar.bz2 new file mode 100644 index 0000000..c66f658 --- /dev/null +++ b/VirtualBox-5.0.18-patched.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b44ac9e8c701158848ebdfbd1240845f58fa81d31b13fe87e5bf0a671b7453bd +size 76907449 diff --git a/vbox-replace-page-cache-release.diff b/vbox-replace-page-cache-release.diff deleted file mode 100644 index 23f365a..0000000 --- a/vbox-replace-page-cache-release.diff +++ /dev/null @@ -1,35 +0,0 @@ -Index: VirtualBox-5.0.17/src/VBox/Additions/linux/sharedfolders/regops.c -=================================================================== ---- VirtualBox-5.0.17.orig/src/VBox/Additions/linux/sharedfolders/regops.c -+++ VirtualBox-5.0.17/src/VBox/Additions/linux/sharedfolders/regops.c -@@ -712,7 +712,7 @@ int sf_write_end(struct file *file, stru - } - - unlock_page(page); -- page_cache_release(page); -+ put_page(page); - - return nwritten; - } -Index: VirtualBox-5.0.17/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c -=================================================================== ---- VirtualBox-5.0.17.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c -+++ VirtualBox-5.0.17/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c -@@ -578,7 +578,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR - { - if (!PageReserved(pMemLnx->apPages[iPage])) - SetPageDirty(pMemLnx->apPages[iPage]); -- page_cache_release(pMemLnx->apPages[iPage]); -+ put_page(pMemLnx->apPages[iPage]); - } - - if (pTask && pTask->mm) -@@ -1081,7 +1081,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser - { - if (!PageReserved(pMemLnx->apPages[rc])) - SetPageDirty(pMemLnx->apPages[rc]); -- page_cache_release(pMemLnx->apPages[rc]); -+ put_page(pMemLnx->apPages[rc]); - } - - up_read(&pTask->mm->mmap_sem); diff --git a/virtualbox.changes b/virtualbox.changes index e7f8193..f760a78 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Wed Apr 20 05:02:21 UTC 2016 - Larry.Finger@lwfinger.net + +- Version bump to 5.0.18 (released 2016-04-18 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + + GUI: position off-screen windows to be fully visible again on relaunch in consistence with default-behavior (bug #15226) + GUI: fixed the View menu / Full-screen Mode behavior on Mac OS X El Capitan + GUI: fixed a test which allowed to encrypt a hard disk with an empty password + GUI: fixed a crash under certain conditions during VM shutdown + GUI: fixed the size of the VM list scrollbar in the VM selector when entering a group + PC speaker passthrough: fixes (Linux hosts only; bug #627) + Drag and drop: several fixes + SATA: fixed hotplug flag handling when EFI is used + Storage: fixed handling of encrypted disk images with SCSI controllers (bug #14812) + Storage: fixed possible crash with Solaris 7 if the BusLogic SCSI controller is used + USB: properly purge non-ASCII characters from USB strings (bugs #8801, #15222) + NAT Network: fixed 100% CPU load in VBoxNetNAT on Mac OS X under certain circumstances (bug #15223) + ACPI: fixed ACPI tables to make the display color management settings available again for older Windows versions (4.3.22 regression) + Guest Control: fixed VBoxManage copyfrom command (bug #14336) + Snapshots: fixed several problems when removing older snapshots (bug #15206) + VBoxManage: fixed --verbose output of the guestcontrol command + Windows hosts: hardening fixes required for recent Windows 10 insider builds (bugs #15245, #15296) + Windows hosts: fixed support of jumbo frames in with bridged networking (5.0.16 regression; bug #15209) + Windows hosts: don't prevent receiving multicast traffic if host-only adapters are installed (bug #8698) + Linux hosts: added support for the new naming scheme of NVME disks when creating raw disks + Solaris hosts / guests: properly sign the kernel modules (bug #12608) + Linux hosts / guests: Linux 4.5 fixes (bug #15251) + Linux hosts / guests: Linux 4.6 fixes (bug #15298) + Linux Additions: added a kernel graphics driver to support graphics when X.Org does not have root rights (bug #14732) + Linux/Solaris Additions: fixed several issues causing Linux/Solatis guests using software rendering when 3D acceleration is available + Windows Additions: fixed a hang with PowerPoint 2010 and the WDDM drivers if Aero is disabled + ------------------------------------------------------------------- Fri Apr 15 19:17:58 UTC 2016 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 3da0173..325a9ef 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -19,7 +19,7 @@ %define _vbox_instdir %{_libexecdir}/virtualbox %define _udevrulesdir %{_libexecdir}/udev/rules.d Name: virtualbox -Version: 5.0.17 +Version: 5.0.18 Release: 0 Summary: VirtualBox is an Emulator License: GPL-2.0+ @@ -83,12 +83,8 @@ Patch107: virtualbox-sed-params.patch Patch108: virtualbox-snpritnf-buffer-overflow.patch # Patch to add code to explain USB Passthru Patch109: vbox-usb-warning.diff -# Upgrade sources from r106108 to r106140 -Patch110: VirtualBox-5.0.17-r106108-r106140.patch # Prevent Guest Additions from creating wrong SONAME Patch111: vbox_prevent_wrong_SONAME.patch -# Fix removal of page_cache_release() macro in 4.6 kernels -Patch112: vbox-replace-page-cache-release.diff # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -319,9 +315,7 @@ This package contains icons for guest desktop files that were created on the des %patch107 -p1 %patch108 -p1 %patch109 -p1 -%patch110 -p0 %patch111 -p1 -%patch112 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf #copy kbuild config From ec046acca62981447dbb1ac13615fa8e841538b29d63800fc8ca562ad458c18a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 20 Apr 2016 17:32:02 +0000 Subject: [PATCH 3/5] - OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=252 --- virtualbox.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/virtualbox.changes b/virtualbox.changes index f760a78..06b3abf 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -31,6 +31,7 @@ This is a maintenance release. The following items were fixed and/or added: Linux Additions: added a kernel graphics driver to support graphics when X.Org does not have root rights (bug #14732) Linux/Solaris Additions: fixed several issues causing Linux/Solatis guests using software rendering when 3D acceleration is available Windows Additions: fixed a hang with PowerPoint 2010 and the WDDM drivers if Aero is disabled +- Drop VirtualBox-5.0.17-r106108-r106140.patch, fixed upstream. ------------------------------------------------------------------- Fri Apr 15 19:17:58 UTC 2016 - Larry.Finger@lwfinger.net From 3ba5df7f20e357beb9d05e86be6e07795309d8b1fef56cf23851c4a8e7f06e58 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Sat, 23 Apr 2016 05:10:51 +0000 Subject: [PATCH 4/5] Accepting request 391337 from home:lwfinger:branches:Virtualization Fix LsiLogic adapter error in 5.0.18 OBS-URL: https://build.opensuse.org/request/show/391337 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=253 --- changeset_60565.diff | 13 +++++++++++++ virtualbox.changes | 12 ++++++++++++ virtualbox.spec | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 changeset_60565.diff diff --git a/changeset_60565.diff b/changeset_60565.diff new file mode 100644 index 0000000..6828205 --- /dev/null +++ b/changeset_60565.diff @@ -0,0 +1,13 @@ +Index: VirtualBox-5.0.18/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp +=================================================================== +--- VirtualBox-5.0.18.orig/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp ++++ VirtualBox-5.0.18/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp +@@ -3889,7 +3889,7 @@ static DECLCALLBACK(int) lsilogicR3IsaIO + else if (RT_FAILURE(rc)) + AssertMsgFailed(("Writing BIOS register failed %Rrc\n", rc)); + +- return rc; ++ return VINF_SUCCESS; + } + + /** diff --git a/virtualbox.changes b/virtualbox.changes index 06b3abf..e7abdd8 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Apr 22 19:38:06 UTC 2016 - Larry.Finger@lwfinger.net + +- This submission fixes the bug in VB 5.0.18 that prevents proper operation + for guest VMs configured to use a LsiLogic adapter for disks. See ticket: + https://www.virtualbox.org/ticket/15317 for a description of the problem, + and changeset: https://www.virtualbox.org/changeset/60565/vbox for the fix, + which is implemented in file "changeset_60565.diff". + + This update contains a fix for CVE-2016-0678. Bug report b.o.o #97366 + discusses this vulnerability. + ------------------------------------------------------------------- Wed Apr 20 05:02:21 UTC 2016 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 325a9ef..6c334b3 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -85,6 +85,8 @@ Patch108: virtualbox-snpritnf-buffer-overflow.patch Patch109: vbox-usb-warning.diff # Prevent Guest Additions from creating wrong SONAME Patch111: vbox_prevent_wrong_SONAME.patch +# Apply Changeset 60565 - Fix bug in DevLsiLogicSCSI.cpp +Patch112: changeset_60565.diff # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -316,6 +318,7 @@ This package contains icons for guest desktop files that were created on the des %patch108 -p1 %patch109 -p1 %patch111 -p1 +%patch112 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf #copy kbuild config From 0fb113d11a530472bad2bfad867deddf6e8531acc885413012862f39bebe0f06 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 26 Apr 2016 12:37:23 +0000 Subject: [PATCH 5/5] Accepting request 391691 from home:eeich:branches:Virtualization - drm-vboxvideo-Initialize-data-needed-to-map-fbdev-memory.patch: * Add missing initialization of scanout buffer base and size for proper fbdev support. - drm-vboxvideo-Add-delayed-update-to-support-fbdev.patch: * Add support for delayed_io in fbdev-layer. (boo#977200). OBS-URL: https://build.opensuse.org/request/show/391691 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=254 --- ...-Add-delayed-update-to-support-fbdev.patch | 78 +++++++++++++++++++ ...lize-data-needed-to-map-fbdev-memory.patch | 60 ++++++++++++++ virtualbox.changes | 10 +++ virtualbox.spec | 5 ++ 4 files changed, 153 insertions(+) create mode 100644 drm-vboxvideo-Add-delayed-update-to-support-fbdev.patch create mode 100644 drm-vboxvideo-Initialize-data-needed-to-map-fbdev-memory.patch diff --git a/drm-vboxvideo-Add-delayed-update-to-support-fbdev.patch b/drm-vboxvideo-Add-delayed-update-to-support-fbdev.patch new file mode 100644 index 0000000..2a7b6f1 --- /dev/null +++ b/drm-vboxvideo-Add-delayed-update-to-support-fbdev.patch @@ -0,0 +1,78 @@ +From: Egbert Eich +Date: Mon Apr 25 16:47:41 2016 +0200 +Subject: drm/vboxvideo: Add delayed update to support fbdev +Patch-mainline: Not yet +Git-commit: 0671f61d2a240e26c02d5a4d5cb993e1a446e601 +References: boo#977200 + +Due to the virtrual nature of the emulated hardware, the +hardware needs help to know about updates to screen content. +The fb layer provides this with 'deferred IO'. +This patch adds support for this to the vboxvideo DRM driver. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/VBox/Additions/linux/drm/vbox_fb.c | 36 ++++++++++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) +diff --git a/src/VBox/Additions/linux/drm/vbox_fb.c b/src/VBox/Additions/linux/drm/vbox_fb.c +index 8e0e40d..e8c5a60 100644 +--- a/src/VBox/Additions/linux/drm/vbox_fb.c ++++ b/src/VBox/Additions/linux/drm/vbox_fb.c +@@ -68,6 +68,7 @@ + #include + #include "vbox_drv.h" + ++#define VBOX_DIRTY_DELAY (HZ / 30) + /** + * Tell the host about dirty rectangles to update. + */ +@@ -162,6 +163,38 @@ static void vbox_dirty_update(struct vbox_fbdev *fbdev, + vbox_bo_unreserve(bo); + } + ++static void vbox_deferred_io(struct fb_info *info, ++ struct list_head *pagelist) ++{ ++ struct vbox_fbdev *fbdev = info->par; ++ unsigned long start, end, min, max; ++ struct page *page; ++ int y1, y2; ++ ++ min = ULONG_MAX; ++ max = 0; ++ list_for_each_entry(page, pagelist, lru) { ++ start = page->index << PAGE_SHIFT; ++ end = start + PAGE_SIZE - 1; ++ min = min(min, start); ++ max = max(max, end); ++ } ++ ++ if (min < max) { ++ y1 = min / info->fix.line_length; ++ y2 = (max / info->fix.line_length) + 1; ++ printk(KERN_INFO "%s: Calling dirty update: 0, %d, %d, %d\n", ++ __func__, y1, info->var.xres, y2 - y1 - 1); ++ vbox_dirty_update(fbdev, 0, y1, info->var.xres, y2 - y1 - 1); ++ } ++} ++ ++static struct fb_deferred_io vbox_defio = ++{ ++ .delay = VBOX_DIRTY_DELAY, ++ .deferred_io = vbox_deferred_io, ++}; ++ + static void vbox_fillrect(struct fb_info *info, + const struct fb_fillrect *rect) + { +@@ -324,6 +357,9 @@ static int vboxfb_create(struct drm_fb_helper *helper, + info->screen_base = sysram; + info->screen_size = size; + ++ info->fbdefio = &vbox_defio; ++ fb_deferred_io_init(info); ++ + info->pixmap.flags = FB_PIXMAP_SYSTEM; + + DRM_DEBUG_KMS("allocated %dx%d\n", diff --git a/drm-vboxvideo-Initialize-data-needed-to-map-fbdev-memory.patch b/drm-vboxvideo-Initialize-data-needed-to-map-fbdev-memory.patch new file mode 100644 index 0000000..aeb691d --- /dev/null +++ b/drm-vboxvideo-Initialize-data-needed-to-map-fbdev-memory.patch @@ -0,0 +1,60 @@ +From: Egbert Eich +Date: Mon Apr 25 09:32:04 2016 +0200 +Subject: drm/vboxvideo: Initialize data needed to map fbdev memory +Patch-mainline: Not yet +Git-commit: 4153ec3d267288659638e2397bcae5298e7f5930 +References: boo#977200 + +Due to a missing initialization there was no way to map fbdev memory. +Thus for example using the Xserver with the fbdev driver failed. +This fix adds initialization for fix.smem_start and fix.smem_len +in the fb_info structure, which fixes this problem. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + src/VBox/Additions/linux/drm/vbox_drv.h | 1 + + src/VBox/Additions/linux/drm/vbox_fb.c | 8 ++++++++ + src/VBox/Additions/linux/drm/vbox_mode.c | 2 ++ + 3 files changed, 11 insertions(+) +diff --git a/src/VBox/Additions/linux/drm/vbox_drv.h b/src/VBox/Additions/linux/drm/vbox_drv.h +index fa3eb3c..a9bc156 100644 +--- a/src/VBox/Additions/linux/drm/vbox_drv.h ++++ b/src/VBox/Additions/linux/drm/vbox_drv.h +@@ -227,6 +227,7 @@ int vbox_framebuffer_init(struct drm_device *dev, + int vbox_fbdev_init(struct drm_device *dev); + void vbox_fbdev_fini(struct drm_device *dev); + void vbox_fbdev_set_suspend(struct drm_device *dev, int state); ++void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr); + + struct vbox_bo { + struct ttm_buffer_object bo; +diff --git a/src/VBox/Additions/linux/drm/vbox_fb.c b/src/VBox/Additions/linux/drm/vbox_fb.c +index a90f11d..8e0e40d 100644 +--- a/src/VBox/Additions/linux/drm/vbox_fb.c ++++ b/src/VBox/Additions/linux/drm/vbox_fb.c +@@ -452,3 +452,11 @@ void vbox_fbdev_set_suspend(struct drm_device *dev, int state) + + fb_set_suspend(vbox->fbdev->helper.fbdev, state); + } ++ ++void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr) ++{ ++ vbox->fbdev->helper.fbdev->fix.smem_start = ++ vbox->fbdev->helper.fbdev->apertures->ranges[0].base + ++ gpu_addr; ++ vbox->fbdev->helper.fbdev->fix.smem_len = vbox->vram_size - gpu_addr; ++} +diff --git a/src/VBox/Additions/linux/drm/vbox_mode.c b/src/VBox/Additions/linux/drm/vbox_mode.c +index d00ebff..40b6eb0 100644 +--- a/src/VBox/Additions/linux/drm/vbox_mode.c ++++ b/src/VBox/Additions/linux/drm/vbox_mode.c +@@ -224,6 +224,8 @@ static int vbox_crtc_do_set_base(struct drm_crtc *crtc, + ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap); + if (ret) + DRM_ERROR("failed to kmap fbcon\n"); ++ else ++ vbox_fbdev_set_base(vbox, gpu_addr); + } + vbox_bo_unreserve(bo); + diff --git a/virtualbox.changes b/virtualbox.changes index e7abdd8..f157671 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 26 11:23:41 UTC 2016 - eich@suse.com + +- drm-vboxvideo-Initialize-data-needed-to-map-fbdev-memory.patch: + * Add missing initialization of scanout buffer base and size for + proper fbdev support. +- drm-vboxvideo-Add-delayed-update-to-support-fbdev.patch: + * Add support for delayed_io in fbdev-layer. + (boo#977200). + ------------------------------------------------------------------- Fri Apr 22 19:38:06 UTC 2016 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 6c334b3..1daf2da 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -87,6 +87,9 @@ Patch109: vbox-usb-warning.diff Patch111: vbox_prevent_wrong_SONAME.patch # Apply Changeset 60565 - Fix bug in DevLsiLogicSCSI.cpp Patch112: changeset_60565.diff +# Patch to make xf86-video-fbdev work on vboxvideodrm +Patch114: drm-vboxvideo-Initialize-data-needed-to-map-fbdev-memory.patch +Patch113: drm-vboxvideo-Add-delayed-update-to-support-fbdev.patch # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -319,6 +322,8 @@ This package contains icons for guest desktop files that were created on the des %patch109 -p1 %patch111 -p1 %patch112 -p1 +%patch113 -p1 +%patch114 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf #copy kbuild config