Page MenuHomeFreeBSD

lib/libc/x86/sys/__vdso_gettc.c: Conditionalize hyperv support based on MK_HYPERV
ClosedPublic

Authored by ngie on Jan 19 2017, 8:08 AM.
Tags
None
Referenced Files
F103222651: D9242.id24188.diff
Fri, Nov 22, 9:28 AM
Unknown Object (File)
Thu, Nov 21, 12:56 PM
Unknown Object (File)
Thu, Nov 21, 10:41 AM
Unknown Object (File)
Thu, Nov 21, 1:31 AM
Unknown Object (File)
Tue, Nov 19, 8:10 PM
Unknown Object (File)
Tue, Nov 19, 4:25 PM
Unknown Object (File)
Sun, Nov 17, 6:59 PM
Unknown Object (File)
Mon, Nov 11, 11:57 PM
Subscribers

Details

Summary

This conditionalizes hyperv support in gettimeofday based on MK_HYPERV, so systems where the administrator has made a conscious decision not to build hyperv support in the system will not be hit by the hyperv path.

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ngie retitled this revision from to lib/libc/x86/sys/__vdso_gettc.c: Conditionalize hyperv support based on MK_HYPERV.
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)
ngie added a reviewer: sepherosa_gmail.com.
ngie set the repository for this revision to rS FreeBSD src repository - subversion.
ngie added a subscriber: kib.

Tweak a comment marking the end of the WANT_HYPERV #endif .

I don't see why it is needed. If hyperv is not in kernel or the ref rdtsc is not the current timecounter, this path will never be hit. Or do you have other concerns?

I don't see why it is needed. If hyperv is not in kernel or the ref rdtsc is not the current timecounter, this path will never be hit. Or do you have other concerns?

I just saw that it only hits this case if the time counter is enabled, and after that only hits it if opening the character device succeeds.

It's not an issue today because MK_HYPERV != no doesn't control hyperv header installation, but if that ever changes (and I would kind of like that to be honest), then this would be an issue.

So, the reasoning I claimed here originally might be a bit misleading, but this unfortunately stands in the way of removing the hyperv headers from the system when MK_HYPERV == no.

sepherosa_gmail.com edited edge metadata.

OK, I see. Please fix the commit message when committing then. BTW, in addition to include/dev/hyperv, there are usr.sbin/hyperv and several manpages that you probably want to manage w/ MK_HYPERV.

This revision is now accepted and ready to land.Jan 19 2017, 8:26 AM
lib/libc/x86/sys/__vdso_gettc.c
220 ↗(On Diff #24189)

WANT_HYPERV, i.e. no __ prefix.

ngie marked an inline comment as done.Jan 19 2017, 5:00 PM
ngie added inline comments.
lib/libc/x86/sys/__vdso_gettc.c
220 ↗(On Diff #24189)

Thanks :)!

This revision was automatically updated to reflect the committed changes.
ngie marked an inline comment as done.