Re: [PATCH 2/2] accel: kvm: Add aligment check for kvm_log_clear_one_slot

2020-12-16 Thread Keqian Zhu
On 2020/12/16 15:23, Andrew Jones wrote: > On Tue, Dec 15, 2020 at 12:55:50PM +0100, Andrew Jones wrote: >> On Tue, Dec 15, 2020 at 03:19:48PM +0800, Keqian Zhu wrote: >>> The parameters start and size are transfered from QEMU memory >>> emulation layer. It can promise that they are

Re: [PATCH 2/2] accel: kvm: Add aligment check for kvm_log_clear_one_slot

2020-12-16 Thread Keqian Zhu
On 2020/12/15 19:55, Andrew Jones wrote: > On Tue, Dec 15, 2020 at 03:19:48PM +0800, Keqian Zhu wrote: >> 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

Re: [PATCH 2/2] accel: kvm: Add aligment check for kvm_log_clear_one_slot

2020-12-15 Thread Andrew Jones
On Tue, Dec 15, 2020 at 12:55:50PM +0100, Andrew Jones wrote: > On Tue, Dec 15, 2020 at 03:19:48PM +0800, Keqian Zhu wrote: > > 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

Re: [PATCH 2/2] accel: kvm: Add aligment check for kvm_log_clear_one_slot

2020-12-15 Thread Andrew Jones
On Tue, Dec 15, 2020 at 03:19:48PM +0800, Keqian Zhu wrote: > 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

[PATCH 2/2] accel: kvm: Add aligment check for kvm_log_clear_one_slot

2020-12-14 Thread Keqian Zhu
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 check to avoid