[pve-devel] [PATCH] enable q35 machine support

Dietmar Maurer dietmar at proxmox.com
Wed Jun 18 06:19:35 CEST 2014


> -    $pciaddr = print_pci_addr("piix3", $bridges);
> -    push @$devices, '-device', "piix3-usb-uhci,id=uhci$pciaddr.0x2";
> +    if($q35){
> +        push @$devices, '-readconfig', '/usr/share/qemu-server/pve-q35.cfg';
> +    }else{
> +        $pciaddr = print_pci_addr("piix3", $bridges);
> +        push @$devices, '-device',
> + "piix3-usb-uhci,id=uhci$pciaddr.0x2";
> 
> -    my $use_usb2 = 0;
> -    for (my $i = 0; $i < $MAX_USB_DEVICES; $i++)  {
> -	next if !$conf->{"usb$i"};
> -	$use_usb2 = 1;
> +        my $use_usb2 = 0;
> +            for (my $i = 0; $i < $MAX_USB_DEVICES; $i++)  {
> +                next if !$conf->{"usb$i"};
> +                $use_usb2 = 1;
> +            }
> +            # include usb device config
> +            push @$devices, '-readconfig',
> + '/usr/share/qemu-server/pve-usb.cfg' if $use_usb2;
>      }
> -    # include usb device config
> -    push @$devices, '-readconfig', '/usr/share/qemu-server/pve-usb.cfg' if
> $use_usb2;

Previously, we only created usb devices if the VM uses usb devices. Why did you change that?




More information about the pve-devel mailing list