Isaku Yamahata [Thu, 7 Aug 2008 02:47:34 +0000 (11:47 +0900)]
[IA64] allocate percpu area in the xen va area.
To guarantee that the percpu is pinned down,
move its virtual address from the xen identity mapped area
to the xen va area which is pinned by DTR[IA64_TR_KERNEL].
Then unnecessary tlb miss fault will be avoided.
Sometimes per cpu area is accessed from very critial
point where tlb miss isn't allowed.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 31 Jul 2008 03:25:50 +0000 (12:25 +0900)]
[IA64] Fix mca handler so as not to destroy ar
This patchf ixes the mca handler so as not to destroy ar
and some bugs.
On mca the firmware saves non-banked and banked general registers
and the most of ar registers must be unchanged.
However before ia64_os_mca_proc_state_dump saves such registers,
the cited hunks unconditionally overwrite ar.k[36] so that
they are destroyed.
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
Isaku Yamahata [Mon, 28 Jul 2008 08:29:09 +0000 (17:29 +0900)]
[IA64] fix fpswa mapping which was broken by EFI mapping.
This patch fixes the following panic reported by Kusamura when xen
VMM tries to use fpswa.
With the EFI mapping patch, all the firmware call is done in
the dedicated address space.
fpswa is EFI driver so that the address space must be switched
before/after calling fpswa.
> (XEN) $$$$$ PANIC in domain 2 (k6=0xf0000004f25e8000): *** xen_handle_domain_access: exception table lookup failed, iip=0xf40000000408cc30,
> addr=0xe0000004ffe62050, spinning...
> (XEN) d 0xf000000004138080 domid 2
> (XEN) vcpu 0xf0000004f25e8000 vcpu 0
> (XEN)
> (XEN) CPU 5
> (XEN) psr :
0000121008226038 ifs :
8000000000000716 ip : [<
f40000000408cc31>]
> (XEN) ip is at handle_fpu_swa+0x3c1/0x510
...
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Mon, 28 Jul 2008 08:29:09 +0000 (17:29 +0900)]
[IA64] improve __cpu_die()
use udelay instead of nop loop.
This patch reduces __cpu_die() time much.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Mon, 28 Jul 2008 08:29:09 +0000 (17:29 +0900)]
[IA64] typo in relocate_new_kernel.
typo in relocate_new_kernel.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Wed, 23 Jul 2008 03:10:20 +0000 (12:10 +0900)]
merge with xen-unstable.hg
Isaku Yamahata [Wed, 23 Jul 2008 02:21:47 +0000 (11:21 +0900)]
[IA64] Don't perform implicit sync when vps_save/restore
When calling vps_save/restore, pass 1 as the third parameter not to
perform implicit sync.
The third parameter of vps_save/restore is used to indidate whether
vps_save/restore do implicit vps_read_sync/vps_write_sync.
When the third parameter is 1, it doesn't perform implicit sync.
This parameter adds flexibility of vps_save/restore.
This feature was newly introduced by SDM specification update June 2008.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Keir Fraser [Tue, 22 Jul 2008 15:03:45 +0000 (16:03 +0100)]
ioemu: Fix hvmloader erroneous debugging prints
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Tue, 22 Jul 2008 14:57:19 +0000 (15:57 +0100)]
ioemu: fix vram tracking when !s->lfb_addr
When we don't have an LFB (standard VGA), we can not and do not need
vram tracking at all since we always get explicit dirtying.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Tue, 22 Jul 2008 12:36:56 +0000 (13:36 +0100)]
x86/64: Account for allocation bitmap by making Xen heap appropriately larger.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 22 Jul 2008 10:56:26 +0000 (11:56 +0100)]
x86: Fix the dom0 booting hang when VT-d is enabled.
Dom0 C/S 593 hooks the pci bus probe and remove function. When
probing a function at booting time, it will first add the device into
Dom0's list through a hypercall, then execute the driver's probe
function. If the probe function fails, another hypercall is called to
remove the device from Dom0's list. But for some RMRR devices, for
example, USB devices, they may still be in use for some operation by
BIOS at booting time. So when removing those kind of devices, we
should still keep the RMRR information.
Also add a small fix for "for_each_rmrr_device".
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Keir Fraser [Tue, 22 Jul 2008 10:55:06 +0000 (11:55 +0100)]
xend balloon: portability cleanup
Move the linux specific labels to osdep where they
belong. Modification on Solaris code ok'd by SUN (Ryan Scott).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 22 Jul 2008 07:01:56 +0000 (08:01 +0100)]
Fix a typo in the macro PCI_BDF2()
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 22 Jul 2008 07:00:43 +0000 (08:00 +0100)]
fs-back: fix compilation error.
XC_PAGE_SIZE and XC_PAGE_MASK should be used instead of PAGE_SIZE
and PAGE_MASK.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Tue, 22 Jul 2008 06:59:44 +0000 (07:59 +0100)]
x86 hvm: stubdom and hvmloader always live under /usr/lib, never /usr/lib64
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Map EFI regions into the same place they are maped into in Linux
Map EFI regions into the same place they are maped into in Linux
This is because of an unfortunate problem with the way that EFI interacts
with Kexec. The call to map the EFI regions may only be made once. This
means that after Kexec the EFI regions must be mapped into the same region
that they were mapped into prior to Kexec.
This is not usually a problem when kexecing from xen to xen or from linux
to linux, as the mapping will be the same. However when kexecing from xen
to linux or linux to xen, the mapping is different, and the problem
manifests.
So far Magnus Damm and I have come up with three different ideas for
resolving this problem.
1. Leave the EFI in physical mode
- This is nice and simple
- There is a potential performance hit, but PAL calls are not
made very often, so it shouldn't be a problem
- I have patches to do this, some of which are in the
series that accompany this patch.
- The SGI people tell me that it won't work on SN because
it allows the OS to provide EFI (or SAL?) code.
2. Always map EFI into the space that Linux uses
- Not so simple
- Requires Xen to jump through some hoops
- But leaves Linux unmodified
- But it will break if Linux ever changes its mapping
- This patch series implements this change
3. Always map EFI to some agreed space
- Similar to 2. but less likely to break in the future
- But it requires Xen and Linux to agree on a space to be used
- Reqires both Xen and Linux to be modified
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Tristan Gingold <tgingold@free.fr>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Only map PAL when making EFI, PAL or SAL calls
Move PAL code from the Xen identity mapped region to the
EFI identity mapped region, which overlaps with guest virtual space.
Make sure that PAL memory is only pinned into the TLB when making
EFI, PAL or SAL calls.
This seems to be nice as it provides a symmetrical approach to
mapping an unmapping pal code.
However it would be just as safe, and arguably simpler just to map
the PAL code (once?) when the EFI RR is active - for instance very
early on in boot, or when calling XEN_EFI_RR_ENTER. In other words,
unpining is XEN_EFI_RR_LEAVE shouldn't be neccessary, as the EFI RR
should protect the memory from unwanted accesses by guests (or
the hypevisor for that matter).
This patch is mostly the work of Yamahata-san.
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: add __va_efi
sal_desc_entry_point() converts physical addresses into virtual
addresses using __va() and these virtual addresses are used
to register the SAL and PAL handlers - which exist in firmware
memory.
As the mapping of firmware memory is being moved from
a PAGE_OFFSET of (0xf << 60) to a PAGE_OFFSET of (0xe << 60),
__va() does not provide the correct virtual address.
By adding __va_efi(), which uses EFI_PAGE_OFFSET=(0xe << 60),
and using this in sal_desc_entry_point(), the correct address is
used.
On an HP rx2600 this eliminates the problem where the SAL rendezvous address
can't be registered and subsequently the boot fails. I suspect it
solves similar problems that have been seen on other HP machines too.
Actually, its rather amazing that the HP rx2620 and Tiger2 that
I have been using work without this fix.
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Use a separate RID for EFI
This activates the use of the EFI RID.
The basic idea is to switch to this RID, which is in the range reserved
for the hypervisor, before making EFI, PAL or SAL calls. The page fault
handler where the identity mapping checks for this RID, if present it
does the identity mapping, else it just follows the normal mapping
rules. In this way, VMX domains should not be able to access this
memory, and they should be able to use the virtual addresses that are
used by EFI for their own purposes.
Subsequent patches move EFI memory such that faults to it will
be protected by the EFI RID.
Cc: Tristan Gingold <tgingold@free.fr>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Move sal.h to asm-ia64/linux-xen/asm as it needs to be modified
A subsequent patch will modify sal.h, so it needs to be moved from
xen/include/asm-ia64/linux-xen/asm/sal.h to
xen/include/asm-ia64/linux/asm/sal.h and the relevant README.origin
files need to be updated accordingly.
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Handle EFI UC area correctly in vmx_alt_dtlb
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Add identity mapping of EFI memory to alt_dtlb_miss
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Tristan Gingold <tgingold@free.fr>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Allow EFI_RID to be used in ivt.S
This is a preliminary patch to allow itentity mapping
of EFI memory to be handled in the asm page fault handlers.
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Tristan Gingold <tgingold@free.fr>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Repining for EFI RID
A cut down version of set_one_rr (and ia64_new_rr7) for
use when switching to the EFI RID for SAL, PAL and EFI calls.
There seems to be no need to repin: palcode, mapped_regs or vhpt in this
case. If it turns they do need to be repinned then special care needs to
betaken to track the correct value to repin. That is generally the values
that were most recently pinned by ia64_new_rr7.
ia64_new_rr7_efi can probably be merged with ia64_new_rr7,
as they are quite similar, but for testing purposes it seems
easier to keep them separate.
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Header changes in preparation for EFI RID
The EFI RID patches require pal.h to (directly or indirectly)
have access to GRANULE_SIZE which is defined in pgtable.h.
This effectively causes a header loop as pgtable.h includes
system.h and system.h includes pal.h. This patch breaks
that loop by not including pal.h in system.h if XEN is defined,
which is the only time the loop will occur.
There are two side effects of this:
1. regionreg.c makes use of some symbols declared in
pal.h but does not include it directly. This is
resolved by including it, which doesn't seem to
cause any additional problems.
2. system.h makes use of ia64_pal_halt_light which is defined in pal.h.
#define safe_halt() ia64_pal_halt_light()
This is probably the reason that pal.h is included in system.h.
However this does not seem to manifest as any sort of build problem,
presumably because either nothing in xen uses safe_halt,
or because those that do include pal.h by some other means.
In any case the change seems safe, though hackish.
Cc: Tristan Gingold <tgingold@free.fr>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Unpin shared_info, mapped_regs and VPD TR in ia64_do_tlb_purge
Unpinning shared_info, mapped_regs and VPD seems to be missing
from ia64_do_tlb_purge and seems to be needed for kexec.
Like VHPT, the pinned value is recored in a percpu variable
so that the correct value can be unpinned.
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Unpin the correct VHPT TR in ia64_do_tlb_purge
GET_VA_VCPU_VHPT_MADDR(r2,r3) does not give the value of the VHPT
pinned into the TLB. I believe that this is because
current is changed between pinning and calling play_dead,
though I am not sure of the exact scemantics.
In any case, by recording the pinned value in a percpu variable,
and unpinning this value, the TR entry is removed and all is well.
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Add a wrapper to vmx_switch_rr7()
Add a C wrapper around the assembly vmx_switch_rr7().
This will be filled out with code that saves inserted TLB values
by subsequent patches.
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: define EFI offsets for identity mapping
This is used by paches that move the EFI runtime regions into what is
normally guest space. A description of why this mapping is made is
included in the patch that makes the mapping.
Cc: Tristan Gingold <tgingold@free.fr>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Isaku Yamahata [Tue, 22 Jul 2008 03:15:02 +0000 (12:15 +0900)]
[IA64] kexec: Define macros for EFI RID
Macros to be called by PAL, SAL and EFI to switch into
and out of EFI RID.
Cc: Tristan Gingold <tgingold@free.fr>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Keir Fraser [Mon, 21 Jul 2008 15:24:19 +0000 (16:24 +0100)]
doc: Fix multi-core amd example
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Keir Fraser [Mon, 21 Jul 2008 13:03:26 +0000 (14:03 +0100)]
tools: cpuid inputs must be 32 character long if hexadecimal value is
not used.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Keir Fraser [Mon, 21 Jul 2008 13:02:53 +0000 (14:02 +0100)]
libxc: add xc_gnttab_map_domain_grant_refs.
xc_gnttab_map_domain_grant_refs permits to simply map several pages
from the same domain.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 21 Jul 2008 09:39:15 +0000 (10:39 +0100)]
x86: Reintroduce clocksource=tsc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 21 Jul 2008 09:00:18 +0000 (10:00 +0100)]
Revert accidental commit from 18096:
fa66b33f975a8f
Keir Fraser [Mon, 21 Jul 2008 08:49:40 +0000 (09:49 +0100)]
Fix debug key t to avoid irq jitter.
From: Dan Magenheimer <dan.magenheimer@oracle.com>
Siigned-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 21 Jul 2008 08:47:07 +0000 (09:47 +0100)]
xend: Fix keymap handling
Patch allows keymap to be specified inside vfb description and
allows VM configured keymap setting to override XenD default
Signed-off-by: Pat Campbell <plc@novell.com>
Keir Fraser [Mon, 21 Jul 2008 08:46:17 +0000 (09:46 +0100)]
x86: More accurate PIT frequency estimation (1193182Hz)
In practice this has no impact since variance between crystals will be
substantially greater than 1-2ppm. But we may as well be as accurate
as possible.
From: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 21 Jul 2008 08:42:30 +0000 (09:42 +0100)]
[XSM][FLASK] Remove unused code from XSM and Flask
The complete_init hook has been unused since the introduction of the
create secure interface for domain_create.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
Keir Fraser [Mon, 21 Jul 2008 08:41:36 +0000 (09:41 +0100)]
[XSM][FLASK] Argument handling bugs in XSM:FLASK
Addresses a number of argument handling bugs in the flask_op hypercall
in the XSM:Flask module. Thanks to Rafal Wojtczuk at McAfee for
reporting the issues and Tim Deegan at Citrix for providing an
initial patch.
This patch addresses the following issues:
- bounds checking and validation on input arguments to flask_op
- updated ABI/API, size and cmd are now uint32_t
- updated userspace tools and libraries to account for ABI/API
changes
- implemented all copies using from/to guest, better portability
- implemented upper bounds checking on op->cmd, op->size
- implemented sanity checking on op->size and op->buf
- implemented bit vector for checking from/to usage on op->cmd
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
Keir Fraser [Mon, 21 Jul 2008 08:40:37 +0000 (09:40 +0100)]
Update .hgignore
Keir Fraser [Mon, 21 Jul 2008 08:38:33 +0000 (09:38 +0100)]
mini-os: fix FS frontend index reading
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 21 Jul 2008 08:38:19 +0000 (09:38 +0100)]
mini-os: fix fs-front.c debugging prints
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 18 Jul 2008 16:11:27 +0000 (17:11 +0100)]
fs-back: enable build by default
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 18 Jul 2008 14:45:06 +0000 (15:45 +0100)]
mini-os: export allocate_ondemand
allocate_ondemand can be used to allocate addresse space. Primarily
used for mapping MFNs, it can also be used e.g. to map grant refs.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 18 Jul 2008 14:44:39 +0000 (15:44 +0100)]
mini-os is missing list_top in its list.h
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 18 Jul 2008 14:03:55 +0000 (15:03 +0100)]
stubdom: fix build dependencies
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 18 Jul 2008 13:23:41 +0000 (14:23 +0100)]
stubdom: fix build dependency
newlib now depends on mini-os header links
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 18 Jul 2008 13:14:12 +0000 (14:14 +0100)]
xend: portability cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Fri, 18 Jul 2008 13:09:14 +0000 (14:09 +0100)]
mini-os: add stack walking debug
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 18 Jul 2008 11:46:52 +0000 (12:46 +0100)]
amd iommu: support device add and remove for recent dom0 kernel
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Keir Fraser [Fri, 18 Jul 2008 11:44:58 +0000 (12:44 +0100)]
Check phy: block device existence
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Fri, 18 Jul 2008 11:27:45 +0000 (12:27 +0100)]
stubdom: fix qemu keymap paths
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 18 Jul 2008 11:26:49 +0000 (12:26 +0100)]
x86: Remove clocksource=tsc for now.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 18 Jul 2008 10:24:13 +0000 (11:24 +0100)]
x86: Fix APERF/MPERF query bug on non-current cpu
Currently xen hypervisor cpufreq can only query APERF/MPERF on running
cpu, which will result in system broken when query on non-current
cpu. This patch fix the APERF/MPERF query bug on non-current cpu.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Fri, 18 Jul 2008 10:23:25 +0000 (11:23 +0100)]
X86: Fix cpufreq _psd HW_ALL coordination bug
Currently xen cpufreq has a bug when handleing _psd HW_ALL,
which will result in system broken when _psd HW_ALL.
This patch fix this bug by handling _psd HW_ALL in same way as
SW_ALL coordiantion, for the seek of safety.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Fri, 18 Jul 2008 10:22:12 +0000 (11:22 +0100)]
pvscsi: Install vscsi script.
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
Keir Fraser [Fri, 18 Jul 2008 10:21:06 +0000 (11:21 +0100)]
blktap scripts: deletion of double check and permission of using /dev/sdxx
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Keir Fraser [Fri, 18 Jul 2008 10:19:17 +0000 (11:19 +0100)]
stubdom: add example config file
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Isaku Yamahata [Fri, 18 Jul 2008 03:12:41 +0000 (12:12 +0900)]
merge with xen-unstable.hg
Keir Fraser [Thu, 17 Jul 2008 14:37:09 +0000 (15:37 +0100)]
stubdom: use lwip 1.3.0 release + patch instead of checking out from cvs
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 17 Jul 2008 14:33:15 +0000 (15:33 +0100)]
PV-GRUB: use the 0.97 snapshot + patch instead of checking out from cvs
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 17 Jul 2008 12:21:37 +0000 (13:21 +0100)]
stubdom: add functions for caml runtime
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 17 Jul 2008 10:20:01 +0000 (11:20 +0100)]
ioemu: fix the devices loop.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Keir Fraser [Thu, 17 Jul 2008 10:17:32 +0000 (11:17 +0100)]
xsm: Missing function in dummy module
This adds a missing function to the dummy module to make it compile.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Wed, 16 Jul 2008 12:57:34 +0000 (13:57 +0100)]
x86 Cx: Add option hpetbroadcast to force enabling hpet_broadcast.
This option can be used for test & experiment purpose.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Wed, 16 Jul 2008 12:54:02 +0000 (13:54 +0100)]
x86: Adjust handle_hpet_broadcast to let it run better before broadcast exit
Since hpet_broadcast_exit has been moved after interrupt enabled in C3
case, so adjust the handler of hpet broadcast to adapt to this.
Meanwhile, remove a freqently executed debug print line to simplify
the serial output.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Wed, 16 Jul 2008 12:50:47 +0000 (13:50 +0100)]
PV-GRUB: allow passing menu.lst as a ramdisk
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Wed, 16 Jul 2008 10:25:06 +0000 (11:25 +0100)]
x86 shadow: Re-init per-page spinlock before freeing p2m pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 16 Jul 2008 10:16:48 +0000 (11:16 +0100)]
ioemu: Fix issues when passthrough device is hot-removed from HVM domain.
When passthrough device is hot removed from HVM domain by "xm
pci-detach" command, following issues occur. The patch fixes them.
- Allocated memory is not deallocated.
- Unbind interrupt with invalid interrupt pin.
- MSI-X memory mapped register area is not unmapped.
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Keir Fraser [Wed, 16 Jul 2008 10:15:14 +0000 (11:15 +0100)]
vt-d: Disable VT-d table output on DMA page faults
Printing VT-d tables requires map_domain_page() which can not be
called from interrupt context (on x86_32).
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
Keir Fraser [Wed, 16 Jul 2008 10:13:21 +0000 (11:13 +0100)]
fs-backend: do not expose file descriptors to frontend
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Wed, 16 Jul 2008 10:12:36 +0000 (11:12 +0100)]
xend: Fix destruction of VMMetrics objects for managed domains
While plugging a xend memory lead (c/s 18030), I introduced a bug in
the case of managed domains. Managed domains continue to exist after
shutdown and thus should not have their associated VMMetrics object
destroyed until deleted.
The bug actually manifested by a new -> start -> shutdown -> delete
sequence of operations. Shutdown destroyed the VMMetrics object and
delete tried to do the same :-):
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Tue, 15 Jul 2008 17:00:13 +0000 (18:00 +0100)]
fs-backend: fix ioctl(BLKGETSIZE) call on 64bit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Tue, 15 Jul 2008 16:59:31 +0000 (17:59 +0100)]
fs-backend: Fix freelist implementation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Tue, 15 Jul 2008 16:58:39 +0000 (17:58 +0100)]
x86: Report TSC skew on boot at higher log level.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jul 2008 16:57:00 +0000 (17:57 +0100)]
x86: Ensure TSC calibration stats are same across all CPUs when
running with clocksource=tsc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jul 2008 16:56:25 +0000 (17:56 +0100)]
x86: No need to vcpu_update_system_time() on map_vcpu_info().
Also, ensure update_vcpu_system_time() triggers at least once for any
given vcpu, even if the TSC stamp is zero.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jul 2008 15:13:46 +0000 (16:13 +0100)]
xen: Small cleanups towards allowing stricter compile warnings.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 15 Jul 2008 14:36:50 +0000 (15:36 +0100)]
iommu: disable by default. 'iommu' on cmdline to enable.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jul 2008 14:03:58 +0000 (15:03 +0100)]
tools: Make functions static which should not be exported.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 15 Jul 2008 13:04:02 +0000 (14:04 +0100)]
x86: Add clocksource=tsc option.
This option should only be used on machines where TSC is known to be
synchronized across all processors. A future TODO is to dynamically
determine if this is the case.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jul 2008 12:36:22 +0000 (13:36 +0100)]
x86: platform-timer read function returns 64 bits.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jul 2008 12:19:26 +0000 (13:19 +0100)]
tools: Declare functions static where they should be, and provide
proper prototypes for others as required.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Mon, 14 Jul 2008 14:21:03 +0000 (15:21 +0100)]
stubdom: enable compilation/installation by default
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 14 Jul 2008 14:20:35 +0000 (15:20 +0100)]
vt-d: Disable VT-d if parsing ACPI DMAR fails
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
Keir Fraser [Mon, 14 Jul 2008 12:26:45 +0000 (13:26 +0100)]
xentop: declare signal handler as static
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Mon, 14 Jul 2008 12:13:39 +0000 (13:13 +0100)]
Revert 18025:
07c7aef164 -- go back to 8MB VRAM.
We may well want it in future anyway, and changing it makes
save/restore compatibility difficult.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 14 Jul 2008 09:43:32 +0000 (10:43 +0100)]
x86: PIT broadcast to fix local APIC timer stop issue for Deep C state
Local APIC timer may stop at deep C state (C3/C4...) entry. Initial
HPET broadcast working in legacy replacing mode, broke RTC intr, so
was bypassed. This patch add the logic that use platform timer (PIT)
to reenable local APIC timer at C state entry/exit.
Currently, only keep PIT enabled with 100Hz freq. The next step is
trying to dynamically enable/disable PIT while needed, and give it
lower freq.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 14 Jul 2008 09:12:07 +0000 (10:12 +0100)]
xm: vt-d: Add a command "xm pci-list-assignable-devices" to list all
the assignable devices.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 14 Jul 2008 09:11:39 +0000 (10:11 +0100)]
xend: vt-d: improved FLR logic for pass-thru PCI devices
1) If the device is PCIe endpoint and supports PCIe FLR, we use that;
else
2) if the device is PCIe endpoint, and all functions on the
device are assigned to the same guest, we use the immediate parent
bus's Secondary Bus Reset to reset all functions of the device (here,
actually we require all the functions of the device be assigned to the
same guest); else
3) if the device is PCI endpoint and is on a host bus
(e.g. integrated devices), and if the device supports PCI Advanced
Capabilities, we use that for FLR; else
4) we use the Secondary Bus Reset (if the PCI device is behind a
PCI/PCI-X bridge, then all devices behind the uppermost such PCI/PCI-X
bridge above this device must be co-assigned).
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 14 Jul 2008 09:10:14 +0000 (10:10 +0100)]
vt-d: Remove the FLR logic in Xen.
The current simple logic has some issues: 1) Dstate transition is not
guaranteed to properly clear the device state; 2) the current code for
PCIe FLR is actually buggy: PCI_EXP_DEVSTA_TRPND doesn't mean the
completion of FLR; according to the PCIe spec, after issuing FLR, we
should wait at least 100ms.
The improved FLR logic will be added into xend.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 14 Jul 2008 09:09:25 +0000 (10:09 +0100)]
xend: A small cleanup to the find_sysfs_mnt() of pci.py
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 14 Jul 2008 09:07:11 +0000 (10:07 +0100)]
ioemu: sdl without OpenGl fix
Signed-off-by: Frederic Guihery <sygus@cat-lan.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Mon, 14 Jul 2008 09:04:41 +0000 (10:04 +0100)]
Choice of network interface for establishing a bridge on if NFSROOT is used
This patch fixes a problem related to machines that are booted using
nfsroot ( '/' provided via nfs). Previously the code was assuming that
nfsroot would be provided via eth0. Now this additional code checks
over which interface the nfsroot is provided after detecting that
nfsroot is actually being used. To determine from where nfsroot is
mounted I am reading the kernel command line (/proc/cmdline) and
filter for an argument starting with 'nfsroot=' and determine the nfs
server's IP address by assuming the format 'nfsroot=<ip
adddress>:<path to root>' - if there's a better way of doing this,
please let me know. After that I determine the interface over which
this IP address would be accessed using 'ip route get <address>'. Then
I compare that interface against a previously determined default
interface and if they are equal return a value that causes an
alternative interface to be chosen.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Mon, 14 Jul 2008 09:03:09 +0000 (10:03 +0100)]
blktap: portability cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Mon, 14 Jul 2008 09:00:47 +0000 (10:00 +0100)]
stubdom: missing fixes for old gcc
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 11 Jul 2008 14:37:31 +0000 (15:37 +0100)]
stubdom: fixes for old gcc & binutils
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 11 Jul 2008 14:36:40 +0000 (15:36 +0100)]
blktap: cleanup
Make functions w/o a prototype static and remove redundant
declaration of xs_fire_next_watch().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Fri, 11 Jul 2008 14:35:50 +0000 (15:35 +0100)]
libxc: remove redundant declaration of xc_copy_to_domain_page().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>