xen.git
17 years agovtd: Move dom0 RMRR check to intel_iommu_remove_device()
Keir Fraser [Wed, 30 Jul 2008 08:25:07 +0000 (09:25 +0100)]
vtd: Move dom0 RMRR check to intel_iommu_remove_device()

If put dom0 RMRR check in domain_context_unmap_one(), the devices with
RMRR cannot be assigned to other domain, becuase
domain_context_unmap_one() won't unmap context for them, and dom0
always owns them. This patch moves the check to intel_iommu_remove_device()
which is only called by dom0 hypercall.  This not only guarantees
keeping RMRR mappings for dom0 during its booting, but also won't
impact device assignment.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agopygrub: Add 64bit library path to pygrub default search path.
Keir Fraser [Wed, 30 Jul 2008 08:23:47 +0000 (09:23 +0100)]
pygrub: Add 64bit library path to pygrub default search path.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoxm, xenapi: Fix a problem in xm client for domain shutdown
Keir Fraser [Wed, 30 Jul 2008 08:23:11 +0000 (09:23 +0100)]
xm, xenapi: Fix a problem in xm client for domain shutdown

Xm did not shut down domains anymore when run in xen-api mode due to a
'None' parameter being passed to xend when looking up a domain. This
fixes the problem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoxm: Enable a bootloader when using XM via Xen-API
Keir Fraser [Wed, 30 Jul 2008 08:22:24 +0000 (09:22 +0100)]
xm: Enable a bootloader when using XM via Xen-API

This enables the usage of a bootloader, i.e., pygrub, when starting a
domain using xm in Xen-API mode.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agox86: Fix the build after c/s 18163 (5fbcbee355e2)
Keir Fraser [Wed, 30 Jul 2008 08:20:42 +0000 (09:20 +0100)]
x86: Fix the build after c/s 18163 (5fbcbee355e2)

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxenconsoled: replace gettimeofday with clock_gettime
Keir Fraser [Wed, 30 Jul 2008 08:18:35 +0000 (09:18 +0100)]
xenconsoled: replace gettimeofday with clock_gettime

Currently if someone changes the date on the host, xenconsoled may
behave incorrectly due to the use of gettimeofday for the rate control
algorithm. For example I was able to hang the console connected to a
guest just setting the date forward 20 years. To solve the problem we
need to use a time source that doesn't change start point, that is
clock_gettime with CLOCK_MONOTONIC. The only bad side effect is that
it introduces a dependency to librt, but I think is well worth it.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
17 years agorombios: Remove dead code.
Keir Fraser [Tue, 29 Jul 2008 16:00:29 +0000 (17:00 +0100)]
rombios: Remove dead code.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agorombios: Obtain S3 wake vector from >1MB.
Keir Fraser [Tue, 29 Jul 2008 15:03:58 +0000 (16:03 +0100)]
rombios: Obtain S3 wake vector from >1MB.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvmloader: Load ACPI tables outside BIOS area, so they are writable by
Keir Fraser [Tue, 29 Jul 2008 14:10:58 +0000 (15:10 +0100)]
hvmloader: Load ACPI tables outside BIOS area, so they are writable by
OSPM (particularly the S3 firmware_waking_vector).

TODO: rombios must enter protected mode to fetch the vector on S3 resume.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoChange Px control protection corresponding to changeset 18125
Keir Fraser [Tue, 29 Jul 2008 12:27:29 +0000 (13:27 +0100)]
Change Px control protection corresponding to changeset 18125

xen changeset 18125(ab1d7db3facb) changed some px init logic, which
has some effect to Px statistic and S3 suspend/resume logic.
This patch change Px control protection corresponding to changeset
18125.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
17 years agox86, hvm: Fix issue with user-mode writes to read-only memory.
Keir Fraser [Tue, 29 Jul 2008 12:24:57 +0000 (13:24 +0100)]
x86, hvm: Fix issue with user-mode writes to read-only memory.

This patch fixes an issue where a guest could get stuck if a write to
memory marked p2m_ram_ro happened from user mode. It would get
misinterpreted as a user-mode page-table write, and the "dummy write"
emulation necessary to skip over the instruction never got done. In
looking into this, I also discovered that the user-mode page-table
check is done in two places, the second (in emulate_map_dest) of which
can never be reached and is just a waste of cycles. Tim Deegan
requested that rather than completely removing that code, I'd leave it
in for debug-builds with an added warning-print.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
17 years agorombios: Narrow window where BIOS area is writable, and ensure it
Keir Fraser [Tue, 29 Jul 2008 12:11:29 +0000 (13:11 +0100)]
rombios: Narrow window where BIOS area is writable, and ensure it
really *is* writable in that region. This is almost enough to get S3
working again (read-only firmware-waking-vector is still a problem).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: reprogram LAPIC timer in pit_broadcast_exit
Keir Fraser [Tue, 29 Jul 2008 09:42:30 +0000 (10:42 +0100)]
x86: reprogram LAPIC timer in pit_broadcast_exit

Thus to remove possible timer expiring delay caused by deep C state
LAPIC timer stopping.

Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agovtd: Fix some dmar bugs
Keir Fraser [Tue, 29 Jul 2008 09:41:41 +0000 (10:41 +0100)]
vtd: Fix some dmar bugs

In acpi_parse_one_drhd(), remove return directly when only one
INCLUDE_ALL check fails, so that avoid memory leak. In addition,
remove "dmaru->scope.devices_cnt == 0 && !dmaru->include_all" check,
due to PCI-PCI bridges are not counted.

This patch fixes bug #1307.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agox86: fix a few page table handling issues
Keir Fraser [Tue, 29 Jul 2008 09:05:32 +0000 (10:05 +0100)]
x86: fix a few page table handling issues

- adjust_guest_l?e() shouldn't be called on non-guest entries
- unadjust_guest_l3e() should be called in the back-out loop of
  alloc_l3_table()
- create_pae_xen_mappings() and pae_flush_pgd() shouldn't be called in
  the failure case of mod_l3_entry()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agoFix ia64 build.
Keir Fraser [Tue, 29 Jul 2008 08:57:14 +0000 (09:57 +0100)]
Fix ia64 build.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoSimplify 'dma heap' logic.
Keir Fraser [Mon, 28 Jul 2008 15:40:30 +0000 (16:40 +0100)]
Simplify 'dma heap' logic.

1. Only useful for NUMA systems, so turn it off on non-NUMA systems by
   default.
2. On NUMA systems, by default relate the DMA heap size to NUMA node 0
   memory size (so that not all of node 0's memory ends up being 'DMA
   heap').
3. Remove the 'dma emergency pool'. It's less useful now that running
   out of low memory isn;t as fatal as it used to be (e.g., when we
   needed to be able to allocate low-memory PAE page directories).

Based on patches by Andre Przywara and Xiaowei Yang.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoDefault dma_bitsize is 30.
Keir Fraser [Mon, 28 Jul 2008 15:06:03 +0000 (16:06 +0100)]
Default dma_bitsize is 30.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoChange cpufreq_controller from meanless FREQCTL_none to FREQCTL_xen
Keir Fraser [Mon, 28 Jul 2008 12:39:47 +0000 (13:39 +0100)]
Change cpufreq_controller from meanless FREQCTL_none to FREQCTL_xen

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agoMove xen-pm options from dom0 cmdline option to start info.
Keir Fraser [Mon, 28 Jul 2008 10:43:54 +0000 (11:43 +0100)]
Move xen-pm options from dom0 cmdline option to start info.

Thus to avoid xen-pm being manually enforced by end user in dom0
cmdline but without enabling them in xen.

signed-off-by: Wei Gang <gang.wei@intel.com>

17 years agoxenapi: Update the xenapi document for pci device assignment support.
Keir Fraser [Mon, 28 Jul 2008 10:40:21 +0000 (11:40 +0100)]
xenapi: Update the xenapi document for pci device assignment support.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agofs-back: build fixes for BSD and cleanups.
Keir Fraser [Mon, 28 Jul 2008 10:39:32 +0000 (11:39 +0100)]
fs-back: build fixes for BSD and cleanups.

Signed-of-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agox86: extend debug key 't' to collect useful clock skew info
Keir Fraser [Mon, 28 Jul 2008 10:36:39 +0000 (11:36 +0100)]
x86: extend debug key 't' to collect useful clock skew info

By repeating "xm debug-key t; xm dmesg | tail -N" in
dom0 (e.g. with the "watch" command), useful skew info
about the machine can be collected, which will be very
helpful for diagnosing customer problems on misbehaving
machines.

Patch details:
1) Min and max readings from the current sample are useless
so get rid of those but retain the current maxdif (stime skew).
2) Remember max of skew, sum of skews, and a count
so average skew can be displayed.
3) Also record info for cycles (tsc on x86, itc on ia64).

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
17 years agox86: Roughly synchronise calls to local_time_calibration().
Keir Fraser [Mon, 28 Jul 2008 10:33:28 +0000 (11:33 +0100)]
x86: Roughly synchronise calls to local_time_calibration().

This results in reduced skew; both max and average skew are reduced by
between a factor of 2 and 3.  Note that timers still fire at slightly
different times because the next "round epoch" is still relative to
local stime which still has some inter-processor skew.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
17 years agoxend, pci passthru: Use Dstate transition to do FLR for integrated
Keir Fraser [Mon, 28 Jul 2008 10:29:23 +0000 (11:29 +0100)]
xend, pci passthru: Use Dstate transition to do FLR for integrated
devices without proper FLR capability.

Currently integrated devices without proper FLR capability are not
assignable. This is not nice since actually they may be assignable,
but due to old BIOS the proper FLR capability is not exposed. We can
use the previously-used Dstate transition method to do FLR for them.
This works well and looks few issues are reported AFAIK. Maybe we can
make a black list for the (rare) integrated devices that don't work
with this method.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agoxend, pci passthru: Relax the requirement of co-assignment.
Keir Fraser [Mon, 28 Jul 2008 10:28:45 +0000 (11:28 +0100)]
xend, pci passthru: Relax the requirement of co-assignment.

Certain PCI or PCIe devices needs to be co-assigned. Currently we
require all the related devices be assigned to the same guest. This
can be relaxed to: part of them can be assgined to the same guest, and
after that, the left ones can't be assigned.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agoxend: Improve the error prompt when xc.test_assign_device() fails.
Keir Fraser [Mon, 28 Jul 2008 10:27:48 +0000 (11:27 +0100)]
xend: Improve the error prompt when xc.test_assign_device() fails.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agoUpdate Xen version for 3.3.0-rc2-pre
Keir Fraser [Fri, 25 Jul 2008 14:03:03 +0000 (15:03 +0100)]
Update Xen version for 3.3.0-rc2-pre

17 years agoAdded tag 3.3.0-rc1 for changeset c3494402098e26507fc61a6579832c0149351d6a
Keir Fraser [Fri, 25 Jul 2008 14:02:06 +0000 (15:02 +0100)]
Added tag 3.3.0-rc1 for changeset c3494402098e26507fc61a6579832c0149351d6a

17 years agoUpdate Xen version for 3.3.0-rc1.
Keir Fraser [Fri, 25 Jul 2008 14:01:59 +0000 (15:01 +0100)]
Update Xen version for 3.3.0-rc1.

17 years agoAdd some directories created by the stubdom build to .hgignore.
Keir Fraser [Fri, 25 Jul 2008 13:01:31 +0000 (14:01 +0100)]
Add some directories created by the stubdom build to .hgignore.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agox86_emulate: fix unintended writeback on cmp/test instructions
Keir Fraser [Fri, 25 Jul 2008 13:00:27 +0000 (14:00 +0100)]
x86_emulate: fix unintended writeback on cmp/test instructions

