Keir Fraser [Tue, 27 Jan 2009 16:02:21 +0000 (16:02 +0000)]
x86: Fold page_info lock into type_info.
Fix some racey looking code at the same time.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 27 Jan 2009 11:54:22 +0000 (11:54 +0000)]
x86-64: don't generate dependency files when building compat headers
The generated dependency files weren't correct (as their names get
derived only from the base name of the target file, and there are
public headers with the same base name in different directories), not
needed (as the makefile already listed all necessary dependencies
explicitly), and resulted in the first re-build in an already built
tree to be an almost full re-build since the *.c files explicitly
mentioned in the .*.d result in make not considering them as
intermediate anymore, thus triggering re-generation of the headers,
and hence re-building of almost the entire tree.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Tue, 27 Jan 2009 11:45:59 +0000 (11:45 +0000)]
x86: clean up struct page_info
Remove the now unnecessary (and leading to misalignment of cpumask on
x86-64) 'packed' attributes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Tue, 27 Jan 2009 11:24:47 +0000 (11:24 +0000)]
x86: use alloc_domheap_page() consistently in dom0 building
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Tue, 27 Jan 2009 11:24:24 +0000 (11:24 +0000)]
x86: clean up comments in mce_intel.c
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Tue, 27 Jan 2009 11:23:56 +0000 (11:23 +0000)]
make pirq_acktype() static to its respective source files
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Tue, 27 Jan 2009 11:23:30 +0000 (11:23 +0000)]
x86-64: also use 1G page mappings for M2P table
Also, specify the node for the respective page table allocations.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Tue, 27 Jan 2009 10:25:33 +0000 (10:25 +0000)]
x86: Fix shadow_check_page_struct_offsets() comment.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 23:36:59 +0000 (23:36 +0000)]
x86_64: shared_info must be allocated below 4GB as it is advertised to
32-bit guests via a 32-bit machine address field in start_info.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 23:35:47 +0000 (23:35 +0000)]
x86: Small improvements to mm.c
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 16:52:38 +0000 (16:52 +0000)]
x86: Clean up shadow_page_info after page_info changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 16:34:51 +0000 (16:34 +0000)]
xenoprof: Fix code indentation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 16:34:16 +0000 (16:34 +0000)]
x86: Clean up pickle_domptr().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 16:21:21 +0000 (16:21 +0000)]
x86_64: No restriction on Xen heap address width.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 16:19:42 +0000 (16:19 +0000)]
x86_64: Widen page counts to avoid overflow.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 14:56:19 +0000 (14:56 +0000)]
x86: No need for CMPXCHG8B on page_info structure.
Updates and checks on count_info and page owner can safely be
non-atomic.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Jan 2009 11:22:03 +0000 (11:22 +0000)]
rombios: fix pointer argument to PMM
The pointer to PMM function arguments must be flattened for protected
mode with zero-based segments.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Mon, 26 Jan 2009 11:16:52 +0000 (11:16 +0000)]
rombios: fix wrong stack segment return in 32-bit gateway
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Sun, 25 Jan 2009 10:32:26 +0000 (10:32 +0000)]
Rename memory_is_conventional_ram() to page_is_conventional_ram().
It now checks that a whole contiguous page is conventional RAM.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Jan 2009 10:16:11 +0000 (10:16 +0000)]
vt-d: Do not explicitly exclude tboot ranges from dom0 vt-d
mappings. tboot is not registered as RAM in e820 tables, and hence
will not be mapped anyway (fails memory_is_conventional_ram() check).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Jan 2009 10:12:38 +0000 (10:12 +0000)]
x86: Fix memory_is_conventional_ram() e820 entry size check.
Thanks to Joe Cihula for spotting this.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Jan 2009 09:25:25 +0000 (09:25 +0000)]
vt-d: Exclude non-RAM pages (as reported by boot firmware) from dom0 mappings.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Jan 2009 09:24:46 +0000 (09:24 +0000)]
x86_64, vt-d: Do not include pages 'in xen range' which may be freed
to domain heap.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 23 Jan 2009 16:50:09 +0000 (16:50 +0000)]
Fix ia64 build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 23 Jan 2009 14:42:29 +0000 (14:42 +0000)]
EPT/VT-d: Enhance MTRR/PAT virtualization when EPT/VT-d both enabled
Set effective memory type for EPT according to the VT-d snoop control
capability, and also includes some cleanups for EPT & VT-d both enabled.
Signed-off-by: Edwin Zhai <Edwin.Zhai@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Keir Fraser [Fri, 23 Jan 2009 14:32:41 +0000 (14:32 +0000)]
rombios: Indirect through 32-bit jump table from within the 32-bit bios.
This gets rid of shenanigans with relocating the jump table around the
place.
Also clean up bios_info table while we are updating it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 23 Jan 2009 12:50:14 +0000 (12:50 +0000)]
hvm bios: add PMM (a memory manager during POST)
The PMM (POST Memory Manager) offers malloc/free functionality
for PCI option ROMs during POST (Power On Self Test).
This patch adds a PMM functionality to the guest BIOS.
For example, the option ROM on LSI Logic SAS card uses PMM and
failed to initialize the device without PMM. Thus, the HVM can't
boot up directly from the passthroughed SCSI disk.
gPXE also uses PMM (I don't know what happens without PMM).
With this patch, we succeeded in SAS boot of HVM.
For further information about PMM:
http://www.phoenix.com/en/OEM-ODM/Customer+Services/White+Papers-Specs/PC+Industry+Specifications.htm
http://www.phoenix.com/NR/rdonlyres/
873A00CF-33AC-4775-B77E-
08E7B9754993/0/specspmm101.pdf
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Keir Fraser [Fri, 23 Jan 2009 11:51:43 +0000 (11:51 +0000)]
bump libxenctrl and libxenguest versions
In c/s 19009 an incompatible change was made to the ABI of libelf-*,
which are included in libxenctrl and libxenguest. To avoid client
programs (such as python/lowlevel/xc/xc.so) picking up a wrong
version and perhaps crashing, the soname should be changed.
I have chosen the version number 3.4 as xen-unstable is currently the
pre-3.4 branch. I assume we don't care about API/ABI stability within
an unstable branch.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 22 Jan 2009 18:00:48 +0000 (18:00 +0000)]
x86: Support booting a bzImage format domain 0 kernel.
This requires a bzImage v2.08 or later kernel.
xen/common/inflate.c is taken unmodified from Linux v2.6.28.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Thu, 22 Jan 2009 17:41:13 +0000 (17:41 +0000)]
rombios: Simplify 32-bit gateway interface definitions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 22 Jan 2009 16:32:06 +0000 (16:32 +0000)]
rombios: Simplify 32-bit gateway and avoid need for EBDA space.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 22 Jan 2009 11:21:43 +0000 (11:21 +0000)]
vmx: utilise the GUEST_PAT and HOST_PAT vmcs area
Signed-off-by: Xin Li <Xin.Li@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Keir Fraser [Thu, 22 Jan 2009 11:17:48 +0000 (11:17 +0000)]
x86 ucode: add S3 microcode update
When wakeup from S3, use per cpu microcode image to update cpu
microcode.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Keir Fraser [Thu, 22 Jan 2009 11:11:39 +0000 (11:11 +0000)]
x86 ucode: optimizing microcode update
It's possible the data file has multiple matching ucode, we needn't to
update multiple times, just keep searching the latest version, and
update once.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Keir Fraser [Thu, 22 Jan 2009 11:11:10 +0000 (11:11 +0000)]
x86 ucode: microcode logic update
Update microcode logic:
1. separate microcode_fini_cpu() into 2 level to avoid deadlock (when
fail at microcode_update_cpu);
2. cancel redundant collect_cpu_info at microcode.c level, use
relative function at microcode driver level;
3. separate microcode_resume_cpu from microcode_update_cpu, because
it's redundant (should only be called when S3 wakeup) and will block newer
microcode update when user update newer microcode.dat from user level
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Keir Fraser [Thu, 22 Jan 2009 11:10:04 +0000 (11:10 +0000)]
x86 ucode: cancel redundant input parameter of microcode functions
Cancel redundant input parameter 'uci', since it can get from another
input parameter 'cpu' as index.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Keir Fraser [Thu, 22 Jan 2009 11:07:32 +0000 (11:07 +0000)]
xend: Fix do_FLR() scope problem.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Keir Fraser [Thu, 22 Jan 2009 11:05:54 +0000 (11:05 +0000)]
x86: Make the num_siblings CPU parameter per-CPU.
While it is unlikely that a system has a different number of siblings
for different physical CPUs, make this parameter per-CPU for
consistency, and deal with the (so far theoretical) case that this is
different per CPU package.
Signed-off-by: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
Keir Fraser [Wed, 21 Jan 2009 14:44:43 +0000 (14:44 +0000)]
x86: Fix unmaskable MSI handling, and also some other EOI-notification issues.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 21 Jan 2009 11:58:01 +0000 (11:58 +0000)]
xenoprof: dom0 hypercall could trigger Xen NULL-pointer access
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Keir Fraser [Tue, 20 Jan 2009 16:41:29 +0000 (16:41 +0000)]
x86, hvm: Limit output debug port to printable characters.
In particular, '\r' was causing output corruption, and it's not
actually needed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 20 Jan 2009 15:10:28 +0000 (15:10 +0000)]
hvmloader: ACPI compiler is not to be buil;t and installed on target system.
Since it is a build prerequisite (in some cases) simply fail the build
if it is not found when it turns out to be required. Just as we would
for any other tool-chain prereq.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 20 Jan 2009 14:30:42 +0000 (14:30 +0000)]
page_alloc: Clean up free_heap_pages and init_heap_pages interfaces.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 20 Jan 2009 13:57:20 +0000 (13:57 +0000)]
x86_32: Get rid of xenheap_phys_start as it is zero after start of day.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 20 Jan 2009 13:27:08 +0000 (13:27 +0000)]
x86: update microcode support
- Container header file holding the patches changed. Update to new
format.
- in cpu_request_microcode() move heap re-allocation & copy out of the
loop.
Side-effect: Remove limitation in only supporting fixed sized
microcode patches. Also simplifies code a lot.
- cleanup: use rdmsr and wrmsrl instead of inlined assembler
- pass ucode_cpu_info as arguments. Improves reentrancy.
- cleanup: simplify struct ucode_cpu_info and remove
get_matching_microcode hook. Side-effect: reduces kernel size.
- bugfix: fix xen kernel memory leak in error path. equiv_cpu_table
was not freed.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 20 Jan 2009 13:22:28 +0000 (13:22 +0000)]
passthrough: fix typo
The indentation level of the following code was incidentally
changed when event_lock was added to protect dpci.
It causes no issue but does look a little weird, so fix it.
Signed-off-by: Qing He <qing.he@intel.com>
Keir Fraser [Mon, 19 Jan 2009 17:40:28 +0000 (17:40 +0000)]
page_alloc: Fix x86_64's alloc_xenheap_pages() when system has >=4GB RAM.
Also do a few cleanups at the same time.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 16 Jan 2009 15:43:59 +0000 (15:43 +0000)]
x86: Tighten MSR access checks so only dom0 can access cpufreq MSRs,
and then only when it is the cpufreq controller.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 16 Jan 2009 15:32:12 +0000 (15:32 +0000)]
x86: Let dom0 write MPERF/APERF MSRs if it is managing cpufreq.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Keir Fraser [Fri, 16 Jan 2009 15:12:12 +0000 (15:12 +0000)]
x86_64: Remove statically-partitioned Xen heap.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 16 Jan 2009 13:17:53 +0000 (13:17 +0000)]
x86: Fix the 32-bit build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 16 Jan 2009 11:47:21 +0000 (11:47 +0000)]
[IA64] fix compilation error caused by 19046:
ecf603780f56
This patch fixes the following compilation error adjusting
function prototypes.
> xc_core_ia64.c:176: error: conflicting types for
'xc_core_arch_memory_map_get'
> xc_core.h:141: error: previous declaration of
'xc_core_arch_memory_map_get' was here
> xc_core_ia64.c:241: error: conflicting types for
'xc_core_arch_map_p2m'
> xc_core.h:144: error: previous declaration of 'xc_core_arch_map_p2m'
was here
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Fri, 16 Jan 2009 11:46:51 +0000 (11:46 +0000)]
ptrace_core: Handle FV cross-bitness.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Keir Fraser [Thu, 15 Jan 2009 12:54:31 +0000 (12:54 +0000)]
x86 p2m: Apply correct 4GB NPT limit check in two places.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 15 Jan 2009 12:41:44 +0000 (12:41 +0000)]
rombios: remove unnecessary function calls.
The rombios always becomes read-only after using 32bit gateway.
That is not handy for using the gateway.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Thu, 15 Jan 2009 12:40:48 +0000 (12:40 +0000)]
dump-core: update the documentation
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Thu, 15 Jan 2009 12:39:59 +0000 (12:39 +0000)]
x86 acpi: remove redundant function call.
PM_TIMER_TICKS_TO_US() and acpi_pm_tick_to_ns() does the almost the
same stuff. Thus remove the old one.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Wei Gang <wei.gang@intel.com>
Keir Fraser [Thu, 15 Jan 2009 12:37:42 +0000 (12:37 +0000)]
libxc: Support cross-bitness guest when core-dumping
This patch allows core-dumping to work on a cross-bit host/guest
configuration, whereas previously that was not supported. It supports
both PV and FV guests. The core file format generated by the host,
needs to match that of the guest, so an alignment issue is addressed,
along with the p2m frame list handling being done according to the
guest size.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Keir Fraser [Thu, 15 Jan 2009 12:36:29 +0000 (12:36 +0000)]
xenoprof: The checks in the function passive_domain_do_rdmsr() were
not sufficient.
Also the same checks were done in the function
passive_domain_do_wrmsr().
So these common checks are moved in a new single function
passive_domain_msr_op_checks().
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Keir Fraser [Thu, 15 Jan 2009 12:35:09 +0000 (12:35 +0000)]
rombios: Protect the ax register before calling the TCG BIOS extensions function.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Wed, 14 Jan 2009 13:43:17 +0000 (13:43 +0000)]
xenpm: build fix
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 14 Jan 2009 11:39:01 +0000 (11:39 +0000)]
Remove unused XENMAPSPACE_mfn
Not present in any stable release of Xen. Introduced for qemu-dm but
not needed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 14 Jan 2009 11:24:37 +0000 (11:24 +0000)]
Remove unused XENMEM_remove_from_physmap.
Never present in any stable release of Xen. Introduced for use by
qemu-dm but now not needed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 14 Jan 2009 11:15:01 +0000 (11:15 +0000)]
Remove unused XENMEM_translate_pfn_list.
Never used by a guest OS (except in IA64 hcall translation layer) and
obsoleted in the tools for ages. Recent usage by qemu-dm is now
removed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 14 Jan 2009 10:56:18 +0000 (10:56 +0000)]
x86: propagate disabled APIC state to Dom0
This in particular eliminates the need to specify "noapic" to Dom0
when "noapic" is passed to Xen, provided the kernel side gets slightly
modified to make use of this information (Linux side patch cannot
easily be provided for the 2.6.18 tree, but this is being used by our
2.6.27-based one).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 14 Jan 2009 10:55:40 +0000 (10:55 +0000)]
x86: restore ability to work on systems without APIC
This got broken with the default-enabling of MSI. Apart from fixing
the base issue, the patch also addresses
- the 'i' command crashing where there is no IO-APIC,
- the 'i' command needlessly printing information for all 256 vectors
when the use of IO-APIC(s) is disabled, and
- the need to specify both "nolapic" and "noapic" when "nolapic" alone
should already have the intended effect.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 14 Jan 2009 10:52:39 +0000 (10:52 +0000)]
documentation: how to disable opengl for stubdomains
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Wed, 14 Jan 2009 10:51:58 +0000 (10:51 +0000)]
x86, hvm: stdvga improvements
* enables linear framebuffer and VBE 3.0 extensions.
* add a number of new resolutions, up to 2560x1600, and including
* widescreen modes common to modern displays.
* Introduce configurable video ram size through the "videoram" config
* file option, shrinking default video ram used to 4 Megs (thus
* eliminating 4 wasted megs/VM that have been the case until now), but
* allowing users to specify up to 16 Megs of vram, to support the
* extreme high resolutions such as 2560x1600x32.
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Tue, 13 Jan 2009 15:53:47 +0000 (15:53 +0000)]
x86: Call msix_set_enable for MSI-x interrupt
For MSI-x, we should call msix_set_enable() instead of
msi_set_enable().
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Keir Fraser [Tue, 13 Jan 2009 15:42:47 +0000 (15:42 +0000)]
hvmloader: remove videoram allocation; move reserve base to 0xfc000000.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Tue, 13 Jan 2009 15:29:06 +0000 (15:29 +0000)]
xend: fix ballooning bug
c/s 18960 introduced a bug when xend balloons memory. The function
balloon.free requires a reference to a XendDomainInfo object, which is
missing in one call of this function. Attached patch fixes this. Also
replaced the variable name "self" in the (classless) function with
something more descriptive.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Reported-by: Maik Hentsche <maik.hentsche@amd.com>
Keir Fraser [Tue, 13 Jan 2009 15:16:46 +0000 (15:16 +0000)]
AMD IOMMU: Reset tail and head pointer of cmd buffer and event log
Reset the tail and the head pointers of command buffer and event log
to zero in case that iommu does not reset them after the base
addresses of those buffers are updated.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Keir Fraser [Tue, 13 Jan 2009 15:16:07 +0000 (15:16 +0000)]
AMD IOMMU: Fix a dead lock in device assignment.
Do not obtain pcidevs_lock in reassign_device().
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Keir Fraser [Tue, 13 Jan 2009 08:59:49 +0000 (08:59 +0000)]
build: Define cc-option-add to immediately add options to CFLAGS
without deferring the test execution of CC. This avoids extra
executions of CC every time CFLAGS is expanded.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 13 Jan 2009 08:40:42 +0000 (08:40 +0000)]
xen: Do not assign to CFLAGS/AFLAGS/LDFLAGS with :=.
It's not necessary and prevents using rule patterns in these
variables.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 12 Jan 2009 16:39:07 +0000 (16:39 +0000)]
tools: Don't turn CFLAGS into a := (immediate evaluation) variable as
this breaks 'CFLAGS += -MMD -MF .$(@F).d'
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 12 Jan 2009 10:23:55 +0000 (10:23 +0000)]
hvmloader: Fix SMBIOS memory device length boundary condition.
dev_memsize ends up 0 when it shouldn't be on 16G boundary conditions.
Signed-off-by: Bill Rieske <brieske@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 12 Jan 2009 10:17:12 +0000 (10:17 +0000)]
Do not print `***' when compiling unless we fall over
This has finally bugged me enough to do something about it:
make prints `***' when it stops due to an error. With make -j, and/or
with automated build systems, this error marker can be in the middle
of a large logfile. It is useful to be able to search for it.
Therefore change occurrences of `*' to `=' for information and warning
messages. `***' is reserved for cases where the build stops.
A corresponding change is being applied to qemu-xen-unstable.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Mon, 12 Jan 2009 10:16:05 +0000 (10:16 +0000)]
Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything. This was done
in 19010:
275abe1c5d24 for the hypervisor.
In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/. Specifically:
* Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
* Remove -Wp,-MD... from every other Makefile
* Remove setting of DEPS from every other Makefile
* Ensure that every Makefile says -include $(DEPS)
* Ensure that every Makefile's clean target removes $(DEPS)
Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP. The variable name is now standardised in
Rules.mk as DEPS.
I have done a test build with this change, on Debian etch.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Fri, 9 Jan 2009 16:56:54 +0000 (16:56 +0000)]
stubdom: Fix compilation after libelf header changes
Changeset 19011:
7df072566b8c moved some of the libelf headers.
However, no changes were made to stubdom/Makefile.
stubdom/Makefile unfortunately contains embedded in it knowledge about
the header directory structures, and must therefore typically be
updated if new header directories are created.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Fri, 9 Jan 2009 15:57:57 +0000 (15:57 +0000)]
AMD IOMMU: Allocate I/O pagetable from domheap instead of xenheap
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Keir Fraser [Fri, 9 Jan 2009 13:00:10 +0000 (13:00 +0000)]
hvmloader: MTRR UC type covers the pci regions only.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 9 Jan 2009 12:41:25 +0000 (12:41 +0000)]
hvmloader: Dynamically size the PCI hole.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 9 Jan 2009 11:44:35 +0000 (11:44 +0000)]
New XENMAPSPACE_gmfn parameter for XENMEM_add_to_physmap.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 9 Jan 2009 10:04:24 +0000 (10:04 +0000)]
xend: Fix a ssl migration hang issue
When another VM is started by xend, the spawned qemu process will keep
the p2cwrite file descriptor open.
Thus there will be two open descriptors associated with the write end
of the pipe. The read end of the pipe only sees EOF when the qemu
process has terminated.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Keir Fraser [Thu, 8 Jan 2009 16:59:21 +0000 (16:59 +0000)]
hvmloader: Reserve BIOS memory and VGA memory at top of 4GB memory hole.
To make memory management easier in hvmloader, defer building a
generic E820 map until the end of hvmloader bootstrap.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 16:53:15 +0000 (16:53 +0000)]
Print domain max_pages in 'q' debug output.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 15:27:20 +0000 (15:27 +0000)]
x86, hvm: Move E820 table creation into hvmloader, extend
hvm_info_table to describe memory parameters in a simpler form from
domain builder to hvmloader.
Also move reserved special page mappings immediately below the 4GB
boundary.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 15:18:30 +0000 (15:18 +0000)]
xm: Fix syntax error.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 13:49:05 +0000 (13:49 +0000)]
hvmloader: Simplify access to hvm_info_table.
Also require the table to be present.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 13:37:16 +0000 (13:37 +0000)]
Fix gcc make-dep cmdline options.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 13:21:06 +0000 (13:21 +0000)]
x86: Re-instate warnings for HVM guest writes to read-only memory.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 13:15:49 +0000 (13:15 +0000)]
Move libelf headers out of xen public header dir.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Thu, 8 Jan 2009 13:08:37 +0000 (13:08 +0000)]
Auto-build dependency files in hypervisor build tree.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 Jan 2009 11:32:39 +0000 (11:32 +0000)]
x86-64: guest directed placement of initial p->m map
By adding another ELF note, the kernel can now direct the hypervisor
(for Dom0) and in the future also the tools (for DomU-s) to place the
initial phys->mach translation table at other than an address
immediately above the kernel/initrd images. This eliminates the size
restriction imposed on this table by Linux (the kernel loads above the
-2Gb boundary, and hence the entire initial mapping cannot reach or
even exceed 2Gb).
There are a few items in this patch I'm not particularly happy with,
but couldn't think of a better solution:
- there is a hidden assumption that pages allocated for the domain are
put on the domain's page list sequentially
- the way backward compatibility is maintained is placing requirements
on the kernel side that make the code somewhat convoluted (because
it
needs to check where the map is actually placed in quite a few
places)
- code is there to use 1Gb mappings for the hypervisor created table,
but lacking a machine with 512G+ memory for immediate testing I
can't
verify this works; I know that 2Mb mappings work, and hence imply
that 1Gb ones would too (of course, if the kernel replaces the table
- like Linux does -, it cannot use 2Mb/1Gb mappings or even try to
re-use the page table entries, but I don't consider this a problem)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Thu, 8 Jan 2009 11:27:11 +0000 (11:27 +0000)]
passthough: MSI-INTx translation documentation
Signed-off-by: Qing He <qing.he@intel.com>
Keir Fraser [Thu, 8 Jan 2009 11:26:58 +0000 (11:26 +0000)]
pci: add config options for MSI-INTx translation in HVM
Add a config file option 'pci_msitranslate' to enable MSI-INTx
translation in HVM, and also a per-device option 'msitranslate' to
allow device base to be overridden
Signed-off-by: Qing He <qing.he@intel.com>
Keir Fraser [Thu, 8 Jan 2009 11:26:16 +0000 (11:26 +0000)]
pci: add pci option support for XenAPI sever
Allow the per-device options for passthrough pci devices
This patch is for XenAPI server
A new key-value pair element of 'pci' named 'pci_opt' is added
to xml config file
Signed-off-by: Qing He <qing.he@intel.com>
Keir Fraser [Thu, 8 Jan 2009 11:25:43 +0000 (11:25 +0000)]
pci: add pci option support for XML-RPC server
Allow the per-device options for passthrough pci devices
for exmaple, in domain config file:
pci = ['01:00.0,opt1=val1,opt2=val2', '01:00.1' ]
or in the PCI hotplug case:
xm pci-attach -o opt1=val1 --options=opt2=val2 <domid> 01:00.0 6
This patch is for xml-rpc server
Signed-off-by: Qing He <qing.he@intel.com>
Keir Fraser [Thu, 8 Jan 2009 11:25:06 +0000 (11:25 +0000)]
passthrough: MSI-INTx translation for HVM
The patch adds a new type of pt_irq: PT_IRQ_TYPE_MSI_TRANSLATE.
With it, guest dpci irq can now use msi as the underlying pirq
while injected as INTx irq.
Signed-off-by: Qing He <qing.he@intel.com>