Commit Graph
18586 Commits
Author SHA1 Message Date
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
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
Keir Fraser 8fe9e65cb4 xend: Fixes after backend xenstore config changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-01 14:07:17 +01:00
Keir Fraser e9f884ceda xend: Move some backend configuration info.
This patch moves some dom0 variables and backend device
configuration from frontend directories to
/local/domain/<backdomid>/backend or /vm.

Also,
- /vm_path/<domid> is introduced, referencing the /vm path
- /vm_path/device/backend holds the backend device location,
  rather than storing it in the frontend directory

Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-01 13:35:39 +01:00
Keir Fraser e62e563483 [IA64] Compilation fix to cpufreq stuff.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-01 09:31:13 +01:00
Keir Fraser ca2eee92df x86, hvm: Expose host core/HT topology to HVM guests.
Based on an initial patch by Nitin Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-30 10:14:54 +01:00
Keir Fraser 3321e0ef95 hvm: Remove extboot from virtual firmware.
Device model is not present in external qemu repository, and
functionality was never exposed through the toolstack.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-29 15:45:38 +01:00
Keir Fraser 73f43ceca7 xc_save: use correct size when unmapping live p2m.
Otherwise we unmap a larger region than was mapped when saving 32 bit
guest from 64 bit tools, leading to badness.

The equivalent change was made to the restore code in
18329:ca7dd77d5365

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2008-09-29 11:00:29 +01:00
Keir Fraser 4b2d30ac85 domctl: Fix the wrong return values when xsm_xxx() returns 0
In 18423: 44f039c4aee4,  if xsm_xxx() returns 0, there are some places
where the return value would be incorrect. The patch fixes them.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-09-29 09:43:05 +01:00
Keir Fraser 1e93853893 Fix 32pae build: ld -> PRI64.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2008-09-28 16:53:14 +01:00
Keir Fraser 91e717495c CPUIDLE: Initialize timer broadcast mechanism for C2
Without this patch, while running on platforms on which the deepest
C-state is C2, acpi_processor_idle fns will call into NULL
function. This has been the case since 18518:e61c7833dc9d8.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-09-26 17:12:56 +01:00
Keir Fraser 3ff1f0088a hvm: Default timer_mode=1 (do not delay virtual time for missed
ticks). Most guests prefer this mode compared with screwing with
progress of virtual time.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-26 17:09:36 +01:00
Keir Fraser 030c78ac14 x86 shadow: Add FreeBSD mappings guest heuristics.
This patch adds FreeBSD mappings heuristics to allow faster page
promotion.

Also, remove code for unsync va heuristic, not needed anymore.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-09-26 15:33:51 +01:00
Keir Fraser 452119c094 x86 and ia64: move cpufreq notify code to commone place
This patch move the cpufreq notify code from x86 specfic place to
common place, since it can be used by both x86 and ia64 cpufreq
driver.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
2008-09-26 14:05:41 +01:00
Keir Fraser c06a7db0c5 X86 and IA64: Update cpufreq statistic logic for supporting both x86
and ia64

Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2008-09-26 14:05:09 +01:00
Keir Fraser 6b4ce8b388 X86 and IA64: Rebase cpufreq logic for supporting both x86 and ia64
arch

Rebase cpufreq logic for supporting both x86 and ia64 arch:
1. move cpufreq arch-independent logic into common dir
(xen/drivers/acpi
and xen/drivers/cpufreq dir);
2. leave cpufreq x86-dependent logic at xen/arch/x86/acpi/cpufreq dir;

Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2008-09-26 14:04:38 +01:00
Keir Fraser 77fd4d4b32 vtd: Fix check for interrupt remapping of ioapic RTE
For IOAPIC interrupt remapping, it only needs to remap ioapci RTE,
should not remap other IOAPIC registers, which are IOAPIC ID, VERSION
and Arbitration ID. This patch adds the check for this and only remap
ioapci RTE.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-26 11:12:29 +01:00
Keir Fraser b7c984f217 x86, hvm: Remove warning on emulated write to read-only page.
The bugs in this area seem to have been fixed now, and gPXE makes
legitimate best-effort attempts to modify its embedded static data.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-25 17:41:29 +01:00
Keir Fraser 6a2722c675 x86: Clean up and fix 18539:31f09a5e24cf8
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-25 14:37:52 +01:00
Keir Fraser 0ae658ea9f xm: Fix xm start -c / --vncviewer
In xm start the --vncviewer option has no effect, instead -c tries to
both connect to the console and start vncviewer. Additionally, to
start vncviewer it uses the domid variable which is only defined a few
lines later. Thus xm start -c doesn't work at all.

This patch fixes both problems.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-09-25 13:07:43 +01:00
Keir Fraser 270fdae556 hvm firmware: Replace etherboot with modern gPXE ROMs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-25 12:09:10 +01:00
Keir Fraser 933c704332 x86: Fix guest_physmap_add_entry checks
guest_physmap_add_entry() checks to see if the given mfn and gpfn
range in the p2m and m2p tables is already mapped before overwriting
the maps, and attempts to do something reasonable so that we don't
have any "dangling" pointers.

Unfortunately, these checks got broken when the page_order argument
was added.  Each individual p2m and m2p entry needs to be checked, not
just the first page in a page order.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2008-09-25 10:26:08 +01:00
Keir Fraser 876bb8d639 x86: Add xenpm utility to list CPU power info.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-25 10:21:40 +01:00
Keir Fraser 391c70529c x86 pmstat: Fix get_pm_info hypercall argument checking.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-25 10:12:17 +01:00
Keir Fraser 944e533ffb x2apic: Clean up send_IPI_mask_x2apic() and add a memory barrier.
The barrier is required to prevent the WRMSR from executing before the
processor has written synchronising data to be received by remote
CPUs.

At the same time remove needless wmb() from on_selected_cpus(). We now
assume send_IPI_mask() is a sufficient compiler and CPU memory
barrier.

Original patch by Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-25 10:03:04 +01:00
Keir Fraser 7ac3a03d8b Fix direct use of 'make' -> $(MAKE)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-09-24 12:47:33 +01:00
Keir Fraser bf89912fc4 x86: Properly synchronise updates to pirq-to-vector mapping.
Per-domain irq mappings are now protected by d->evtchn_lock and by the
per-vector irq_desc lock.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-24 12:36:55 +01:00
Keir Fraser cd5e866be5 x86: change _PAGE_GNTTAB
Since Linux started to use one of the 3 low available bits, _PAGE_IO
needed to be moved to a different one. Not remembering about
_PAGE_GNTTAB in debug hypervisors, I ended up assigning it to the same
bit, which made the kernel fail on the debug hypervisor. However,
rather than fixing the kernel it seems more appropriate for the
hypervisor to stay away from these bits, not the least because its
definition was anyway accompanied by a warning that this may be
incompatible with certain OSes.

While obviously the hypervisor has to use some bit (and it's therefore
unavoidable that there's some risk of collision), using one of the
high available bits seems to be the better choice over using one of
the three low ones. Since in 32-bit mode these bits are reserved, the
patch disables the functionality here. The only reasonable alternative
I would see is to disable the functionality by default, but add a
command line option to specify which bit to use.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-24 10:23:51 +01:00
Keir Fraser 6260fc6e0f x86/PCI-MSI: fix log messages
XENLOG_G_* should not be used in invocations of gdprintk().

Also change the wording in a few places and consistently print the
target domain. It remains questionable whether the code should be this
verbose in the first place, especially now that MSI is on by default.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-09-24 10:20:49 +01:00
Keir Fraser f43f4f1d28 ia64: fix make install under tools/debugger/xenitp
This patch fixes the following error with make install under
the directory, tools/debugger/xenitp by checking whether
the variable is length zero string.

> # make install
> ../../../tools/cross-install -d -m0755 -p //usr/bin
> [ -z " xenitp" ] || ../../../tools/cross-install -d -m0755 -p
> //usr/lib/xen/bin
> ../../../tools/cross-install -d -m0755 -p //usr/share/man/man1
> ../../../tools/cross-install -d -m0755 -p //usr/share/man/man8
> ../../../tools/cross-install -m0755 -p   //usr/bin
> install: too few arguments
> Try `install --help' for more information.
> make: *** [install] Error 1

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-09-24 10:19:07 +01:00