Glauber Costa wrote:
clflush is a non-privileged instruction that flushes the cacheline
given by its parameter, in terms of linear address. As it is non-privileged,
it is quite tricky, because a guest doing clflush will actually be trying to
flush a host kernel address.
Is this the case still with NPT/EPT?
Regards,
Anthony Liguori
Signed-off-by: Glauber Costa <[EMAIL PROTECTED]>
---
qemu/qemu-kvm-x86.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
index 5daedd1..7f90fc2 100644
--- a/qemu/qemu-kvm-x86.c
+++ b/qemu/qemu-kvm-x86.c
@@ -505,13 +505,17 @@ static void do_cpuid_ent(struct kvm_cpuid_entry *e,
uint32_t function,
e->ecx = bcd[1];
e->edx = bcd[2];
}
- // "Hypervisor present" bit for Microsoft guests
- if (function == 1)
- e->ecx |= (1u << 31);
+
+ if (function == 1) {
+ // "Hypervisor present" bit for Microsoft guests
+ e->ecx |= (1u << 31);
+ e->edx &= ~(1u << 19);
+ }
// 3dnow isn't properly emulated yet
if (function == 0x80000001)
- e->edx &= ~0xc0000000;
+ e->edx &= ~0xc0000000;
+
}
struct kvm_para_features {
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html