From: Sasha Levin <levinsasha928@gmail.com>
To: Zang Hongyong <zanghongyong@huawei.com>
Cc: kvm@vger.kernel.org, penberg@kernel.org, xiaowei.yang@huawei.com,
hanweidong@huawei.com, wusongwei@huawei.com, kongbo@huawei.com
Subject: Re: [PATCH] kvm tools: Make the whole guest memory mergeable
Date: Fri, 16 Dec 2011 11:46:49 +0200 [thread overview]
Message-ID: <1324028809.4496.40.camel@lappy> (raw)
In-Reply-To: <4EEB105F.9050307@huawei.com>
On Fri, 2011-12-16 at 17:33 +0800, Zang Hongyong wrote:
> > Do you see an issue with increasing kvm->ram_size?
> >
> Yes, it will cause some problems after simply increase the kvm->ram_size.
> For examples:
> In kvm__init_ram() code we use kvm->ram_size to calculate the size of
> the second
> RAM range from 4GB to the end of RAM (phys_size = kvm->ram_size -
> phys_size;),
> so after increase the kvm->ram_size, it will goes wrong.
> This problem also happens in e820_setup() code and load_bzimage() code.
Yup, but fixing it is much easier than having two different sizes of the same thing.
For example, the fix for the problem in kvm__init_ram() (and e820_setup()) would be:
@@ -112,7 +112,7 @@ void kvm__init_ram(struct kvm *kvm)
/* Second RAM range from 4GB to the end of RAM: */
phys_start = 0x100000000ULL;
- phys_size = kvm->ram_size - phys_size;
+ phys_size = kvm->ram_size - phys_start;
host_mem = kvm->ram_start + phys_start;
kvm__register_mem(kvm, phys_start, phys_size, host_mem);
I basically want one memory map with one size which includes *everything*, even if that memory map includes a gap in the middle I still want the total size to include that gap.
btw, what problem do you see in load_bzimage()?
--
Sasha.
next prev parent reply other threads:[~2011-12-16 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 1:01 [PATCH] kvm tools: Make the whole guest memory mergeable zanghongyong
2011-12-16 5:50 ` Sasha Levin
2011-12-16 7:02 ` Zang Hongyong
2011-12-16 7:23 ` Sasha Levin
2011-12-16 8:36 ` Zang Hongyong
2011-12-16 8:45 ` Sasha Levin
2011-12-16 9:33 ` Zang Hongyong
2011-12-16 9:46 ` Sasha Levin [this message]
2011-12-19 2:39 ` Zang Hongyong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324028809.4496.40.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=hanweidong@huawei.com \
--cc=kongbo@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=wusongwei@huawei.com \
--cc=xiaowei.yang@huawei.com \
--cc=zanghongyong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).