- 26 9月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
Some callers might want to pass yet another pointer to opaque data to post parse callbacks. The driver generic one is not enough because two threads executing post parse callback might want to see different data (e.g. domain object pointer that domain def belongs to). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 7月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Allow to store driver specific data on a per-vcpu basis. Move of the virDomainDef*Vcpus* functions was necessary as virDomainXMLOptionPtr was declared below this block and I didn't want to split the function headers.
-
- 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.
-
- 02 5月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
Trying to define a domain name containing an embedded '/' will immediately fail when trying to write the XML to disk for our stateful drivers. This patch explicitly rejects names containing a '/', and provides an xmlopt feature for drivers to avoid this validation check, which is enabled in every non-stateful driver that already has xmlopt handling wired up. (Technically this could reject a previously accepted vmname like '/foo', however at least for the qemu driver that falls over later when starting qemu) https://bugzilla.redhat.com/show_bug.cgi?id=639923
-
- 09 3月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Introduce a helper to check supported device and domain config and move the memory hotplug checks to it. The advantage of this approach is that by default all new features are considered unsupported by all hypervisors unless specifically changed rather than the previous approach where every hypervisor would need to declare that a given feature is unsupported.
-
- 04 2月, 2016 2 次提交
-
-
由 Peter Krempa 提交于
Few build breaking mistakes in less-popular parts of our code.
-
由 Joao Martins 提交于
And use the newly added caps->host.netprefix (if it exists) for interface names that match the autogenerated target names. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 27 1月, 2016 1 次提交
-
-
由 Pavel Hrdina 提交于
The current code was a little bit odd. At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. This seems to me as a lot of code for nothing. This patch may look to be more complicated than original approach, but this is a preferred way to modify/add driver specific stuff only in those drivers and not deal with them in common parsing/formating functions. The update is to add those implicit input devices into config XML to follow the real HW configuration visible by guest OS. There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices for x86 architecture and they are available always, even without graphics device. This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 11 1月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
This way both Domain and Device PostParse functions can act based on the flags. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 09 12月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
To support further refactors replace all write access to def->maxvcpus with a accessor function.
-
- 24 11月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
To simplify further refactors change the way the vcpu count is extracted to use a temp variable rather than juggling with def->maxvcpus.
-
- 22 9月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
The name of the variable was misleading. Rename it and it's setting accessor before other fixes.
-
- 21 4月, 2015 4 次提交
-
-
由 Cole Robinson 提交于
This needs to specified in way too many places for a simple validation check. The ostype/arch/virttype validation checks later in DomainDefParseXML should catch most of the cases that this was covering.
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
Rather than an opencoded string. This should be a no-op
-
- 23 3月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
This patch adds code that parses and formats configuration for memory devices. A simple configuration would be: <memory model='dimm'> <target> <size unit='KiB'>524287</size> <node>0</node> </target> </memory> A complete configuration of a memory device: <memory model='dimm'> <source> <pagesize unit='KiB'>4096</pagesize> <nodemask>1-3</nodemask> </source> <target> <size unit='KiB'>524287</size> <node>1</node> </target> </memory> This patch preemptively forbids use of the <memory> device in individual drivers so the users are warned right away that the device is not supported.
-
由 Peter Krempa 提交于
Add a XML element that will allow to specify maximum supportable memory and the count of memory slots to use with memory hotplug. To avoid possible confusion and misuse of the new element this patch also explicitly forbids the use of the maxMemory setting in individual drivers's post parse callbacks. This limitation will be lifted when the support is implemented.
-
- 16 3月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
As there are two possible approaches to define a domain's memory size - one used with legacy, non-NUMA VMs configured in the <memory> element and per-node based approach on NUMA machines - the user needs to make sure that both are specified correctly in the NUMA case. To avoid this burden on the user I'd like to replace the NUMA case with automatic totaling of the memory size. To achieve this I need to replace direct access to the virDomainMemtune's 'max_balloon' field with two separate getters depending on the desired size. The two sizes are needed as: 1) Startup memory size doesn't include memory modules in some hypervisors. 2) After startup these count as the usable memory size. Note that the comments for the functions are future aware and document state that will be present after a few later patches.
-
- 12 3月, 2015 3 次提交
-
-
由 John Ferlan 提交于
Coverity notes in xenapiDomainGetXMLDesc that 'vms' is dereferenced a few times before a "if (vms) xen_vm_set_free(vms);" call is made. Since we'd exit out much sooner if the fetch of the vms failed, just remove the unnecessary "if (vms)" check.
-
由 John Ferlan 提交于
Coverity points out that the return from virDomainDefParseString is not checked in xenapiDomainCreateXML like it should be which could end up in a NULL pointer dereference
-
由 John Ferlan 提交于
Since inception. Coverity complains that the code checks "(record == NULL && !session->ok)", but doesn't check (record != NULL) before dereferencing at "record->is_a_template"
-
- 06 2月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
Return 0 instead of ERR_NO_SUPPORT in each driver where we don't support managed save or -1 if the domain does not exist. This avoids spamming daemon logs when 'virsh dominfo' is run. https://bugzilla.redhat.com/show_bug.cgi?id=1095637
-
- 27 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
For stateless, client side drivers, it is never correct to probe for secondary drivers. It is only ever appropriate to use the secondary driver that is associated with the hypervisor in question. As a result the ESX & HyperV drivers have both been forced to do hacks where they register no-op drivers for the ones they don't implement. For stateful, server side drivers, we always just want to use the same built-in shared driver. The exception is virtualbox which is really a stateless driver and so wants to use its own server side secondary drivers. To deal with this virtualbox has to be built as 3 separate loadable modules to allow registration to work in the right order. This can all be simplified by introducing a new struct recording the precise set of secondary drivers each hypervisor driver wants struct _virConnectDriver { virHypervisorDriverPtr hypervisorDriver; virInterfaceDriverPtr interfaceDriver; virNetworkDriverPtr networkDriver; virNodeDeviceDriverPtr nodeDeviceDriver; virNWFilterDriverPtr nwfilterDriver; virSecretDriverPtr secretDriver; virStorageDriverPtr storageDriver; }; Instead of registering the hypervisor driver, we now just register a virConnectDriver instead. This allows us to remove all probing of secondary drivers. Once we have chosen the primary driver, we immediately know the correct secondary drivers to use. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 1月, 2015 1 次提交
-
-
由 Pavel Hrdina 提交于
Clang found that we are passing variable with wrong enum type to 'xenapiCrashExitEnum2virDomainLifecycle' function. This is probably copy-paste typo as the correct variable exists in the code, but it isn't used. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 16 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainDefineXMLFlags and virDomainCreateXML APIs both gain new flags allowing them to be told to validate XML. This updates all the drivers to turn on validation in the XML parser when the flags are set
-
- 14 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainDefParse* and virDomainDefFormat* methods both accept the VIR_DOMAIN_XML_* flags defined in the public API, along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags defined in domain_conf.c. This is seriously confusing & error prone for a number of reasons: - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the formatting operation - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply to parse or to format, but not both. This patch cleanly separates out the flags. There are two distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_* flags that are used by the corresponding methods. The VIR_DOMAIN_XML_* flags received via public API calls must be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where needed. The various calls to virDomainDefParse which hardcoded the use of the VIR_DOMAIN_XML_INACTIVE flag change to use the VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
-
- 13 1月, 2015 2 次提交
-
-
由 Daniel P. Berrange 提交于
The XenAPI driver was passing the flags for virDomainCreateXML straight into the virDomainDefParseString method, even though they expect totally different sets of flags. It should have been using VIR_DOMAIN_XML_INACTIVE
-
由 Daniel P. Berrange 提交于
Make sure every virt driver implements virDomainDefineXMLFlags by adding a trivial passthrough from the existing impl with no flags set.
-
- 15 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 23 10月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
To prepare for introducing a single global driver, rename the virDriver struct to virHypervisorDriver and the registration API to virRegisterHypervisorDriver()
-
- 15 10月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
To allow easy implementation of a callback check this patch adds empty post parse callbacks to drivers that were missing them.
-
- 10 9月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
Up to now, users can configure BIOS via the <loader/> element. With the upcoming implementation of UEFI this is not enough as BIOS and UEFI are conceptually different. For instance, while BIOS is ROM, UEFI is programmable flash (although all writes to code section are denied). Therefore we need new attribute @type which will differentiate the two. Then, new attribute @readonly is introduced to reflect the fact that some images are RO. Moreover, the OVMF (which is going to be used mostly), works in two modes: 1) Code and UEFI variable store is mixed in one file. 2) Code and UEFI variable store is separated in two files The latter has advantage of updating the UEFI code without losing the configuration. However, in order to represent the latter case we need yet another XML element: <nvram/>. Currently, it has no additional attributes, it's just a bare element containing path to the variable store file. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 04 9月, 2014 1 次提交
-
-
由 Eric Blake 提交于
I'm about to add a syntax check that enforces our documented HACKING style of always using matching {} on if-else statements. This patch focuses on code related to xen. * src/libxl/libxl_conf.c (libxlCapsInitGuests) (libxlMakeDomBuildInfo): Correct use of {}. * src/xen/xen_hypervisor.c (virXen_getvcpusinfo) (xenHypervisorMakeCapabilitiesInternal): Likewise. * src/xen/xend_internal.c (xenDaemonOpen) (xenDaemonDomainMigratePerform, xend_detect_config_version) (xenDaemonDetachDeviceFlags, xenDaemonDomainMigratePerform) (xenDaemonDomainBlockPeek): Likewise. * src/xenapi/xenapi_driver.c (xenapiConnectListDomains) (xenapiDomainLookupByUUID, xenapiDomainGetOSType): Likewise. * src/xenconfig/xen_common.c (xenParseCPUFeatures, xenFormatNet): Likewise. * src/xenconfig/xen_sxpr.c (xenParseSxpr, xenFormatSxprNet) (xenFormatSxpr): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 13 8月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Laine Stump noted on IRC that syntax check wasn't flagging his typo of 'i= 0'. This fixes it. * build-aux/bracket-spacing.pl: Tighten 'space around =' rule. * src/storage/storage_backend.c (virStorageBackendCreateExecCommand): Fix offenders. * src/util/virnuma.c (virNumaGetDistances): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainSnapshotDeleteMetadataOnly) (vboxNetworkGetXMLDesc): Likewise. * src/xenapi/xenapi_driver.c (xenapiDomainLookupByName): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 23 7月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
For the values "default", "on", "off" Replaces virDeviceAddressPCIMulti virDomainFeatureState virDomainIoEventFd virDomainVirtioEventIdx virDomainDiskCopyOnRead virDomainMemDump virDomainPCIRombarMode virDomainGraphicsSpicePlaybackCompression
-
- 14 7月, 2014 1 次提交
-
-
由 Eric Blake 提交于
While preparing to add a capability for active commit, I noticed that the existing code was abusing int for boolean values. * src/conf/capabilities.h (_virCapsGuestFeature, _virCapsHost) (virCapabilitiesNew, virCapabilitiesAddGuestFeature): Improve types. * src/conf/capabilities.c (virCapabilitiesNew) (virCapabilitiesAddGuestFeature): Adjust signature. * src/bhyve/bhyve_capabilities.c (virBhyveCapsBuild): Update clients. * src/esx/esx_driver.c (esxCapsInit): Likewise. * src/libxl/libxl_conf.c (libxlMakeCapabilities): Likewise. * src/lxc/lxc_conf.c (virLXCDriverCapsInit): Likewise. * src/openvz/openvz_conf.c (openvzCapsInit): Likewise. * src/parallels/parallels_driver.c (parallelsBuildCapabilities): Likewise. * src/phyp/phyp_driver.c (phypCapsInit): Likewise. * src/qemu/qemu_capabilities.c (virQEMUCapsInit) (virQEMUCapsInitGuestFromBinary): Likewise. * src/security/virt-aa-helper.c (get_definition): Likewise. * src/test/test_driver.c (testBuildCapabilities): Likewise. * src/uml/uml_conf.c (umlCapsInit): Likewise. * src/vbox/vbox_tmpl.c (vboxCapsInit): Likewise. * src/vmware/vmware_conf.c (vmwareCapsInit): Likewise. * src/xen/xen_hypervisor.c (xenHypervisorBuildCapabilities): Likewise. * src/xenapi/xenapi_driver.c (getCapsObject): Likewise. * tests/qemucaps2xmltest.c (testGetCaps): Likewise. * tests/testutils.c (virTestGenericCapsInit): Likewise. * tests/testutilslxc.c (testLXCCapsInit): Likewise. * tests/testutilsqemu.c (testQemuCapsInit): Likewise. * tests/testutilsxen.c (testXenCapsInit): Likewise. * tests/vircaps2xmltest.c (buildVirCapabilities): Likewise. * tests/vircapstest.c (buildNUMATopology): Likewise. * tests/vmx2xmltest.c (testCapsInit): Likewise. * tests/xml2vmxtest.c (testCapsInit): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 03 7月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
In the lastest rework (9e7ecabf) a cleanup label was left over which results in compilation error. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-