Commit Graph
17805 Commits
Author SHA1 Message Date
Keir Fraser 7e4196ee73 libxc: Use vpath rather than VPATH, to avoid linking with hypervisor .o files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-09 13:25:35 +01:00
Keir Fraser 4780a0ef28 stubdom: simplify xenfb resize handler
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 11:45:10 +01:00
Keir Fraser f0f278e1da When building from a tarball release use hardcoded path to
linux-2.6.18-xen.hg as a last resort when searching for a Linux source
tree.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-06-09 10:44:09 +01:00
Keir Fraser 3e28b1c5bb x86: Fix S3 resume after creating an HVM guest.
If we don't use PIT, we should disable it at boot time and at S3
resuming. In Xen this is done by disable_pit_irq(), but this function
is used by __initcall(). After bootstrap it will be discarded and may be
overwritten. This usually results in S3 resuming failure.

Signed-off-by: Huacai Chen <huacai.chen@intel.com>
Signed-off-by: Li Zhang <li.zhang@intel.com>
2008-06-09 09:51:14 +01:00
Keir Fraser fd153d12f2 xm on xenapi: Fixes for rfb console.
- set 'vncunused' param default to 1
 - add 'vncdisplay' param
 - handle the case when sdl=1

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:47:51 +01:00
Keir Fraser 1ece20c929 stubdom: document that pty usage should be disabled
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:47:00 +01:00
Keir Fraser c1ae1d9997 stubdom: make non-VNC + stdvga work
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:46:46 +01:00
Keir Fraser 2aba927207 stubdom: permit compilation without lwip
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:46:32 +01:00
Keir Fraser 2b888b8d42 minios: use inlines instead of macros for bswap*
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:46:16 +01:00
Keir Fraser 591e883912 xentrace: fix tracing for 64bit guests
Xen tracing some times ago used to put values of type 'long' into the
trace buffer. This has changed to uint32_t. Some trace points log
virtual addresses, which get cropped to 32bit in this case. There were
some inline functions to handle at least PF_XEN and VMEXIT, which
caused a lot of code duplication. The attached patch fixes several
issues:
1. fix and extend tools/xentrace/formats
2. Fix xentrace_format to handle up to 7 parameters
3. create convenience macros to properly log long values
4. remove the inline functions in hvm/trace.h and replace them by macros
5. Change the CPUID trace to work correctly
6. group HVM trace points enable mechanism

I used a similar approach as in PV tracing with bit 8 indicating 64bit
pointers.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2008-06-09 09:45:38 +01:00
Keir Fraser 00093d732e AMD IOMMU: add support for PV guest
Assuming iommu_populate_page_table() is only used for PV guest, a new
check is added into assign_device() to avoid duplicating the work done
by amd_iommu_sync_p2m() for hvm guest.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2008-06-09 09:44:21 +01:00
Keir Fraser 50cd7ffdad xend: Use get_config_string for 'keymap' and 'resource-label-change-script'.
Signed-off-by: Juergen Keil <jk@tools.de>
2008-06-09 09:42:51 +01:00
Keir Fraser bab287fed3 stubdom: prevent newlib from emiting cli/sti in longjmp
Also fix build dependencies and cleanup.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 09:42:14 +01:00
Keir Fraser 1f52665996 ioemu: cleaning DisplayState->dpy_resize interface
Bring the DisplayState dpy_resize interface back to how it is in qemu
mainstream, thus making the code easier to merge.
In order to support sharing the framebuffer, I am adding a new resize
interface called dpy_resize_shared that also has a depth and a pixels
parameters. As a consequence I could remove the dpy_colourdepth
callback and make the code cleaner and easier to read.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-06-09 09:39:15 +01:00
Keir Fraser a7cd0e3f91 acm: check for duplicate labels and types
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-09 09:37:56 +01:00
Keir Fraser 4c46d69b29 acm: Allow remove of labels from suspended domains.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-09 09:37:22 +01:00
Keir Fraser 3e22cc46bb xm: Set device_model option value default to None.
If device_model is set to '', xend will fail to execute the device
model.  If None, xend will detect it and set a sensible qemu-dm path
instead.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:36:27 +01:00
Keir Fraser b630504504 xm on xenapi: Enable more platform configurations
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-06-09 09:36:07 +01:00
Keir Fraser 85de27467f stubdom: .hgignore updates
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-05 13:04:07 +01:00
Keir Fraser 91c38bdedc stubdom: upgrade lwip to newer upstream version since it provides bugfixes
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-05 13:03:47 +01:00
Keir Fraser 226fe60191 minios: add a blkfront synchronous interface
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-05 13:03:31 +01:00
Keir Fraser 98b6c37cf6 32-on-64: Fix physaddr_bitsize computation when creating a 32b x86
compat domain.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-05 10:47:08 +01:00
Keir Fraser d9c0111451 x86, p2m: Fix typo in p2m_change_type_global().
From: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-05 10:42:37 +01:00
Keir Fraser 3f0cd2273c x86 hvm: Improve paging performance for 64b solaris guests
The following patch provides a 'fast-path' for sh_remove_write_access()
for 64 bit Solaris HVM guests. This provides a significant performance
boost for such guests; our testing shows a 200-400% improvement in
microbenchmarks such as fork(), exit(), etc...

