For those devices not having INTx (like VFs), avoid calling map_pirq,
otherwise the guest cannot be started successfully.
Also avoid calling this hypercall for hvm guest, this is done in the
device model.
Signed-off-by: Qing He <qing.he@intel.com>
To be able to use "bootloader" on drbd devices the following changes
need to be made:
*) Translation of devicename
_parse_uname which is used by blkdev_uname_to_file which is again used
by _configureBootloader in XendDomainInfo needs to be able to resolve
drbd resources to the corresponding blockdevice to feed to the
configured bootloader.
*) Activation of drbd device
If the drbd device isn't in Primary mode when the bootloader tries to
fetch the kernel and initrd, the start of the DomU will fail. To
prevent this the given drbd device will be made Primary before the
bootloader gets executed.
A note on the naming of drbd resouces: drbd uses mostly resource names
in it's userland tools. Because of that drbd VBDs, if configured with
the "drbd:" type, should always use the drbd resource name as
suggested by the drbd documentation at
http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html. My
patches assume that the VBDs are named accordingly.
Signed-off-by: Michael Renner <michael.renner@geizhals.at>
When the guest(pv-on-hvm guest that cannot suspend) reboot in
LiveMigration, the disconnecting of src-side is not transmitted to
dist-side. As a result, the error processing on the dist side is not
executed.
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
I detected a problem when using XenAPI. When I started a VM by
using xm create command, blocktap disks were not attached to the
VM.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Currently, cpu_weight parameter and cpu_cap parameter in domain=20
configuration files are ignored when using XenAPI.
The parameters are available by this patch.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This patch supports basic gfx passthrough on xen side:
- add a VGA type for gfx passthrough, and get the size of VGA bios
of passthrouged gfx in hvmloader
- add a config option 'gfx_passthru' for gfx passthrough
Signed-off-by: Ben Lin <ben.y.lin@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Attached patch makes error reporting more verbose when
xc.domain_create() fails or raises an Exception.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Changed the way security labels are handled to allow domains to be
labeled with Flask MLS security labels. Changed the error message
generated when an invalid context is submitted to be more useful.
Signed-off-by: Machon B. Gregory <mbgrego@tycho.ncsc.mil>
Signed-off-by: George S. Coker, II <gscoker@alpha.ncsc.mil>
and PV/ramdisk
Add support for 'file:' and 'data:' URI schemes for the parameters
'PV/kernel' and 'PV/ramdisk' in the VM.create() call. The 'data:'
scheme handling enables using a file which is stored inside the
management system (from where the XenAPI call is send) as kernel or
ramdisk.
Notes:
o all included: a detailed description can be found in the xenapi
documentation
o bumped up the version of the API document to 1.0.8 (because of
(minimal) interface extension)
o Future enhancements (like http:, ftp: schemes) fit seamlessly into
the current design / classes
o Unittest cases and xm-test case included
Signed-off-by: Andreas Florath <xen@flonatel.org>
Right now xen will create a new vtpm instance everytime you start up a
domU, even if you specify the instance parameter in your config file.
Each vtpm instance is then given a uuid and the vtpm.db file maps
instance numbers to uuid numbers.
This patch is a hack that lets you explicitly set the uuid of your
vtpm instance. Everytime you boot up your domU now the vtpm will get
that uuid and thus it will always get the same vtpm instance number
instead of being generated a new one.
So for example, in your config file you would do something like this
vtpm = [ 'backend=0,uuid=dcdb124b-9fed-4040-b149-dd2dfd8d094c' ]
Signed-off-by: Matt Fioravante <Matthew.Fioravante@jhuapl.edu>
There were a couple of small bugs in the xapi xm-test:
o outdated XenAPI calls were removed from testcase
(02_xapi-vbd_basic)
o minor problem with XendLocalStorageRepository
is fixed (missed list_images() function - which
is moved from the XenQCoWStroageRepo to the common
base class XendStorageRepository)
which was detected running 02_xapi-vbd_basic.
o XenAPI session handling and connecting is fixed.
o 03_xapi-network_pos was rewritten and now uses
XenAPI.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Imagine a PCIe switch, which doesn't support ACS (Access Control
Services), has 2 downstream ports: A and B, according to PCIe spec,
the PCIe switch should directly route the transaction that is from A
and to a device under B -- the Root Complex and IOMMU engine are
bypassed -- this doesn't work at all in the case of hvm guest and can
even incur potential security issue, so we should not allow such kind
of device assignment.
If all the intermediate PCIe swiches between a device and Root Complex
support and enable ACS, we can safely asssign the device to guest.
Cc: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Add the ability to define VBD QoS policy in the xend layer.
Consider the following vbd entry:
vbd = [
'phy:/dev/server/virtualmachine1-disk,xvda1,w,credit=3D5000/s@50ms',
]
This means that a VM may perform 5000 I/O operations per second, with
credit being replenished every 50 milliseconds.
The 'credit' xenstore value is by the blkback driver to ratelimit I/O
operations for the specific device.
Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Expose tmem "freeable" memory for use by management tools.
Management tools looking for a machine with available
memory often look at free_memory to determine if there
is enough physical memory to house a new or migrating
guest. Since tmem absorbs much or all free memory,
and since "ephemeral" tmem memory can be synchronously
freed, management tools need more data -- not only how
much memory is "free" but also how much memory is
"freeable" by tmem if tmem is told (via an already
existing tmem hypercall) to relinquish freeable memory.
This patch provides that extra piece of data (in MB).
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
The Xend has a problem that it often fails to restore/migrate
a PV domain whose device backends are partly a driver domain.
Because a checkpoint of the PV domain has device backend value as
domain id, you can restore/migrate the PV domain only when a driver
domain is the same id as device backend value in the checkpoint.
I attached a patch to fix it by renaming device backend value in a
checkpoint from domain id to domain name when xm save/migrate.
This patch doesn't rename device backend value if the value is 0,
which is Domain-0, so the checkpoint format is compatible if you use
only Domain-0 as device backend.
Signed-off-by: Rikiya Ayukawa <ayukawa.rikiya@jp.fujitsu.com>
Attached patch implements save/restore/migration/livemigration
for transcendent memory ("tmem"). Without this patch, domains
using tmem may in some cases lose data when doing save/restore
or migrate/livemigrate. Also included in this patch is
support for a new (privileged) hypercall for authorizing
domains to share pools; this provides the foundation to
accomodate upstream linux requests for security for shared
pools.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
In the method xen.xend.XendStateStore.XendStateStore.load_state and
xen.xend.XendStateStore.XendStateStore.save_state the minidom objects
used to load/save the current state of a device type, can't be freed
by the python garbage collector after all references to the top node
are cleared, because of cyclic references between the DOM nodes. So
memory usage of xend increases after calling these methods. To solve
this problem, the unlink() method must be called for a minidom object
before the last reference to the top node is cleared (see python
docs). This breaks the cyclic references, so the garbage collector can
free these objects.
Signed-off-by: juergen.gross@ts.fujitsu.com
This extends the mapping between physical and virtual PCI functions
for multi-function pass-through in two ways. If neither of these
rules apply the existing identity-mapping of physical to virtual
functions is used.
1) If physical function zero is not present in a multi-function
pass-through device then the numerically lowest physical function
whose virtual function hasn't explicitly been set will be mapped
to virtual function 0.
This is to satisfy the requirement that a (virtual) device
must always have function 0 present.
2) The virtual function to be used for a physical function may
be explicitly set.
e.g. 00:1d.2=3D0,1=3D1,0=3D2@7 will result in the following
mapping:
physical | virtual
---------+--------
00:1d.2 | 00:07.0
00:1d.1 | 00:07.1
00:1d.0 | 00:07.2
Ranges may also be used with explicit assignment.
The following would result in the same mapping as above:
00:1d.2=3D0-0=3D2@7
Please be aware that it is very likely that using these extensions
it is possible to create mappings that do not work. If in doubt
please use identity-mapping.
Cc: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
When we 'xm pci-attach' device into pv guest, we also need to check if
the device is owned by pciback or pci-stub, if the device has been
assigned, etc.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
In current xend, we can not assign co-assignment devices to different
guests, even for pv guests. This patch loosens the policy for pv
guest: if none of the co-assignment devices have been assigned to hvm
guest, we can assign the devices to different pv guests.
The patch also adds a detection: if a device has been assigned to
guest, we can't try to "xm pci-attach" it to the same guest again.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This patch allows vcpus_params cpu_weight and cpu_cap to be saved and
restored. Most the code to support this already existed, but the save
path needed to be updated to explicitly save these params, and the
restore path needed to be updated to resend the params down to the
kernel.
From: Andrew Jones <drjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Use pci_dict_to_bdf_str() in hvm_pci_device_create()
* Use pci_name instead of pci_str in error message, pci_str does not
* exist
Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Dexuan Cui <dexuan.cui@intel.com>
Currently, xend dumps a core file of a DomU
in the directory "/var/xen/dump/", when the DomU has crashed.
The patch modifies this directory to "/var/xen/dump/<domain name>/".
It enables you to select HDD partition per DomU to dump core by using
mount command.
Signed-off-by: Rikiya Ayukawa <ayukawa.rikiya@jp.fujitsu.com>
xc.test_assign_device(dev) can only tell us if dev is assigned to hvm
guest; if a device is assigned to pv guest, xc.test_assign_device()
still tells us the device is not assigned yet, as a result, the device
still appears in the output of "xm pci-list-assignable-devices", and
xend would not prevent us from assigning the device to a new pv or hvm
guest.
To judge if a device has been assigned to guest, we have to scan
xenstore.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This reverses changeset "xend: pass-through: Implement least-mapping
of virtual" (19854:22067ba1de0d) and reverts the code to identity
mapping physical PCI functions to virtual ones when multi-function
virtual devices are in use. It is my opinion that this is both safer
and simpler than least-mapping, and that in the absence of further
analysis identity-mapping the best choice for now.
Signed-off-by: Simon Horman <horms@verge.net.au>
changeset "python: Remove tab indents" (19937:e845326ae203)
introduces a minor regression in the multi-function PCI pass-through
code by causing bogus return values from the sort function
which is used to order the output of "xm pci list".
Signed-off-by: Simon Horman <horms@verge.net.au>
Add support for 'file:' and 'data:' URI schemes for the parameters
'PV/kernel' and 'PV/ramdisk' in the VM.create() call. The 'data:'
scheme handling enables using a file which is stored inside the
management system (from where the XenAPI call is send) as kernel or
ramdisk.
Notes:
o all included: a detailed description can be found in the xenapi
documentation
o bumped up the version of the API document to 1.0.8 (because of
(minimal) interface extension)
o Future enhancements (like http:, ftp: schemes) fit seamlessly into
the current design / classes
Signed-off-by: Andreas Florath <xen@flonatel.org>