This paves way to implement VDSO for the enlightened time counter.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/hyperv/include/hyperv.h | ||
---|---|---|
69 ↗ | (On Diff #22859) | 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 ↗ | (On Diff #22859) | Again, packed is useless there. |
sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c | ||
94 ↗ | (On Diff #22859) | Do not check nprot argument, VM does not pass useful permission to drivers. |
sys/dev/hyperv/include/hyperv.h | ||
---|---|---|
69 ↗ | (On Diff #22859) | "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 ↗ | (On Diff #22859) | 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 ↗ | (On Diff #22859) | Heh, interesting. I will adjust the d_mmap and add d_open then. |
sys/dev/hyperv/include/hyperv.h | ||
---|---|---|
69 ↗ | (On Diff #22859) | 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. |