[pve-devel] [PATCH qemu-server 1/1] Use usb-kbd for q35 in tablet mode
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Feb 18 08:28:12 CET 2019
Am 2/12/19 um 1:33 PM schrieb Kamil Trzciński:
> From: root <root at ayufandev.nazwa.pl>
>
> The usb-kbd on q35 in tablet mode removes the need for "hotpatching"
> when trying to install MacOS on Proxmox.
> ---
> PVE/QemuServer.pm | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 6dc68a4..7eb6f37 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -1733,9 +1733,12 @@ sub print_tabletdevice_full {
> sub print_keyboarddevice_full {
> my ($conf, $arch, $machine) = @_;
>
> - return undef if $arch ne 'aarch64';
> + my $usbkbd;
> + if (machine_type_is_q35($conf) || $arch eq 'aarch64') {
> + $usbkbd = "usb-kbd,id=keyboard,bus=ehci.0,port=2";
why not just return the value here, saving the variable completely.
if ($arch eq 'aarch64' || machine_type_is_q35($conf)) {
return "usb-kbd,id=keyboard,bus=ehci.0,port=2";
}
also, this seems like it break live migration, while q35 is often
related to HW pass through and thus migration doesn't works in the
first place, there are still people out there using q35 with live
migration, so this should be dealt with.
> + }
>
> - return "usb-kbd,id=keyboard,bus=ehci.0,port=2";
> + return $usbkbd;
> }
>
> sub print_drivedevice_full {
>
More information about the pve-devel
mailing list