From: Pablo P. <ppe...@ho...> - 2019-04-30 15:38:14
|
Hi: I am writing a UML device driver wrapper (uml/drivers), and I need to convert an address of a UML user-space process into an address of UML kernel space. i.e. Process_running_within_UML(){ char uml_usr_buffer[MAXBUF]; ..... ret = ioctl(dvk_fd,DVK_IOCSDCINIT, (int) uml_usr_buffer); } UML ioctl() syscall is translated by UML to os_ioctl_generic<https://elixir.bootlin.com/linux/v4.9.88/ident/os_ioctl_generic>() which then calls host ioctl(). The uml_usr_buffer address is a UML virtual address, not host virtual address. I need to convert this UML user-space virtual address into user-space HOST virtual address. Can I use, virt_to_phys() ?? Thanks in advance. PAP |