- 11 4月, 2018 1 次提交
-
-
由 John Ferlan 提交于
For bhyveDomObjFromDomain, bhyveDomainLookupByUUID, and bhyveDomainLookupByID let's return a locked and referenced @vm object so that callers can then use the common and more consistent virDomainObjEndAPI in order to handle cleanup rather than needing to know that the returned object is locked and calling virObjectUnlock. The LookupByName already returns the ref counted and locked object, so this will make things more consistent. For bhyveDomainUndefine and bhyveDomainDestroy since the virDomainObjListRemove will return an unlocked object, we need to relock before making the EndAPI call. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 22 2月, 2018 2 次提交
-
-
由 Nikolay Shirokovskiy 提交于
This flag is only used for tests. Let's instead overload bind syscall in mocks where it is not done yet. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 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>
-
- 09 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Use bool instead of an int.
-
- 19 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
Commit v3.8.0-95-gfd885a06 dropped nmodels parameter from several APIs in src/cpu/cpu.h, but failed to update all callers. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 21 9月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
In the past we updated host-model CPUs with host CPU data by adding a model and features, but keeping the host-model mode. And since the CPU model is not normally formatted for host-model CPU defs, we had to pass the updateCPU flag to the formatting code to be able to properly output updated host-model CPUs. Libvirt doesn't do this anymore, host-model CPUs are turned into custom mode CPUs once updated with host CPU data and thus there's no reason for keeping the hacks inside CPU XML formatters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 18 9月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
The implementation of virConnectBaselineCPU may be different for each hypervisor. Thus it shouldn't really be implmented in the cpu code. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 06 8月, 2017 1 次提交
-
-
由 Alexander Nusov 提交于
This patch adds support for automatic VNC port assignment for bhyve guests. Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 25 6月, 2017 1 次提交
-
-
由 John Ferlan 提交于
If a remote call fails during event registration (more than likely from a network failure or remote libvirtd restart timed just right), then when calling the virObjectEventStateDeregisterID we don't want to call the registered @freecb function because that breaks our contract that we would only call it after succesfully returning. If the @freecb routine were called, it could result in a double free from properly coded applications that free their opaque data on failure to register, as seen in the following details: Program terminated with signal 6, Aborted. #0 0x00007fc45cba15d7 in raise #1 0x00007fc45cba2cc8 in abort #2 0x00007fc45cbe12f7 in __libc_message #3 0x00007fc45cbe86d3 in _int_free #4 0x00007fc45d8d292c in PyDict_Fini #5 0x00007fc45d94f46a in Py_Finalize #6 0x00007fc45d960735 in Py_Main #7 0x00007fc45cb8daf5 in __libc_start_main #8 0x0000000000400721 in _start The double dereference of 'pyobj_cbData' is triggered in the following way: (1) libvirt_virConnectDomainEventRegisterAny is invoked. (2) the event is successfully added to the event callback list (virDomainEventStateRegisterClient in remoteConnectDomainEventRegisterAny returns 1 which means ok). (3) when function remoteConnectDomainEventRegisterAny is hit, network connection disconnected coincidently (or libvirtd is restarted) in the context of function 'call' then the connection is lost and the function 'call' failed, the branch virObjectEventStateDeregisterID is therefore taken. (4) 'pyobj_conn' is dereferenced the 1st time in libvirt_virConnectDomainEventFreeFunc. (5) 'pyobj_cbData' (refered to pyobj_conn) is dereferenced the 2nd time in libvirt_virConnectDomainEventRegisterAny. (6) the double free error is triggered. Resolve this by adding a @doFreeCb boolean in order to avoid calling the freeCb in virObjectEventStateDeregisterID for any remote call failure in a remoteConnect*EventRegister* API. For remoteConnect*EventDeregister* calls, the passed value would be true indicating they should run the freecb if it exists; whereas, it's false for the remote call failure path. Patch based on the investigation and initial patch posted by fangying <fangying1@huawei.com>.
-
- 03 4月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
So far our code is full of the following pattern: dom = virGetDomain(conn, name, uuid) if (dom) dom->id = 42; There is no reasong why it couldn't be just: dom = virGetDomain(conn, name, uuid, id); After all, client domain representation consists of tuple (name, uuid, id). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 3月, 2017 2 次提交
-
-
由 Martin Kletzander 提交于
There is no "node driver" as there was before, drivers have to do their own ACL checking anyway, so they all specify their functions and nodeinfo is basically just extending conf/capablities. Hence moving the code to src/conf/ is the right way to go. Also that way we can de-duplicate some code that is in virsysfs and/or virhostcpu that got duplicated during the virhostcpu.c split. And Some cleanup is done throughout the changes, like adding the vir* prefix etc. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
There is no reason for it not to be in the utils, all global symbols under that file already have prefix vir* and there is no reason for it to be part of DRIVER_SOURCES because that is just a leftover from older days (pre-driver modules era, I believe). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 3月, 2017 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Introduce config file support for the bhyve driver. The only available setting at present is 'firmware_dir' for specifying a directory with UEFI firmware files.
-
- 12 3月, 2017 1 次提交
-
-
由 Fabian Freyer 提交于
Allow to boot using UEFI rather than using an external boot loader such as bhyveload or grub-bhyve. Also, make LPC PCI-ISA bridge handling more flexible as now it's needed not only for serial ports, but for bootrom as well. Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
-
- 31 1月, 2017 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Add virBhyveDriverCreateXMLConf, a simple wrapper around virDomainXMLOptionNew that makes it easier to pass bhyveConnPtr as a private data for parser. It will be used later for device address allocation at parsing time. Update consumers to use it instead of direct calls to virDomainXMLOptionNew. As we now have proper callbacks connected for the tests, update test files accordingly to include the automatically generated PCI root controller.
-
- 09 1月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
When changing the metadata via virDomainSetMetadata, we now emit an event to notify the app of changes. This is useful when co-ordinating different applications read/write of custom metadata. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 11月, 2016 1 次提交
-
-
由 Sławek Kapłoński 提交于
New line character in name of domain is now forbidden because it mess virsh output and can be confusing for users. Validation of name is done in drivers, after parsing XML to avoid problems with dissappeared domains which was already created with new-line char in name. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 10月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Change the virDomainChrDef to use a pointer to 'source' and allocate that pointer during virDomainChrDefNew. This has tremendous "fallout" in the rest of the code which mainly has to change source.$field to source->$field. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 12 10月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
This way we get reference counting and we can get rid of locking function. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 29 9月, 2016 1 次提交
-
-
由 Roman Bogorodskiy 提交于
In commit 7f127ded cpuCompareXML was renamed to virCPUCompareXML, so change the bhyve driver to use the new function and thus fix the build.
-
- 26 9月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
We want to pass the proper opaque pointer instead of NULL to virDomainDefParse and subsequently virDomainDefParseNode too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 7月, 2016 2 次提交
-
-
由 Fabian Freyer 提交于
-
由 Fabian Freyer 提交于
First, remove escaped newlines and split up the string into an argv-list for the bhyve and loader commands, respectively. This is done by iterating over the string splitting it by newlines, and then re-iterating over each line, splitting it by spaces. Since this code reuses part of the code of qemu_parse_command.c (in bhyveCommandLine2argv), add the appropriate copyright notices. Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
-
- 07 7月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Few arguments of the function are not necessary any more which leads to some cleanups. The 'uri' argument had a stray ATTRIBUTE_UNUSED.
-
- 17 6月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
-
- 12 6月, 2016 1 次提交
-
-
由 Roman Bogorodskiy 提交于
-
- 10 6月, 2016 3 次提交
-
-
由 Daniel P. Berrange 提交于
In preparation for moving all the CPU related APIs out of the nodeinfo file, give them a virHostCPU name prefix. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In preparation for moving all the memory related APIs out of the nodeinfo file, give them a virHostMem name prefix. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Nearly all the methods in the nodeinfo file are given a 'const char *sysfs_prefix' parameter to override the default sysfs path (/sys/devices/system). Every single caller passes in NULL for this, except one use in the unit tests. Furthermore this parameter is totally Linux-specific, when the APIs are intended to be cross platform portable. This removes the sysfs_prefix parameter and instead gives a new method linuxNodeInfoSetSysFSSystemPath for use by the test suite. For two of the methods this hardcodes use of the constant SYSFS_SYSTEM_PATH, since the test suite does not need to override the path for thos methods. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 08 6月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virConnectOpenInternal method opens the libvirt client config file and uses it to resolve things like URI aliases. There may be driver specific things that are useful to store in the config file too, so rather than have them re-parse the same file, pass the virConfPtr down to the drivers. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 6月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Make it obvious that the flag is controlling RNG schema validation.
-
- 24 5月, 2016 1 次提交
-
-
由 Jovanka Gulicoska 提交于
Replace VIR_ERROR with virReportError
-
- 20 5月, 2016 1 次提交
-
-
由 Jovanka Gulicoska 提交于
Convert to virGetLastErrorMessage() in the rest of the code
-
- 18 5月, 2016 2 次提交
-
-
由 Fabian Freyer 提交于
Trivially return 1, since bhyve is considered a local connection that should not be vulnerable to eavesdropping.
-
由 Fabian Freyer 提交于
Being a local connection, bhyve does not support encryption. Therefore trivially return 0.
-
- 17 5月, 2016 1 次提交
-
-
由 Fabian Freyer 提交于
bhyve connections are local, and a "connection will be classed as alive if it is [...] local".
-
- 14 5月, 2016 1 次提交
-
-
由 Fabian Freyer 提交于
This implements virConnectGetType for the bhyve driver.
-
- 05 5月, 2016 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Bhyve supports ACPI shutdown by issuing SIGTERM signal to a bhyve process. Add the bhyveDomainShutdown() function and virBhyveProcessShutdown() helper function that just sends SIGTERM to VM's bhyve process. If a guest supports ACPI shutdown then process will be terminated and this event will be noticed by the bhyve monitor code that will handle setting proper status and clean up VM's resources by calling virBhyveProcessStop().
-
- 29 3月, 2016 2 次提交
-
-
由 Maxim Nestratov 提交于
-
由 Maxim Nestratov 提交于
-