From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Subject: kvm_regs vs kvm_sregs? Date: Fri, 16 Mar 2007 10:00:54 -0500 Message-ID: <1174057254.22955.13.camel@basalt> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: 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 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