Commit Graph
5835 Commits
Author SHA1 Message Date
Keir Fraser 2eaec0bc67 xentop: build fix for *bsd.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-23 14:42:50 +01:00
Keir Fraser 093d6da712 libxc: check length on string copy (strcpy -> strncpy).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-23 14:42:06 +01:00
Keir Fraser 907e0a6046 hvm, vt-d: Add memory cache-attribute pinning domctl for HVM
guests. Use this to pin virtual framebuffer VRAM as attribute WB, even
if guest tries to map with other attributes.
Signed-off-by: Disheng Su <disheng.su@intel.com>
2007-10-23 14:38:47 +01:00
Keir Fraser 86d019205b xenmon: Fix security vulnerability CVE-2007-3919.
The xenbaked daemon and xenmon utility communicate via a mmap'ed
shared file. Since this file is located in /tmp, unprivileged users
can cause arbitrary files to be truncated by creating a symlink from
the well-known /tmp filename to e.g., /etc/passwd.

The fix is to place the shared file in a directory to which only root
should have access (in this case /var/run/).

This bug was reported, and the fix suggested, by Steve Kemp
<skx@debian.org>. Thanks!

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-23 09:26:43 +01:00
Keir Fraser de91f88afe vt-d: Fix PCI=device parsing.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-10-22 14:26:45 +01:00
Keir Fraser bdeaa9684d A few small fixes for xenstored:
- Proper sizeof parameter to snprintf
 - Return proper xs_domain_dev for netbsd.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-22 14:22:39 +01:00
Keir Fraser e38bd7ef8e ia64: Fix ia64 PV domain creation with new vhpt-size parameter.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-10-22 14:21:13 +01:00
Keir Fraser 808c9bd490 ia64: make buffered pio aware of save/restore.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-22 09:42:49 +01:00
Keir Fraser 1934a762f0 ia64: Add HVM_PARAM_BUFPIOREQ_PFN constant.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-22 09:41:25 +01:00
Keir Fraser 88561d3058 hvm: Fix PCI-passthru string parsing.
Fixes crash of xend during HVM domain ccreation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-20 09:30:00 +01:00
Keir Fraser 07f557cb63 Replace sysctl.physinfo.sockets_per_node with more directly useful
sysctl.physinfo.nr_cpus. This also avoids miscalculation of
sockets_per_node by Xen where the number of CPUs in the system is
clipped.
From: Elizabeth Kon <eak@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-19 18:00:10 +01:00
Keir Fraser 15f1e5e394 vt-d: Detect and report failure to assign a pass-thru PCI device.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-10-19 09:31:03 +01:00
Keir Fraser 753df0d608 ia64: configure VHPT size per domain: common part
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2007-10-19 09:27:55 +01:00
Keir Fraser cefbbff3f5 tools: Remove bogus external uses of xc_private.h. Clean up libflask.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-18 15:12:03 +01:00
Keir Fraser 3e43914aa8 Fix xenstore unwatch with node name starting with "@"
Watch node starting with "@" should not be canonicalized.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2007-10-17 10:02:49 +01:00
Keir Fraser d62f502aaa hvm: TCGBIOS fixes
Fix IPL measurement of El Torito CD boot and some eventlog formats.

The TCG BIOS extensions are described here:
https://www.trustedcomputinggroup.org/specs/PCClient/TCG_PCClientImplementationforBIOS_1-20_1-00.pdf

- fix cdrom (El Torito) boot (8.2.5.6 El Torito, p63)
   tcpa_ipl() is modified to support various boot devices.
   move some measurement code into cdrom_boot() function.
- fix EV_IPL (0Dh) event (10.4.1 Event Types, p76)
   eventfield size should be zero
- fix EV_SEPARATOR event (3.2.2 Integrity Collection and Reporting,
   p32)
   change eventfield to -1 (0xFFFFFFFF)  from  "---------------"
- add "Returned INT 19h" event (8.2.3 Logging of Boot Events, p59)
   actually, tcgbios does not call int19h, but we extend this
   tentatively

