win-pvdrivers

diff xenpci/xenbus.c @ 1022:cd72cd0e1c19

hooking debug doesn't survive hibernate under win8. Remove it.
Remove initial balloon down - doesn't work under xen 4.2 without xenbus being loaded
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 19 15:11:49 2013 +1100 (2013-02-19)
parents df03fde445b8
children 37c0c84a42e8
line diff
     1.1 --- a/xenpci/xenbus.c	Wed Feb 13 23:37:17 2013 +1100
     1.2 +++ b/xenpci/xenbus.c	Tue Feb 19 15:11:49 2013 +1100
     1.3 @@ -80,7 +80,7 @@ static void xb_write(
     1.4    
     1.5    //FUNCTION_ENTER();
     1.6  
     1.7 -  ASSERT(len <= XENSTORE_RING_SIZE);
     1.8 +  XN_ASSERT(len <= XENSTORE_RING_SIZE);
     1.9    prod = xpdd->xen_store_interface->req_prod;
    1.10    ptr = data;
    1.11    remaining = len;
    1.12 @@ -175,7 +175,7 @@ XenBus_Read(
    1.13  
    1.14    //KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    1.15  
    1.16 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.17 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.18  
    1.19    rep = xenbus_format_msg_reply(xpdd, XS_READ, xbt, req, ARRAY_SIZE(req));
    1.20    msg = errmsg(rep);
    1.21 @@ -210,7 +210,7 @@ XenBus_Write(
    1.22    struct xsd_sockmsg *rep;
    1.23    char *msg;
    1.24  
    1.25 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.26 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.27  
    1.28    rep = xenbus_format_msg_reply(xpdd, XS_WRITE, xbt, req, ARRAY_SIZE(req));
    1.29    msg = errmsg(rep);
    1.30 @@ -301,7 +301,7 @@ XenBus_Dpc(PVOID ServiceContext)
    1.31      }
    1.32  
    1.33      msg_len = min(rsp_prod - xpdd->xen_store_interface->rsp_cons, sizeof(xsd_sockmsg_t) + xpdd->xb_msg->len - xpdd->xb_msg_offset);
    1.34 -    ASSERT(xpdd->xb_msg_offset + msg_len <= sizeof(xsd_sockmsg_t) + xpdd->xb_msg->len);
    1.35 +    XN_ASSERT(xpdd->xb_msg_offset + msg_len <= sizeof(xsd_sockmsg_t) + xpdd->xb_msg->len);
    1.36      memcpy_from_ring(xpdd->xen_store_interface->rsp,
    1.37        (PUCHAR)xpdd->xb_msg + xpdd->xb_msg_offset,
    1.38        MASK_XENSTORE_IDX(xpdd->xen_store_interface->rsp_cons),
    1.39 @@ -319,7 +319,7 @@ XenBus_Dpc(PVOID ServiceContext)
    1.40      if (xpdd->xb_msg->type != XS_WATCH_EVENT)
    1.41      {
    1.42        /* process reply - only ever one outstanding */
    1.43 -      ASSERT(xpdd->xb_reply == NULL);
    1.44 +      XN_ASSERT(xpdd->xb_reply == NULL);
    1.45        xpdd->xb_reply = xpdd->xb_msg;
    1.46        xpdd->xb_msg = NULL;
    1.47        KeSetEvent(&xpdd->xb_request_complete_event, IO_NO_INCREMENT, FALSE);
    1.48 @@ -382,7 +382,7 @@ XenBus_Init(PXENPCI_DEVICE_DATA xpdd)
    1.49      
    1.50    FUNCTION_ENTER();
    1.51  
    1.52 -  ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
    1.53 +  XN_ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
    1.54  
    1.55    KeInitializeSpinLock(&xpdd->xb_ring_spinlock);
    1.56    ExInitializeFastMutex(&xpdd->xb_request_mutex);
    1.57 @@ -444,7 +444,7 @@ XenBus_Halt(PXENPCI_DEVICE_DATA xpdd)
    1.58  
    1.59    FUNCTION_ENTER();
    1.60    
    1.61 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.62 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.63  
    1.64    /* we need to remove the watches as a watch firing could lead to a XenBus_Read/Write/Printf */
    1.65    for (i = 0; i < MAX_WATCH_ENTRIES; i++)
    1.66 @@ -477,7 +477,7 @@ XenBus_List(
    1.67    char **res;
    1.68    char *msg;
    1.69  
    1.70 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.71 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.72  
    1.73    repmsg = xenbus_format_msg_reply(xpdd, XS_DIRECTORY, xbt, req, ARRAY_SIZE(req));
    1.74    msg = errmsg(repmsg);
    1.75 @@ -595,9 +595,9 @@ XenBus_AddWatch(
    1.76    int i;
    1.77    PXENBUS_WATCH_ENTRY w_entry;
    1.78  
    1.79 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.80 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.81  
    1.82 -  ASSERT(strlen(Path) < ARRAY_SIZE(w_entry->Path));
    1.83 +  XN_ASSERT(strlen(Path) < ARRAY_SIZE(w_entry->Path));
    1.84  
    1.85    ExAcquireFastMutex(&xpdd->xb_watch_mutex);
    1.86  
    1.87 @@ -645,7 +645,7 @@ XenBus_RemWatch(
    1.88    char *msg;
    1.89    int i;
    1.90  
    1.91 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.92 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
    1.93  
    1.94    ExAcquireFastMutex(&xpdd->xb_watch_mutex);
    1.95  
    1.96 @@ -687,7 +687,7 @@ XenBus_StartTransaction(PVOID Context, x
    1.97    struct xsd_sockmsg *rep;
    1.98    char *err;
    1.99  
   1.100 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
   1.101 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
   1.102  
   1.103    rep = xenbus_format_msg_reply(xpdd, XS_TRANSACTION_START, 0, &req, 1);
   1.104    err = errmsg(rep);
   1.105 @@ -744,7 +744,7 @@ XenBus_Printf(
   1.106    char buf[512];
   1.107    char *retval;
   1.108  
   1.109 -  ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
   1.110 +  XN_ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
   1.111  
   1.112    va_start(ap, fmt);
   1.113    RtlStringCbVPrintfA(buf, ARRAY_SIZE(buf), fmt, ap);