- 10 12月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Similar to the openflags which allow VIR_STORAGE_VOL_OPEN_NOERROR to be passed to avoid open errors, add a 'readflags' variable so that in the future read failures could also be ignored.
-
- 09 12月, 2015 39 次提交
-
-
由 Andrea Bolognani 提交于
This updates the test program to make it consistent with recent changes to the mock libraries, and also opens up the possibility of mocking more than just /sys in the future.
-
由 Andrea Bolognani 提交于
Instead of fakesysfsdir, which is very generic, use fakesysfspcidir and fakesysfscgroupdir. This makes it explicit what part of the fake sysfs filesystem they're referring to, and also leaves open the possibility of handling files in two unrelated parts of the fake sysfs filesystem. No functional changes.
-
由 Andrea Bolognani 提交于
The old name is no longer accurate, since now we're using its value as the root of the fake filesystem. No functional changes.
-
由 Andrea Bolognani 提交于
We might need to mock files living outside SYSFS_PREFIX later on, so it's better to treat the temporary directory we are passed via the environment as the root of the fake filesystem and create SYSFS_PREFIX inside it. The environment variable name will be changed to reflect the new use we're making of it in a later commit.
-
由 Andrea Bolognani 提交于
We might need to mock files living outside PCI_SYSFS_PREFIX later on, so it's better to treat the temporary directory we are passed via the environment as the root of the fake filesystem and create PCI_SYSFS_PREFIX inside it. The environment variable name will be changed to reflect the new use we're making of it in a later commit.
-
由 Andrea Bolognani 提交于
init_env() will return right away if fakesysfsdir is already initialized, so this check is redundant.
-
由 Andrea Bolognani 提交于
The test program is not preloading any of the mock libraries that read that environment variable, so setting it is pointless.
-
由 Peter Krempa 提交于
Use the proper data structures for the iteration since ncpupids will be made private later.
-
由 Peter Krempa 提交于
Change some of the control structures and switch to using the new vcpu structure.
-
由 Peter Krempa 提交于
Instead of directly accessing the array add a helper to do this.
-
由 Peter Krempa 提交于
Add qemuDomainHasVCpuPids to do the checking and replace in place checks with it. We no longer need checking whether the thread contains fake data (vcpupids[0] == vm->pid) as in b07f3d82 and 65686e5a this was removed.
-
由 Peter Krempa 提交于
The vCPU threads make sense in the counterparts that set the vCPU bandwidth/quota, not in the emulator one. The emulator tunables are set all the time anyways. Drop the extra check and remove the now unneeded vm argument.
-
由 Peter Krempa 提交于
Since commit 0c04906f the check for priv->cgroup doesn't make sense as the calls to virCgroupHasController return the same information. Remove it and move it's comment partially to the new check. The already spurious check was also later copied to the iothreads code.
-
由 Peter Krempa 提交于
Once more stuff will be moved into the vCPU data structure it will be necessary to get a specific one in some ocasions. Add a helper that will simplify this task.
-
由 Peter Krempa 提交于
Extract the checking code into a separate function and prepare the infrastructure for checking the new structure type.
-
由 Peter Krempa 提交于
To allow collecting all relevant data at one place let's make def->vcpus a structure and then we can start moving stuff into it.
-
由 Peter Krempa 提交于
Refactor the code flow so that 'exit_monitor:' can be removed. This patch moves the auditing functions into places where it's certain that hotunplug was or was not successful and reports errors from qemuMonitorGetCPUInfo properly.
-
由 Peter Krempa 提交于
Refactor the code flow so that 'exit_monitor:' can be removed. This patch also moves the auditing and setting of the new vCPU count right to the place where the hotplug happens, since it's possible that the hotplug succeeds and adds a cpu while other stuff fails. Lastly, failures of qemuMonitorGetCPUInfo are now reported rather than ignored. The function retuns 0 if it "successfully" detected 0 threads.
-
由 Peter Krempa 提交于
qemuDomainHotplugVcpus/qemuDomainHotunplugVcpus are complex enough in regards of adding one CPU. Additionally it will be desired to reuse those functions later with specific vCPU hotplug. Move the loops for adding vCPUs into qemuDomainSetVcpusFlags so that the helpers can be made simpler and more straightforward.
-
由 Peter Krempa 提交于
Let the function report errors internally and change it to return standard return codes.
-
由 Peter Krempa 提交于
The cpu hotplug helper functions used negative error handling in a part of them, although some code that was added later didn't properly set the error codes in some cases. This would cause improper error messages in cases where we couldn't modify the numa cpu mask and a few other cases. Fix the logic by converting it to the regularly used pattern.
-
由 Peter Krempa 提交于
There's only very little common code among the two operations. Split the functions so that the internals are easier to understand and refactor later.
-
由 Peter Krempa 提交于
With a very unfortunate timing, the agent might vanish before we do the second call while the locks were down. Re-check that the agent is available before attempting it again.
-
由 Peter Krempa 提交于
Separate the code so that qemuDomainSetVcpusFlags contains only code relevant to hardware hotplug/unplug.
-
由 Peter Krempa 提交于
As in commit 88dc7e0c, the helper can be used in cases where the function actually does not access anyting in the private data besides the agent.
-
由 Peter Krempa 提交于
Later on this will also be used to track size of the vcpu data array. Use size_t so that we can utilize the memory allocation helpers.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Finalize the refactor by adding the 'virDomainDefGetVCpusMax' getter and reusing it accross libvirt.
-
由 Peter Krempa 提交于
The new helper will simplify checking whether the domain config contains inactive vCPUs.
-
由 Peter Krempa 提交于
The code can be unified into the new accessor rather than being scattered accross the drivers.
-
由 Peter Krempa 提交于
Use the local variable rather than getting it all the time from the struct. This will simplify further refactors.
-
由 Peter Krempa 提交于
To support further refactors replace all write access to def->maxvcpus with a accessor function.
-
由 Pavel Hrdina 提交于
We should make a copy of current definition to preserve a persistent definition, because we later update the definition with live changes. The live definition is discarded on domain shutdown and replaced by the copy we make before starting the domain. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Only 'tsc' timer allows set mode and track is valid only for 'rtc' and 'platform' timers. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This change ensures to call driver specific post-parse code to modify domain definition after parsing hypervisor config the same way we do after parsing XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This change ensures to call driver specific post-parse code to modify domain definition after parsing hypervisor config the same way we do after parsing XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This change ensures to call driver specific post-parse code to modify domain definition after parsing hypervisor config the same way we do after parsing XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-