Signed-off-by: Seiji Munetoh <seiji.munetoh@gmail.com>
2007-10-17 10:00:27 +01:00
Keir Fraser d61d5e12e1 xend: xenapi: Suspended domain causes fault if vif.get_all_records() is called
A single suspended domain on the system causes a fault when
vif.get_all_records() is called since this returns an ErrorDescription
and no 'Value' in the 'v' dictionary. This patch now returns a 'None'
as Value which might not be optimal but better than faulting.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-16 17:41:33 +01:00
Keir Fraser 43e55cbba8 xend: Clean up hvm_build Python wrapper. Python code can get/set hvm
params directly.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-16 10:27:55 +01:00
Keir Fraser a5ed18b7c4 ioemu: Allow xvd* to co-exist with hd*.
- Whether hdN is defined first is checked.
 - If hdN is defined, xvdN is not replaced with hdN.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2007-10-16 09:40:08 +01:00
Keir Fraser 055562320a ioemu: Add keymap definitions to the Dutch Belgium keymap file.
Signed-off-by: Pat Campbell <plc@novell.com>
2007-10-15 14:03:08 +01:00
Keir Fraser 77b1ee94c3 ioemu: Allow blktap to be able to be booted as system volume for PV-on-HVM
- All xvdN disk is looked like hdN.
 - All tap disks are checked.(tap:aio, tap:sync, tap:vmdk, etc.)

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2007-10-15 12:24:35 +01:00
Keir Fraser ac2a30fcff libxc: Avoid overflow in xc_domain_dumpcore_via_callback().
nr_pages*PAGE_SIZE can overflow a 32-bit long.
From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-15 12:20:43 +01:00
Keir Fraser e972f8be18 xend: Fix file resouce leak on resume of suspended managed domains.
When a suspended managed domain is resumed, the checkpoint file is
removed, but xend retains a reference to the removed file. This
represents a resource leak. Fixed by ensuring that the file reference
is closed correctly.

Signed-off-by: Gary Pennington <gary.pennington@sun.com>
2007-10-12 14:30:41 +01:00
Keir Fraser 1a55b4207e [vTPM] Add set/get_other_config to Xen-API.
Add get_- and set_other_config methods to the vTPM class. Write the
parameters into the xenstore while the domain is running prefixing it
with 'oc_'. Also I add the methods to the C library as well as the
documentation.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-11 09:41:16 +01:00
Keir Fraser 58bf4b2aff ia64: Fix help message of xenitp.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2007-10-10 13:17:42 +01:00
Keir Fraser 3e1c252345 xend, xsm: Lock domain access while modifying policy.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-08 13:43:17 +01:00
Keir Fraser f15dc94bec xend: Remove unused xoptions.netback_type.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-08 10:57:32 +01:00
Keir Fraser b2ac1c4e50 xenconsoled: portability fixes:
- Use openpty(), which does the same as the sequence
   of open(), grantpt(), unlockpt(), ptsname(), tcgetattr()
   simplifies code
 - Check return code from tcsetattr()
 - sprintf() -> snprintf()
 - OpenBSD lacks POSIX grantpt() and unlockpt()
   requires use of openpty()
 - Solaris lacks POSIX openpty() via feedback from SUN (John Levon)
   implement openpty() for Solaris, tested and ok'd by SUN (John
   Levon)

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-08 10:55:50 +01:00
Keir Fraser f94f6e258d Remove tabs from python scripts xenmon and xentrace_format.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-10-08 10:47:58 +01:00
Keir Fraser 10f71216a1 Fix domU reboot failure when using "pci=" option
The failure only happens on the second or later auto reboot.
See the following thread for a long discussion on this issue where
most problems were fixed.

http://lists.xensource.com/archives/html/xen-users/2006-05/msg00154.html

