]> xenbits.xensource.com Git - xen.git/log
xen.git
17 years agox86: Clean up some files of inline asm, and fix
Keir Fraser [Fri, 16 Nov 2007 17:59:34 +0000 (17:59 +0000)]
x86: Clean up some files of inline asm, and fix
__copy_{to,from}_user_ll() for gcc 3.4 (asm output constraints all
need to be '=&').
Based on a patch by Jan Beulich.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvm passthru: Uses of XC_PAGE_MASK should be XC_PAGE_SIZE-1.
Keir Fraser [Fri, 16 Nov 2007 17:09:53 +0000 (17:09 +0000)]
hvm passthru: Uses of XC_PAGE_MASK should be XC_PAGE_SIZE-1.
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoxentrace: make xentrace and xenmon work on Solaris and *BSD.
Keir Fraser [Fri, 16 Nov 2007 17:08:05 +0000 (17:08 +0000)]
xentrace: make xentrace and xenmon work on Solaris and *BSD.
 - Use getopt() to get rid of argp dependency which does not exist
   on Solaris and *BSD. Done by Tariq Magdon-Ismail.
 - Minor modifications by me (Christoph) to make it also work on *BSD.
 - Tested on Linux by me (Christoph). No functional change on Linux.
 - Tariq ok'd BSD modifications for Solaris
 - Tariq ok'd submission by me :)

Signed-off-by: Tariq Magdon-Ismail <tariqmi@sun.com>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoxentrace: Fix TypeError handling of xentrace_format.
Keir Fraser [Fri, 16 Nov 2007 17:05:20 +0000 (17:05 +0000)]
xentrace: Fix TypeError handling of xentrace_format.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
17 years agoqemu: more verbose on failures.
Keir Fraser [Fri, 16 Nov 2007 17:03:46 +0000 (17:03 +0000)]
qemu: more verbose on failures.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agovt-d: Clean up VT-d code
Keir Fraser [Fri, 16 Nov 2007 17:01:50 +0000 (17:01 +0000)]
vt-d: Clean up VT-d code
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agopvfb: PVFB SDL backend chokes on bogus screen updates
Keir Fraser [Fri, 16 Nov 2007 16:53:43 +0000 (16:53 +0000)]
pvfb: PVFB SDL backend chokes on bogus screen updates

Bogus screen update requests from buggy or malicous frontend make SDL
crash.  The VNC backend silently ignores them.  Catch and log them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
17 years agoxend: host.get_log() close fd
Keir Fraser [Fri, 16 Nov 2007 16:43:57 +0000 (16:43 +0000)]
xend: host.get_log() close fd
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agovmx: wbinvd optimization for pass-through domain.
Keir Fraser [Fri, 16 Nov 2007 16:36:38 +0000 (16:36 +0000)]
vmx: wbinvd optimization for pass-through domain.

Optimise wbinvd exit emulation for pass-through domains to avoid
"always wbinvd" when a VCPU is migrated. Instead, do host wbinvd on
all host CPUs when wbinvd exit.

Signed-off-by Yaozu (Eddie) Dong <eddie.dong@intel.com>

17 years agox86, hvm: Small code cleanups.
Keir Fraser [Fri, 16 Nov 2007 16:22:00 +0000 (16:22 +0000)]
x86, hvm: Small code cleanups.
Based on patch from Xin Li.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend, xenapi: Strip characters from logs that XMLRPC layer cannot handle.
Keir Fraser [Fri, 16 Nov 2007 14:45:35 +0000 (14:45 +0000)]
xend, xenapi: Strip characters from logs that XMLRPC layer cannot handle.
From: Ian Jackson <ian.jackson@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86, hvm: Allow stdvga acceleration to work with 32-bit x86.
Keir Fraser [Fri, 16 Nov 2007 14:40:22 +0000 (14:40 +0000)]
x86, hvm: Allow stdvga acceleration to work with 32-bit x86.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxend: readDomTxn() and friends use dompath, not vmpath.
Keir Fraser [Thu, 15 Nov 2007 22:14:13 +0000 (22:14 +0000)]
xend: readDomTxn() and friends use dompath, not vmpath.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix header dependencies list, broken by c/s 16133.
Keir Fraser [Tue, 13 Nov 2007 20:13:50 +0000 (20:13 +0000)]
Fix header dependencies list, broken by c/s 16133.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 years agox86: Do not read/write EFER MSR if it doesn't exist.
Keir Fraser [Tue, 13 Nov 2007 20:08:39 +0000 (20:08 +0000)]
x86: Do not read/write EFER MSR if it doesn't exist.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoFix non-portable grep usage. Solaris doesn't have -q option.
Keir Fraser [Tue, 13 Nov 2007 19:26:55 +0000 (19:26 +0000)]
Fix non-portable grep usage. Solaris doesn't have -q option.
Signed-off-by: John Levon <john.levon@sun.com>
17 years agox86: GDT reserved page should be a full page.
Keir Fraser [Tue, 13 Nov 2007 19:21:00 +0000 (19:21 +0000)]
x86: GDT reserved page should be a full page.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovmx: Restore correct host SYSENTER parameters on vmexit.
Keir Fraser [Tue, 13 Nov 2007 19:05:27 +0000 (19:05 +0000)]
vmx: Restore correct host SYSENTER parameters on vmexit.
Also simplify vmx_set_host_env().
HOST_GDT_BASE does not have to change when we shift CPU.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovmx: Set HOST_FS and HOST_GS to unusable on vmexit.
Keir Fraser [Tue, 13 Nov 2007 18:30:47 +0000 (18:30 +0000)]
vmx: Set HOST_FS and HOST_GS to unusable on vmexit.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agotools: Avoid -nostdlib argument to $(LD).
Keir Fraser [Tue, 13 Nov 2007 17:57:22 +0000 (17:57 +0000)]
tools: Avoid -nostdlib argument to $(LD).
This interacts badly with GNU ld on Solaris.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoRevert 16067:9f9f9b68cd08a03fc8cfad9f5ab702e50b6b6463.
Keir Fraser [Tue, 13 Nov 2007 17:28:44 +0000 (17:28 +0000)]
Revert 16067:9f9f9b68cd08a03fc8cfad9f5ab702e50b6b6463.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agolibxc: Consistently print errno on write() error in domain_save code.
Keir Fraser [Sun, 11 Nov 2007 18:28:57 +0000 (18:28 +0000)]
libxc: Consistently print errno on write() error in domain_save code.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agolibxc: Consolidate read()/write() syscall wrappers to read/write an
Keir Fraser [Sun, 11 Nov 2007 18:22:33 +0000 (18:22 +0000)]
libxc: Consolidate read()/write() syscall wrappers to read/write an
exact number of bytes. The consolidated versions are more watertight
than the various versions previously distributed around the library
source code.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agosolaris, xend: Fix FMRI for Solaris SMF.
Keir Fraser [Sat, 10 Nov 2007 10:55:27 +0000 (10:55 +0000)]
solaris, xend: Fix FMRI for Solaris SMF.

Update the FMRI for SMF to reflect reality (again).

Signed-off-by: John Levon <john.levon@sun.com>
17 years agoxend: Fix appending policy module to end of grub's config file
Keir Fraser [Sat, 10 Nov 2007 10:54:32 +0000 (10:54 +0000)]
xend: Fix appending policy module to end of grub's config file

This patch fixes the case where a module line is supposed to be added
to the very end of the file but the file does not end in with a new
line. Also fixes a problem that in some cases the module line would
not be properly be removed.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agovmx: Enable WBINVD intercepts to avoid real WBINVD for non-vtd guests.
Keir Fraser [Fri, 9 Nov 2007 12:59:58 +0000 (12:59 +0000)]
vmx: Enable WBINVD intercepts to avoid real WBINVD for non-vtd guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agosvm: Intercept and disallow MONITOR/MWAIT.
Keir Fraser [Fri, 9 Nov 2007 12:08:37 +0000 (12:08 +0000)]
svm: Intercept and disallow MONITOR/MWAIT.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86, hvm: Better handling of INVD/WBINVD on VMX and SVM.
Keir Fraser [Fri, 9 Nov 2007 12:05:27 +0000 (12:05 +0000)]
x86, hvm: Better handling of INVD/WBINVD on VMX and SVM.
Also better handling of MONITOR/MWAIT on VMX.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoMerge with ia64 tree.
Keir Fraser [Thu, 8 Nov 2007 18:15:36 +0000 (18:15 +0000)]
Merge with ia64 tree.

17 years agoFix i386 Xen build.
Keir Fraser [Thu, 8 Nov 2007 18:14:00 +0000 (18:14 +0000)]
Fix i386 Xen build.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoFix xend startup after 16344:0ebac857649591.
Keir Fraser [Thu, 8 Nov 2007 16:27:03 +0000 (16:27 +0000)]
Fix xend startup after 16344:0ebac857649591.
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
17 years ago[IA64] Add paddr_to_pfn for upstream changes
Alex Williamson [Thu, 8 Nov 2007 16:05:26 +0000 (09:05 -0700)]
[IA64] Add paddr_to_pfn for upstream changes

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agomerge with xen-unstable.hg (staging)
Alex Williamson [Thu, 8 Nov 2007 16:37:06 +0000 (09:37 -0700)]
merge with xen-unstable.hg (staging)

17 years agoxend: Allow for non-existent xen-python-path binary.
Keir Fraser [Thu, 8 Nov 2007 15:32:14 +0000 (15:32 +0000)]
xend: Allow for non-existent xen-python-path binary.
On Solaris, xen-python-path is unnecessary.

Signed-off-by: John Levon <john.levon@sun.com>
17 years agohvm: Clean up buf_ioreq handling.
Keir Fraser [Thu, 8 Nov 2007 14:50:01 +0000 (14:50 +0000)]
hvm: Clean up buf_ioreq handling.
Also, disable stdvga caching on hvm save/restore, as the shadow vga
state is not preserved.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86, vt-d: Clean up utils code.
Keir Fraser [Thu, 8 Nov 2007 13:14:03 +0000 (13:14 +0000)]
x86, vt-d: Clean up utils code.
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agox86, hvm: Clean up periodic timer code a little. This leads naturally
Keir Fraser [Thu, 8 Nov 2007 10:33:18 +0000 (10:33 +0000)]
x86, hvm: Clean up periodic timer code a little. This leads naturally
to a no-missed-tick-accounting mode which is a combination of ticks
delivered 'off beat' immediately upon re-scheduling when ticks are
missed, then reverting to delivering ticks 'on beat' as usual.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxm: Fix long options of xm sched-credit
Keir Fraser [Thu, 8 Nov 2007 10:23:22 +0000 (10:23 +0000)]
xm: Fix long options of xm sched-credit

Long options of xm sched-credit command are ignored (--domain,
--weight, --cap). This patch fixes it.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agox86, hvm: Fix boot of HVM guests with pass-thru devices. Cache
Keir Fraser [Thu, 8 Nov 2007 10:21:47 +0000 (10:21 +0000)]
x86, hvm: Fix boot of HVM guests with pass-thru devices. Cache
attributes should not be propagated for Xen-heap pages.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoReplace is_xen_heap_frame() with is_xen_heap_{page,mfn}(). Callers are
Keir Fraser [Thu, 8 Nov 2007 10:19:18 +0000 (10:19 +0000)]
Replace is_xen_heap_frame() with is_xen_heap_{page,mfn}(). Callers are
changed to use whichever is more convenient.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[IA64] Fix breakage from upstream and remove duplicate code
Alex Williamson [Wed, 7 Nov 2007 22:11:44 +0000 (15:11 -0700)]
[IA64] Fix breakage from upstream and remove duplicate code

- Get rid of PAGE_SIZE usage in arch-ia64.h when building tools.
- Now that more of xen_init_fv is identical to x86 code, share the
  code rather than duplicate it.
- Change a few things that came over from the ia64 tree to use the
  XC_* macros as already done upstream.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agomerge with xen-unstable.hg (staging)
Alex Williamson [Wed, 7 Nov 2007 21:48:48 +0000 (14:48 -0700)]
merge with xen-unstable.hg (staging)

17 years ago[IA64] Simplify thash_purge_and_insert()
Alex Williamson [Wed, 7 Nov 2007 18:01:23 +0000 (11:01 -0700)]
[IA64] Simplify thash_purge_and_insert()

This patch simplifies thash_purge_and_insert() for readability.
PV domain never use this function.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years ago[IA64] Remove panic_domain in guest_write_eoi() for NULL_VECTOR
Alex Williamson [Wed, 7 Nov 2007 17:53:41 +0000 (10:53 -0700)]
[IA64] Remove panic_domain in guest_write_eoi() for NULL_VECTOR

Triggered attempting kexec of an HVM domain.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
17 years ago[IA64] Clean up of vcpu_init_regs().
Alex Williamson [Wed, 7 Nov 2007 17:45:35 +0000 (10:45 -0700)]
[IA64] Clean up of vcpu_init_regs().

Use symbolical macro value instead of magic number.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti save-restore: ia64 qemu-dm boot clean up.
Alex Williamson [Wed, 7 Nov 2007 17:41:43 +0000 (10:41 -0700)]
[IA64] vti save-restore: ia64 qemu-dm boot clean up.

Use xc_get_hvm_param()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti save-restore: ia64 hvm builder clean up with respect to hvm params.
Alex Williamson [Wed, 7 Nov 2007 17:34:09 +0000 (10:34 -0700)]
[IA64] vti save-restore: ia64 hvm builder clean up with respect to hvm params.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti save-restore: hvm domain io page clean up.
Alex Williamson [Wed, 7 Nov 2007 17:31:09 +0000 (10:31 -0700)]
[IA64] vti save-restore: hvm domain io page clean up.

- set_hvm_param hypercall clean up.
- The reference counts of the io pages must be incremented.
- Buffered pio wasn't SMP safe.
- Clean up get_vio() parameter.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti save-restore: clean up arch_get/set_info_guest()
Alex Williamson [Wed, 7 Nov 2007 17:19:21 +0000 (10:19 -0700)]
[IA64] vti save-restore: clean up arch_get/set_info_guest()

- Update comment in copy_rbs()
- Don't warn when rbs_size = 0 for cpu initialization case.
- Remove struct vcpu_guest_context_regs::rbs_nat member which isn't used.
  and add num_phys_stacked to struct vcpu_guest_context_regs.
  so far rbs_nat and rbs_rnat isn't, so it is allowed to change the offset
  of rbs_rnat.
- Add check when setting vRR[].
- Don't set vRR[] if val is zero.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti save-restore: reap ioreq after resume.
Alex Williamson [Wed, 7 Nov 2007 17:10:20 +0000 (10:10 -0700)]
[IA64] vti save-restore: reap ioreq after resume.

Otherwise ioreq is left as STATE_IORESP_READY
so that the domain will be paniced.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years ago[IA64] vti save-restore: clean up of PV region register handling.
Alex Williamson [Wed, 7 Nov 2007 17:07:06 +0000 (10:07 -0700)]
[IA64] vti save-restore: clean up of PV region register handling.

Fix rr handling to avoid resrved registers/field fault in xen

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agonetwork-bridge: Make detection of gateway device more robust.
Keir Fraser [Wed, 7 Nov 2007 16:55:13 +0000 (16:55 +0000)]
network-bridge: Make detection of gateway device more robust.
Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
17 years agoioemu: Do not use PAGE_SHIFT/PAGE_SIZE/PAGE_MASK macros. Use the libxc
Keir Fraser [Wed, 7 Nov 2007 16:51:08 +0000 (16:51 +0000)]
ioemu: Do not use PAGE_SHIFT/PAGE_SIZE/PAGE_MASK macros. Use the libxc
provided versions.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[IA64] Fix spinlock initializer.
Alex Williamson [Wed, 7 Nov 2007 16:47:40 +0000 (09:47 -0700)]
[IA64] Fix spinlock initializer.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
17 years agovt-d: Support intra-domain shared interrupt.
Keir Fraser [Wed, 7 Nov 2007 15:20:06 +0000 (15:20 +0000)]
vt-d: Support intra-domain shared interrupt.

Inter-domain shared interrupt has been supported by timeout method,
but it still doesn't support intra-domain shared interrupt, that is
assigning multiple devices which share a physical irq to the same
domain. This patch implements intra-domain shared interrupt
support. In addition, this patch maps link to guest device/intx
instead of directly mapping isairq in pt_irq_create_bind_vtd(),
because at this point the isairqs got from pci_link are always 0.

Note that assigning multiple devices to guests which uses PIC to
handle interrupts may be failed, because different links possibly
connect to same irq.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agox86, hvm: Fix typo in no-missed-tick-accounting timer mode.
Keir Fraser [Wed, 7 Nov 2007 14:53:32 +0000 (14:53 +0000)]
x86, hvm: Fix typo in no-missed-tick-accounting timer mode.
From: Dave Winchell <dwinchell@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86: Fix PV guest CR4 handling. We should not leak hidden CR4 bits
Keir Fraser [Wed, 7 Nov 2007 14:15:44 +0000 (14:15 +0000)]
x86: Fix PV guest CR4 handling. We should not leak hidden CR4 bits
into guest CR4 value.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[SHADOW] Fix up change that allowed MMIO mappings to be shadowed
Keir Fraser [Wed, 7 Nov 2007 13:41:29 +0000 (13:41 +0000)]
[SHADOW] Fix up change that allowed MMIO mappings to be shadowed
so it doesn't let us map INVALID_MFN as a shadow pagetable page.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
17 years agox86: Change cache attributes of Xen 1:1 page mappings in response to
Keir Fraser [Wed, 7 Nov 2007 11:44:05 +0000 (11:44 +0000)]
x86: Change cache attributes of Xen 1:1 page mappings in response to
guest mapping requests.
Based on a patch by Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoEnable loopback disk image files on readonly nfs filesystem.
Keir Fraser [Wed, 7 Nov 2007 09:22:31 +0000 (09:22 +0000)]
Enable loopback disk image files on readonly nfs filesystem.

When we losetup a file on readonly nfs filesystem, it fails with:
# losetup /dev/loop7 /data/vm/xen_el5_i386_para/system.raw
/data/vm/xen_el5_i386_para/system.raw: Permission denied

New version of losetup has add a "-r" option for readonly loop, which
Linux kernel has supported for a long time. Some distribution (EL5
update, Fedora 8, etc.) have shipped it. This patch benefit this
option while doesn't break the old versions of losetup.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
17 years agoHVM device passthru: Correct PCI_EXP_DEVCTL_FLR
Keir Fraser [Wed, 7 Nov 2007 09:21:16 +0000 (09:21 +0000)]
HVM device passthru: Correct PCI_EXP_DEVCTL_FLR

This patch corrects PCI_EXP_DEVCTL_FLR so that function level reset
will be really executed, and also replaces some magic numbers with
macros.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agovt-d: Disable PMR on every vt-d engine.
Keir Fraser [Wed, 7 Nov 2007 09:13:48 +0000 (09:13 +0000)]
vt-d: Disable PMR on every vt-d engine.

Signed-off-by Gang Wei (Jimmy) <gang.wei@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>

17 years ago[IA64] Ignore SAL_PHYSICAL_ID_INFO
Alex Williamson [Tue, 6 Nov 2007 21:20:05 +0000 (14:20 -0700)]
[IA64] Ignore SAL_PHYSICAL_ID_INFO

Newer upstream Linux kernels calls this.  Simply return
unimplemented for now.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years ago[IA64] Cleanup: remove unused fields from struct arch_domain
Alex Williamson [Tue, 6 Nov 2007 21:05:50 +0000 (14:05 -0700)]
[IA64] Cleanup: remove unused fields from struct arch_domain

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years ago[IA64] Cleanup: remove unused functions, add static.
Alex Williamson [Tue, 6 Nov 2007 21:03:36 +0000 (14:03 -0700)]
[IA64] Cleanup: remove unused functions, add static.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
17 years agoxentrace: Add missing xentrace format entries for HVM guests.
Keir Fraser [Tue, 6 Nov 2007 16:04:13 +0000 (16:04 +0000)]
xentrace: Add missing xentrace format entries for HVM guests.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years ago[PV-ON-HVM] Fix evtchn of unbind_from_irqhandler()
Keir Fraser [Tue, 6 Nov 2007 11:49:15 +0000 (11:49 +0000)]
[PV-ON-HVM] Fix evtchn of unbind_from_irqhandler()

When xm block-detach command was done on PV-ON-HVM, the response of
other disks was lost. It is because a wrong event channel was
invalidated when detaching it. Not the evtchn number but the irq
number is invalidated specifying it.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
17 years agovt-d: Free memory of g2m_ioport_list.
Keir Fraser [Tue, 6 Nov 2007 09:43:22 +0000 (09:43 +0000)]
vt-d: Free memory of g2m_ioport_list.

This patch frees memory of g2m_ioport_list when remove g2m_ioport or
destroy iommu domain to avoid memory leak. In addtion, does some
cleanup on domctl.c.

Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agoUsers manual updates:
Keir Fraser [Tue, 6 Nov 2007 09:41:57 +0000 (09:41 +0000)]
Users manual updates:
 1) PAE as 32-bit Xen default
 2) IA64 and Power are supported
 3) AMD Virtualization is supported
 4) Add console_timestamps boot param

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
17 years agoxenstored: Recover from corrupt tdb on reboot
Keir Fraser [Tue, 6 Nov 2007 09:40:44 +0000 (09:40 +0000)]
xenstored: Recover from corrupt tdb on reboot

Xen cannot work when xenstored's tdb is corrupt.  When that happens
somehow (and we've seen it happen), even reboot doesn't recover from
it.  It could: there is no state in tdb that needs to be persisted
across reboots.

This patch arranges that tdb is removed before xenstored is started,
provided it doesn't already run.  This is safe, because:

* xenstored cannot be restarted.  If it dies, Xen's screwed until
  reboot.

* /usr/sbin/xend always starts xenstored anyway.

* xenstored locks its pid-file (see write_pidfile() in
  tools/xenstore/xenstored_core.c), and refuses to start when it
  can't.

* My patch makes /usr/sbin/xend remove tdb iff it can lock the
  pid-file.  In other words, it removes tdb only when xenstored is not
  running, and locks it out until it is done.

  Bonus fix: it also removes stale copies of the tdb xenstored tends
  to leave behind when it exits uncleanly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
17 years agoxend: Fix startup crash for some network configurations.
Keir Fraser [Tue, 6 Nov 2007 09:39:25 +0000 (09:39 +0000)]
xend: Fix startup crash for some network configurations.
From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[SHADOW] Fix error paths in guest-pagetable walker.
Keir Fraser [Mon, 5 Nov 2007 16:38:47 +0000 (16:38 +0000)]
[SHADOW] Fix error paths in guest-pagetable walker.
Real hardware sets PFEC_page_present regardless of the access bits,
and doesn't write back _PAGE_ACCESSED except after a successful walk.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
17 years agoSmall cleanups to console-input-redirect code in Xen.
Keir Fraser [Mon, 5 Nov 2007 16:37:48 +0000 (16:37 +0000)]
Small cleanups to console-input-redirect code in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoioemu: Clean up compile warnings.
Keir Fraser [Mon, 5 Nov 2007 13:23:55 +0000 (13:23 +0000)]
ioemu: Clean up compile warnings.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxm: fix "xm labels type=any" command error
Keir Fraser [Mon, 5 Nov 2007 13:15:56 +0000 (13:15 +0000)]
xm: fix "xm labels type=any" command error
Signed-off-by: Syunsuke HAYASHI <syunsuke@jp.fujitsu.com>
17 years agocpufreq, amd: Xen support for architectural AMD pstate driver
Keir Fraser [Mon, 5 Nov 2007 10:45:07 +0000 (10:45 +0000)]
cpufreq, amd: Xen support for architectural AMD pstate driver

With the third generation Opteron parts, AMD switched to an
architecturally defined interface for PowerNow! that uses
different MSRs than previous versions.

Add support in msr-index.h and traps.c for the new interface.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
17 years agox86, hvm: Minor fix of hvm_set_pci_link_route().
Keir Fraser [Mon, 5 Nov 2007 10:16:30 +0000 (10:16 +0000)]
x86, hvm: Minor fix of hvm_set_pci_link_route().
Signed-off-by: Weidong Han <weidong.han@intel.com>
17 years agox86, hvm: More fixes to no-missed-tick-accounting mode.
Keir Fraser [Mon, 5 Nov 2007 10:09:10 +0000 (10:09 +0000)]
x86, hvm: More fixes to no-missed-tick-accounting mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoMerge.
Keir Fraser [Fri, 2 Nov 2007 16:38:11 +0000 (16:38 +0000)]
Merge.

17 years agohvm: Timer fixes:
Keir Fraser [Fri, 2 Nov 2007 16:34:54 +0000 (16:34 +0000)]
hvm: Timer fixes:
 1. Do not record more than one pending interrupt in
 no-missed-tick-accounting mode. We do not stack up missed interrupts
 in this timer mode.
 2. Always record all missed ticks when we are in a
 missed-tick-accounting mode. Do not have a ceiling for this as it
 simply causes guests to lose track of wall time.
 3. General bits of cleanup and simplification.
From: Dave Winchell <dwinchell@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86, svm: Add hunk I missed from Jan's debug-register handling
Keir Fraser [Fri, 2 Nov 2007 16:06:06 +0000 (16:06 +0000)]
x86, svm: Add hunk I missed from Jan's debug-register handling
patch. We need to handle SVM debug-register read access intercepts.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years ago[SHADOW] Make the guest PT walker more complete.
Tim Deegan [Fri, 2 Nov 2007 15:41:57 +0000 (15:41 +0000)]
[SHADOW] Make the guest PT walker more complete.

We now check access rights and write back the _PAGE_ACCESSED and
_PAGE_DIRTY bits into the guest entries as we walk the tables.
This makes the shadow fault handler simpler, and the various emulation
paths more correct.

This patch doesn't add checking and write-back to the HAP pagetable walker;
it just fixes up its arguments to match the new shadow one.

Signed-off-by: Tim Deegan <Tim.Deegan@eu.citrix.com>
17 years agoLive migration with MMIO pages: fix shadow pte propagation.
Keir Fraser [Fri, 2 Nov 2007 10:37:59 +0000 (10:37 +0000)]
Live migration with MMIO pages: fix shadow pte propagation.
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
17 years agox86_emulate: Allow to build outside Xen tree (in tools/test).
Keir Fraser [Fri, 2 Nov 2007 10:22:22 +0000 (10:22 +0000)]
x86_emulate: Allow to build outside Xen tree (in tools/test).
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agosolaris: Fix Solaris tools build.
Keir Fraser [Fri, 2 Nov 2007 10:16:37 +0000 (10:16 +0000)]
solaris: Fix Solaris tools build.
Signed-off-by: John Levon <john.levon@sun.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoxen: Remove stdint.h include. Xen defines its own types.
Keir Fraser [Fri, 2 Nov 2007 09:53:28 +0000 (09:53 +0000)]
xen: Remove stdint.h include. Xen defines its own types.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agoioemu: Remove dependency on linux/input.h
Keir Fraser [Fri, 2 Nov 2007 09:44:45 +0000 (09:44 +0000)]
ioemu: Remove dependency on linux/input.h
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86, svm: Adds nested paging performance counter to svmexit
Keir Fraser [Fri, 2 Nov 2007 09:30:51 +0000 (09:30 +0000)]
x86, svm: Adds nested paging performance counter to svmexit
PERFCOUNTER_ARRAY while keeping array compacted.
Signed-off-by: Stephen Wilson <stephen.wilson@amd.com>
17 years agoMerge with ia64/xen-unstable.hg
Keir Fraser [Fri, 2 Nov 2007 09:16:57 +0000 (09:16 +0000)]
Merge with ia64/xen-unstable.hg

17 years agoFix use-after-free in xenconsoled.
Keir Fraser [Thu, 1 Nov 2007 16:34:43 +0000 (16:34 +0000)]
Fix use-after-free in xenconsoled.

shutdown_domain() MUST NOT call cleanup_domain(), just flagging them
as dead is enough.  cleanup_domains() for dead domains is called by
the main loop in handle_io() in a safe way already.

shutdown_domain() calling cleanup_domain() too leads struct domain
being accessed after freeing and to a double-free.

Fixed by simply dropping the cleanup_domain() call and by making the
functions called by the main loop in handle_io() ignore dead domains.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
17 years agoioemu: ioemu portion of buffered-io fix.
Keir Fraser [Thu, 1 Nov 2007 16:34:20 +0000 (16:34 +0000)]
ioemu: ioemu portion of buffered-io fix.
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
17 years ago[IA64] Add support for 4 & 8 byte buffered io
Alex Williamson [Thu, 1 Nov 2007 16:30:12 +0000 (10:30 -0600)]
[IA64] Add support for 4 & 8 byte buffered io

The data structure handles it better now.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
17 years agox86: Fix various problems with debug-register handling.
Keir Fraser [Thu, 1 Nov 2007 16:16:25 +0000 (16:16 +0000)]
x86: Fix various problems with debug-register handling.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agomerge with xen-unstable.hg (staging)
Alex Williamson [Thu, 1 Nov 2007 15:07:16 +0000 (09:07 -0600)]
merge with xen-unstable.hg (staging)

17 years ago[IA64] Implement some PAL procedures
Alex Williamson [Thu, 1 Nov 2007 15:00:27 +0000 (09:00 -0600)]
[IA64] Implement some PAL procedures

This patch implements:
 - PAL_PREFETCH_VISIBILITY
 - PAL_MC_DRAIN
 - PAL_BRAND_INFO
 - PAL_GET_PSTATE
 - PAL_CACHE_SHARED_INFO

These PAL procedures are necessary for Windows 2008.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years ago[IA64] Update pal.h and pal.S to linux-2.6.21
Alex Williamson [Thu, 1 Nov 2007 14:55:01 +0000 (08:55 -0600)]
[IA64] Update pal.h and pal.S to linux-2.6.21

Current pal.h is based on linux-2.6.13 and
some procedures are missing. (e.g. PAL_GET_PSTATE)

This patch just updates pal.h and pal.S to linux-2.6.21.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
17 years ago[IA64] Fix ia64_sal_get_state_info() emulation bug
Alex Williamson [Thu, 1 Nov 2007 14:50:03 +0000 (08:50 -0600)]
[IA64] Fix ia64_sal_get_state_info() emulation bug

It is possible to double-free the sal queue entry when multiple
ia64_sal_get_state_info() from Dom0 are called simultaniously.
In the worst case, the kernel might panic.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
17 years agox86/64: Fix the build.
Keir Fraser [Thu, 1 Nov 2007 10:56:56 +0000 (10:56 +0000)]
x86/64: Fix the build.
Signed-off-by: Keir Fraser <keir@xensource.com>
17 years agox86, hvm: Fix stdvga and buffered-io code.
Keir Fraser [Thu, 1 Nov 2007 09:48:14 +0000 (09:48 +0000)]
x86, hvm: Fix stdvga and buffered-io code.

Corrected a bug in the stdvga code where it did not properly handle 32
bit operations. The buf_ioreq_t can now store 32 bits of data.

Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
17 years agoacm, xend: Follow linked files.
Keir Fraser [Thu, 1 Nov 2007 09:37:47 +0000 (09:37 +0000)]
acm, xend: Follow linked files.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>