Google
  Web www.spinics.net

Re: [PATCH 04/04] qemu-kvm: other archs should maintain memory mapping also.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Jes Sorensen wrote:
Avi Kivity wrote:
Currently, use TARGET_I386 to comment out the mapping machanism
for other archs, but mapping machanism should be useful for other archs
to maintain guest's memory mapping.

Hollis, does this work for you?

If now, you can add a new define KVM_WANT_MAPPING or something, and define it for I386 and IA64.

Hi,

This is the must_use_alias patch mentioned in my previous email.


+int destroy_region_works = 0;
+

Global name, prefix with kvm_.  Does it actually need to be global?

Index: qemu-kvm/target-i386/qemu-kvm-arch.h
===================================================================
--- /dev/null
+++ qemu-kvm/target-i386/qemu-kvm-arch.h
@@ -0,0 +1,17 @@
+/*
+ * qemu/kvm x86 integration
+ *
+ * Copyright (C) 2006-2008 Qumranet Technologies
+ * Copyright (C) 2009 Silicon Graphics Inc.
+ *
+ * Licensed under the terms of the GNU GPL version 2 or higher.
+ */
+#ifndef QEMU_KVM_ARCH_H
+#define QEMU_KVM_ARCH_H
+
+extern int destroy_region_works;
+
+extern int kvm_arch_must_use_aliases_source(target_phys_addr_t addr);
+extern int kvm_arch_must_use_aliases_target(target_phys_addr_t addr);

The header depends on target_phys_addr_t, so it must include whatever defines it.

--- /dev/null
+++ qemu-kvm/target-ia64/qemu-kvm-arch.h
@@ -0,0 +1,22 @@
+/*
+ * qemu/kvm ia64 integration
+ *
+ * Copyright (C) 2006-2008 Qumranet Technologies
+ * Copyright (C) 2009 Silicon Graphics Inc.
+ *
+ * Licensed under the terms of the GNU GPL version 2 or higher.
+ */
+#ifndef QEMU_KVM_ARCH_H
+#define QEMU_KVM_ARCH_H
+
+static inline int kvm_arch_must_use_aliases_source(target_phys_addr_t addr)
+{
+    return 0;
+}
+
+static inline int kvm_arch_must_use_aliases_target(target_phys_addr_t addr)
+{
+    return 0;
+}
+
+#endif

Missing other archs...

Instead of duplicating this for every arch, you can have a #define that tells you if you want non-trivial arch definitions, and supply the trivial definitions in qemu-kvm.h.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe kvm-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [16.7MP]

  Powered by Linux