Commit Graph
926 Commits
Author SHA1 Message Date
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 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 74f3e60d7c hvm: Avoid need for ugly setcpucontext() in HVM domain builder by
pre-setting the vcpu0 to runnable inside Xen, and have the builder
insert a JMP instruction to reach the hvmloader entry point from
address 0x0.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-01 15:12:05 +01:00
Keir Fraser 10dcd077d2 libxenctrl: Fix lock_pages()/unlock_pages() region-size calculation.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-01 13:18:19 +01:00
Keir Fraser 3a0667d17e libxc: NetBSD-specific pieces.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 13:45:57 +01:00
Keir Fraser 807d262e0a libxc: improve error message when starting a domain and mmap() fails
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-21 17:23:35 +01:00
Tim Deegan 120bafda14 [TOOLS] Make xc_domain_{save, restore} understand compat guests
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-19 17:44:23 +01:00
kfraser@localhost.localdomain 72f379b5b2 libxc portability fixes for NetBSD.
- use MAP_ANON, that is what both (BSD-)Unix and Linux have
 - change last_error handling to use pthreads
 - round mlock() parameters to page alignment
 - cleanup: No need to include <xen/sys/privcmd.h>
            a second time in xg_private.h

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-19 15:42:56 +01:00
kfraser@localhost.localdomain 2af556c077 Log an error when enabling shadow mode fails for live relocation.
Signed-off-by: Doug Merrill <dpmerrill@novell.com>
2007-09-18 15:11:39 +01:00
kfraser@localhost.localdomain 9e6ca368e2 PCI passthru: tools changes (generic and vt-d)
I have added CONFIG_PASSTHROUGH in ioemu/Makefile.target and
ioemu/hw/pc.c in attached vtd_tools2.patch.  This should turn off
libpci usage by default until user specifically enables it.

This can be safely check-in without breaking builds for people who do
not care about pass-through devices.  I will try to think of a better
way to enable this.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-14 16:39:27 +01:00
Alex Williamson 37eb10eb59 [IA64] Use xc_map_foreign_pages() in copy_from_GFW_to_nvram()
use xc_map_foreign_pages() where possible

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-10 13:56:34 -06:00
Alex Williamson a3b952728b merge with xen-unstable.hg (staging) 2007-09-07 13:56:50 -06:00
kfraser@localhost.localdomain 05cf544b87 xc_map_foreign_pages(), a convenient alternative to xc_map_foreign_batch()
xc_map_foreign_batch() can succeed partially.  It is awkward to use
when you're only interested in complete success.  Provide new
xc_map_foreign_pages() convenience function for that kind of use.
Also convert two obvious calls to use it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2007-09-07 11:39:10 +01:00
Alex Williamson e122097794 [IA64] Foreign p2m: make xc_ia64_get_pfn_list() static
Now xc_ia64_get_pfn_list() isn't used anymore.  Make it static.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:04:07 -06:00
Alex Williamson 567b053811 [IA64] Foreign p2m: rewrite save/restore with foreign p2m
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:36:13 -06:00
Alex Williamson 254e1c1902 [IA64] Foreign p2m: xc_core: ia64 xc_core_arch_gpfn_may_present()
Prevent warning message when xm dump-core
Using foreign p2m exposure, we can avoid to map the page which isn't allocated.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:32:54 -06:00
Alex Williamson 04284d57f2 [IA64] Foreign p2m: libxc side
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 14:37:50 -06:00
Alex Williamson 6a9db78fbf [IA64] Foreign p2m: Fix vti domain builder.
It should set arch_domain::convmem_end.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 13:48:43 -06:00
Alex Williamson 813d34b4d0 merge with xen-unstable.hg (staging) 2007-09-06 12:05:15 -06:00
kfraser@localhost.localdomain 0269e41669 libxenctrl: xc_destroy_domain() handles EAGAIN.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-31 15:43:28 +01:00
kfraser@localhost.localdomain 61c6564d34 Cleanups after XSM checkin.
Signed-off-by: Keir Fraser <keir@xensource.com>

--HG--
rename : xen/include/public/acm.h => xen/include/public/xsm/acm.h
rename : xen/include/public/acm_ops.h => xen/include/public/xsm/acm_ops.h
rename : xen/include/acm/acm_core.h => xen/include/xsm/acm/acm_core.h
rename : xen/include/acm/acm_endian.h => xen/include/xsm/acm/acm_endian.h
rename : xen/include/acm/acm_hooks.h => xen/include/xsm/acm/acm_hooks.h
2007-08-31 12:05:07 +01:00
kfraser@localhost.localdomain 670a6002b9 Xen Security Modules: ACM.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-08-31 11:41:49 +01:00
kfraser@localhost.localdomain 75dabf614d Introduce xc_core_arch_gpfn_may_present() hook.
On ia64 trying to map a foreign domain page which isn't allocated
cause annoying warning message. xm dump-core results in too many
warnings. With this hook, ia64 dump-core can suprress warning.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-30 15:00:21 +01:00
kfraser@localhost.localdomain 0e0204500e Optimize xc_core.c implementation.
Optimize out unnecessary map/unmap foreign domain page
by moving p2m/pfn talbe after pages array.
This patch doesn't change the xm dump-core format.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-30 14:58:40 +01:00
kfraser@localhost.localdomain c583625712 Some minor cleanup of xc_core.c.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-30 14:57:24 +01:00
Alex Williamson 200472a35b [IA64] Move nvram from /usr to /var
Presently nvram is stored in /usr/lib/xen/boot/nvram_<domain> next to the guest
firmware.  This violates the FHS because /usr might be mounted read-only.  This
patch moves the nvram storage to /var/lib/xen/nvram/nvram_<domain>

