|
@@ -3266,6 +3266,101 @@ The ap_encodings gives the supported page sizes and their AP field
|
|
encodings, encoded with the AP value in the top 3 bits and the log
|
|
encodings, encoded with the AP value in the top 3 bits and the log
|
|
base 2 of the page size in the bottom 6 bits.
|
|
base 2 of the page size in the bottom 6 bits.
|
|
|
|
|
|
|
|
+4.102 KVM_PPC_RESIZE_HPT_PREPARE
|
|
|
|
+
|
|
|
|
+Capability: KVM_CAP_SPAPR_RESIZE_HPT
|
|
|
|
+Architectures: powerpc
|
|
|
|
+Type: vm ioctl
|
|
|
|
+Parameters: struct kvm_ppc_resize_hpt (in)
|
|
|
|
+Returns: 0 on successful completion,
|
|
|
|
+ >0 if a new HPT is being prepared, the value is an estimated
|
|
|
|
+ number of milliseconds until preparation is complete
|
|
|
|
+ -EFAULT if struct kvm_reinject_control cannot be read,
|
|
|
|
+ -EINVAL if the supplied shift or flags are invalid
|
|
|
|
+ -ENOMEM if unable to allocate the new HPT
|
|
|
|
+ -ENOSPC if there was a hash collision when moving existing
|
|
|
|
+ HPT entries to the new HPT
|
|
|
|
+ -EIO on other error conditions
|
|
|
|
+
|
|
|
|
+Used to implement the PAPR extension for runtime resizing of a guest's
|
|
|
|
+Hashed Page Table (HPT). Specifically this starts, stops or monitors
|
|
|
|
+the preparation of a new potential HPT for the guest, essentially
|
|
|
|
+implementing the H_RESIZE_HPT_PREPARE hypercall.
|
|
|
|
+
|
|
|
|
+If called with shift > 0 when there is no pending HPT for the guest,
|
|
|
|
+this begins preparation of a new pending HPT of size 2^(shift) bytes.
|
|
|
|
+It then returns a positive integer with the estimated number of
|
|
|
|
+milliseconds until preparation is complete.
|
|
|
|
+
|
|
|
|
+If called when there is a pending HPT whose size does not match that
|
|
|
|
+requested in the parameters, discards the existing pending HPT and
|
|
|
|
+creates a new one as above.
|
|
|
|
+
|
|
|
|
+If called when there is a pending HPT of the size requested, will:
|
|
|
|
+ * If preparation of the pending HPT is already complete, return 0
|
|
|
|
+ * If preparation of the pending HPT has failed, return an error
|
|
|
|
+ code, then discard the pending HPT.
|
|
|
|
+ * If preparation of the pending HPT is still in progress, return an
|
|
|
|
+ estimated number of milliseconds until preparation is complete.
|
|
|
|
+
|
|
|
|
+If called with shift == 0, discards any currently pending HPT and
|
|
|
|
+returns 0 (i.e. cancels any in-progress preparation).
|
|
|
|
+
|
|
|
|
+flags is reserved for future expansion, currently setting any bits in
|
|
|
|
+flags will result in an -EINVAL.
|
|
|
|
+
|
|
|
|
+Normally this will be called repeatedly with the same parameters until
|
|
|
|
+it returns <= 0. The first call will initiate preparation, subsequent
|
|
|
|
+ones will monitor preparation until it completes or fails.
|
|
|
|
+
|
|
|
|
+struct kvm_ppc_resize_hpt {
|
|
|
|
+ __u64 flags;
|
|
|
|
+ __u32 shift;
|
|
|
|
+ __u32 pad;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+4.103 KVM_PPC_RESIZE_HPT_COMMIT
|
|
|
|
+
|
|
|
|
+Capability: KVM_CAP_SPAPR_RESIZE_HPT
|
|
|
|
+Architectures: powerpc
|
|
|
|
+Type: vm ioctl
|
|
|
|
+Parameters: struct kvm_ppc_resize_hpt (in)
|
|
|
|
+Returns: 0 on successful completion,
|
|
|
|
+ -EFAULT if struct kvm_reinject_control cannot be read,
|
|
|
|
+ -EINVAL if the supplied shift or flags are invalid
|
|
|
|
+ -ENXIO is there is no pending HPT, or the pending HPT doesn't
|
|
|
|
+ have the requested size
|
|
|
|
+ -EBUSY if the pending HPT is not fully prepared
|
|
|
|
+ -ENOSPC if there was a hash collision when moving existing
|
|
|
|
+ HPT entries to the new HPT
|
|
|
|
+ -EIO on other error conditions
|
|
|
|
+
|
|
|
|
+Used to implement the PAPR extension for runtime resizing of a guest's
|
|
|
|
+Hashed Page Table (HPT). Specifically this requests that the guest be
|
|
|
|
+transferred to working with the new HPT, essentially implementing the
|
|
|
|
+H_RESIZE_HPT_COMMIT hypercall.
|
|
|
|
+
|
|
|
|
+This should only be called after KVM_PPC_RESIZE_HPT_PREPARE has
|
|
|
|
+returned 0 with the same parameters. In other cases
|
|
|
|
+KVM_PPC_RESIZE_HPT_COMMIT will return an error (usually -ENXIO or
|
|
|
|
+-EBUSY, though others may be possible if the preparation was started,
|
|
|
|
+but failed).
|
|
|
|
+
|
|
|
|
+This will have undefined effects on the guest if it has not already
|
|
|
|
+placed itself in a quiescent state where no vcpu will make MMU enabled
|
|
|
|
+memory accesses.
|
|
|
|
+
|
|
|
|
+On succsful completion, the pending HPT will become the guest's active
|
|
|
|
+HPT and the previous HPT will be discarded.
|
|
|
|
+
|
|
|
|
+On failure, the guest will still be operating on its previous HPT.
|
|
|
|
+
|
|
|
|
+struct kvm_ppc_resize_hpt {
|
|
|
|
+ __u64 flags;
|
|
|
|
+ __u32 shift;
|
|
|
|
+ __u32 pad;
|
|
|
|
+};
|
|
|
|
+
|
|
5. The kvm_run structure
|
|
5. The kvm_run structure
|
|
------------------------
|
|
------------------------
|
|
|
|
|