win-pvdrivers

changeset 357:25166765975f

Automated merge with ssh://win-pvdrivers@xenbits.xensource.com/win-pvdrivers.hg
author Andy Grover <andy.grover@oracle.com>
date Wed Jul 02 11:35:56 2008 -0700 (2008-07-02)
parents 429f282ecbb3 d2ebc66da34c
children c85311cc1aec
files
line diff
     1.1 --- a/xennet/xennet.c	Wed Jul 02 11:35:37 2008 -0700
     1.2 +++ b/xennet/xennet.c	Wed Jul 02 11:35:56 2008 -0700
     1.3 @@ -172,6 +172,10 @@ XenNet_ConnectBackend(struct xennet_info
     1.4        else
     1.5          memcpy(&xi->vectors, value, sizeof(XENPCI_VECTORS));
     1.6        break;
     1.7 +    case XEN_INIT_TYPE_STATE_PTR:
     1.8 +      KdPrint((__DRIVER_NAME "     XEN_INIT_TYPE_DEVICE_STATE - %p\n", PtrToUlong(value)));
     1.9 +      xi->device_state = (PXENPCI_DEVICE_STATE)value;
    1.10 +      break;
    1.11      default:
    1.12        KdPrint((__DRIVER_NAME "     XEN_INIT_TYPE_%d\n", type));
    1.13        break;
    1.14 @@ -402,7 +406,7 @@ XenNet_Init(
    1.15        break;
    1.16      }
    1.17    }
    1.18 -
    1.19 +  
    1.20    // now build config page
    1.21    
    1.22    NdisOpenConfiguration(&status, &config_handle, WrapperConfigurationContext);
     2.1 --- a/xenpci/hypercall.h	Wed Jul 02 11:35:37 2008 -0700
     2.2 +++ b/xenpci/hypercall.h	Wed Jul 02 11:35:56 2008 -0700
     2.3 @@ -74,3 +74,9 @@ hvm_shutdown(PXENPCI_DEVICE_DATA xpdd, u
     2.4    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
     2.5    return retval;
     2.6  }
     2.7 +
     2.8 +static __inline VOID
     2.9 +HYPERVISOR_yield(PXENPCI_DEVICE_DATA xpdd)
    2.10 +{
    2.11 +  HYPERVISOR_sched_op(xpdd, SCHEDOP_yield, NULL);
    2.12 +}
     3.1 --- a/xenpci/xenpci_fdo.c	Wed Jul 02 11:35:37 2008 -0700
     3.2 +++ b/xenpci/xenpci_fdo.c	Wed Jul 02 11:35:56 2008 -0700
     3.3 @@ -363,6 +363,7 @@ XenPci_Suspend(
     3.4      KeMemoryBarrier();
     3.5      while(suspend_info->do_spin)
     3.6      {
     3.7 +      HYPERVISOR_yield(xpdd);
     3.8        /* we should be able to wait more nicely than this... */
     3.9      }
    3.10      KeMemoryBarrier();
    3.11 @@ -379,7 +380,7 @@ XenPci_Suspend(
    3.12    KdPrint((__DRIVER_NAME "     waiting for all other processors to spin\n"));
    3.13    while (suspend_info->nr_spinning < (LONG)ActiveProcessorCount - 1)
    3.14    {
    3.15 -      /* we should be able to wait more nicely than this... */
    3.16 +      HYPERVISOR_yield(xpdd);
    3.17    }
    3.18    KdPrint((__DRIVER_NAME "     all other processors are spinning\n"));
    3.19  
    3.20 @@ -410,7 +411,7 @@ XenPci_Suspend(
    3.21    suspend_info->do_spin = 0;
    3.22    while (suspend_info->nr_spinning != 0)
    3.23    {
    3.24 -      /* we should be able to wait more nicely than this... */
    3.25 +    HYPERVISOR_yield(xpdd);
    3.26    }
    3.27    KdPrint((__DRIVER_NAME "     all other processors have stopped spinning\n"));
    3.28  
    3.29 @@ -437,8 +438,8 @@ XenPci_BeginSuspend(PXENPCI_DEVICE_DATA 
    3.30    {
    3.31      xpdd->suspending = 1;
    3.32      suspend_info = ExAllocatePoolWithTag(NonPagedPool, sizeof(SUSPEND_INFO), XENPCI_POOL_TAG);
    3.33 +    RtlZeroMemory(suspend_info, sizeof(SUSPEND_INFO));
    3.34      suspend_info->do_spin = 1;
    3.35 -    RtlZeroMemory(suspend_info, sizeof(SUSPEND_INFO));
    3.36  
    3.37      // I think we need to synchronise with the interrupt here...
    3.38  
     4.1 --- a/xenpci/xenpci_pdo.c	Wed Jul 02 11:35:37 2008 -0700
     4.2 +++ b/xenpci/xenpci_pdo.c	Wed Jul 02 11:35:56 2008 -0700
     4.3 @@ -532,11 +532,6 @@ XenPci_XenConfigDeviceSpecifyBuffers(PVO
     4.4          goto error;
     4.5        }
     4.6        break;
     4.7 -#if 0     
     4.8 -    case XEN_INIT_TYPE_COPY_PTR:
     4.9 -      ADD_XEN_INIT_RSP(&out_ptr, type, setting, value);
    4.10 -      break;
    4.11 -#endif      
    4.12      }
    4.13    }
    4.14    if (!NT_SUCCESS(status))
    4.15 @@ -595,7 +590,8 @@ XenPci_XenConfigDeviceSpecifyBuffers(PVO
    4.16        break;
    4.17      }
    4.18    }
    4.19 -
    4.20 +  ADD_XEN_INIT_RSP(&out_ptr, XEN_INIT_TYPE_END, NULL, NULL);
    4.21 +  
    4.22  error:
    4.23    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (%08x\n", status));
    4.24