Skip to content

Commit

Permalink
tools/lguest: Force disable tboot and APM
Browse files Browse the repository at this point in the history
The paravirt_enabled() check is going away, the area tossed to
the kernel on lguest is not zeroed out, so ensure lguest force
disables tboot and APM just in case the kernel file being read
might have this set for whatever reason.

Signed-off-by: Luis R. Rodriguez <[email protected]>
Acked-by: Rusty Russell <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
mcgrof authored and Ingo Molnar committed Apr 22, 2016
1 parent 1330e3b commit 4650459
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -3357,6 +3357,12 @@ int main(int argc, char *argv[])
/* Tell the entry path not to try to reload segment registers. */
boot->hdr.loadflags |= KEEP_SEGMENTS;

/* We don't support tboot: */
boot->tboot_addr = 0;

/* Ensure this is 0 to prevent APM from loading: */
boot->apm_bios_info.version = 0;

/* We tell the kernel to initialize the Guest. */
tell_kernel(start);

Expand Down

0 comments on commit 4650459

Please sign in to comment.