xen.git
17 years agohvm: Use main memory for video memory.
Keir Fraser [Wed, 27 Aug 2008 13:53:39 +0000 (14:53 +0100)]
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>
17 years agomini-os: Fix build failure with void* arithmetic.
Keir Fraser [Wed, 27 Aug 2008 12:31:01 +0000 (13:31 +0100)]
mini-os: Fix build failure with void* arithmetic.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFall back to a timer linked list when the timer heap overflows.
Keir Fraser [Wed, 27 Aug 2008 12:24:35 +0000 (13:24 +0100)]
Fall back to a timer linked list when the timer heap overflows.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoUse 'gcc -v 2>&1 | tail -1' to extract gcc version.
Keir Fraser [Wed, 27 Aug 2008 10:47:02 +0000 (11:47 +0100)]
Use 'gcc -v 2>&1 | tail -1' to extract gcc version.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxmalloc: Cannot be called in IRQ context so doesn't need IRQ-safe locking.
Keir Fraser [Wed, 27 Aug 2008 09:26:50 +0000 (10:26 +0100)]
xmalloc: Cannot be called in IRQ context so doesn't need IRQ-safe locking.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Signal softirq-context calibration with an actual first-class
Keir Fraser [Wed, 27 Aug 2008 09:12:49 +0000 (10:12 +0100)]
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>
17 years agox86: Assert in_irq() while processing guest-bound interrupts.
Keir Fraser [Wed, 27 Aug 2008 09:11:33 +0000 (10:11 +0100)]
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>
17 years agoMore precise regexp to extract version line from 'gcc -v'.
Keir Fraser [Wed, 27 Aug 2008 08:57:53 +0000 (09:57 +0100)]
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>
17 years agomini-os: Add printf format checking to xenbus_printf
Keir Fraser [Wed, 27 Aug 2008 08:48:39 +0000 (09:48 +0100)]
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>
17 years agoioemu-stubdom: drop --disable-gfx-check option, already added by qemu-xen tree
Keir Fraser [Wed, 27 Aug 2008 08:48:09 +0000 (09:48 +0100)]
ioemu-stubdom: drop --disable-gfx-check option, already added by qemu-xen tree

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: support quotes in argument passing
Keir Fraser [Wed, 27 Aug 2008 08:47:49 +0000 (09:47 +0100)]
stubdom: support quotes in argument passing

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: make munmap work in batches to fix stack overflow
Keir Fraser [Wed, 27 Aug 2008 08:47:24 +0000 (09:47 +0100)]
stubdom: make munmap work in batches to fix stack overflow

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoxend: fix LinuxImageHandler debugging output
Keir Fraser [Wed, 27 Aug 2008 08:47:08 +0000 (09:47 +0100)]
xend: fix LinuxImageHandler debugging output

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoPyGRUB: fix menu flicker
Keir Fraser [Wed, 27 Aug 2008 08:46:38 +0000 (09:46 +0100)]
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>
17 years agomini-os: make xenbus_read_integer and xenbus_printf take const strings
Keir Fraser [Wed, 27 Aug 2008 08:46:22 +0000 (09:46 +0100)]
mini-os: make xenbus_read_integer and xenbus_printf take const strings

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: drop debugging message
Keir Fraser [Wed, 27 Aug 2008 08:46:09 +0000 (09:46 +0100)]
stubdom: drop debugging message

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: add syslog functions
Keir Fraser [Wed, 27 Aug 2008 08:45:42 +0000 (09:45 +0100)]
stubdom: add syslog functions

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: add dummy pthread_mutexattr*
Keir Fraser [Wed, 27 Aug 2008 08:45:09 +0000 (09:45 +0100)]
stubdom: add dummy pthread_mutexattr*

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: int32_t is provided by stdint.h, not sys/types.h
Keir Fraser [Wed, 27 Aug 2008 08:44:51 +0000 (09:44 +0100)]
stubdom: int32_t is provided by stdint.h, not sys/types.h

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86 hvm: More checking around REP MOVS emulation.
Keir Fraser [Tue, 26 Aug 2008 14:16:57 +0000 (15:16 +0100)]
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>
17 years agovtd: do FLR before xc.domain_destroy()
Keir Fraser [Tue, 26 Aug 2008 13:11:39 +0000 (14:11 +0100)]
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>
17 years agox86 hvm: Emulate RAM-to-RAM REP MOVS copies efficiently.
Keir Fraser [Tue, 26 Aug 2008 13:10:17 +0000 (14:10 +0100)]
x86 hvm: Emulate RAM-to-RAM REP MOVS copies efficiently.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovtd: Fix ioapic interrupt remapping
Keir Fraser [Tue, 26 Aug 2008 12:00:43 +0000 (13:00 +0100)]
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>
17 years agoxend: Avoid multiple assignments to same dict key in pci_convert_sxp_to_dict
Keir Fraser [Tue, 26 Aug 2008 09:14:32 +0000 (10:14 +0100)]
xend: Avoid multiple assignments to same dict key in pci_convert_sxp_to_dict
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agox86: Time rendezvous function does not need to disable/enable IRQs.
Keir Fraser [Mon, 25 Aug 2008 13:03:42 +0000 (14:03 +0100)]
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>
17 years agohvmloader: Debug build incorporates HVM environment tests which must
Keir Fraser [Thu, 21 Aug 2008 14:18:05 +0000 (15:18 +0100)]
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>
17 years agoxentrace: Fix typo in xentrace_formats file.
Keir Fraser [Thu, 21 Aug 2008 10:12:21 +0000 (11:12 +0100)]
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>
17 years agoAdded tag 3.3.0-branched for changeset 1e99ba54035623731bc7318a8357aa6a118c5da1
Keir Fraser [Thu, 21 Aug 2008 10:07:31 +0000 (11:07 +0100)]
Added tag 3.3.0-branched for changeset 1e99ba54035623731bc7318a8357aa6a118c5da1

17 years agox86: fix l1_disallow_mask() for HVM guests with pass-thru devices.
Keir Fraser [Thu, 21 Aug 2008 09:52:01 +0000 (10:52 +0100)]
x86: fix l1_disallow_mask() for HVM guests with pass-thru devices.
Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
17 years agoPV-on-HVM: unmask_evtchn() must always use hypercall.
Keir Fraser [Thu, 21 Aug 2008 08:51:46 +0000 (09:51 +0100)]
PV-on-HVM: unmask_evtchn() must always use hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoUpdate Xen version for 3.3.0-rc8-pre
Keir Fraser [Wed, 20 Aug 2008 13:45:21 +0000 (14:45 +0100)]
Update Xen version for 3.3.0-rc8-pre

17 years agoAdded tag 3.3.0-rc7 for changeset daf1193bcd11345d566a4747fe1f12c90b44452c
Keir Fraser [Wed, 20 Aug 2008 13:44:48 +0000 (14:44 +0100)]
Added tag 3.3.0-rc7 for changeset daf1193bcd11345d566a4747fe1f12c90b44452c

17 years agoUpdate Xen version for 3.3.0-rc7
Keir Fraser [Wed, 20 Aug 2008 13:44:44 +0000 (14:44 +0100)]
Update Xen version for 3.3.0-rc7

17 years agox86 hvm: Fix binary arithmetic in hvmemul_linear_to_phys().
Keir Fraser [Wed, 20 Aug 2008 13:43:52 +0000 (14:43 +0100)]
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>
17 years agoUpdate Xen version for 3.3.0-rc7-pre
Keir Fraser [Wed, 20 Aug 2008 09:14:26 +0000 (10:14 +0100)]
Update Xen version for 3.3.0-rc7-pre

17 years agoAdded tag 3.3.0-rc6 for changeset bc372510f1794ee41a8b0501cc84f8a65d05e094
Keir Fraser [Wed, 20 Aug 2008 09:13:31 +0000 (10:13 +0100)]
Added tag 3.3.0-rc6 for changeset bc372510f1794ee41a8b0501cc84f8a65d05e094

17 years agoUpdate Xen version for 3.3.0-rc6
Keir Fraser [Wed, 20 Aug 2008 09:13:22 +0000 (10:13 +0100)]
Update Xen version for 3.3.0-rc6

17 years agodomctl: ssidref is not initialized if !XSM_ENABLE
Keir Fraser [Wed, 20 Aug 2008 08:06:58 +0000 (09:06 +0100)]
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>
17 years agox86: APs enable x2APIC only when BSP did so.
Keir Fraser [Wed, 20 Aug 2008 08:04:33 +0000 (09:04 +0100)]
x86: APs enable x2APIC only when BSP did so.
Signed-off-by: Jun Nakajima <jun.nakajikma@intel.com>
17 years agoioemu: Fix unmapping issue on hot-removing pass-thru device
Keir Fraser [Wed, 20 Aug 2008 08:02:15 +0000 (09:02 +0100)]
ioemu: Fix unmapping issue on hot-removing pass-thru device

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
17 years agox86 hvm: Another clarifying comment in the HVM address translation emulation.
Keir Fraser [Tue, 19 Aug 2008 18:45:27 +0000 (19:45 +0100)]
x86 hvm: Another clarifying comment in the HVM address translation emulation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86 hvm: Add clarifying comments about clipping repeated string
Keir Fraser [Tue, 19 Aug 2008 17:52:04 +0000 (18:52 +0100)]
x86 hvm: Add clarifying comments about clipping repeated string
instructions to 4096 iterations.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86 hvm: Build fix: param is paddr_t not ulong.
Keir Fraser [Tue, 19 Aug 2008 17:47:01 +0000 (18:47 +0100)]
x86 hvm: Build fix: param is paddr_t not ulong.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86, hvm: Observe EFLAGS.DF when performing segmentation checks and
Keir Fraser [Tue, 19 Aug 2008 14:57:19 +0000 (15:57 +0100)]
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>
17 years agox86_emulate: Do not request emulation of REP instructions beyond the
Keir Fraser [Tue, 19 Aug 2008 14:56:31 +0000 (15:56 +0100)]
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>
17 years agovtd: Don't do FLR when we create domain or hotplug device into guest.
Keir Fraser [Tue, 19 Aug 2008 09:51:41 +0000 (10:51 +0100)]
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>
17 years agoxend: fixes a typo in the PIF class of the Xen-API code.
Keir Fraser [Tue, 19 Aug 2008 09:48:39 +0000 (10:48 +0100)]
xend: fixes a typo in the PIF class of the Xen-API code.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agox86: update ioport_quirks_tbl[] for the proliant DL7xx
Keir Fraser [Mon, 18 Aug 2008 09:47:54 +0000 (10:47 +0100)]
x86: update ioport_quirks_tbl[] for the proliant DL7xx

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
17 years agoUpdate Xen version for 3.3.0-rc6-pre
Keir Fraser [Fri, 15 Aug 2008 14:01:38 +0000 (15:01 +0100)]
Update Xen version for 3.3.0-rc6-pre

17 years agoAdded tag 3.3.0-rc5 for changeset b4dba6a0e97cb6dd080fa566468e3cc972c34d7a
Keir Fraser [Fri, 15 Aug 2008 14:01:04 +0000 (15:01 +0100)]
Added tag 3.3.0-rc5 for changeset b4dba6a0e97cb6dd080fa566468e3cc972c34d7a

17 years agoUpdate Xen version for 3.3.0-rc5
Keir Fraser [Fri, 15 Aug 2008 14:00:57 +0000 (15:00 +0100)]
Update Xen version for 3.3.0-rc5

17 years agox86, hvm: Fix softtsc for AMD-V
Keir Fraser [Fri, 15 Aug 2008 13:59:41 +0000 (14:59 +0100)]
x86, hvm: Fix softtsc for AMD-V

The softtsc code for AMD does not update the ip; enabling it on AMD-V
results in the domain spinning on the RDTSC instruction. The patch is
against xen-unstable 18331.

Signed-off-by: John Byrne <john.l.byrne@hp.com>
17 years agox86 shadow: Fix OOS typecounting.
Keir Fraser [Thu, 14 Aug 2008 15:26:06 +0000 (16:26 +0100)]
x86 shadow: Fix OOS typecounting.

From: Gianluca Guida <gianluca.guida@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agopv-grub: On x86_64, also build an x86_32 pv-grub
Keir Fraser [Thu, 14 Aug 2008 12:46:48 +0000 (13:46 +0100)]
pv-grub: On x86_64, also build an x86_32 pv-grub

This requires suffixing obj directories and having grub compiled
outside sources.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoFix restore crash with certain guest memory sizes
Keir Fraser [Thu, 14 Aug 2008 09:18:08 +0000 (10:18 +0100)]
Fix restore crash with certain guest memory sizes

This fixes a crash when restoring guests with certain memory sizes (eg
223MB).  The ROUNDUP in the call to memcpy, was the main offender, but
I didn't care for the inplace resizing of the p2m entries either.

Signed-off-by: Bruce Rogers <brogers@novell.com>
17 years agox86, shadow: Fix OOS on domain crash.
Keir Fraser [Thu, 14 Aug 2008 09:14:32 +0000 (10:14 +0100)]
x86, shadow: Fix OOS on domain crash.

I couldn't reproduce the Nevada crash on my testbox, but this should
fix the first Xen crash that was seen in the Nevada HVM (bugzilla
#1322).

What I think most probably happened there is that the set_l2e call in
shadow_get_and_create_l1e() has tried to resync a page, but somehow we
weren't unable to remove the shadow (the real bug we should actually
look after). sh_resync() then removes the page from the OOS hash and
later in the page fault path we find the gw.l1mfn to be still OOS, so
we try to update the snapshot and the bug happens.

This should fix this and other unlikely (like sh_unsync() failing to
remove for hash collision the current gw.l1mfn) cases.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
17 years ago[ia64] remove the runtime warning when hvmop_set_mem_type is used.
Isaku Yamahata [Thu, 14 Aug 2008 02:00:35 +0000 (11:00 +0900)]
[ia64] remove the runtime warning when hvmop_set_mem_type is used.

remove the runtime warning when HVMOP_set_mem_type is used.
But the hypercall just returns -ENOSYS. It isn't implemented yet.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agomerge with xen-unstable.hg
Isaku Yamahata [Wed, 13 Aug 2008 13:22:21 +0000 (22:22 +0900)]
merge with xen-unstable.hg

17 years agoshadow: Fix BUILD_BUG_ON().
Keir Fraser [Wed, 13 Aug 2008 12:54:17 +0000 (13:54 +0100)]
shadow: Fix BUILD_BUG_ON().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoMSI-X: enhancement
Keir Fraser [Wed, 13 Aug 2008 12:45:39 +0000 (13:45 +0100)]
MSI-X: enhancement

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
17 years agoxend: Allow xenconsoled to be passed arguments at startup
Keir Fraser [Wed, 13 Aug 2008 12:42:30 +0000 (13:42 +0100)]
xend: Allow xenconsoled to be passed arguments at startup

Attached patch allows to pass arguments to xenconsoled
via XENCONSOLED_TRACE env. variable analogous to xenstored.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoxend: Make sure that 'PV_kernel' config param is not blank when
Keir Fraser [Wed, 13 Aug 2008 12:40:38 +0000 (13:40 +0100)]
xend: Make sure that 'PV_kernel' config param is not blank when
assigning it to 'loader' param. This fixes a failure of 'xm create'
via xen-api.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agox86: Simplify arch_virq_is_global().
Keir Fraser [Wed, 13 Aug 2008 12:39:40 +0000 (13:39 +0100)]
x86: Simplify arch_virq_is_global().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix shadow code's handling of p2m superpage changes
Keir Fraser [Wed, 13 Aug 2008 11:13:59 +0000 (12:13 +0100)]
x86: Fix shadow code's handling of p2m superpage changes

When a p2m superpage entry is shattered, it's important not to
unshadow any parts of the 2MB region that are still there afterwards.
Otherwise shattering a superpage that contains the guest's top-level
pagetable will cause the guest to be killed.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
17 years agox86 shadow: Relax BUILD_BUG_ON() regarding struct sizes.
Keir Fraser [Wed, 13 Aug 2008 11:12:08 +0000 (12:12 +0100)]
x86 shadow: Relax BUILD_BUG_ON() regarding struct sizes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86, shadow, oos: Remove overzealous warning and simplify code.
Keir Fraser [Wed, 13 Aug 2008 10:09:46 +0000 (11:09 +0100)]
x86, shadow, oos: Remove overzealous warning and simplify code.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86 mcheck: mce_disabled is not __initdata: it's referenced on S3 resume
Keir Fraser [Wed, 13 Aug 2008 08:57:42 +0000 (09:57 +0100)]
x86 mcheck: mce_disabled is not __initdata: it's referenced on S3 resume
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovtd: Add checking on return value of init_vtd_hw()
Keir Fraser [Wed, 13 Aug 2008 08:56:15 +0000 (09:56 +0100)]
vtd: Add checking on return value of init_vtd_hw()

This ensures correct actions will be taken if init_vtd_hw()
fails. Especially, when 'iommu=force' is used, Xen should not
boot if init_vtd_hw() fails.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years ago[IA64] fix vtlb flush
Isaku Yamahata [Wed, 13 Aug 2008 04:18:06 +0000 (13:18 +0900)]
[IA64] fix vtlb flush

Live migration with uninitialized vcpu will crash xen by null pointer.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years agoUpdate Xen version for 3.3.0-rc5-pre
Keir Fraser [Tue, 12 Aug 2008 09:23:34 +0000 (10:23 +0100)]
Update Xen version for 3.3.0-rc5-pre

17 years agoAdded tag 3.3.0-rc4 for changeset 96d0a48e87ee46ba7b73e8c906a7e2e0baf60e2e
Keir Fraser [Tue, 12 Aug 2008 09:23:02 +0000 (10:23 +0100)]
Added tag 3.3.0-rc4 for changeset 96d0a48e87ee46ba7b73e8c906a7e2e0baf60e2e

17 years agoUpdate Xen version for 3.3.0-rc4
Keir Fraser [Tue, 12 Aug 2008 09:22:53 +0000 (10:22 +0100)]
Update Xen version for 3.3.0-rc4

17 years agoxend/xenapi: Initialize a VLAN PIF's record with the MAC and MTU size
Keir Fraser [Mon, 11 Aug 2008 15:51:02 +0000 (16:51 +0100)]
xend/xenapi: Initialize a VLAN PIF's record with the MAC and MTU size
of the created network interface

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoAdd guide to using the kexec and kdump facility in xen.
Keir Fraser [Mon, 11 Aug 2008 14:44:47 +0000 (15:44 +0100)]
Add guide to using the kexec and kdump facility in xen.

Signed-off-by: Simon Horman <horms@verge.net.au>
17 years agoxend/xen-api: Have the VDI record return the security label
Keir Fraser [Mon, 11 Aug 2008 14:01:34 +0000 (15:01 +0100)]
xend/xen-api: Have the VDI record return the security label

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agostubdom: for safety, tell lwip we use the heap in the event handler
Keir Fraser [Mon, 11 Aug 2008 14:00:06 +0000 (15:00 +0100)]
stubdom: for safety, tell lwip we use the heap in the event handler

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agopage scrub: Serialise softirq with a new lock.
Keir Fraser [Mon, 11 Aug 2008 11:20:11 +0000 (12:20 +0100)]
page scrub: Serialise softirq with a new lock.
Avoids holding up acquiring page_scrub_lock in free_domheap_pages().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend: Better support for legacy HVM config of ia64
Keir Fraser [Mon, 11 Aug 2008 10:27:40 +0000 (11:27 +0100)]
xend: Better support for legacy HVM config of ia64

On ia64, direct Linux boot is not supported, and 'Flash.fd' or
'guest_firmware.bin' has been used as a value of the 'kernel'
option. Cset:17016 ignores those strings and overrides them with
"/usr/lib/xen/boot/hvmloader".

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoSerialize scrubbing pages
Keir Fraser [Mon, 11 Aug 2008 10:18:50 +0000 (11:18 +0100)]
Serialize scrubbing pages

I noticed that parallel scrubbing pages is not efficient
due to spinlock contention. (also memory bandwidth?)
Actually heap_lock becomes a bottleneck.

In my investigation, it often takes 1 millisec just to acquire
the lock on ia64 with 8cpus. It's very wasteful.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years agox86, xenoprof: Add Nehalem to list of ppro cores
Keir Fraser [Mon, 11 Aug 2008 09:52:18 +0000 (10:52 +0100)]
x86, xenoprof: Add Nehalem to list of ppro cores

Straight port from Linus's tree:

commit 4b9f12a3779c548b68bc9af7d94030868ad3aa1b
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Thu Jul 24 17:29:00 2008 -0700

    x86/oprofile/nmi_int: add Nehalem to list of ppro cores

    ..otherwise oprofile will fall back on that poor timer interrupt.

    Also replace the unreadable chain of if-statements with a
    "switch()"
    statement instead. It generates better code, and is a lot clearer.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
17 years agotools build: add cross-install to find the right "strip"
Keir Fraser [Mon, 11 Aug 2008 09:49:57 +0000 (10:49 +0100)]
tools build: add cross-install to find the right "strip"

Signed-off-by: Aron Griffis <aron@hp.com>
17 years agomerge with xen-unstable.hg
Isaku Yamahata [Mon, 11 Aug 2008 02:04:52 +0000 (11:04 +0900)]
merge with xen-unstable.hg

17 years ago[IA64] Print ACPI signature before overwriting it
Isaku Yamahata [Mon, 11 Aug 2008 01:59:39 +0000 (10:59 +0900)]
[IA64] Print ACPI signature before overwriting it

We're printing out the ACPI table signature after we overwrite it
with "OEMx".  Let's print it out before so we know that the table was.
Also limit print to 4 chars so we don't get garbage output.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agox86: adjust placement of pause insn in _raw_spin_lock()
Keir Fraser [Fri, 8 Aug 2008 14:02:19 +0000 (15:02 +0100)]
x86: adjust placement of pause insn in _raw_spin_lock()

React to lock becoming available as quickly as possible.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agox86: also show event upcall mask when dumping guest state
Keir Fraser [Fri, 8 Aug 2008 14:00:01 +0000 (15:00 +0100)]
x86: also show event upcall mask when dumping guest state

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Update guest timestamps on frequency change.
Keir Fraser [Fri, 8 Aug 2008 11:08:09 +0000 (12:08 +0100)]
x86: Update guest timestamps on frequency change.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Reduce restrictions on dom0_max_vcpus.
Keir Fraser [Fri, 8 Aug 2008 10:22:44 +0000 (11:22 +0100)]
x86: Reduce restrictions on dom0_max_vcpus.
Place a BUILD_BUG_ON() in mm.c to replace one of the restrictions.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoia64: PV driver domains - ugly python hacks
Keir Fraser [Fri, 8 Aug 2008 09:53:40 +0000 (10:53 +0100)]
ia64: PV driver domains - ugly python hacks

x86 IOMMU support added a lot of assumptions about what PCI buses look
like and where to find bridge devices.  On ia64, we don't yet have
virtualization friendly IOMMUs, so for the moment, we just want to
keep "unsafe" PV PCI pass through working as well as it did in Xen
3.2. Looking at the code, it almost seems like x86 has thrown out
support for the old style driver domain.  Things that don't
necessarily work on every PCI compliant architecture:

      * You can't assume that just because there's a device at 01:01.0
        that there's also a bridge at 01:00.0 and blow-up when you
        don't find it.  On HP ia64 boxes, PCI root bridges are not
        necessarily exposed as a PCI device.  This pretty much means
        we can't call into any of the "FLR" code paths.
      * BAR alignment: it's hard to have BAR alignment when your page
        size is 16k.  This wasn't a requirement for previous PV driver
        domains, so I assume it's only for IOMMU support.

This is ugly, so I'm open to suggestions.  It seems that all of these
architecture checks could be replaced by checking some "iommu_present"
variable to test whether the extra requirements are necessary.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agoprefix mini-os lists with minios_, drop QEMU_ prefix from QEMU_LIST_*
Keir Fraser [Fri, 8 Aug 2008 09:48:48 +0000 (10:48 +0100)]
prefix mini-os lists with minios_, drop QEMU_ prefix from QEMU_LIST_*

