]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuServer/CPUConfig.pm
cpu config: implement is_native_arch locally for now
[qemu-server.git] / PVE / QemuServer / CPUConfig.pm
index 7d471f4b0a67005917f8d814efb1cf82310565c1..7e5748832c2282d6f9083216de9804b09ed6e3c7 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 
 use PVE::JSONSchema;
 use PVE::Cluster qw(cfs_register_file cfs_read_file);
-use PVE::Tools qw(is_native_arch);
+use PVE::Tools qw(get_host_arch);
 use PVE::QemuServer::Helpers qw(min_version);
 
 use base qw(PVE::SectionConfig Exporter);
@@ -14,6 +14,7 @@ our @EXPORT_OK = qw(
 print_cpu_device
 get_cpu_options
 get_cpu_bitness
+is_native_arch
 );
 
 # under certain race-conditions, this module might be loaded before pve-cluster
@@ -738,6 +739,11 @@ sub get_default_cpu_type {
     return $cputype;
 }
 
+sub is_native_arch($) {
+    my ($arch) = @_;
+    return get_host_arch() eq $arch;
+}
+
 sub get_cpu_bitness {
     my ($cpu_prop_str, $arch) = @_;