- 24 5月, 2013 7 次提交
-
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
This commit is separate due to unusual paradigm compared to the most source files.
-
由 Michal Privoznik 提交于
Within whole vircgroup.c we 'return -errno', e.g. 'return -ENOMEM'. However, in this specific function virCgroupAddTaskStrController we weren't returning -ENOMEM but -1 despite fact that later in the function we are returning one of errno values indeed.
-
由 John Ferlan 提交于
Commit '18b14012' refactored the Xen code resulting in a Coverity warning about possible NULL reference if the path where the XM driver takes puts the def on it's list. Moved/duplicated the virGetDomain() call to pacify the possible NULL deref.
-
由 Cole Robinson 提交于
Only /dev/random and /dev/hwrng are accepted, list them explicitly.
-
由 Ján Tomko 提交于
-
- 23 5月, 2013 20 次提交
-
-
由 Ján Tomko 提交于
Don't free the stream on error if we've successfully added it to the hash table, since it will be freed by virChrdevHashEntryFree callback. Preserve the error message before calling virStreamFree, since it resets the error. Introduced by 47161382, crashing since 69218922. Reported by Sergey Fionov on libvir-list.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
Previously, we were freeing verr fields instead of rerr which we've allocated just a line above.
-
由 Michal Privoznik 提交于
In bf1fe848 I've introduced 'newName' variable to substitute the old 'const char *name' as previously we had an ugly code there: name = strdup(name); However, some parts of the function were not updated, so they were still calling VIR_FREE(name) instead of VIR_FREE(newName).
-
由 Michal Privoznik 提交于
There is possibility to jump to 'cleanup' label without tapfd variable being initialized. In the label, VIR_FORCE_CLOSE(tapfd) is called which can have fatal consequences.
-
由 Marek Marczykowski 提交于
The same issue as (already fixed) in virDomainCreate - REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS doesn't return new domain ID, only -1 on error or 0 on success. Besides this one fix it is more general problem - local domain object ID can desynchronize with the real one, for example in case of another client creates/destroys domain in the meantime. Perhaps virDomainGetID should be called remotely (with all performance implications...)? Or some event-based notification used? Signed-off-by: NMarek Marczykowski <marmarek@invisiblethingslab.com>
-
由 Osier Yang 提交于
Commit 16251193 forgot to include "virstring.h". Pushed under build-breaker rule.
-
由 Martin Kletzander 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Zhang Xiaohe 提交于
Don't print 'OPTION' if there's no options. Just behaves as DESCRIPTION does. This mostly affects 'interface' command group. Signed-off-by: NZhang Xiaohe <zhangxh@cn.fujitsu.com> Reported-by: NLi Yang <liyang.fnst@cn.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Michal Privoznik 提交于
For future work we need _virDomainEventGraphicsAddress and _virDomainEventGraphicsSubjectIdentity members to be char * not const char *. We are strdup()-ing them anyway, so they should have been char * anyway (from const correctness POV). However, we don't want users to change passed values, so we need to make the callback's argument const. Although this is an API change (not ABI though), real callers won't be impacted. Why? 1. these callback members are read-only, so it is less likely that someone is trying to assign into the struct members. 2. The only way to register a virConnectDomainEventGraphicsCallback is to cast it through a call to virConnectDomainEventRegisterAny. That is, even if the user's callback function leaves out the const, we never use the typedef as the direct type of any API parameter. Since they are already casting their function pointer into a munged type before registering it, their code will continue to compile.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
In my previous patches I enabled the IFF_MULTI_QUEUE flag every time the user requested multiqueue TAP device. However, this works only at runtime. During build time the flag may be undeclared.
- 22 5月, 2013 13 次提交
-
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
In order to learn libvirt multiqueue several things must be done: 1) The '/dev/net/tun' device needs to be opened multiple times with IFF_MULTI_QUEUE flag passed to ioctl(fd, TUNSETIFF, &ifr); 2) Similarly, '/dev/vhost-net' must be opened as many times as in 1) in order to keep 1:1 ratio recommended by qemu and kernel folks. 3) The command line construction code needs to switch from 'fd=X' to 'fds=X:Y:...:Z' and from 'vhostfd=X' to 'vhostfds=X:Y:...:Z'. 4) The monitor handling code needs to learn to pass multiple FDs.
-
由 Michal Privoznik 提交于
Currently, we have one huge function to construct qemu command line. This is very ineffective esp. if there's a fault somewhere.
-
由 Michal Privoznik 提交于
This attribute is going to represent number of queues for multique vhost network interface. This commit implements XML extension part of the feature and add one test as well. For now, we can only do xml2xml test as qemu command line generation code is not adapted yet.
-
由 Guannan Ren 提交于
example: qemu ${otherargs} \ -vnc 127.0.0.1:0,share=allow-exclusive
-
由 Guannan Ren 提交于
-vnc :5900,share=allow-exclusive allows clients to ask for exclusive access which is implemented by dropping other connections Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch) -vnc :5900,share=force-shared disables exclusive client access. Useful for shared desktop sessions, where you don't want someone forgetting specify -shared disconnect everybody else. -vnc :5900,share=ignore completely ignores the shared flag and allows everybody connect unconditionally
-
由 Guannan Ren 提交于
QEMU_CAPS_VNC_SHARE_POLICY (qemu >= 1.1)
-
由 Osier Yang 提交于
Only a few cases are allowed: 1) The expression is empty for "for" loop, E.g. for (i = 0; ; i++) 2) An empty statement while (write(statuswrite, &status, 1) == -1 && errno == EINTR) ; /* empty */ 3) ";" is inside double-quote, I.e, as part of const string. E.g. vshPrint(ctl, "a ; b ; cd;\n"); The "for" loop in src/rpc/virnettlscontext.c is the special case, 1) applies for it, so change it together in this patch.
-
由 Osier Yang 提交于
The more common habit is to add the comment after the statements.
-
由 Osier Yang 提交于
Introduced by commit 7ac2c4fe, pushed under build-breaker rule.
-
由 Guannan Ren 提交于
virConnectListAllInterfaces should support to list all of interfaces when the value of flags is 0. The behaviour is consistent with other virConnectListAll* APIs
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=965169 documents a problem starting domains when cgroups are enabled; I was able to reliably reproduce the race about 5% of the time when I added hooks to domain startup by 3 seconds (as that seemed to be about the length of time that qemu created and then closed a temporary thread, probably related to aio handling of initially opening a disk image). The problem has existed since we introduced virCgroupMoveTask in commit 91028296 (v0.10.0). There are some inherent TOCTTOU races when moving tasks between kernel cgroups, precisely because threads can be created or completed in the window between when we read a thread id from the source and when we write to the destination. As the goal of virCgroupMoveTask is merely to move ALL tasks into the new cgroup, it is sufficient to iterate until no more threads are being created in the old group, and ignoring any threads that die before we can move them. It would be nicer to start the threads in the right cgroup to begin with, but by default, all child threads are created in the same cgroup as their parent, and we don't want vcpu child threads in the emulator cgroup, so I don't see any good way of avoiding the move. It would also be nice if the kernel were to implement something like rename() as a way to atomically move a group of threads from one cgroup to another, instead of forcing a window where we have to read and parse the source, then format and write back into the destination. * src/util/vircgroup.c (virCgroupAddTaskStrController): Ignore ESRCH, because a thread ended between read and write attempts. (virCgroupMoveTask): Loop until all threads have moved. Signed-off-by: NEric Blake <eblake@redhat.com>
-