mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
KVM: Move hwpoison page related functions into kvm-all.c
kvm_hwpoison_page_add() and kvm_unpoison_all() will both be used by X86 and ARM platforms, so moving them into "accel/kvm/kvm-all.c" to avoid duplicate code. For architectures that don't use the poison-list functionality the reset handler will harmlessly do nothing, so let's register the kvm_unpoison_all() function in the generic kvm_init() function. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com> Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com> Acked-by: Xiang Zheng <zhengxiang9@huawei.com> Message-id: 20200512030609.19593-8-gengdongjiu@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
a08a64627b
commit
6b552b9bc8
3 changed files with 48 additions and 36 deletions
|
@ -42,4 +42,16 @@ void kvm_memory_listener_register(KVMState *s, KVMMemoryListener *kml,
|
|||
AddressSpace *as, int as_id);
|
||||
|
||||
void kvm_set_max_memslot_size(hwaddr max_slot_size);
|
||||
|
||||
/**
|
||||
* kvm_hwpoison_page_add:
|
||||
*
|
||||
* Parameters:
|
||||
* @ram_addr: the address in the RAM for the poisoned page
|
||||
*
|
||||
* Add a poisoned page to the list
|
||||
*
|
||||
* Return: None.
|
||||
*/
|
||||
void kvm_hwpoison_page_add(ram_addr_t ram_addr);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue