Commit Graph
18875 Commits
Author SHA1 Message Date
Keir Fraser 7e60fdf5b1 minios: Clip memory not usable by Mini-OS (above 1GB)
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-12-05 13:06:57 +00:00
Keir Fraser ad25050cd6 cpuidle: revise tsc-save/restore to reduce tsc skew between cpus
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-05 13:03:44 +00:00
Keir Fraser d78c163951 vga: Clear the screen when relinquishing VGA to dom0.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-05 11:37:20 +00:00
Keir Fraser 1badf51374 xentrace: trace interrupt window
Make a specific interrupt-window trace, with information about why the
interrupt in question can't be delivered.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2008-12-05 11:05:45 +00:00
Keir Fraser 112495f91d VT-d code cleanup
This patch narrow context caching flush range from the
domain-selective to the device-selective, when unmapping a device.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
2008-12-05 10:59:41 +00:00
Isaku Yamahata 7cbd72604c merge with xen-unstable.hg 2008-12-05 15:47:19 +09:00
Isaku Yamahata 29bfb6999a IA64: implement PHYSDEVOP_pirq_eoi_gmfn and related stuff.
This patch is ia64 counter part of 18844:c820bf73a914.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-12-05 15:43:08 +09:00
Isaku Yamahata 0a9a2f43e0 IA64: eliminate NR_IRQ_VECTORS. ia64 part.
This is ia64 counter part of 18802:935bd48f096a which eliminates
NR_IRQ_VECTORS.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-12-05 15:43:06 +09:00
Keir Fraser afdfef4b15 docs: Add description of BUILD_BUG_ON().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-04 16:36:43 +00:00
Keir Fraser 7e3e35eed6 Fix one timer range issue
According to the timer sematic, the timer can be executed at any timer
within [expires, expires_end], however, current implementation only allow
timer to be executed after expires_end, which is not conform to the timer
semantics.

This patch fix the the SPECpower score regression (~5% downgrade)
introduced by changeset 18744 "Change timer implementation to allow
variable 'slop'"

Signed-off-by: Yu Ke <ke.yu@intel.com>
2008-12-04 14:12:08 +00:00
Keir Fraser 2d27786f06 New document on error handling in Xen.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-04 12:35:22 +00:00
Keir Fraser 512ceccfaa Fix existence check for MMIO-mapped 16550 UARTs
Changeset 982e6fce0e47 added an existence test for UARTs.
Unfortunately, the existence test happens before MMIO UARTs are
ioremapped, therefore it may not be probing where it thinks it's
probing.  Rather than moving more code around, I think it's probably
safe to assume the arch code knows what it's doing if it passes in an
MMIO UART.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2008-12-04 11:36:18 +00:00
Keir Fraser 69dff7d532 xm: Fix xm block-list for inactive managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-12-04 11:32:43 +00:00
Keir Fraser e7a89ddbf9 xend: Remember bootloader settings in xenstore
When xend is restarted, bootloader settings of all running domains are
lost. The attached patches fixes this by saving bootloader and
bootloader_args to xenstore database.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2008-12-04 11:31:37 +00:00
Isaku Yamahata 58fc037b88 merge with xen-unstable.hg 2008-12-04 11:01:53 +09:00
Keir Fraser 66664705d9 xentop: Fix xentop for blktap
Blktap devices information isn't shown by xentop currently.

xen-unstable c/s 17813 said "blktap devices have statistics
counters (e.g., rd_req, wr_req, oo_req) prepended by tap_".
In fact, it is as follows.

# ls -l /sys/devices/xen-backend/tap-1-769/statistics/
total 0
-r--r--r-- 1 root root 4096 Dec  3 20:37 oo_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 rd_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 rd_sect
-r--r--r-- 1 root root 4096 Dec  3 20:37 wr_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 wr_sect

The statistics counters haven't had "tap_" because it was removed
by linux-2.6.18-xen c/s 34.

