MIPS: KVM: Add KScratch registers
Allow up to 6 KVM guest KScratch registers to be enabled and accessed via the KVM guest register API and from the guest itself (the fallback reading and writing of commpage registers is sufficient for KScratch registers to work as expected). User mode can expose the registers by setting the appropriate bits of the guest Config4.KScrExist field. KScratch registers that aren't usable won't be writeable via the KVM Ioctl API. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
cf1fb0f29d
commit
0510870952
@@ -178,6 +178,12 @@ TRACE_EVENT(kvm_exit,
|
||||
{ KVM_TRACE_COP0(16, 7), "Config7" }, \
|
||||
{ KVM_TRACE_COP0(26, 0), "ECC" }, \
|
||||
{ KVM_TRACE_COP0(30, 0), "ErrorEPC" }, \
|
||||
{ KVM_TRACE_COP0(31, 2), "KScratch1" }, \
|
||||
{ KVM_TRACE_COP0(31, 3), "KScratch2" }, \
|
||||
{ KVM_TRACE_COP0(31, 4), "KScratch3" }, \
|
||||
{ KVM_TRACE_COP0(31, 5), "KScratch4" }, \
|
||||
{ KVM_TRACE_COP0(31, 6), "KScratch5" }, \
|
||||
{ KVM_TRACE_COP0(31, 7), "KScratch6" }, \
|
||||
{ KVM_TRACE_HWR( 0, 0), "CPUNum" }, \
|
||||
{ KVM_TRACE_HWR( 1, 0), "SYNCI_Step" }, \
|
||||
{ KVM_TRACE_HWR( 2, 0), "CC" }, \
|
||||
|
Reference in New Issue
Block a user