[pve-devel] [RFC PATCH qemu-server 2/2] allow explicit set vga with gpu passthrough

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jan 25 17:21:19 CET 2019


On 1/21/19 3:56 PM, Dominik Csapak wrote:
> this patch allows the user to explicitely set a virtual vga,
> even when using the 'x-vga' flag, this is sometimes necessary,
> as some users need the 'x-vga' flag on the pci device,
> but still want to use a virtual vga
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> this would be a breaking change, but with pci-passthrough, we do not
> have to care about live-migration, so do we have to care?
> 
> in a default setup, this does not change anything, only when a user
> has set a vga type manually (but this did not work previously) which
> is now working
> 

I'd take this in once a user can set vga 'none' through the WebUI,
so that for the rare case anyone has vga still configured and it now
adds some extra hardware, and the guest OS or it's GPU driver do not
handle that well, anybody has just an easy switch to go to his old
behavior.

>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 4f674f2..ef611b2 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -3553,7 +3553,7 @@ sub config_to_command {
>  	if ($d->{'x-vga'}) {
>  	    $xvga = ',x-vga=on';
>  	    $kvm_off = 1;
> -	    $vga->{type} = 'none';
> +	    $vga->{type} = 'none' if !defined($conf->{vga});
>  	    $gpu_passthrough = 1;
>  
>  	    if ($conf->{bios} && $conf->{bios} eq 'ovmf') {
> 





More information about the pve-devel mailing list