{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":763405453,"defaultBranch":"pvm","name":"linux","ownerLogin":"virt-pvm","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2024-02-26T08:29:22.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/161298329?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1712741302.0","currentOid":""},"activityList":{"items":[{"before":"312df69c776ded1d908f190765d9cd5a16b952bc","after":"819c84c7335cdcb9fe79444aff198071e13bf490","ref":"refs/heads/pvm","pushedAt":"2024-04-29T07:19:34.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"},"commit":{"message":"KVM: x86/PVM: Disable direct switching when the GPC is inactive\n\nDuring direct switching, the switcher directly uses 'pvcs_gpc.khva' to\naccess the PVCS structure without performing any checks. However, NULL\npointer access can be easily triggered by the guest if it first writes a\nvalid value to MSR_PVM_VCPU_STRUCT to activate the GPC, and then writes\na zero to deactivate the GPC and set the pvcs_gpc.khva to NULL.\nTherefore, a new switch flag is introduced to disable direct switching\nif the GPC is inactive.\n\nSigned-off-by: Hou Wenlong ","shortMessageHtmlLink":"KVM: x86/PVM: Disable direct switching when the GPC is inactive"}},{"before":"6a03a6194905743a7d072d97f8b5fc92389516e1","after":"312df69c776ded1d908f190765d9cd5a16b952bc","ref":"refs/heads/pvm","pushedAt":"2024-04-25T11:36:54.000Z","pushType":"push","commitsCount":7,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"},"commit":{"message":"KVM: x86/PVM: Use 'current->active_mm' to obtain the host pgd\n\nWhen building the PVM module as builtin, the 'current->mm' can be NULL\nsince the current thread may be the swapper task, which is a kernel\nthread. Therefore, use 'current->active_mm' instead, as it should not be\nNULL.\n\nSigned-off-by: Hou Wenlong ","shortMessageHtmlLink":"KVM: x86/PVM: Use 'current->active_mm' to obtain the host pgd"}},{"before":"f239d1049c710a33e7bfa792e687449b7b93b131","after":null,"ref":"refs/heads/pvm-fix","pushedAt":"2024-04-10T09:28:22.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"}},{"before":"ebec6f6d35cd8bc4f213963a55d786ba2df49257","after":"6a03a6194905743a7d072d97f8b5fc92389516e1","ref":"refs/heads/pvm","pushedAt":"2024-04-10T09:27:57.000Z","pushType":"push","commitsCount":6,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"},"commit":{"message":"KVM: x86/PVM: Check the validity of the root page for direct switching when PCID is not supported\n\nSimilar to the check performed in\npvm_set_host_cr3_for_guest_with_host_pcid(), the HPA of the SPT page\ntable for direct switching should also be verified in\npvm_set_host_cr3_for_guest_without_host_pcid().\n\nSigned-off-by: Yong He \nSigned-off-by: Hou Wenlong \nLink: https://github.com/virt-pvm/linux/issues/4","shortMessageHtmlLink":"KVM: x86/PVM: Check the validity of the root page for direct switchin…"}},{"before":"5382aaf00261e18f3c3e836e5613ebcc57ebc1c8","after":"f239d1049c710a33e7bfa792e687449b7b93b131","ref":"refs/heads/pvm-fix","pushedAt":"2024-04-10T09:05:27.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"},"commit":{"message":"KVM: x86/PVM: Check the validity of the root page for direct switching when PCID is not supported\n\nSimilar to the check performed in\npvm_set_host_cr3_for_guest_with_host_pcid(), the HPA of the SPT page\ntable for direct switching should also be verified in\npvm_set_host_cr3_for_guest_without_host_pcid().\n\nSigned-off-by: Yong He \nSigned-off-by: Hou Wenlong \nLink: https://github.com/virt-pvm/linux/issues/4","shortMessageHtmlLink":"KVM: x86/PVM: Check the validity of the root page for direct switchin…"}},{"before":"a45da8205ccf4afa7774b7cec2b5a247d1cc24a3","after":"5382aaf00261e18f3c3e836e5613ebcc57ebc1c8","ref":"refs/heads/pvm-fix","pushedAt":"2024-04-02T12:19:14.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"},"commit":{"message":"KVM: x86/PVM: Check the validity of the root page for direct switching when PCID is not supported\n\nSimilar to the check performed in\npvm_set_host_cr3_for_guest_with_host_pcid(), the HPA of the SPT page\ntable for direct switching should also be verified in\npvm_set_host_cr3_for_guest_without_host_pcid().\n\nSigned-off-by: Hou Wenlong \nLink: https://github.com/virt-pvm/linux/issues/4","shortMessageHtmlLink":"KVM: x86/PVM: Check the validity of the root page for direct switchin…"}},{"before":"63b1c5755c550e73c265fa9971703bda262f0aa8","after":"a45da8205ccf4afa7774b7cec2b5a247d1cc24a3","ref":"refs/heads/pvm-fix","pushedAt":"2024-04-02T12:04:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"},"commit":{"message":"KVM: x86/PVM: Check the validity of the root page for direct switching when PCID is not supported\n\nSimilar to the check performed in\npvm_set_host_cr3_for_guest_with_host_pcid(), the HPA of the SPT page\ntable for direct switching should also be verified in\npvm_set_host_cr3_for_guest_without_host_pcid().\n\nSigned-off-by: Hou Wenlong \nLink: https://github.com/virt-pvm/linux/issues/4","shortMessageHtmlLink":"KVM: x86/PVM: Check the validity of the root page for direct switchin…"}},{"before":null,"after":"63b1c5755c550e73c265fa9971703bda262f0aa8","ref":"refs/heads/pvm-fix","pushedAt":"2024-04-02T03:19:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"bysui","name":"bysui","path":"/bysui","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5154278?s=80&v=4"},"commit":{"message":"KVM: x86/PVM: Switch to PVM mode as soon as possible\n\nPer to the PVM specification, the 'event_flags' in PVCS is specific to\nPVM mode and unrelated to the x86 specification. Therefore, it will not\nbe changed in non-PVM mode. During VM store, the VMM may inject an event\nto invoke the vCPU, and the event is delivered directly before the\nvcpu_run() callback. However, the PVM mode switching occurs after\nvcpu_run(), so the vCPU delivers the event in non-PVM mode.\nConsequently, in pvm_set_rflags(), 'event_flags' is not updated, and the\nguest will observe that the X86_EFLAGS_IF is set during event handling,\nleading to a BUG_ON() in the guest. Additionally, when the guest exits,\nthe 'X86_EFLAGS_IF' bit will be updated to the value maintained in the\nhypervisor. Therefore, the hypervisor may inject an event during the\nevent handling of the guest before interrupt is enabled.\n\nTo address this issue, switch to PVM mode during the CR0 setting and CS\nsegment setting, and add a WARN_ON_ONCE() to detect event injection in\nnon-PVM mode.\n\nSigned-off-by: Hou Wenlong ","shortMessageHtmlLink":"KVM: x86/PVM: Switch to PVM mode as soon as possible"}},{"before":null,"after":"ebec6f6d35cd8bc4f213963a55d786ba2df49257","ref":"refs/heads/pvm","pushedAt":"2024-02-26T10:04:54.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"laijs","name":"Lai Jiangshan","path":"/laijs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/125671?s=80&v=4"},"commit":{"message":"x86/pvm: Disable some unsupported syscalls and features\n\nn the PVM guest, the LDT won't be loaded into hardware, rendering it\nineffective. Consequently, the modify_ldt() syscall should be disabled.\nAdditionally, the VSYSCALL address is not within the allowed address\nrange, making full emulation of the vsyscall page unsupported in the PVM\nguest. It is recommended to use XONLY mode instead. Furthermore,\nSYSENTER (Intel) and SYSCALL32 (AMD) are not supported by the\nhypervisor, so they should not be used in VDSO.\n\nSuggested-by: Lai Jiangshan \nSigned-off-by: Hou Wenlong ","shortMessageHtmlLink":"x86/pvm: Disable some unsupported syscalls and features"}},{"before":null,"after":"8fead9c0e6320866be104857dbda48213786e37a","ref":"refs/heads/pie","pushedAt":"2024-02-26T09:59:56.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"laijs","name":"Lai Jiangshan","path":"/laijs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/125671?s=80&v=4"},"commit":{"message":"x86/boot: Extend relocate range for PIE kernel image\n\nAllow PIE kernel image to be relocated in unused holes in top 512G of\naddress space.\n\nSuggested-by: Lai Jiangshan \nSigned-off-by: Hou Wenlong ","shortMessageHtmlLink":"x86/boot: Extend relocate range for PIE kernel image"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEPK68MgA","startCursor":null,"endCursor":null}},"title":"Activity · virt-pvm/linux"}