From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Map VM's memory? Date: Tue, 28 Nov 2006 16:07:09 +0200 Message-ID: <456C428D.3030408@qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: To: Jun Koi In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Jun Koi wrote: > Hi, > > Could anybody tell me how to map memory of VMs in KVM (mapping done > from hypervisor)? > I am reading the source, but still cannot figure it out. > > In the kernel, see struct kvm->memslots[x].phys_mem[y]. You need to kmap()/kunmap() it before use. In userspace, just mmap() /dev/kvm, the file offset is the physical memory address. > Another question: can KVM provide strong isolation between VMs? That > means if there is a security bug in a VM kernel, can it affect other > VMs? (It seems not to me, could anybody confirm this?) > > Barring any bugs, kvm fully isolates guests. Guest kernel activity (malicious or erronous) should not affect other guests except through defined interfaces (e.g. networking). -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV