Both qemu and lxc drivers have some duplicate code when
dealing with cgroups, such as virLXCCgroupSetupBlkioTune()
and qemuSetupBlkioCgroup(), duplicate code over 80, so
consolidate the same chunk into a separate routine.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
Both QEMU and LXC drivers have some duplicate code when
dealing with cgroups, this serials mainly consolidate the
same chunk of src/qemu/qemu_cgroup.c and src/lxc/lxc_cgroup.c
into src/util/cgroup.c.
Mao Zhongyi (4):
lxc: remove duplicate header files
qemu: remove duplicate header files
"#include vircgroup.h" appears in both qemu_cgroup.h and
qemu_cgroup.c, and qemu_cgroup.c contains qemu_cgroup.h,
so remove the duplicate declarations.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/qemu/qemu_cgroup.c | 1 -
1 file changed, 1 deletion(-)
diff --git
Both qemu and lxc drivers have some duplicate code when
dealing with cgroups, such as virLXCCgroupSetupMemTune()
and qemuSetupMemoryCgroup(), duplicate code over 80, so
consolidate the same chunk into a separate routine.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
"#include vircgroup.h" appears in both lxc_cgroup.h and
lxc_cgroup.c, and lxc_cgroup.c contains lxc_cgroup.h,
so remove the duplicate declarations.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/lxc/lxc_cgroup.c | 1 -
1 file changed, 1 deletion(-)
diff --git
> Hi.
> > hello,everyone:
> > If I want to add a new CPU model ,the test-file
>x86_64-cpuid-*-host.xml , x86_64-cpuid-*-guest.xml ,x86_64-cpuid-*-json.xml
>and x86_64-cpuid->> *.sig how to generate in the /tests/cputestdata/ ?
> The steps to add a new CPU data test case is to run
On Tue, Oct 29, 2019 at 08:20:04AM +, Nikolay Shirokovskiy wrote:
On 28.10.2019 13:11, Dave Allan wrote:
Hi Nikolay,
I tried to apply these patches both to the current git head and also the git
head as of Oct 15 when you posted them, and neither applied cleanly. Can you
confirm that
Hi.
> hello,everyone:
> If I want to add a new CPU model ,the test-file
> x86_64-cpuid-*-host.xml , x86_64-cpuid-*-guest.xml ,x86_64-cpuid-*-json.xml
> and x86_64-cpuid-*.sig how to generate in the /tests/cputestdata/ ?
The steps to add a new CPU data test case is to run the
On 28.10.2019 13:11, Dave Allan wrote:
> Hi Nikolay,
>
> I tried to apply these patches both to the current git head and also the git
> head as of Oct 15 when you posted them, and neither applied cleanly. Can you
> confirm that they apply cleanly for you to the current tree?
>
> Thanks,
>
Now when code handling attaching/detaching usb hostdev is appropriately
changed use it to handle host usb device udev add/del events.
As device adding/deleting needs acquiring job condition it is done in
thread pool rather in event loop thread itself where udev events are
delivered. However
So we are going to support replug of usb device on host. We need to
delete device from qemu when the device is unplugged on host and to add
device when the device is plugged back. As to deleting let's use
same code as when we detach device from domain. But we need to keep
the usb hostdev etc in
First I don't want to add code to handle dummy device that is used when
host usb device is not present at the moment of starting/migrating etc.
Second supporting non mandatory policies would require to handle races
when host usb device is plugged to host and libvirtd starts adding
device but if in
Diff to v2[1] version:
- add 'replug' attribute for hostdev element to allow replug semantics
- avoid accuiring domain lock in event loop thread on udev events as
suggested by Peter
- nit picks after review by Daniel Henrique Barboza
* is used to mark patches that were 'Reviewed-by' by Daniel
We want to keep this flag across libvirtd restarts.
Signed-off-by: Nikolay Shirokovskiy
Reviewed-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 06a23cd127..a57de9354a 100644
I guess this is the missing piece for [1]. It did not hurt before (like
we didn't even see any errors/warns in logs) because in
qemuProcessUpdateDevices function virDomainDefFindDevice does not find
device deleted from libvirt config. But now in case of unpluggind usb
device from host we leave
If usb device attached to a domain is unplugged from host and
then plugged back then it will no longer be available in guest.
We are going to support this case so that device will be detached
from qemu on unplug and attached back on replug. As sometimes
this behaviour is not desirable and for
If hostdev is unplugged we don't need to delete it's correspondent device
from qemu etc. Just remove it from config immediately.
Signed-off-by: Nikolay Shirokovskiy
---
src/qemu/qemu_hotplug.c | 16 +++-
src/util/virhostdev.c | 2 ++
2 files changed, 17 insertions(+), 1
Imagine host usb device is unplugged from host and as a result we send
command to qemu to delete appropriate device. Then before qemu device is
deleted host usb device is plugged back. Currently code supposes there is
no remnant device in qemu and will try to add new device and the attempt
will
Handle host usb device unplug in DEVICE_DELETED handle execution
path.
Signed-off-by: Nikolay Shirokovskiy
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_hotplug.c | 38 +++---
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git
Somebody can easily unplug usb device from host while libvirtd is being
stopped. Also usb device can be plugged or unplugged/plugged back and so
forth. Let's handle such cases.
Signed-off-by: Nikolay Shirokovskiy
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_process.c | 56
We are going to use qemuDomainAttachHostUSBDevice when
host usb device is plugged back to node.
Signed-off-by: Nikolay Shirokovskiy
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_hotplug.c | 29 -
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git
It is possible for libvirtd to go down before DEVICE_DELETED event is
delivered upon usb hostdev unplug and to receive the event after the
libvirtd is up. In order to handle this case we need to save
usb hostdev deleteAction in status file.
Signed-off-by: Nikolay Shirokovskiy
Reviewed-by: Daniel
22 matches
Mail list logo