This patch reverts xen-unstable c/s 17813, then we can get the
blktap devices information by using xentop.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-12-03 15:58:23 +00:00
Keir Fraser 1c8299d846 AMD IOMMU: Invalidate all pages on domain destruction
Attached patch adds support to invalidate all pages associated with
the same domain ID on domain destruction.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-12-03 15:56:33 +00:00
Keir Fraser 371971198e AMD IOMMU: Propagate HyperTransport settings from IVHD table to control register
Attached patch propagate HyperTransport settings suggested by IVHD
table to iommu control register(MMIO offset 0018h).

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-12-03 15:56:05 +00:00
Keir Fraser c6312a2cdb AMD IOMMU: Fix event log interrupt handling
Reset EventLogInt bit in iommu status register(MMIO offset 2020h) in
event log interrupt handler, to show software has handled the
interrupt. Completion wait interrupt is disabled.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-12-03 15:55:32 +00:00
Keir Fraser 0a59d0d01a Fix the HVM save hypercall to avoid freeing an uninitalised pointer.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-12-03 15:54:24 +00:00
Keir Fraser 7ee660e381 Do not request domain shutdown if in S3 state during domain save.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-03 15:12:19 +00:00
Keir Fraser ea755e0433 physdev: make PHYSDEVOP_pirq_eoi_mfn use of gmfn instead of mfn.
To pass a page from a guest to hypervisor, gmfn should be used
instead of mfn like grant table and other hypercalls. It's more
consistent. So make use of gmfn instead of mfn for
PHYSDEVOP_pirq_eoi_mfn hypercall.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-03 11:44:47 +00:00
Keir Fraser 964960aa18 x86: Fix mfn_to_virt() to cast MFN to address size.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-03 11:38:36 +00:00
Keir Fraser 1c185534be x86: No need for short jmp before long hjmp when setting CR0.PE
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-03 11:21:34 +00:00
Isaku Yamahata 180038d2a4 IA64: Rationalize VMM mode alignment checking
This is the xen port of ia64 linux chageset of
b704882e70d87d7f56db5ff17e2253f3fa90e4f3

    [IA64] Rationalize kernel mode alignment checking

    Itanium processors can handle some misaligned data accesses. They
    also provide a mode where all such accesses are forced to trap. The
    kernel was schizophrenic about use of this mode:

    * Base kernel code ran in permissive mode where the only traps
      generated were from those cases that the h/w could not handle.
    * Interrupt, syscall and trap code ran in strict mode where all
      unaligned accesses caused traps to the 0x5a00 unaligned reference
      vector.

    Use strict alignment checking throughout the kernel, but make
    sure that we continue to let user mode use more relaxed mode
    as the default.

    Signed-off-by: Tony Luck <tony.luck@intel.com>

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-12-03 11:43:54 +09:00
Keir Fraser ff0b9e1254 xenpmd: Adjust strncat() length to avoid static buffer overflow.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-02 22:17:22 +00:00
Keir Fraser 3f5125965b Fix Xen panic with oprofile
The attached patch fixes a Xen panic when a domain is shutdown before
oprofile is stopped. Without this patch, free_xenoprof_pages() is
called before the domain is destroyed and that, in turn, prevents
oprofile from cleaning up pages shared with guests. Shutting down a
domain without terminating oprofile therefore causes a Xen panic at a
later point in time.

Signed-off-by: Niraj Tolia <niraj.tolia@hp.com>
2008-12-02 11:53:24 +00:00
Keir Fraser cedf79a3b2 pvgrub: value returned by getrtsecs should be BCD
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-01 13:45:46 +00:00
Keir Fraser fd3c09b029 x86: Fix PHYSDEVOP_pirq_eoi_mfn, which I modified and broke.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-29 09:07:52 +00:00
Keir Fraser 272ec2ee7d x86: remove unused parameter/arguments from flush_ready_eoi()
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-11-28 13:28:16 +00:00
Keir Fraser 83850d485c x86: add a shared page indicating the need for an EOI notification
To simplify the interface for the guest, when a guest uses this new
(sub-)hypercall, PHYSDEVOP_eoi behavior changes to unmask the
corresponding event channel at once, avoiding the eventual need for a
second hypercall from the guest.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-28 13:27:32 +00:00
Keir Fraser c4e83a1484 xend: Fix device release for tap devices
I saw an error message when I shut down a domain.  The error
message showed that release of device(vbd/51712) failed.  But the
device was tap, was not vbd.  I think that a cause of the error message is
because _releaseDevices() calls destroyDevice() by wrong device class.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-11-28 13:05:58 +00:00
Keir Fraser 2fdd853ff5 xm: Relax the sanity check on guest configuration with XSM-ACM addlabel
The attached patch relaxes the sanity check on guest configuration
when assigning a acm label to the guest. This patch makes a guest
configuration accept a bootloader parameter. This is common for
paravirtualized guests to boot them by using pygrub.

Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
2008-11-28 13:04:30 +00:00
Keir Fraser 1f80f21b47 shadow: fix the fix for promotion/resync race.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-11-28 12:02:43 +00:00
Keir Fraser 735b2f96e0 x86_emulate: Fix for test harness and simplify some opcodes.
- Need to use EFLG_DF rather than EF_DF
 - No need to force EAX destination for many opcodes, as this will be
   the default behaviour for DstReg with no ModRM.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-27 16:22:14 +00:00
