Commit Graph
19219 Commits
Author SHA1 Message Date
Keir Fraser b985dc0b9e xenpm tool: add average C state residency
Signed-off-by: Yu Ke <ke.yu@intel.com>
2009-02-17 11:08:31 +00:00
Keir Fraser a39fc4dda4 vtd: clean up of __iommu_flush_iec()
remove bogus global variable to make it local variable.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-17 11:07:29 +00:00
Keir Fraser e37e238879 passthrough: fix MSI-X table fixmap allocation
Currently, msix table pages are allocated a fixmap page per vector,
the available fixmap pages will be depleted when assigning devices
with large number of vectors.  This patch fixes it, and a bug that
prevents cross-page MSI-X table from working properly

It now allocates msix table fixmap pages per device, if the table
entries of two msix vectors share the same page, it will only be
mapped to fixmap once. A ref count is maintained so that it can
be unmapped when all the vectors are freed.

Also changes the meaning of msi_desc->mask_base from the va of msix
table start to the va of the target entry. The former one is currently
buggy (it always maps the first page but msix can support up to 2048
entries) and can't handle separately allocated pages.

Signed-off-by: Qing He <qing.he@intel.com>
2009-02-17 11:06:16 +00:00
Keir Fraser f3c727b324 Fix typos in xendomains script.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-02-17 11:04:08 +00:00
Keir Fraser db157458e8 Merge with ext/ia64/xen-unstable.hg 2009-02-17 11:01:05 +00:00
Isaku Yamahata d0d476523b [IA64] remove a warning.
This patch remove the following warning.

mca.c:1928: warning: unused variable 'irq'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-13 19:11:38 +09:00
Isaku Yamahata 2ceb1f20ad [IA64] remove the warning.
iommu.c:891: warning: implicit declaration of function 'free_irq_vector'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-13 19:07:17 +09:00
Isaku Yamahata c7b4eee047 [IA64] fix relinquish_memory()
This patch fixes the following panic.

(XEN) Assertion 'entry->prev->next == entry' failed, line 170, file xen-unstable.hg/xen/include/xen/list.h
(XEN) Xen BUG at xen-unstable.hg/xen/include/xen/list.h:170
(XEN) FIXME: implement ia64 dump_execution_state()
(XEN)
(XEN) Call Trace:
(XEN)  [<f400000004104670>] show_stack+0x90/0xb0
(XEN)                                 sp=f0000002f64cfbf0 bsp=f0000002f64c9918
(XEN)  [<f400000004105180>] dump_stack+0x30/0x50
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c98f8
(XEN)  [<f400000004064ac0>] __bug+0x70/0xa0
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c98c8
(XEN)  [<f400000004031290>] free_domheap_pages+0x380/0x700
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c9868
(XEN)  [<f4000000040ac470>] domain_page_flush_and_put+0x1c0/0x550
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c9820
(XEN)  [<f4000000040ac990>] domain_put_page+0x190/0x530
(XEN)                                 sp=f0000002f64cfdd0 bsp=f0000002f64c97b0
(XEN)  [<f4000000040ad060>] zap_domain_page_one+0x330/0x530
(XEN)                                 sp=f0000002f64cfde0 bsp=f0000002f64c9710
(XEN)  [<f4000000040ad570>] dom0vp_zap_physmap+0x70/0xe0
(XEN)                                 sp=f0000002f64cfdf0 bsp=f0000002f64c96d8
(XEN)  [<f4000000040838f0>] do_dom0vp_op+0x320/0x7b0
(XEN)                                 sp=f0000002f64cfdf0 bsp=f0000002f64c9690
(XEN)  [<f400000004002e60>] fast_hypercall+0x170/0x310
(XEN)                                 sp=f0000002f64cfe00 bsp=f0000002f64c9690
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 2:
(XEN) Xen BUG at xen-unstable.hg/xen/include/xen/list.h:170
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...
(XEN) Debugging connection not set up.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-13 19:03:37 +09:00
Keir Fraser b0786556d3 x86: Clean up vpt-align patch.
Also disable by default if not specified in domain config. Otherwise
the feature would be incorrectly enabled for old saved domain images.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-13 09:48:56 +00:00
Keir Fraser 0eecf73be6 hvm: Align periodic vpts.
Aligned periodic vpts can improve the HVM guest power consumption a
lot, especially while the guest using high HZ such as 1000HZ.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2009-02-13 09:43:06 +00:00
Keir Fraser 737073ac89 xenapi: Correct some syntax errors in xen/xend/XendAPI.py
- usage of undefined variables in error cases (invalid handle
specified) in methods VBD_create, VTPM_destroy, event_unregister
- not imported module 'uuid' in method debug_create results in an
exception

