From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM and Perf Counters Date: Thu, 01 Feb 2007 18:15:13 +0200 Message-ID: <45C21211.3050509@qumranet.com> References: <45A4B3E4.7090202@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Casey Jeffery Return-path: 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 Casey Jeffery wrote: > 1. What is the best way to start and ID multiple guests? I've just > been configuring a script to start up two of them from the > command-line and storing an ID in the kvm_vcpu structure. The first to > get to get to vmc_run() is designated as the primary and the other is > then the secondary that will replicate what the primary does. You already have a guest ID -- the pid of the process which created the VM. Is there any reason to have another ID? > I'm open > to ideas on automating the creation of multiple guests (with pinning > to CPUs). > You can pin using taskset(1) or sched_setaffinity(2). I don't understand the problem with automating guest creation. > 2. Where should the bulk of the buffering and synchronization be done? > I've been putting everything in the hypervisor since it can see all > the guests. It may make sense to put some things in the qemu code and > make use of other IPC mechanisms for synchronization, though. > Userspace is the best place. > 3. What is the best way to deal with I/O string/string_down calls that > handle the I/O in kvmctl.c? I would guess it will be necessary to > buffer the memory range somewhere and pass the address of that someone > for the secondary guest to access when it gets to that point. > I'd suggest serializing everything over a socket. That way you can run the primary and backup on different machines. > 4. DMA? I haven't thought about this much yet and am using simple > guests that don't do it. It will need to be handled eventually, > though. > Since DMA is handled by qemu, you already have a sync point. Just tag the guest address and data with that sync point. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642