Skip to content

Commit b2312f0

Browse files
Hollis Blanchardavikivity
authored andcommitted
KVM: ppc: Add DCR access information to struct kvm_run
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 <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
1 parent 4baacfb commit b2312f0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/kvm.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ struct kvm_irqchip {
8282
#define KVM_EXIT_TPR_ACCESS 12
8383
#define KVM_EXIT_S390_SIEIC 13
8484
#define KVM_EXIT_S390_RESET 14
85+
#define KVM_EXIT_DCR 15
8586

8687
/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
8788
struct kvm_run {
@@ -161,6 +162,12 @@ struct kvm_run {
161162
#define KVM_S390_RESET_CPU_INIT 8
162163
#define KVM_S390_RESET_IPL 16
163164
__u64 s390_reset_flags;
165+
/* KVM_EXIT_DCR */
166+
struct {
167+
__u32 dcrn;
168+
__u32 data;
169+
__u8 is_write;
170+
} dcr;
164171
/* Fix the size of the union. */
165172
char padding[256];
166173
};

0 commit comments

Comments
 (0)