From: Gary Pennington <Gary.Pennington@sun.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-05 10:36:19 +01:00
Keir Fraser 5ecfc3555d xen: build fix for NetBSD (test -x usage).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-05 10:34:01 +01:00
Keir Fraser 5ad74c5fb2 libfsimage: Build fix for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-05 10:33:01 +01:00
Keir Fraser 72c4148247 xm: Fix formatting of xm block-list output.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-05 10:31:17 +01:00
Keir Fraser cea190c247 Fix blkif.py for virsh start
I defined a cdrom to a guest domain as follows.

  ",hdc:cdrom,r"

When the guest domain was created by using xm create command, uname
of the cdrom was ''.  Then creating the guest domain succeeded.

[2008-06-03 15:23:41 xend.XendDomainInfo 25956] DEBUG
(XendDomainInfo:200)
XendDomainInfo.create(['vm', ['name', 'rhel5.2ga_hvm_lvol1'],
<<snip>>
['device', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode',
'r']]],
<<snip>>

But, when the guest domain was created by using virsh start command,
uname of the cdrom was None.  Then creating the guest domain failed.

[2008-06-03 15:22:10 xend.XendDomainInfo 25559] DEBUG
(XendDomainInfo:200)
XendDomainInfo.create(['vm', ['name', 'rhel5.2ga_hvm_lvol1'],
<<snip>>
['device', ['vbd', ['dev', 'hdc:cdrom'], ['mode', 'r']]],
<<snip>>

This patch fixes to be able to create guest domains by both xm create
command and virsh start command.

FYI:
"if uname is None:" --> "if uname == '':" --> "if not uname:"
   till CS#17625             current           by this patch

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-05 10:30:29 +01:00
Keir Fraser 5ede5271a4 Improve HPET comparator reprog to prevent intr-near-missing case
HPET intr-near-missing means if the current counter value is too close
to the comparator value to be reprogrammed the expected HPET intr may
be missing. Linux kernel uses a mininal 48-hpet-ticks(~3.5us) distance
to workaround this, but personal observation showed there is still
failure case while delta=3D0xba (~13.5us). So choosing 20us as the
MIN_DELTA_NS should be helpful to prevent near-missing from happening.

local_irq_save/restore were used to avoid disturbance. (+ 2) was used
as a final guard to avoid wrong judgement due to the real happened
near-missing case.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
2008-06-03 09:41:19 +01:00
Keir Fraser 7534d30b43 x86: Enhance Cx stability by adding softirq check before entry cstate
Without checking softirq_pending before entry Cx state, softirq such
as SCHEDULE_SOFTIRQ and TIMER_SOFTIRQ can't be handled timely. It may
cause severe failures such as disk I/O failure.

This patch addresses the issue above, meanwhile move timing points
closer to cstate entry/exit point to make C3 residency more accurate,
and enable irq a little earlier.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
2008-06-03 09:35:02 +01:00
Keir Fraser 85745512c5 xend: implement VM_hard_reboot of XenAPI.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-06-03 09:33:41 +01:00
Keir Fraser e49b738ccf stubdom: Add console reading support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-03 09:32:50 +01:00
Keir Fraser 9efd150651 rombios: S3 resume fixes.
On AMD cpus, HVM S3 resume was hanging in the bios when trying
to load the x_firmware_waking_vector from absolute
address 0xEA01C (that is, a segment offset greater than 64kB).

This change also now uses 20-bits (instead of 16) from the FACS
standard firmware_waking_vector.

Signed-off-by: Juergen Keil <jk@tools.de>
2008-06-02 16:05:07 +01:00
Keir Fraser e00ed2adcd xc hvm: Fix default CPUID features according to PAE/64-bit
capabilities of the guest and of the hypervisor.

Based on a patch by Juergen Keil <jk@tools.de>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-02 16:00:45 +01:00
Keir Fraser 6a7c065e8e Remove domain_pause()/domain_unpause() from SCHEDOP_remote_shutdown.
It is pointless and causes the hypervisor to hang if dom0 invokes this
hypercall on itself.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-02 10:56:52 +01:00
Keir Fraser d44e3c1d2e vmx: Better diagnostic messages when VMXON might have failed due to
bad setting of the IA32_FEATURE_CONTROL MSR.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-02 10:55:55 +01:00
Keir Fraser a42d40a38b vtd: Fix pagetable teardown on domain detsruction.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2008-06-02 10:04:19 +01:00
Keir Fraser f368c2f69d vtd: build fix.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2008-06-02 10:03:18 +01:00
Isaku Yamahata 76b843362d merge with xen-unstable.hg 2008-06-02 11:35:39 +09:00
Isaku Yamahata 18e7bd4797 [IA64] compilation fix of c/s 17723:c684cf331f94
This patch fixes the compilation error caused by the c/s 17723:c684cf331f94.
Define stub functions which return -ENOSYS.

ia64-linux-gnu-ld -g -T xen.lds.s -N \
                -Map map.out linux-xen/head.o xen-unstable.hg/xen/common/built_in.o xen-unstable.hg/xen/drivers/built_in.o xen-unstable.hg/xen/xsm/built_in.o xen-unstable.hg/xen/arch/ia64/built_in.o \
                xen-unstable.hg/xen/common/symbols-dummy.o -o xen-unstable.hg/xen/xen-syms
xen-unstable.hg/xen/common/built_in.o: In function `__gnttab_unmap_common':
xen-unstable.hg/xen/common/grant_table.c:566: undefined reference to `iommu_unmap_page'
xen-unstable.hg/xen/common/built_in.o: In function `__gnttab_map_grant_ref':
xen-unstable.hg/xen/common/grant_table.c:388: undefined reference to `iommu_map_page'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-02 11:35:02 +09:00
Keir Fraser 893ee9de18 x86: Fix teardown of relocated vcpu_info structures.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-01 09:16:26 +01:00
Keir Fraser 5024576315 x86: i8254 device model is shared between PV and HVM guests, so must
take care not to run hvm_get_guest_time() on a PV VCPU. The spinlock
is not initialised and spin_lock() can thus spin forever.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-30 19:31:18 +01:00
Keir Fraser 8d4e5d626a x86 hvm: Fix task-switch operation ordering.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-30 16:44:13 +01:00
Keir Fraser fcb29bd59a x86 hvm: Support task switch when task state segments straddle page
boundaries. Also improve error diagnostics from hvm_map().

Fixes multi-processor shutdown for some types of Windows OS.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-30 16:30:40 +01:00
Keir Fraser 96967abdc7 Add xen_phys_start value in the crash info note
This patch makes the vmcore utilities (ex. crash, makedumpfile) be
able to get the relocation address of the xen hypervisor from a
vmcore. It is necessary for the utilities to find the data of the
hypervisor structures.

Note that this patch does not raise any comptibility issue for the
utilities (which I know) nor the other components of xen.

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
2008-05-30 16:04:20 +01:00
Keir Fraser 3ffdbd8569 [IA64] compilation fix of iommu.h
Trivial compilation fix of iommu.h.
It includes asm/msi.h for struct msi_desc and struct msi_msg
definition.
msi.h doesn't exist yet on ia64 so declare struct msi_desc and
struct msi_msg in iommu.h and don't include asm/msi.h.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-05-30 15:09:40 +01:00
Keir Fraser 4a133deb6e vtd: Various cleanups and fixes:
* Handle DRHDs with different supported AGAWs. To support this we
   create page tables which always have 4 levels, and skip top levels
   for units which support only 2 or 3 levels.
 * Handle systems with mixed DRHD support for cache snooping. We must
   pessimistically CLFLUSH if any DRHD does not support snooping.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-30 15:06:08 +01:00
Keir Fraser cedcb04c7d vtd: Remove dead code.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-29 14:30:48 +01:00
Keir Fraser 8a41cd8573 xend: Add node parameter to do_migrate() for HTTP interface
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-29 13:38:31 +01:00
Keir Fraser 2a999fc51f ia64: Do not guest_physmap_remove_page() old page in gnttab_transfer op.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-29 11:19:16 +01:00