Keir Fraser 7f470fe5a9 Avoid warn_unused_result build failure on fgets().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-27 12:43:25 +00:00
Keir Fraser c44f6b3172 x86, hpet: check hpet existence
Add check on hpet existence which is removed accidentally
in previous changeset (18790). Or else BAD PERIOD error can be seen.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2008-11-27 11:24:52 +00:00
Keir Fraser 4825311686 VT-d code cleanup
- remove a printk line. This printk may be output too many on some
  platforms, thus result in hang during dom0 booting.
- add write buffer flush in domain_context_unmap_one()
- when map/unmap context, if context is not flushed, needn't to flush
  iotlb

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-11-27 11:22:38 +00:00
Keir Fraser 89fcb252a1 shadow: set fast_emul to zero when emulating to an out-of-sync page.
A small missing thing on the original out of sync patch.
No real bug, but it's better to correctly specify the path.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-11-27 11:21:19 +00:00
Keir Fraser 2f73ee2697 Merge with ia64 tree. 2008-11-26 11:14:26 +00:00
Keir Fraser 63e8b90794 timer: Print timer fn when dump timer queue
Print timer fn when dump timer queue, which would be
useful to understand type of the timer.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2008-11-26 11:11:26 +00:00
Keir Fraser 26943a1d94 vtd: cleanups
- potential issues in vtd_page_fault() handler
 - wrong print messages
 - existing ATS code in dmar.c.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2008-11-26 11:08:45 +00:00
Keir Fraser 2853fea7b0 xen: Fix gcc 4.3 build failure.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-26 11:07:44 +00:00
Isaku Yamahata 5fb5ca3d1b merge with xen-unstable.hg 2008-11-26 10:23:49 +09:00
Keir Fraser 712cd1b8c9 Fix PSE PAT handling in guest walk.
Guest walk was currently checking for _PAGE_PSE_PAT flag in
guest_l2e_get_flags(). The problem is that this function only checks
for the first 12 bits of the PDE, while _PAGE_PSE_PAT is actually on bit
12 (that is the 13th bit). This caused _PAGE_PAT bit to never been set on
splintered L1s.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-11-25 11:17:57 +00:00
Isaku Yamahata 772cdea233 merge with xen-unstable.hg 2008-11-25 14:21:24 +09:00
Keir Fraser ba10bcb00f hvmloader: Pass BDF to PCI option ROMs.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-24 13:57:48 +00:00
Keir Fraser 6641cb8ee3 hvmloader: Load physical PCI option ROMs where available.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-24 13:43:28 +00:00
Keir Fraser 66d936fdab hvmloader: Relocate the etherboot ROM to be near the end of VGA
BIOS. Current Xen hard coded VGA ROM at 0xC0000 and etherboot ROM
at 0xD0000. This makes the space in [0xC0000 - 0xDFFFF] to be
fragments, which makes it hard to find enough space to hold another
Option ROM.

Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-11-24 11:17:44 +00:00
Keir Fraser 6d72e644df shadow: fix race between resync and page promotion.
This patch fixes a (hopefully) rare-occurring problem causing memory
corruption in 64 bit guests (and assertion failures in debug build
xen).

On a pagefault, set_l{3,4}e's resync_all was able to give write access
to a page in the guest still not shadowed.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-11-24 11:12:20 +00:00