Re: [PATCH v8 13/40] x86/kernel: Make the bss.decrypted section shared in RMP table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/5/22 11:52, Brijesh Singh wrote:
          for (; vaddr < vaddr_end; vaddr += PMD_SIZE) {
+            /*
+             * When SEV-SNP is active then transition the page to shared in the RMP
+             * table so that it is consistent with the page table attribute change.
+             */
+            early_snp_set_memory_shared(__pa(vaddr), __pa(vaddr), PTRS_PER_PMD);

Shouldn't the first argument be vaddr as below?

Nope, sme_postprocess_startup() is called while we are fixing the initial page table and running with identity mapping (so va == pa).

I'm not sure I've ever seen a line of code that wanted a comment so badly.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux