Commit Graph
18948 Commits
Author SHA1 Message Date
Keir Fraser bb53d1d5fd rombios: disable DEBUG_ROMBIOS by default.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2008-12-29 14:00:45 +00:00
Keir Fraser d47fd604d0 rombios: pass BDF correctly during option ROM scan
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-12-29 14:00:15 +00:00
Keir Fraser 72d281ae08 rombios: enabling option ROM write access during initialisation.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2008-12-29 13:55:59 +00:00
Keir Fraser 754ad39249 cpufreq: Fix a cpufreq cmdline parse bug, and change sample_rate unit
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
2008-12-29 13:37:46 +00:00
Keir Fraser 723c9ab167 x86: Do not restrict 32-bit EPT to 4GB.
Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
2008-12-29 13:32:32 +00:00
Keir Fraser cfbcb394f9 x86, intel: Clear Error counter field when set new cmci owner
Since cmci might happened when cpu is taking down (cpu hotplug) before
setting new cmci owner while old owner is down. We need to clear the
corrected error counter field to make sure CMCI could be triggered on
the new owner.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Liping Ke <liping.ke@intel.com>
2008-12-29 13:30:14 +00:00
Keir Fraser f99dc195cc i386: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-22 13:48:40 +00:00
Keir Fraser 1f95053ea5 shadow: Remove warnings about writes to read-only BIOS area. These
attempts can be legitimate.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-22 13:43:13 +00:00
Keir Fraser 1b3c590b6c Cleanup Intel CMCI support.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-22 12:07:20 +00:00
Keir Fraser 8c9a4d8e4c Enable CMCI for Intel CPUs
Signed-off-by Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by Liping Ke <liping.ke@intel.com>
2008-12-22 08:12:33 +00:00
Keir Fraser 9913ea3300 Support S3 for MSI interrupt
From: "Jiang, Yunhong" <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-19 14:56:36 +00:00
Keir Fraser 8afd0f1132 Change the pcidevs_lock from rw_lock to spin_lock
As pcidevs_lock is changed from protecting only the alldevs_list to
more than that, it doesn't benifit too much from the rw_lock. Also the
previous patch 18906:2941b1a97c60 is wrong to use read_lock to protect some
sensitive data (thanks Espen pointed out that).

Also two minor fix in this patch:
a) deassign_device will deadlock when try to get the pcidevs_lock if
called by pci_release_devices, remove the lock to the caller.
b) The iommu_domain_teardown should not ASSERT for the pcidevs_lock
because it just update the domain's vt-d mapping.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
2008-12-19 14:52:32 +00:00
Keir Fraser 7784d17ecd CPUIDLE: adjust cstate statistic interface
1. change unit of residency, PM ticks -> ns.
2. output C0 usage & residency.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-19 14:44:40 +00:00
Keir Fraser 8c13de5687 VT-d: Fix PCI-X device assignment
When assign PCI device, current code just map its bridge and its
secondary bus number and devfn 0. It doesn't work for PCI-x device
assignment, because the request may be the source-id in the original
PCI-X transaction or the source-id provided by the bridge. It needs to
map the device itself, and its upstream bridges till PCIe-to-PCI/PCI-x
bridge.

In addition, add description for DEV_TYPE_PCIe_BRIDGE and
DEV_TYPE_PCI_BRIDGE for understandability.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-12-19 13:42:04 +00:00
Keir Fraser 1e5e52220f xend: Actually restrict a domU's access to xenstore when we mean to --
this means that in some cases it cannot be owner of its own xenstore
nodes.

This bug was pointed out by Daniel Berrange at Red Hat. This patch is
my own more generic fix that automatically covers a range of callers
(albeit the patch is arguably a bit of a hack ;-).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-18 17:18:28 +00:00
Keir Fraser 68e3bd7b77 x86: Quieten tracing in msi startup/shutdown handlers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-18 17:14:27 +00:00
Keir Fraser e8a33bc38f rombios: Update to Bochs latest
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2008-12-18 14:52:53 +00:00
Keir Fraser dce021d06a xenoprof: Add support for Intel Dunnington cores.
Signed-off-by: Xiaowei Yang <Xiaowei.yang@intel.com>
Signed-off-by: Ting Zhou <ting.g.zhou@intel.com>
2008-12-18 11:29:33 +00:00
Keir Fraser 2f0f4ad09f x86, shadow: Avoid duplicates in fixup tables.
Avoid entering duplicates in fixup tables, reducing fixup evictions.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-12-18 11:28:25 +00:00
Keir Fraser cea7a6cd7b Fix mini-os ia64 compilation
- Avoid nested function to avoid a trampoline.
- Do not link mini-os_app.o when it is empty.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-12-18 11:27:37 +00:00
Keir Fraser 6840dfbbd0 x86, hvm: Don't ever call the shadow code to fix a page fault in an
external-mode guest if the fault came from Xen; it would be making
changes to the wrong pagetables, potentially causing a pagefault loop
in Xen.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-12-17 11:36:22 +00:00
Keir Fraser 75e06d089d xenpm: add cpu frequency control interface, through which user can
tune the parameters manually.

Now, xenpm can be invoked with the following options:
Usage:
       xenpm get-cpuidle-states [cpuid]: list cpu idle information on
       CPU cpuid or all CPUs.
       xenpm get-cpufreq-states [cpuid]: list cpu frequency
       information on CPU cpuid or all CPUs.
       xenpm get-cpufreq-para [cpuid]: list cpu frequency information
       on CPU cpuid or all CPUs.
       xenpm set-scaling-maxfreq <cpuid> <HZ>: set max cpu frequency
       <HZ> on CPU <cpuid>.
       xenpm set-scaling-minfreq <cpuid> <HZ>: set min cpu frequency
       <HZ> on CPU <cpuid>.
       xenpm set-scaling-governor <cpuid> <name>: set scaling governor
       on CPU <cpuid>.
       xenpm set-scaling-speed <cpuid> <num>: set scaling speed on CPU
       <cpuid>.
       xenpm set-sampling-rate <cpuid> <num>: set sampling rate on CPU
       <cpuid>.
       xenpm set-up-threshold <cpuid> <num>: set up threshold on CPU
       <cpuid>.

To ease the use of this tool, the shortcut option is supported,
i.e. `xenpm get-cpui' is equal to `xenpm get-cpuidle-states'.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2008-12-16 13:14:25 +00:00
Keir Fraser f771f7ffce x86: Update xen-detect utility to scan for Xen signature in CPUID space.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-16 12:04:13 +00:00
Keir Fraser c32ea44041 mini-os: Make utility function get_self_id() in fs-front.c public.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-12-16 12:00:25 +00:00
Keir Fraser 1b6a99892d x86: Simpler time handling when TSC is constant across all power saving states.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Gang Wei <gang.wei@intel.com>
2008-12-16 11:59:22 +00:00
Keir Fraser 25c2bce46a vmx: Do not disable real EFER.NXE even when disabled by guest.
We must not disable EFER.NXE in host mode since shadow code relies on
accessing shadow mappings with NX set.

We do not want to write EFER on every vmentry/vmexit if we can avoid
it, since it will be somewhat slow.

Finally, we don't believe that any guest relies on NX really being
disabled when EFER.NXE is cleared.

