1. 11 Mar, 2008 35 commits
  2. 10 Mar, 2008 5 commits
    • Paul Bolle's avatar
      lguest: Do not append space to guests kernel command line · 1ef36fa6
      Paul Bolle authored
      The lguest launcher appends a space to the kernel command line (if kernel
      arguments are specified on its command line). This space is unneeded. More
      importantly, this appended space will make Red Hat's nash script interpreter
      (used in a Fedora style initramfs) add an empty argument to init's command
      line. This empty argument will make kernel arguments like "init=/bin/bash"
      fail (because the shell will try to execute a script with an empty name).
      This could be considered a bug in nash, but is easily fixed in the lguest
      launcher too.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      1ef36fa6
    • Rusty Russell's avatar
      lguest: Revert 1ce70c4f, fix real problem. · 4357bd94
      Rusty Russell authored
      Ahmed managed to crash the Host in release_pgd(), which cannot be a Guest
      bug, and indeed it wasn't.
      
      The bug was that handing a 0 as the address of the toplevel page table
      being manipulated can cause the lookup code in find_pgdir() to return
      an uninitialized cache entry (we shadow up to 4 top level page tables
      for each Guest).
      
      Commit 37cc8d7f introduced this
      behaviour in the Guest, uncovering the bug.
      
      The patch which he submitted (which removed the /4 from the index
      calculation) simply ensured that these high-indexed entries hit the
      early exit path of guest_set_pmd().  But you get lots of segfaults in
      guest userspace as the PMDs aren't being updated.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      4357bd94
    • Rusty Russell's avatar
      lguest: Sanitize the lguest clock. · 3fabc55f
      Rusty Russell authored
      Now the TSC code handles a zero return from calculate_cpu_khz(),
      lguest can simply pass through the value it gets from the Host: if
      non-zero, all the normal TSC code applies.
      
      Otherwise (or if the Host really doesn't support TSC), the clocksource
      code will fall back to the slower but reasonable lguest clock.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      3fabc55f
    • Rusty Russell's avatar
      lguest: fix __get_vm_area usage. · f14ae652
      Rusty Russell authored
      Robert Bragg's 5dc33185 tightened
      (ie. fixed) the checking in __get_vm_area, and it broke lguest.
      
      lguest should pass the exact "end" it wants, not some random constant
      (it was possible previously that it would actually get an address
      different from SWITCHER_ADDR).
      
      Also, Fabio Checconi pointed out that we should make sure we're not
      hitting the fixmap area.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Robert Bragg <robert@sixbynine.org>
      f14ae652
    • Eugene Teo's avatar
      lguest: make sure cpu is initialized before accessing it · f73d1e6c
      Eugene Teo authored
      If req is LHREQ_INITIALIZE, and the guest has been initialized before
      (unlikely), it will attempt to access cpu->tsk even though cpu is not yet
      initialized.
      Signed-off-by: default avatarEugene Teo <eugeneteo@kernel.sg>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      f73d1e6c