Re: [Spice-devel] [PATCH 1/3] fix inverted memset parameters
Good work! Ack series. I think we should add these to the 0.8 branch too. On 08/24/2011 04:41 AM, Christophe Fergeau wrote: Issue found by the Coverity scanner. --- server/red_dispatcher.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c index c00dc58..721c79c 100644 --- a/server/red_dispatcher.c +++ b/server/red_dispatcher.c @@ -426,7 +426,7 @@ static void red_dispatcher_create_primary_surface_complete(RedDispatcher *dispat dispatcher->primary_active = TRUE; update_client_mouse_allowed(); -memset(&dispatcher->surface_create, sizeof(QXLDevSurfaceCreate), 0); +memset(&dispatcher->surface_create, 0, sizeof(QXLDevSurfaceCreate)); } static void ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH qxl-win 0/4] fixes for RHBZ #722954, #731644
The first patch removes unnecessary unmapping and remapping of the vram. The third patch eliminates the need for the first patch, but I chose to still apply it since the unmapping is unnecessary. This set of patches might also solve the BSOD Damien Churchill encountered when connecting with rdp after using spice. There are still some fixes required. Mainly for how we use mutexes. More details in the commit messages. Cheers, Yonit. Yonit Halperin (4): miniport: map vram to virtual address only once, #722954 display: not reset devices on DrvDisableDriver, RHBZ #731644 display: support clearing the pci-bar when the pdev is disabled for revision<3 as well, RHBZ #731644 display: not using globals, RHBZ #731644 display/driver.c | 136 - display/qxldd.h | 127 ++-- display/res.c | 581 - display/res.h |2 - display/surface.c | 19 ++- display/surface.h | 28 +-- miniport/qxl.c| 75 +++ 7 files changed, 425 insertions(+), 543 deletions(-) -- 1.7.4.4 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH qxl-win 1/4] miniport: map vram to virtual address only once, #722954
DrvSurface calls IOCTL_VIDEO_MAP/UNMAP_VIDEO_MEMORY respectively. These calls make the miniport map/unmap the vram to/from system space. The BSOD occurred since with qxl revision 2, the driver assumes that as long as it is loaded the vram stays (and all the other mem slots) valid and in the same place. However, the miniport's call to VideoPortMapMemory (in IOCTL_VIDEO_MAP_VIDEO_MEMORY) is not guaranteed to map the vram to the same virtual address. As a result, when the driver accessed to an mspace instance that was initialized with a no longer valid virtual address, we got BSOD. Since we don't change the size of the vram, I see no point in mapping and unmapping it more then once. For qxl revision 3 this problem is not relevant since between DrvAssertMode(disable) to DrvAssertMode(enable) we clear the pci ram and initialize all the data structure that are related to it (mspace, caches, etc.) I didn't remove the calls to IOCTL_VIDEO_MAP/UNMAP_VIDEO_MEMORY since I think they would be useful for supporting dynamically changing the size of the memslots according to the current resolution. Which I think is the real purpose of IOCTL_VIDEO_MAP/UNMAP_VIDEO_MEMORY. Today, the size of the frame buffer (surface0) is static -> the maximal resolution we support. --- miniport/qxl.c | 75 ++- 1 files changed, 30 insertions(+), 45 deletions(-) diff --git a/miniport/qxl.c b/miniport/qxl.c index 40e8379..7006adf 100644 --- a/miniport/qxl.c +++ b/miniport/qxl.c @@ -324,6 +324,11 @@ VP_STATUS InitVRAM(QXLExtension *dev, PVIDEO_ACCESS_RANGE range); VP_STATUS InitVRAM(QXLExtension *dev, PVIDEO_ACCESS_RANGE range) { +UINT8 *vram_addr = NULL; +ULONG vram_mapped_size = range->RangeLength; +ULONG io_space = VIDEO_MEMORY_SPACE_MEMORY; +VP_STATUS error; + PAGED_CODE(); DEBUG_PRINT((dev, 0, "%s\n", __FUNCTION__)); @@ -332,10 +337,24 @@ VP_STATUS InitVRAM(QXLExtension *dev, PVIDEO_ACCESS_RANGE range) return ERROR_INVALID_DATA; } +if ((error = VideoPortMapMemory(dev, range->RangeStart, +&vram_mapped_size, +&io_space, +&vram_addr))) { +DEBUG_PRINT((dev, 0, "%s: map vram failed\n", __FUNCTION__)); +return error; +} + +if (vram_mapped_size < range->RangeLength) { +DEBUG_PRINT((dev, 0, "%s: vram shrinked\n", __FUNCTION__)); +VideoPortUnmapMemory(dev, vram_addr, NULL); +return ERROR_NOT_ENOUGH_MEMORY; +} dev->vram_physical = range->RangeStart; +dev->vram_start = vram_addr; dev->vram_size = range->RangeLength; -DEBUG_PRINT((dev, 0, "%s: OK, vram 0x%lx size %lu\n", - __FUNCTION__, (ULONG)range->RangeStart.QuadPart, range->RangeLength)); +DEBUG_PRINT((dev, 0, "%s: OK, vram 0x%lx size %lu vaddr 0x%lx\n", __FUNCTION__, +(ULONG)range->RangeStart.QuadPart, range->RangeLength, dev->vram_start)); return NO_ERROR; } @@ -577,6 +596,10 @@ void DevExternsionCleanup(QXLExtension *dev) VideoPortUnmapMemory(dev, dev->ram_start, NULL); } +if (dev->vram_start) { +VideoPortUnmapMemory(dev, dev->vram_start, NULL); +} + if (dev->modes) { VideoPortFreePool(dev, dev->modes); } @@ -966,7 +989,6 @@ BOOLEAN StartIO(PVOID dev_extension, PVIDEO_REQUEST_PACKET packet) break; case IOCTL_VIDEO_MAP_VIDEO_MEMORY: { PVIDEO_MEMORY_INFORMATION mem_info; -ULONG fb_io_space; DEBUG_PRINT((dev_ext, 0, "%s: IOCTL_VIDEO_MAP_VIDEO_MEMORY\n", __FUNCTION__)); @@ -976,36 +998,11 @@ BOOLEAN StartIO(PVOID dev_extension, PVIDEO_REQUEST_PACKET packet) error = ERROR_INSUFFICIENT_BUFFER; goto err; } -mem_info = packet->OutputBuffer; -mem_info->VideoRamBase = - ((PVIDEO_MEMORY)(packet->InputBuffer))->RequestedVirtualAddress; -ASSERT(mem_info->VideoRamBase == NULL); -mem_info->VideoRamLength = dev_ext->vram_size; -fb_io_space = VIDEO_MEMORY_SPACE_MEMORY; - -if ((error = VideoPortMapMemory(dev_ext, dev_ext->vram_physical, -&mem_info->VideoRamLength, -&fb_io_space, &mem_info->VideoRamBase)) != NO_ERROR) { -DEBUG_PRINT((dev_ext, 0, "%s: map filed\n", __FUNCTION__)); -goto err; -} -dev_ext->vram_start = mem_info->VideoRamBase; -DEBUG_PRINT((dev_ext, 0, "%s: vram size %lu ret size %lu fb vaddr 0x%lx\n", - __FUNCTION__, - dev_ext->vram_size, - mem_info->VideoRamLength, - mem_info->VideoRamBase)); -if (mem_info->VideoRamLength < dev_ext->vram_si
[Spice-devel] [PATCH qxl-win 2/4] display: not reset devices on DrvDisableDriver, RHBZ #731644
When several sessions of the display driver are alive, DrvDisableDriver can be called for the older session while the newer session has already started. It happens when you switch users on a dual monitor XP guest. Reseting the devices in DrvDisableDriver while they are used by another session leads to a BSOD. --- display/driver.c |1 - display/res.c| 20 display/res.h|1 - 3 files changed, 0 insertions(+), 22 deletions(-) diff --git a/display/driver.c b/display/driver.c index 00dd7ec..252d429 100644 --- a/display/driver.c +++ b/display/driver.c @@ -256,7 +256,6 @@ BOOL DrvEnableDriver(ULONG engine_version, ULONG enable_data_size, PDRVENABLEDAT VOID DrvDisableDriver(VOID) { DEBUG_PRINT((NULL, 1, "%s\n", __FUNCTION__)); -ResetAllDevices(); ResDestroyGlobals(); CleanGlobalRes(); } diff --git a/display/res.c b/display/res.c index 5d28184..850d35a 100644 --- a/display/res.c +++ b/display/res.c @@ -3512,23 +3512,3 @@ void CheckAndSetSSE2() } #endif - -void ResetAllDevices() -{ -UINT32 i; -EngAcquireSemaphore(res_sem); - -for (i = 0; i < num_global_res; i++) { -if (global_res[i] && global_res[i]->driver) { -DWORD length; -if (EngDeviceIoControl(global_res[i]->driver, IOCTL_VIDEO_RESET_DEVICE, - NULL, 0, NULL, 0, &length)) { -DEBUG_PRINT((NULL, 0, "%s: reset to device failed 0x%lx\n", -__FUNCTION__, global_res[i]->driver)); - -} -} -} - -EngReleaseSemaphore(res_sem); -} diff --git a/display/res.h b/display/res.h index 1feadb0..d447cee 100644 --- a/display/res.h +++ b/display/res.h @@ -70,7 +70,6 @@ void ResDestroyGlobals(); #ifndef _WIN64 void CheckAndSetSSE2(); #endif -void ResetAllDevices(); void EmptyReleaseRing(PDev *pdev); void InitDeviceMemoryResources(PDev *pdev); void ReleaseCacheDeviceMemoryResources(PDev *pdev); -- 1.7.4.4 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH qxl-win 3/4] display: support clearing the pci-bar when the pdev is disabled for revision<3 as well, RHBZ #731644
see also commit 3218f6cdb95a73. In revision < 3, objects (surfaces and other devram objects) stayed alive in the pci ram after DrvAssertMode(Disable) was called. Then, when another display driver session started (upon switch user), the driver had newly initiated mspace, but an old release ring (with objects from the older session's mspace). This state led to a crash. --- display/driver.c | 98 + display/res.c |3 +- display/surface.c |6 +++ 3 files changed, 77 insertions(+), 30 deletions(-) diff --git a/display/driver.c b/display/driver.c index 252d429..0c6fe32 100644 --- a/display/driver.c +++ b/display/driver.c @@ -957,24 +957,83 @@ VOID DrvDisableSurface(DHPDEV in_pdev) DEBUG_PRINT((pdev, 1, "%s: 0x%lx exit\n", __FUNCTION__, pdev)); } +static void FlushSurfaces(PDev *pdev) +{ +UINT32 surface_id; +SurfaceInfo *surface_info; +SURFOBJ *surf_obj; +RECTL area = {0, 0, 0, 0}; + +if (pdev->pci_revision < QXL_REVISION_STABLE_V10) { +DEBUG_PRINT((pdev, 1, "%s: revision too old for QXL_IO_FLUSH_SURFACES", __FUNCTION__)); +for (surface_id = pdev->n_surfaces - 1; surface_id > 0 ; --surface_id) { +surface_info = GetSurfaceInfo(pdev, surface_id); +// TODO: check what this condinitions means. +if (!surface_info->draw_area.base_mem) { +continue; +} +surf_obj = surface_info->draw_area.surf_obj; +if (!surf_obj) { +continue; +} +area.right = surf_obj->sizlBitmap.cx; +area.bottom = surf_obj->sizlBitmap.cy; +UpdateArea(pdev,&area, surface_id); +} +} else { +async_io(pdev, ASYNCABLE_FLUSH_SURFACES, 0); +} +} + +static BOOL FlushRelease(PDev *pdev) +{ +// TODO: why didn't we use reset for revision 3? +if (pdev->pci_revision< QXL_REVISION_STABLE_V10) { +DWORD length; + +DEBUG_PRINT((pdev, 1, "%s: revision too old for QXL_IO_FLUSH_RELEASE", __FUNCTION__)); +if (EngDeviceIoControl(pdev->driver, IOCTL_VIDEO_RESET_DEVICE, + NULL, 0, NULL, 0, &length)) { +DEBUG_PRINT((NULL, 0, "%s: reset failed 0x%lx\n", __FUNCTION__, pdev)); +return FALSE; +} +} else { +/* Free release ring contents */ +ReleaseCacheDeviceMemoryResources(pdev); +EmptyReleaseRing(pdev); +/* Get the last free list onto the release ring */ +sync_io(pdev, pdev->flush_release_port, 0); +DEBUG_PRINT((pdev, 4, "%s after FLUSH_RELEASE\n", __FUNCTION__)); +/* And release that. mspace allocators should be clean after. */ +EmptyReleaseRing(pdev); +} +return TRUE; +} + static BOOL AssertModeDisable(PDev *pdev) { DEBUG_PRINT((pdev, 3, "%s entry\n", __FUNCTION__)); /* flush command ring and update all surfaces */ -async_io(pdev, ASYNCABLE_FLUSH_SURFACES, 0); +FlushSurfaces(pdev); +DebugCountAliveSurfaces(pdev); +/* + * this call is redundant for + * pci_revision < QXL_REVISION_STABLE_V10, due to the + * IOCTL_VIDEO_RESET_DEVICE in FlushRelease. However, + * MoveAllSurfacesToRam depends on destroy_all_surfaces + * in case of failure. + * TODO: make MoveAllSurfacesToRam send destroy_surface + * commands instead of create_surface commands in case + * of failure + */ async_io(pdev, ASYNCABLE_DESTROY_ALL_SURFACES, 0); /* move all surfaces from device to system memory */ if (!MoveAllSurfacesToRam(pdev)) { return FALSE; } -/* Free release ring contents */ -ReleaseCacheDeviceMemoryResources(pdev); -EmptyReleaseRing(pdev); -/* Get the last free list onto the release ring */ -sync_io(pdev, pdev->flush_release_port, 0); -DEBUG_PRINT((pdev, 4, "%s after FLUSH_RELEASE\n", __FUNCTION__)); -/* And release that. mspace allocators should be clean after. */ -EmptyReleaseRing(pdev); +if (!FlushRelease(pdev)) { +return FALSE; +} RemoveVRamSlot(pdev); DebugCountAliveSurfaces(pdev); DEBUG_PRINT((pdev, 4, "%s: [%d,%d] [%d,%d] [%d,%d] %lx\n", __FUNCTION__, @@ -1002,31 +1061,12 @@ static void AssertModeEnable(PDev *pdev) DebugCountAliveSurfaces(pdev); } -BOOL DrvAssertModeOld(PDev *pdev, BOOL enable) -{ -if (enable) { -InitResources(pdev); -EnableQXLPrimarySurface(pdev); -CreateVRamSlot(pdev); -} else { -DisableQXLPrimarySurface(pdev, 0); -RemoveVRamSlot(pdev); -} -DEBUG_PRINT((pdev, 1, "%s: 0x%lx exit %d\n", __FUNCTION__, pdev, enable)); -return TRUE; -} - BOOL DrvAssertMode(DHPDEV in_pdev, BOOL enable) { PDev* pdev = (PDev*)in_pdev; BOOL ret = TRUE; -DEBUG_PRINT((pdev, 1, "%s: 0x%lx %d\n", __FUNCTION__, pdev, enable)); -if (pdev->pci_revision < QXL_REVISION_STABLE_V10) { -return DrvAssertMo
Re: [Spice-devel] [PATCH qxl-win 1/4] miniport: map vram to virtual address only once, #722954
On Wed, Aug 24, 2011 at 03:05:26PM +0300, Yonit Halperin wrote: > DrvSurface calls IOCTL_VIDEO_MAP/UNMAP_VIDEO_MEMORY > respectively. > These calls make the miniport map/unmap the vram to/from system space. > The BSOD occurred since with qxl revision 2, the driver assumes that > as long as it is loaded the vram stays (and all the other mem slots) valid > and in the same place. However, the miniport's call to VideoPortMapMemory > (in IOCTL_VIDEO_MAP_VIDEO_MEMORY) is not guaranteed to map the vram to the > same > virtual address. As a result, when the driver accessed to an mspace instance > that was initialized with a no longer valid virtual address, we got BSOD. > > Since we don't change the size of the vram, I see no point in mapping and > unmapping it more then once. > > For qxl revision 3 this problem is not relevant since between > DrvAssertMode(disable) > to DrvAssertMode(enable) we clear the pci ram and initialize all > the data structure that are related to it (mspace, caches, etc.) > > I didn't remove the calls to IOCTL_VIDEO_MAP/UNMAP_VIDEO_MEMORY > since I think they would be useful for supporting dynamically changing the > size of the memslots according to the current resolution. Which I think is the > real purpose of IOCTL_VIDEO_MAP/UNMAP_VIDEO_MEMORY. Today, the size > of the frame buffer (surface0) is static -> the maximal resolution we support. I think it's ok to leave it, but note that we don't unmap surface0 memory, which is on the devram slot, and isn't touched by this patch anyway, but is mapped once in InitRam and that's it, together with the reset of the bar memory. To have a variable surface0 I think we will just need to change display, not miniport at all. > --- > miniport/qxl.c | 75 ++- > 1 files changed, 30 insertions(+), 45 deletions(-) > > diff --git a/miniport/qxl.c b/miniport/qxl.c > index 40e8379..7006adf 100644 > --- a/miniport/qxl.c > +++ b/miniport/qxl.c > @@ -324,6 +324,11 @@ VP_STATUS InitVRAM(QXLExtension *dev, > PVIDEO_ACCESS_RANGE range); > > VP_STATUS InitVRAM(QXLExtension *dev, PVIDEO_ACCESS_RANGE range) > { > +UINT8 *vram_addr = NULL; > +ULONG vram_mapped_size = range->RangeLength; > +ULONG io_space = VIDEO_MEMORY_SPACE_MEMORY; > +VP_STATUS error; > + > PAGED_CODE(); > DEBUG_PRINT((dev, 0, "%s\n", __FUNCTION__)); > > @@ -332,10 +337,24 @@ VP_STATUS InitVRAM(QXLExtension *dev, > PVIDEO_ACCESS_RANGE range) > return ERROR_INVALID_DATA; > } > > +if ((error = VideoPortMapMemory(dev, range->RangeStart, > +&vram_mapped_size, > +&io_space, > +&vram_addr))) { > +DEBUG_PRINT((dev, 0, "%s: map vram failed\n", __FUNCTION__)); > +return error; > +} > + > +if (vram_mapped_size < range->RangeLength) { > +DEBUG_PRINT((dev, 0, "%s: vram shrinked\n", __FUNCTION__)); > +VideoPortUnmapMemory(dev, vram_addr, NULL); > +return ERROR_NOT_ENOUGH_MEMORY; > +} > dev->vram_physical = range->RangeStart; > +dev->vram_start = vram_addr; > dev->vram_size = range->RangeLength; > -DEBUG_PRINT((dev, 0, "%s: OK, vram 0x%lx size %lu\n", > - __FUNCTION__, (ULONG)range->RangeStart.QuadPart, > range->RangeLength)); > +DEBUG_PRINT((dev, 0, "%s: OK, vram 0x%lx size %lu vaddr 0x%lx\n", > __FUNCTION__, > +(ULONG)range->RangeStart.QuadPart, range->RangeLength, > dev->vram_start)); > return NO_ERROR; > } > > @@ -577,6 +596,10 @@ void DevExternsionCleanup(QXLExtension *dev) > VideoPortUnmapMemory(dev, dev->ram_start, NULL); > } > > +if (dev->vram_start) { > +VideoPortUnmapMemory(dev, dev->vram_start, NULL); > +} > + > if (dev->modes) { > VideoPortFreePool(dev, dev->modes); > } > @@ -966,7 +989,6 @@ BOOLEAN StartIO(PVOID dev_extension, > PVIDEO_REQUEST_PACKET packet) > break; > case IOCTL_VIDEO_MAP_VIDEO_MEMORY: { > PVIDEO_MEMORY_INFORMATION mem_info; > -ULONG fb_io_space; > > DEBUG_PRINT((dev_ext, 0, "%s: IOCTL_VIDEO_MAP_VIDEO_MEMORY\n", > __FUNCTION__)); > > @@ -976,36 +998,11 @@ BOOLEAN StartIO(PVOID dev_extension, > PVIDEO_REQUEST_PACKET packet) > error = ERROR_INSUFFICIENT_BUFFER; > goto err; > } > -mem_info = packet->OutputBuffer; > > -mem_info->VideoRamBase = > - > ((PVIDEO_MEMORY)(packet->InputBuffer))->RequestedVirtualAddress; > -ASSERT(mem_info->VideoRamBase == NULL); > -mem_info->VideoRamLength = dev_ext->vram_size; > -fb_io_space = VIDEO_MEMORY_SPACE_MEMORY; > - > -if ((error = VideoPortMapMemory(dev_ext, dev_ext->vram_physical, > -&mem_info->VideoRamLeng
Re: [Spice-devel] [PATCH qxl-win 3/4] display: support clearing the pci-bar when the pdev is disabled for revision<3 as well, RHBZ #731644
On Wed, Aug 24, 2011 at 03:05:28PM +0300, Yonit Halperin wrote: See comments below. > see also commit 3218f6cdb95a73. > > In revision < 3, objects (surfaces and other devram objects) stayed alive in > the pci ram > after DrvAssertMode(Disable) was called. Then, when another display driver > session started (upon switch user), > the driver had newly initiated mspace, but an old release ring (with objects > from the older session's mspace). > This state led to a crash. > --- > display/driver.c | 98 > + > display/res.c |3 +- > display/surface.c |6 +++ > 3 files changed, 77 insertions(+), 30 deletions(-) > > diff --git a/display/driver.c b/display/driver.c > index 252d429..0c6fe32 100644 > --- a/display/driver.c > +++ b/display/driver.c > @@ -957,24 +957,83 @@ VOID DrvDisableSurface(DHPDEV in_pdev) > DEBUG_PRINT((pdev, 1, "%s: 0x%lx exit\n", __FUNCTION__, pdev)); > } > > +static void FlushSurfaces(PDev *pdev) > +{ > +UINT32 surface_id; > +SurfaceInfo *surface_info; > +SURFOBJ *surf_obj; > +RECTL area = {0, 0, 0, 0}; > + > +if (pdev->pci_revision < QXL_REVISION_STABLE_V10) { > +DEBUG_PRINT((pdev, 1, "%s: revision too old for > QXL_IO_FLUSH_SURFACES", __FUNCTION__)); > +for (surface_id = pdev->n_surfaces - 1; surface_id > 0 ; > --surface_id) { > +surface_info = GetSurfaceInfo(pdev, surface_id); > +// TODO: check what this condinitions means. remove TODO? > +if (!surface_info->draw_area.base_mem) { > +continue; > +} > +surf_obj = surface_info->draw_area.surf_obj; > +if (!surf_obj) { > +continue; > +} > +area.right = surf_obj->sizlBitmap.cx; > +area.bottom = surf_obj->sizlBitmap.cy; > +UpdateArea(pdev,&area, surface_id); > +} > +} else { > +async_io(pdev, ASYNCABLE_FLUSH_SURFACES, 0); > +} > +} > + > +static BOOL FlushRelease(PDev *pdev) > +{ > +// TODO: why didn't we use reset for revision 3? To make sure we don't do any accounting errors, and to use our existing release paths (via the release ring). Reset + calling release function for each object (that today just unallocates it from the mspace iirc) should be equivalent. Just resetting should be the same today. > +if (pdev->pci_revision< QXL_REVISION_STABLE_V10) { > +DWORD length; > + > +DEBUG_PRINT((pdev, 1, "%s: revision too old for > QXL_IO_FLUSH_RELEASE", __FUNCTION__)); > +if (EngDeviceIoControl(pdev->driver, IOCTL_VIDEO_RESET_DEVICE, > + NULL, 0, NULL, 0, &length)) { > +DEBUG_PRINT((NULL, 0, "%s: reset failed 0x%lx\n", __FUNCTION__, > pdev)); > +return FALSE; > +} > +} else { > +/* Free release ring contents */ > +ReleaseCacheDeviceMemoryResources(pdev); > +EmptyReleaseRing(pdev); > +/* Get the last free list onto the release ring */ > +sync_io(pdev, pdev->flush_release_port, 0); Hmm, I see it was sync_io before too, I guess that's ok since the implementation in qemu doesn't block on the spice worker thread but returns immediately. > +DEBUG_PRINT((pdev, 4, "%s after FLUSH_RELEASE\n", __FUNCTION__)); > +/* And release that. mspace allocators should be clean after. */ > +EmptyReleaseRing(pdev); > +} > +return TRUE; > +} > + > static BOOL AssertModeDisable(PDev *pdev) > { > DEBUG_PRINT((pdev, 3, "%s entry\n", __FUNCTION__)); > /* flush command ring and update all surfaces */ > -async_io(pdev, ASYNCABLE_FLUSH_SURFACES, 0); > +FlushSurfaces(pdev); > +DebugCountAliveSurfaces(pdev); > +/* > + * this call is redundant for > + * pci_revision < QXL_REVISION_STABLE_V10, due to the > + * IOCTL_VIDEO_RESET_DEVICE in FlushRelease. However, > + * MoveAllSurfacesToRam depends on destroy_all_surfaces > + * in case of failure. > + * TODO: make MoveAllSurfacesToRam send destroy_surface > + * commands instead of create_surface commands in case > + * of failure > + */ > async_io(pdev, ASYNCABLE_DESTROY_ALL_SURFACES, 0); > /* move all surfaces from device to system memory */ > if (!MoveAllSurfacesToRam(pdev)) { > return FALSE; > } > -/* Free release ring contents */ > -ReleaseCacheDeviceMemoryResources(pdev); > -EmptyReleaseRing(pdev); > -/* Get the last free list onto the release ring */ > -sync_io(pdev, pdev->flush_release_port, 0); > -DEBUG_PRINT((pdev, 4, "%s after FLUSH_RELEASE\n", __FUNCTION__)); > -/* And release that. mspace allocators should be clean after. */ > -EmptyReleaseRing(pdev); > +if (!FlushRelease(pdev)) { > +return FALSE; > +} > RemoveVRamSlot(pdev); > DebugCountAliveSurfaces(pdev); > DEBUG_PRINT((pdev, 4, "%s: [%d,%d] [%d,%d] [%d,%d]
[Spice-devel] Status of getting usbredir support into F-16 / doing a 0.9.1 release?
Hi all, Just a quick update on $subject Done: 1) update libusb1 to 1.0.9 git snapshot (in F-16 stable) 2) update usbredir to 0.3.1 (in updates-testing and as buildroot-override) 3) build a qemu with usbredir support + a few extra patches (in updates-testing) To-do: 1) Do a new release of spice-server with usbredir support, build it for F-16 2) Do a new release of spice-gtk with usbredir support, build it for F-16 3) libvirt integration 4) virtmanager integration 1 + 2, are in good state, the code is all already there and tested (except for the MC stuff Alon recently pushed). 3 + 4 still need some work, but Marc-André is helping out with those, thanks Marc-André ! 1) Is my main reason for sending this mail. I'll start doing some serious testing of master now that Alon's MC patches have been merged. Once I'm convinced that everything works ok I would like to do a new release soon. If you've any pending patches please send them to the list ASAP. If you've any already send but unreviewed patches let me know and I'll review them. 2) I'm working with Marc-Andre on this. Regards, Hans ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH qxl-win 0/4] fixes for RHBZ #722954, #731644
On Wed, Aug 24, 2011 at 03:05:25PM +0300, Yonit Halperin wrote: ACK series. > The first patch removes unnecessary unmapping and remapping of the vram. > The third patch eliminates the need for the first patch, but I chose to still > apply it > since the unmapping is unnecessary. > > This set of patches might also solve the BSOD Damien Churchill encountered > when > connecting with rdp after using spice. > > There are still some fixes required. Mainly for how we use mutexes. > More details in the commit messages. > > Cheers, > Yonit. > > Yonit Halperin (4): > miniport: map vram to virtual address only once, #722954 > display: not reset devices on DrvDisableDriver, RHBZ #731644 > display: support clearing the pci-bar when the pdev is disabled for > revision<3 as well, RHBZ #731644 > display: not using globals, RHBZ #731644 > > display/driver.c | 136 - > display/qxldd.h | 127 ++-- > display/res.c | 581 > - > display/res.h |2 - > display/surface.c | 19 ++- > display/surface.h | 28 +-- > miniport/qxl.c| 75 +++ > 7 files changed, 425 insertions(+), 543 deletions(-) > > -- > 1.7.4.4 > ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel