Commit Graph
18385 Commits
Author SHA1 Message Date
Keir Fraser 86cf63d6f4 ioemu: Add SEEK_STAT in all non-error cases except sleep request,
since our seek times are virtually 0.  Although this flag is
deprecated by newer ATA standards, Linux at least checks it for CD
drives, and would timeout in some cases if we do not set it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 14:57:23 +01:00
Keir Fraser d818f3cb7c hvm: Use main memory for video memory.
When creating an HVM domain, if e.g. another domain is created before
qemu allocates video memory, the extra 8MB memory ballooning is not
available any more, because it got consumed by the other domain.

This fixes it by taking video memory from the main memory:

- make hvmloader use e820_malloc to reserve some of the main memory
  and notify ioemu of its address through the Xen platform PCI card.
- add XENMAPSPACE_mfn to the xen_add_to_physmap memory op, to allow
  ioemu to move the MFNs between the original position and the PCI
  mapping, when LFB acceleration is disabled/enabled
- add a remove_from_physmap memory op, to allow ioemu to unmap it
  completely for the case of old guests with acceleration disabled.
- add xc_domain_memory_translate_gpfn_list to libxc to allow ioemu to
  get the MFNs of the video memory.
- have xend save the PCI memory space instead of ioemu: if a memory
  page is there, the guest can access it like usual memory, so xend
  can safely be responsible to save it.  The extra benefit is that
  live migration will apply the logdirty optimization there too.
- handle old saved images, populating the video memory from ioemu if
  really needed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 14:53:39 +01:00
Keir Fraser 1583e7e448 mini-os: Fix build failure with void* arithmetic.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 13:31:01 +01:00
Keir Fraser dafd59dde6 Fall back to a timer linked list when the timer heap overflows.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 13:24:35 +01:00
Keir Fraser d1ef21b1cc Use 'gcc -v 2>&1 | tail -1' to extract gcc version.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 11:47:02 +01:00
Keir Fraser 6fc80aed0d xmalloc: Cannot be called in IRQ context so doesn't need IRQ-safe locking.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 10:26:50 +01:00
Keir Fraser b35a75abcd x86: Signal softirq-context calibration with an actual first-class
softirq handle rather than kludging it with set_timer().

Should be faster and is definitely clearer. Also avoids us using
set_timer() in IRQ context (which is currently broken but soon won't
be).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 10:12:49 +01:00
Keir Fraser bb2f3a7002 x86: Assert in_irq() while processing guest-bound interrupts.
Actually a fair amount of infrastructure is onvolved these days, and
we'd like subsystems we call into know that we're in IRQ context so
they can handle that or BUG/ASSERT if appropriate.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 10:11:33 +01:00
Keir Fraser b1813844dc More precise regexp to extract version line from 'gcc -v'.
Reported by Robert Buchholz <rbu@gentoo.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-27 09:57:53 +01:00
Keir Fraser 13d5024794 mini-os: Add printf format checking to xenbus_printf
Reported-by: "Daniel P. Berrange" <berrange@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:48:39 +01:00
Keir Fraser 1f1f49120f ioemu-stubdom: drop --disable-gfx-check option, already added by qemu-xen tree
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:48:09 +01:00
Keir Fraser 839dac782f stubdom: support quotes in argument passing
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:47:49 +01:00
Keir Fraser fe2998c24a stubdom: make munmap work in batches to fix stack overflow
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:47:24 +01:00
Keir Fraser 2f43a7baa9 xend: fix LinuxImageHandler debugging output
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:47:08 +01:00
Keir Fraser 63193f3f4d PyGRUB: fix menu flicker
To avoid flickers, PyGRUB has to avoid spurious ncurses refresh as
much as possible, in particular before the complete screen is drawn,
and eventually call doupdate last.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:46:38 +01:00
Keir Fraser 84901438e6 mini-os: make xenbus_read_integer and xenbus_printf take const strings
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:46:22 +01:00
Keir Fraser 55c1a137e7 stubdom: drop debugging message
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:46:09 +01:00
Keir Fraser 6c5aecbf01 stubdom: add syslog functions
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:45:42 +01:00
Keir Fraser dcd4913503 stubdom: add dummy pthread_mutexattr*
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:45:09 +01:00
Keir Fraser 1cbf503b9d stubdom: int32_t is provided by stdint.h, not sys/types.h
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:44:51 +01:00
Keir Fraser 7ec3e07914 x86 hvm: More checking around REP MOVS emulation.
Check for self-corrupting copies, and report hvm_copy errors to the
console log.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-26 15:16:57 +01:00
Keir Fraser 43e1fddd0c vtd: do FLR before xc.domain_destroy()
When we "xm destroy" a guest with assigned devices, in
xen/common/domain.c:domain_kill(), we relinquish guest's memory first,
then invoke domain_destroy() -> complete_domain_destroy() ->
arch_domain_destroy() -> pci_release_devices()/iommu_domain_destroy().

Between relinquish_memory() and domain_destroy(), a device may be
issuing DMA request and access guest's relinquished  memory.

We can do_FLR() to quiesce devices before xc.domain_destroy().

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-08-26 14:11:39 +01:00
Keir Fraser 81abef0448 x86 hvm: Emulate RAM-to-RAM REP MOVS copies efficiently.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-26 14:10:17 +01:00
Keir Fraser d6b6a1137f vtd: Fix ioapic interrupt remapping
Besides io_apic_write(), io_apic_modify() also writes to io apic RTE.
This patch adds an intercept to remap interrupt in io_apic_modify().

In io_apic_read_remap_rte(), 'mask' value of RTE should not affect the
return value, so remove its checking.

Finally, remove panic() when index overflows. Instead, print error
messages and report back the failure to upper level.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-08-26 13:00:43 +01:00
Keir Fraser 2a82334fcc xend: Avoid multiple assignments to same dict key in pci_convert_sxp_to_dict
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-08-26 10:14:32 +01:00
Keir Fraser 84cc74d90f x86: Time rendezvous function does not need to disable/enable IRQs.
Since rendezvous happens within the IPI handler, no need to specify
'wait' to on_each_cpu().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-25 14:03:42 +01:00
Keir Fraser 64a86b092f hvmloader: Debug build incorporates HVM environment tests which must
pass for the HVM guest to successfully boot.

Currently only one test (REP INS across page boundaries) but more will
be added in future.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-21 15:18:05 +01:00
Keir Fraser 93b891026d xentrace: Fix typo in xentrace_formats file.
Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
Signed-off-by: Zhou Ting <ting.g.zhou@intel.com>
2008-08-21 11:12:21 +01:00
Keir Fraser 50e4834c61 Added tag 3.3.0-branched for changeset 1e99ba54035623731bc7318a8357aa6a118c5da1 2008-08-21 11:07:31 +01:00
Keir Fraser b9c620d078 x86: fix l1_disallow_mask() for HVM guests with pass-thru devices.
Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
3.3.0-branched
2008-08-21 10:52:01 +01:00
Keir Fraser a0685dba64 PV-on-HVM: unmask_evtchn() must always use hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-21 09:51:46 +01:00
Keir Fraser f480edacaa Update Xen version for 3.3.0-rc8-pre 2008-08-20 14:45:21 +01:00
Keir Fraser 456a0b5b82 Added tag 3.3.0-rc7 for changeset daf1193bcd11345d566a4747fe1f12c90b44452c 2008-08-20 14:44:48 +01:00
Keir Fraser 9dd93b24de Update Xen version for 3.3.0-rc7 3.3.0-rc7 2008-08-20 14:44:44 +01:00
Keir Fraser 8f34627d05 x86 hvm: Fix binary arithmetic in hvmemul_linear_to_phys().
PAGE_SIZE - (x & ~PAGE_MASK) is not equivalent to -x & ~PAGE_MASK

Also the early goto could be removed.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-20 14:43:52 +01:00
Keir Fraser 36154f9323 Update Xen version for 3.3.0-rc7-pre 2008-08-20 10:14:26 +01:00
Keir Fraser 40195a62bc Added tag 3.3.0-rc6 for changeset bc372510f1794ee41a8b0501cc84f8a65d05e094 2008-08-20 10:13:31 +01:00
Keir Fraser 1824ecbfee Update Xen version for 3.3.0-rc6 3.3.0-rc6 2008-08-20 10:13:22 +01:00
Keir Fraser 6d0480fe26 domctl: ssidref is not initialized if !XSM_ENABLE
The ssidref in getdomaininfo() is not initialized when XSM_ENABLE is
not defined. So, xentop might display a wrong value of ssid.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2008-08-20 09:06:58 +01:00
Keir Fraser 5ead8cb7ed x86: APs enable x2APIC only when BSP did so.
Signed-off-by: Jun Nakajima <jun.nakajikma@intel.com>
2008-08-20 09:04:33 +01:00
Keir Fraser 97b6b26dad ioemu: Fix unmapping issue on hot-removing pass-thru device
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2008-08-20 09:02:15 +01:00
Keir Fraser 724fc2e33f x86 hvm: Another clarifying comment in the HVM address translation emulation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-19 19:45:27 +01:00
Keir Fraser aa6af210f6 x86 hvm: Add clarifying comments about clipping repeated string
instructions to 4096 iterations.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-19 18:52:04 +01:00
Keir Fraser 1e827f9eab x86 hvm: Build fix: param is paddr_t not ulong.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-19 18:47:01 +01:00
Keir Fraser 7e1f3a300f x86, hvm: Observe EFLAGS.DF when performing segmentation checks and
address translations on multi-iteration string instructions.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-19 15:57:19 +01:00
Keir Fraser 5dfe4aa4ee x86_emulate: Do not request emulation of REP instructions beyond the
point at which the index register (SI/DI) wraps. This can cause a
discontinuity in the address range accessed by the repeated
instruction.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-19 15:56:31 +01:00
Keir Fraser 154ef9e3cc vtd: Don't do FLR when we create domain or hotplug device into guest.
VT-d hot-plug is done in such a way:  1) xend sends 'pci-ins' command
to ioemu via xenstore; 2) ioemu creates pass-through device and raises
SCI to guest OS; guest OS loads device driver, and device driver
initializes the hot-plugged device; 3) xend does FLR. There is a race
condition about 2) and 3). If 3) runs slow, we have troubles. Thanks
for Yuji Shimada's locating the issues.

We can work around the issues by not doing FLR when we create domain
or hotplug device into guest, namely, we only do FLR when we destroy
domain or hotplug device from guest.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2008-08-19 10:51:41 +01:00
Keir Fraser d74b976c41 xend: fixes a typo in the PIF class of the Xen-API code.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-08-19 10:48:39 +01:00
Keir Fraser 613e3fc198 x86: update ioport_quirks_tbl[] for the proliant DL7xx
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2008-08-18 10:47:54 +01:00
Keir Fraser 4ec6fe513f Update Xen version for 3.3.0-rc6-pre 2008-08-15 15:01:38 +01:00