]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm: Add rw to default kernel command line parameters
authorAsias He <asias.hejun@gmail.com>
Sun, 9 Jan 2011 08:48:40 +0000 (16:48 +0800)
committerPekka Enberg <penberg@kernel.org>
Sun, 9 Jan 2011 09:19:32 +0000 (11:19 +0200)
As reported by Asias He, guest kernels mount filesystems as readonly under our
hypervisor:

  without rw:
  [    0.909000] EXT3-fs: mounted filesystem with writeback data mode.
  [    0.909000] VFS: Mounted root (ext3 filesystem) readonly on device 253:1.

  /dev/root on / type ext3 (ro,relatime,errors=continue,data=writeback)

by passing the "rw" kernel parameter, guest kernels are able to mount as
read-write:

  [    0.891000] EXT3 FS on vda1, internal journal
  [    0.891000] EXT3-fs: recovery complete.
  [    0.892000] EXT3-fs: mounted filesystem with writeback data mode.
  [    0.892000] VFS: Mounted root (ext3 filesystem) on device 253:1.

  /dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)

There's some real problem hiding here but as we've done with other parts of the
kernel (PCI, SMP), just bypass the problem for now.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/main.c

index 69977b3cbfe6016e80bcb680f0722d5887c8d7e6..5331928776baba9bcae8763908dae95f8ea0d2d8 100644 (file)
@@ -110,7 +110,7 @@ int main(int argc, char *argv[])
 
        kvm__setup_cpuid(kvm);
 
-       strcpy(real_cmdline, "notsc nolapic nosmp noacpi pci=conf1 earlyprintk=ttyS0,keep root=fc00 ");
+       strcpy(real_cmdline, "notsc nolapic nosmp noacpi pci=conf1 earlyprintk=ttyS0,keep root=fc00 rw ");
        if (kernel_cmdline) {
                strlcat(real_cmdline, kernel_cmdline, sizeof(real_cmdline));
                real_cmdline[sizeof(real_cmdline)-1] = '\0';