summaryrefslogtreecommitdiffstats
path: root/src/lpj.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: lpj: Refactor code.Richard W.M. Jones2012-11-261-27/+45
| | | | Only run one grep command to grep any number of files.
* lib: lpj: Only return first match in read_all function.Richard W.M. Jones2012-11-261-1/+2
| | | | | If there where several lpj=.. matches then the earlier matches would be leaked. Only return the first one and don't leak memory.
* lib: Get lpj= from /var/log/boot.msg (thanks Olaf Hering).Richard W.M. Jones2012-11-251-1/+15
|
* appliance: Pass lpj=... on the appliance command line (thanks Marcelo Tosatti).Richard W.M. Jones2012-11-241-0/+139
Try to get the host's loops_per_jiffy value and pass this on the command line to the guest. In theory this should avoid the appliance having to recalculate this value in a VM with TCG (which is generally error-prone). This should avoid timing issues. We only do this when we are certain that the guest will be TCG. Currently we only have enough information to do this from the libvirt attach-method. So mostly this will only affect people using Fedora in a VM. The host loops_per_jiffy value is not exported by the kernel. It is only printed by the kernel early during boot, so if boot messages have "scrolled off" the kernel ring buffer, it won't be available. Some operating systems save early kernel messages in /var/log/dmesg but (a) Fedora 18+ seem to have abandoned this file and (b) on Ubuntu this file is unreadable for spurious "security" reasons. I have submitted a patch to make lpj available through /proc/cpuinfo.