[PATCH v5 0/4] Host device passthrough: Summary
by Zhou Zheng Sheng
Hi,
This patch series is to enable Kimchi to assign hos devices directly to
a VM, thus greately improve VM performance. Currently we support assigning
PCI device, USB device and SCSI LUN. For example, we can assign an NIC
to VM to improve guest network throughput, or passthrough a USB camera
to enable the guest OS to record video.
Host devices form a tree. We can assign most of the devices in the tree
to VM. By assigning a device, all the devices in its sub-tree are also
assigned. It might not make sense to assign a USB controller, because
the host may be using one of the devices connected to the controller.
Instead, Kimchi just presents the "leaf" devices to assign to guest.
In recent Linux kernel and KVM, it is able to recognize the IOMMU group
of a PCI device. The "leaf" PCI devices in the same IOMMU group should
be assigned and dismissed together. The IOMMU group is the actual
smallest isolation granularity of the PCI devices.
The first patch is to list all host devices information. It's useful on
its own to show host devices information.
The second patch is to list all eligible host devices to assign, as well
as the "affected" devices in the same IOMMU group.
The third patch creates a sub-collection "hostdevs" to the VM resource,
and deals with assigning and dismissing devices.
The fourth patch adds a sub-collection "vm_holders" to the host device
resource. It's to list all VMs that are holding the device.
I'll update API and unit test once everyone is happy with the interface
and logic.
v5:
Filter ealigible pci devices according to pci class. When assigning a
device to VM, check if there are other VMs holding it. Use
"kimchi.model.utils.get_vm_config_flag()" to correctly set the device
attaching API flag.
v4:
Add new sub-collection to host device to list the VMs holding the device.
v3:
Fix a small naming error introduced by rebase.
v2:
Handle the devices in VM's sub-collection "hostdevs".
v1:
Handle the devices in VM template.
Zhou Zheng Sheng (4):
Host device passthrough: List all types of host devices
Host device passthrough: List eligible device to passthrough
Host device passthrough: Directly assign and dissmis host device from
VM
Host device passthrough: List VMs that are holding a host device
docs/API.md | 11 +-
src/kimchi/control/host.py | 16 ++
src/kimchi/control/vm/hostdevs.py | 44 +++++
src/kimchi/featuretests.py | 10 +-
src/kimchi/hostdev.py | 317 ++++++++++++++++++++++++++++++++
src/kimchi/i18n.py | 9 +
src/kimchi/mockmodel.py | 7 +-
src/kimchi/model/config.py | 2 +
src/kimchi/model/host.py | 32 ++--
src/kimchi/model/libvirtstoragepool.py | 18 +-
src/kimchi/model/vmhostdevs.py | 327 +++++++++++++++++++++++++++++++++
src/kimchi/rollbackcontext.py | 3 +
src/kimchi/xmlutils.py | 26 ++-
tests/test_rest.py | 6 +-
tests/test_storagepool.py | 7 +-
15 files changed, 796 insertions(+), 39 deletions(-)
create mode 100644 src/kimchi/control/vm/hostdevs.py
create mode 100644 src/kimchi/hostdev.py
create mode 100644 src/kimchi/model/vmhostdevs.py
--
1.9.3
10 years, 6 months
[PATCH] Issue #296 [enhance]kimchi UI should not waiting while generating reports
by Wen Wang
1) Removed the dialogue window when generating a debug report.
2) Designed an animation bar indicate user there is a report generating
during the generating progress.
3) Disable the buttons' functions in debug report area when generating a new
report in case there might be any conflict. Meanwhile user can operate
on other parts of Kimchi.
4) Enable all buttonss' functions in debug report area after generating
progress.
---
ui/css/theme-default/host.css | 22 +++++++++++++++++++++
ui/js/src/kimchi.report_add_main.js | 38 ++++++++++++++++++++++++++++++++-----
2 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/ui/css/theme-default/host.css b/ui/css/theme-default/host.css
index 6a1a308..c684c0a 100644
--- a/ui/css/theme-default/host.css
+++ b/ui/css/theme-default/host.css
@@ -219,6 +219,28 @@
width: 200px;
}
+#id-generate-bar {
+ text-align: center;
+ vertical-align: middle;
+}
+
+#id-generate-panel {
+ vertical-align: middle;
+ margin: 0 auto;
+ text-align: center;
+ height: 20px;
+ width: 250px;
+ color: #fff;
+ border: 1px solid #ccc;
+ background-color: #5af;
+}
+
+#id-generating {
+ font-color: #fff;
+ background: #5af url(../../images/theme-default/loading.gif) 7px
+ center no-repeat;
+ padding-left: 26px;
+}
/* End of Debug Report */
/* Software Updates */
diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 8759c2b..1e5df89 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -1,4 +1,5 @@
kimchi.report_add_main = function() {
+ var reportGridID = 'available-reports-grid';
var addReportForm = $('#form-report-add');
var submitButton = $('#button-report-add');
var nameTextbox = $('input[name="name"]', addReportForm);
@@ -13,12 +14,39 @@ kimchi.report_add_main = function() {
return false;
}
var formData = addReportForm.serializeObject();
- submitButton
- .text(i18n['KCHDR6007M'])
- .prop('disabled', true);
- nameTextbox.prop('disabled', true);
+ kimchi.window.close();
+ var reportGrid = null;
+ $('#' + reportGridID + '-generate-button').prop('disabled',true);
+ $('#' + reportGridID + '-remove-button').prop('disabled',true);
+ $('#' + reportGridID + '-download-button').prop('disabled',true);
+ $('#' + reportGridID + '-rename-button').prop('disabled',true);
+ $('#available-reports-grid').find('.grid-body').find('table').find('tr').click(function() {
+ $('#' + reportGridID + '-remove-button').prop('disabled',true);
+ $('#' + reportGridID + '-download-button').prop('disabled',true);
+ $('#' + reportGridID + '-rename-button').prop('disabled',true);
+ });
+ var len = $('#available-reports-grid').find('.grid-frozen-body-view').find('tr').length + 1;
+ $('#available-reports-grid').find('.grid-frozen-body-view').find('table').append('<tr id="temp-row-col1"><td>' + len + '</td></tr>');
+ $('#available-reports-grid').find('.grid-body-view').find('table').append('<tr id="temp-row-col2"><td id="id-generate-bar"; colspan="2"></td></tr>');
+ var textboxValue = $('#report-name-textbox').val();
+ if (textboxValue != "") {
+ if (textboxValue.length <= 15) {
+ $('#id-generate-bar').append('<div id="id-generate-panel"></div>');
+ $('#id-generate-panel').append('<label id="id-generating"><span>' + '"' + textboxValue +'" ' + i18n['KCHDR6007M'] + '</span></label>');
+ }
+ else {
+ $('#id-generate-bar').append('<div id="id-generate-panel"></div>');
+ $('#id-generate-panel').append('<label id="id-generating"><span>' + '"' + textboxValue.substring(0,13) +'..." ' + i18n['KCHDR6007M'] + '</span></label>');
+ }
+ }
+ else {
+ $('#id-generate-bar').append('<div id="id-generate-panel"></div>');
+ $('#id-generate-panel').append('<label id="id-generating"><span>' + i18n['KCHDR6007M'] + '</span></label>');
+ }
kimchi.createReport(formData, function(result) {
- kimchi.window.close();
+ $('#temp-row-col1').remove();
+ $('#temp-row-col2').remove();
+ $('#' + reportGridID + '-generate-button').prop('disabled',false);
kimchi.topic('kimchi/debugReportAdded').publish({
result: result
});
--
1.9.1
10 years, 6 months
[PATCHv3 0/2] ref_cnt fixes for disk attachment
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Royce Lv (2):
disk attachment: fix ref_cnt to prevent double attach
disk attachment: limit ref_cnt check to disk attachment
src/kimchi/model/vmstorages.py | 31 ++++++++++++++++++++++++++++++-
tests/test_model.py | 1 +
2 files changed, 31 insertions(+), 1 deletion(-)
--
1.8.3.2
10 years, 6 months
[PATCHv4 0/2] Support for storage pool extend
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Depend on exception fix patchset.
v3>v4, delete json schema change.(Shaohe's comments)
v2>v3, fixed loading info cannot display when reopen,
also correct i18n for Chinese.(Yuxin's comments)
v1>v2, Added error msg and loading info for pool extend.(Aline's comments)
Royce Lv (2):
StoragePool Edit: Add Disk to Logical Pool
Update po file
po/zh_CN.po | 5 +++-
ui/js/src/kimchi.api.js | 12 ++++++++
ui/js/src/kimchi.storage_main.js | 47 ++++++++++++++++++++++++++++++++
ui/js/src/kimchi.storagepool_add_main.js | 2 +-
ui/pages/i18n.html.tmpl | 1 +
ui/pages/tabs/storage.html.tmpl | 15 ++++++++++
6 files changed, 80 insertions(+), 2 deletions(-)
--
1.8.3.2
10 years, 6 months