-
Notifications
You must be signed in to change notification settings - Fork 15
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
vmsa: Updating for kernel debug_swap #32
Conversation
Thanks @larrydewey . The fix itself looks fine, but raises a few questions:
|
It looks like it was introduced with commit
Excellent point! I forgot to add a
I think this would be a good approach. An alternative may be introducing logic to cover both cases? Other opinions are definitely welcome. |
Upon further review, it sounds like this functionality will vary based upon whether or not this feature has been enabled. I think it would make the most sense here to add a new command-line argument to compensate for |
From reading the kernel commit d1f85fbe836e6 , I understand that the new debug_swap bit is enabled by default (in kernel >= 6.6, and if the hardware supports it) but can be disabled with kernel command-line |
cea96c4
to
b2eb21c
Compare
@dubek I re-based off the latest upstream code, and added in the tests. Do you have any concerns with the following code? |
d1eb1cf
to
e687a65
Compare
8e540a9
to
c9674e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for updating the tests.
Agreed, especially if the feature can be turned off (which also should be documented if so). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @larrydewey and @tylerfanelli . See my comments below.
The upstream host kernel patches have a new `debug_swap` feature which modifies the initial state each vCPU's VMSA page, which may affect the generated measurement. This change should address the requirements introduced by the upstream kernel change. *EDIT*: - Added flake8 required changes - Updated test cases. - Addressing PR requests Signed-off-by: Larry Dewey <[email protected]>
@dubek @tylerfanelli would you mind performing another review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @larrydewey , this looks good to me.
I think I'll release a new 0.0.8 today before merging this, and then release 0.0.9 with this change. This way, if users want the previous behaviour (and don't want to add --guest-features=0x1
) they can pip install sev-snp-measure==0.0.8
@larrydewey @tylerfanelli Does that sound fine to you?
@dubek Sounds good to me. I won't merge right now, as to give you the opportunity to release 0.0.8. Thanks! |
Merged. Thanks @larrydewey . I'll add a notice to the changelog that this is a breaking change (for kernel < 6.6). |
This implements the changes from upstream: virtee/sev-snp-measure#32
This implements the changes from upstream: virtee/sev-snp-measure#32
This implements the changes from upstream: virtee/sev-snp-measure#32
This implements the changes from upstream: virtee/sev-snp-measure#32
This implements the changes from upstream: virtee/sev-snp-measure#32
This implements the changes from upstream: virtee/sev-snp-measure#32 Signed-off-by: Otto Bittner <[email protected]>
This implements the changes from upstream: virtee/sev-snp-measure#32 Signed-off-by: Otto Bittner <[email protected]>
This implements the changes from upstream: virtee/sev-snp-measure#32 Signed-off-by: Otto Bittner <[email protected]>
This implements the changes from upstream: virtee/sev-snp-measure#32
The upstream host kernel patches have a new
debug_swap
feature which modifies the initialstate each vCPU's VMSA page, which may affect
the generated measurement. This change should
address the requirements introduced by the
upstream kernel change.
Resolves: #195
Resolves: #30