On 05/22/2013 10:44 AM, Sanjay Lal wrote:

On May 21, 2013, at 1:54 PM, David Daney wrote:

From: David Daney <david.da...@cavium.com>

Because not all 256 CP0 registers are ever implemented, we need a
different method of manipulating them.  Use the
KVM_SET_ONE_REG/KVM_GET_ONE_REG mechanism.

Code related to implementing KVM_SET_ONE_REG/KVM_GET_ONE_REG is
consolidated in to kvm_trap_emul.c, now unused code and definitions
are removed.

Signed-off-by: David Daney <david.da...@cavium.com>
---
arch/mips/include/asm/kvm.h      |  91 +++++++++--
arch/mips/include/asm/kvm_host.h |   4 -
arch/mips/kvm/kvm_mips.c         |  90 +----------
arch/mips/kvm/kvm_trap_emul.c    | 338 ++++++++++++++++++++++++++++++++++-----
4 files changed, 383 insertions(+), 140 deletions(-)
[...]


Most of the functions that have been relocated to kvm_trap_emul.c should stay 
in kvm_mips.c. They are/will shared between the trap and emulate and VZ modes.  
They include kvm_mips_reset_vcpu(), kvm_vcpu_ioctl_interrupt(), 
kvm_arch_vcpu_ioctl().

kvm_mips_get_reg() and kvm_mips_set_reg() should be in kvm_mips.c as they will 
be shared by the trap and emulate and VZ code.


OK, I will revise the patch set to rearrange things in a manner that leaves these in kvm_mips.c. However, this is of secondary importance to the question of the suitability of the ABI.


If you plan on defining specific versions of these functions for Cavium's 
implementation of KVM, please make them callbacks.


There will soon be follow on patches that do exactly that.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to