yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-target-arm-kvm-trivial-Clean-up-header-documentation.patch

22c213
From 11cb9cb7b1b56d5c9723e9c50bc2903281893bcc Mon Sep 17 00:00:00 2001
22c213
From: Andrew Jones <drjones@redhat.com>
22c213
Date: Fri, 31 Jan 2020 14:23:10 +0000
22c213
Subject: [PATCH 08/15] target/arm/kvm: trivial: Clean up header documentation
22c213
MIME-Version: 1.0
22c213
Content-Type: text/plain; charset=UTF-8
22c213
Content-Transfer-Encoding: 8bit
22c213
22c213
RH-Author: Andrew Jones <drjones@redhat.com>
22c213
Message-id: <20200131142314.13175-2-drjones@redhat.com>
22c213
Patchwork-id: 93625
22c213
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 1/5] target/arm/kvm: trivial: Clean up header documentation
22c213
Bugzilla: 1647366
22c213
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
22c213
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
22c213
RH-Acked-by: Gavin Shan <gshan@redhat.com>
22c213
22c213
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1647366
22c213
22c213
Author: Andrew Jones <drjones@redhat.com>
22c213
Date:   Thu, 30 Jan 2020 16:02:05 +0000
22c213
22c213
    target/arm/kvm: trivial: Clean up header documentation
22c213
22c213
    Signed-off-by: Andrew Jones <drjones@redhat.com>
22c213
    Message-id: 20200120101023.16030-2-drjones@redhat.com
22c213
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
22c213
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
22c213
22c213
(cherry picked from commit d1ebbc9d16297b54b153ee33abe05eb4f1df0c66)
22c213
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
22c213
---
22c213
 target/arm/kvm_arm.h | 46 +++++++++++++++++++++++++++-------------------
22c213
 1 file changed, 27 insertions(+), 19 deletions(-)
22c213
22c213
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
22c213
index 8e14d40..b48a9c9 100644
22c213
--- a/target/arm/kvm_arm.h
22c213
+++ b/target/arm/kvm_arm.h
22c213
@@ -28,9 +28,9 @@
22c213
 int kvm_arm_vcpu_init(CPUState *cs);
22c213
 
22c213
 /**
22c213
- * kvm_arm_vcpu_finalize
22c213
+ * kvm_arm_vcpu_finalize:
22c213
  * @cs: CPUState
22c213
- * @feature: int
22c213
+ * @feature: feature to finalize
22c213
  *
22c213
  * Finalizes the configuration of the specified VCPU feature by
22c213
  * invoking the KVM_ARM_VCPU_FINALIZE ioctl. Features requiring
22c213
@@ -75,8 +75,8 @@ void kvm_arm_register_device(MemoryRegion *mr, uint64_t devid, uint64_t group,
22c213
 int kvm_arm_init_cpreg_list(ARMCPU *cpu);
22c213
 
22c213
 /**
22c213
- * kvm_arm_reg_syncs_via_cpreg_list
22c213
- * regidx: KVM register index
22c213
+ * kvm_arm_reg_syncs_via_cpreg_list:
22c213
+ * @regidx: KVM register index
22c213
  *
22c213
  * Return true if this KVM register should be synchronized via the
22c213
  * cpreg list of arbitrary system registers, false if it is synchronized
22c213
@@ -85,8 +85,8 @@ int kvm_arm_init_cpreg_list(ARMCPU *cpu);
22c213
 bool kvm_arm_reg_syncs_via_cpreg_list(uint64_t regidx);
22c213
 
22c213
 /**
22c213
- * kvm_arm_cpreg_level
22c213
- * regidx: KVM register index
22c213
+ * kvm_arm_cpreg_level:
22c213
+ * @regidx: KVM register index
22c213
  *
22c213
  * Return the level of this coprocessor/system register.  Return value is
22c213
  * either KVM_PUT_RUNTIME_STATE, KVM_PUT_RESET_STATE, or KVM_PUT_FULL_STATE.
22c213
@@ -148,6 +148,8 @@ void kvm_arm_init_serror_injection(CPUState *cs);
22c213
  * @cpu: ARMCPU
22c213
  *
22c213
  * Get VCPU related state from kvm.
22c213
+ *
22c213
+ * Returns: 0 if success else < 0 error code
22c213
  */
22c213
 int kvm_get_vcpu_events(ARMCPU *cpu);
22c213
 
22c213
@@ -156,6 +158,8 @@ int kvm_get_vcpu_events(ARMCPU *cpu);
22c213
  * @cpu: ARMCPU
22c213
  *
22c213
  * Put VCPU related state to kvm.
22c213
+ *
22c213
+ * Returns: 0 if success else < 0 error code
22c213
  */
22c213
 int kvm_put_vcpu_events(ARMCPU *cpu);
22c213
 
