-
Notifications
You must be signed in to change notification settings - Fork 46
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
Potential bug fix for the guest VM boot failure #213
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/PEK-1245.
|
Thanks @NSKernel for this patch, it is really great ! we will take a look and get back to you ASAP. |
Geez I'm still seeing some problem with this patch. I'll need to dig further. |
Another thing I've been noticed is the |
Here's the second patch that fixes the no |
BTW the content of the patch seems to have been discussed in the kernel's mailing list so take my patch as a hot fix before Intel's v20 patch is out |
Description
As mentioned in #100, occasionally SEAMCALL failures can be seen during the boot of a guest VM. The SEAMCALL failure message starts with
From the error code, it's a
TDX_TLB_TRACKING_NOT_DONE
. On my machine, stack dump shows it's caused bytdh_mem_page_demote
called by__set_private_spte_present
whenkvm_x86_zap_private_spte
fails. However,kvm_x86_zap_private_spte
corresponds totdx_sept_zap_private_spte
which can return-EAGAIN
if SEAMCALLtdh_mem_range_block
returnsTDX_ERROR_SEPT_BUSY
which the error code isTDX_OPERAND_BUSY
. In this case, as suggested in the ABI manual, one can simply retry. However, in__set_private_spte_present
, the logic simply do the demoting (reversing) operation and return which caused the problem because the page hasn't been blocked & tracked.Potential Fix
A fix that is working on my side is to change
__set_private_spte_present
's logic to check the return value and retry when it gets-EAGAIN
. I've attached the patch here since I don't know how I can submit the patch to the Ubuntu's Git.tdx-zap-fix.patch
The text was updated successfully, but these errors were encountered: