Commit Graph
18622 Commits
Author SHA1 Message Date
Keir Fraser 39f97ffa29 x86, hvm: Hyper-V guest interface support with small set of enlightenments
A minimal implementation of the Viridian (Hyper-V) guest
interface. The only enlightenments advertised and supported are vAPIC
MSRs and long-spin-wait notifications. The set of enlightenments can
easily be extended in future, as they are found to provide a
performance win, and configured via an extended HVM_PARAM_VIRIDIAN hvm
parameter.

Signed-off-by: Peter Johnston <peter.johnston@citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-14 10:45:29 +01:00
Keir Fraser b525c05cf9 x86: propagate return value of alloc_l1_table()
A blatant mistake of mine resulted in the return value of
alloc_l1_table() to be ignored with the preemptable page table update
changes.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-10-13 13:15:20 +01:00
Keir Fraser 4f6b83015e vtd: move some x86-dependent functions into x86-specific directory.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-10-13 10:09:09 +01:00
Keir Fraser 7e3496ba25 xend: fixup the Secondary Bus Reset.
Use the read-modify-write operation.
Change the wrong 'I' to a correct 'H'.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-10-13 10:08:36 +01:00
Keir Fraser 3910a9a278 iommu: Cleanups to some header files.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-10-13 10:08:16 +01:00
Keir Fraser 7a05f7cc51 xenpm: Fix logic when Hyperthreading is enabled.
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2008-10-13 10:06:33 +01:00
Keir Fraser 27b182400b xend: Fix dev backend path construction.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-10-13 10:03:36 +01:00
Keir Fraser d0fedc8895 xend: Restore bridge control register after secondary bus reset
From: Chris Dalton <cid@hp.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-10 11:52:26 +01:00
Keir Fraser 05272715e2 Merge with IA64 tree 2008-10-10 10:18:06 +01:00
Keir Fraser 77dc7b3519 vmx: Update RIP past INT3 instruction on INT3 vmexit.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-10 10:11:34 +01:00
Keir Fraser 4f36452b63 vmx:update DR6 on TRAP_debug VM exits.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-10-10 10:06:49 +01:00
Keir Fraser a64e3fbcf1 vt-d: Fix dma_set_pte_superpage
Superpage bit is bit 7 in VT-d page table entry.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-10-10 10:04:58 +01:00
Keir Fraser de07008fdd xend: Fix the detection of the upmost bridge in the python function find_parent().
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-10-10 10:03:28 +01:00
Keir Fraser e07665a216 cpufreq: remove unused variable cpu_count.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-10 10:01:10 +01:00
Keir Fraser e981d8209a acpi/pmstat.c: refer to the array after range check.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-10 10:00:54 +01:00
Keir Fraser 6bb3a63089 [IA64] compile xenpm for ia64.
Now ia64 supports cpufreq, compile xenpm.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-10 10:00:21 +01:00
Isaku Yamahata 71c2db7e6e merge with xen-unstable.hg 2008-10-10 12:06:46 +09:00
Isaku Yamahata 005afacdb7 [IA64] introduce iosapci ID.
introduce iosapci ID, which is used to index DMA engine covering this iosapic.

Signed-off-by; Anthony Xu <anthony.xu@intel.com>
2008-10-10 11:58:03 +09:00
Isaku Yamahata f5ecb7dd8e [IA64] Add pci configuration code, which is needed by VTD.
Signed-off-by; Anthony Xu <anthony.xu@intel.com>
2008-10-10 11:57:23 +09:00
Isaku Yamahata b2bc2fe96d Add pci configuration code, which is needed by VTD
Signed-off-by; Anthony Xu <anthony.xu@intel.com>
2008-10-10 11:47:07 +09:00
Isaku Yamahata 5c3eae6254 [IA64] implement ia64 cpufreq notify hypercall
This patch implement the ia64 cpufreq hypercall to get dom0 cpufreq ACPI info.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
2008-10-10 11:17:24 +09:00
Isaku Yamahata ce2efa2d44 [IA64] Add cpufreq ia64 driver
For IA64 Platform, add cpufreq driver for ia64 cpu, implementing
cpufreq_driver->init()/ exit()/ verify()/ target()/ get()

Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2008-10-10 11:17:24 +09:00
Keir Fraser 3fddebffd7 hvmloader: smbios support for large memory guests
This reports more than one memory device if the memory for the guest
is larger than 16G.

Signed-off-by: Bill Rieske <brieske@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-09 17:18:11 +01:00
Keir Fraser b79e6e11f8 vtd: Make some pci access functions architecture independent.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-10-09 12:47:31 +01:00
Keir Fraser aa2c2fc508 Rename evtchn_lock to event_lock, since it protects more than just
event-channel state now.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-09 11:17:51 +01:00
Keir Fraser cdb9a3d559 Fix lock issue for hvm pass-through domain
This patch protect the hvm_irq_dpci structure with evtchn_lock, thus
the access to domain's pirq_vector mapping is also protected.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2008-10-09 11:14:52 +01:00
Keir Fraser 7ae8a1e482 vt-d: Define a struct IO_xAPIC_route_entry to accommodate both ioapic
and iosapic.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-10-09 11:08:13 +01:00
Keir Fraser 6de3c93f7f xenpm: Fix typo bug.
From: Guanqun Lu <guanqun.lu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-09 10:16:49 +01:00
Keir Fraser 4ec4b58e00 x86/mm: Use l1e_get_pfn() in destroy_grant_pte_mapping().
On x86_64 system, (pte >> PAGE_SHIFT) is not always equal to page
frame number because high bits (63:52) of pte may be used as
flags. This patch corrects the conversion and errors as below
disappear when applied.
    (XEN) mm.c:3074:d0 PTE entry 200000a2ec6167 for address a1f09958
    doesn't match frame a2ec6

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-10-09 10:15:30 +01:00
Keir Fraser 7c72e3bf4c xend: Fix typo _gatherDom -> gatherDom.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-10-09 10:06:50 +01:00
Keir Fraser c22f6e2d2f Allow to specify Linux kernel config file
The env variable XEN_LINUX_CONFIG is used to specify this
file.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-10-09 10:05:41 +01:00
Keir Fraser 61bb8abf73 x86: Remove bogus assertion from free_domain_pirqs().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-08 14:00:58 +01:00
Keir Fraser db2fae01e7 x86: Define __per_cpu_shift label to help kdump/crashdump.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-08 13:11:06 +01:00
Keir Fraser 980d6c2925 x86: Continue to allocate vectors across LAPIC priority levels, since
it's easy to do. It's not really necessary for modern non-buggy APICs
though.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-08 11:59:01 +01:00
Keir Fraser 7aae95e2ee x86: Free MSI vector when a pirq is unmapped.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-08 11:51:39 +01:00
Keir Fraser f1c40110f2 x86: Move pirq logic to irq.c.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-08 10:48:48 +01:00
Keir Fraser 8c755b0a98 flask: Fix a problem in xend code when starting a guest with XSM/Flask enabled.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-10-08 10:03:47 +01:00
Keir Fraser 913481379c flask: Add 2 permissions to the default flask policy to get a VIF-enabled guest to work
This adds two more permissions to the default Flask policy to get a VM
with a network interface to work.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-10-08 10:03:09 +01:00
Keir Fraser 4208b9286f flask: Fix to default policy to get simple VM running
This fix gets to the default Flask/XSM policy gets a simple guest VM
(Ramdisk only, no VIF) running.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-10-08 10:02:27 +01:00
Keir Fraser 688581c472 pygrub: fix the parameter default' and timeout' in elilo.conf
This patch fixes two issues related to the parameter `default' and
`timeout' in elilo.conf:

- LiloConf.py cannot interpret the parameter `default' and
  `timeout'. The first kernel always boot up even if the second kernel
  is specified by `default'. And `timeout' is ignored.

  This issue is introduced by cset 15953:70bb28b62ffb.

- If two kernels or more are installed, the last kernel cannot boot
  up even if it is specified by `default'.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2008-10-03 09:42:11 +01:00
Keir Fraser ac4148f219 xend: Allow guest write access to /local/domain/x/memory
Required for xenballoond, and tools do not need to trust any values
written in that subdirectory.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-03 09:37:35 +01:00
Isaku Yamahata 8b44bc08a3 [IA64] libxc: make xc_ia64_copy_memmap use DOM0VP_get_memmap.
Guest domain's memory map may be updated concurrently so that
it is protected sequence lock.
This patch makes xc_ia64_copy_memmap() use DOM0VP_get_memmap
hypercall to avoid the race.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-03 12:50:28 +09:00
Isaku Yamahata 899c7cca73 [IA64] introduce DOM0VP_get_memmap hypercall.
introduce new dom0vp hypercall, DOM0VP_get_memmap,
to get memmap of a given domain without race.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-03 12:49:55 +09:00
Isaku Yamahata f4e08cbb4d [IA64] fix XENMEM_add_to_physmap with XENMAPSPACE_mfn.
This patch fixes HVM domain save/restore.
Tools stack is aware of where memory is populated in guest domain.
But XENMEM_add_to_physmap with XENMAPSPACE_mfn doesn't update
the information related to guest memory map. So guest domain
save/dump-core fails to dump pages which were added by the hypercall.

This patch makes the hypercall update the memory map information
of a given guest domain.
This introduces the race between writers and readers of
the info. Later a new hypercall will be introduced to get memmap
from the guest with lock which prevents this race.
Even if the tools stack can get the memmap by foreign
domain page mapping, it should get memmap by the
newly added hypercall which will be added later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-03 12:49:04 +09:00
Isaku Yamahata 369b07383b [IA64] make use of rcu_lock_target_domain_by_id()
reduce code duplication by using rcu_lock_target_domain_by_id()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-03 12:24:49 +09:00
Isaku Yamahata bd549c3d00 merge with xen-unstable.hg 2008-10-03 11:49:07 +09:00
Keir Fraser 4b52a38711 libblktap: Remove trailing null byte in xs_printf
xs_printf writes the terminating null byte of the passed string to
Xenstore. When reading, the null byte is returned in the following
form which confuses tools:

sector-size = "512\000"

This patch removes the null byte from the data to write.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-10-02 12:56:55 +01:00
Keir Fraser 4a93b11b67 Eliminate code duplication with rcu_lock_domain_by_id().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-02 11:39:36 +01:00
Keir Fraser 668349f38b xc_ptrace: Allow gdbserver to connect to a guest before APs are
brought online.

Signed-off-by: Kip Macy <kmacy@freebsd.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-02 11:32:08 +01:00
Keir Fraser eeed0ffe27 xend: Make only selected subdirs of /local/domain/<domid> writable by the guest.
This protects critical data like
/local/domain/<domid>/console/{tty,limit}. It also means we can trust
.../vm, and hence do not need /vm_path. Various parts of the previous
two changesets disappear.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-02 10:37:28 +01:00