mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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).
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user