- 21 12月, 2015 3 次提交
-
-
由 Andrea Bolognani 提交于
This replaces the virPCIKnownStubs string array that was used internally for stub driver validation. Advantages: * possible values are well-defined * typos in driver names will be detected at compile time * avoids having several copies of the same string around * no error checking required when setting / getting value The names used mirror those in the virDomainHostdevSubsysPCIBackendType enumeration.
-
由 Andrea Bolognani 提交于
The value is not inspected inside the function, so it makes more sense for the caller to change the device's setting explicitly.
-
由 Andrea Bolognani 提交于
This internal function supports, in theory, binding to a different stub driver than the one the PCI device has been configured to use. In practice, it is only ever called like virPCIDeviceBindToStub(dev, dev->stubDriver); which makes its second parameter redundant. Get rid of it, along with the extra string copy required to support it.
-
- 17 12月, 2015 2 次提交
-
-
由 Andrea Bolognani 提交于
This function can be used to retrieve the current locked memory limit for a process, so that the setting can be later restored. Add a configure check for getrlimit(), which we now use.
-
由 Andrea Bolognani 提交于
The prlimit() function allows both getting and setting limits for a process; expose the same functionality in our wrapper. Add the const modifier for new_limit, in accordance with the prototype for prlimit().
-
- 16 12月, 2015 1 次提交
-
-
由 Andrea Bolognani 提交于
Instead of replicating the information (domain, bus, slot, function) inside the virPCIDevice structure, use the already-existing virPCIDeviceAddress structure. For users of the module, this means that the object returned by virPCIDeviceGetAddress() can no longer be NULL and must no longer be freed by the caller.
-
- 15 12月, 2015 2 次提交
-
-
由 Andrea Bolognani 提交于
The name 'dev' is more appropriate for virPCIDevicePtr.
-
由 Henning Schild 提交于
virCgroupNewMachine used to add the pidleader to the newly created machine cgroup. Do not do this implicit anymore. Signed-off-by: NHenning Schild <henning.schild@siemens.com>
-
- 14 12月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Firstly, there's a bug (or typo) in the only place where we call this function: @multiqueue is set whenever @tapfdSize is greater than zero, while in fact the condition should have been 'greater than one'. Then, secondly, since the condition depends on just one variable, that we are even passing down to the function, we can move the condition into the function and drop useless argument. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 12月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Some older systems, e.g. RHEL-6 do not have IFF_MULTI_QUEUE flag which we use to enable multiqueue feature. Therefore one gets the following compile error there: CC util/libvirt_util_la-virnetdevmacvlan.lo util/virnetdevmacvlan.c: In function 'virNetDevMacVLanTapSetup': util/virnetdevmacvlan.c:338: error: 'IFF_MULTI_QUEUE' undeclared (first use in this function) util/virnetdevmacvlan.c:338: error: (Each undeclared identifier is reported only once util/virnetdevmacvlan.c:338: error: for each function it appears in.) make[3]: *** [util/libvirt_util_la-virnetdevmacvlan.lo] Error 1 So, whenever user wants us to enable the feature on such systems, we will just throw a runtime error instead. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 12月, 2015 9 次提交
-
-
由 John Ferlan 提交于
Commit id '56e2171c' removed a variable from the argument list, but neglected to update the ATTRIBUTE_NONNULL values, so when commit id '08da97bf' added a couple of arguments, the values were off.
-
由 Peter Krempa 提交于
Always return LLONG_MAX even on 32 bit systems. The limitation originates from our use of "unsigned long" in several APIs. The internal data type is unsigned long long. Make the test suite deterministic by removing the architecture difference. Flaw was introduced in 64588113 where I've added a test that uses too large numbers.
-
由 Michal Privoznik 提交于
For the multiqueue on macvtaps we are going to need to open the device multiple times. Currently, this is not supported. Rework the function, so that upper layers can be reworked too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Like we are doing for TUN/TAP devices, we should do the same for macvtaps. Although, it's not as critical as in that case, we should do it for the consistency. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
For the multiqueue on macvtaps we are going to need to open the device multiple times. Currently, this is not supported. Rework the function, so that upper layers can be reworked too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
For the multiqueue on macvtaps we are going to need to open the device multiple times. Currently, this is not supported. Rework the function, so that upper layers can be reworked too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There are few outdated things. Firstly, we don't need to undergo the torture of fopen, fscanf and fclose just to get the interface index when we have nice wrapper over that: virNetDevGetIndex. Secondly, we don't need to have statically allocated buffer for the path we are opening. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
So yet again one of integer arguments that we use as a boolean. Since the argument count of the function is unbearably long enough, lets turn those booleans into flags. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrange 提交于
On the very first log message we send to any output, we include the libvirt version number and package string. In some bug reports we have been given libvirtd.log files that came from a different host than the corresponding /var/log/libvirt/qemu log files. So extend the initial log message to include the hostname too. eg on first log message we would now see: $ libvirtd 2015-12-04 17:35:36.610+0000: 20917: info : libvirt version: 1.3.0 2015-12-04 17:35:36.610+0000: 20917: info : hostname: dhcp-1-180.lcy.redhat.com 2015-12-04 17:35:36.610+0000: 20917: error : qemuMonitorIO:687 : internal error: End of file from monitor Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 12月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
The log file descriptor associated with the virRotatingFile struct should be marked close-on-exec, as even when virtlogd re-exec's itself it expect to open the log file fresh. It does not need to preserve the logfile handles, only the network client FDs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 12月, 2015 1 次提交
-
-
由 Ian Campbell 提交于
Commit 0f7436ca "network: wait for DAD to finish for bridge IPv6 addresses" results in: CC util/libvirt_util_la-virnetdevmacvlan.lo util/virnetdev.c: In function 'virNetDevParseDadStatus': util/virnetdev.c:1319:188: error: cast increases required alignment of target type [-Werror=cast-align] util/virnetdev.c:1332:41: error: cast increases required alignment of target type [-Werror=cast-align] util/virnetdev.c:1334:92: error: cast increases required alignment of target type [-Werror=cast-align] cc1: all warnings being treated as errors on at least ARM platforms. The three macros involved (NLMSG_NEXT, IFA_RTA and RTA_NEXT) all appear to correctly take care of alignment, therefore suppress Wcast-align around their uses. Signed-off-by: NIan Campbell <ian.campbell@citrix.com> Cc: Maxim Perevedentsev <mperevedentsev@virtuozzo.com> Cc: Laine Stump <laine@laine.org> Cc: Dario Faggioli <dario.faggioli@citrix.com> Cc: Jim Fehlig <jfehlig@suse.com>
-
- 30 11月, 2015 5 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
Our domain_conf.* files are big enough. Not only they contain XML parsing code, but they served as a storage of all functions whose name is virDomain prefixed. This is just wrong as it gathers not related functions (and modules) into one big file which is then harder to maintain. Split virDomainObjList module into a separate file called virdomainobjlist.[ch]. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Pavel Hrdina 提交于
If for some reason there is an existing log file, that is larger then max length of log file, we need to rollover that file immediately. Trying to figure out how much data we could write will resolve in overflow of unsigned variable 'towrite' and this leads to segfault. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Erik Skultety 提交于
As we need to provide support for URI aliases in libvirt-admin as well, URI alias matching needs to be internally visible. Since virConnectOpenResolveURIAlias does have a compatible signature, it could be easily reused by libvirt-admin. This patch moves URI alias matching to util, renaming it accordingly.
-
由 Erik Skultety 提交于
virConnectGetConfig and virConnectGetConfigPath were static libvirt methods, merely because there hasn't been any need for having them internally exported yet. Since libvirt-admin also needs to reference its config file, 'xGetConfig' should be exported. Besides moving, this patch also renames the methods accordingly, as they are libvirt config specific.
-
- 27 11月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Machine name escaping follows the same rules as serice name escape, except that '.' and '-' must not be escaped in machine names, due to a bug in systemd-machined. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 26 11月, 2015 3 次提交
-
-
由 Daniel P. Berrange 提交于
Copy the virtlockd codebase across to form the initial virlogd code. Simple search & replace of s/lock/log/ and gut the remote protocol & dispatcher. This gives us a daemon that starts up and listens for connections, but does nothing with them. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add virRotatingFileReader and virRotatingFileWriter objects which allow reading & writing from/to files with automation rotation to N backup files when a size limit is reached. This is useful for guest logging when a guaranteed finite size limit is required. Use of external tools like logrotate is inadequate since it leaves the possibility for guest to DOS the host in between invokations of logrotate. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Martin Kletzander 提交于
According to the documentation, CreateMachine accepts only 7bit ASCII characters in the machinename parameter, so let's make sure we can start machines with unicode names with systemd. We already have a function for that, we just forgot to use it. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1062943 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 25 11月, 2015 1 次提交
-
-
由 Laine Stump 提交于
A PCI device may have the capability to setup virtual functions (VFs) but have them currently all disabled. Prior to this patch, if that was the case the the node device XML for the device wouldn't report any virtual_functions capability. With this patch, if a file called "sriov_totalvfs" is found in the device's sysfs directory, its contents will be interpreted as a decimal number, and that value will be reported as "maxCount" in a capability element of the device's XML, e.g.: <capability type='virtual_functions' maxCount='7'/> This will be reported regardless of whether or not any VFs are currently enabled for the device. NB: sriov_numvfs (the number of VFs currently active) is also available in sysfs, but that value is implied by the number of items in the list that is inside the capability element, so there is no reason to explicitly provide it as an attribute. sriov_totalvfs and sriov_numvfs are available in kernels at least as far back as the 2.6.32 that is in RHEL6.7, but in the case that they simply aren't there, libvirt will behave as it did prior to this patch - no maxCount will be displayed, and the virtual_functions capability will be absent from the device's XML when 0 VFs are enabled.
-
- 24 11月, 2015 1 次提交
-
-
由 Christian Loehle 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 20 11月, 2015 1 次提交
-
-
由 Andrea Bolognani 提交于
This can be useful for debugging.
-
- 19 11月, 2015 1 次提交
-
-
由 Joao Martins 提交于
Introduce a new helper function "virDiskNameParse" which extends virDiskNameToIndex but handling both disk index and partition index. Also rework virDiskNameToIndex to be based on virDiskNameParse. A test is also added for this function testing both valid and invalid disk names. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 18 11月, 2015 2 次提交
-
-
由 Richard Weinberger 提交于
The LXC driver uses virSetUIDGID() to become UID/GID 0. It passes an empty groups list to virSetUIDGID() to get rid of all supplementary groups from the host side. But virSetUIDGID() calls setgroups() only if the supplied list is larger than 0. This leads to a container root with unrelated supplementary groups. In most cases this issue is unoticed as libvirtd runs as UID/GID 0 without any supplementary groups. Signed-off-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Stefan Berger 提交于
This patch addresses BZ 1244895. Adapt the sysfs TPM command cancel path for the TPM driver that does not use a miscdevice anymore since Linux 4.0. Support old and new paths and check their availability. Add a mockup for the test cases to avoid the testing for availability of the cancel path. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 16 11月, 2015 1 次提交
-
-
由 Chen Hanxiao 提交于
Use toadd->use directly. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
-
- 07 11月, 2015 2 次提交
-
-
由 John Ferlan 提交于
Use virNetDevSetupControl instead of open coding using socket(AF_LOCAL...) and clearing virIfreq. By using virNetDevSetupControl, the socket is then opened using AF_PACKET which requires being privileged (effectively root) in order to complete successfully. Since that's now a requirement, then the ioctl(SIOCETHTOOL) should not fail with EPERM, thus it is removed from the filtered listed of failure codes. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Since the SIOCETHTOOL ioctl only works for privileged daemons, if called when not root, then virNetDevGetFeatures will VIR_DEBUG a message and return 0 as if the functions were not available for the architecture. This effectively returns an empty bitmap indicating no features available. Introduced by commit id 'c9027d8f' Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 11月, 2015 1 次提交
-
-
由 John Ferlan 提交于
In commit id 'c9027d8f' when updating the posted patch to generate a bitmap instead of an array of named feature bits, adjustment of the args was missed
-