mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
Merge pull request #31465 from xypron/detect-virt
Detect virtualization on RISC-V
This commit is contained in:
@@ -98,7 +98,7 @@ static Virtualization detect_vm_cpuid(void) {
|
||||
}
|
||||
|
||||
static Virtualization detect_vm_device_tree(void) {
|
||||
#if defined(__arm__) || defined(__aarch64__) || defined(__powerpc__) || defined(__powerpc64__)
|
||||
#if defined(__arm__) || defined(__aarch64__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__riscv)
|
||||
_cleanup_free_ char *hvtype = NULL;
|
||||
int r;
|
||||
|
||||
@@ -155,7 +155,7 @@ static Virtualization detect_vm_device_tree(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64)
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) || defined(__riscv)
|
||||
static Virtualization detect_vm_dmi_vendor(void) {
|
||||
static const char* const dmi_vendors[] = {
|
||||
"/sys/class/dmi/id/product_name", /* Test this before sys_vendor to detect KVM over QEMU */
|
||||
|
||||
Reference in New Issue
Block a user