accel: kvm: Add aligment assert for kvm_log_clear_one_slot
commit3920552846e881bafa9f9aad0bb1a6eef874d7fb
authorKeqian Zhu <zhukeqian1@huawei.com>
Thu, 17 Dec 2020 01:49:41 +0000 (17 09:49 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 6 Mar 2021 10:41:54 +0000 (6 11:41 +0100)
tree3a4db98b6d2e568fbfb396ab426a66128e760265
parente0a8f99355c32b48c9ef867127075b5267ae23d8
accel: kvm: Add aligment assert for kvm_log_clear_one_slot

The parameters start and size are transfered from QEMU memory
emulation layer. It can promise that they are TARGET_PAGE_SIZE
aligned. However, KVM needs they are qemu_real_page_size aligned.

Though no caller breaks this aligned requirement currently, we'd
better add an explicit assert to avoid future breaking.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20201217014941.22872-3-zhukeqian1@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/kvm/kvm-all.c