Signed-off-by: Lutz Dube <Lutz.Dube@fujitsu-siemens.com>
2009-02-13 09:38:16 +00:00
Keir Fraser e668284679 iommu: Fix interrupt setup.
Set vector_to_iommu[vector] before calling request_vector since null
pointer exceptions occur.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-02-13 09:36:58 +00:00
Keir Fraser 91d9dfaec8 [XSM][FLASK] basic documentation and a type cast error for x86_64
- A simple txt howto based on previous list discussions and observations
  - A oneliner patch to address a compiler type cast error for x86_64

Signed-off-by: George S. Coker, II <gscoker@alpha.ncsc.mil>
2009-02-13 09:33:58 +00:00
Keir Fraser 9acc94349e xendomains: clean up output formatting
Show errors in the way they are coming from xm command only (no usage
is printed now). Watchdog_wm() has been changed for not showing dots
in the process of shutting down domains and if an error occurs it
prints target domain, operation (save/restore/migrate etc.) and reason
of failure in more user-friendly way.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-02-13 09:32:02 +00:00
Keir Fraser 60a3eafa2b x86 hvm: Allow restore of old images with different segment attribute format.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-13 09:29:52 +00:00
Isaku Yamahata 336841f925 [IA64] shrink ia64 struct page_info.
This patch is the ia64 counter part of 19107:0858f961c77a,
19132:5848b49b74fc and 19136:162cdb596b9a.
This patch shrink ia64 struct page_info and rearrange its members.

The shrinking is made compile time option in config.h with default off
becuase physical address size is architected to 50bit by ia64
and mfn isn't always addressed by 32bits with 16KB page size.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-13 11:23:16 +09:00
Isaku Yamahata 6c5523a925 [IA64] use page_list_head and related stuff.
Use page_list_head and stuff for consistency with x86 code.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-13 11:22:59 +09:00
Isaku Yamahata d371f72704 merge with xen-unstable.hg 2009-02-13 11:22:28 +09:00
Isaku Yamahata cb5985adb8 [IA64] MCA: Avoid calling xmcalloc from interrupt handler
This patch fixes to avoid calling xmalloc() from the interrupt handler.
Calling xmalloc() with interrupt disabled triggers the following
BUG_ON().
> (XEN) Xen BUG at xmalloc_tlsf.c:548

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2009-02-13 10:56:01 +09:00
Keir Fraser b4a842e00f vtd: move the snoop control detection out of acpi_dmar_init()
where the capability value is not initialized thus we may
get random value.

Signed-off-by: Xin, Xiaohui<xiaohui.xin@intel.com>
2009-02-12 10:54:17 +00:00
Keir Fraser 418f758483 xm save: Display help text if bad options specified.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-02-12 10:53:10 +00:00
Keir Fraser 54ddfee829 rombios: fix int15/86h (wait for microseconds)
The bcc compiler generates wrong stack pointer offset of a local
variable within ASM code if another local variable is declared
later.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2009-02-12 10:52:05 +00:00
Keir Fraser 413de29298 Cleanup naming for ia64 and x86 interrupt handling functions
- Append '_IRQ' to AUTO_ASSIGN, NEVER_ASSIGN, and FREE_TO_ASSIGN
- Rename {request,setup}_irq to {request,setup}_irq_vector
- Rename free_irq to release_irq_vector
- Add {request,setup,release}_irq wrappers for their
  {request,setup,release}_irq_vector counterparts
- Added generic irq_to_vector inline for ia64
- Changed ia64 to use the new naming scheme

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-12 10:48:55 +00:00
Keir Fraser f80bfa336f cpufreq: fix the build
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-11 16:36:59 +00:00
Keir Fraser 146902cada x86: cpufreq get_cur_val adjustment
c/s 19149 update cpufreq get_cur_val logic to avoid cross processor
call. However, to avoid null drv_data pointer, we adjust some logic in
this patch to keep advantage of c/s 19149 and at same time to avoid
null drv_data pointer.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2009-02-11 13:07:45 +00:00
Keir Fraser 9328d296ee cpufreq cmdline handling
c/s 19147 adjust cpufreq cmdline handling, this patch is a complement
to c/s 19147.