This patch fixes an issue when x86_emulate is called with
force_writeback=1 set. It resulted in cmp and test instructions with
memory operands to have the mem value written back after instruction
emulation finished. This caused false alarms on writes to RO mem, and
might have caused other issues if unintended writes occured to device
registers in mmio space.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
17 years agoSupport using a specific branch or tag of ioemu-remote
Keir Fraser [Fri, 25 Jul 2008 12:59:07 +0000 (13:59 +0100)]
Support using a specific branch or tag of ioemu-remote

With this patch you can set QEMU_TAG to check out a specific version.
When we set it, QEMU_TAG ought to be in Config.mk, I think.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agoxend: fix dual destroy
Keir Fraser [Fri, 25 Jul 2008 12:58:23 +0000 (13:58 +0100)]
xend: fix dual destroy

After changeset 18030 and 18064 were checked in, I found some issues
when creating HVM domains with devices assigned.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agostubdom: avoid re-making mk-headers and thus newlib etc.
Keir Fraser [Fri, 25 Jul 2008 09:06:53 +0000 (10:06 +0100)]
stubdom: avoid re-making mk-headers and thus newlib etc.

Using a stamp file for mk-headers permits to avoid to re-run newlib
configuration etc.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agofs-backend: fix FD allocation for file creation
Keir Fraser [Fri, 25 Jul 2008 08:49:06 +0000 (09:49 +0100)]
fs-backend: fix FD allocation for file creation

The creation operation also opens a file, we need to allocate a
virtual fd for that too.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: adds put_domain() for breaks in arch_do_domctl().
Keir Fraser [Fri, 25 Jul 2008 08:47:41 +0000 (09:47 +0100)]
x86: adds put_domain() for breaks in arch_do_domctl().

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agovtd: change code style of pci.c file, and add spin_unlock(&pdev->lock)
Keir Fraser [Fri, 25 Jul 2008 08:46:27 +0000 (09:46 +0100)]
vtd: change code style of pci.c file, and add spin_unlock(&pdev->lock)
when iommu_add_device() fails.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agovtd: There is only one INCLUDE_ALL DMAR unit in system, but no
Keir Fraser [Fri, 25 Jul 2008 08:45:41 +0000 (09:45 +0100)]
vtd: There is only one INCLUDE_ALL DMAR unit in system, but no
restriction on whether it's the last unit.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agovt-d: Map RMRR in intel_iommu_add_device() if the device has RMRR;
Keir Fraser [Fri, 25 Jul 2008 08:44:48 +0000 (09:44 +0100)]
vt-d: Map RMRR in intel_iommu_add_device() if the device has RMRR;
move domain_context_mapping() to be in front of list_move() in
reassign_device_ownership().

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agostubdom: fix do_xen_hypercall error report
Keir Fraser [Fri, 25 Jul 2008 08:40:14 +0000 (09:40 +0100)]
stubdom: fix do_xen_hypercall error report

call.result is an unsigned long

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: make sure to use old tree for now
Keir Fraser [Thu, 24 Jul 2008 16:36:27 +0000 (17:36 +0100)]
stubdom: make sure to use old tree for now

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agominios: grant table map (gntdev) bug fixes
Keir Fraser [Thu, 24 Jul 2008 16:34:50 +0000 (17:34 +0100)]
minios: grant table map (gntdev) bug fixes

 * Uninitialized dev_bus_addr argument to GNTTABOP_unmap_grant_ref
   results in an angry hypervisor.
 * Set errno in libxc and return -1 on error.
 * op.status is a int16_t, so it should be printed with PRId16.
 * Don't print domids[0] or refs[0] if the ptr is NULL. It's more
   polite to crash later, after the message has been printed.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
