[pve-devel] [PATCH qemu-server v2 1/3] Refactor HyperV enlightenments

Philip Abernethy p.abernethy at proxmox.com
Mon Aug 21 11:47:16 CEST 2017


Fixes a typo in the function name and removes the $nokvm parameter, as it's only
used to immideately exit the function. Instead calling the function
conditionally.
---
 PVE/QemuServer.pm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 1f34101..ee5e467 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3143,7 +3143,7 @@ sub config_to_command {
 	push @$cpuFlags , '+kvm_pv_eoi' if !$nokvm;
     }
 
-    add_hyperv_enlighments($cpuFlags, $winversion, $machine_type, $kvmver, $nokvm, $conf->{bios}, $gpu_passthrough);
+    add_hyperv_enlightenments($cpuFlags, $winversion, $machine_type, $kvmver, $conf->{bios}, $gpu_passthrough) if !$nokvm;
 
     push @$cpuFlags, 'enforce' if $cpu ne 'host' && !$nokvm;
 
@@ -6359,10 +6359,9 @@ sub scsihw_infos {
     return ($maxdev, $controller, $controller_prefix);
 }
 
-sub add_hyperv_enlighments {
-    my ($cpuFlags, $winversion, $machine_type, $kvmver, $nokvm, $bios, $gpu_passthrough) = @_;
+sub add_hyperv_enlightenments {
+    my ($cpuFlags, $winversion, $machine_type, $kvmver, $bios, $gpu_passthrough) = @_;
 
-    return if $nokvm;
     return if $winversion < 6;
     return if $bios && $bios eq 'ovmf' && $winversion < 8;
 
-- 
2.11.0




More information about the pve-devel mailing list