All of lore.kernel.org
 help / color / mirror / Atom feed
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 14:12:25 +0300	[thread overview]
Message-ID: <4A017099.20305@redhat.com> (raw)
In-Reply-To: <3D9CB4061D1EB3408D4A0B910433453C030BABAFBC@inbmail01.lsi.com>

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).

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.


> 2. How to register the extra allocated memory with KVM?
>   

cpu_register_physical_memory(), but that has to come from qemu_ram_alloc().

As a hack, you can call qemu_ram_alloc(), and then 
mmap(qemu_ram_ptr(ram_offset), ... ) to replace the RAM with device memory.

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


  reply	other threads:[~2009-05-06 11:13 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 [this message]
2009-05-06 12:09   ` Kumar, Venkat
2009-05-06 12:24     ` Avi Kivity

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=4A017099.20305@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.