2008-09-04 10:44:23 +00:00
|
|
|
(* /etc/libvirt/qemu.conf *)
|
|
|
|
|
|
|
|
module Libvirtd_qemu =
|
|
|
|
autoload xfm
|
|
|
|
|
|
|
|
let eol = del /[ \t]*\n/ "\n"
|
|
|
|
let value_sep = del /[ \t]*=[ \t]*/ " = "
|
|
|
|
let indent = del /[ \t]*/ ""
|
|
|
|
|
|
|
|
let array_sep = del /,[ \t\n]*/ ", "
|
|
|
|
let array_start = del /\[[ \t\n]*/ "[ "
|
|
|
|
let array_end = del /\]/ "]"
|
|
|
|
|
|
|
|
let str_val = del /\"/ "\"" . store /[^\"]*/ . del /\"/ "\""
|
|
|
|
let bool_val = store /0|1/
|
|
|
|
let str_array_element = [ seq "el" . str_val ] . del /[ \t\n]*/ ""
|
|
|
|
let str_array_val = counter "el" . array_start . ( str_array_element . ( array_sep . str_array_element ) * ) ? . array_end
|
|
|
|
|
|
|
|
let str_entry (kw:string) = [ key kw . value_sep . str_val ]
|
|
|
|
let bool_entry (kw:string) = [ key kw . value_sep . bool_val ]
|
|
|
|
let str_array_entry (kw:string) = [ key kw . value_sep . str_array_val ]
|
|
|
|
|
|
|
|
|
|
|
|
(* Config entry grouped by function - same order as example config *)
|
|
|
|
let vnc_entry = str_entry "vnc_listen"
|
|
|
|
| bool_entry "vnc_tls"
|
|
|
|
| str_entry "vnc_tls_x509_cert_dir"
|
|
|
|
| bool_entry "vnc_tls_x509_verify"
|
2009-01-29 17:50:00 +00:00
|
|
|
| str_entry "vnc_password"
|
2009-03-16 13:54:26 +00:00
|
|
|
| bool_entry "vnc_sasl"
|
|
|
|
| str_entry "vnc_sasl_dir"
|
2009-08-17 10:34:53 +00:00
|
|
|
| str_entry "security_driver"
|
2009-07-15 21:25:01 +00:00
|
|
|
| str_entry "user"
|
|
|
|
| str_entry "group"
|
2010-01-13 17:41:36 +00:00
|
|
|
| bool_entry "dynamic_ownership"
|
2009-07-22 15:08:04 +00:00
|
|
|
| str_array_entry "cgroup_controllers"
|
|
|
|
| str_array_entry "cgroup_device_acl"
|
2009-08-17 10:34:53 +00:00
|
|
|
| str_entry "save_image_format"
|
Support configuration of huge pages in guests
Add option to domain XML for
<memoryBacking>
<hugepages/>
</memoryBacking>
* configure.in: Add check for mntent.h
* qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug, src/qemu.conf
Add 'hugetlbfs_mount' config parameter
* src/qemu_conf.c, src/qemu_conf.h: Check for -mem-path flag in QEMU,
and pass it when hugepages are requested.
Load hugetlbfs_mount config parameter, search for mount if not given.
* src/qemu_driver.c: Free hugetlbfs_mount/path parameter in driver shutdown.
Create directory for QEMU hugepage usage, chowning if required.
* docs/formatdomain.html.in: Document memoryBacking/hugepages elements
* docs/schemas/domain.rng: Add memoryBacking/hugepages elements to schema
* src/util.c, src/util.h, src/libvirt_private.syms: Add virFileFindMountPoint
helper API
* tests/qemuhelptest.c: Add -mem-path constants
* tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: Add tests for hugepage
handling
* tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml,
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args: Data files for
hugepage tests
2009-08-25 14:05:18 +00:00
|
|
|
| str_entry "hugetlbfs_mount"
|
2009-12-22 17:21:16 +00:00
|
|
|
| bool_entry "relaxed_acs_check"
|
2010-05-19 20:41:01 +00:00
|
|
|
| bool_entry "vnc_allow_host_audio"
|
2010-05-27 23:17:55 +00:00
|
|
|
| bool_entry "clear_emulator_capabilities"
|
2008-09-04 10:44:23 +00:00
|
|
|
|
|
|
|
(* Each enty in the config is one of the following three ... *)
|
|
|
|
let entry = vnc_entry
|
|
|
|
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
|
|
|
|
let empty = [ label "#empty" . eol ]
|
|
|
|
|
|
|
|
let record = indent . entry . eol
|
|
|
|
|
|
|
|
let lns = ( record | comment | empty ) *
|
|
|
|
|
|
|
|
let filter = incl "/etc/libvirt/qemu.conf"
|
|
|
|
. Util.stdexcl
|
|
|
|
|
|
|
|
let xfm = transform lns filter
|