OpenCloudOS-Kernel/virt/kvm
Bibo Mao 134cd49c08 KVM: Discard zero mask with function kvm_dirty_ring_reset
commit 676f819c3e98 ("KVM: Discard zero mask with function kvm_dirty_ring_reset")
Conflict: none
Backport-reason: Synchronize upstream linux loongarch kvm
patch to support loongarch virtualization.
Checkpatch: no, to be consistent with upstream commit.

Function kvm_reset_dirty_gfn may be called with parameters cur_slot /
cur_offset / mask are all zero, it does not represent real dirty page.
It is not necessary to clear dirty page in this condition. Also return
value of macro __fls() is undefined if mask is zero which is called in
funciton kvm_reset_dirty_gfn(). Here just return.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20240613122803.1031511-1-maobibo@loongson.cn>
[Move the conditional inside kvm_reset_dirty_gfn; suggested by
 Sean Christopherson. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
2024-11-06 19:36:39 +08:00
..
Kconfig KVM: Remove CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL 2023-08-17 09:35:14 +01:00
Makefile.kvm KVM: Reinstate gfn_to_pfn_cache with invalidation support 2022-01-07 10:44:44 -05:00
async_pf.c KVM: Always flush async #PF workqueue when vCPU is being destroyed 2024-04-03 15:28:18 +02:00
async_pf.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
binary_stats.c KVM: stats: remove dead stores 2021-08-13 03:35:15 -04:00
coalesced_mmio.c KVM: Fix coalesced_mmio_has_room() to avoid premature userspace exit 2024-10-12 10:13:09 +08:00
coalesced_mmio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dirty_ring.c KVM: Discard zero mask with function kvm_dirty_ring_reset 2024-11-06 19:36:39 +08:00
eventfd.c kvm/eventfd: use list_for_each_entry when deassign ioeventfd 2023-06-13 14:25:39 -07:00
irqchip.c KVM: Setup empty IRQ routing when creating a VM 2024-08-14 17:08:55 +08:00
kvm_main.c Merge branch '6.6.54' 2024-10-10 21:47:18 +08:00
kvm_mm.h kvm: Remove the unused macro KVM_MMU_READ_{,UN}LOCK() 2022-12-27 06:00:51 -05:00
pfncache.c KVM: Skip unnecessary "unmap" if gpc is already valid during refresh 2022-11-30 19:25:24 +00:00
vfio.c kvm/vfio: avoid bouncing the mutex when adding and deleting groups 2023-08-03 12:01:56 -06:00
vfio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00