mirror of
https://github.com/siderolabs/talos.git
synced 2025-09-28 17:21:24 +02:00
* split platform specific preflight checks into platform specific files * error on darwin if target is amd64 * error on darwin if host platform is amd64 * add darwin specific var-file and pflash file locations * remove hard kvm requirement (so linux logic can be tested on machines without kvm) Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com> Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
19 lines
458 B
Go
19 lines
458 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package qemu
|
|
|
|
import "runtime"
|
|
|
|
const accelerator = "kvm"
|
|
|
|
func (arch Arch) acceleratorAvailable() bool {
|
|
if err := checkKVM(); err != nil {
|
|
return false
|
|
}
|
|
|
|
// kvm only supports emulating native architectures
|
|
return string(arch) == runtime.GOARCH
|
|
}
|