Commit Graph
15876 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 337e2014c7 Fix memory leak in xend
I found that xend's memory usage grows considerably when running a
script such as

while true; do xm new foo ; sleep 2s; xm delete foo ; sleep 2s; done

XendAPIStore maintains a list of class instances and in the case of
new/create operation, an associated VMMetrics object is stashed in the
list but never removed on delete/shutdown.  This patch removes the
instance by invoking XendBase.destroy() method.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2007-09-11 13:41:15 +01:00
kfraser@localhost.localdomain 4a6a1afb1c Add 'type vnc' to vfb device sexpr for HVM guest
This patch adds 'type vnc' to vfb device sexpr for HVM guests.  PV
guests already contain this entry in sexpr, e.g.

    (device
        (vfb
            (vncunused 1)
            ...
           (type vnc)
            ...
        )
    )

Some tools, such as libvirt, look for device/vfb/type in sexpr before
publishing VNC port.  More importantly, this patch provides
consistency in vfb device sexpr between HVM and PV guests.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2007-09-11 13:40:44 +01:00
Tim Deegan e58cf9dbf9 Xend: "shadow_memory" setting in xm config is in MiB, not bytes.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-11 12:30:39 +01:00
kfraser@localhost.localdomain 9caf62ac13 x86: Clean up asm keyword usage (asm volatile rather than __asm__
__volatile__ in most places) and ensure we use volatile keyword
wherever we have an asm stmt that produces outputs but has other
unspecified side effects or dependencies other than the
explicitly-stated inputs.

Also added volatile in a few places where its not strictly necessary
but where it's unlikely to produce worse code and it makes our
intentions perfectly clear.

The original problem this patch fixes was tracked down by Joseph
Cihula <joseph.cihula@intel.com>.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-11 12:14:38 +01:00
kfraser@localhost.localdomain f7f39e3ac3 x86: Use halt() macro instead of direct HLT asm.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-11 11:21:44 +01:00
kfraser@localhost.localdomain 6c87e8965f xenstore: Remove incorrect comment.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-11 08:34:04 +01:00
Alex Williamson f012ee16fb merge with xen-unstable.hg (staging) 2007-09-10 13:58:56 -06: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 6dbb87d47b [IA64] Cleanup within vti code
Makes more functions/variables static.
Indentation changes to make the code easier to read.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-09-10 13:52:19 -06:00
kfraser@localhost.localdomain 4694a6028c x86: Cleanup system restart code, and wait 10ms for APs to offline.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-10 18:09:38 +01:00
kfraser@localhost.localdomain 78569aa816 x86: Handle 'self-IPI' on legacy UP systems with no APIC.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-10 17:49:58 +01:00
kfraser@localhost.localdomain 354aabe18a Change prototype of machine_restart to void machine_restart(void).
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-10 16:51:20 +01:00
kfraser@localhost.localdomain 840348501b vmx: Sync with SVM TPR/CR8 changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-10 16:13:35 +01:00
kfraser@localhost.localdomain 300b3c4607 svm: Greatly reduce total number of CR8 intercepts
This patch reduces the number of CR8 intercept to a fraction of the
number of CR8 intercepts without.  First, CR8 read intercepts are
completely disabled since the SVM vTPR is kept kept in sync with the
HVM vLAPIC TPR.  Second, CR8 write intercepts are enabled and disabled
based upon certain conditions.  Most of the time, CR8 write intercepts
are disabled.  They are enabled only when there is a pending interrupt
that can't be delivered because of either the current ISR or TPR (aka
PPR) because this is the only time the TPR matters.

With this patch, the number of CR8 intercepts dropped from around
10,000,000 to around 6,000 during boot of Windows 2003 Server 64-bit
(this is a rough estimate).

Signed-off-by: Travis Betak <travis.betak@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-10 16:13:13 +01:00
Tim Deegan fefbe3dfcf [HVM] Add type information to the p2m map.
This is a base for memory tricks like page sharing, copy-on-write, lazy
allocation etc.  It should also make pass-through MMIO easier to
implement in the p2m.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-09-10 14:42:30 +01:00
kfraser@localhost.localdomain 96f6ffe78c [libxen] Compilation fix.
On a clean system where no prior dev. version of libxen was installed,
the compilation fails due to a wrong include. This fixes it.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-10 13:59:46 +01:00
kfraser@localhost.localdomain 562f0fc31a Remove dead code in acpi sleep.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2007-09-10 13:43:19 +01:00
kfraser@localhost.localdomain 41e851f6ad Install xen/xsm headers to .../usr/include/xen/xsm/
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-09-08 10:06:15 +01:00
Alex Williamson a3b952728b merge with xen-unstable.hg (staging) 2007-09-07 13:56:50 -06:00
kfraser@localhost.localdomain e94e3f210a hvm: Fix up guest_table handling after p2m changes.
Fixes a host crash on HVM guest restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-07 19:54:29 +01:00
kfraser@localhost.localdomain 705f51e171 x86/32: Fix domain_relinquish_resources().
Fixes a host crash on preempted domain_kill().
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-07 19:53:57 +01: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
kfraser@localhost.localdomain 986fc80c68 Fix error message and wait time for xm block-detach command.
- Wait time
    When xm requests a block device detach to xend, xm makes two
    requests. At first, xm requests the block device detach by device
    class 'vbd'. Next, xm requests the block device detaching by
    device class 'tap'.
    As a result, the wait time is 200 seconds because each of
    the block device detaching requests causes time-out.
 - Misleading error message
    Because the last request is by device class 'tap' to xend,
    the keyword "(tap)" is included in the error message.

This patch fixes the number of times of the block device detaching
request to one time.  At first, xm makes inquiries about device
class of a detaching target device to xend.  Then xm requires the
block device detaching by xend returned device class.  The wait
time becomes 100 seconds because the block device detaching request
is one time.  And the error message is also fixed.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-07 11:30:18 +01:00
kfraser@localhost.localdomain 214523659d xend: Fix error message for xm trigger command.
When I tested xm trigger command with a wrong argument, I saw the
following error message.

 # xm trigger vm1 xyz
 Error: __init__() takes exactly 2 arguments (3 given)
 Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]

 Send a trigger to a domain.

This patch fixes the error message as follows.

 # xm trigger vm1 xyz
 Error: Invalid trigger: xyz
 Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]

 Send a trigger to a domain.

The type of "TRIGGER_TYPE" is dictionary.  domain_send_trigger()
refers to the keys of "TRIGGER_TYPE" without using keys() currently.
This patch adds keys() there.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-07 11:24:28 +01:00
kfraser@localhost.localdomain 95f83e447a xend: waitForDevices() on xm reboot.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-09-07 11:10:32 +01:00
kfraser@localhost.localdomain 038aa6bdc0 Fix xenstored's dup2() usage.
The dup2() calls had their arguments reversed. Also remove the
unnecessary close() calls.

Signed-off-by: John Levon <john.levon@sun.com>
2007-09-07 10:26:33 +01:00
kfraser@localhost.localdomain 05bc962b37 PV-on-HVM: Fix non-SMP build warning for PV-on-HVM drivers.
smp_call_function() compiles to nothing on non-SMP, so we had a
defined-but-not-used static function.

Based on an original patch by:
 Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
 Signed-off-by: Robert Phillips <rphillips@virtualiron.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-07 10:18:54 +01:00
kfraser@localhost.localdomain 787dcb588b Check for libxml2 if security tools are to be built, and adapt the
python setup.py command line parameters to also work under SuSE.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-07 09:48:35 +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 29581d5ed3 [IA64] Foreign p2m: test module
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 14:41:14 -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 8cd835c116 [IA64] Foreign p2m: xen side
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 14:13:38 -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 b0e541a0ae [IA64] Add missing continuable destroy domain chunk
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2007-09-06 12:57:13 -06:00
Alex Williamson 7b7ca8ee5c [IA64] fix build - missing include
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-09-06 12:35:22 -06:00
Alex Williamson 813d34b4d0 merge with xen-unstable.hg (staging) 2007-09-06 12:05:15 -06:00
kfraser@localhost.localdomain f0a09ab129 Fix domain restore after memory auto-balloon changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 18:26:45 +01:00
kfraser@localhost.localdomain 6325216369 Fix xm-test python import after XSM security changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 18:10:04 +01:00
kfraser@localhost.localdomain f3c0c0db25 [XSM] correctly rename, relocate and patch the security.py file
This patch corrects an error in the original XSM tools patch.  The
original patch did not rename, relocate and patch the security.py file
from changeset 15730:256160ff19b7.  This patch addresses this issue as
well as any updates made to security.py in xen-staging during the
merge of XSM.

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-09-06 18:05:18 +01:00
kfraser@localhost.localdomain 3b2aadebed [XSM] correctly located update_va_mapping hook within x86 ifdefs
The following patch addresses the issue where the XSM update_va_mapping
hook was not correctly located inside the x86 ifdefs.  Included are
updates for the dummy and flask modules which are also effected by
this issue.

    - update_va_mapping ifdef fix for xsm
    - update_va_mapping ifdef fix for dummy module
    - update_va_mapping ifdef fix for flask module

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-09-06 18:04:42 +01:00
Alex Williamson 0f227f8c82 [IA64] Supress warning of __assign_domain_page().
On Tiger, the following memory region triggers a warning.
It seems a false-positive warning caused by c/s 13123:90db0f68b121.
so suppress the warning in such a case.

EFI memory descriptor
(XEN) mem07: type= 5, attr=0x8000000000000009, range=[0x00000000000c0000-0x0000000000100000) (0MB)
type = EFI_RUNTIME_SERVICES_CODE
attribute = EFI_MEMORY_RUNTIME | EFI_MEMORY_WB | EFI_MEMORY_UC

from /proc/iomem
000a0000-000fffff : PCI Bus 0000:00
000c0000-000fffff : reserved

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
2007-09-06 09:05:26 -06:00
kfraser@localhost.localdomain 78669ef30b hvm: Ignore NMI deliveries for now, until hardware taskswitch is emulated.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 11:34:38 +01:00
kfraser@localhost.localdomain a65041a532 hvm: Remove hvm-specific NMI flag and use generic flag instead.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 11:31:02 +01:00
kfraser@localhost.localdomain 0671a3ce43 Delete flask tools build target and add to .hgignore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 11:23:43 +01:00
Ian Campbell 2c312d03cd Build libflask unconditionally since the python low-level tools
require it and it does't seem to pull in any major dependencies.

The alternative would have been to hack tools/python/setup.py to
conditionally compile the flask stuff.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-09-03 15:04:03 +01:00
Ian Campbell de73f4ddca Fix 64 bit build, cannot mix code and data declarations.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-09-03 14:58:35 +01:00
kfraser@localhost.localdomain 5e9e888e54 Implement x86 continuable domain destroy.
This patch addresses the following bug report.
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1037
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-31 17:00:11 +01:00
kfraser@localhost.localdomain 87a39e42b8 xend: Always build lowlevel security modules, as there are some
dependencies on these from with xend proper.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-31 16:50:26 +01:00