my $pcie = $d->{pcie};
if($pcie){
die "q35 machine model is not enabled" if !$q35;
- $pciaddr = print_pcie_addr("hostpci$i");
+ # win7 wants to have the pcie devices directly on the pcie bus
+ # instead of in the root port
+ if ($winversion == 7) {
+ $pciaddr = print_pcie_addr("hostpci${i}bus0");
+ } else {
+ $pciaddr = print_pcie_addr("hostpci$i");
+ }
}else{
$pciaddr = print_pci_addr("hostpci$i", $bridges, $arch, $machine_type);
}
hostpci1 => { bus => "ich9-pcie-port-2", addr => 0 },
hostpci2 => { bus => "ich9-pcie-port-3", addr => 0 },
hostpci3 => { bus => "ich9-pcie-port-4", addr => 0 },
+ # win7 is picky about pcie assignments
+ hostpci0bus0 => { bus => "pcie.0", addr => 16 },
+ hostpci1bus0 => { bus => "pcie.0", addr => 17 },
+ hostpci2bus0 => { bus => "pcie.0", addr => 18 },
+ hostpci3bus0 => { bus => "pcie.0", addr => 19 },
};
if (defined($devices->{$id}->{bus}) && defined($devices->{$id}->{addr})) {