Commit Graph
19053 Commits
Author SHA1 Message Date
Keir Fraser ff4f536ebf [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>
2009-01-16 11:47:21 +00:00
Keir Fraser fb9dda3e06 ptrace_core: Handle FV cross-bitness.
Signed-off-by: Bruce Rogers <brogers@novell.com>
2009-01-16 11:46:51 +00:00
Keir Fraser 3879616f16 x86 p2m: Apply correct 4GB NPT limit check in two places.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-15 12:54:31 +00:00
Keir Fraser 44c6dadfe2 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>
2009-01-15 12:41:44 +00:00
Keir Fraser b152ef119b dump-core: update the documentation
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-01-15 12:40:48 +00:00
Keir Fraser dcf9f950dc 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>
2009-01-15 12:39:59 +00:00
Keir Fraser 3967bb3aff 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>
2009-01-15 12:37:42 +00:00
Keir Fraser 523540cc9b 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>
2009-01-15 12:36:29 +00:00
Keir Fraser 501b78cbc2 rombios: Protect the ax register before calling the TCG BIOS extensions function.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2009-01-15 12:35:09 +00:00
Keir Fraser 568aed7d6b xenpm: build fix
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-01-14 13:43:17 +00:00
Keir Fraser 0c01be2b7c 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>
2009-01-14 11:39:01 +00:00
Keir Fraser 78c3097e4f 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>
2009-01-14 11:24:37 +00:00
Keir Fraser 2d2f7977a0 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>
2009-01-14 11:15:01 +00:00
Keir Fraser b1b4a612b6 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>
2009-01-14 10:56:18 +00:00
Keir Fraser 2198c5151a 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>
2009-01-14 10:55:40 +00:00
Keir Fraser 440ccd6a3d documentation: how to disable opengl for stubdomains
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-01-14 10:52:39 +00:00
Keir Fraser a390e6128b 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>
2009-01-14 10:51:58 +00:00
Keir Fraser 248ba473c4 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>
2009-01-13 15:53:47 +00:00
Keir Fraser 5abf934455 hvmloader: remove videoram allocation; move reserve base to 0xfc000000.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-01-13 15:42:47 +00:00
Keir Fraser 47cee35ef0 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>
2009-01-13 15:29:06 +00:00
Keir Fraser 542f7a560f 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>
2009-01-13 15:16:46 +00:00
Keir Fraser 334ed7f65e 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>
2009-01-13 15:16:07 +00:00
Keir Fraser 6b1ce5497d 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>
2009-01-13 08:59:49 +00:00
Keir Fraser e2869f9f1c 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>
2009-01-13 08:40:42 +00:00
Keir Fraser bd3358a451 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>
2009-01-12 16:39:07 +00:00
Keir Fraser 4ef2a41a2d 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>
2009-01-12 10:23:55 +00:00
Keir Fraser bef2c17dbc 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>
2009-01-12 10:17:12 +00:00
Keir Fraser 9f8501582f 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>
2009-01-12 10:16:05 +00:00
Keir Fraser ceff4bb8a3 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>
2009-01-09 16:56:54 +00:00
Keir Fraser 49e486455b AMD IOMMU: Allocate I/O pagetable from domheap instead of xenheap
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2009-01-09 15:57:57 +00:00
Keir Fraser 0d1fa649fe hvmloader: MTRR UC type covers the pci regions only.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-09 13:00:10 +00:00
Keir Fraser 31b8c8391c hvmloader: Dynamically size the PCI hole.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-09 12:41:25 +00:00
Keir Fraser 3e50af3d87 New XENMAPSPACE_gmfn parameter for XENMEM_add_to_physmap.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-09 11:44:35 +00:00
Keir Fraser a562362b25 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>
2009-01-09 10:04:24 +00:00
Keir Fraser e3a9e577ae 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>
2009-01-08 16:59:21 +00:00
Keir Fraser da510a16e2 Print domain max_pages in 'q' debug output.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 16:53:15 +00:00
Keir Fraser ad8b20cc85 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>
2009-01-08 15:27:20 +00:00
Keir Fraser 85eff2ee28 xm: Fix syntax error.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 15:18:30 +00:00
Keir Fraser 54562e0cdf hvmloader: Simplify access to hvm_info_table.
Also require the table to be present.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 13:49:05 +00:00
Keir Fraser 5381a090a1 Fix gcc make-dep cmdline options.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 13:37:16 +00:00
Keir Fraser 21b9b29dc4 x86: Re-instate warnings for HVM guest writes to read-only memory.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 13:21:06 +00:00
Keir Fraser 8ce65842ad Move libelf headers out of xen public header dir.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-01-08 13:15:49 +00:00
Keir Fraser 68b1230ae3 Auto-build dependency files in hypervisor build tree.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-08 13:08:37 +00:00
Keir Fraser c6d8d541e9 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>
2009-01-08 11:32:39 +00:00
Keir Fraser f5bf427cd3 passthough: MSI-INTx translation documentation
Signed-off-by: Qing He <qing.he@intel.com>
2009-01-08 11:27:11 +00:00
Keir Fraser f86db27518 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>
2009-01-08 11:26:58 +00:00
Keir Fraser 925d7f9d82 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>
2009-01-08 11:26:16 +00:00
Keir Fraser 925b2ca585 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>
2009-01-08 11:25:43 +00:00
Keir Fraser 11f8ac5ebf 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>
2009-01-08 11:25:06 +00:00
Keir Fraser 6df92ebc30 xenpm tool enhancements
Two enhancements are made in this patch:

1. Make cpuid in command line optional: if user does not provide
cpuid, xenpm will operate on all the CPUs. this will easy the xenpm
usage. e.g. to set the cpufreq governor, user usually want to set the
governor on all CPUs. User can accomplish this easily with this
enhancement.

2. Add another option "xenpm start" to calculate the Cx/Px state
residency percentage during specified period. when user issue "xenpm
start", xenpm will start to record the Cx/Px state residency. when
user issue CTRL-C, xenpm will stop and show the Cx/Px state residency
and percentage of this period. this is helpful to measure the xenpm
effect for speficied workload.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>Signed-off-by: Ke Yu <ke.yu@intel.com>
2009-01-08 11:21:23 +00:00