On 12/22/2011 01:56 PM, Christian Borntraeger wrote: > From: Christian Borntraeger <borntraeger@xxxxxxxxxx> > > On some cpus the overhead for virtualization instructions is in the same > range as a system call. Having to call multiple ioctls to get set registers > will make userspace handled exits more expensive than necessary. > Lets provide two sections in kvm_run to have a shared save area for > guest registers. > 1. the first section is read-only, to handle registers that have side-effects > 2. the second section is read/write, e.g. for general purpose registers. An alternative is to have a single section, with a bitmask set by userspace to indicate which registers have not been changed (a la svm's CleanBits). Is this worthwhile for s390? > }; > + /* Here are two fields that allow to access often used registers > + * directly, to avoid the overhead of the ioctl system call */ > + union { > + /* registers which can be only read */ > + struct sync_ro_regs sync_ro_regs; kvm_ > + char padding[1024]; > + }; > + union { > + /* read/write guest registers */ > + struct sync_rw_regs sync_rw_regs; kvm_ > + char padding[1024]; > + }; > }; blank line > +These fields allow userspace to access certain guest registers without > +having to call SET/GET_*REGS. Thus we can avoid some system call > +overhead if userspace has to handle the exit. (only available if > +KVM_CAP_SYNC_REGS is set). The ioctls will still work. > > -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html