Glauber Costa wrote:
Don't save x86_64-specific msrs if our kernel does not support them.
Code is already in qemu-kvm.git, but the test function is slightly different.
It follows what the test for msr_start does.

Repeat after me: "I will not use --target-list when submitting qemu patches. I will not use --target-list when submitting qemu patches."

Fedora enables ccache by default. After one build, all future builds are extremely fast in most cases. It's really not that bad :-)

Signed-off-by: Glauber Costa <glom...@redhat.com>
---
 target-i386/kvm.c |   37 +++++++++++++++++++++++++++----------
 1 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 7010999..0e69b57 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -15,6 +15,7 @@
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
+#include <sys/utsname.h>
#include <linux/kvm.h> @@ -266,6 +267,20 @@ static int kvm_has_msr_star(CPUState *env)
     return 0;
 }
+static int lm_capable_kernel(void)
+{
+    static int lm_capable = -1;
+    struct utsname utsname;
+
+    if (lm_capable != -1) {
+        return lm_capable;
+    }
+
+    uname(&utsname);
+    lm_capable = (strcmp(utsname.machine, "x86_64") == 0);
+    return lm_capable;
+}
+

This function is unused for qemu-system-i386.

Regards,

Anthony Liguori


Reply via email to