17 years agominios: Fix build on some gcc versions.
Keir Fraser [Thu, 24 Jul 2008 16:33:40 +0000 (17:33 +0100)]
minios: Fix build on some gcc versions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agotools: use $(PREFIX) rather than hard-coding /usr
Keir Fraser [Thu, 24 Jul 2008 13:33:28 +0000 (14:33 +0100)]
tools: use $(PREFIX) rather than hard-coding /usr

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agotools: remove type parameter from xc_physdev_map_pirq{,_msi}()
Keir Fraser [Thu, 24 Jul 2008 13:18:58 +0000 (14:18 +0100)]
tools: remove type parameter from xc_physdev_map_pirq{,_msi}()
... as it's implied by the function name.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agox86: rename MSI option
Keir Fraser [Thu, 24 Jul 2008 13:18:05 +0000 (14:18 +0100)]
x86: rename MSI option

Also rename the variable and move its declaration to a header.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agox86/32on64: add missing physdev compat mode definitions
Keir Fraser [Thu, 24 Jul 2008 13:17:14 +0000 (14:17 +0100)]
x86/32on64: add missing physdev compat mode definitions

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agox86: XENPF_set_processor_pminfo handler adjustments
Keir Fraser [Thu, 24 Jul 2008 13:16:47 +0000 (14:16 +0100)]
x86: XENPF_set_processor_pminfo handler adjustments

Only handle information passed up from dom0 when actually controlling
the respective functionality. Only count up CPUs once for each CPU.
Allow dom0 to provide information incrementally.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agominios: grant table map (gntdev) for minios
Keir Fraser [Thu, 24 Jul 2008 13:14:27 +0000 (14:14 +0100)]
minios: grant table map (gntdev) for minios

I've implemented a grant map for mini-os to support the xc_gnttab_*()
functions, the equivalent of gntdev in linux. This is useful for my
work in putting xenstored in a stub domain.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
17 years agoioemu: fix spurious track_dirty_vram warning
Keir Fraser [Thu, 24 Jul 2008 13:12:46 +0000 (14:12 +0100)]
ioemu: fix spurious track_dirty_vram warning

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os: select call incorrectly reports xce_handle as ready
Keir Fraser [Thu, 24 Jul 2008 13:11:47 +0000 (14:11 +0100)]
mini-os: select call incorrectly reports xce_handle as ready

The current implementation in minios of xc_evtchn_pending doesn't set
read=0 when there is exactly one port pending. This resulted in
select() incorrectly reporting the file descriptor as ready.

Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agopv-grub: re-implement xc_map_foreign_ranges
Keir Fraser [Thu, 24 Jul 2008 13:10:45 +0000 (14:10 +0100)]
pv-grub: re-implement xc_map_foreign_ranges

Also get rid of va and npages members of privcmd_mmap_entry since we
do not need them any more.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agorombios: S3 resume data must be in EBDA.
Keir Fraser [Thu, 24 Jul 2008 12:44:08 +0000 (13:44 +0100)]
rombios: S3 resume data must be in EBDA.

Rombios itself is read-only.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoblktap: Clean *.opic on 'make clean'.
Keir Fraser [Thu, 24 Jul 2008 10:19:13 +0000 (11:19 +0100)]
blktap: Clean *.opic on 'make clean'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agolibxc: Fix after xc_map_foreign_ranges() patch.
Keir Fraser [Thu, 24 Jul 2008 10:18:53 +0000 (11:18 +0100)]
libxc: Fix after xc_map_foreign_ranges() patch.
Must munmap() region after loading elf image.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agolibxc: Clean up xc_map_foreign_ranges() interface to hide the
Keir Fraser [Wed, 23 Jul 2008 15:39:46 +0000 (16:39 +0100)]
libxc: Clean up xc_map_foreign_ranges() interface to hide the
underlying mmap() invocation.

From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvm: Fix intra-vga-mem mmio in stdvga.c
Keir Fraser [Wed, 23 Jul 2008 12:31:57 +0000 (13:31 +0100)]
hvm: Fix intra-vga-mem mmio in stdvga.c

