-
Notifications
You must be signed in to change notification settings - Fork 105
[6.6]Hygon: CSV3 patch series part 3 (Support live migration for Hygon CSV3 guest, and manage shared page by rbtree) #397
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
[6.6]Hygon: CSV3 patch series part 3 (Support live migration for Hygon CSV3 guest, and manage shared page by rbtree) #397
Conversation
hygon inclusion category: feature CVE: NA --------------------------- Define CSV3 migration command id and structure. The command definition is available in CSV3 spec. Signed-off-by: Xin Jiang <jiangxin@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
hygon inclusion category: feature CVE: NA --------------------------- The command is used for encrypting the guest memory page using the encryption context. Signed-off-by: Xin Jiang <jiangxin@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
hygon inclusion category: feature CVE: NA --------------------------- The command is used for encrypting the guest cpu context using the encryption context. Signed-off-by: Xin Jiang <jiangxin@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
hygon inclusion category: feature CVE: NA --------------------------- The command is used for copying the incoming buffer into the CSV3 guest's private memory. Signed-off-by: Xin Jiang <jiangxin@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
hygon inclusion category: feature CVE: NA --------------------------- The command is used for copying the incoming context into the CSV3 guest's private memory. Signed-off-by: Xin Jiang <jiangxin@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
hygon inclusion category: feature CVE: NA --------------------------- The shared pages between CSV3 guest and host are pinned in memory, and managed in list, they will be released to system till the guest VM was destroyed. The new ioctl API supports to unpin the shared pages, and remove them from the list. For shared memory allocated from guest user-space process, they must be unpinned dynamically when the process exits. Signed-off-by: yangwencheng <yangwencheng@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
hygon inclusion category: feature CVE: NA --------------------------- Managing shared pages in list makes it very costly when to search or remove a node from the list. Adopt rbtree to manage shared pages simplifies code logic and obtains performance improvement. Signed-off-by: yangwencheng <yangwencheng@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
…s enc status changes hygon inclusion category: feature CVE: NA --------------------------- It's not performance friendly in the loop invoking notify_page_enc_status_changed() just handling one page, if those pages are physically contiguous, merge them into a large range to get better performance. Signed-off-by: yangwencheng <yangwencheng@hygon.cn> Signed-off-by: hanliyang <hanliyang@hygon.cn>
…RECEIVE_ENCRYPT_CONTEXT hygon inclusion category: feature CVE: NA --------------------------- Before the commit b7e4be0 ("KVM: SEV-ES: Delegate LBR virtualization to the processor"), the LBR Virtualization is enabled during init VMCB: init_vmcb() -> sev_init_vmcb() -> sev_es_init_vmcb() While the commit b7e4be0 ("KVM: SEV-ES: Delegate LBR virtualization to the processor") enable LBR Virtualization after succeed to LAUNCH_UPDATE_VMSA for each vCPUs. The process to enable LBR Virtualization will not be executed in common code path. To ensure the CSV3 guest to work properly after migrate to target machine, we should explicitly to enable LBR Virtualization after succeed to RECEIVE_ENCRYPT_CONTEXT for each vCPUs. Fixes: b7e4be0 ("KVM: SEV-ES: Delegate LBR virtualization to the processor") Signed-off-by: hanliyang <hanliyang@hygon.cn>
|
Hi @wojiaohanliyang. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Add firmware API and host ioctl interface to support migrate CSV3 guest:
Add ioctl interface to manage shared pages and optimize the shared page management:
Optimize the notification of guest's page enc status:
Explicit enable LBRV when the target machine accept source context successfully: