On 2/1/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > 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 guess ID isn't a good term to use. I was using the ID to identify the guest as being primary or secondary. I could map the PID to being one or the other, but I don't think it's beneficial over just directly labeling them as such. > > > 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. > I'm currently using a simple shell script that starts two processes separately with taskset to do the pinning. By automation, I was thinking along the lines of passing an argument to a single call to qemu and having it start the multiple processes and pin them. It's a very minor point. > > > 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. ok > > > 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. > This is a good point, and I will explore it. I hadn't been concerned with running across machines, but it may fall out as a free feature in such an implementation as long as performance isn't too bad. > > 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. > Thanks again for the help. -Casey ------------------------------------------------------------------------- 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 _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel