Commit Graph
15603 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain f0a8a3f3fb [VTPM] Make vTPM hotplug scripts use the UUID of the vTPM instance
Make the vTPM hotplug script use the UUID of the vTPM instance for
associating it with its instance number rather than the name of the
domain.
Also change the cleanup in the xm test to use the atexit mechanism
rather than explicitly calling a function to clean up.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-17 10:33:26 +01:00
kfraser@localhost.localdomain 86de051ee1 Merge with PPC Xen tree. 2007-07-17 10:20:21 +01:00
kfraser@localhost.localdomain df4b2f1d63 hap: Fix for coding style.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-17 09:22:41 +01:00
Hollis Blanchard 2d9c9413ab [POWERPC][XEN] Use top-level CFLAGS.
- Append to CFLAGS instead of replacing it.
- Fix newly-exposed mixed statement/declaration warnings.
2007-07-16 14:20:16 -05:00
Tim Deegan d0706d17dd [HVM] Qemu rtl8139: correct rx CRC calculation
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-16 14:28:54 +01:00
Tim Deegan e7cd1bdfea [HVM] Qemu rtl8139: correct ring-buffer wrapping.
The rx DMA should never overrun when it hits the end of a 64k buffer
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-16 14:27:12 +01:00
Tim Deegan a7dcf2b9ce [XEN] HAP: need to intercept CR0 even when using NPT
because we tinker with CR0.TS.  Thanks to Wei Huang for pointing this out.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-16 10:36:52 +01:00
Keir Fraser 4f5db4762c Remove unused function reserve_boot_memory() and alloc_boot_low_page().
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-14 10:26:02 +01:00
Keir Fraser c3d1e4b95d xen: Fix 32-bit boot.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-14 08:19:17 +01:00
Hollis Blanchard 4d5616b775 [POWERPC][XEN] Enable in-guest performance monitoring.
- Lazily save and restore the performance monitor counters when switching
  domains.
- Control with the H_PERFMON PAPR hypercall.
- Ignore guest perfmon exceptions that land in Xen.
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2007-07-13 17:28:15 -05:00
Hollis Blanchard 83b975762f [XEN][POWERPC] Fix build after NUMA nodemask changes.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2007-07-13 15:23:24 -05:00
kfraser@localhost.localdomain c8700f9b1d Remove hard tabs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-13 17:08:05 +01:00
kfraser@localhost.localdomain 157d4e33cd x86/32: Limit bootstrap 1:1 mapping to 1GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-13 15:42:27 +01:00
kfraser@localhost.localdomain d8eb58d129 Implement domctl_sendtrigger_nmi for x86 hvm.
This patch implements DOMCTL_SENDTRIGGER_NMI hypercall for x86 hvm
domains. We can manually inject NMI into a domain by using
'xm trigger [domain] nmi [vcpu]'.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2007-07-13 13:49:08 +01:00
kfraser@localhost.localdomain 0a330b99ed Do not clobber AMD TSC offset on real-mode switch.
Signed-off-by: David Lively <dlively@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-07-13 13:46:49 +01:00
kfraser@localhost.localdomain 98ee5b6406 [Xend] Fix problem when destroying VMs using the Xen-API
When domains are destroyed/suspend-resume/migration using the Xen-API
things break due to the domid not having been reset. This patch fixes
this. This is the best place I found for fixing this problem. I could
not push this line into _stateSet() for the case of DOM_STATE_HALTED
and left a comment regarding this.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-13 13:43:29 +01:00
kfraser@localhost.localdomain 9de675c1b3 [Build] Remove ACM option for NULL and STE+CHWALL policy
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-13 13:42:41 +01:00
kfraser@localhost.localdomain 2b0134dd5a [ACM-security] Some fixes to tools.
- Allow multiple ChineseWallTypes in a VM labels
- check for surfacing exceptions in the python code
- check for array sizes in the XML DOM in python
- properly display the labels when doing 'xm list --label' in xm's
non-Xen-API mode
- rely on the security checking hooks in xend to check access to the
block interface rather than doing this in xm.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-12 16:07:28 +01:00
kfraser@localhost.localdomain b28538178f Fix PV-on-HVM driver build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-12 16:03:41 +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 1ec8644504 x86: Various cleanups around CR4 handling, cpu_possible_map, and VMX initialisation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-12 11:49:02 +01:00
kfraser@localhost.localdomain 8c3b910735 [Docs] Documentation of extension of the Xen-API for managing security policies
Provides an extension to the Xen-API documentation with the classes
and methods implemented for supporting of managing security policies
using the Xen-API.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-12 10:06:44 +01:00
kfraser@localhost.localdomain 7263c43515 Merge with ia64 xen tree. 2007-07-12 09:53:58 +01:00
Alex Williamson 293a2a481d [IA64] Fix VTi domain shutdown
Event channel destruction is now done earlier, this patch does
the corresponding modification in IA64 side. It fixes dom0 crash
when VTI destroyed.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2007-07-11 11:32:30 -06:00
kfraser@localhost.localdomain ff3e88f816 Convert __init into __devinit in wakeup path.
Need to ensure all the code slice in the wakeup path still
existing. For this purpose, we have to use __devinit instead
of __init, since the former is null for CONFIG_HOTPLUG while
the latter always causes related code to be free-ed after
first boot.

Later when adding __init to some function, be sure to consider
wakeup case and cpu hotplug!

Signed-off-by <Kevin.Tian@intel.com>
2007-07-11 17:57:47 +01:00
kfraser@localhost.localdomain d53485d69b Provide cpu hotplug support to Xen. Note this hotplug
support is specific to PM, instead of for a run-time
single CPU hotplug which can be a separate task. See
embedded comment:

/*
 * XXX: One important thing missed here is to migrate vcpus
 * from dead cpu to other online ones and then put whole
 * system into a stop state. It assures a safe environment
 * for a cpu hotplug/remove at normal running state.
 *
 * However for xen PM case, at this point:
 *     -> All other domains should be notified with PM event,
 *        and then in following states:
 *             * Suspend state, or
 *             * Paused state, which is a force step to all
 *               domains if they do nothing to suspend
 *     -> All vcpus of dom0 (except vcpu0) have already beem
 *        hot removed
 * with the net effect that all other cpus only have idle vcpu
 * running. In this special case, we can avoid vcpu migration
 * then and system can be considered in a stop state.
 *
 * So current cpu hotplug is a special version for PM specific
 * usage, and need more effort later for full cpu hotplug.
 * (ktian1)
 */

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-11 17:48:10 +01:00
kfraser@localhost.localdomain 74eb7bf176 Pull necessary Linux CPU hotplug logic into Xen. Due to
distinct difference on basic hierarchy and features,
this pull is done on function level.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2007-07-11 17:28:09 +01:00
kfraser@localhost.localdomain 2f7228ccdc Add HVM hardware feature suspend/resume.
Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-11 17:23:09 +01:00
kfraser@localhost.localdomain d8c8fef090 Provide basic Xen PM infrastructure
Basic infrastructure for Xen S3 support with a common CPU
context save/restore logic for both 32bit and 64bit.

Wakeup code is split into two parts:
    - the first locates after trampoline code, to share all the
      tricks on the latter, like relocation base and identy mapping
    - the 2nd part locates in xen code segment, to do the actual
      CPU context restore

Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2007-07-11 15:47:14 +01:00
kfraser@localhost.localdomain ffc3f3c3db hvm: Re-introduce LPT1 device in ACPI tables.
Once the presence of LPT1 is baked into a Windows guest, it gets upset
if it is subsequently removed. Hence we add the 'LTP1' device object
back into the ACPI DSDT, and remove IRQ 7 from the list of IRQs usable
by the PCI-ISA links.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-11 13:49:11 +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
kfraser@localhost.localdomain 929990b940 [VTPM] Fixed typo in VTPM manager.
Replaces an instance of pthread_mutex_lock() that should be
pthreaad_mutex_unlock(). With thanks to our OpenTC partners at the
Technical University of Sofia, whose static analysis found this bug.

Signed-off-by: Derek G. Murray <Derek.Murray@cl.cam.ac.uk>
2007-07-11 10:56:52 +01:00
kfraser@localhost.localdomain 82bc60ea2e [xend] Fix xm trigger command for inactive managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-11 10:54:06 +01:00
kfraser@localhost.localdomain cff6d529f2 xend: Fix 'xm dumpcore' for inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-11 10:53:32 +01:00
kfraser@localhost.localdomain ae9db74d17 [xenstore] adds a -w (wide) flag to xenstore-ls to support seeing full
contents of xenstore entries. There is a bit of code cleanup as well
(snprintf vs. sprintf), one formatting fix, and comments).

There is no change to the behavior of xenstore-ls without -w.

Signed-off-by: John Zulauf <john.zulauf@intel.com>
2007-07-11 10:52:19 +01:00
kfraser@localhost.localdomain d7839765dc [XM] Tools support for extensions of the Xen-API for managing security policies
This patch adds a couple of new commands for using the Xen-API
extensions for security policies. Older tools are converted to support
going through the Xen-API for their operations rather than doing the
operations directly in their own code.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-11 10:49:43 +01:00
kfraser@localhost.localdomain fd0ba51b6e Make QEMU consistently report write caching support for emulated IDE
drives to fix a hang during SLES 9 HVM guest installation.

Without this, the SLES 9 installer kernels (32 and 64 bit) were
getting inconsistent information from QEMU as to whether the
(emulated) IDE drives support write caching (which they do).  So part
of the kernel thought write caching was enabled (and enabled the usage
of barrier writes) and part of it didn't, which triggered a bug in
which the same barrier write is submitted over and over again ...

Fixed by setting another bit in the WIN_IDENTIFY (IDE drive "identify"
command) response to indicate we really, truly support write caching.

Signed-off-by: David Lively <dlively@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-07-11 10:48:15 +01:00
kfraser@localhost.localdomain eecace9fde vmx: Stupid typo in BUG_ON() stmt.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-10 23:42:13 +01:00
kfraser@localhost.localdomain 907d3e969c vmx: Never use physical addresses above 4GB for VMCS state on i386.
Thsi requires special allocation of the vlapic regs page, but does let
us get rid of some top-half writes to a few VMCS fields.

Assert a few more facts about the VMX_BASIC_MSR.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-10 23:37:42 +01:00
Alex Williamson b86a0f3288 [IA64] Fixup physinfo
Use max cpus per node to guess at sockets per node.  This avoids
averaging problems with offline cpus and nodes without cpus.  Also
fill in the cpu_to_node array.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-07-10 11:15:54 -06:00
kfraser@localhost.localdomain 380ef0dc36 Simplify vmx host state setup code.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2007-07-10 15:45:44 +01:00
kfraser@localhost.localdomain afd3d1854c xenoprof: Fix initialisation. Much can be done at boot-time, as
indicated by the fact that the low-level functiosn are marked
'__init'.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-10 15:41:26 +01:00
Alex Williamson 2cae8465ac merge with xen-unstable.hg 2007-07-10 08:39:26 -06:00
kfraser@localhost.localdomain 24b297caea [libxen] C-bindings for the extensions of the Xen-API for managing security policies
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-10 14:57:04 +01:00
kfraser@localhost.localdomain 3432f42875 hvm: Fix memcpy_words() asm in ioemu.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-10 14:42:23 +01:00
kfraser@localhost.localdomain ad69a7e407 Re-factor e820 truncation code and reintroduce clipping for 32-on-64
guests (to 166GB).
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-10 11:10:38 +01:00
kfraser@localhost.localdomain 07f3760888 Xen API specification improvements.
Move the error list to be more prominent, and explicitly document
which generic error codes can be returned by all methods.

Mark host CPU flags/features return value as unspecified.

Document PERMISSION_DENIED.

Document error returns of session.login_with_password.

Signed-off-by: John Levon <john.levon@sun.com>
2007-07-10 10:22:41 +01:00
kfraser@localhost.localdomain 5410c03342 xend: Fix xm pause/unpause for inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-10 10:15:01 +01:00
kfraser@localhost.localdomain 503e2ed481 xend: Count CPUs rather than relying on a static
nodes/sockets/cores/threads relationship.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-07-10 10:13:16 +01:00
kfraser@localhost.localdomain a75c57c971 xm: Improve help message for vif creation.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-07-10 10:11:14 +01:00