[Pkg-libvirt-commits] [libguestfs] 74/233: launch: direct: Make sure we pass lpj= parameter when using TCG.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:10:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 012b01a0fb875bc8aade5a57adbb86599bc2c86c
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Jan 18 16:52:58 2014 +0000
launch: direct: Make sure we pass lpj= parameter when using TCG.
I have verified that 'refined-jiffies' is the clock source when using
TCG (ie. not kvm-clock which seems only to be used for KVM).
---
src/launch-direct.c | 7 ++++++-
src/lpj.c | 5 +++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/launch-direct.c b/src/launch-direct.c
index 809b460..c2a6885 100644
--- a/src/launch-direct.c
+++ b/src/launch-direct.c
@@ -276,6 +276,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (cmdline);
int daemon_accept_sock = -1, console_sock = -1;
int r;
+ int flags;
int sv[2];
char guestfsd_sock[256];
struct sockaddr_un addr;
@@ -635,7 +636,11 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
}
ADD_CMDLINE ("-append");
- ADD_CMDLINE_STRING_NODUP (guestfs___appliance_command_line (g, appliance_dev, 0));
+ flags = 0;
+ if (!has_kvm || force_tcg)
+ flags |= APPLIANCE_COMMAND_LINE_IS_TCG;
+ ADD_CMDLINE_STRING_NODUP (guestfs___appliance_command_line (g, appliance_dev,
+ flags));
/* Note: custom command line parameters must come last so that
* qemu -set parameters can modify previously added options.
diff --git a/src/lpj.c b/src/lpj.c
index 6bbee80..54f4012 100644
--- a/src/lpj.c
+++ b/src/lpj.c
@@ -40,10 +40,15 @@
* posted a patch asking for this to be added to /proc/cpuinfo too.
*
* Notes:
+ *
* - We only try to calculate lpj once.
+ *
* - Trying to calculate lpj must not fail. If the return value is
* <= 0, it is ignored by the caller.
*
+ * - KVM uses kvm-clock, but TCG uses some sort of jiffies source,
+ * which is why this is needed only for TCG appliances.
+ *
* (Suggested by Marcelo Tosatti)
*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list