The current stdvga code never checks if the copy_from/to_guest calls
fail, and thus silenty fails if both sides of an IOREQ_COPY points
into mmio space. This patch fixes this and makes the code correctly
handle intra-vga-mem copies, as well as log & turn off caching if some
more "exotic" type of mmio (say, copy from vga mem to some other
device's iomem), so that such mmio reqs will fall through to regular
ioemu where they can hopefully be handled correctly.

In practice, this patch fixes a number of graphical glitches for
guests running in standard vga mode, including a corrupted OS/2 boot
graphic.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
17 years agovtd: no need to flush iotlb or write buffer in iommu_page_mapping().
Keir Fraser [Wed, 23 Jul 2008 08:59:21 +0000 (09:59 +0100)]
vtd: no need to flush iotlb or write buffer in iommu_page_mapping().

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agovtd: During parsing DMAR table, if find RMRR is incorrect, return error.
Keir Fraser [Wed, 23 Jul 2008 08:58:48 +0000 (09:58 +0100)]
vtd: During parsing DMAR table, if find RMRR is incorrect, return error.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoioemu: Fix hvmloader erroneous debugging prints
Keir Fraser [Tue, 22 Jul 2008 15:03:45 +0000 (16:03 +0100)]
ioemu: Fix hvmloader erroneous debugging prints

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agoioemu: fix vram tracking when !s->lfb_addr
Keir Fraser [Tue, 22 Jul 2008 14:57:19 +0000 (15:57 +0100)]
ioemu: fix vram tracking when !s->lfb_addr

When we don't have an LFB (standard VGA), we can not and do not need
vram tracking at all since we always get explicit dirtying.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86/64: Account for allocation bitmap by making Xen heap appropriately larger.
Keir Fraser [Tue, 22 Jul 2008 12:36:56 +0000 (13:36 +0100)]
x86/64: Account for allocation bitmap by making Xen heap appropriately larger.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix the dom0 booting hang when VT-d is enabled.
Keir Fraser [Tue, 22 Jul 2008 10:56:26 +0000 (11:56 +0100)]
x86: Fix the dom0 booting hang when VT-d is enabled.

Dom0 C/S 593 hooks the pci bus probe and remove function. When
probing a function at booting time, it will first add the device into
Dom0's list through a hypercall, then execute the driver's probe
function. If the probe function fails, another hypercall is called to
remove the device from Dom0's list. But for some RMRR devices, for
example, USB devices, they may still be in use for some operation by
BIOS at booting time. So when removing those kind of devices, we
should still keep the RMRR information.

Also add a small fix for "for_each_rmrr_device".

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
17 years agoxend balloon: portability cleanup
Keir Fraser [Tue, 22 Jul 2008 10:55:06 +0000 (11:55 +0100)]
xend balloon: portability cleanup

Move the linux specific labels to osdep where they
belong. Modification on Solaris code ok'd by SUN (Ryan Scott).

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoFix a typo in the macro PCI_BDF2()
Keir Fraser [Tue, 22 Jul 2008 07:01:56 +0000 (08:01 +0100)]
Fix a typo in the macro PCI_BDF2()

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agofs-back: fix compilation error.
Keir Fraser [Tue, 22 Jul 2008 07:00:43 +0000 (08:00 +0100)]
fs-back: fix compilation error.

XC_PAGE_SIZE and XC_PAGE_MASK should be used instead of PAGE_SIZE
and PAGE_MASK.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agox86 hvm: stubdom and hvmloader always live under /usr/lib, never /usr/lib64
Keir Fraser [Tue, 22 Jul 2008 06:59:44 +0000 (07:59 +0100)]
x86 hvm: stubdom and hvmloader always live under /usr/lib, never /usr/lib64
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agodoc: Fix multi-core amd example
Keir Fraser [Mon, 21 Jul 2008 15:24:19 +0000 (16:24 +0100)]
doc: Fix multi-core amd example

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
17 years agotools: cpuid inputs must be 32 character long if hexadecimal value is
Keir Fraser [Mon, 21 Jul 2008 13:03:26 +0000 (14:03 +0100)]
tools: cpuid inputs must be 32 character long if hexadecimal value is
not used.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
17 years agolibxc: add xc_gnttab_map_domain_grant_refs.
Keir Fraser [Mon, 21 Jul 2008 13:02:53 +0000 (14:02 +0100)]
libxc: add xc_gnttab_map_domain_grant_refs.

xc_gnttab_map_domain_grant_refs permits to simply map several pages
from the same domain.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: Reintroduce clocksource=tsc.
Keir Fraser [Mon, 21 Jul 2008 09:39:15 +0000 (10:39 +0100)]
x86: Reintroduce clocksource=tsc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRevert accidental commit from 18096:fa66b33f975a8f
Keir Fraser [Mon, 21 Jul 2008 09:00:18 +0000 (10:00 +0100)]
Revert accidental commit from 18096:fa66b33f975a8f

17 years agoFix debug key t to avoid irq jitter.
Keir Fraser [Mon, 21 Jul 2008 08:49:40 +0000 (09:49 +0100)]
Fix debug key t to avoid irq jitter.

From: Dan Magenheimer <dan.magenheimer@oracle.com>
Siigned-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend: Fix keymap handling
Keir Fraser [Mon, 21 Jul 2008 08:47:07 +0000 (09:47 +0100)]
xend: Fix keymap handling

Patch allows keymap to be specified inside vfb description and
allows VM configured keymap setting to override XenD default

Signed-off-by: Pat Campbell <plc@novell.com>
17 years agox86: More accurate PIT frequency estimation (1193182Hz)
Keir Fraser [Mon, 21 Jul 2008 08:46:17 +0000 (09:46 +0100)]
x86: More accurate PIT frequency estimation (1193182Hz)

In practice this has no impact since variance between crystals will be
substantially greater than 1-2ppm. But we may as well be as accurate
as possible.

From: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years ago[XSM][FLASK] Remove unused code from XSM and Flask
Keir Fraser [Mon, 21 Jul 2008 08:42:30 +0000 (09:42 +0100)]
[XSM][FLASK] Remove unused code from XSM and Flask

The complete_init hook has been unused since the introduction of the
create secure interface for domain_create.

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
17 years ago[XSM][FLASK] Argument handling bugs in XSM:FLASK
Keir Fraser [Mon, 21 Jul 2008 08:41:36 +0000 (09:41 +0100)]
[XSM][FLASK] Argument handling bugs in XSM:FLASK

Addresses a number of argument handling bugs in the flask_op hypercall
in the XSM:Flask module.  Thanks to Rafal Wojtczuk at McAfee for
reporting the issues and Tim Deegan at Citrix for providing an
initial patch.

This patch addresses the following issues:
 - bounds checking and validation on input arguments to flask_op
 - updated ABI/API, size and cmd are now uint32_t
 - updated userspace tools and libraries to account for ABI/API
 changes
 - implemented all copies using from/to guest, better portability
 - implemented upper bounds checking on op->cmd, op->size
 - implemented sanity checking on op->size and op->buf
 - implemented bit vector for checking from/to usage on op->cmd

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
17 years agoUpdate .hgignore
Keir Fraser [Mon, 21 Jul 2008 08:40:37 +0000 (09:40 +0100)]
Update .hgignore

17 years agomini-os: fix FS frontend index reading
Keir Fraser [Mon, 21 Jul 2008 08:38:33 +0000 (09:38 +0100)]
mini-os: fix FS frontend index reading

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os: fix fs-front.c debugging prints
Keir Fraser [Mon, 21 Jul 2008 08:38:19 +0000 (09:38 +0100)]
mini-os: fix fs-front.c debugging prints

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agofs-back: enable build by default
Keir Fraser [Fri, 18 Jul 2008 16:11:27 +0000 (17:11 +0100)]
fs-back: enable build by default

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os: export allocate_ondemand
Keir Fraser [Fri, 18 Jul 2008 14:45:06 +0000 (15:45 +0100)]
mini-os: export allocate_ondemand

allocate_ondemand can be used to allocate addresse space. Primarily
used for mapping MFNs, it can also be used e.g. to map grant refs.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os is missing list_top in its list.h
Keir Fraser [Fri, 18 Jul 2008 14:44:39 +0000 (15:44 +0100)]
mini-os is missing list_top in its list.h

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: fix build dependencies
Keir Fraser [Fri, 18 Jul 2008 14:03:55 +0000 (15:03 +0100)]
stubdom: fix build dependencies

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fix build dependency
Keir Fraser [Fri, 18 Jul 2008 13:23:41 +0000 (14:23 +0100)]
stubdom: fix build dependency

newlib now depends on mini-os header links

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoxend: portability cleanup
Keir Fraser [Fri, 18 Jul 2008 13:14:12 +0000 (14:14 +0100)]
xend: portability cleanup

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agomini-os: add stack walking debug
Keir Fraser [Fri, 18 Jul 2008 13:09:14 +0000 (14:09 +0100)]
mini-os: add stack walking debug

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoamd iommu: support device add and remove for recent dom0 kernel
Keir Fraser [Fri, 18 Jul 2008 11:46:52 +0000 (12:46 +0100)]
amd iommu: support device add and remove for recent dom0 kernel
Signed-off-by: Wei Wang <wei.wang2@amd.com>
17 years agoCheck phy: block device existence
Keir Fraser [Fri, 18 Jul 2008 11:44:58 +0000 (12:44 +0100)]
Check phy: block device existence

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agostubdom: fix qemu keymap paths
Keir Fraser [Fri, 18 Jul 2008 11:27:45 +0000 (12:27 +0100)]
stubdom: fix qemu keymap paths

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: Remove clocksource=tsc for now.
Keir Fraser [Fri, 18 Jul 2008 11:26:49 +0000 (12:26 +0100)]
x86: Remove clocksource=tsc for now.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix APERF/MPERF query bug on non-current cpu
Keir Fraser [Fri, 18 Jul 2008 10:24:13 +0000 (11:24 +0100)]
x86: Fix APERF/MPERF query bug on non-current cpu

Currently xen hypervisor cpufreq can only query APERF/MPERF on running
cpu, which will result in system broken when query on non-current
cpu. This patch fix the APERF/MPERF query bug on non-current cpu.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agoX86: Fix cpufreq _psd HW_ALL coordination bug
Keir Fraser [Fri, 18 Jul 2008 10:23:25 +0000 (11:23 +0100)]
X86: Fix cpufreq _psd HW_ALL coordination bug

Currently xen cpufreq has a bug when handleing _psd HW_ALL,
which will result in system broken when _psd HW_ALL.
This patch fix this bug by handling _psd HW_ALL in same way as
SW_ALL coordiantion, for the seek of safety.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agopvscsi: Install vscsi script.
Keir Fraser [Fri, 18 Jul 2008 10:22:12 +0000 (11:22 +0100)]
pvscsi: Install vscsi script.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
17 years agoblktap scripts: deletion of double check and permission of using /dev/sdxx
Keir Fraser [Fri, 18 Jul 2008 10:21:06 +0000 (11:21 +0100)]
blktap scripts: deletion of double check and permission of using /dev/sdxx

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
17 years agostubdom: add example config file
Keir Fraser [Fri, 18 Jul 2008 10:19:17 +0000 (11:19 +0100)]
stubdom: add example config file

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: use lwip 1.3.0 release + patch instead of checking out from cvs
Keir Fraser [Thu, 17 Jul 2008 14:37:09 +0000 (15:37 +0100)]
stubdom: use lwip 1.3.0 release + patch instead of checking out from cvs

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoPV-GRUB: use the 0.97 snapshot + patch instead of checking out from cvs
Keir Fraser [Thu, 17 Jul 2008 14:33:15 +0000 (15:33 +0100)]
PV-GRUB: use the 0.97 snapshot + patch instead of checking out from cvs

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: add functions for caml runtime
Keir Fraser [Thu, 17 Jul 2008 12:21:37 +0000 (13:21 +0100)]
stubdom: add functions for caml runtime

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>