On 04/11/2013 01:45 PM, Hu Tao wrote:
From: Ken ICHIKAWA <ichikawa.ken@xxxxxxxxxxxxxx>
We couldn't use host-passthrough mode for virtual cpu from
virt-manager so far. This patch enables virt-manager to
configure host-passthrough mode.
Signed-off-by: Ken ICHIKAWA <ichikawa.ken@xxxxxxxxxxxxxx>
---
ui/vmm-details.ui | 21 +++++++++++++++++++--
virtManager/details.py | 23 ++++++++++++++++++++++-
virtManager/domain.py | 13 ++++++++++---
3 files changed, 51 insertions(+), 6 deletions(-)
diff --git a/ui/vmm-details.ui b/ui/vmm-details.ui
index ad0652d..b1a70b3 100644
--- a/ui/vmm-details.ui
+++ b/ui/vmm-details.ui
@@ -2314,6 +2314,23 @@ I/O:</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <object class="GtkCheckButton" id="host-passthrough-enable">
+ <property name="label" translatable="yes">Use host-passthrough mode</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_host_passthrough_enable_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkTable" id="table15">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -2428,7 +2445,7 @@ I/O:</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -2499,7 +2516,7 @@ I/O:</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
There are four modes we can let user choose:
default(qemu64)
custom
host-model
host-passthrough(cpu -host)
Currently, the virt-manager supports
default mode(by default)
custom(choose from a ComboBox)
host-model(Copy host CPU configuration Button)
My idea is to use ComboBox which gives a list of these four
modes, if the custom mode is selected,
then, the model and feature is activated next, guiding user
to choose cpu model and features.
Or, the RadioButton is also an idea, but I prefer the ComboBox.
By the way, for the CheckButton in this patch, I found the UI
become not very smooth, can you do
a little modification to make it perfect, although it look
perfect in glade-3.
Guannan
_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list