]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: ppc: Add DCR access information to struct kvm_run
authorHollis Blanchard <hollisb@us.ibm.com>
Thu, 17 Apr 2008 04:28:07 +0000 (23:28 -0500)
committerAvi Kivity <avi@qumranet.com>
Sun, 27 Apr 2008 15:21:37 +0000 (18:21 +0300)
Device Control Registers are essentially another address space found on PowerPC
4xx processors, analogous to PIO on x86. DCRs are always 32 bits, and can be
identified by a 32-bit number. We forward most DCR accesses to userspace for
emulation (with the exception of CPR0 registers, which can be read directly
for simplicity in timebase frequency determination).

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
include/linux/kvm.h

index f8e211d8ce8867606e7d17096752a2eca2376d17..a281afeddfbb0e2a4b9dd8747cc7afdffb271b2e 100644 (file)
@@ -82,6 +82,7 @@ struct kvm_irqchip {
 #define KVM_EXIT_TPR_ACCESS       12
 #define KVM_EXIT_S390_SIEIC       13
 #define KVM_EXIT_S390_RESET       14
+#define KVM_EXIT_DCR              15
 
 /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
 struct kvm_run {
@@ -161,6 +162,12 @@ struct kvm_run {
 #define KVM_S390_RESET_CPU_INIT  8
 #define KVM_S390_RESET_IPL       16
                __u64 s390_reset_flags;
+               /* KVM_EXIT_DCR */
+               struct {
+                       __u32 dcrn;
+                       __u32 data;
+                       __u8  is_write;
+               } dcr;
                /* Fix the size of the union. */
                char padding[256];
        };