Signed-off-by: Charles Arnold <carnold@novell.com>
2007-10-08 10:46:45 +01:00
Keir Fraser 711f622729 Initialize last_error in libxc.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-10-05 14:39:40 +01:00
Keir Fraser f056fc9b80 xenstore: sprintf->snprintf, and fix for OpenBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-05 14:11:36 +01:00
Keir Fraser 6e91413a40 [NW scripts] Choose alternative interface if NFSroot is used.
Allow the network bridging setup script to choose an alternative
network interface if it is determined that the root is mounted using
NFS, which is assumed to be done over the NIC serving the default
gw. In this case the prefix of the device is used to find other
devices, i.e., if eth0 is the default device an alternative device may
be an other ones starting with 'eth'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-05 10:31:25 +01:00
Keir Fraser a687f4cc2f xsview: a xenstore viewer written in PyQT.
From: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-04 13:52:51 +01:00
Keir Fraser 523a607a40 xenbaked: Fix for new trace format.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-10-04 09:38:40 +01:00
Keir Fraser b470f96ea7 [hotplug scripts] Unlock the 'block' lock before bailing.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-04 09:37:33 +01:00
Keir Fraser 6f10c4bf8d xm: Add accel option to xm network-attach.
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
2007-10-03 14:56:31 +01:00
Keir Fraser 5d76b407ef Merge with ia64 tree. 2007-10-03 14:07:30 +01:00
Keir Fraser 905654ba54 xend: Check access to the privcmd interface before doing the call to
fetch the currently enforced policy. Assign 'INACCESSIBLE' to the
policy if it cannot be retrieved due to the user not being
privileged.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-10-03 14:06:06 +01:00
Keir Fraser 8950f5c6ba Extend 'xm dumppolicy' to support Xen-API
I am extending 'xm dumppolicy' to be used via the Xen-API. For this
there are two new functions in the ACM policy class:
 - get the currently enforced policy including statistical data from
   the hypervisor
- get the ACM 'ssidref' of a Domain. Since this may be a ACM-specific
  variable or type (int) I put it into the ACM class.

I extended the Xen-API documentation with the two new functions.

Signed-off-by: Stefan Berger <Stefanb@us.ibm.com>
2007-10-03 14:04:51 +01:00
Alex Williamson 3abc3aea3f merge with xen-unstable.hg (staging) 2007-10-02 11:31:55 -06:00
Alex Williamson 73b8b5f654 [IA64] xenitp improvements
Remove all the casts by using char * instead of unsigned char *.
The go command now accept a number.
The disass command can now accept a range.
Number of TRs is not hard-coded.
'-' (minus) can now be used in expressions.
'$iip' and '$b0' can be used in expressions.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-10-02 09:31:45 -06:00
Alex Williamson c2d2f8a446 [IA64] xenitp: Display symbolic names of cr.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-10-02 09:20:41 -06:00
Keir Fraser 9d6b92ef1a xentop: Flush batch output on SIGTERM or SIGINT.
Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
2007-10-02 13:19:25 +01:00
Keir Fraser 01025319d1 xend: Fix name/uuid uniqueness checks.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-02 10:01:10 +01:00
Keir Fraser c3aaa708a8 Revert 15642:207582c8d88b532783da5c6f5839336187556f0a.
This patch is now bogus since 15168:a717cb2fac90 is reverted
by 15973:8817a53c030f.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-10-02 09:59:39 +01:00
Keir Fraser 36f49d79ff Fix external-device-migrate infinite loop.
For some (yet) unknown reason extern-device-migrate is called
twice, once with a missing domname argument.

The following invocation loops forever:
 external-device-migrate -domname
because "shift 2" never shifts ($# < 2) and $# is always 1.

From: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-02 09:56:53 +01:00
Keir Fraser 0741e7c237 xenctx: Print EFLAGS for i386 and x86/64.
From: Peter Johnston <pjohnston@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-02 09:41:10 +01:00
Keir Fraser d17d80e847 xentrace: Fix xentrace_format for new file format.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-10-02 09:31:40 +01:00
Keir Fraser bd1bd9290f xentrace: Fix man page (remove xentrace_cpuinfo(1)).
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-10-02 09:30:36 +01:00