Also clean up:
- references to stat_buf assumed that stat() had succeeded; use access()
  instead since it's easier and doesn't require stat_buf at all
- nvram_path[PATH_MAX] instead of nvram_path[100]
- strncpy(..., strlen(src)) is meaningless, re-order length tests to work
  correctly

Signed-off-by: Aron Griffis <aron@hp.com>
2007-08-28 12:25:37 -06:00
Alex Williamson 4634c6b2d5 [IA64] Fix parallel build; directory must exist before making symlink
Signed-off-by: Aron Griffis <aron@hp.com>
2007-08-28 12:24:27 -06:00
Alex Williamson f1d108148e [IA64] Clean up NVRAM failure case
copy_from_GFW_to_nvram() in libxc forgot munmap() if NVRAM data
invalid.  Also it forgot free() and close() too.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-08-24 15:09:14 -06:00
kfraser@localhost.localdomain 807d8048a2 libxc: Various xc_evtchn_* functions must return signed integer type.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-14 09:21:39 +01:00
Ian Campbell 16e00ecd92 Do not clobber new wallclock offset on restore.
The new hypervisor will set shared_info->wc_* so do not clobber those
values with the saved versions from the old hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-08-08 15:03:40 +01:00
kfraser@localhost.localdomain 5a9b83aea8 domain builder: Zero start_info struct.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-03 12:23:03 +01:00
kfraser@localhost.localdomain bd51a860fa [IA64] Fix tools build.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-08-01 08:57:55 +01:00
kfraser@localhost.localdomain 9b10f22848 Move generate_acpi_checksum() from ia64 code to common.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2007-07-30 10:59:27 +01:00
kfraser@localhost.localdomain fa88310477 [LIBXC] Fix xc_map_grant_refs() function.
This patch fixes the xc_map_grant_refs() function, which would fail
because, instead of passing the malloc()-ed ioctl argument pointer to
the ioctl, the address of this pointer was being passed instead.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
2007-07-12 14:14:29 +01:00
kfraser@localhost.localdomain 7263c43515 Merge with ia64 xen tree. 2007-07-12 09:53:58 +01:00
kfraser@localhost.localdomain 4871e12b20 Add new domctl hypercall to expose current heap values. This
functionality is needed for probing how much memory is available in a
given node prior to VM creation.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-11 13:03:57 +01:00
Alex Williamson 2cae8465ac merge with xen-unstable.hg 2007-07-10 08:39:26 -06:00
Keir Fraser 43aa5ed8c0 Specify -fno-strict-aliasing in root build config file.
Fixes correctness issues with xenstored and gcc-4.2.

Original patch by Charles Coffing <ccoffing@novell.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-07 10:31:15 +01:00
kfraser@localhost.localdomain be259653f3 Extended the physinfo sysctl to export NUMA cpu_to_node topology info.
Print this in 'xm info'.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-06 16:12:07 +01:00
kfraser@localhost.localdomain ac9fcaa957 Export debugger attached state to xc API.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-07-06 14:42:55 +01:00
Alex Williamson 19472a02dd merge with xen-unstable.hg 2007-07-02 12:19:26 -06:00
Alex Williamson b624e17e3d [IA64] Fix incorrect NVRAM saving if domain is destroyed by config error
Nvram saving is always executed even if a domain is destroyed by a
configuration parameter error.  In this case, Nvram saving function
will get a bad address for the NVRAM data and save garbage into the
NVRAM file. Configuring a wrong vif parameter can expose this issue.

This patch fixes the issue by adding an address check function in
NVRAM saving path.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2007-07-02 09:05:24 -06:00
Keir Fraser 41b3adc925 More getcpuinfo sysctl cleanup.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-27 21:43:43 +01:00
Steven Hand 3bc33badf2 Add new sysctl to return runtime information about physical CPU utilization.
Signed-off-by: Steven Hadn <steven@xensource.com>
2007-06-27 21:01:08 +01:00
Alex Williamson 0aa79431e8 libxc: Add xc_domain_setdebugging in xenctrl API
Use it in xc_ptrace.c

Signed-off-by: Tristan Gingold <tgingold@free.fr>
Acked-by: Keir Fraser <keir@xensource.com>
2007-06-26 16:18:28 -06:00
kfraser@localhost.localdomain 5a07d757fb libxenguest: Add another range check to dom restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-21 12:10:01 +01:00
kfraser@localhost.localdomain 284d8c4881 libxenguest: Add missing range-check on count field read from a domain
save/restore file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-21 09:47:39 +01:00
Alex Williamson 4f27e3fe03 merge with xen-unstable.hg 2007-06-20 12:49:27 -06:00
kfraser@localhost.localdomain 310da2e989 tools: Fix compiler warning.
From: Charles Coffing <ccoffing@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-19 15:55:13 +01:00
Alex Williamson ea203ff9ad [IA64] Typo fix: avoid spurious errors.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-06-18 13:36:36 -06:00