Introduce SocketDgramListener and UnixDgramListener classes.
We already have STREAM (connection) type socket listener classes in
the source tree, but we need DGRAM (connectionless) type listeners to
receive udev events.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
In the case of a host OS without lsscsi command, xm scsi-attach
command fails even if you specify existing SCSI device.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This patch moves a call processing of a domain reset processing
from xm to xend. Also, it adds a reset argument to do_dump() of
SrvDomain.py.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This patch adds support for specifying the backend (tapdisk or ioemu)
to blktapctrl. Images can be specified e.g. as tap:tapdisk:aio,
tap:ioemu:qcow2 or tap:vmdk. When omitting the backend, a default is
chosen based on the image type (currently always tapdisk because ioemu
as a backend is broken until a follow-up patch series against qemu-xen
is applied)
Signed-off-by: Kevin Wolf <kwolf@suse.de>
attached patch fixes a regression in c/s 19330 which
prevents to start guests on a Linux Dom0.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
This is a corrected version of a patch commited as c/s 19250 and
reverted by c/s 19314. Thanks to "trap sigerr ERR" in
xen-hotplug-common.sh the xen-hotplug-cleanup would exit when reading
/local/domain/ID/vm fails thus skipping all the xenstore-rm lines in
the rest of the script.
Change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend
and backend) and do the removing from xen-hotplug-cleanup script when
we are sure the device is really not attached to the guest any more.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This patch prevents xend from creating a XendNetwork instance of
tmpbridge (a temporary bridge used in network-bridge script).
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
The code was attempting to use the domain's current number of pages
(info.nr_pages) as a maximum index. We then walk the memory map and
can easily over-write past the end of the nr_pages-sized array, if the
domain has more pages mapped in than earlier (live dump). Restrict
ourselves to the current number of pages.
Also fix the dump core method in xend to actually implement the crash
and live options. In particular this means that xend clients other
than xm now get non-live dumps by default.
Signed-off-by: John Levon <john.levon@sun.com>
The comment about the lack of restart prevention is not accurate.
Bump the minimum restart time to 60 seconds.
Signed-off-by: John Levon <john.levon@sun.com>
On Solaris, xend runs in a 'process contract' such that all children
are killed when the service is restarted. Spawn qemu processes in a
new contract to avoid this.
Signed-off-by: John Levon <john.levon@sun.com>
If a client asks about a non-existent domain, report the error back
properly instead of just backtracing within xend.
Signed-off-by: John Levon <john.levon@sun.com>
In the case of a host OS without lsscsi command, the following
error message is recorded into xend-debug.log when xend is started.
The error message is recorded once certainly. If SCSI devices are
connected to the host OS, it is recorded to the number of SCSI
devices.
sh: lsscsi: command not found
This patch discards the error message to /dev/null.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
XendDomainInfo.testDeviceComplete() should check block devices have
shutdown correctly but it only considers vbd class devices and ignores
tap devices. The attached patch changes testDeviceComplete() to wait
for both vbd and tap devices to be shutdown correctly.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
In the stubdom case you can now specify sdl=1 and vnc=1 (again, both
can be selected at the same time) in the vfb configuration.
So instead of:
vfb = [ 'type=vnc' ]
now you have:
vfb = [ 'vnc=1,sdl=1' ]
the former configuration option is deprecated but still supported for
backward compatibility.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
D3hot state in some PCI devices causes the failure of domain
creation/destruction.
The default is "pci_power_mgmt=3D0" which disables the guest OS from
managing D-states because it would be better to avoid the trouble than
advantage of low power consumption.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
This patch adds a per-domain flag to specify whether a domain will be
S3 integrity protected when Xen is launched using tboot/TXT.
The tools now support an integer domain configuration parameter called
's3_integrity', which defaults to 1, to enable S3 integrity protection.
The struct arch_domain structure has been extended to have an
's3_integrity' field that represents this setting.
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend
and backend) and do the removing from xen-hotplug-cleanup script when we
are sure the device is really not attached to the guest any more.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This patch reverts a previous patch trying to fix a memory, even
though I don't think there was any. Now return a valid buffer. All
functions calling this function do free the buffer.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
1) PCI_PM_CTRL_NO_SOFT_RESET: this is bit3 of PMCSR(Power Management
Control/Status). It should be 8. This bit means a device's capability
of not doing an internal reset across D3hot/D0.
If the bit is 1, there shall be no reset across D3hot/D0, so we should
not use it as a method to reset device.
2) When performing reset using standard FLR methods, we should sleep
at least 100ms; in current code, it's incorrect somewhere we sleep
0.2s and somewhere 0.01s.
3) In detect_dev_info(), fix a typo: PCI_EXP_TYPE_PCI_BRIDG ->
PCI_EXP_FLAGS_TYPE.
4) fix a small typo in the comment of transform_list().
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
For xm create and xm new, an error may not occur even if wrong
vscsi configuration is given.
e.g.
vscsi = [ '0:0:0:0,0:0:0:0', '0:0:0:0,1:0:0:0' ]
# xm create vm1
Using config file "/etc/xen/vm1".
Started domain vm1 (id=8)
# xm scsi-list vm1
Idx BE state host phy-hctl phy vir-hctl devstate
0 0 1 0 0:0:0:0 sda 0:0:0:0 None
1 0 1 0 0:0:0:0 sda 1:0:0:0 None
This patch fixes some problems such as the above.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
You can use "host" mode by specifying keyword "host" as virtual scsi
device. Following is usage example.
xm scsi-attach 1 2:0:3:4 host
In this case, all LUNs under host=2 are attached to guest domain 1.
The channel=0, target=3 and lun=4 are ignored.
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
XendConfig.py said about VCPUs_live as follows.
-- the number of VCPUs currently up, as reported by Xen.
But the value of VCPUs_live always is 1 till xm vcpu-set get
executed. This patch updates VCPUs_live by using online_vcpus.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
In the case of xm scsi-attach, when the SCSI devices are specified in
HCTL form or device name form, the processing is faster.
If lsscsi command is not installed, the processing works by using
information of /sys as before.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Aligned periodic vpts can improve the HVM guest power consumption a
lot, especially while the guest using high HZ such as 1000HZ.
Signed-off-by: Wei Gang <gang.wei@intel.com>
- usage of undefined variables in error cases (invalid handle
specified) in methods VBD_create, VTPM_destroy, event_unregister
- not imported module 'uuid' in method debug_create results in an
exception
Signed-off-by: Lutz Dube <Lutz.Dube@fujitsu-siemens.com>
This patch adds a videoram parameter (4MB is the default) to pv guests
too: if the pv guest is actually a stubdomain then the videoram size
is added to the initial required available memory.
This way there is no risk that a stubdom fails to populate the
videoram because the RAM freed for the videoram by dom0 has already
been used to create the stubdom.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Since changeset 17617 the block device protocols are checked to be
either file or phy. This has later been fixed to also include
tap. This is still not a correct check as there can be arbitrary
additional protocols. Before this check was added you could have a
block-xyz hotplug script and xyz would work as a protocol, now it is
refused. An example for this mechanism is the block-nbd script which
is included in the tree.
This patch changes the check to allow file, phy, tap and all protocol
names for which a block-$protocol hotplug script exists. This should
fix the last regressions introduced by the check.
Signed-off-by: Kevin Wolf <kwolf@suse.de>