I really meant putting the beginning of that string at the very first
position on the line:
if (WARN(hdr->end_entry > end_entry || cur_entry > hdr->cur_entry,
"SEV-SNP: PSC processing going backward, end_entry %d (got %d) cur_entry %d (got %d)\n",
end_entry, hdr->end_entry, cur_entry, hdr->cur_entry)) {
Exactly like this!
...
+static void set_page_state(unsigned long vaddr, unsigned int npages, int op)
+{
+ unsigned long vaddr_end, next_vaddr;
+ struct snp_psc_desc *desc;
+
+ vaddr = vaddr & PAGE_MASK;
+ vaddr_end = vaddr + (npages << PAGE_SHIFT);
+
+ desc = kmalloc(sizeof(*desc), GFP_KERNEL_ACCOUNT);
And again, from previous review:
kzalloc() so that you don't have to memset() later in
__set_page_state().
+ if (!desc)
+ panic("SEV-SNP: failed to alloc memory for PSC descriptor\n");
"allocate" fits just fine too.