All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zang Hongyong <zanghongyong@huawei.com>
To: Sasha Levin <levinsasha928@gmail.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: Mon, 19 Dec 2011 10:39:42 +0800	[thread overview]
Message-ID: <4EEEA3EE.3000409@huawei.com> (raw)
In-Reply-To: <1324028809.4496.40.camel@lappy>

于 2011/12/16,星期五 17:46, Sasha Levin 写道:
> 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()?
>
I've got what you mean.
And there's nothing wrong in load_bzimage(). It's my misunderstanding.


      reply	other threads:[~2011-12-19  2:41 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
2011-12-19  2:39               ` Zang Hongyong [this message]

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=4EEEA3EE.3000409@huawei.com \
    --to=zanghongyong@huawei.com \
    --cc=hanweidong@huawei.com \
    --cc=kongbo@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=penberg@kernel.org \
    --cc=wusongwei@huawei.com \
    --cc=xiaowei.yang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.