public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sukanto Ghosh <sukanto@cse.iitb.ac.in>
To: kvm@vger.kernel.org
Subject: Re: Scheduling of VCPUs and allocation of Guest Physical Memory
Date: Mon, 09 Jun 2008 16:40:07 +0530	[thread overview]
Message-ID: <484D0F8F.4010807@cse.iitb.ac.in> (raw)
In-Reply-To: <48494C67.5090406@codemonkey.ws>

Anthony Liguori wrote:
> Sukanto Ghosh wrote:
>>>> ii) Who does the allocation of host physical memory to the guest, 
>>>> is it KVM module or the associated QEmu process ?
>>>
>>> The QEMU process allocates the memory via malloc().
>> Doesn't the QEMU process and the guest have different address-spaces 
>> ? So, how can it malloc for the guest ? I thought the QEMU process 
>> requests for the memory allocation to the kvm module via the /dev/kvm 
>> device node.
>
> Yes, the guest has a different address space from the host.  The QEMU 
> process malloc()'s the physical memory for the guest, and tells KVM 
> what the region is (via an ioctl to /dev/kvm).


Why does the QEMU process needs to malloc() the physical memory for the 
guest ? Why can't it be done by the kernel itself ? Is it because the 
said pages will be sharable between the QEMU process and the guest, 
which will aid the QEMU process while performing DMA.



Also, when and how are host-initiated virtual interrupts delivered?  I 
guess, that it is done at the time of VM-entry. But what about the 
interrupts that need to be delivered immediately and while the VM is 
executing (assume interrupts are enabled in the guest). Is any kind of 
signal-based mechanism employed to force a VM-exit ?



Thanks and Regards,

Sukanto Ghosh

  reply	other threads:[~2008-06-09 11:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05  7:29 Scheduling of VCPUs and allocation of Guest Physical Memory Sukanto Ghosh
2008-06-05 12:54 ` Anthony Liguori
2008-06-06 14:22   ` Sukanto Ghosh
2008-06-06 14:40     ` Anthony Liguori
2008-06-09 11:10       ` Sukanto Ghosh [this message]
2008-06-09 16:19         ` Avi Kivity
2008-06-16 14:23           ` Sukanto Ghosh
2008-06-18 14:12             ` 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=484D0F8F.4010807@cse.iitb.ac.in \
    --to=sukanto@cse.iitb.ac.in \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox