Commit Graph
944 Commits
Author SHA1 Message Date
Keir Fraser 1e76993878 libxc: Consistently print errno on write() error in domain_save code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-11 18:28:57 +00:00
Keir Fraser c316590403 libxc: Consolidate read()/write() syscall wrappers to read/write an
exact number of bytes. The consolidated versions are more watertight
than the various versions previously distributed around the library
source code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-11 18:22:33 +00:00
Alex Williamson f0ed01dec3 [IA64] vti save-restore: ia64 hvm builder clean up with respect to hvm params.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-11-07 10:34:09 -07:00
Keir Fraser ee41f1c835 Allow incremental access to hypervisor console log.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-29 12:56:27 +00:00
Keir Fraser af287919fd x86: Fix MTRR/PAT virtualisation on PAE
Various 'long's should be 'u64's.

Signed-off-by: Disheng Su <disheng.su@intel.com>
2007-10-26 10:00:10 +01:00
Keir Fraser 3d98e9d1ce x86: Save/restore new syscall/sysenter context info.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-25 14:24:52 +01:00
Alex Williamson 3aea90a30c merge with xen-unstable.hg (staging) 2007-10-23 11:27:56 -06: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
Alex Williamson 4924c08f4a merge with xen-unstable.hg (staging) 2007-10-22 13:57:08 -06:00
Alex Williamson 34070c37f5 [IA64] Don't share privregs with hvm domain
Don't share privregs with hvm domain and twist IA64 xen dump core format
slightly.  Xen shares privregs pages with IA64 HVM domain for xm dump-core
to dump the pages.  However sharing the page allows hvm guest domain
peek/destroy the page contents that might cause xen crash.  And the xen
dump core file doesn't need privregs page because cpu context should be
obtained from vcpu context in case of IA64 HVM domain.

Although this patch modify xen dump core format, current crash utility
(at least crash 4.0-4.7) doesn't look into .xen_ia64_mmapped_regs section
and I don't know any other tools to understand xen dump core file.
So this format modification doesn't cause incompatibility issue.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-22 12:26:53 -06: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
Alex Williamson 44d78108bf [IA64] vti domain save/restore: libxc: implement vti domain save/restore
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-21 14:57:13 -06:00
Alex Williamson 55235cc5ea merge with xen-unstable.hg 2007-10-21 12:10:25 -06: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 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
Alex Williamson 13a6f43276 [IA64] hvm domain builder clean up. use xc_vcpu_setcontext().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-12 14:17:00 -06:00
Alex Williamson 8c580e172b [IA64] Remove duplicate xc_get/set_hvm_param() definitions
Remove duplicated xc_get/set_hvm_param definition in xc_ia64_hvm_build.c
They are also defined in xc_domain.c.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-12 13:50:09 -06: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