hexware-kernel/patches/qemu/9024-antidetect-target.patch

64 lines
3.2 KiB
Diff
Raw Normal View History

2024-07-26 03:09:31 +03:00
diff -Naur --no-dereference a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
2024-07-26 20:24:42 +03:00
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
2024-07-26 03:09:31 +03:00
@@ -1862,7 +1862,7 @@
abort();
#endif
} else if (cpu->expose_kvm) {
- memcpy(signature, "KVMKVMKVM\0\0\0", 12);
+ memcpy(signature, "GenuineIntel", 12);
c = &cpuid_data.entries[cpuid_i++];
c->function = KVM_CPUID_SIGNATURE | kvm_base;
c->eax = KVM_CPUID_FEATURES | kvm_base;
diff -Naur --no-dereference a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c
2024-07-26 20:24:42 +03:00
--- a/target/s390x/tcg/misc_helper.c
+++ b/target/s390x/tcg/misc_helper.c
2024-07-26 03:09:31 +03:00
@@ -330,13 +330,13 @@
snprintf(type, ARRAY_SIZE(type), "%X", cpu->model->def->type);
ebcdic_put(sysib.sysib_111.type, type, 4);
/* model number (not stored in STORE CPU ID for z/Architecture) */
- ebcdic_put(sysib.sysib_111.model, "QEMU ", 16);
- ebcdic_put(sysib.sysib_111.sequence, "QEMU ", 16);
- ebcdic_put(sysib.sysib_111.plant, "QEMU", 4);
+ ebcdic_put(sysib.sysib_111.model, "ASUS ", 16);
+ ebcdic_put(sysib.sysib_111.sequence, "ASUS ", 16);
+ ebcdic_put(sysib.sysib_111.plant, "ASUS", 4);
} else if ((sel1 == 2) && (sel2 == 1)) {
/* Basic Machine CPU */
- ebcdic_put(sysib.sysib_121.sequence, "QEMUQEMUQEMUQEMU", 16);
- ebcdic_put(sysib.sysib_121.plant, "QEMU", 4);
+ ebcdic_put(sysib.sysib_121.sequence, "ASUSASUSASUSASUS", 16);
+ ebcdic_put(sysib.sysib_121.plant, "ASUS", 4);
sysib.sysib_121.cpu_addr = cpu_to_be16(env->core_id);
} else if ((sel1 == 2) && (sel2 == 2)) {
/* Basic Machine CPUs */
@@ -351,8 +351,8 @@
case STSI_R0_FC_LEVEL_2:
if ((sel1 == 2) && (sel2 == 1)) {
/* LPAR CPU */
- ebcdic_put(sysib.sysib_221.sequence, "QEMUQEMUQEMUQEMU", 16);
- ebcdic_put(sysib.sysib_221.plant, "QEMU", 4);
+ ebcdic_put(sysib.sysib_221.sequence, "ASUSASUSASUSASUS", 16);
+ ebcdic_put(sysib.sysib_221.plant, "ASUS", 4);
sysib.sysib_221.cpu_addr = cpu_to_be16(env->core_id);
} else if ((sel1 == 2) && (sel2 == 2)) {
/* LPAR CPUs */
@@ -360,7 +360,7 @@
sysib.sysib_222.total_cpus = cpu_to_be16(total_cpus);
sysib.sysib_222.conf_cpus = cpu_to_be16(conf_cpus);
sysib.sysib_222.reserved_cpus = cpu_to_be16(reserved_cpus);
- ebcdic_put(sysib.sysib_222.name, "QEMU ", 8);
+ ebcdic_put(sysib.sysib_222.name, "ASUS ", 8);
sysib.sysib_222.caf = cpu_to_be32(1000);
sysib.sysib_222.dedicated_cpus = cpu_to_be16(conf_cpus);
} else {
@@ -376,7 +376,7 @@
sysib.sysib_322.vm[0].reserved_cpus = cpu_to_be16(reserved_cpus);
sysib.sysib_322.vm[0].caf = cpu_to_be32(1000);
/* Linux kernel uses this to distinguish us from z/VM */
- ebcdic_put(sysib.sysib_322.vm[0].cpi, "KVM/Linux ", 16);
+ ebcdic_put(sysib.sysib_322.vm[0].cpi, "ATX/Linux ", 16);
sysib.sysib_322.vm[0].ext_name_encoding = 2; /* UTF-8 */
2024-07-26 21:16:38 +03:00
/* If our VM has a name, use the real name */