David Vrabel [Mon, 13 Feb 2012 14:24:49 +0000 (14:24 +0000)]
arm: map device tree blob in initial page tables
Add a mapping for the device tree blob in the initial page tables.
This will allow the DTB to be parsed for memory information prior to
setting up the real page tables.
It is mapped into the first L2 slot after the fixmap. When this slot
is reused in setup_pagetables(), flush the TLB.
Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Mon, 13 Feb 2012 14:24:48 +0000 (14:24 +0000)]
arm: link a device tree blob into the xen image
Link a device tree blob (DTB) into the xen image. This is loaded
immediately after Xen and xen_start() is called with the correct
address in atag_paddr.
The DTB file must be supplied by setting the CONFIG_DTB_FILE variable
in .config or on the make command line.
Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Few missing #define are the cause of a compile failure with
XEN_TARGET_ARM=arm and XEN_COMPILE_ARM=arm (for example in the case of a
native compilation). This patch fill the gaps.
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>
Julian Pidancet [Mon, 13 Feb 2012 12:50:46 +0000 (12:50 +0000)]
firmware: Introduce CONFIG_ROMBIOS and CONFIG_SEABIOS options
This patch introduces configuration options allowing to built either a
rombios only or a seabios only hvmloader.
Building option ROMs like vgabios or etherboot is only enabled for a
rombios hvmloader, since SeaBIOS takes care or extracting option ROMs
itself from the PCI devices (these option ROMs are provided by the
device model and do not need to be built in hvmloader).
The Makefile in tools/firmware/ now only checks for bcc if rombios is
enabled.
These two configuration options are left on by default to remain
compatible.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Julian Pidancet [Mon, 13 Feb 2012 12:50:04 +0000 (12:50 +0000)]
hvmloader: Move option ROM loading into a separate optionnal file
Make load_rom field in struct bios_config an optionnal callback rather
than a boolean value. It allow BIOS specific code to implement it's
own option ROM loading methods.
Facilities to scan PCI devices, extract an deploy ROMs are moved into
a separate file that can be compiled optionnaly.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Julian Pidancet [Mon, 13 Feb 2012 12:49:06 +0000 (12:49 +0000)]
firmware: Use mkhex from hvmloader directory for etherboot ROMs
To remain consistent with how other ROMs are built into hvmloader,
call mkhex on etherboot ROMs from the hvmloader directory, instead of
the etherboot directory. In other words, eb-roms.h is not used any
more.
Introduce ETHERBOOT_NICS config option to choose which ROMs should be
built (kept rtl8139 and 8086100e per default as before).
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Julian Pidancet [Mon, 13 Feb 2012 12:48:20 +0000 (12:48 +0000)]
hvmloader: Allow the mkhex command to take several file arguments Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Jan Beulich [Mon, 13 Feb 2012 12:12:30 +0000 (13:12 +0100)]
x86/vMCE: MC{G,i}_CTL handling adjustments
- g_mcg_cap was read to determine whether MCG_CTL exists before it got
initialized
- h_mci_ctrl[] and dom_vmce()->mci_ctl[] both got initialized via
memset() with an inappropriate size (hence causing a [minor?]
information leak)
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Mon, 13 Feb 2012 12:09:02 +0000 (13:09 +0100)]
x86/paging: use clear_guest() for zero-filling guest buffers
While static arrays of all zeros may be tolerable (but are simply
inefficient now that we have the necessary infrastructure), using on-
stack arrays for this purpose (particularly when their size doesn't
have an upper limit enforced) is calling for eventual problems (even
if the code can be reached via administrative interfaces only).
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Tim Deegan <tim@xen.org>
Remove costly mem_sharing audits from the inline path, and instead make them
callable as a memop.
Have the audit function return the number of errors detected.
Update memshrtool to be able to trigger audits.
Set sharing audits as enabled by default.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
Use memops for mem paging, sharing, and access, instead of domctls
Per page operations in the paging, sharing, and access tracking subsystems are
all implemented with domctls (e.g. a domctl to evict one page, or to share one
page).
Under heavy load, the domctl path reveals a lack of scalability. The domctl
lock serializes dom0's vcpus in the hypervisor. When performing thousands of
per-page operations on dozens of domains, these vcpus will spin in the
hypervisor. Beyond the aggressive locking, an added inefficiency of blocking
vcpus in the domctl lock is that dom0 is prevented from re-scheduling any of
its other work-starved processes.
We retain the domctl interface for setting up and tearing down
paging/sharing/mem access for a domain. But we migrate all the per page
operations to use the memory_op hypercalls (e.g XENMEM_*).
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
When calling get_gfn multiple times on different gfn's in the same function, we
can easily deadlock if p2m lookups are locked. Thus, refactor these calls to
enforce simple deadlock-avoidance rules:
- Lowest-numbered domain first
- Lowest-numbered gfn first
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavila.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Re-order calls to put_gfn() around wait queue invocations
Since we use wait queues to handle potential ring congestion cases,
code paths that try to generate a mem event while holding a gfn lock
would go to sleep in non-preemptible mode.
Most such code paths can be fixed by simply postponing event generation until
locks are released.
Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
The PoD layer has a complex locking discipline. It relies on the
p2m being globally locked, and it also relies on the page alloc
lock to protect some of its data structures. Replace this all by an
explicit pod lock: per p2m, order enforced.
Three consequences:
- Critical sections in the pod code protected by the page alloc
lock are now reduced to modifications of the domain page list.
- When the p2m lock becomes fine-grained, there are no
assumptions broken in the PoD layer.
- The locking is easier to understand.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
x86/mm: Clean up locking now that p2m lockups are fully synchronized
With p2m lookups fully synchronized, many routines need not
call p2m_lock any longer. Also, many routines can logically
assert holding the p2m for a specific gfn.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
x86/mm: Make p2m lookups fully synchronized wrt modifications
We achieve this by locking/unlocking the global p2m_lock in get/put_gfn.
The lock is always taken recursively, as there are many paths that
call get_gfn, and later, make another attempt at grabbing the p2m_lock.
The lock is not taken for shadow lookups. We believe there are no problems
remaining for synchronized p2m+shadow paging, but we are not enabling this
combination due to lack of testing. Unlocked shadow p2m access are tolerable as
long as shadows do not gain support for paging or sharing.
HAP (EPT) lookups and all modifications do take the lock.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Olaf Hering [Thu, 9 Feb 2012 18:47:53 +0000 (18:47 +0000)]
xenpaging: deal with MEM_EVENT_FLAG_EVICT_FAIL request in tools/xenpaging
If a page is nominated but not evicted,then dom0 accesses the page,it
will change the page's p2mt to be p2m_ram_paging_in,and the req.flags
is MEM_EVENT_FLAG_EVICT_FAIL;so it will fail in p2m_mem_paging_evict()
because of the p2mt;and paging->num_paged_out will not increase in
this case;After the paging process is terminated, the p2mt
p2m_ram_paging_in still remains in p2m table.Once domU accesses the
nominated page,it will result in BSOD or vm'stuck.
The patch adds the dealing of this request to resume the page before
xenpaging is ended.
[ This can happen if p2m_mem_paging_populate() was called by a foreign
domain. In this case MEM_EVENT_FLAG_VCPU_PAUSED is not set and xenpaging
will not sent a response. And in this case the ring is in an
inconsistent state anyway, new requests cant be added, I think. - Olaf ]
Signed-off-by: hongkaixing <hongkaixing@huawei.com> Signed-off-by: shizhen <bicky.shi@huawei.com> Acked-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Zhigang Wang [Thu, 9 Feb 2012 18:41:03 +0000 (18:41 +0000)]
libxl: fix bootloader args setting
When bootloader_args = ['foo', 'bar'], then info->u.pv.bootloader_args =
foo\0
bar\0
\0
Before this patch, 'p++' points to the next character of 'foo\0' and never
comes to 'bar\0' (because of the '\0' in 'foo\0'), so the args will be:
args[0] = 'oo\0'
args[1] = 'o\0'
After this patch, 'p++' points to the next string of pv.bootloader_args, so we
get the correct args:
args[0] = 'foo\0'
args[1] = 'bar\0'
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:36 +0000 (18:33 +0000)]
xenstored: Add stub domain builder
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:36 +0000 (18:33 +0000)]
xenstored: add --priv-domid parameter
This parameter identifies an alternative service domain which has
superuser access to the xenstore database, which is currently required
to set up a new domain's xenstore entries.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:35 +0000 (18:33 +0000)]
xenstored: use domain_is_unprivileged instead of checking conn->id
This centralizes all the permission checking for privileged domains in
preparation for allowing domains other than dom0 to be privileged.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:35 +0000 (18:33 +0000)]
stubdom: enable xenstored build
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:35 +0000 (18:33 +0000)]
xenstored: add --event parameter for bootstrapping
When xenstored is run in a minios domain, it needs a bootstrap
connection to dom0 so that additional domain introduce messages can be
sent to it.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:34 +0000 (18:33 +0000)]
xenstored: support running in minios stubdom
A previous versions of this patch has been sent to xen-devel. See
http://lists.xensource.com/archives/html/xen-devel/2009-03/msg01655.html
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:34 +0000 (18:33 +0000)]
xenstored: add --internal-db flag
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Alex Zeffertt [Thu, 9 Feb 2012 18:33:33 +0000 (18:33 +0000)]
xenstored: support for tdb_copy with TDB_INTERNAL
The tdb_copy function should honor the TDB_INTERNAL flag for in-memory
databases; this is required to run in mini-os which does not use a
filesystem.
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Alex Zeffertt [Thu, 9 Feb 2012 18:33:33 +0000 (18:33 +0000)]
xenstored: add NO_SOCKETS compilation option
Add option for compiling xenstored without unix sockets to support
running on mini-OS
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:33 +0000 (18:33 +0000)]
xenstored: refactor socket setup code
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Alex Zeffertt [Thu, 9 Feb 2012 18:33:32 +0000 (18:33 +0000)]
xenstored: use grant references instead of map_foreign_range
make xenstored use grantref rather than map_foreign_range (which can
only be used by privileged domains)
This patch modifies the xenstore daemon to use xc_gnttab_map_grant_ref
instead of xc_map_foreign_range where available.
Previous versions of this patch have been sent to xen-devel. See
http://lists.xensource.com/archives/html/xen-devel/2008-07/msg00610.html
http://lists.xensource.com/archives/html/xen-devel/2009-03/msg01492.html
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:32 +0000 (18:33 +0000)]
mini-os: make frontends and xenbus optional
This adds compile-time logic to disable certain frontends in mini-os:
- pcifront is disabled by default, enabled for ioemu
- blkfront, netfront, fbfront, kbdfront, consfront are enabled by default
- xenbus is required for any frontend, and is enabled by default
If all frontends and xenbus are disabled, mini-os will run without
needing to communicate with xenstore, making it suitable to run the
xenstore daemon. The console frontend is not required for the initial
console, only consoles opened via openpt or ptmx.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:31 +0000 (18:33 +0000)]
mini-os: Move test functions into test.c
While useful, these test functions should not be compiled into every
mini-os instance that we compile.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:31 +0000 (18:33 +0000)]
mini-os: create app-specific configuration
Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios
code, create CONFIG_ items for features and use application-specific
configuration files to enable or disable the features.
The configuration flags are currently added to the compiler command
line; as the number of flags grows this may need to move to a header.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Alex Zeffertt [Thu, 9 Feb 2012 18:33:30 +0000 (18:33 +0000)]
mini-os: remove per-fd evtchn limit
This changes the minios evtchn implementation to use a list instead of
an array which ahis allows it to grow as necessary to support any number
of ports, only limited by Xen (NR_EVS is 1024, should be enough for now).
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:30 +0000 (18:33 +0000)]
mini-os: avoid crash if no console is provided
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Alex Zeffertt [Thu, 9 Feb 2012 18:33:30 +0000 (18:33 +0000)]
lib{xc,xl}: Seed grant tables with xenstore and console grants
This patch claims one reserved grant entry for the console and another
for the xenstore. It modifies the builder to fill in the grant table
entries for the console and the xenstore.
Previous versions of this patch have been sent to xen-devel. See
http://lists.xensource.com/archives/html/xen-devel/2008-07/msg00610.html
http://lists.xensource.com/archives/html/xen-devel/2009-03/msg01491.html
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:33:29 +0000 (18:33 +0000)]
tools/libxl: pull xenstore/console domids from xenstore
Instead of assuming that xenstored and xenconsoled are running in dom0,
pull the domain IDs from xenstore.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Daniel De Graaf [Thu, 9 Feb 2012 18:25:15 +0000 (18:25 +0000)]
libxl: Add device_model_stubdomain_seclabel
This allows the security label of stub domains to be specified.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
libxl: helper function to send commands to traditional qemu
Introduce a helper function to send commands to traditional
qemu. qemu_pci_add_xenstore, qemu_pci_remove_xenstore,
libxl__domain_save_device_model and libxl_domain_unpause have
been refactored to use this function.
Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-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>
libxl: bugfix: create_domain() return to caller if !daemonize
Currently the create_domain function does not honor
the daemonize flag properly. It exits irrespective of
the value of the flag. This patch fixes the issue.
Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
John McDermott [Thu, 9 Feb 2012 16:03:05 +0000 (16:03 +0000)]
mini-os: stop compiler complaint about unused variables
gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) complains about unused variables
in mini-os drivers
Signed-off-by: John McDermott <john.mcdermott@nrl.navy.mil> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Jan Beulich [Thu, 9 Feb 2012 15:39:16 +0000 (16:39 +0100)]
gnttab: miscellaneous fixes
- _GTF_* constants name bit positions, so binary arithmetic on them is
wrong
- gnttab_clear_flag() cannot (on x86 and ia64 at least) simply use
clear_bit(), as that may access more than the two bytes that are
intended to be accessed
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
David Vrabel [Thu, 9 Feb 2012 15:32:50 +0000 (15:32 +0000)]
arm: support zImage format kernels for dom0
Allow a zImage format kernel to be used for dom0. zImages are (by
default) hardcoded with the RAM location so adjust the RAM in the
memory map to match the physical memory map (0x80000000).
Vmlinux ELF images are loaded using a hack to locate the RAM so the
IPA is the same as the kernel's VA so the elf loader does the right
thing. If an ELF image is loaded the RAM will be located at
0xC0000000 (as before).
Signed-off-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Andrew Cooper [Thu, 9 Feb 2012 14:20:49 +0000 (06:20 -0800)]
CONFIG: remove #ifdef __ia64__ from the x86 arch tree
__ia64__ really really should not be defined in the x86 arch subtree,
so remove it from xen/include/public/arch-x86/hvm/save.h
This in turn allows the removal of VIOAPIC_IS_IOSAPIC, as x86 does not
use streamlined {IO,L}APICs, allowing for the removal of more code
from the x86 tree.
Changes since v2:
* Leave the EOI register write protected by VIOAPIC_VERSION_ID >=
0x20. Currently, only version 0x11 is emulated, but leave this
correct code in place in case a decision is make to emulate the
newer version.
Changes since v1:
* Refresh patch following the decision not to try emulating a
version 0x20 IOAPIC
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Dietmar Hahn [Thu, 9 Feb 2012 14:08:02 +0000 (06:08 -0800)]
vpmu: Use macros to access struct vpmu_struct.flags
This patch introduces some macros realising the access to the item
'flags' in the struct vpmu_struct (see
xen/include/asm-x86/hvm/vpmu.h). Only bits within 'flags' are
set/reset/checked.
- keep track of inflight irqs using a list, ordered by priority.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Driver for the generic timer for ARMv7 with virtualization extensions.
Currently it is based on the kernel timer rather than the hypervisor timer
because the latter does not work correctly on our test environment.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Functions to setup pagetables, handle the p2m, map and unmap domain
pages, copy data to/from guest addresses.
The implementation is based on the LPAE extension for ARMv7 and makes
use of the two level transtion mechanism.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Functions to build dom0: memory allocation, p2m construction, mappings
of the MMIO regions, ATAG setup.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Low level assembly routines, including entry.S and head.S.
Also the linker script and a collection of dummy functions that we plan
to reduce to zero as soon as possible.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Santosh Jodh [Tue, 7 Feb 2012 18:46:50 +0000 (18:46 +0000)]
libxc: Replace malloc with alloca in hot path
Replace malloc with alloc in hot paths for improved performance.
Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Tue, 7 Feb 2012 17:21:27 +0000 (17:21 +0000)]
pygrub: extlinux parsing correctness
The "in" operator should be used instead of the find method, since
we are only interested in knowing whether the line contains "initrd=",
but we don't care about it's position. Also fixes an error that
happens when initrd= it's at the start of the line, since find returns
0 and is evaluated as False.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Olaf Hering [Tue, 7 Feb 2012 17:18:10 +0000 (17:18 +0000)]
libxl: remove shebang from bash_completion helper
Fix rpmlint warning:
xen-tools.x86_64: W: sourced-script-with-shebang
/etc/bash_completion.d/xl.sh /bin/bash
This text file contains a shebang, but is meant to be sourced, not executed.
Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Tue, 7 Feb 2012 17:01:57 +0000 (17:01 +0000)]
xl: use json output by default
Move the sxp producing code off into a separate file. It is supported
for legacy reasons and needn't be updated other than the improve
compatibility with xm.
libxl_domain_config is not currently generated by the IDL (adding the
necessary support for Array types is on my to do list) so hand code
the json generation function for now.
Since this rather directly exposes a libxl data structure it's not
clear what sort of forward compatibility guarantees we can
make. However it seems like it should be as stable as libxl's own API
(which we are looking to stabilise)
(Gratuitous string.h include needed for memset in libxl_util.h)
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>
Ian Campbell [Tue, 7 Feb 2012 16:50:17 +0000 (16:50 +0000)]
xl: Drop -l option to xl cpupool-list
The implementation (which was a nop) was removed back in 22838:aab67c1c6b87 but
this now causes "set but not used" warnings from some compilers. Might as well
just nuke the option entirely.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Boris Ostrovsky [Tue, 7 Feb 2012 14:05:19 +0000 (15:05 +0100)]
x86/AMD: Add support for AMD's OSVW feature in guests.
In some cases guests should not provide workarounds for errata even when the
physical processor is affected. For example, because of erratum 400 on family
10h processors a Linux guest will read an MSR (resulting in VMEXIT) before
going to idle in order to avoid getting stuck in a non-C0 state. This is not
necessary: HLT and IO instructions are intercepted and therefore there is no
reason for erratum 400 workaround in the guest.
This patch allows us to present a guest with certain errata as fixed,
regardless of the state of actual hardware.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Acked-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
Haoyu Zhang [Mon, 6 Feb 2012 21:23:41 +0000 (13:23 -0800)]
Fix error recovery path in __gnttab_map_grant_ref
In file grant_table.c function __gnttab_map_grant_ref, if
__get_paged_frame failed, the effect of _set_status previously
called should be rollback, so the flag GTF_reading and _GTF_writing
will be recovered.
Signed-off-by: Haoyu Zhang <haoyu.zhang@huawei.com> Signed-off-by: Liang Wang <hzwangliang.wang@huawei.com> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Keir Fraser <keir@xen.org>
Andrew Cooper [Mon, 6 Feb 2012 21:17:46 +0000 (13:17 -0800)]
IO-APIC: Reformat IO-APIC RTE debug info (v2)
Having the columns aligned makes for much easier reading. Also remove
the commas which only add to visual clutter in combination with
spaces.
Furthermore, printing fewer characters makes it less likely that the
serial buffer will overflow resulting in loss of critical debugging
information.
Changes since v1:
* Format vector as hex rather than dec
* Contract some names
* destination mode uses 'L' or 'P' instead of full words
* trigger mode uses 'L' or 'E' instead of full words
* delivery mode uses short string instead of a number
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>