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
Unknown Object (File)
Sat, Nov 30, 3:32 PM
Unknown Object (File)
Sat, Nov 16, 3:40 AM
Unknown Object (File)
Nov 12 2024, 8:27 PM
Unknown Object (File)
Nov 12 2024, 5:34 PM
Unknown Object (File)
Nov 12 2024, 11:29 AM
Unknown Object (File)
Nov 11 2024, 7:31 PM
Unknown Object (File)
Nov 11 2024, 5:58 PM
Unknown Object (File)
Nov 11 2024, 5:35 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 6880

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

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

Thanks :)!

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