[pve-devel] [PATCH] q35 : spice virtio-serial on pcie.0

Alexandre Derumier aderumier at odiso.com
Tue Aug 12 08:15:15 CEST 2014


spice virtio-serial don't work on pci.0 with q35
(maybe it's not working on pci bridge)

It's works fine on pcie.0

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index aee1c8d..681ad3d 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2690,7 +2690,12 @@ sub config_to_command {
 	    }
 	}
 
-	my $pciaddr = print_pci_addr("spice", $bridges);
+	my $pciaddr = "";
+	if($q35){
+	    $pciaddr = print_pcie_addr("spice");
+	}else{
+	    $pciaddr = print_pci_addr("spice", $bridges);
+	}
 
 	$spice_port = PVE::Tools::next_spice_port();
 
@@ -3917,6 +3922,7 @@ sub print_pcie_addr {
 	hostpci1 => { bus => "ich9-pcie-port-2", addr => 0 },
 	hostpci2 => { bus => "ich9-pcie-port-3", addr => 0 },
 	hostpci3 => { bus => "ich9-pcie-port-4", addr => 0 },
+	spice => { bus => "pcie.0", addr => 9 },
     };
 
     if (defined($devices->{$id}->{bus}) && defined($devices->{$id}->{addr})) {
-- 
1.7.10.4



More information about the pve-devel mailing list