That permits to reduce the amount of difference with upstream.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoioemu: fix typo in serial emulation
Keir Fraser [Fri, 8 Aug 2008 09:46:39 +0000 (10:46 +0100)]
ioemu: fix typo in serial emulation

There is a small bug on the serial emulation code that prevents kgdb
from working correctly over the serial.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
17 years agostubdom: turn off_t 64bit on x86
Keir Fraser [Fri, 8 Aug 2008 09:45:30 +0000 (10:45 +0100)]
stubdom: turn off_t 64bit on x86

We can decide to make off_t 64bit instead of implementing the LFS
tricks.  Name corresponding functions foo64 to permit simple caml
programs linking.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years ago[IA64] Remove VT-i no opcode warning
Isaku Yamahata [Fri, 8 Aug 2008 02:38:21 +0000 (11:38 +0900)]
[IA64] Remove VT-i no opcode warning

I've never been sure why we have such a big scary warning around this,
when I have yet to see any system that does provide opcode decoding.
Let's remove it.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years ago[IA64] Cleanup ACPI checksum warnings
Isaku Yamahata [Fri, 8 Aug 2008 02:38:20 +0000 (11:38 +0900)]
[IA64] Cleanup ACPI checksum warnings

On bootup, I get a couple of these:

(XEN) ACPI Warning (tbutils-0219): Incorrect checksum in table [APIC] - CE, should be 04 [20070126]
(XEN) ACPI Warning (tbutils-0219): Incorrect checksum in table [APIC] - CE, should be 04 [20070126]

I don't remember seeing them before, but they're pretty easy to fix.
The problem is we update the lsapics, causing the checksum to be wrong,
then we look for platform interrupt sources, which spits out a warning,
and finally we look for the MADT again to fix the checksum, which also
prints a warning.  If we grab a pointer to the MADT before these, we can
update the checksum after each step and avoid the warnings.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years ago[IA64] backport EFI version warning fix
Isaku Yamahata [Fri, 8 Aug 2008 02:38:17 +0000 (11:38 +0900)]
[IA64] backport EFI version warning fix

We have boxes that report EFI version 2.00 now, so adopt upstream linux
patch to only warn on versions less that 1.00.  Based on linux-2.6.git
873ec746158403af82c57ce26780166aafc159e1.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years ago[IA64] Fix PV driver domains - xen stubs
Isaku Yamahata [Fri, 8 Aug 2008 02:38:08 +0000 (11:38 +0900)]
[IA64] Fix PV driver domains - xen stubs

Stub out new hypercalls in the hypervisor.  The only odd one here is
map/unmap_pirq.  This seems to be for MSI support, which I don't believe
we currently support for driver domains, so this is actually similar to
the x86 code path.  The tools code doesn't allow us to return -ENOSYS
here :(

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agoUpdate Xen version for 3.3.0-rc4-pre
Keir Fraser [Thu, 7 Aug 2008 08:56:22 +0000 (09:56 +0100)]
Update Xen version for 3.3.0-rc4-pre

17 years agoAdded tag 3.3.0-rc3 for changeset 57fca3648f25dcc085ee380954342960a7979987
Keir Fraser [Thu, 7 Aug 2008 08:55:57 +0000 (09:55 +0100)]
Added tag 3.3.0-rc3 for changeset 57fca3648f25dcc085ee380954342960a7979987

17 years agoUpdate Xen version for 3.3.0-rc3
Keir Fraser [Thu, 7 Aug 2008 08:55:48 +0000 (09:55 +0100)]
Update Xen version for 3.3.0-rc3

17 years agounmodified drivers: update README
Keir Fraser [Thu, 7 Aug 2008 08:05:54 +0000 (09:05 +0100)]
unmodified drivers: update README

update unmodified_drivers/linux-2.6/README.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agoxm: fix trivial typo. s/ciredump-restore/coredump-restart/
Keir Fraser [Thu, 7 Aug 2008 08:05:31 +0000 (09:05 +0100)]
xm: fix trivial typo. s/ciredump-restore/coredump-restart/

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>