diff options
| author | Zenghui Yu <yuzenghui@huawei.com> | 2019-03-25 04:02:05 -0400 |
|---|---|---|
| committer | Marc Zyngier <marc.zyngier@arm.com> | 2019-03-28 09:17:17 -0400 |
| commit | 8324c3d518cfd69f2a17866b52c13bf56d3042d8 (patch) | |
| tree | 524f6a03243951235ee21e79c495194c8a36d56f | |
| parent | d9ea27a3304812500de3674981a9c3a2086d517b (diff) | |
KVM: arm/arm64: Comments cleanup in mmu.c
Some comments in virt/kvm/arm/mmu.c are outdated. Update them to
reflect the current state of the code.
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
[maz: commit message tidy-up]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
| -rw-r--r-- | virt/kvm/arm/mmu.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index f9da2fad9bd6..27c958306449 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c | |||
| @@ -102,8 +102,7 @@ static bool kvm_is_device_pfn(unsigned long pfn) | |||
| 102 | * @addr: IPA | 102 | * @addr: IPA |
| 103 | * @pmd: pmd pointer for IPA | 103 | * @pmd: pmd pointer for IPA |
| 104 | * | 104 | * |
| 105 | * Function clears a PMD entry, flushes addr 1st and 2nd stage TLBs. Marks all | 105 | * Function clears a PMD entry, flushes addr 1st and 2nd stage TLBs. |
| 106 | * pages in the range dirty. | ||
| 107 | */ | 106 | */ |
| 108 | static void stage2_dissolve_pmd(struct kvm *kvm, phys_addr_t addr, pmd_t *pmd) | 107 | static void stage2_dissolve_pmd(struct kvm *kvm, phys_addr_t addr, pmd_t *pmd) |
| 109 | { | 108 | { |
| @@ -121,8 +120,7 @@ static void stage2_dissolve_pmd(struct kvm *kvm, phys_addr_t addr, pmd_t *pmd) | |||
| 121 | * @addr: IPA | 120 | * @addr: IPA |
| 122 | * @pud: pud pointer for IPA | 121 | * @pud: pud pointer for IPA |
| 123 | * | 122 | * |
| 124 | * Function clears a PUD entry, flushes addr 1st and 2nd stage TLBs. Marks all | 123 | * Function clears a PUD entry, flushes addr 1st and 2nd stage TLBs. |
| 125 | * pages in the range dirty. | ||
| 126 | */ | 124 | */ |
| 127 | static void stage2_dissolve_pud(struct kvm *kvm, phys_addr_t addr, pud_t *pudp) | 125 | static void stage2_dissolve_pud(struct kvm *kvm, phys_addr_t addr, pud_t *pudp) |
| 128 | { | 126 | { |
| @@ -899,9 +897,8 @@ int create_hyp_exec_mappings(phys_addr_t phys_addr, size_t size, | |||
| 899 | * kvm_alloc_stage2_pgd - allocate level-1 table for stage-2 translation. | 897 | * kvm_alloc_stage2_pgd - allocate level-1 table for stage-2 translation. |
| 900 | * @kvm: The KVM struct pointer for the VM. | 898 | * @kvm: The KVM struct pointer for the VM. |
| 901 | * | 899 | * |
| 902 | * Allocates only the stage-2 HW PGD level table(s) (can support either full | 900 | * Allocates only the stage-2 HW PGD level table(s) of size defined by |
| 903 | * 40-bit input addresses or limited to 32-bit input addresses). Clears the | 901 | * stage2_pgd_size(kvm). |
| 904 | * allocated pages. | ||
| 905 | * | 902 | * |
| 906 | * Note we don't need locking here as this is only called when the VM is | 903 | * Note we don't need locking here as this is only called when the VM is |
| 907 | * created, which can only be done once. | 904 | * created, which can only be done once. |
| @@ -1478,13 +1475,11 @@ static void stage2_wp_pmds(struct kvm *kvm, pud_t *pud, | |||
| 1478 | } | 1475 | } |
| 1479 | 1476 | ||
| 1480 | /** | 1477 | /** |
| 1481 | * stage2_wp_puds - write protect PGD range | 1478 | * stage2_wp_puds - write protect PGD range |
| 1482 | * @pgd: pointer to pgd entry | 1479 | * @pgd: pointer to pgd entry |
| 1483 | * @addr: range start address | 1480 | * @addr: range start address |
| 1484 | * @end: range end address | 1481 | * @end: range end address |
| 1485 | * | 1482 | */ |
| 1486 | * Process PUD entries, for a huge PUD we cause a panic. | ||
| 1487 | */ | ||
| 1488 | static void stage2_wp_puds(struct kvm *kvm, pgd_t *pgd, | 1483 | static void stage2_wp_puds(struct kvm *kvm, pgd_t *pgd, |
| 1489 | phys_addr_t addr, phys_addr_t end) | 1484 | phys_addr_t addr, phys_addr_t end) |
| 1490 | { | 1485 | { |
