From: Avi Kivity <avi@redhat.com>
To: "Kumar, Venkat" <Venkat.Kumar@lsi.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Allocating Extra Memory To Guest
Date: Wed, 06 May 2009 15:24:00 +0300 [thread overview]
Message-ID: <4A018160.9080607@redhat.com> (raw)
In-Reply-To: <3D9CB4061D1EB3408D4A0B910433453C030BABB02A@inbmail01.lsi.com>
Kumar, Venkat wrote:
> Kumar, Venkat wrote:
>
>> Hi,
>>
>> 1. How should we allocate extra memory to guest other than memory allocated through "qemu_alloc_physram"??
>>
>>
>
> qemu_alloc_physram() is obsolete. I've just removed it to avoid
> confusion (and a warning).
>
> ==>
> If kvm-85 is the latest version, I still see "qemu_alloc_physram" invoked to allocate memory. This piece of code is in qemu/vl.c.
>
The really latest version is in git. See
http://www.linux-kvm.org/page/Code.
> I presume you want to give kvm memory which is not real RAM - from a
> host device?
> hw/device-assignment.c does that.
>
> Please clarify what you want to do.
>
> ==>
> I want to allocate extra RAM for the guest apart from memory allocated through "qemu_alloc_physram". Let's assume that I have allocated some RAM for guest through "qemu_alloc_physram" call and some more memory through "malloc or mmap", how will I register these two virtually discontinuous memory regions with KVM?
>
You can use qemu_ram_alloc() and cpu_register_physical_memory().
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
prev parent reply other threads:[~2009-05-06 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 9:24 Allocating Extra Memory To Guest Kumar, Venkat
2009-05-06 11:12 ` Avi Kivity
2009-05-06 12:09 ` Kumar, Venkat
2009-05-06 12:24 ` Avi Kivity [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=4A018160.9080607@redhat.com \
--to=avi@redhat.com \
--cc=Venkat.Kumar@lsi.com \
--cc=kvm@vger.kernel.org \
/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.