Commit Graph
19478 Commits
Author SHA1 Message Date
Keir Fraser c2901a5cc4 hvmloader: ROMBIOS must POST in big real mode, since it supports PMM,
and hence Option ROMs can expect noi segment limit checks.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-31 14:04:50 +01:00
Keir Fraser 2fa8c71b9f xend: Fix domain creation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-31 13:57:11 +01:00
Keir Fraser 98da66a3bd build: Get rid of some more hardcoded install paths
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-31 13:30:50 +01:00
Keir Fraser e24c23a511 x86: Enable S3 for 32bit dom0 on 64bit Xen
Three SYSENTER MSRs should be taken care of at save/restore BSP
context, or else 32bit dom0 rejects working after S3 resume. Thanks
for Jan's help to find this missing part.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2009-03-31 13:28:45 +01:00
Keir Fraser 539cb7fec6 hvmloader acpi: Reserve ioport ranges for expanded PHP
Now there are two control registers plus one register for
each of the 32 PHP slots. A total of 34 registers. Accordingly the
ioport space required has expanded by from 3 to 34 bytes.

Signed-off-by: Simon Horman <horms@verge.net.au>

hvmloader acpi: Use If and Else instead of Switch

Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-31 13:27:03 +01:00
Keir Fraser 7f63859496 x86: unify BUG() & Co, reduce overhead on x86-64
Since it's only the string pointer representations that differ between
i386 and x86-64, abstract out those and make everything else shared.

While touching this code, also use
- proper instructions rather than a mixture of such and raw .byte/
  .long/.quad data emissions,
- PC-relative pointers on x86-64 to cut the amount of storage (and
  in particular cache space) needed for string references by half.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-03-31 13:23:11 +01:00
Keir Fraser ed25dad906 Use unlikely() in BUG_ON()/WARN_ON()
-fno-reorder-blocks was added in c/s 1712, when x86-64 just started to
become enabled. The reason it got added is entirely unclear to me, and
it prevents the intended effect of unlikely() constructs (in
particular
the ones added here) of moving out of line code which is expected to
never get executed, as well as using forward branches (which are
statically predicted taken by various processors' branch prediction
units) preferably to reach infrequently executed code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-03-31 13:22:12 +01:00
Keir Fraser 3f64466b4b ia64, pygrub: Allow command-line editing in Lilo boot loader
On IA64 platform reset() function has one more parameter for Lilo
bootloader used by IA64 than for GRUB bootloader used for other
platforms.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-03-31 13:21:36 +01:00
Keir Fraser f94d6532fc xend: less noise in xend-debug.log on HVM shutdown
Shutting down a hvm, xend-debug.log always shows:

Unhandled exception in thread started by=20
Traceback (most recent call last):
  File "//usr/lib64/python/xen/xend/image.py", line 549, in
  _sentinel_watch
    self._dmfailed(message)
  File "//usr/lib64/python/xen/xend/image.py", line 491, in _dmfailed
    xc.domain_shutdown(self.vm.getDomid(), DOMAIN_CRASH)
xen.lowlevel.xc.Error: (3, 'No such process')

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-03-31 13:20:04 +01:00
Keir Fraser 55ec31da6c xend: Check for valid CPU_CAP value when creating new domain
Signed-off-by: Michal Novotny <minovotn@redhat.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-31 13:19:07 +01:00
Keir Fraser f0367a76f0 x86 mce: fix and clean up c/s 19423
- fix inverted return value check for intel_mce_{rd,wr}msr()
- fix broken initialization of d->arch.vmca_msrs.mci_ctl
- remove pointless (!d || is_idle_domain(d)) checks
- eliminate hard-coded limit to 9 banks
- avoid redundant gdprintk()s

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-03-31 13:17:48 +01:00
Keir Fraser 8b816120b1 x86: small adjustment to asm constraints for c/s 19400
Properly indicate the variable that the asm writes to, and allow
compiler more freedom in selecting a suitable input operand for the
ltr instruction.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-03-31 13:14:10 +01:00
Keir Fraser 10fc4d6553 x86 mce: fix c/s 18938
Provide for up to 16/32 on (32/64-bit) extended MCE MSRs, and use
actually existing extended MSRs on 64-bits that were inaccessible so
far.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-03-31 13:12:35 +01:00
Keir Fraser 57f5ad16f8 x86 mce: fix c/s 17968 for 32-on-64
32-on-64 aspects were not properly considered. Add respective
checking, and adjust structure layouts for the cases where the
checking pointed out issues.

Also,
- fix a potential memory corruption issue (do_mca() could write beyond
  log_cpus' end if the guest specified less than the number of online
  CPUs
- there is no reason to make the (not even properly prefixed)
  definitions in xen/public/arch-x86/xen-mca.h globally visible by
  including the file from xen/public/arch-x86/xen.h.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-03-31 13:11:56 +01:00
Keir Fraser 39a239fc04 minios: Extend struct blkfront_aiocb.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-31 12:06:57 +01:00
Keir Fraser b406180c48 tools build: No need for LFS flags on NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-31 11:55:42 +01:00
Keir Fraser bc0fe8ff74 vtd: fix multiple Dom0 S3 on hosts that support Queued Invalidation.
On such hosts we can't do multiple Dom0 S3 when VT-d is enabled.
The cause is: during the first S3 resume, init_vtd_hw() initializes
the invalidation function pointers to the register-based ones and later
enable_qinval() forgets to overwrite the flush function pointers to
queued-based ones, so actually Queued Invalidaton is enabled, but we
actually use the register-based invalidation function! Later during
the second Dom0 S3, in iommu_suspend() -> iommu_flush_all(), we try to
use the register-based invalidation functions to perform global flush
while Queued Invalidation is enabled, and this can cause a host reset
because VT-d spec says: when the queued invalidation is enabled,
software must submit invalidation commands only through the IQ (and
not through any invalidation command registers).

The attached patch fixes the buggy enable_qinval(). And in
iommu_resume(), we invoke iommu_flush_all() for safety.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-03-31 11:54:12 +01:00
Keir Fraser 964fae8ac2 cpuidle: suspend/resume scheduler tick timer during cpu idle state entry/exit
cpuidle can collaborate with scheduler to reduce unnecessary timer
interrupt. For example, credit scheduler accounting timer
doesn't need to be active at idle time, so it can be stopped at
cpuidle entry and resumed at cpuidle exit. This patch implements this
function by adding two ops in scheduler: tick_suspend/tick_resume, and
implement them for credit scheduler

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
2009-03-31 11:51:56 +01:00
Keir Fraser f02c18fff7 xend: Return True from device_update when cfg_xenapi
When device_update is called by using cfg_xenapi, this patch
returns True.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-31 11:49:56 +01:00
Keir Fraser 9e7c906ffa XenAPI: Implement {get,set}_auto_power_on
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-31 11:48:07 +01:00
Keir Fraser a17ed5cc27 x86: Clean up atomic.h comments and asm specifiers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-31 11:47:20 +01:00
Keir Fraser ce5ab42341 vtd: fix iommu vector leak
When we do Dom0 S3 for many times, iommu_set_interrupt() would fail
during S3 resume because it can't obtain vector. We should not request
new vector for every Dom0 S3 resume. We should re-use the same vector.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-03-31 11:41:13 +01:00
Keir Fraser 7fdd501f11 xend: Allow user to specify vslots 0 - 1f for static pass-through
The current parser only accepts vslots 0 - f (hex), that is, only
slots that have one digit. This is an omission as two digit slots
with a leading 0 or 1 are also valid, representing the
full range of slots 0 - 1f.

Thanks to Dexuan Cui for spotting this problem.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-31 11:40:28 +01:00
Keir Fraser 1d11695836 xen: include MSI/MSI-X information in interrupt debug output
With per-domain irq-to-vector mappings, dump_irqs() omitted some
vectors. This patch cycles through the vectors rather than
interrupts and prints the same debug information. The patch also
prints out information about mapped but unbound interrupts.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2009-03-31 11:39:32 +01:00
Keir Fraser 0a0346fc3f xenctx: Teach xenctx how to find the right addresses in real-mode.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2009-03-31 11:38:05 +01:00
Keir Fraser 1ecaba192c minios: _chk_fail and _chk canaries for minios and newlib
Add __stack_chk_fail to mini-os and __sprintf_chk __fprintf_chk to
newlib, to cope with ocaml runtimes compiled with -fstack-protector.

From: "George S. Coker, II" <gscoker@alpha.ncsc.mil>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-03-31 11:36:11 +01:00
Keir Fraser 49986faf5d xenctx: Always show code context, even when not in kernel mode
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2009-03-31 11:33:56 +01:00
Keir Fraser 03affb40e7 libxc: Fix xc_translate_foreign_address in non-paged mode
Returns paddr rather than gfn when in non-paged mode.  Add a shift to
fix it.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2009-03-31 11:32:56 +01:00
Keir Fraser c9e8655cb7 xenapi: Fix VDI:read_only, VDI:sharable and VBD:mode of XenAPI
I started a VM by using xm create, then I checked values of VDI
records and values of VBD records.  When I gave the following disk
modes to a disk parameter, I got the following values from the records.

               "r"    "w"    "w!"
VDI:read_only  True   True   True   <-- Always True!
VDI:sharable   True   True   True   <-- Always True!
VBD:mode       RO     RW     RO
                             ^^  <-- It should be RW.

This patch fixes the values of the records as follows.

               "r"    "w"    "w!"
VDI:read_only  True   False  False
VDI:sharable   False  False  True
VBD:mode       RO     RW     RW

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-31 11:31:08 +01:00
Keir Fraser e32808cc9c xend: fix hotplug for integrated devices
For integrated devices(with bus number 0), self.find_parent() returns
None, causing a python exception here.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-03-31 11:29:53 +01:00
Keir Fraser d81fe9d33a xend: Accept udev events about SCSI and update physical SCSI information
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-31 11:28:49 +01:00
Keir Fraser 75f6b53ab0 xend: Fix 'xm pci_list_assignable_devices'
The current implementation of 'xm pci-list-assignable-devices' command
has a problem that it directly invokes hypercall using
xen.lowlevel.xc.
This is probably based on an assumption that the command is executed
on the host itself, but in fact there are cases xm commands can be
executed on a remote server through xmlrpc.
So this patch makes the xm command just inquire of xend about the
information of available devices.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-31 11:28:08 +01:00
Keir Fraser 23d864769a xend: Fix scsi_id for pvSCSI
pvSCSI allocations fail if the version of udev in a host OS is
relatively new.  I have not been able to detect the failure because
I have used udev of the version 095.  The failure occurs by
an incompatibility problem of scsi_id command included udev.
This patch tackles the incompatibility problem.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-31 11:27:10 +01:00
Keir Fraser ea3ee2e615 xend: Allow drbd disks.
From: Ben Timby <btimby@gmail.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-31 11:26:10 +01:00
Keir Fraser 14f5ee16c8 xend: Supply pass-through vslot to qemu-dm
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-31 11:24:13 +01:00
Keir Fraser ceb97ddf1c xend: Properly save/restore vnc/vfb configuration
In 19284:0942BAA2A088 provision was made for running vnc and sdl
simultaneously.  However, arrangements for saving and restoring the
new structure-configuration, and arrangements for allowing the new
code to load old savefiles, were not made.

This patch adds these facilities.  Amongst other things, HVM VNC
save/restore will now work properly again.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-03-31 11:23:38 +01:00
Keir Fraser da2c445024 x86: virt_to_mfn() fixes.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2009-03-31 11:21:14 +01:00
Keir Fraser c8432f0b59 xenpm: add cmd set-max-cstate
Signed-off-by: Wei Gang <gang.wei@intel.com>
2009-03-31 11:19:56 +01:00
Keir Fraser fd598342a0 cpuidle: export max_cstate access via libxc
Signed-off-by: Wei Gang <gang.wei@intel.com>
2009-03-31 11:19:26 +01:00
Keir Fraser 6fe255bdc2 pygrub: More accurate try/except catch.
Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-03-31 11:17:51 +01:00
Keir Fraser f32b5caf31 xend: Save the state of PPCIs after hot-plug events.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-31 11:16:01 +01:00
Keir Fraser be01c537b2 xend: fix domain_migrate
When the guest(pv-on-hvm guest that cannot suspend) reboot in
LiveMigration, the disconnecting of src-side is not transmitted to
dist-side. As a result, the error processing on the dist side is not
executed.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2009-03-31 11:13:56 +01:00
Keir Fraser 92f9c55a94 xend: Disallow bogus MAC addresses when creating new VIF devices
Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-03-31 11:12:39 +01:00
Keir Fraser c55103c526 intel mce: Small fixes.
Signed-off-by: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
2009-03-31 11:10:06 +01:00
Keir Fraser cd0d1464b9 x86 acpi: Delete unnecessary and broken RSDP-scanning code.
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
2009-03-30 16:48:26 +01:00
Isaku Yamahata 2594e423ee merge with xen-unstable.hg 2009-03-27 11:07:11 +09:00
Isaku Yamahata 1dc0906f89 [IA64] ia64 counter part of 19374:e655cb27d085.
This patch is the ia64 counter part of 19374:e655cb27d085.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-03-27 10:54:08 +09:00
Keir Fraser 92f5c346e7 libxc: fix link error of xc_save on ia64
The suspend event channel functions are arch independent code
which xc_save uses.
The changeset of 19382:a5f497f02e34 cause link error on ia64.
This patch moves the functions into arch common file from
x86 specific file xc_domain_save.c

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-03-24 06:55:29 +00:00
Keir Fraser e8c21780e3 x86: Build fixes and cleanups after Intel MCA changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-20 17:42:46 +00:00
Keir Fraser c8596872e0 MCA interfaces between XEN/DOM0, let DOM0 know the MCA recovery action
Signed-off-by: Jiang, yunhong <yunhong.jiang@intel.com>
Signed-off-by: Ke, liping <liping.ke@intel.com>
2009-03-20 17:25:29 +00:00