KVM SVM changes for 7.3

- Remove a dying VM from the GA Log notifier list before the VM is actually
    destroyed, to fix a potential use-after-free.
 
  - Don't pass FOLL_WRITE when registering encrypted memory regions, i.e. when
    pinning SEV/SEV-ES guest memory, to fix a regression with file-backed memory
    introduced by KVM's (correct) usage of long-term pins.
 
  - Allocate full pages for SEV/SEV-ES {DE,EN}CRYPT ops on SNP-enabled hosts to
    fix a data corruption issue due to the PSP driver assigning to-be-written
    pages to firmware (as required by the SNP specs).
 
  - Unconditionally intercept ICBEP so that KVM generates the correct guest RIP
    when handling an ICEBP-induced TASK_SWITCH #VMEXIT.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEKTobbabEP7vbhhN9OlYIJqCjN/0FAmp80WUACgkQOlYIJqCj
 N/3JuhAAv0zwXVVCQbE8Ni3CT/Wl03MEXGDsqlv1mBbsI5WkOte4CshCK8oHAYs4
 LDhO6Y4BlIRJ78itpzk+FF5pvx0MPLi535PNx71o2IGKRZ2T/0u9GVFvHjXdM61F
 OdMFSbRYTg4EHPhqskYN4vIy11Qd3vhaklwcDXxnxlZeTq2wtuVwa1GM7rkmiyRs
 w3dtNrjSTM2axc4+H+gIN/WN5wM5jxsMVxhPdhPzK2isl4+btD9PG7BG64+aZVqJ
 qW9CVTEz81yXdR04sTYutV0Hf56TzGE1RC75MH5nMi7AT9Lfq9L8eVSqPpCZBG/z
 YTO8oSQtD9SrIabE8YQ/pBf+LH4DpDCnxjA5IDeiP/6BW54Via6PXpDQQGGrgqWF
 pWs2jlc1nUxlrUPrPsQxx1yiFk0xDb/ketgwCHvVilyT5CV33ZO3w995FA3Lvjgy
 KY12jxl1jwb8SgZfEkVhUQBNSIsfhj6Wb+jJdbvgcA5M7iUbKk7bBGaokhTbGsev
 e63JCVFRydidINyk+LsvUfgjm1ua18x97A7ihcNMIsJY9CCALK8B/HtyPena2phM
 F+EZ+IydI/JIrXU4C/o0tWm+mlKbGsxAoCcVx/OkIsckEQYhBgcYPlKr5hZvzy1S
 deEmOEXB9cUIO11AOELYnRwEJl6xNuxa226It7WUtmuYQ9t5z48=
 =MkIK
 -----END PGP SIGNATURE-----

Merge tag 'kvm-x86-svm-7.3' of https://github.com/kvm-x86/linux into HEAD

KVM SVM changes for 7.3

 - Remove a dying VM from the GA Log notifier list before the VM is actually
   destroyed, to fix a potential use-after-free.

 - Don't pass FOLL_WRITE when registering encrypted memory regions, i.e. when
   pinning SEV/SEV-ES guest memory, to fix a regression with file-backed memory
   introduced by KVM's (correct) usage of long-term pins.

   [This is correct because, while FOLL_WRITE was needed in the past to trigger
   CoW unsharing, nowadays FOLL_LONGTERM does that already even without
   FOLL_WRITE.  And in fact, get_user_pages() actually disallows FOLL_WRITE
   together with FOLL_LONGTERM.  This change was acked by the MM maintainers.
   For more inforamtion see commit ee1a586dd1.
   - Paolo]

 - Allocate full pages for SEV/SEV-ES {DE,EN}CRYPT ops on SNP-enabled hosts to
   fix a data corruption issue due to the PSP driver assigning to-be-written
   pages to firmware (as required by the SNP specs).

 - Unconditionally intercept ICBEP so that KVM generates the correct guest RIP
   when handling an ICEBP-induced TASK_SWITCH #VMEXIT.
This commit is contained in:
Paolo Bonzini 2026-08-18 13:38:13 +02:00
commit 967872e4f3
5 changed files with 107 additions and 45 deletions