[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [GPLPV] exclude xenscsi from installer, since it is not compiled



> The header defines it as:
> 
> #if (NTDDI_VERSION >= NTDDI_WIN8)
>   PVOID                                  MiniportDumpData;
> #else
>   PVOID                                  Reserved;
> #endif
> 
> So I guess gplpv needs to incorporate that. Untested patch follows this email.
> I've previously read through the virtual storport changes and there are a
> heap of them, so there may be other issues to resolve too.
> 

... but of course that patch fails on earlier builds because NTDDI_WIN8 isn't 
defined. Try the patch following this email instead and let me know if it works 
and I'll commit it.

James

diff -r 85b99b9795a6 xenvbd_storport/xenvbd.c
--- a/xenvbd_storport/xenvbd.c  Sat Jan 04 18:17:51 2014 +1100
+++ b/xenvbd_storport/xenvbd.c  Sun Jan 05 16:15:48 2014 +1100
@@ -185,6 +185,12 @@
 XenVbd_HwStorFindAdapter(PVOID DeviceExtension, PVOID HwContext, PVOID 
BusInformation, PCHAR ArgumentString, PPORT_CONF
IGURATION_INFORMATION ConfigInfo, PBOOLEAN Again)
 {
   PXENVBD_DEVICE_DATA xvdd = (PXENVBD_DEVICE_DATA)DeviceExtension;
+#if defined(NTDDI_WIN8) && (NTDDI_VERSION >= NTDDI_WIN8)
+  PVOID dump_data = ConfigInfo->MiniportDumpData;
+#else
+  PVOID dump_data = ConfigInfo->Reserved;
+#endif
+

   UNREFERENCED_PARAMETER(HwContext);
   UNREFERENCED_PARAMETER(BusInformation);
@@ -195,14 +201,14 @@
   FUNCTION_MSG("xvdd = %p\n", xvdd);
   FUNCTION_MSG("ArgumentString = %s\n", ArgumentString);

-  memcpy(xvdd, ConfigInfo->Reserved, FIELD_OFFSET(XENVBD_DEVICE_DATA, 
aligned_buffer_data));
+  memcpy(xvdd, dump_data, FIELD_OFFSET(XENVBD_DEVICE_DATA, 
aligned_buffer_data));
   if (xvdd->device_state != DEVICE_STATE_ACTIVE) {
     return SP_RETURN_ERROR;
   }
   /* restore hypercall_stubs into dump_xenpci */
   XnSetHypercallStubs(xvdd->hypercall_stubs);
   /* make sure original xvdd is set to DISCONNECTED or resume will not work */
-  ((PXENVBD_DEVICE_DATA)ConfigInfo->Reserved)->device_state = 
DEVICE_STATE_DISCONNECTED;
+  ((PXENVBD_DEVICE_DATA)dump_data)->device_state = DEVICE_STATE_DISCONNECTED;
   InitializeListHead(&xvdd->srb_list);
   xvdd->aligned_buffer_in_use = FALSE;
   /* align the buffer to PAGE_SIZE */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.