Commit Graph
31047 Commits
Author SHA1 Message Date
Ross Lagerwall 415b58c184 tools/libxc: Batch memory allocations for PV guests
The current code for allocating memory for PV guests batches the
hypercalls to allocate memory by allocating 1024*1024 extents of order 0
at a time. To make this faster, first try allocating extents of order 9
(2 MiB) before falling back to the order 0 allocating if the order 9
allocation fails.

On my test machine this reduced the time to start a 128 GiB PV guest by
about 60 seconds.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2015-06-17 11:39:56 +01:00
Wei Liu f8c72b5261 oxenstored: implement XS_RESET_WATCHES
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: David Scott <dave.scott@citrix.com>
2015-06-17 11:36:53 +01:00
Wei Liu e1e566ca08 libxc: unify handling of vNUMA layout
This patch does the following:
1. Use local variables for dummy vNUMA layout in PV case.
2. Avoid leaking dummy layout back to caller in PV case.
3. Use local variables to reference vNUMA layout (whether it is dummy
   or provided by caller) for both PV and HVM.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-17 11:29:56 +01:00
Wei Liu 08974f3d2f libxl: clean up qemu-save and qemu-resume files
These files are leaked when using qemu-trad stubdom.  They are
intermediate files created by libxc. Unfortunately they don't fit well
in our userdata scheme. Clean them up after we destroy all userdata,
we're sure they are not useful anymore at that point.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-17 11:28:15 +01:00
Ian Campbell fcbfaf9d26 Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging 2015-06-16 12:42:27 +01:00
Olaf Hering c43b206544 xenalyze: remove argp_program_version
Since xenalyze is now upstream its Open Source and part of the given
release.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
2015-06-16 11:35:28 +01:00
Olaf Hering a3f2794eec xenalyze: remove trailing whitespaces
Result of "sed -i 's@[[:blank:]]\+$@@' tools/xentrace/xenalyze.c"

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
2015-06-16 11:35:24 +01:00
Olaf Hering bcb3bcf49d xenalyze: handle TRC_TRACE_WRAP_BUFFER
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
2015-06-16 11:35:24 +01:00
Olaf Hering 7771b46244 xenalyze: include odd mmio states in default output
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
2015-06-16 11:35:23 +01:00
Olaf Hering 7d915be030 xenalyze: print newline after unknown hvm events
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
2015-06-16 11:35:22 +01:00
Olaf Hering fd19a9976e xenalyze: add to tools/xentrace/
This merges xenalyze.hg, changeset 150:24308507be1d,
into tools/xentrace/xenalyze.c to have the tool and
public/trace.h in one place.

Adjust code to use public/trace.h instead of private trace.h

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
[ ijc -- wrap $(BIN) install in a check in case it is empty (which it
	 is on !x86, avoid BIN += since it results in BIN = ' ' on
         !x86 ]
2015-06-16 11:34:59 +01:00
David Vrabel a622b5ade2 evtchn: factor out freeing an event channel
We're going to want to free an event channel from two places.  Factor out
the code into a free_evtchn() function.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2015-06-16 12:30:16 +02:00
Don Slutz 5cd431f343 hvmloader: properly parenthesize pci_write* macros
Signed-off-by: Don Slutz <dslutz@verizon.com>
2015-06-16 12:29:59 +02:00
Jan Beulich dc6f500bc6 gnttab: make struct grant_mapping private
This documents that no entity outside of gnttab.c actually accesses
objects of that type, which is particularly important with the now more
fine grained locking in place.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-16 12:29:18 +02:00
Jan Beulich 213f145114 gnttab: fix/adjust gnttab_transfer()
- don't update shared entry's frame number for translated domains (as
  MFNs shouldn't be exposed to such guests)
- for v1 grant table format, force copying of the page also when the
  intended MFN doesn't fit in 32 bits (and the domain isn't translated)
- fix an apparent off-by-one error (it's unclear to me why commit
  5cc77f9098 ("32-on-64: Fix domain address-size clamping, implement")
  uses BITS_PER_LONG-1 here, while using BITS_PER_LONG in the two other
  invocations of domain_clamp_alloc_bitsize())
- adjust comments accompanying the shared entry's frame field

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-16 12:28:11 +02:00
Jan Beulich 1549a9dac1 gnttab: simplify page copying/clearing
... by making {copy,clear}_domain_page() available also on other than
x86.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-16 12:26:35 +02:00
Jan Beulich f4c73bad08 gnttab: simplify shared entry v1 vs v2 handling
In a number of places both v1 and v2 pointers are being obtained when
none or just one suffices. Additionally in __acquire_grant_for_copy()
the flow of if/else-if can be slightly improved by re-ordering.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-16 12:26:03 +02:00
Jan Beulich 9f90cce7cf gnttab: limit mapcount() looping
The function doesn't need to return counts in the first place; all its
callers are after is whether at least one entry of a certain kind
exists. With that there's no point for that loop to continue once the
looked for condition was found to be met by one entry. Rename the
function to match the changed behavior.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-16 12:25:35 +02:00
Jan Beulich ed48c2c71c gnttab: eliminate several explicit version checks
By having nr_grant_entries() return zero when the grant table version
is still unset we can reduce the number of error paths and at once fix
grant_map_exists() running into the being removed ASSERT() when called
for a page owned by a domain not having its grant table set up yet.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-16 12:24:49 +02:00
Jan Beulich 2fdf3c433a x86/MSI: partly restore commit 73cb5d43a8 (build fix)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
2015-06-15 13:27:53 +02:00
David Vrabel 40de9fffb4 gnttab: make the grant table lock a read-write lock
In combination with the per-active entry locks, the grant table lock
can be made a read-write lock since the majority of cases only the
read lock is required. The grant table read lock protects against
changes to the table version or size (which are done with the write
lock held).

The write lock is also required when two active entries must be
acquired.

The double lock is still required when updating IOMMU page tables.

With the lock contention being only on the maptrack lock (unless IOMMU
updates are required), performance and scalability is improved.

Based on a patch originally by Matt Wilson <msw@amazon.com>.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-06-15 13:25:20 +02:00
David Vrabel 5a9899ddc4 gnttab: introduce maptrack lock
Split grant table lock into two separate locks. One to protect
maptrack free list (maptrack_lock) and one for everything else (lock).

Based on a patch originally by Matt Wilson <msw@amazon.com>.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-06-15 13:23:34 +02:00
David Vrabel b4650e9a96 gnttab: per-active entry locking
Introduce a per-active entry spin lock to protect active entry state
The grant table lock must be locked before acquiring (locking) an
active entry.

This is a step in reducing contention on the grant table lock, but
will only do so once the grant table lock is turned into a read-write
lock.

Based on a patch originally by Matt Wilson <msw@amazon.com>.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-06-15 13:22:07 +02:00
Jan Beulich c8b630fedf Revert "x86/MSI-X: use qword MMIO access for address writes"
This reverts commit 73cb5d43a8,
which appears to break with certain Tigon3 NICs.
2015-06-15 11:32:28 +02:00
Ian Jackson ad7ea0dbb2 libxl: libxl_internal.h: Clarify ao rule against internal callers
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Juergen Gross <jgross@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Juergen Gross <jgross@suse.com>
2015-06-12 12:15:34 +01:00
Ross Lagerwall c5089fae0f x86: avoid tripping watchdog when constructing dom0
Constructing dom0 may take a few seconds, particularly if the slow VESA
graphics terminal is used. Process pending softirqs a few times to avoid
tripping a watchdog with a short timeout.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Move inclusion of xen/softirq.h (and at once clean up other includes).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
2015-06-12 12:07:05 +02:00
Dario Faggioli 98c51d0c7e cpupool: fix shutdown with cpupools with different schedulers
trying to shutdown the host when a cpupool exists, has
pCPUs, and has a scheduler different than the Xen's default
one, produces this:

 root@Zhaman:~# xl cpupool-cpu-remove Pool-0 8
 root@Zhaman:~# xl cpupool-create name=\"Pool-1\" sched=\"credit2\"
 Using config file "command line"
 cpupool name:   Pool-1
 scheduler:      credit2
 number of cpus: 0
 root@Zhaman:~# xl cpupool-cpu-add Pool-1 8
 root@Zhaman:~# shutdown -h now

 (XEN) ----[ Xen-4.6-unstable  x86_64  debug=y  Not tainted ]----
 (XEN) CPU:    0
 (XEN) RIP:    e008:[<ffff82d080133bdf>] kill_timer+0x56/0x298
 (XEN) RFLAGS: 0000000000010002   CONTEXT: hypervisor
  ... ... ...
 (XEN) Xen call trace:
 (XEN)    [<ffff82d080133bdf>] kill_timer+0x56/0x298
 (XEN)    [<ffff82d08012233f>] csched_free_pdata+0x9b/0xcf
 (XEN)    [<ffff82d08012c30c>] cpu_schedule_callback+0x64/0x8b
 (XEN)    [<ffff82d08011bc7a>] notifier_call_chain+0x67/0x87
 (XEN)    [<ffff82d08010153e>] cpu_down+0xd9/0x12c
 (XEN)    [<ffff82d080101744>] disable_nonboot_cpus+0x93/0x138
 (XEN)    [<ffff82d0801aa6e7>] enter_state_helper+0xbd/0x365
 (XEN)    [<ffff82d0801061e5>] continue_hypercall_tasklet_handler+0x4a/0xb1
 (XEN)    [<ffff82d080132387>] do_tasklet_work+0x78/0xab
 (XEN)    [<ffff82d0801326bd>] do_tasklet+0x5e/0x8a
 (XEN)    [<ffff82d0801646d2>] idle_loop+0x56/0x6b
  ... ... ...
 (XEN) ****************************************
 (XEN) Panic on CPU 0:
 (XEN) FATAL PAGE FAULT
 (XEN) [error_code=0000]
 (XEN) Faulting linear address: 0000000000000041
 (XEN) ****************************************

The fix is, when tearing down a pCPU, call the free_pdata()
hook from the scheduler of the cpupool the pCPU belongs to,
not always the one from the default scheduler.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
2015-06-12 12:06:24 +02:00
Roger Pau Monné 90b18f1666 libelf: fix elf_parse_bsdsyms call
elf_parse_bsdsyms expects the second paramater to be a physical address, not
a virtual one.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
2015-06-12 12:05:54 +02:00
Jan Beulich 2cba5cfe80 x86/context-switch: prefer is_..._domain() over is_..._vcpu()
Latch both domains alongside both vCPU-s into local variables, making
use of them where possible also beyond what the title says.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-12 12:04:26 +02:00
Jan Beulich c6e24bdc1b x86/HVM: prefer is_..._domain() over is_..._vcpu()
... when the domain pointer is already available or such operations
occur frequently in a function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-12 12:03:56 +02:00
Jan Beulich 67a35cd752 x86: prefer is_..._domain() over is_..._vcpu()
... when the domain pointer is already available or such operations
occur frequently in a function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-12 12:03:13 +02:00
Jan Beulich ee78176f98 domctl: prefer is_..._domain() over is_..._vcpu()
... when the domain pointer is already available.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-12 12:02:12 +02:00
Jan Beulich 4c94684bb7 EFI: map allocation size must be set to zero
Commit 8a753b3f1c ("efi: fix allocation problems if ExitBootServices()
fails") replaced the use of a static (and hence zero-initialized)
variable by an automatic (and hence uninitialized) one.

Also drop the variable introduced by that commit in favor of re-using
another available and suitable one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-11 14:47:54 +02:00
Andrew Cooper 1f07213779 x86/traps: loop in the correct direction in compat_iret()
This is CVE-2015-4164 / XSA-136.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-06-11 14:44:47 +02:00
Jan Beulich 5d5c09d853 gnttab: add missing version check to GNTTABOP_swap_grant_ref handling
... avoiding NULL derefs when the version to use wasn't set yet (via
GNTTABOP_setup_table or GNTTABOP_set_version).

This is CVE-2015-4163 / XSA-134.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-11 14:44:12 +02:00
Jan Beulich 44a84eac30 EFI/ARM: don't treat EfiBootServices{Code,Data} as normal RAM under /mapbs
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-11 11:58:29 +02:00
Jan Beulich cdc6204b77 VT-d: extend quirks to newer desktop chipsets
We're being told that while on the server side the issue we're trying
to work around is fixed starting with IvyBridge (another round of
double checking is going on before we're going to remove the one
IvyBridge ID that we're currently applying the workaround for), on the
desktop side even Skylake still requires the workaround. Hence we need
to add a whole bunch of desktop IDs.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Don Dugger <donald.d.dugger@intel.com>
2015-06-11 11:55:05 +02:00
Jan Beulich ae05fd3912 VT-d: use qword MMIO access for MSI address writes
Also make dmar_{read,write}q() actually do what their names suggest (we
don't need to be concerned of 32-bit restrictions anymore).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
2015-06-11 11:54:10 +02:00
Jan Beulich 73cb5d43a8 x86/MSI-X: use qword MMIO access for address writes
Now that we support it for our guests, let's do so ourselves too.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-11 11:53:20 +02:00
Jan Beulich 284ffb4f9b x86/vMSI-X: support qword MMIO access
The specification explicitly provides for this, so we should have
supported this from the beginning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-11 11:52:18 +02:00
Andrew Cooper 12e817e281 tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125
gcc 4.1 of CentOS 5.x era does not like the typecheck in min() between
uint64_t and unsigned long.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2015-06-10 11:27:10 +01:00
David Vrabel a3046cf809 evtchn: profile event channel lock
The per-domain event channel lock may suffer from contention.  Add it to
the set of locks to be profiled when lock profiling is enabled.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2015-06-10 12:06:02 +02:00
Jan Beulich 860313f041 x86/EFI: adjust EFI_MEMORY_WP handling for spec version 2.5
That flag now means cachability rather than protection, and a new flag
EFI_MEMORY_RO got added in its place.

Along with EFI_MEMORY_RO also add the two other new EFI_MEMORY_*
definitions, even if we don't need them right away.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2015-06-10 12:05:21 +02:00
Konrad Rzeszutek Wilk 74cdad5dae EFI: support default attributes to map Runtime service areas with none given
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

For example on Dell machines we see:

(XEN)  00000fed18000-00000fed19fff type=11 attr=8000000000000000
(XEN) Unknown cachability for MFNs 0xfed18-0xfed19

Let's allow them to be mapped as UC.

We also alter the 'efi-rs' to be 'efi=rs' or 'efi=no-rs'.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-10 12:04:07 +02:00
Konrad Rzeszutek Wilk f36886bdf4 EFI/early: add /mapbs to map EfiBootServices{Code,Data}
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

To help on certain platforms to run.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
2015-06-10 12:02:43 +02:00
Jan Beulich af23e79f46 x86/EFI: fix EFI_MEMORY_WP handling
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-10 12:01:35 +02:00
Ross Lagerwall d4300db3a0 efi: avoid calling boot services after ExitBootServices()
After the first call to ExitBootServices(), avoid calling any boot
services (except GetMemoryMap() and ExitBootServices()) by setting
setting efi_bs to NULL and halting in blexit(). Only GetMemoryMap() and
ExitBootServices() are explicitly allowed to be called after the first
call to ExitBootServices() and so are are called via
SystemTable->BootServices.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-10 12:00:10 +02:00
Ian Jackson 7c9a93a013 QEMU_TAG update 2015-06-09 16:21:43 +01:00
Jan Beulich 5cb57f4bdd kexec: add more pages to v1 environment
Destination pages need mappings to be added to the page tables in the
v1 case (where nothing else calls machine_kexec_add_page() for them).

Further, without the tools mapping the low 1Mb (expected by at least
some Linux version), we need to do so in the hypervisor in the v1 case.

Suggested-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Alan Robinson <alan.robinson@ts.fujitsu.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-09 16:00:24 +02:00
Jan Beulich 85baced14d x86: adjust PV I/O emulation functions' types
admin_io_okay(), guest_io_read(), and guest_io_write() all don't need
their current "regs" parameter at all, and they don't use the vCPU
passed to them for other than obtaining its domain. Drop the former and
replace the latter by a struct domain pointer.

pci_cfg_okay() returns a boolean type, and its "write" parameter is of
boolean kind too.

All of them get called for the current vCPU (and hence current domain)
only, so name the domain parameters accordingly except in the
admin_io_okay() case, which a subsequent patch will use for simplifying
setup_io_bitmap().

Latch current->domain into a local variable in emulate_privileged_op().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-06-09 15:59:31 +02:00