Commit Graph
6971 Commits
Author SHA1 Message Date
Keir Fraser 3ba7d233c7 xend: allow VM configuration with both sdl=1 and vnc=1
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>
2009-03-06 19:13:23 +00:00
Keir Fraser f3cc74d2f1 tool: make management of PCI D-states by guest optional
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>
2009-03-06 18:58:41 +00:00
Keir Fraser 7468faf8d3 xm-test: Identifying the network env specified in xend config fails,
if an additional parameter is given for the network-bridge
(e.g. netdev=eth1) The patch splits the network command into the
command name and its parameters to determine the netenv (bridge,
route, nat)

Signed-off-by: juergen.gross@fujitsu-siemens.com
2009-03-06 18:56:28 +00:00
Keir Fraser 6976476d8c xend: Handle missing s3_integrity value, default to zero.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-05 17:50:05 +00:00
Keir Fraser eea1a2ea39 xend: blkif hda regexp fix
Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-03-05 15:10:17 +00:00
Keir Fraser b6f1cfa1c3 init script: Enable to run xend stop when dom0 shutdown
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2009-03-05 15:06:06 +00:00
Keir Fraser 86d2a1cec5 blktap: Allow creation of qcow2 files.
Signed-off-by: Yang Zhang <yang.zhang@intel.com>
2009-03-03 13:22:28 +00:00
Keir Fraser 8aaf870611 txt: Xen per-domain S3 integrity config
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>
2009-03-03 11:52:44 +00:00
Keir Fraser 9b82af4b03 libxen: fix a problem preventing use of xen_event_register().
The conversion of input parameter xen_string_set to XML format creates
a XML "struct" tag instead of "array". The patch sets the XML tag for
SET now to "array".

Signed-off-by: Lutz Dube <Lutz.Dube@fujitsu-siemens.com>
2009-03-03 11:41:15 +00:00
Keir Fraser 7fabf1409c xend: Make /var/lib/xen if not already present.
Signed-off-by: Christoph Egger <christoph.egger@amd.com>
2009-03-03 11:37:31 +00:00
Keir Fraser f70473e487 xmexample: portability fix
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-02 11:04:43 +00:00
Keir Fraser 8e3feb5145 xend: Fix removing /vm/UUID/device paths when device cannot be disconnected
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>
2009-03-02 10:34:37 +00:00
Keir Fraser 69e8ef7314 acm: Return a valid buffer
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>
2009-03-02 10:31:16 +00:00
Keir Fraser 8bb7b3914b hvmloader: Make build fail if packages required to build hvmloader not present
Also, corrected the message generated by the makefile which says what
packages are required.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-03-02 10:30:15 +00:00
Keir Fraser 34097f0d30 hvm: passthrough MSI-X mask bit acceleration
Add a new parameter to DOMCTL_bind_pt_irq to allow Xen to know the
guest physical address of MSI-X table. Also add a new MMIO intercept
handler to intercept that gpa in order to handle MSI-X vector mask
bit operation in the hypervisor. This reduces the load of device model
considerably if the guest does mask and unmask frequently

Signed-off-by: Qing He <qing.he@intel.com>
2009-03-02 10:26:37 +00:00
Keir Fraser ec9db49cf0 xend: Fix some mistakes in tools/python/xend/util/pci.py
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>
2009-03-02 10:23:50 +00:00
Keir Fraser 5b0d675696 xend: Don't forget backend domain definitions for pvSCSI
Backend domain definitions for pvSCSI are forgotten.
This patch correctly handles them.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-02 10:22:23 +00:00
Keir Fraser 1622101b19 xenstored: fix use-after free bug
Problem:  Handling requests for one connection can not only zap the
connection itself, due to socket disconnects for example.  It can also
zap *other* connections, due to domain release requests.  Especially
it can zap the connection we have saved a pointer to in the "next"
variable.

From: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-01 14:50:04 +00:00
Keir Fraser 8bb2359cd7 xenconsole: Fix pty handling
I printed the terminal attributes after openpty() and they were
garbage on the first console, valid on the second etc.
openpty() gets garbage in (uninitialized attributes MODIFIED by
cfmakeraw()). It sets the slave to the attributes requested. Using
uninitialized data for cfmakeraw->openpty results in pty attributes
that may even have the receiver disabled. Closing the slave just hides
the bug as these attributes disappear and hope the slave will be
reopened and initialized.

From: Juergen Hannken-Illjes <hannken@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-02-20 17:02:36 +00:00
Keir Fraser fecfa97c11 xenconsoled: make guest console visible on NetBSD dom0
After openpty(), slave_fd must be closed or guest console output goes
to the slave while select() in xen console client listens on the
master.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-02-20 11:13:11 +00:00
Keir Fraser d3d0b89247 libxc: xc_ptrace cleanup
There are some bugs in PTRACE_PEEK/POKE.
- can't track 2MB pages in 32bit pae mode.
- leakage of mmap/munmap.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-02-20 11:09:46 +00:00
Keir Fraser c796f3c14f pygrub: parse xen module option in grub
Add function for GrubConf to parse xen module option in grub.
Pygrub should pass args as domUloader did.

