}
enum hvm_translation_result hvm_copy_to_guest_phys(
- paddr_t paddr, void *buf, unsigned int size, struct vcpu *v)
+ paddr_t paddr, const void *buf, unsigned int size, struct vcpu *v)
{
- return __hvm_copy(buf, paddr, size, v,
+ return __hvm_copy((void *)buf /* HVMCOPY_to_guest doesn't modify */,
+ paddr, size, v,
HVMCOPY_to_guest | HVMCOPY_phys, 0, NULL);
}
}
enum hvm_translation_result hvm_copy_to_guest_linear(
- unsigned long addr, void *buf, unsigned int size, uint32_t pfec,
+ unsigned long addr, const void *buf, unsigned int size, uint32_t pfec,
pagefault_info_t *pfinfo)
{
- return __hvm_copy(buf, addr, size, current,
- HVMCOPY_to_guest | HVMCOPY_linear,
+ return __hvm_copy((void *)buf /* HVMCOPY_to_guest doesn't modify */,
+ addr, size, current, HVMCOPY_to_guest | HVMCOPY_linear,
PFEC_page_present | PFEC_write_access | pfec, pfinfo);
}
* address range does not map entirely onto ordinary machine memory.
*/
enum hvm_translation_result hvm_copy_to_guest_phys(
- paddr_t paddr, void *buf, unsigned int size, struct vcpu *v);
+ paddr_t paddr, const void *buf, unsigned int size, struct vcpu *v);
enum hvm_translation_result hvm_copy_from_guest_phys(
void *buf, paddr_t paddr, unsigned int size);
} pagefault_info_t;
enum hvm_translation_result hvm_copy_to_guest_linear(
- unsigned long addr, void *buf, unsigned int size, uint32_t pfec,
+ unsigned long addr, const void *buf, unsigned int size, uint32_t pfec,
pagefault_info_t *pfinfo);
enum hvm_translation_result hvm_copy_from_guest_linear(
void *buf, unsigned long addr, unsigned int size, uint32_t pfec,