Ian Campbell [Wed, 17 Oct 2012 15:43:46 +0000 (16:43 +0100)]
xen: arm: implement XENMEM_add_to_physmap_range
This allows for foreign mappings as well as batching, fitting all that
into XENMEM_add_to_physmap wasn't possible.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Jan Beulich [Wed, 17 Oct 2012 12:13:20 +0000 (14:13 +0200)]
x86/HPET: obtain proper lock for changing IRQ affinity
The IRQ descriptor lock should be held while adjusting the affinity of
any IRQ; the HPET channel lock isn't sufficient to protect namely
against races with moving the IRQ to a different CPU.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Huang Ying [Wed, 17 Oct 2012 12:12:06 +0000 (14:12 +0200)]
ACPI/APEI: fix ERST MOVE_DATA instruction implementation
The src_base and dst_base fields in apei_exec_context are physical
address, so they should be ioremaped before being used in ERST
MOVE_DATA instruction.
Reported-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Replace use of ioremap() by __acpi_map_table()/set_fixmap(). Fix error
handling.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
Jan Beulich [Wed, 17 Oct 2012 09:23:10 +0000 (11:23 +0200)]
x86/oprof: adjust off-by-one counter range checks
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Huang Ying [Tue, 16 Oct 2012 15:26:36 +0000 (17:26 +0200)]
ACPI: fix APEI related table size checking
On Huang Ying's machine:
erst_tab->header_length == sizeof(struct acpi_table_einj)
but Yinghai reported that on his machine,
erst_tab->header_length == sizeof(struct acpi_table_einj) -
sizeof(struct acpi_table_header)
To make erst table size checking code works on all systems, both
testing are treated as PASS.
Same situation applies to einj_tab->header_length, so corresponding
table size checking is changed in similar way too.
Originally-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Huang Ying <ying.huang@intel.com>
- use switch() for better readability
- add comment explaining why a formally invalid size it also being
accepted
- check erst_tab->header.length before even looking at
erst_tab->header_length
- prefer sizeof(*erst_tab) over sizeof(struct acpi_table_erst)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
Daniel De Graaf [Mon, 15 Oct 2012 15:51:44 +0000 (16:51 +0100)]
xen: Add versions of rcu_lock_*_domain without IS_PRIV
These functions will be used to avoid duplication of IS_PRIV calls
that will be introduced in XSM hooks. This also fixes a build error
with XSM enabled introduced by 25925:
d1c3375c3f11 which depends on
this patch.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Jan Beulich [Mon, 15 Oct 2012 15:41:39 +0000 (17:41 +0200)]
IOMMU: remove vendor specific bits from generic code
- names of functions used independent of vendor should not have vendor
specific names
- vendor specific declarations should not live inn generic headers
- other vendor specific items should not be used in generic code
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Mon, 15 Oct 2012 15:39:32 +0000 (17:39 +0200)]
VT-d: drop bogus checks
There were a number of cases where an "iommu" retrieved got passed to
another function before being NULL-checked. While this by itself was
not a problem as the called function did the checks, it is confusing to
the reader and redundant in several cases (particularly with NULL-
checking the return value of iommu_ir_ctrl()). Drop the redundant
checks (also ones where the sole caller of a function did the checking
already), and at once make the three similar functions proper inline
instead of extern ones (they were prototyped in the wrong header file
anyway, so would have needed touching sooner or later).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Keir Fraser [Mon, 15 Oct 2012 15:38:11 +0000 (16:38 +0100)]
More efficient TLB-flush filtering in alloc_heap_pages().
Rather than per-cpu filtering for every page in a super-page
allocation, simply remember the most recent TLB timestamp across all
allocated pages, and filter on that, just once, at the end of the
function.
For large-CPU systems, doing 2MB allocations during domain creation,
this cuts down the domain creation time *massively*.
TODO: It may make sense to move the filtering out into some callers,
such as memory.c:populate_physmap() and
memory.c:increase_reservation(), so that the filtering can be moved
outside their loops, too.
Signed-off-by: Keir Fraser <keir@xen.org>
Jacob Shin [Mon, 15 Oct 2012 13:04:51 +0000 (15:04 +0200)]
x86/xenoprof: fix kernel/user mode detection for HVM
While trying oprofile under Xen, I noticed that HVM passive domain's
kernel addresses were showing up as user application. It turns out
under HVM get_cpu_user_regs()->cs contains 0x0000beef.
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Don't cast away const-ness. Use SS instead of CS to determine ring.
Special-case real and protected mode.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
Wei Wang [Mon, 15 Oct 2012 13:03:36 +0000 (15:03 +0200)]
x86/amd: Fix xen_apic_write warnings in Dom0
[ 0.020294] ------------[ cut here ]------------
[ 0.020311] WARNING: at arch/x86/xen/enlighten.c:730
xen_apic_write+0x15/0x17()
[ 0.020318] Hardware name: empty
[ 0.020323] Modules linked in:
[ 0.020334] Pid: 1, comm: swapper/0 Not tainted 3.3.8 #7
[ 0.020340] Call Trace:
[ 0.020354] [<
ffffffff81050379>] warn_slowpath_common+0x80/0x98
[ 0.020369] [<
ffffffff810503a6>] warn_slowpath_null+0x15/0x17
[ 0.020378] [<
ffffffff810034df>] xen_apic_write+0x15/0x17
[ 0.020392] [<
ffffffff8101cb2b>] perf_events_lapic_init+0x2e/0x30
[ 0.020410] [<
ffffffff81ee4dd0>] init_hw_perf_events+0x250/0x407
[ 0.020419] [<
ffffffff81ee4b80>] ? check_bugs+0x2d/0x2d
[ 0.020430] [<
ffffffff81002181>] do_one_initcall+0x7a/0x131
[ 0.020444] [<
ffffffff81edbbf9>] kernel_init+0x91/0x15d
[ 0.020456] [<
ffffffff817caaa4>] kernel_thread_helper+0x4/0x10
[ 0.020471] [<
ffffffff817c347c>] ? retint_restore_args+0x5/0x6
[ 0.020481] [<
ffffffff817caaa0>] ? gs_change+0x13/0x13
[ 0.020500] ---[ end trace
a7919e7f17c0a725 ]---
Kernel function check_hw_exists() writes 0xabcd to msr 0xc0010201 (Performance Event
Counter 0) and read it again to check if it is running as dom0. Early amd cpus does
not reset perf counters during warm reboot. If the kernel is booted with bare metal
and then as a dom0, the content of msr 0xc0010201 will stay and the checking will
pass and PMU will be enabled unexpectedly.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Don't reset the counters when used for the NMI watchdog.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
Jan Beulich [Mon, 15 Oct 2012 10:59:14 +0000 (12:59 +0200)]
AMD IOMMU: fix find_iommu_from_bdf_cap()
The arguments passed for the "cap_offset" parameter get read from 16-
bit fields, so the parameter should also have (at least) 16 bits.
While fixing this I also noticed that this was yet another case where
PCI segment information wasn't properly propagated, so a respective
first parameter gets added to the function at once.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Wang <wei.wang2@amd.com>
Ian Campbell [Thu, 11 Oct 2012 14:57:00 +0000 (15:57 +0100)]
arm: mark heap and frametable limits as read mostly
These are used in virt_to_page and page_to_virt so I imagine there's
some small benefit to this (but I've not measured)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 11 Oct 2012 14:56:59 +0000 (15:56 +0100)]
arm: print a message if multiple banks of memory are present.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 11 Oct 2012 14:56:59 +0000 (15:56 +0100)]
arm: really allocate boot frametable pages with 32M alignment
This argument to alloc_boot_pages is "pfn_align" and not an order.
We've been lucky until now that the area given to the boot allocator
happened to be properly aligned and this allocation was early enough
to benefit.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 11 Oct 2012 14:56:58 +0000 (15:56 +0100)]
arm: move get_paddr_function to arch setup.c from device_tree.c
It's not realy got any DT functionality in it and its only caller is
setup_pagetables.
Put it here because future patches want to incorporate of the module
layout in memory and I'd like to confine that to setup.c
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 11 Oct 2012 14:56:57 +0000 (15:56 +0100)]
arm: make virtual address defines unsigned
avoids confusion due to overflow etc.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 11 Oct 2012 14:56:56 +0000 (15:56 +0100)]
arm: Zero the BSS at start of day.
Avoids surprises e.g. when loading via the boot-wrapper.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Sander Eikelenboom [Thu, 11 Oct 2012 10:52:10 +0000 (11:52 +0100)]
init/sysconfig scripts: Remove --halt/-H option for shutdown command.
The --halt/-H option for the shutdown command is now pointless,
since linux in a guest treats "halt" and "poweroff" identically.
The option is not implemented in xl / libxl and if supplied causes the command
to fail , so remove it from the init and sysconfig scripts.
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Sander Eikelenboom [Thu, 11 Oct 2012 10:52:09 +0000 (11:52 +0100)]
xl/libxl: make shutdown accept the long option --wait for -w
Make xl/libxl accept the long option --wait for -w to be compatible with xm.
The long options are used in the default init and sysconfig scripts.
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Sander Eikelenboom [Thu, 11 Oct 2012 09:21:16 +0000 (10:21 +0100)]
init scripts: xendomains correct order of options for shutdown command
Options for the shutdown command that are supplied behind the domain id are
ignored. In case of the default xendomains init script this means that it will
not wait for the domains to be actually shutdown.
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Thu, 11 Oct 2012 09:21:15 +0000 (10:21 +0100)]
stubdom: fix error assignment in grub:load_module
[ 1333s] mini-os.c: In function 'load_module':
[ 1333s] mini-os.c:244: warning: statement with no effect
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Jackson [Tue, 9 Oct 2012 17:00:00 +0000 (18:00 +0100)]
docs, build: Do not ignore install-docs errors
In the toplevel Makefile "install-docs" (depended on by "install" and
hence "dist"), but not "build", ignores errors.
This was inherited from before 24563:
4271634e4c86, prior to which the
||true seems intended to handle failures of check_pkgs. Nowadays we
handle docs tools individually in the docs makefiles so there is no
need for this ||true here.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Jackson [Tue, 9 Oct 2012 16:59:59 +0000 (17:59 +0100)]
docs, build: Tolerate missing pod2text
We gate the whole of the "txt" target on pod2text. I think this is
better than gating only the pod-generated outputs; it avoids a partial
output tree.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Jackson [Tue, 9 Oct 2012 16:59:58 +0000 (17:59 +0100)]
docs, build: Tolerate missing fig2dev
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Tue, 9 Oct 2012 14:05:40 +0000 (15:05 +0100)]
arm: Use per-CPU irq_desc for PPIs and SGIs
The first 32 interrupts on a GIC are the Peripheral Private Interrupts
and Software-Generated Interrupts and are local to each processor.
The irq_desc cannot be shared since we use irq_desc->status to track
whether the IRQ is in-progress etc. Therefore give each processor its
own local irq_desc for each of these interupts.
We must also route them on each CPU, so do so.
This feels like a bit of a layering violation (since the core ARM
irq.c now knows about thinkgs wich are really gic.c business)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Tue, 9 Oct 2012 14:05:39 +0000 (15:05 +0100)]
arm/vtimer: convert result to ticks when reading CNTPCT register
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Tue, 9 Oct 2012 14:05:38 +0000 (15:05 +0100)]
arm: don't bother setting up vtimer, vgic etc on idle CPUs
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Stefano Stabellini [Tue, 9 Oct 2012 14:05:38 +0000 (15:05 +0100)]
xen/arm: introduce __lshrdi3 and __aeabi_llsr
Taken from Linux.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Stefano Stabellini [Tue, 9 Oct 2012 14:05:37 +0000 (15:05 +0100)]
xen/arm: protect LR registers and lr_mask changes with spin_lock_irq
GICH_LR registers and lr_mask need to be kept in sync: make sure that
their modifications are protected by spin_lock_irq(&gic.lock).
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Tue, 9 Oct 2012 14:05:36 +0000 (15:05 +0100)]
arm: disable distributor delivery on boot CPU only
The secondary processors do not call enter_hyp_mode until the boot CPU
has brought most of the system up, including enabling delivery via the
distributor. This means that bringing up secondary CPUs unexpectedly
disables the GICD again, meaning we get no further interrupts on any
CPU.
For completeness also disable the GICC (CPU interface) on all CPUs
too.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Stefano Stabellini [Tue, 9 Oct 2012 14:05:35 +0000 (15:05 +0100)]
libxc/arm: allocate xenstore and console pages
Allocate two additional pages at the end of the guest physical memory
for xenstore and console.
Set HVM_PARAM_STORE_PFN and HVM_PARAM_CONSOLE_PFN to the corresponding
values.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- pass correct p2m array to populate physmap in
alloc_magic_pages
]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Tue, 9 Oct 2012 14:05:34 +0000 (15:05 +0100)]
arm: kill a guest which uses hvc with an immediate operand != XEN_HYPERCALL_TAG
At best these guests are confused/broken and at worse they are malicious. In
any case we don't know that they are expecting to handle a -errno style error.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Stefano Stabellini [Tue, 9 Oct 2012 14:05:34 +0000 (15:05 +0100)]
xen/arm: create_p2m_entries should not call free_domheap_page
The guest is entitled to leak a page from its p2m (by overwriting it) if
it wants to. Since the memory is effectively lost to it (can't even be
recovered by XENMEM increase reservation etc).
In these cases we shouldn't call free_domheap_page to free the existing
page from create_p2m_entries, because it resets the reference counting
but the page is still allocated to the guest (even if not in the p2m
anymore) and common grant_table code is also going to call put_page on
it.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Stefano Stabellini [Tue, 9 Oct 2012 14:05:33 +0000 (15:05 +0100)]
xen/arm: implement get/put_page_type
Add a basic get_page_type and put_page_type implementation: we don't
care about typecounts so just return success.
Also remove PGT_shared_page, that is unused.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Stefano Stabellini [Tue, 9 Oct 2012 14:05:32 +0000 (15:05 +0100)]
xen/arm: implement page reference and gnttab functions needed by grant_table.c
The implementation is strongly "inspired" by their x86 counterparts,
except that we assume paging_mode_external and paging_mode_translate.
TODO: read_only mappings and gnttab_mark_dirty.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Tue, 9 Oct 2012 14:05:31 +0000 (15:05 +0100)]
arm: implement VGCF_online
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Tue, 9 Oct 2012 14:05:30 +0000 (15:05 +0100)]
libxc: add ARM support to xc_dom (PV domain building)
Includes ARM zImage support.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Christoph Egger [Tue, 9 Oct 2012 11:51:37 +0000 (12:51 +0100)]
Implement page offline recovery action for AMD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
David Vrabel [Tue, 9 Oct 2012 11:46:27 +0000 (12:46 +0100)]
trace: rename trace_hypercall() to __trace_hypercall_entry()
Tracing functions that don't check tb_init_done are (by convention)
prefixed with __.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Andrew Cooper [Tue, 9 Oct 2012 11:41:46 +0000 (12:41 +0100)]
build: Fix build when using -fno-inline
struct task_slice.migrated is not initialised by this function, and
subsequently returned by value, leading to the error:
sched_sedf.c: In function ‘sedf_do_extra_schedule’:
sched_sedf.c:711: error: ‘ret.migrated’ may be used uninitialised in
this function
for both gcc 4.1.2 and 4.4.3 (which are the two I have easily to hand)
when combined with the -fno-inline compile option.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Anthony PERARD [Tue, 9 Oct 2012 10:08:21 +0000 (11:08 +0100)]
libxl: Fix cd-insert with qemu-xen.
If qemu-xen is used as a device model, the command to insert, change or eject a
cdrom will go through QMP. XenStore is still updated even if QEMU will not read
from it.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Tue, 9 Oct 2012 10:08:20 +0000 (11:08 +0100)]
libxl_dm: Set an id to cdrom drives with qemuu.
In order to eject and change a cdrom when using qemu-xen, this patch adds an id
the cdrom driver when starting the device model.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Tue, 9 Oct 2012 10:08:19 +0000 (11:08 +0100)]
libxl_qmp: Introduce libxl__qmp_insert_cdrom.
This function can eject or change the CDROM for a guest that use qemu-xen as a
device-model.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Tue, 9 Oct 2012 09:39:09 +0000 (10:39 +0100)]
minios: add select definition to sys/time.h when HAVE_LIBC is defined
This patch adds the select function to sys/time.h when HAVE_LIBC is
defined, which is according to standard (see the select() manpage).
It also removes a redudant lwip include from posix/sys/select.h.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Tue, 9 Oct 2012 09:39:08 +0000 (10:39 +0100)]
minios: add posix io for blkfront
This patch adds posix io support (read,write,lseek) to block devices
using blkfront.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Tue, 9 Oct 2012 08:18:42 +0000 (09:18 +0100)]
pygrub: correct typo in --args assignment
If pygrub was called with --args="some thing", then this string should
be append to the kernel command line. But the last changeset
25941:
795c493fe561 contained a typo, it assigns 'args' instead of 'arg'.
Rename the local variable which holds the string from the domain config
file to avoid further confusion.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Mon, 8 Oct 2012 13:36:31 +0000 (14:36 +0100)]
minios: setup fpu and sse in mini-os
This patch adds floating point and sse support to mini-os by
initializing the floating point unit and the see unit during
domain boot up.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Mon, 8 Oct 2012 13:36:31 +0000 (14:36 +0100)]
minios: add CONFIG_XC conditional
This patch adds a CONFIG_XC option to mini-os, to allow conditional
support for libxc for mini-os domains.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Mon, 8 Oct 2012 13:36:30 +0000 (14:36 +0100)]
minios: Disable the mfn_is_ram() check, it doesn't work correctly on all systems
This patch disables the mfn_is_ram check in mini-os. The current check
is insufficient and fails on some systems with larger than 4gb memory.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Mon, 8 Oct 2012 13:36:29 +0000 (14:36 +0100)]
minios: Add endian, byteswap, and wordsize macros to mini-os
This patch addes byte swapping macros and endian support to mini-os.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Mon, 8 Oct 2012 13:36:28 +0000 (14:36 +0100)]
minios: Add ioread/iowrite functions to mini-os
This patch adds iowritexx() and ioreadxx() functions for interacting
with hardware memory to mini-os. The functions are available in a header
iorw.h
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 8 Oct 2012 11:18:35 +0000 (12:18 +0100)]
tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT
Upcoming changes may move DOCDIR from Config.mk to config/Tools.mk. To
preserve the currently used path, which ends with /xen, specify a value
for PACKAGE_TARNAME. Without this change the path would end with
/xen-hypervisor.
Please rerun autoconf after applying this.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 8 Oct 2012 11:18:34 +0000 (12:18 +0100)]
stubdom: fix parallel build by expanding CROSS_MAKE
Recently I changed my rpm xen.spec file from doing
'make -C tools -j N && make stubdom' to 'make -j N stubdom' because
stubdom depends on tools, so both get built.
The result was the failure below.
....
mkdir -p grub-x86_64
CPPFLAGS="-isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/posix -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../tools/xenstore -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/x86 -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/posix -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib64/gcc/x86_64-suse-linux/4.7/include -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/lwip-x86_64/src/include -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/lwip-x86_64/src/include/ipv4 -I/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/include -I/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../xen/include" CFLAGS="-mno-red-zone -O1 -fno-omit-frame-pointer -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -fno-stack-protector -fno-exceptions" make DESTDIR= -C grub OBJ_DIR=/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/grub-x86_64
make[2]: Entering directory `/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/grub'
make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
make[2]: *** INTERNAL: readdir: Bad file descriptor
. Stop.
make[2]: Makefile: Field 'stem' not cached: Makefile
make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/grub'
make[1]: *** [grub] Error 2
[ -d mini-os-x86_64-xenstore ] || \
for i in $(cd /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os ; find . -type d) ; do \
mkdir -p mini-os-x86_64-xenstore/$i ; \
done
....
Expanding every occurrence of CROSS_MAKE avoids this error. It also has
the nice side effect of actually enabling parallel build for stubdom.
According to the GNU make documentation $(MAKE) gets its special meaning
only if it appears directly in the recipe:
http://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 8 Oct 2012 11:18:33 +0000 (12:18 +0100)]
xend/pvscsi: update sysfs parser for Linux 3.0
The sysfs parser for /sys/bus/scsi/devices understands only the layout
of kernel version 2.6.16. This looks as follows:
/sys/bus/scsi/devices/1:0:0:0/block:sda is a symlink to /sys/block/sda/
/sys/bus/scsi/devices/1:0:0:0/scsi_generic:sg1 is a symlink to /sys/class/scsi_generic/sg1
Both directories contain a 'dev' file with the major:minor information.
This patch updates the used regex strings to match also the colon to
make it more robust against possible future changes.
In kernel version 3.0 the layout changed:
/sys/bus/scsi/devices/ contains now additional symlinks to directories
such as host1 and target1:0:0. This patch ignores these as they do not
point to the desired scsi devices. They just clutter the devices array.
The directory layout in '1:0:0:0' changed as well, the 'type:name'
notation was replaced with 'type/name' directories:
/sys/bus/scsi/devices/1:0:0:0/block/sda/
/sys/bus/scsi/devices/1:0:0:0/scsi_generic/sg1/
Both directories contain a 'dev' file with the major:minor information.
This patch adds additional code to walk the subdir to find the 'dev'
file to make sure the given subdirectory is really the kernel name.
In addition this patch makes sure devname is not None.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 8 Oct 2012 11:18:32 +0000 (12:18 +0100)]
xend/pvscsi: fix usage of persistant device names for SCSI devices
Currently the callers of vscsi_get_scsidevices() do not pass a mask
string. This will call "lsscsi -g '[]'", which causes a lsscsi syntax
error. As a result the sysfs parser _vscsi_get_scsidevices() is used.
But this parser is broken and the specified names in the config file are
not found.
Using a mask '*' if no mask was given will call lsscsi correctly and the
following config is parsed correctly:
vscsi=[
'/dev/sg3, 0:0:0:0',
'/dev/disk/by-id/wwn-0x600508b4000cf1c30000800000410000, 0:0:0:1'
]
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 8 Oct 2012 11:18:31 +0000 (12:18 +0100)]
xend/pvscsi: fix passing of SCSI control LUNs
Currently pvscsi can not pass SCSI devices that have just a scsi_generic node.
In the following example sg3 is a control LUN for the disk sdd.
But vscsi=['4:0:2:0,0:0:0:0'] does not work because the internal 'devname'
variable remains None. Later writing p-devname to xenstore fails because None
is not a valid string variable.
Since devname is used for just informational purpose use sg also as devname.
carron:~ $ lsscsi -g
[0:0:0:0] disk ATA FK0032CAAZP HPF2 /dev/sda /dev/sg0
[4:0:0:0] disk HP P2000G3 FC/iSCSI T100 /dev/sdb /dev/sg1
[4:0:1:0] disk HP P2000G3 FC/iSCSI T100 /dev/sdc /dev/sg2
[4:0:2:0] storage HP HSV400 0950 - /dev/sg3
[4:0:2:1] disk HP HSV400 0950 /dev/sdd /dev/sg4
[4:0:3:0] storage HP HSV400 0950 - /dev/sg5
[4:0:3:1] disk HP HSV400 0950 /dev/sde /dev/sg6
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 8 Oct 2012 11:18:31 +0000 (12:18 +0100)]
xenballoond.init: remove 4 from default runlevel
Remove 4 from default runlevel in xenballoond.init.
Similar to what changeset 24847:
0900b1c905f1 does in xencommons, remove
runlevel 4 from the other runlevel scripts. LSB defines runlevel 4 as
reserved for local use, the local sysadmin is responsible for symlink
creation in rc4.d.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 8 Oct 2012 11:18:30 +0000 (12:18 +0100)]
hotplug/Linux: Remove tracing (bash -x) from network-nat script
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Roger Pau Monne [Mon, 8 Oct 2012 11:18:29 +0000 (12:18 +0100)]
autoconf: add -Werror to libutil.h header check
libutil.h is only needed on BSDs, but not in Linux. Debian package
libbsd-dev-0.3.0-1 installed a libutil.h overlay that contains a
Perform the libutil.h check with -Werror, so we don't include this
bogus header.
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:36 +0000 (11:45 +0100)]
libxl: Allow migration with qemu-xen.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:36 +0000 (11:45 +0100)]
libxl_dom: Call the right switch logdirty for the right DM.
This patch dispatch the switch logdirty call depending on which device model
version is running.
The call to qemu-xen right now is synchronous, not like the one to
qemu-xen-traditional.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:35 +0000 (11:45 +0100)]
libxl_qmp: Introduce libxl__qmp_set_global_dirty_log.
This function will enable or disable the global dirty log on QEMU,
used during a migration.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:34 +0000 (11:45 +0100)]
libxl_qmp: Simplify run of single QMP commands.
This new function connects to QEMU, sends the command and disconnects.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:33 +0000 (11:45 +0100)]
libxl_qmp: Use qmp_parameters_* functions for param list of a QMP command.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:32 +0000 (11:45 +0100)]
libxl_qmp: Introduces helpers to create an argument list.
Those functions will be used to create a "list" of parameters that
contain more than just strings. This list is converted by qmp_send to
a string to be sent to QEMU.
Those functions will be used in the next two patches, so right now
there are not compiled.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:32 +0000 (11:45 +0100)]
libxl_json: Introduce libxl__json_object_to_yajl_gen.
This function converts a libxl__json_object to yajl by calling every
yajl_gen_* function on a preallocated yajl_gen hand.
This helps to integrate a json_object into an already existing
yajl_gen tree.
This function is used in a later patch.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- renamed local variable "index" to "idx" to avoid clash with
index(3) function, highlighted by Wshadow ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:31 +0000 (11:45 +0100)]
libxl_json: Replace JSON_TRUE/FALSE by JSON_BOOL.
Those two JSON_TRUE and JSON_FALSE were types of node. But it's better
to have a unique JSON_BOOL type.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:30 +0000 (11:45 +0100)]
libxl_json: Remove JSON_ERROR from enum.
This value from libxl__json_node_type is never used.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:29 +0000 (11:45 +0100)]
libxl_json: Export json_object related function.
Export libxl__json_object_alloc and libxl__json_object_append_to to
use them in a later patch.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Mon, 8 Oct 2012 10:45:29 +0000 (11:45 +0100)]
libxl: Add a comment about NOGC usage with flexarray
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Fri, 5 Oct 2012 14:12:04 +0000 (15:12 +0100)]
xl/libxl: add iomem support
This patch adds a new option for xen config files for
directly mapping hardware io memory into a vm.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Fri, 5 Oct 2012 13:34:30 +0000 (14:34 +0100)]
libxl_json: Use libxl alloc function.
This patch makes use of the libxl allocation API and the GC and removes the
check for allocation failure.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Fri, 5 Oct 2012 13:34:30 +0000 (14:34 +0100)]
libxl: Have flexarray using the GC
This patch makes the flexarray function libxl__gc aware.
It also updates every function that use a flexarray to pass the gc and removes
every memory allocation check and free.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Anthony PERARD [Fri, 5 Oct 2012 13:34:29 +0000 (14:34 +0100)]
libxl: Move gc_is_real to libxl_internal.h.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Stefano Stabellini [Fri, 5 Oct 2012 13:34:28 +0000 (14:34 +0100)]
libxl/qemu-xen: use cache=writeback for IDE and SCSI
Change caching mode from writethrough to writeback for upstream QEMU.
After a lengthy discussion, we came up with the conclusion that
WRITEBACK is OK for IDE.
See: http://marc.info/?l=xen-devel&m=
133311527009773
Given that the same reasons apply to SCSI as well, change to writeback
for SCSI too.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Matthew Fioravante [Fri, 5 Oct 2012 13:34:27 +0000 (14:34 +0100)]
libxl: make devid a type so it is initialized properly
Previously device ids in libxl were treated as integers meaning they
were being initialized to 0, which is a valid device id. This patch
makes devid its own type in libxl and initializes it to -1, an invalid
value.
This fixes a bug where if you try to do a xl DEV-attach multiple
time it will continuously try to reattach device 0 instead of
generating a new device id.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Christoph Egger [Fri, 5 Oct 2012 12:32:02 +0000 (14:32 +0200)]
x86/MCE: implement recoverscan for AMD
Implement recoverable_scan() for AMD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
Liu, Jinsong [Fri, 5 Oct 2012 12:30:21 +0000 (14:30 +0200)]
x86: add sanity check and comments for vMCE injection
Add sanity check for input vcpu so that malicious value would not
return 0. Add comments since vcpu=-1 (broadcast) is some implicit to
code reader.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Suggested-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
Jan Beulich [Thu, 4 Oct 2012 15:11:25 +0000 (17:11 +0200)]
fix inclusion style in public/domctl.h
Public headers should include one another only via self-relative
include directives (violated by 25955:
07d0d5b3a005).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Tim Deegan [Thu, 4 Oct 2012 13:20:50 +0000 (14:20 +0100)]
x86/nested-svm: Update the paging mode on VMRUN and VMEXIT emulation.
This allows Xen to walk the l1 hypervisor's shadow pagetable
correctly. Not needed for hap-on-hap guests because they are handled
at lookup time. Problem found with 64bit Win7 and 32bit XPMode where Win7
switches forth and back between long mode and PAE legacy pagetables.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
[Adjusted to update in all cases where the l1 vmm uses shadows]
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Jan Beulich [Thu, 4 Oct 2012 07:28:25 +0000 (09:28 +0200)]
VT-d: make remap_entry_to_msi_msg() return consistent message
During debugging of another problem I found that in x2APIC mode, the
destination field of the low address value wasn't passed back
correctly. While this is benign in most cases (as the value isn't being
used anywhere), it can be confusing (and misguiding) when printing the
value read or when comparing it to the one previously passed into the
inverse function.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Thu, 4 Oct 2012 07:05:24 +0000 (09:05 +0200)]
x86: consolidate frame state manipulation functions
Rather than doing this in multiple places, have a single central
function (decode_register()) to be used by all other code.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Thu, 4 Oct 2012 07:03:06 +0000 (09:03 +0200)]
x86: get the MWAIT idle driver in sync with the ACPI one
.. with respect to behavior when there is no HPET broadcast support
(for using the PIT broadcast instead, it requires explicitly enabling
CPU idle management).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Keir Fraser [Wed, 3 Oct 2012 11:59:30 +0000 (12:59 +0100)]
MAINTAINERS: Move and fix up VTPM entry
Signed-off-by: Keir Fraser <keir@xen.org>
Matthew Fioravante [Wed, 3 Oct 2012 10:13:54 +0000 (11:13 +0100)]
MAINTAINERS: Matthew Fioravante now maintains VTPM
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Committed-by: Keir Fraser <keir@xen.org>
David Vrabel [Wed, 3 Oct 2012 10:11:35 +0000 (11:11 +0100)]
trace: trace hypercalls inside a multicall
Add a trace record for every hypercall inside a multicall. These use
a new event ID (with a different sub-class ) so they may be filtered
out if only the calls into hypervisor are of interest.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
David Vrabel [Wed, 3 Oct 2012 10:11:06 +0000 (11:11 +0100)]
trace: improve usefulness of hypercall trace record
Trace hypercalls using a more useful trace record format.
The EIP field is removed (it was always somewhere in the hypercall
page) and include selected hypercall arguments (e.g., the number of
calls in a multicall, and the number of PTE updates in an mmu_update
etc.). 12 bits in the first extra word are used to indicate which
arguments are present in the record and what size they are (32 or
64-bit).
This is an incompatible record format so a new event ID is used so
tools can distinguish between the two formats.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
David Vrabel [Wed, 3 Oct 2012 10:10:33 +0000 (11:10 +0100)]
trace: allow for different sub-classes of TRC_PV_* tracepoints
We want to add additional sub-classes for TRC_PV tracepoints and to be
able to only capture these new sub-classes. This cannot currently be
done as the existing tracepoints all use a sub-class of 0xf.
So, redefine the PV events to use a new sub-class. All the current
tracepoints are tracing entry points to the hypervisor so the
sub-class is named TRC_PV_ENTRY.
This change does not affect xenalyze as that only looks at the main
class and the event number and does not use the sub-class field.
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Jan Beulich [Tue, 2 Oct 2012 10:14:00 +0000 (12:14 +0200)]
x86/Intel: add further support for Ivy Bridge CPU models
And some initial Haswell ones at once.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: "Nakajima, Jun" <jun.nakajima@intel.com>
Paul Durrant [Mon, 1 Oct 2012 19:06:31 +0000 (20:06 +0100)]
Register Linux PV-on-HVM drivers product number.
This is already in use despite never being registereed.
See XEN_IOPORT_LINUX_PRODNUM in include/xen/platform_pci.h
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Paul Durrant [Mon, 1 Oct 2012 19:05:33 +0000 (20:05 +0100)]
Add a new pvdrivers header to serve as the register of product numbers.
These product numbers are used by the QEMU blacklisting protocol in
traditional QEMU and are currently coded directly into the xenstore.c
source module. Since there are now multiple QEMUs this information
should be pulled into a public header to avoid duplication/conflict.
hvm-emulated-unplug.markdown has also been adjusted to reference the
new header.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Mon, 1 Oct 2012 19:03:19 +0000 (20:03 +0100)]
xen: Remove sched_credit_default_yield option
The sched_credit_default_yield option was added when the behavior of
"SCHEDOP_yield" was changed in 4.1, to allow any users who had
problems to revert to the old behavior. The new behavior has been in
Xen.org xen since 4.1, and in XenServer even longer, and there is no
evidence of anyone having trouble with it. Remove the option.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Matt Wilson [Mon, 1 Oct 2012 19:02:45 +0000 (20:02 +0100)]
xen/console: introduce a 'w' debug-key that dumps the console ring
This patch adds a new 'w' debug-key, chosen from the limited remaining
keys only due to its proximity to 'q', that dumps the console ring to
configured console devices. It's useful to for tracking down how an
unresponsive system got into a broken state via serial console.
Signed-off-by: Matt Wilson <msw@amazon.com>
Committed-by: Keir Fraser <keir@xen.org>
Xiantao Zhang [Mon, 1 Oct 2012 19:01:55 +0000 (20:01 +0100)]
hvmloader: Add 64 bits big bar support
Currently it is assumed PCI device BAR access < 4G memory. If there is
such a device whose BAR size is larger than 4G, it must access > 4G
memory address. This patch enable the 64bits big BAR support on
hvmloader.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
Ian Campbell [Mon, 1 Oct 2012 16:54:11 +0000 (17:54 +0100)]
docs: initial documentation for xenstore paths
This is based upon my inspection of a system with a single PV domain
and a single HVM domain running and is therefore very incomplete.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
George Dunlap [Mon, 1 Oct 2012 16:49:01 +0000 (17:49 +0100)]
docs: Document scheduler-related Xen command-line options
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Jan Beulich [Fri, 28 Sep 2012 08:59:41 +0000 (10:59 +0200)]
x86: replace literal numbers
In various cases, 256 was being used instead of NR_VECTORS or a derived
ARRAY_SIZE() expression. In one case (guest_has_trap_callback()), a
wrong (unrelated) constant was used instead of NR_VECTORS.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Fri, 28 Sep 2012 07:36:32 +0000 (09:36 +0200)]
Revert 25960:
6bf8b882df8f (x86: default-disable MWAIT-based idle driver ...)
The problem this was working around should be resolved with c/s
25961:
6a5812129094 (x86/HPET: don't disable interrupt delivery right
after setting it up).
Jan Beulich [Fri, 28 Sep 2012 07:28:11 +0000 (09:28 +0200)]
x86/ucode: fix Intel case of resume handling on boot CPU
Checking the stored version doesn't tell us anything about the need to
apply the update (during resume, what is stored doesn't necessarily
match what is loaded).
Note that the check can be removed altogether because once switched to
use what was read from the CPU (uci->cpu_sig.rev, as used in the
subsequent pr_debug()), it would become redundant with the checks that
lead to microcode_update_match() returning the indication that an
update should be applied.
Note further that this was not an issue on APs since they start with
uci->mc.mc_intel being NULL.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Ben Guthro <ben@guthro.net>
Acked-by: Keir Fraser <keir@xen.org>