]> www.infradead.org Git - nvme.git/commit
LoongArch: KVM: Add memory barrier before update pmd entry
authorBibo Mao <maobibo@loongson.cn>
Tue, 9 Jul 2024 08:25:51 +0000 (16:25 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 9 Jul 2024 08:25:51 +0000 (16:25 +0800)
commit32d4b999dadee0a84ac7fe709cae21d29364e1d1
tree736b252cd4702a5ea19cddf8f1efb45e2cf9aee9
parentb072cbf0233b1fd9d84730cbe5cd1706dcacd354
LoongArch: KVM: Add memory barrier before update pmd entry

When updating pmd entry such as allocating new pmd page or splitting
huge page into normal page, it is necessary to firstly update all pte
entries, and then update pmd entry.

It is weak order with LoongArch system, there will be problem if other
VCPUs see pmd update firstly while ptes are not updated. Here smp_wmb()
is added to assure this.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/mmu.c