In this patch:
1. add common para (governor independent para) handling;
2. change governor dependent para handling method, governor dependent
para will only be handled by the handler of that governor (not by all
governors);
3. add userspace governor dependent para handling;
4. change para name 'threshold' of ondemand governor to 'up_threshold'
since ondemand has only 'up_threshold', and conservative governor (will be
implemented later) has both 'up_threshold' and 'down_threshold';
5. change some coding style (c/s 19147, drivers/cpufreq/cpufreq.c) to
keep coordination with original drivers/cpufreq/cpufreq.c coding style;
(originally this file is ported from linux, we partly use linux coding style)

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2009-02-11 10:47:24 +00:00
Keir Fraser cef052b621 xend: PCIQuirk`__devIsUnconstrained refers to an undeclared variable if
/etc/xen/xend-pci-permissive.sxp doesn't exist.

Signed-off-by: David Edmondson <dme@sun.com>
2009-02-11 10:45:34 +00:00
Keir Fraser 8c091f8f56 pciif: Fix typo in constant definition.
Signed-off-by: David Edmondson <dme@sun.com>
2009-02-11 10:45:19 +00:00
Keir Fraser 77de1e2709 blktap: Fix check_gcrypt
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-02-11 10:44:42 +00:00
Keir Fraser 4ce68a9d48 x86_64: Ensure enough space for allocator bitmap after relocated Xen image.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-11 10:41:45 +00:00
Keir Fraser e16fc5ba59 x86: mce: Provide extended physical CPU info.
Provide extended physial CPU info for the sake of dom0 MCE handling.
This information includes <cpu,core,thread> info for all logical CPUs,
cpuid information from all of them, and initial MSR values for a few
MSRs that are important to MCE handling.

Signed-off-by: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
2009-02-10 05:51:00 +00:00
Keir Fraser ab620f29ef vtd: fix compilation error on ia64 for 19185:1eb6afcad849.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-02-10 05:47:00 +00:00
Keir Fraser 8e73be0de8 vtd: adding support for multiple queued invalidation pages
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2009-02-09 14:23:51 +00:00
Keir Fraser f58273a90c minios: fix p2m on x86
15675:bf85b467ee89 Fixed p2m on x86_64, but instead broke it on x86.

Signed-off-by: Samuel Thibault <samuel.thibaut@ens-lyon.org>
2009-02-09 14:22:07 +00:00
Keir Fraser c8c2116e93 [IA64] fix compilation error of iommu.c
This patch fixes the following compilation error on ia64
caused by 19178:4fcf4c9c9751.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-09 12:50:12 +00:00
Keir Fraser 8641c03db2 Revert 19178:4fcf4c9c9751ccb8ed
Breaks boot on every box under the sun it seems.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-09 12:46:26 +00:00
Keir Fraser 3a50e1966c [IA64] compilation fix of xentrace.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-02-06 11:18:45 +00:00
Keir Fraser 3f441c6c02 x86: Clean up page-mfn conversion macros to allow better override by shadow code.
Also fix is_xen_heap_mfn() to deal with invalid MFNs.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-02-06 11:15:28 +00:00
Keir Fraser 2b9a5bea15 xenctx: print x86_32 context on x86_64
Although x86_64 context covers x86_32, I think it's easy to watch.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-02-06 10:43:58 +00:00
Keir Fraser 81e91a22e4 Better separate IOAPIC management from interrupt vector management
Don't automatically update ioapic_irq array when allocating vectors.
Only do so when actually allocating IOAPIC irqs.  Also move some
IOAPIC specific defines to io_apic.c.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:42:26 +00:00
Keir Fraser 48a5350731 x86: Move interrupt vector management from io_apic.c to irq.c
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:40:00 +00:00
Keir Fraser b67984ae8e x86: ->shutdown() in free_irq() should be passed vector, not irq.
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:39:10 +00:00
Keir Fraser d4af292c82 Cleanup IOMMU interrupt setup
- Check for errors when allocating interrupt vectors
- Clean up if interrupt allocation failed
- Make sure that the allocated vector is not reused

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-06 10:36:23 +00:00
Keir Fraser 20eed172a7 libxenctrl: adds xc_domain_unbind_msi_irq to libxc.
The function is needed to unbind MSI/MSI-X on transition from D3hot
state to D0 state.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2009-02-05 15:28:09 +00:00
Keir Fraser 686f69b6c1 Fix PCI passthrough for devices w/o iomem.
From: Manuel Bouyer <bouyer@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-02-05 15:08:53 +00:00
Keir Fraser e39b339789 x86: Use per-domain irq-to-vector array when mapping GSIs
Using the per-domain array enables single MSI vectors to be mapped.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2009-02-05 12:20:18 +00:00
Keir Fraser c8ff96bd9f xenctx support for 64-bit HVM guests
Now that we can easily find EFER.LMA, xenctx can detect 64-bit HVM
VCPUs

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:17:24 +00:00
Keir Fraser 2c3072a583 libxc support for the new partial-HVM-save domctl.
This includes making the pagetable walker in xc_pagetab.c behave
correctly for 32-bit and 64-bit HVM guests.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:17:08 +00:00
Keir Fraser 0c8eb5a51a Remove uses of DECLARE_BITMAP in the public HVM save format headers
and replace them with open-coded equivalents.  DECLARE_BITMAP is
not exported to user-space consumers of the Xen headers.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:16:53 +00:00
Keir Fraser 1bb7e0437b Add a new domctl to get a single record from the HVM save context
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2009-02-05 12:16:28 +00:00