Avi Kivity wrote: > Avi Kivity wrote: >> >>> >>>> For every vmexit, it does the entire thing, including vmload/vmsave >>> >>> I haven't had a lot of luck eliminating vmload/vmsave. >>> >> >> For x86_64, the only issue I see is with TR. Unfortunately, I don't >> see a way around it. >> > > I think we can avoid vmload (but not vmsave): > > 1. Allocate a host gdt entry for kvm's exclusive use. > > 2. The first entry into the guest needs vmload as usual. The second > entry reuses already-loaded registers, except tr, gs.base, and > kernelgsbase. > > 3. To load tr, copy the descriptor into our gdt entry, and execute ltr. > > 4. To load gs.base, load the saved value into MSR_KERNELGSBASE, and > execute swapgs > > 5. To load kernelgsbase, use wrmsr() > > However, I'm not at all sure it's worth it.
Yeah, that's where I left it too. Regards, Anthony Liguori ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel