The privcmd code is mixing the usage of GFN and MFN within the same functions which make the code difficult to understand when you only work with auto-translated guests. The privcmd driver is only dealing with GFN so replace all the mention of MFN into GFN. The ioctl structure used to map foreign change has been left unchanged given that the userspace is using it. Nonetheless, add a comment to explain the expected value within the "mfn" field.
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -44,6 +44,10 @@ struct privcmd_hypercall { · 43 unmodified lines | |||
| 44 | 44 | ||
| 45 | struct privcmd_mmap_entry { | 45 | struct privcmd_mmap_entry { |
| 46 | __u64 va; | 46 | __u64 va; |
| 47 | /* | ||
| 48 | * This should be a GFN. It's not possible to change the name because | ||
| 49 | * it's exposed to the user-space. | ||
| 50 | */ | ||
| 47 | __u64 mfn; | 51 | __u64 mfn; |
| 48 | __u64 npages; | 52 | __u64 npages; |
| 49 | }; | 53 | }; |