This given, it makes sense to ignore the guest's setting of EFER.NXE.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-16 11:54:11 +00:00
Keir Fraser 74d59a59e2 x86: Enable MTF for HVM guest single step in gdb
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-16 11:49:20 +00:00
Keir Fraser 53e5cd08ef x86: Decode CPUID for TSC guarantees.
Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-12-15 11:37:14 +00:00
Keir Fraser a0c46b435d rombios: fix references to EBDA
Extended Bios Data Area (EBDA) can be relocated by the initialization
of PCI option ROM. The IPL boot table is also.
EBDA must be accessed via 0x40E after the initialization.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-12-15 11:23:22 +00:00
Keir Fraser f2f78ed2c8 x86: Small cleanups to time handling.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-15 11:17:14 +00:00
Keir Fraser 158b608e1d xenpmd: Fix bogus fgets() size parameter.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-13 17:44:20 +00:00
Keir Fraser 0a383abeed x86: Clean up and simplify rwlock implementation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-13 15:56:16 +00:00
Keir Fraser 27480e5830 Clean up use of spin_is_locked() and introduce rw_is_locked().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-13 15:28:10 +00:00
Keir Fraser 0347bade8b xc_pm: Fix off-by-one error in string array access.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-12-13 15:04:53 +00:00
Keir Fraser cd914ce249 x86: Fix early time initialisation after recent changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-13 15:02:55 +00:00
Keir Fraser 050404c847 xentop: Fix fprintf() build failure.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 22:32:20 +00:00
Keir Fraser 20553adcd9 hvmloader: enable bus mastering of PCI device
Without this, init routine in some PCI option ROM doesn't work well.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-12-11 13:26:02 +00:00
Keir Fraser 4fef1ea1f4 x86: enable interrupts explicitly in __start_xen()
Instead of relying on smp_prepare_cpus() (via check_nmi_watchdog()) or
init_xen_time() (via init_platform_timer() -> plt_overflow())
implicitly enabling interrupts, enable them explicitly once safe to do
so (it may actually be possible to move this even further up, but I
don't think that would buy us much).

Signed-off-by: Jan Beulich <jbeulich@novell.com>

Also move spin_debug_enable() a bit higer. Moving it above
smp_prepare_cpus() didn't work for some reason though!

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 13:25:28 +00:00
Keir Fraser cc7efb8785 x86: Clean up early time setup.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 13:10:19 +00:00
Keir Fraser 1d278a475a vga: Only vga_endboot() if vga_init() completed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 13:09:59 +00:00
Keir Fraser bda5925b83 x86, cpufreq: Change cpufreq_driver->get so that it can get other
cpu's real physical freq.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2008-12-11 11:49:37 +00:00
Keir Fraser 57b0566668 Re-enable MSI support
Currently the MSI is disabled because of some lock issue. This patch
tries to clean up the locking related to MSI lock.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
2008-12-11 11:48:19 +00:00
Keir Fraser 849bd717c2 x86: fix the potential of encountering panic "IO-APIC + timer doesn't work! ..."
Signed-off-by: Jan Beulich <jbeulich@novell.com>

Linux commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4aae07025265151e3f7041dfbf0f529e122de1d8

x86: fix "Kernel panic - not syncing: IO-APIC + timer doesn't work!"

Under rare circumstances we found we could have an IRQ0 entry while we
are in the middle of setting up the local APIC, the i8259A and the
PIT. That is certainly not how it's supposed to work! check_timer()
was supposed to be called with irqs turned off - but this eroded away
sometime in the past. This code would still work most of the time
because this code runs very quickly, but just the right timing
conditions are present and IRQ0 hits in this small, ~30 usecs window,
timer irqs stop and the system does not boot up. Also, given how early
this is during bootup, the hang is very deterministic - but it would
only occur on certain machines (and certain configs).

The fix was quite simple: disable/restore interrupts properly in this
function. With that in place the test-system now boots up just fine.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-12-11 11:40:10 +00:00
Keir Fraser 3bc61439ad x86: unify local_irq_XXX()
This also removes an inconsistency in that x86-64's __save_flags() had
a memory clobber, while x86_32's didn't.

It further adds type checking since blindly using {pop,push}{l,q} on a
memory operand of unknown size bares the risk of corrupting other
data.

Finally, it eliminates the redundant (with local_irq_restore())
__restore_flags() macro and renames __save_flags() to
local_save_flags(), making the naming consistent with Linux (again?).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-12-11 11:36:00 +00:00
Keir Fraser 3245eb0237 rombios: fix rom_scan (ja->jmp)
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-12-11 11:32:39 +00:00
Keir Fraser 9fde610c7b Fix a typo caused by 18898.
new state is updated too early.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2008-12-11 11:30:13 +00:00
Keir Fraser ecdcad9ec5 cpufreq: Short path avoiding IPI in critical fast path.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 11:27:49 +00:00
Keir Fraser de8ffdf6a4 libxc: Fix xc_pm.c build by avoiding bogus header includes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 11:19:27 +00:00
Keir Fraser c8e857a0af Fix BUILD_BUG_ON()
As was noticed on the Linux side, using an array here isn't appropriate
if the condition is not a compile time constant - gcc allows such
arrays, and hence the intended effect of producing a compiler error is
not achieved in that case. Bit field widths do not know similar
language extensions, and hence always produce a compiler error.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-12-11 11:19:01 +00:00
Keir Fraser aa9c440212 Avoid negative runstate pieces.
Also consolidate all places to get cpu idle time.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-10 14:05:41 +00:00