mod.paddr = last_addr;
mod.size = initrd->mod_end;
- last_addr += ROUNDUP(initrd->mod_end, PAGE_SIZE);
+ last_addr += ROUNDUP(initrd->mod_end, elf_64bit(&elf) ? 8 : 4);
+ if ( initrd->string )
+ {
+ char *str = __va(initrd->string);
+ size_t len = strlen(str) + 1;
+
+ rc = hvm_copy_to_guest_phys(last_addr, str, len, v);
+ if ( rc )
+ {
+ printk("Unable to copy module command line\n");
+ return rc;
+ }
+ mod.cmdline_paddr = last_addr;
+ last_addr += len;
+ }
+ last_addr = ROUNDUP(last_addr, PAGE_SIZE);
}
/* Free temporary buffers. */