| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The maximum number of grant mappings is given by
max_nr_maptrack_frames() as of commit 5ce8faf, not this unused define.
Signed-off-by: Matthew Daley <mattjd@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
max_nr_active_grant_frames() is merly is special case of
num_act_frames_from_sha_frames(), so there's no need to have a special
case implementation for it.
Further, some of the related definitions (including the "struct
active_grant_entry" definition itself) can (and hence should) really be
private to grant_table.c.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
|
|
|
|
|
|
|
| |
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: Keir Fraser <keir@xen.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we expect all source files to include the header as the first thing
anyway, stop doing this by repeating the inclusion in each and every
source file (and in many headers), but rather enforce this uniformly
through the compiler command line.
As a first cleanup step, remove the explicit inclusion from all common
headers. Further cleanup can be done incrementally.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When acquiring a transitive grant for copy then the owning domain
needs to be locked down as well as the granting domain. This was being
done, but the unlocking was not. The acquire code now stores the
struct domain * of the owning domain (rather than the domid) in the
active entry in the granting domain. The release code then does the
unlock on the owning domain. Note that I believe I also fixed a bug
where, for non-transitive grants the active entry contained a
reference to the acquiring domain rather than the granting
domain. From my reading of the code this would stop the release code
for transitive grants from terminating its recursion correctly.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
|
|
|
|
| |
Signed-off-by: Steven Smith <steven.smith@citrix.com>
|
|
|
|
| |
Signed-off-by: Steven Smith <steven.smith@citrix.com>
|
|
|
|
| |
Signed-off-by: Steven Smith <steven.smith@citrix.com>
|
|
|
|
|
|
| |
isn't in the way when we introduce struct grant_entry_v2.
Signed-off-by: Steven Smith <steven.smith@citrix.com>
|
|
|
|
|
|
|
| |
-- INITIAL_GRANT_ENTRIES is never used, so can be removed.
-- Simplify num_act_frames_from_sha_frames a little.
Signed-off-by: Steven Smith <steven.smith@citrix.com>
|
|
|
|
|
|
|
|
|
|
| |
table map track handles".
There is no race since the hypercall takes the
domain-lock. Furthermore removing locking from get_maptrack_handle()
races gnttab_setup_table().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At present, we're not doing any at all, so if a domain e.g. tries to
do two map operations at the same time from different vcpus then you
could end up with both operations getting back the same maptrack
handle.
Fix this problem by just shoving an enormous lock around grant table
operations. This is unlikely to be heavily contended, because netback
and blkback both restrict themselves to mapping on a single vcpu at a
time (globally for netback, and per-device for blkback), and most of
the interesting bits are already protected by the remote domain's
grant table lock anyway.
The unconteded acquisition cost might be significant for some
workloads. If that were the case, it might be worth only acquiring
the lock only for multi-vcpu domains, since we only manipulate the
maptrack table in the context of one of the domain's vcpus. I've not
done that optimisation here, because I didn't want to think about what
would happen if e.g. a cpu got hot-unplugged from a domain while it
was performing a map operation.
Signed-off-by: Steven Smith <steven.smith@citrix.com>
|
|
|
|
| |
Signed-off-by: Steven Smith <steven.smith@eu.citrix.com>
|
|
|
|
|
|
|
|
|
|
| |
Check the page refcount rather than the type count when deciding if a
page is still mapped.
This catches pages which are mapped by qemu; it also removes the need
for gnttab_is_granted().
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement "emergency scan" for zero pages, to deal with start-of-day
page scrubbers.
If the cache is running out, scan through memory looking for "zero
pages" that we can reclaim for the cache. This is necessary for
operating systems which have a start-of-day page scrubber which runs
before the balloon driver can balloon down to the target.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
|
|
|
|
|
|
| |
Grant table expansion is disabled for now, since we currently make assumptions
about grant table MFNs being contiguous.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
|
|
|
|
| |
grant table entries instead of the shared ones. I had to move some
functions from grant_table.c into grant_table.h to make them usable by
the ACM module.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
|
|
|
|
|
|
| |
Signed-off-by: Christopher CLark <christopher.clark@cl.cam.ac.uk>
Signed-off-by: Andrei Petrov <andrei.petrov@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
| |
Reduce MAPTRACK_MAX_ENTRIES to something plausible.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
removed tight encoding of flag and ref. This change is xen-internal
so this shouldn't affect domain api.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
page refcnts for host mappings as they are already
destroyed by put_page_from_l1e(). Also call
gnttab_release_mappings later (after destroying
page-table references) and from common code rather than
arch/x86.
Also a few other misc gnttab cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
out of common code. Ready for use by ia64.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
must also be unmapped explicitly via the grant-table
interface (GNTTABOP_unmap_grant_ref). If not, the guest
ends up with a dangling grant reference that is not cleared
up until the guest dies.
Because this can obviously lead to deferred hard-to-debug
problems, debug builds of Xen use a 'spare' PTE flag to
track granted mappings and to crash a domain if it attempts
to free such a PTE without using GNTTABOP_unmap_grant_ref.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
| |
gnttab_transfer, with slightly rationalised interface and
simpler implementation inside Xen. This is a tiny chip off
the tip of a very big iceberg. :-)
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The map operation now takes PTE addresses as well as virtual
addresses. The contains_pte flag is used to indicate what sort of
address is in the map request.
Additionally, this patch:
- fixes grant mappings to user space.
- fixes overflow testing when you run out of maptrack entry space.
Signed-off-by: Andrew Warfield <andrew.warfield@cl.cam.ac.uk>
Signed-off-by: Leoffrey Lefebvre <geoffrey.g.lefebvre@intel.com>
|
|
|
|
|
|
| |
Dynamic sizing of a domain's grant map tracking table on demand.
Grant tables now default for block front/back communication.
|
|
|
|
|
|
| |
Grant tables: substantially more robust.
Block front and back drivers: support for using grant tables for interdomain communication.
|
|
|
|
|
| |
Grant tables map operation working.
|
|
|
|
|
| |
Maintain count of mappings, and fast exit put_page check if none in use
|
|
|
|
|
|
| |
remove gnttab_release_all_mappings
fixes to refcounts and flags
|
|
|
|
|
| |
grant tables: page ref counting fixes.
|
|
|
|
|
|
| |
Common-code cleanups. Moved arch-specific code out into arch/x86
and asm-x86.
|
|
|
|
|
|
|
|
|
|
| |
Rename Xen public interfaces.
1. hypervisor-if.h is now xen.h
2. hypervisor-ifs/ directory is now:
<include/public/...> in Xen
<asm/xen-public/...> in Linux
<xen/...> in user space
|
|
|
|
|
| |
Grant-table interface redone.
|
|
|
|
|
|
| |
Completed first cut of Xen support for grant tables.
The device drivers now need modifying to use them.
|
|
|
|
|
| |
More grant-table code, and some related sundry improvements.
|
|
|
|
|
| |
More grant-table code. Various cleanups and speedups.
|
|
Framework for grant-table implementation in Xen.
|