- 15 11月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Replace the use of regcomp with GRegex. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 12 11月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 25 10月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
The function now does not return an error so we can drop it fully. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 21 10月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Replace all occurrences of if (VIR_STRDUP(a, b) < 0) /* effectively dead code */ with: a = g_strdup(b); Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 10月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOPTR aliases to g_autoptr. Replace all of its use by the GLib macro version. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 10月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Also define the macro for building with GLib older than 2.60 Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 10月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Replace use of the gnulib base64 module with glib's own base64 API family. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 11 10月, 2019 1 次提交
-
-
由 Ivan Kardykov 提交于
Libxl driver did not support setup additional acpi firmware to xen guest. It is necessary to activate OEM Windows installs. This patch allow to define in OS section acpi table param (which supported domain common schema). Signed-off-by: NIvan Kardykov <kardykov@tabit.pro> [added info to docs/formatdomain.html.in] Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-
- 10 9月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 30 4月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
This reverts commit 2f5e6502. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 4月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Allocated in libxlDriverConfigNew(), the @configBaseDir is never freed. 13 bytes in 1 blocks are definitely lost in loss record 36 of 125 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x8012469: strdup (strdup.c:42) by 0x52926DE: virStrdup (virstring.c:966) by 0x11D46B: libxlDriverConfigNew (libxl_conf.c:1749) by 0x114D78: testCompareXMLToDomConfig (libxlxml2domconfigtest.c:62) by 0x1152A3: testCompareXMLToDomConfigHelper (libxlxml2domconfigtest.c:160) by 0x115925: virTestRun (testutils.c:174) by 0x1154A4: mymain (libxlxml2domconfigtest.c:216) by 0x1179E9: virTestMain (testutils.c:1096) by 0x1154FD: main (libxlxml2domconfigtest.c:224) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 18 4月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The call to resolve the actual network type will turn any NICs with type=network into one of the other types. Thus there should be no need to handle type=network in later switch() statements jumping off the actual type. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 17 4月, 2019 2 次提交
-
-
由 Cole Robinson 提交于
This adds a network model enum. The virDomainNetDef property is named 'model' like most other devices. When the XML parser or a driver calls NetSetModelString, if the passed string is in the enum, we will set net->model, otherwise we copy the string into net->modelstr Add a single example for the 'netfront' xen model, and wire that up, just to verify it's all working Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
To ease converting the net->model value to an enum, add the wrapper functions: virDomainNetGetModelString virDomainNetSetModelString virDomainNetStreqModelString virDomainNetStrcaseeqModelString Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 10 4月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
virutil.(c|h) is a very gross collection of random code. Remove the enum handlers from there so we can limit the scope where virtutil.h is used. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 03 4月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Refactor code paths which clear strings on cleanup paths to use the automatic helper. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 14 3月, 2019 1 次提交
-
-
由 Jim Fehlig 提交于
Add support for setting max_grant_frames in libxl domain config object and include a test to check that it is properly converted from XML to libxl domain config. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 05 3月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Add new <memballoon> model values for virtio transitional devices. Ex: <memballoon model='virtio-transitional'/> * "virtio-transitional" maps to qemu "virtio-balloon-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-balloon-pci-non-transitional" Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 04 2月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>). VIR_ONCE_GLOBAL_INIT is almost exclusively called without an ending semicolon, but let's standardize on using one like the other macros. Add a dummy struct definition at the end of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 07 12月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
It is currently possible to use <interface>s of type openvswitch with the libxl driver in a non-standard way, e.g. <interface type='bridge'> <source bridge='ovsbr0'/> <mac address='00:16:3e:7a:35:ce'/> <script path='vif-openvswitch'/> </interface> This patch adds support for openvswitch <interface>s specified in typical libvirt config <interface type='bridge'> <source bridge='ovsbr0'/> <mac address='00:16:3e:7a:35:ce'/> <virtualport type='openvswitch'/> </interface> VLAN tags and trunking are also supported using the extended syntax for specifying an openvswitch bridge in libxl BRIDGE_NAME[.VLAN][:TRUNK:TRUNK] See Xen's networking wiki for more details on openvswitch support https://wiki.xenproject.org/wiki/Xen_Networking#Open_vSwitchSigned-off-by: NJim Fehlig <jfehlig@suse.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 12月, 2018 1 次提交
-
-
由 Yuri Chornoivan 提交于
Signed-off-by: NYuri Chornoivan <yurchor@ukr.net> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 27 11月, 2018 2 次提交
-
-
Since this is something between PV and HVM, it makes sense to put the setting in place where domain type is specified. To enable it, use <os><type machine="xenpvh">xenpvh</type></os>. It is also included in capabilities.xml, for every supported HVM guest type - it doesn't seems to be any other requirement (besides new enough Xen). Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
Make it easier to share HVM and PVH code where relevant. No functional change. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
- 25 9月, 2018 2 次提交
-
-
If available, use b_info->nested_hvm instead of b_info->u.hvm.nested_hvm. This will make nested HVM config available also for PVH domains. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
Otherwise starting PVH guest will result in "arch_setup_bootlate: mapping shared_info failed (pfn=..., rc=-1, errno: 12): Internal error". After this change the behavior is the same as in `xl`. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
- 23 7月, 2018 1 次提交
-
-
由 Andrea Bolognani 提交于
Currently, the functions return a pointer to the destination buffer on success or NULL on failure. Not only does this kind of error handling look quite alien in the context of libvirt, where most functions return zero on success and a negative int on failure, but it's also somewhat pointless because unless there's been a failure the returned pointer will be the same one passed in by the user, thus offering no additional value. Change the functions so that they return an int instead. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 19 7月, 2018 1 次提交
-
-
由 Erik Skultety 提交于
Since 2.10 QEMU supports a new display type egl-headless which uses the drm nodes for OpenGL rendering copying back the rendered bits back to QEMU into a dma-buf which can be accessed by standard "display" apps like VNC or SPICE. Although this display type can be used on its own, for any practical use case it makes sense to pair it with either VNC or SPICE display. The clear benefit of this display is that VNC gains OpenGL support, which it natively doesn't have, and SPICE gains remote OpenGL support (native OpenGL support only works locally through a UNIX socket, i.e. listen type=socket/none). Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 18 4月, 2018 6 次提交
-
-
由 Michal Privoznik 提交于
So far we are repeating the following lines over and over: if (!(virSomeObjectClass = virClassNew(virClassForObject(), "virSomeObject", sizeof(virSomeObject), virSomeObjectDispose))) return -1; While this works, it is impossible to do some checking. Firstly, the class name (the 2nd argument) doesn't match the name in the code in all cases (the 3rd argument). Secondly, the current style is needlessly verbose. This commit turns example into following: if (!(VIR_CLASS_NEW(virSomeObject, virClassForObject))) return -1; Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
Convert CPU features policy into libxl cpuid policy settings. Use new ("libxl") syntax, which allow to enable/disable specific bits, using host CPU as a base. For this reason, only "host-passthrough" mode is accepted. Libxl do not have distinction between "force" and "required" policy (there is only "force") and also between "forbid" and "disable" (there is only "disable"). So, merge them appropriately. If anything, "require" and "forbid" should be enforced outside of specific driver. Nested HVM (vmx and svm features) is handled separately, so exclude it from translation. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
Introduce global libxl option for enabling nested HVM feature, similar to kvm module parameter. This will prevent enabling experimental feature by mere presence of <cpu mode='host-passthrough'> element in domain config, unless explicitly enabled. <cpu mode='host-passthrough'> element may be used to configure other features, like NUMA, or CPUID. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
When support for mode=custom will be added in the future, semantics of current config will change. Reduce the surprise by emitting a warning. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 4月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
All Xen PV and HVM with PV driver support a memory balloon device, which cannot be disabled through the toolstack. Model the device in the libxl driver, similar to the recently removed xend-based driver. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 22 3月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
Long ago in commit dfa1e1dd the scheduler weight was accidentally hardcoded to 1000. Weight is a setting with no unit since it is relative to the weight of other domains. If no weight is specified, libxl defaults to 256. Instead of hardcoding the weight to 1000, honor any <shares> specified in <cputune>. libvirt's notion of shares is synonomous to libxl's scheduler weight setting. If shares is unspecified, defer default weight setting to libxl. Removing the hardcoded weight required some test fixup. While at it, add an explicit test for <shares> conversion to scheduler weight. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 24 2月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
libxl requires the memory sizes to be rounded to 1MiB increments. Attempting to start a domain that violates this requirement will fail with the marginally helpful error 2018-02-22 01:55:32.921+0000: xc: panic: xc_dom_boot.c:141: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory 2018-02-22 01:55:32.921+0000: libxl: libxl_dom.c:671:libxl__build_dom: xc_dom_boot_mem_init failed: No such file or directory Round the maximum and current memory values to the next 1MiB increment when generating the libxl_domain_config object. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 22 2月, 2018 2 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Host tcp4/tcp6 ports is a global resource thus we need to make port accounting also global or we have issues described in [1] when port allocator ranges of different instances are overlapped (which is by default for qemu for example). Let's have only one global port allocator object that take care of the entire ports range (0 - 65535) and introduce port range object for clients to specify desired auto allocation band. [1] https://www.redhat.com/archives/libvir-list/2017-December/msg00600.htmlSigned-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Jim Fehlig 提交于
libxl supports setting the domain real time clock to local time or UTC via the localtime field of libxl_domain_build_info. Adjustment of the clock is also supported via the rtc_timeoffset field. The libvirt libxl driver has never supported these settings, instead relying on libxl's default of a UTC real time clock with adjustment set to 0. There is at least one user that would like the ability to change the defaults https://www.redhat.com/archives/libvirt-users/2018-February/msg00059.html Add support for specifying a local time clock and for specifying an adjustment for both local time and UTC clocks. Add a test case to verify the XML to libxl_domain_config conversion. Local time clock and clock adjustment is already supported by the XML <-> xl.cfg converter. What is missing is an explicit test for the conversion. There are plenty of existing tests that all use UTC with 0 adjustment. Hijack test-fullvirt-tsc-timer to test a local time clock with 1 hour adjustment. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The controller model is slightly unusual in that the default value is -1, not 0. As a result the default value is not covered by any of the existing enum cases. This in turn means that any switch() statements that think they have covered all cases, will in fact not match the default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags() method this has caused a serious mistake where we fallthrough from the SCSI controller case, to the VirtioSerial controller case, and from the USB controller case to the IDE controller case. By adding explicit enum constant starting at -1, we can ensure switches remember to handle the default case. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-