Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single source of truth for version information. #168

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

rountree
Copy link
Collaborator

Fixes #167

msr_version.h
#defines for major, minor, and patch versions of msr-safe
as well as helper macros to generate _u32 and string
representation.

Makefile
Removes CURRENT_VERSION and -DVERSION from build.
msrsave now gets the version string from msr_version.h

msrsave_main.c
msr_entry.c
Now #includes msr_version.h and uses MSR_SAFE_VERSION_STR

msr_safe.h
Repurposes a bit of struct padding to hold a _u32-format
msr-safe version number.

README.md
Updates documentation of struct msr_batch_array to note
the new version field. Explains how this will remain
unused in the 1.x.y series. Version 2.x.y will begin
checking this version field to make sure what the user
compiled against is the same version as the loaded
kernel module. This is necessary due to anticipated
batch API changes in version 2.0.0.

Tested on serif (Ubuntu 24.04.1 LTS, Linux 6.8.0, gcc 13.2.0)

msr_version.h
	#defines for major, minor, and patch versions of msr-safe
	as well as helper macros to generate _u32 and string
	representation.

Makefile
	Removes CURRENT_VERSION and -DVERSION from build.
	msrsave now gets the version string from msr_version.h

msrsave_main.c
msr_entry.c
	Now #includes msr_version.h and uses MSR_SAFE_VERSION_STR

msr_safe.h
	Repurposes a bit of struct padding to hold a _u32-format
	msr-safe version number.

README.md
	Updates documentation of struct msr_batch_array to note
	the new version field.  Explains how this will remain
	unused in the 1.x.y series.  Version 2.x.y will begin
	checking this version field to make sure what the user
	compiled against is the same version as the loaded
	kernel module.  This is necessary due to anticipated
	batch API changes in version 2.0.0.

Tested on serif (Ubuntu 24.04.1 LTS, Linux 6.8.0, gcc 13.2.0)
@rountree rountree requested a review from slabasan as a code owner September 13, 2024 06:34
@slabasan slabasan added this to the v1.8.0 milestone Sep 13, 2024
msr_entry.c Outdated
@@ -396,5 +396,5 @@ module_exit(msr_exit)

MODULE_AUTHOR("M. Fadden, K. Shoga, B. Rountree, H. P. Anvin");
MODULE_DESCRIPTION("x86 generic MSR driver (+LLNL Approved List)");
MODULE_VERSION("1.7");
MODULE_VERSION( MSR_SAFE_VERSION_STR );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra spaces

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Collaborator

@slabasan slabasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change

@slabasan slabasan merged commit 401b07f into LLNL:main Sep 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version defined in two different places, but not in the msr_safe.h struct msr_batch_array
3 participants