Hello, I am trying to pass a pointer to an hyper call in the simplest possible way, set it’s value, an return it to the guest.
I have tried 2 different ways: - Directly with simple pointers (I read somewhere this would work on x86), but the pointer address is set to 0x0000deadbeef, so dereferencing it causes a panic. - With XEN_GUEST_HANDLE: long do_dummy(XEN_GUEST_HANDLE(uint64_t) ptr) { uint64_t tmp = 1; if (copy_to_guest(ptr, &tmp, 1) != 0) return 2; return 0; } But in this case copy_to_guest() does not return 0, so this fails as well. I call the hyper call from this Linux system call: asmlinkage long sys_dummy(void) { uint64_t p = 0; int rc = 0; rc = HYPERVISOR_dummy(&p); if (rc != 0) printk("ERROR, hypercall returned: %d\n", rc); return 0; } I am sure I am missing something super easy, but I can’t see what. Thank you for your help, Emmanuel
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel