KVM: PPC: Book3S HV: Implement timebase offset for guests
[cascardo/linux.git] / Documentation / virtual / kvm / api.txt
index 858aecf..e43c6f1 100644 (file)
@@ -1810,6 +1810,46 @@ registers, find a list below:
   PPC   | KVM_REG_PPC_TLB3PS   | 32
   PPC   | KVM_REG_PPC_EPTCFG   | 32
   PPC   | KVM_REG_PPC_ICP_STATE | 64
+  PPC   | KVM_REG_PPC_TB_OFFSET        | 64
+  PPC   | KVM_REG_PPC_SPMC1    | 32
+  PPC   | KVM_REG_PPC_SPMC2    | 32
+  PPC   | KVM_REG_PPC_IAMR     | 64
+  PPC   | KVM_REG_PPC_TFHAR    | 64
+  PPC   | KVM_REG_PPC_TFIAR    | 64
+  PPC   | KVM_REG_PPC_TEXASR   | 64
+  PPC   | KVM_REG_PPC_FSCR     | 64
+  PPC   | KVM_REG_PPC_PSPB     | 32
+  PPC   | KVM_REG_PPC_EBBHR    | 64
+  PPC   | KVM_REG_PPC_EBBRR    | 64
+  PPC   | KVM_REG_PPC_BESCR    | 64
+  PPC   | KVM_REG_PPC_TAR      | 64
+  PPC   | KVM_REG_PPC_DPDES    | 64
+  PPC   | KVM_REG_PPC_DAWR     | 64
+  PPC   | KVM_REG_PPC_DAWRX    | 64
+  PPC   | KVM_REG_PPC_CIABR    | 64
+  PPC   | KVM_REG_PPC_IC       | 64
+  PPC   | KVM_REG_PPC_VTB      | 64
+  PPC   | KVM_REG_PPC_CSIGR    | 64
+  PPC   | KVM_REG_PPC_TACR     | 64
+  PPC   | KVM_REG_PPC_TCSCR    | 64
+  PPC   | KVM_REG_PPC_PID      | 64
+  PPC   | KVM_REG_PPC_ACOP     | 64
+  PPC   | KVM_REG_PPC_TM_GPR0  | 64
+          ...
+  PPC   | KVM_REG_PPC_TM_GPR31 | 64
+  PPC   | KVM_REG_PPC_TM_VSR0  | 128
+          ...
+  PPC   | KVM_REG_PPC_TM_VSR63 | 128
+  PPC   | KVM_REG_PPC_TM_CR    | 64
+  PPC   | KVM_REG_PPC_TM_LR    | 64
+  PPC   | KVM_REG_PPC_TM_CTR   | 64
+  PPC   | KVM_REG_PPC_TM_FPSCR | 64
+  PPC   | KVM_REG_PPC_TM_AMR   | 64
+  PPC   | KVM_REG_PPC_TM_PPR   | 64
+  PPC   | KVM_REG_PPC_TM_VRSAVE        | 64
+  PPC   | KVM_REG_PPC_TM_VSCR  | 32
+  PPC   | KVM_REG_PPC_TM_DSCR  | 64
+  PPC   | KVM_REG_PPC_TM_TAR   | 64
 
 ARM registers are mapped using the lower 32 bits.  The upper 16 of that
 is the register group type, or coprocessor number:
@@ -2304,7 +2344,31 @@ Possible features:
          Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).
 
 
-4.83 KVM_GET_REG_LIST
+4.83 KVM_ARM_PREFERRED_TARGET
+
+Capability: basic
+Architectures: arm, arm64
+Type: vm ioctl
+Parameters: struct struct kvm_vcpu_init (out)
+Returns: 0 on success; -1 on error
+Errors:
+  ENODEV:    no preferred target available for the host
+
+This queries KVM for preferred CPU target type which can be emulated
+by KVM on underlying host.
+
+The ioctl returns struct kvm_vcpu_init instance containing information
+about preferred CPU target type and recommended features for it.  The
+kvm_vcpu_init->features bitmap returned will have feature bits set if
+the preferred target recommends setting these features, but this is
+not mandatory.
+
+The information returned by this ioctl can be used to prepare an instance
+of struct kvm_vcpu_init for KVM_ARM_VCPU_INIT ioctl which will result in
+in VCPU matching underlying host.
+
+
+4.84 KVM_GET_REG_LIST
 
 Capability: basic
 Architectures: arm, arm64
@@ -2323,8 +2387,7 @@ struct kvm_reg_list {
 This ioctl returns the guest registers that are supported for the
 KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.
 
-
-4.84 KVM_ARM_SET_DEVICE_ADDR
+4.85 KVM_ARM_SET_DEVICE_ADDR
 
 Capability: KVM_CAP_ARM_SET_DEVICE_ADDR
 Architectures: arm, arm64
@@ -2362,7 +2425,7 @@ must be called after calling KVM_CREATE_IRQCHIP, but before calling
 KVM_RUN on any of the VCPUs.  Calling this ioctl twice for any of the
 base addresses will return -EEXIST.
 
-4.85 KVM_PPC_RTAS_DEFINE_TOKEN
+4.86 KVM_PPC_RTAS_DEFINE_TOKEN
 
 Capability: KVM_CAP_PPC_RTAS
 Architectures: ppc