When unplugging a function, all functions in the same vslot must be
unplugged, and function 0 must be one of the functions present when a
vslot is hot-plugged. Telling qemu-dm to unplug function 0 also tells
it to unplug all other functions in the same vslot.
Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
The general format is as follows:
Now: SEQ:BUS:DEV.FUNC[@VSLOT][,OPT...]
New: SEQ:BUS:DEV.FUNC0-FUNCN[@VSLOT][,OPT...]
SEQ:BUS:DEV.FUNC0,FUNCM,FUNCN[@VSLOT][,OPT...]
SEQ:BUS:DEV.*[@VSLOT][,OPT...]
In the case of unplug the VSLOT and OPT must be omitted.
Xm expands this notation notation out and passes
more conventional parameters to qemu-xen.
E.g:
0000:00:01.00-03 becomes:
0000:00:01.00
0000:00:01.01
0000:00:01.02
0000:00:01.03
0000:00:01.00,03,05,07 becomes:
0000:00:01.00
0000:00:01.03
0000:00:01.05
0000:00:01.07
For a device that has functions 0, 1, 2, 3, 5 and 7,
0000:00:01.* becomes:
0000:00:01.00
0000:00:01.01
0000:00:01.02
0000:00:01.03
0000:00:01.05
0000:00:01.07
Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Cc: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Instead of suppling a slot number to qemu-xen, supply a devfn.
This and subsequent other changes will allow xend to ask
for more than one function to be inserted into a single slot -
by specifying which function of the slot should be used.
This is a minimal patch for this change. A subsequent
patch that has a lot of noise to rename slot to devfn
is intended to follow.
Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
- Have the buid system generate a file which exports the install paths
for the hotplug scripts and stubdom / stubdom-dm
- Move file generation code from tools/python/Makefile into a gmake
macro
in Config.mk to avoid maintenance of three duplicates each with its
own
tweaks and bugs
- Export gmake variables into ioemu as shell variables
for upcoming ioemu patches
- Do above as a gmake macro to avoid maintenance of several duplicates
- Adjust hotplug scripts to find the right xen binaries from the
install directory
- Adjust stubdom-dm to use the install directories
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
The first start of a managed domain succeeds. But the second
start of the managed domain fails as follows. The problem occurs
when tapdisks are given to the managed domain. I think that the
problem occurs because the uname of tapdisks is overwritten with
"phy:/dev/xen/tadisk-2/tapdev*".
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Using changeset 19791:c0d2838fc10f, I can't create an HVM.
xend.log shows:
File "usr/lib64/python2.4/site-packages/xen/xend/image.py", line
759, in configure
store_dmargs.remove('-sdl')
ValueError: list.remove(x): x not in list
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Reset BlktapController's device class back to 'tap' once the device
has been created. This fixes save/restore for VMs with blktap2 disks.
Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
Signed-off-by: Dutch Meyer <dmeyer@cs.ubc.ca>
This patch re-enables a useful blktap1 for users who disable blktap2.
Itremoves tapdisk and blktapctrl from blktap2, both of which cause
problems with blktap operation. In addition, this patch modifies xend
to check for blktap2 installation. If the blktap2 driver isn't
running (hopefully because the dom0 kernel option wasn't selected) we
fall back to blktap.
Signed-off-by: Dutch Meyer <dmeyer@cs.ubc.ca>
Add support for the qemu monitor in a stubdom, the same way the
emulated serial support was added few days ago. The stubdom exports
the monitor as a pty and minios opens a console frontend; qemu in dom0
provides the correspondent backend for this additional pv console that
happens to be the qemu monitor.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Using changeset 19783: 61ec78692b13, device assignment can't work:
e.g., in find_the_uppermost_pci_bridge(),
parent = dev_parent.find_parent()
...
dev_parent = PciDevice(parent),
we can see parent['domain'] is int and in PciDevice's __init__,
int(dev['domain'], 16) would fail:
TypeError: int() can't convert non-string with explicit base
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
There seems to be little need to use the domain, bus, slot and
function to look up the virtual slot to pass as the argument to
hvm_destroyPCIDevice(), only to have hvm_destroyPCIDevice() use the
virtual slot for the sole purpose of looking up the domain, bus, slot
and function.
Signed-off-by: Simon Horman <horms@verge.net.au>
Move dev_dict_to_sxp() into XendSXPDev.py. Move
pci_convert_dict_to_sxp() and pci_convert_sxp_to_dict() to pci.py,
where other similar functions live. This makes these functions
accessible outside of the XendConfig class.
Signed-off-by: Simon Horman <horms@verge.net.au>
Share some parsing code between different parts of xm.
This has the side-effect that the device specification for
hot-plug may now include the VSLOT and OPTS as per device
specifictions in the domain configuration file.
SEQ:BUS:DEV.FUNC[,OPT...]
e.g. 0000:00:01.00@6
Signed-off-by: Simon Horman <horms@verge.net.au>
sxp.merge() can't deal with values being a list so instead
of storing pci options as:
[ 'opts', [ 'key1' 'value1'], [ 'key2', 'value2'], ...]
store them as:
[ 'opts', [ 'key1' 'value1'], ['opts', [ 'key2', 'value2']], ...
Signed-off-by: Simon Horman <horms@verge.net.au>
As observed by Dexuan Cui, when PCI devices are passed through at
domain-creation-time setupOneDevice() will be called twice.
Once via setupDevice() and once via econfigureDevice() which
is called in pci_device_configure().
This patch removes the first of these.
Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
This patch adds a new command line argument to xenconsole to specify
to which console to connect to in case a domain has more than one.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Recently the format of the tap syntax in the config file changed to
using a 4 part specifier (tap:tapdisk:<format>:<filename>) instead
of the old 3-part one (tap:<qcow>:<filename>).
This breaks compatibility with existing config files: a guest start
will throw a Python exception and will be aborted.
AFAICS currently tap:tapdisk is redundant, so the attached patch
simply catches the above mentioned exception and tries to parse the
old format in this case.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
On some hosts:
[root@localhost ~]# ls /sys/bus/pci/devices/0000:00:05.0/
0000:00:05.0:pcie00 0000:05:00.0 class driver local_cpus
resource subsystem_vendor
0000:00:05.0:pcie01 broken_parity_status config enable modalias
subsystem uevent
0000:00:05.0:pcie02 bus device irq power
subsystem_device vendor
Here we should only get 0000:05:00.0, but we also get 0000:00:05.0
unexpectedly. With this patch, xend only extracts the exact BDF(s).
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
As observed by Mick Joran, if short-lived domain exits cleanly
then os.waitpid() will throw the following exception. This appears
to be because the child process that is used to start the domain
has detached from its parent.
OSError: [Errno 10] No child processes
Cc: Mick Jordan <Mick.Jordan@sun.com>
Signed-off-by: Simon Horman <horms@verge.ent.au>
Other than being arguably more human readable,
this patch reconciles the output differences between
using Xen API and xmlrpc to manipulate domains.
Signed-off-by: Simon Horman <horms@verge.net.au>
Using func for hotplug_slot is not correct, although func is often
zero, previously zero meant please pick a vslot and asking xend to
pick a vslot was the only method available.
This resolves the following error when using Xen API:
$ xm create hvm.conf
...
Internal error: Timed out waiting for device model action.
Signed-off-by: Simon Horman <horms@verge.net.au>