win-pvdrivers

changeset 749:233c06b133e9

Vif changes for device hiding changes
author James Harper <james.harper@bendigoit.com.au>
date Sun Jan 10 10:10:52 2010 +1100 (2010-01-10)
parents fc7dfb98cc7a
children cb83af6bcdef
files xennet/xennet.c xennet/xennet.inx
line diff
     1.1 --- a/xennet/xennet.c	Sun Jan 10 10:07:48 2010 +1100
     1.2 +++ b/xennet/xennet.c	Sun Jan 10 10:10:52 2010 +1100
     1.3 @@ -356,6 +356,8 @@ XenNet_Init(
     1.4    CHAR buf[128];
     1.5    PVOID network_address;
     1.6    UINT network_address_length;
     1.7 +  BOOLEAN qemu_hide_filter = FALSE;
     1.8 +  ULONG qemu_hide_flags_value = 0;
     1.9    
    1.10    UNREFERENCED_PARAMETER(OpenErrorStatus);
    1.11  
    1.12 @@ -506,16 +508,27 @@ XenNet_Init(
    1.13        KdPrint((__DRIVER_NAME "     XEN_INIT_TYPE_DEVICE_STATE - %p\n", PtrToUlong(value)));
    1.14        xi->device_state = (PXENPCI_DEVICE_STATE)value;
    1.15        break;
    1.16 +#if 0
    1.17      case XEN_INIT_TYPE_ACTIVE:
    1.18        KdPrint((__DRIVER_NAME "     XEN_INIT_TYPE_ACTIVE\n"));
    1.19        xi->inactive = FALSE;
    1.20        break;
    1.21 +#endif
    1.22 +    case XEN_INIT_TYPE_QEMU_HIDE_FLAGS:
    1.23 +      qemu_hide_flags_value = PtrToUlong(value);
    1.24 +      break;
    1.25 +    case XEN_INIT_TYPE_QEMU_HIDE_FILTER:
    1.26 +      qemu_hide_filter = TRUE;
    1.27 +      break;
    1.28      default:
    1.29        KdPrint((__DRIVER_NAME "     XEN_INIT_TYPE_%d\n", type));
    1.30        break;
    1.31      }
    1.32    }
    1.33  
    1.34 +  if ((qemu_hide_flags_value & QEMU_UNPLUG_ALL_IDE_DISKS) || qemu_hide_filter)
    1.35 +    xi->inactive = FALSE;
    1.36 +
    1.37    // now build config page
    1.38    
    1.39    NdisOpenConfiguration(&status, &config_handle, WrapperConfigurationContext);
     2.1 --- a/xennet/xennet.inx	Sun Jan 10 10:07:48 2010 +1100
     2.2 +++ b/xennet/xennet.inx	Sun Jan 10 10:10:52 2010 +1100
     2.3 @@ -104,10 +104,16 @@ AddReg = XenNet_Service_AddReg
     2.4  ; 5 = PciBus, 0 = Internal, 15 = PnpBus
     2.5  HKR,"Parameters\PnpInterface", "15", 0x00010001, 0x00000001
     2.6  ; hide Qemu Network in XenPCI
     2.7 +HKLM,"SYSTEM\CurrentControlSet\Services\XenPCI\Parameters", "hide_devices", 0x00010008, "#vif#"
     2.8  HKLM,"SYSTEM\CurrentControlSet\Services\XenPCI\Parameters", "hide_devices", 0x00010008, "VEN_10EC&DEV_8139"
     2.9 +; tell Qemu to hide stuff
    2.10 +HKLM,"SYSTEM\CurrentControlSet\Services\XenPCI\Parameters", "qemu_hide_flags", 0x00010008, %QEMU_UNPLUG_ALL_NICS%
    2.11  
    2.12  [Strings]
    2.13  XenGplPv = "Xen GPL PV Driver Developers"
    2.14  XenNet.SVCDESC = "Xen Net Device Driver"
    2.15  XenNet.DRVDESC = "Xen Net Device Driver"
    2.16  DISK_NAME = "Xen Net Device Driver Install Disk"
    2.17 +QEMU_UNPLUG_ALL_IDE_DISKS = 1
    2.18 +QEMU_UNPLUG_ALL_NICS      = 2
    2.19 +QEMU_UNPLUG_AUX_IDE_DISKS = 4