22c213
@@ -205,10 +209,12 @@ typedef struct ARMHostCPUFeatures {
22c213
 
22c213
 /**
22c213
  * kvm_arm_get_host_cpu_features:
22c213
- * @ahcc: ARMHostCPUClass to fill in
22c213
+ * @ahcf: ARMHostCPUClass to fill in
22c213
  *
22c213
  * Probe the capabilities of the host kernel's preferred CPU and fill
22c213
  * in the ARMHostCPUClass struct accordingly.
22c213
+ *
22c213
+ * Returns true on success and false otherwise.
22c213
  */
22c213
 bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf);
22c213
 
22c213
@@ -242,7 +248,7 @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu);
22c213
 bool kvm_arm_aarch32_supported(CPUState *cs);
22c213
 
22c213
 /**
22c213
- * bool kvm_arm_pmu_supported:
22c213
+ * kvm_arm_pmu_supported:
22c213
  * @cs: CPUState
22c213
  *
22c213
  * Returns: true if the KVM VCPU can enable its PMU
22c213
@@ -251,7 +257,7 @@ bool kvm_arm_aarch32_supported(CPUState *cs);
22c213
 bool kvm_arm_pmu_supported(CPUState *cs);
22c213
 
22c213
 /**
22c213
- * bool kvm_arm_sve_supported:
22c213
+ * kvm_arm_sve_supported:
22c213
  * @cs: CPUState
22c213
  *
22c213
  * Returns true if the KVM VCPU can enable SVE and false otherwise.
22c213
@@ -259,26 +265,30 @@ bool kvm_arm_pmu_supported(CPUState *cs);
22c213
 bool kvm_arm_sve_supported(CPUState *cs);
22c213
 
22c213
 /**
22c213
- * kvm_arm_get_max_vm_ipa_size - Returns the number of bits in the
22c213
- * IPA address space supported by KVM
22c213
- *
22c213
+ * kvm_arm_get_max_vm_ipa_size:
22c213
  * @ms: Machine state handle
22c213
+ *
22c213
+ * Returns the number of bits in the IPA address space supported by KVM
22c213
  */
22c213
 int kvm_arm_get_max_vm_ipa_size(MachineState *ms);
22c213
 
22c213
 /**
22c213
- * kvm_arm_sync_mpstate_to_kvm
22c213
+ * kvm_arm_sync_mpstate_to_kvm:
22c213
  * @cpu: ARMCPU
22c213
  *
22c213
  * If supported set the KVM MP_STATE based on QEMU's model.
22c213
+ *
22c213
+ * Returns 0 on success and -1 on failure.
22c213
  */
22c213
 int kvm_arm_sync_mpstate_to_kvm(ARMCPU *cpu);
22c213
 
22c213
 /**
22c213
- * kvm_arm_sync_mpstate_to_qemu
22c213
+ * kvm_arm_sync_mpstate_to_qemu:
22c213
  * @cpu: ARMCPU
22c213
  *
22c213
  * If supported get the MP_STATE from KVM and store in QEMU's model.
22c213
+ *
22c213
+ * Returns 0 on success and aborts on failure.
22c213
  */
22c213
 int kvm_arm_sync_mpstate_to_qemu(ARMCPU *cpu);
22c213
 
22c213
@@ -292,7 +302,8 @@ int kvm_arm_set_irq(int cpu, int irqtype, int irq, int level);
22c213
 
22c213
 static inline void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu)
22c213
 {
22c213
-    /* This should never actually be called in the "not KVM" case,
22c213
+    /*
22c213
+     * This should never actually be called in the "not KVM" case,
22c213
      * but set up the fields to indicate an error anyway.
22c213
      */
22c213
     cpu->kvm_target = QEMU_KVM_ARM_TARGET_NONE;
22c213
@@ -377,23 +388,20 @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debug_exit_arch *debug_exit);
22c213
  *
22c213
  * Return: TRUE if any hardware breakpoints in use.
22c213
  */
22c213
-
22c213
 bool kvm_arm_hw_debug_active(CPUState *cs);
22c213
 
22c213
 /**
22c213
  * kvm_arm_copy_hw_debug_data:
22c213
- *
22c213
  * @ptr: kvm_guest_debug_arch structure
22c213
  *
22c213
  * Copy the architecture specific debug registers into the
22c213
  * kvm_guest_debug ioctl structure.
22c213
  */
22c213
 struct kvm_guest_debug_arch;
22c213
-
22c213
 void kvm_arm_copy_hw_debug_data(struct kvm_guest_debug_arch *ptr);
22c213
 
22c213
 /**
22c213
- * its_class_name
22c213
+ * its_class_name:
22c213
  *
22c213
  * Return the ITS class name to use depending on whether KVM acceleration
22c213
  * and KVM CAP_SIGNAL_MSI are supported
22c213
-- 
22c213
1.8.3.1
22c213