public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* kvm_regs vs kvm_sregs?
@ 2007-03-16 15:00 Hollis Blanchard
  2007-03-18  5:13 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Hollis Blanchard @ 2007-03-16 15:00 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

What is the distinction between kvm_regs and kvm_sregs? As far as I can
see, kvm_regs is only used when emulating IO, emulating MMIO, and
emulating CPUID, where guest GPRs are directly modified. kvm_sregs is
only used for full CPU state save (for later restore).

When the kernel had to use copy_to_user() to transfer state to userland,
I can see that this split resulted in less memory copying. However, now
that userland can directly map register state without a copy, why not
combine the two structures?

I guess it takes longer to copy state out of the VMCS into kvm_sregs, so
why bother if userspace isn't going to use it?

-Hollis


-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-23  1:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16 15:00 kvm_regs vs kvm_sregs? Hollis Blanchard
2007-03-18  5:13 ` Avi Kivity
     [not found]   ` <45FCCA6D.3070207-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-03-23  1:17     ` Hollis Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox