Commit Graph
17722 Commits
Author SHA1 Message Date
Keir Fraser ea3cb6b367 VT-d: Improve page table debug output
Ignore 'current' domain when dumping VT-d page tables.  Also add page
type summary for domain pages output.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:35:05 +01:00
Keir Fraser 70a2ba87b7 Fix iommu_unmap_page for VT-d
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:27:48 +01:00
Keir Fraser e144438c70 Remove physmap page upon granttab xfer
Mapping should be removed from current domain's p2m table when doing a
grant table transfer.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-24 09:25:04 +01:00
Keir Fraser b9920f5849 minios: Fix width of shifted 1
Shifting 1 more that 32 bits requires 1 to be long-typed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-24 09:24:25 +01:00
Keir Fraser 74c4a80c2b Cx fix - Add wrap-back calculation for 24b PM timer ticks.
Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-05-24 09:23:40 +01:00
Keir Fraser e1845bbe73 hvm: Build guest timers on monotonic system time.
Move hvm platform timers from underlying physical CPU TSC to Xen
system time and ensure domain-wide monotonicity. TSC on many systems
may skew between processors leading to 'time going backwards' messages
from some guests.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-24 09:27:03 +01:00
Keir Fraser d0f28d825e x86_emulate: Check single-step status at instruction start rather than end.
This fixes booting of FreeDOS with HIMEM.SYS enabled.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-24 08:54:59 +01:00
Keir Fraser 67ea9d3b8c rombios: Remove annoying 3-second boot delay waiting for user to hit
F10 to select boot device. This will be rarely used, and it is
possible to hit F10 before the message is displayed and the keypress
will still register. So in practice it is quite possibel to use this
boot feature reliably without needing a multi-second delay.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 11:58:08 +01:00
Keir Fraser 0f6dc9bea6 x86: Fixes to VLAPIC and S3 state resets.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 11:46:36 +01:00
Keir Fraser 2b2408c987 x86: Fix Xen boot on 8-node AMD machines
In xen/arch/x86/cpu/amd.c the function disable_c1_ramping iterates
over the northbridges using NR_CPUS as an upper bound for the number of
nodes. If there are no more northbridges found, it stops iterating.
Sadly it just adds the northbridge number to 0x18 and uses this as a
PCI device number, so probing the 9th northbridge on an 8 node system will
be caught by the newly inserted assertion in pci_conf_read in current
unstable. We fix this by first querying the number of nodes from the
first northbridge to avoid the overflow.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Verified by Mark.Johnson@sun.com
2008-05-23 11:15:19 +01:00
Keir Fraser 407c970b52 xend: Import TRIGGER_S3RESUME and HVM_PARAM_ACPI_S_STATE into XendDomain.py.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 10:57:03 +01:00
Keir Fraser 30be3112c6 rools/examples: Fix 'make install'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 10:47:16 +01:00
Keir Fraser eea031f921 Add -s --ssl option to xm migrate
This patch adds -s --ssl option to xm migrate. It will override
xend-relocation-ssl setting in /etc/xen/xend-config.sxp.

When mix deploy xen 3.2 and xen 3.3 servers, it's convenient to have a
command line option rather than modify /etc/xen/xend-config.sxp every
time.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 10:42:11 +01:00
Keir Fraser d6f7e230eb Make ssl relocation server listen on different port
This patch makes ssl relocation server listen on 8003 if enabled.

Whether to start ssl relocation server now controlled by
xend-relocation-ssl-server. So ssl and non-ssl relocation server can
run simultaneously. You can also only start ssl server or only start
non-ssl relocation server.

When mix deploy xen 3.2 server (has no ssl support) and 3.3 servers,
start ssl and non-ssl relocation server simultaneously can keep
backward compatibility.

It's also more reasonable to have separate ports for ssl and non-ssl.

In this patch, also renames xend-relocation-tls to xend-relocation-ssl.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 10:41:44 +01:00
Keir Fraser 1580fd56fd tboot, s3: Fix S3 issue of Xen and tboot, since the structure
acpi_sleep_info is changed but some of the code in Xen is not
synchronized up with this change, which causes Xen S3 failure.

Signed-off-by: Shane Wang <shane.wang@intel.com>
2008-05-23 09:48:44 +01:00
Keir Fraser 80a73755d2 Remove xend-config-xenapi.sxp and xm-config-xenapi.xml
The contents of these two files are duplicate of xend-config.sxp and
xm-config.xml. They only add maintaining burdens to developers.

This patch removes them permanently.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-23 09:47:45 +01:00
Keir Fraser d18d24fd1e stubdom: fix constructors/destructors in 64bit mode
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:57 +01:00
Keir Fraser 700f9d1bcf stubdom: fix and clean pthread minimal support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:43 +01:00
Keir Fraser 8543c562dd stubdom: complete libxc support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:23 +01:00
Keir Fraser 45ea543412 xend: fix automatic vcpu NUMA placement
The automatic NUMA placement code (find_relaxed_node) in
XendDomainInfo.py contains several bugs:
1. The domain just created shall not be considered in the load
calculation.
2. Nodes with too less memory for the domain must be considered during
the load calculation phase and abandoned later, currently these nodes
win with a load of 0.
3. CPUs which are offline shall not be considered in load calculation.
4. (Integer-)Dividing the load value by the number of cores per node
may conceal subtle load differences resulting in a non-optimal node to
be chosen.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2008-05-22 15:11:06 +01:00
Keir Fraser a93dfae74e libxc: drop double un?lock_pages definition to fix static linking
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:09:49 +01:00
Keir Fraser cf6e75bd08 stubdom: support constructors and destructors
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:09:08 +01:00
Keir Fraser 178dcab520 ioemu: drop unused shared_vram variable
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:08:48 +01:00
Keir Fraser 90ac793688 shadow: check for gfn_to_mfn returning INVALID_MFN
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:08:14 +01:00
Keir Fraser b6615aaac9 hvmloader: Fix pci_setup() to not skip BAR remapping for virtual VGA devices.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-22 11:04:02 +01:00
Keir Fraser 6055fb83ae x86: Change a local label in asm entry stubs to really be local.
This prevents it appearing in crash traces, where it can be a bit confusing.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-22 10:41:49 +01:00
Keir Fraser 5df6162403 x86: Remove 32-bit non-PAE code from dom0 builder, and avoid use of
get_page_type() on pagetable pages (pending support for preemptive
get_page_type(), as dom0 builder would be an awkward place to deal
with preemption).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-22 10:40:40 +01:00
Keir Fraser 2ce4e98c30 libxc, x86: Fix CPUID inline asm for x86/64.
Must save all 64 bits of RBX, not just the EBX sub-part.

Based on bug diagnosis and patch by Juergen Keil <jk@tools.de>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 16:55:11 +01:00
Keir Fraser e6b2e11c90 hvmloader: Lay out memory a bit differently -
* Cleanly define a scratch area for temporary storage
 * Raise Etherboot ROM out of the way of larger VGA BIOSes

Also detect virtual VGA adaptors more cleanly.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:23:03 +01:00
Keir Fraser e3bfa63c44 vgabios: Support VESA power management extensions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:19:41 +01:00
Keir Fraser 1357edf0df Handle IOMMU pagetable allocations when set_p2m_entry is called with
non-zero page order.
Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:07:23 +01:00
Keir Fraser 1a3f428d36 Intel EPT: Add page shattering logic for EPT when a super-page gets partially freed.
Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
2008-05-21 11:02:51 +01:00
Keir Fraser f219d911b7 Add statistic interface for cx.
Implement statistic interface for cx via sysctl & libxc. Provide a
easy way to collect processor cx info within dom0.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-05-21 10:59:49 +01:00
Keir Fraser c8ddf206ac x86: Make cx key handler print simpler but formatted info.
Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-05-21 10:59:00 +01:00
Keir Fraser da61293b33 xend: Remove XendLogging dependency from a couple of generally useful
support modules.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-21 10:57:08 +01:00
Keir Fraser f505be0a58 x86: Fix lapic timer stop issue in deep C state
Local APIC timer may stop at deep C state (C3/C4...) entry/exit. this
patch add the logic that use platform timer (HPET) to reenable local
APIC timer at C state entry/exit.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 10:38:57 +01:00
Keir Fraser 306921aa6f xend: Support HVM S3 resume.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:50:45 +01:00
Keir Fraser 232cae0f1c hvm: rombios interface for HVM S3
- add S3 package in ACPI DSDT table. Guest OS will get S3 value from
   this package and write the value to PM1A control register to
   trigger S3 suspend.
 - Add S3 resume logic in rombios post code. the CMOS shutdown register
   is used to indicate if this is a S3 resume.
 - if it is s3 resume, rombios will get wakeup vector from ACPI FACS
   table and jump to wakeup vector. Per ACPI spec, the wakeup vector
   jumping must be the forms CS:IP, in which CS=3D(wakeup vector>>4)
   IP=3D(wakeup vector)&0xF, for example, for vector=3D0x12345,
   CS:IP=3D0x1234:0x5

Note: clobber_entry_point will clobber the post entry, which make S3
resume not work. We will directly jmp to POST Entry if it in S3
Resume path.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:36:05 +01:00
Keir Fraser 367722ab70 ioemu: HVM virtual S3
- add S3 suspend logic in PM1A control register. when guest write
    specific value to this register,
    QEMU will trigger S3 sleep by
    * reset all qemu device
    * set CMOS shutdown status as S3 resume, so that rombios will do
      S3 resume later
    * request Xen to S3-suspend the guest

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Liping Ke <liping.ke@intel.com?
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:28:19 +01:00
Keir Fraser 4f050d52f5 xend: Fix bugzilla bug #1253.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-20 14:18:32 +01:00
Keir Fraser 509529e991 x86 hvm: Xen interface and implementation for virtual S3
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:17:15 +01:00
Keir Fraser cc62c82dd2 Merge with ia64 2008-05-20 09:55:50 +01:00
Keir Fraser 07a57a397e xm migrate: Better error report when attempt to migrate non-running domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-20 09:43:02 +01:00
Keir Fraser 7087fca7e1 ioemu: Fix interpretation of missing or zero vfb videoram
Changeset 17289:d97e61001d81: introduced vfb configuration parameter
videoram, defaulting to zero.  Value zero was interpreted as
unlimited.  Changeset 17630:53195719f762 accidentally dropped the
special case for zero, which broke guests that don't specify videoram,
or specify videoram=0.  Restore the old behavior.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2008-05-20 09:41:52 +01:00
Isaku Yamahata f1734953c7 merge with xen-unstable.hg 2008-05-20 11:33:15 +09:00
Keir Fraser 8ef19bcf73 svm: Better handling of NMI injection -- avoid nested NMIs.
We do this by emulating the NMI mask which blocks NMI delivery until
next IRET on native hardware.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-19 10:03:26 +01:00
Keir Fraser a7b0dfd0b3 Fix showing of CPU Affinity by xm vcpu-list
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-19 09:46:02 +01:00
Keir Fraser e70a0fa88c x86: Fix kexec reservation
The reservation of space for the kexec area in
kexec_reserve_area is incorrect. It specifies the
start address and size to reserve_e820_mem when
the args should be start and end.

Bug found and fixed by Dave Anderson.

Signed-off-by: Bill Burns <bburns@redhat.com>
2008-05-19 09:43:42 +01:00
Keir Fraser c1ab310e08 ioemu: Fix load of PCI-device IRQ state after save/restore.
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-19 09:42:18 +01:00
Keir Fraser ff66eaed97 stdvga: handle 64bit io operations
Handle 64bit operations in stdvga instead of throwing away the
upper 32bits.

This fixes some noisy xen messages like "invalid io size: 8".

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-05-19 09:40:53 +01:00