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)
Feb 13 2024, 12:51 AM
Unknown Object (File)
Jan 7 2024, 1:09 PM
Unknown Object (File)
Dec 22 2023, 10:57 PM
Unknown Object (File)
Dec 16 2023, 4:24 PM
Unknown Object (File)
Dec 16 2023, 11:23 AM
Unknown Object (File)
Nov 23 2023, 3:28 PM
Unknown Object (File)
Nov 13 2023, 12:23 PM
Unknown Object (File)
Nov 10 2023, 1:55 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 6879

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.