Re: [PATCH v2] kvm tool: Change kvm->ram_size to real mapped size.

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

 



On Thu, 5 Jan 2012, Zang Hongyong wrote:
  tools/kvm/x86/bios.c |    2 +-
  tools/kvm/x86/kvm.c  |   12 ++++++------
  2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/kvm/x86/bios.c b/tools/kvm/x86/bios.c
index ded0717..06ec708 100644
--- a/tools/kvm/x86/bios.c
+++ b/tools/kvm/x86/bios.c
@@ -93,7 +93,7 @@ static void e820_setup(struct kvm *kvm)
                };
                mem_map[i++]    = (struct e820entry) {
                        .addr           = 0x100000000ULL,
- .size = kvm->ram_size - KVM_32BIT_GAP_START,
+                       .size           = kvm->ram_size - 0x100000000ULL,
                        .type           = E820_RAM,
                };
        }
diff --git a/tools/kvm/x86/kvm.c b/tools/kvm/x86/kvm.c
index d2fbbe2..11a726e 100644
--- a/tools/kvm/x86/kvm.c
+++ b/tools/kvm/x86/kvm.c
@@ -111,7 +111,7 @@ void kvm__init_ram(struct kvm *kvm)
                /* Second RAM range from 4GB to the end of RAM: */

                phys_start = 0x100000000ULL;
Can we please turn this "0x100000000ULL" magic number into a constant?

Sure. How about define this magic number as follow?
#define KVM_32BIT_MAX_MEM_SIZE (1ULL << 32)

I'm OK with that.

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux