[PATCH 02/40] KVM: x86: accessors for guest registers

2008-09-23 Thread Avi Kivity
From: Marcelo Tosatti [EMAIL PROTECTED] As suggested by Avi, introduce accessors to read/write guest registers. This simplifies the -cache_regs/-decache_regs interface, and improves register caching which is important for VMX, where the cost of vmcs_read/vmcs_write is significant. [avi: fix

Re: KVM: x86: accessors for guest registers

2008-06-29 Thread Marcelo Tosatti
On Sun, Jun 29, 2008 at 04:14:37PM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: As suggested by Avi, introduce accessors to read/write guest registers. This simplifies the -cache_regs/-decache_regs interface, and improves register caching which is important for VMX, where the cost of

Re: KVM: x86: accessors for guest registers

2008-06-29 Thread Avi Kivity
Marcelo Tosatti wrote: - svm always caches registers, and all registers are dirty, since cache/decache is cheap Accurate regs_dirty information is useful for converting the emulator, so that you can do something like: emul_register_write(ctxt, reg, val) { if

KVM: x86: accessors for guest registers

2008-06-27 Thread Marcelo Tosatti
As suggested by Avi, introduce accessors to read/write guest registers. This simplifies the -cache_regs/-decache_regs interface, and improves register caching which is important for VMX, where the cost of vmcs_read/vmcs_write is significant. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] ---