- 19 2月, 2018 4 次提交
-
-
由 Daniel P. Berrangé 提交于
Rather than expecting callers to pass a virConnectPtr into the virDomainDiskTranslateSourcePool() method, just acquire a connection to the storage driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
There is a long standing hack to pass a virConnectPtr into the qemuMonitorStartCPUs method, so that when the text monitor prompts for a disk password, we can lookup virSecretPtr objects. This causes us to have to pass a virConnectPtr around through countless methods up the call chain....except some places don't have any virConnectPtr available so have always just passed NULL. We can finally fix this disastrous design by using virGetConnectSecret() to open a connection to the secret driver at time of use. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Now that we have the ability to easily open connections to secondary drivers, eg network:///system, it is possible to reimplement the virDomainNetResolveActualType method in terms of the public API. This avoids the need to have the network driver provide a callback for it. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
When the test suite is running, we don't want to be triggering the startup of daemons for the secondary drivers. Thus we must provide a way to set a custom connection for the secondary drivers, to override the default logic which opens a new connection. This will also be useful for code where we have a whole set of separate functions calls all needing the secret driver. Currently the connection to the secret driver is opened & closed many times in quick succession. This will allow us to pre-open a connection temporarily, improving the performance of startup. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 17 2月, 2018 2 次提交
-
-
由 Zhuang Yanying 提交于
This wires up the previously added Chassis strings XML schema to be able to generate comamnd line args for QEMU. This requires QEMU >= 2.1 release containing this patch: SMBIOS: Build aggregate smbios tables and entry point https://git.qemu.org/?p=qemu.git;a=commit;h=c97294ec1b9e36887e119589d456557d72ab37b5Signed-off-by: NZhuang Yanying <ann.zhuangyanying@huawei.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Zhuang Yanying 提交于
This type of information defines attributes of a system chassis, such as SMBIOS Chassis Asset Tag. access inside VM (for example) Linux: /sys/class/dmi/id/chassis_asset_tag. Windows: (Get-WmiObject Win32_SystemEnclosure).SMBIOSAssetTag wirhin Windows PowerShell. As an example, add the following to the guest XML <chassis> <entry name='manufacturer'>Dell Inc.</entry> <entry name='version'>2.12</entry> <entry name='serial'>65X0XF2</entry> <entry name='asset'>40000101</entry> <entry name='sku'>Type3Sku1</entry> </chassis> Signed-off-by: NZhuang Yanying <ann.zhuangyanying@huawei.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 14 2月, 2018 4 次提交
-
-
由 Peter Krempa 提交于
We can't really detect all the authentication data in a sane manner for disk backing chains. Since the old RBD parser parses it in some cases as the argv->XML convertor requires it, we can't just drop it. Instead clear any detected authentication data in the code paths related to disk backing chain lookup and fix the tests to cope with the change. https://bugzilla.redhat.com/show_bug.cgi?id=1544659Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The documentation for the JSON/qapi type 'UnixSocketAddress' states that the unix socket path field is named 'path'. Unfortunately qemu uses 'socket' in case of the gluster driver (despite documented otherwise). Add logic which will format the correct fields while keeping support of the old spelling. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1544325Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1515533 We're already checking if IPv4 prefix isn't too long. But we are not checking if it isn't too short. QEMU supports prefixes longer than 4 (including). I haven't find anything similar related to IPv6 in qemu sources. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
The array indexes are formatted if the JSON->commandline translator is translating an array type. It does not at all depend on this function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 13 2月, 2018 10 次提交
-
-
由 Andrea Bolognani 提交于
Instead of storing separately whether the feature is enabled or not and what resizing policy should be used, store both of them in a single place. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Instead of storing separately whether the feature is enabled or not and what driver should be used, store both of them in a single place. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
When no GIC version is specified, we currently default to GIC v2; however, that's not a great default, since guests will fail to start if the hardware only supports GIC v3. Change the behavior so that a sensible default is chosen instead. That basically means using the same algorithm whether the user didn't explicitly enable the GIC feature or they explicitly enabled it but didn't specify any GIC version. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
There are a few stray checks which still live outside of the switch in virDomainDefFeaturesCheckABIStability() for no good reason. Move them inside the switch, and update the error messages to be consistent while at it. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Unlike most other features, VIR_DOMAIN_FEATURE_CAPABILITIES is of type virDomainCapabilitiesPolicy instead of virTristateSwitch, so we need to handle it separately for the error message to make sense. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
The compiler can make sure we are handling all features. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Keep them along with other arch/machine type checks for features instead of waiting until command line generation time. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
The compiler can make sure we are handling all features. While reworking the logic, also change error messages to a more consistent style. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
We want to perform all feature verification in a single spot, but some of it (eg. GIC) is currently being performed at command line generation time, and moving it to PostParse() would cause guests to disappear. Moving verification to Validate() allows us to side-step the issue. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Add braces around the multi-line body as well, in compliance with our coding style. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 12 2月, 2018 5 次提交
-
-
由 Daniel P. Berrangé 提交于
This reverts commit 038eb472. On reflection adding defaults for arbitrary guest XML device config settings to the qemu.conf is not a sustainable path. Removing the support for rx/tx queue size so that it doesn't set a bad precedent. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
Commit 'f0f2a5ec' neglected to adjust the if condition to split out the possibility that the @watchdog is NULL when altering the message to add detail about the model. Just split out the condition and use previous/original message, but with the new message code. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel P. Berrangé 提交于
The fix for CVE-2018-6764 introduced a potential deadlock scenario that gets triggered by the NSS module when virGetHostname() calls getaddrinfo to resolve the hostname: #0 0x00007f6e714b57e7 in futex_wait #1 futex_wait_simple #2 __pthread_once_slow #3 0x00007f6e71d16e7d in virOnce #4 0x00007f6e71d0997c in virLogInitialize #5 0x00007f6e71d0a09a in virLogVMessage #6 0x00007f6e71d09ffd in virLogMessage #7 0x00007f6e71d0db22 in virObjectNew #8 0x00007f6e71d0dbf1 in virObjectLockableNew #9 0x00007f6e71d0d3e5 in virMacMapNew #10 0x00007f6e71cdc50a in findLease #11 0x00007f6e71cdcc56 in _nss_libvirt_gethostbyname4_r #12 0x00007f6e724631fc in gaih_inet #13 0x00007f6e72464697 in __GI_getaddrinfo #14 0x00007f6e71d19e81 in virGetHostnameImpl #15 0x00007f6e71d1a057 in virGetHostnameQuiet #16 0x00007f6e71d09936 in virLogOnceInit #17 0x00007f6e71d09952 in virLogOnce #18 0x00007f6e714b5829 in __pthread_once_slow #19 0x00007f6e71d16e7d in virOnce #20 0x00007f6e71d0997c in virLogInitialize #21 0x00007f6e71d0a09a in virLogVMessage #22 0x00007f6e71d09ffd in virLogMessage #23 0x00007f6e71d0db22 in virObjectNew #24 0x00007f6e71d0dbf1 in virObjectLockableNew #25 0x00007f6e71d0d3e5 in virMacMapNew #26 0x00007f6e71cdc50a in findLease #27 0x00007f6e71cdc839 in _nss_libvirt_gethostbyname3_r #28 0x00007f6e71cdc724 in _nss_libvirt_gethostbyname2_r #29 0x00007f6e7248f72f in __gethostbyname2_r #30 0x00007f6e7248f494 in gethostbyname2 #31 0x000056348c30c36d in hosts_keys #32 0x000056348c30b7d2 in main Fortunately the extra stuff virGetHostname does is totally irrelevant to the needs of the logging code, so we can just inline a call to the native hostname() syscall directly. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
The floppy command formatting is special-cased since it does not directly translate to a single '-device' argument. Move the code from qemuBuildDiskDriveCommandLine to a new helper function so that all the related code is together. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Chen Hanxiao 提交于
We forgot to free alloced mem when failed to dup ifname or macaddr. Also use VIR_STEAL_PTR to simplify codes. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 2月, 2018 4 次提交
-
-
由 Chen Hanxiao 提交于
Some of function comments don't have the right named parameters and others are not consistent with the description alignment. This patch fixes this. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
-
由 Andrea Bolognani 提交于
Several PCI controllers have the same options, and thus can be handled together. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
This is a hard error, and should be handled as such. Introduced in 24614760. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 09 2月, 2018 11 次提交
-
-
由 Daniel P. Berrangé 提交于
The Win32 symbol export file format can't do wildcards, so none of the 'xdr_*' symbols are exported from the libvirt DLL. This doesn't matter generally since the RPC client is built into the DLL and we don't build libvirtd on Win32. The virnetmessagetest, however, does require xdr_virNetMessageError to be exported, so just do a hack for that. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
Commit id 'ce7ae55e' added support for the lockd admin socket, but forgot to add the socket to the make and spec files for installation purposes. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 John Ferlan 提交于
Commit id '85d45ff0' added support for the logd admin socket, but forgot to add the socket to the make and spec files for installation purposes. NB: Includes breaking up the long %systemd_ lists across multiple lines for ease of reading Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Loadable drivers must never depend on each other. Over time some usage mistakenly crept in for the storage and network drivers, but now this is eliminated the syntax-check rules can enforce this separation once more. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Undefined symbols are a bad thing in general because they can get resolved in unexpected ways at runtime if multiple sources provide the same symbol name. For example both glibc and libtirpc may provide XDR symbols and we want to ensure that we resolve to libtirpc if that's what we originally built against. The toolchain maintainers thus strongly recommend that all applications use the '-z defs' linker flag to prevent undefined symbols. This is shortly becoming part of the default linker flags for RPMs. As an added benefit this aligns Linux builds with Windows builds, where the linker has never permitted undefined symbols. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Dynamic loadable modules all need a common set of linker flags -module -avoid-version $(AM_LDFLAGS) Bundle those up into a $(AM_LDFLAGS_MOD) to avoid repetition. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The dlopened modules we currently build all use various symbols from libvirt.so, but don't actually link to it. They rely on the libvirtd daemon re-exporting the libvirt.so symbols. This means that at the time the modules are linked, they contain a huge number of undefined symbols. It also means that these undefined symbols are not versioned, so despite us providing a LIBVIRT_PRIVATE_XXXX version that intentionally changes on every release, the loadable modules could actually be loaded into any libvirtd regardless of version. This change explicitly links all modules against libvirt.so so that they don't rely on the re-export behave and can be fully resolved at build time. This will give us a stronger guarantee modules will actually be loadable at runtime and that we're using modules from the matched build. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The storagePoolLookupByTargetPath() method in the storage driver is used by the QEMU driver during block migration. If there's a valid use case for this in the QEMU driver, then external apps likely have similar needs. Exposing it in the public API removes the direct dependancy from the QEMU driver to the storage driver. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The virStorageTranslateDiskSourcePool method modifies a virDomainDiskDef to resolve any storage pool reference. For some reason this was added into the storage driver code, despite working entirely in terms of the public APIs. Move it into the domain conf file and rename it to match the object it modifies. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The networkDnsmasqConfContents() method is only used by the test suite and that's only built with WITH_NETWORK is set. So there is no longer any reason to conditionalize the declaration of this method. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Currently the QEMU driver will call directly into the network driver impl to modify resolve the atual type of NICs with type=network. It has todo this before it has allocated the actual NIC. This introduces a callback system to allow us to decouple the QEMU driver from the network driver. This is a short term step, as it ought to be possible to achieve the same end goal by simply querying XML via the public network API. The QEMU code in question though, has no virConnectPtr conveniently available at this time. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-