This paves way to implement VDSO for the enlightened time counter.
Details
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/dev/hyperv/include/hyperv.h | ||
---|---|---|
69 | Why do not need packed ? ABI layout should be already correct. I doubt that compiler and linker can ensure the requested alignment. Also IMO you should provide explicit padding at the end of the structure. | |
78 | Again, packed is useless there. | |
sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c | ||
94 | Do not check nprot argument, VM does not pass useful permission to drivers. |
sys/dev/hyperv/include/hyperv.h | ||
---|---|---|
69 | "packed" is not removed, it is there. Or do you mean why "packed" is needed? Since this struct may change and the layout may not promise "packed" later on, I'd prefer to keep the "packed". The "aligned" is used to do the implicit padding here, the memory of this struct is allocated w/ busdma(9) w/ proper alignment. I considered the explicit padding, it would look like: | |
78 | That's old code, I don't want to mix changes here. And well, it's used by PDU between VM and hypervisor, I'd prefer to keep the "packed". | |
sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c | ||
94 | Heh, interesting. I will adjust the d_mmap and add d_open then. |
sys/dev/hyperv/include/hyperv.h | ||
---|---|---|
69 | This was a typo. I do not see a need in the packed there. And yes, I prefer explicit padding. This, together with the assert about the structure size, makes future modifications easier, in fact. |