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

RE: [Xen-devel] GPLPV Drivers 0.9.11-pre4 hang during boot - WindowsXP Pro SP2



> Hi James,
> 
> I meet this problem before but not in the same scenario.
> I use WinPv driver WDF version and attach a lot of vbd and vif device,
> such as 4 disks and 8 NICs. After WinPv driver install correctly,
reboot
> the vm. Vm cannot reboot correctly every times. And the debug log is
> very similar as Sandro provided. I change the backend bit width detect
> code as follow. In my test box, WinPv driver works ok till now. Please
> have a try if you are interested in it.

That patch appears to be to your wdf version of the code... can you give
me a summary of what the change you made is?

At a guess, the difference to the original code is that you are doing
two separate notify's, and a KeMemoryBarrier after each. Can you tell my
why the barrier is required?

I just noticed that the for() loop will never actually do anything as
req->nr_segments is initialised to zero... that's the same in my current
code too! I wonder how long that has been a problem for? I'll change my
code to initialise nr_segments to the maximum.

James

> 
> 
> +XenVbd_TestBitWidth(PXENVBD_DEVICE_DATA DeviceData,
PXENVBD_TARGET_DATA
> TargetData)
> +{
> +  blkif_request_t *req;
> +  ULONG i;
> +  int notify;
> +
> +  KdPrint((__DRIVER_NAME " --> XenVbd_TestBitWidth\n"));
> +    req = RING_GET_REQUEST(&TargetData->Ring, TargetData-
> >Ring.req_prod_pvt);
> +     req->id = 0;
> +     KdPrint((__DRIVER_NAME "    req id : %d\n",req->id));
> +    req->operation = 0xff;
> +    req->nr_segments = 0;
> +    for (i = 0; i < req->nr_segments; i++)
> +    {
> +      req->seg[i].gref = 0xffffffff;
> +      req->seg[i].first_sect = 0xff;
> +      req->seg[i].last_sect = 0xff;
> +    }
> +    TargetData->Ring.req_prod_pvt++;
> +
> +    RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&TargetData->Ring, notify);
> +    KdPrint((__DRIVER_NAME "     1st notify: %d\n", notify));
> +    if (notify)
> +      DeviceData->XenDeviceData->XenInterface.EvtChn_Notify(
> +
DeviceData->XenDeviceData->XenInterface.InterfaceHeader.Context,
> +        TargetData->EventChannel);
> +    KeMemoryBarrier();
> +
> +    req = RING_GET_REQUEST(&TargetData->Ring, TargetData-
> >Ring.req_prod_pvt);
> +     req->id = 1;
> +     KdPrint((__DRIVER_NAME "     req id : %d\n",req->id));
> +    req->operation = 0xff;
> +    req->nr_segments = 0;
> +    for (i = 0; i < req->nr_segments; i++)
> +    {
> +      req->seg[i].gref = 0xffffffff;
> +      req->seg[i].first_sect = 0xff;
> +      req->seg[i].last_sect = 0xff;
> +    }
> +    TargetData->Ring.req_prod_pvt++;
> +
> +    RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&TargetData->Ring, notify);
> +    KdPrint((__DRIVER_NAME "     2nd notify: %d\n", notify));
> +    if (notify)
> +      DeviceData->XenDeviceData->XenInterface.EvtChn_Notify(
> +
DeviceData->XenDeviceData->XenInterface.InterfaceHeader.Context,
> +        TargetData->EventChannel);
> +    KeMemoryBarrier();
> +  KdPrint((__DRIVER_NAME " <-- XenVbd_TestBitWidth\n"));
> +    return;
> +}
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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