Signed-off-by: Wei Kong <weikong.cn@gmail.com>
2009-02-20 11:08:31 +00:00
Keir Fraser 755c7136fe xend: Fix exception in pci_convert_sxp_to_dict()
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-02-19 11:07:33 +00:00
Keir Fraser b35b1efb72 xm: Some fixes for pvSCSI
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>
2009-02-19 11:01:15 +00:00
Keir Fraser 692cd6efe1 pygrub: fix for NetBSD
Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-02-19 10:53:46 +00:00
Keir Fraser f9de1c1ae6 pvSCSI, xend: add new device assignment mode
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>
2009-02-17 11:19:55 +00:00
Keir Fraser ae4aa4f803 xend: Update VCPUs_live
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>
2009-02-17 11:13:34 +00:00
Keir Fraser ec54fc8c6d xend: Improve information-gathering processing of SCSI devices by using lsscsi
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>
2009-02-17 11:12:50 +00:00
Keir Fraser b985dc0b9e xenpm tool: add average C state residency
Signed-off-by: Yu Ke <ke.yu@intel.com>
2009-02-17 11:08:31 +00:00
Keir Fraser f3c727b324 Fix typos in xendomains script.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-02-17 11:04:08 +00:00
Keir Fraser 0eecf73be6 hvm: Align periodic vpts.
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>
2009-02-13 09:43:06 +00:00
Keir Fraser 737073ac89 xenapi: Correct some syntax errors in xen/xend/XendAPI.py
- 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>
2009-02-13 09:38:16 +00:00
Keir Fraser 9acc94349e xendomains: clean up output formatting
Show errors in the way they are coming from xm command only (no usage
is printed now). Watchdog_wm() has been changed for not showing dots
in the process of shutting down domains and if an error occurs it
prints target domain, operation (save/restore/migrate etc.) and reason
of failure in more user-friendly way.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-02-13 09:32:02 +00:00
Keir Fraser 418f758483 xm save: Display help text if bad options specified.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-02-12 10:53:10 +00:00
Keir Fraser 54ddfee829 rombios: fix int15/86h (wait for microseconds)
The bcc compiler generates wrong stack pointer offset of a local
variable within ASM code if another local variable is declared
later.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2009-02-12 10:52:05 +00:00
Keir Fraser cef052b621 xend: PCIQuirk`__devIsUnconstrained refers to an undeclared variable if
/etc/xen/xend-pci-permissive.sxp doesn't exist.

Signed-off-by: David Edmondson <dme@sun.com>
2009-02-11 10:45:34 +00:00
Keir Fraser 77de1e2709 blktap: Fix check_gcrypt
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-02-11 10:44:42 +00:00
Keir Fraser 2b9a5bea15 xenctx: print x86_32 context on x86_64
Although x86_64 context covers x86_32, I think it's easy to watch.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-02-06 10:43:58 +00:00
Keir Fraser 20eed172a7 libxenctrl: adds xc_domain_unbind_msi_irq to libxc.
The function is needed to unbind MSI/MSI-X on transition from D3hot
state to D0 state.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2009-02-05 15:28:09 +00:00
Keir Fraser c8ff96bd9f xenctx support for 64-bit HVM guests
Now that we can easily find EFER.LMA, xenctx can detect 64-bit HVM
VCPUs

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:17:24 +00:00
Keir Fraser 2c3072a583 libxc support for the new partial-HVM-save domctl.
This includes making the pagetable walker in xc_pagetab.c behave
correctly for 32-bit and 64-bit HVM guests.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:17:08 +00:00
Keir Fraser 149748770b xend: fix vncconsole option
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-04 12:43:11 +00:00
Keir Fraser 6ecbae750b xend: Delay before SIGKILL qemu
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-02-04 12:01:05 +00:00
Keir Fraser b526733e2f xm: Improve xm error if booted native
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2009-02-04 11:58:25 +00:00
Keir Fraser 14e9431629 XendAPIStore - do not remove non-existent item
If list is searched and item not found, then don't attempt to delete
the item.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2009-02-04 11:57:17 +00:00
Keir Fraser fa5078d407 stubdom: add videoram to stubdom initial memory reservation
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>
2009-01-29 16:41:48 +00:00
Keir Fraser 597edba986 xend: Fix block device type check
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>
2009-01-29 16:39:56 +00:00
Keir Fraser e64d0c2e62 rombios: fix pointer argument to PMM
The pointer to PMM function arguments must be flattened for protected
mode with zero-based segments.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-01-26 11:22:03 +00:00
Keir Fraser c32523e141 rombios: fix wrong stack segment return in 32-bit gateway
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-01-26 11:16:52 +00:00
Keir Fraser 83833d973b rombios: Indirect through 32-bit jump table from within the 32-bit bios.
This gets rid of shenanigans with relocating the jump table around the
place.

Also clean up bios_info table while we are updating it.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-23 14:32:41 +00:00