Commit Graph
27257 Commits
Author SHA1 Message Date
Ian Murray 4d1759b515 xl: support for leaving domain paused after save
New feature to allow xl save to leave a domain paused after its
memory has been saved. This is to allow disk snapshots of domU
to be taken that exactly correspond to the memory state at save time.
Once the snapshot(s) have been taken or whatever, the domain can be
unpaused in the usual manner.

Usage:
    xl save -p <domid> <filespec>

Signed-off-by: Ian Murray <murrayie@yahoo.co.uk>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-07-17 10:39:22 +01:00
Kjetil Torgrim Homme b179c6c490 pygrub: allow user to specify an explicit offset to fs
This new option overrides partition table parsing

Signed-off-by: Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
Reviewed-by: Matt Wilson <msw@amazon.com>
2013-07-17 10:36:02 +01:00
Bamvor Jian Zhang 75beb8e451 xen: arm: introduce Cortex-A7 support
Introduce Cortex-A7 with a scalable proc_info_list which including cpu id
and cpu initialize function.
In head.S, search cpu specific MIDR in procinfo and call such initialize
function. Currently, support Cortex-A7 and Cortex-A15.

Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-07-17 10:34:29 +01:00
Jan Beulich 68caac7f6f x86: don't use destroy_xen_mappings() for vunmap()
Its attempt to tear down intermediate page table levels may race with
map_pages_to_xen() establishing them, and now that
map_domain_page_global() is backed by vmap() this teardown is also
wasteful (as it's very likely to need the same address space populated
again within foreseeable time).

As the race between vmap() and vunmap(), according to the latest stage
tester logs, doesn't appear to be the only one still left, the patch
also adds logging for vmap() and vunmap() uses (there shouldn't be too
many of them, so logs shouldn't get flooded). These are supposed to
get removed (and are made stand out clearly) as soon as we're certain
that there's no issue left.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-17 10:21:33 +02:00
Jan Beulich e0b6459aa2 Viridian: cleanup
- functions used only locally should be static
- constify parameters of dump functions

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
2013-07-17 08:49:39 +02:00
Jan Beulich 551b3c1227 Viridian: populate CPUID leaf 6
Properly reporting hardware features we use can only help Windows in
making decisions towards its own performance tuning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2013-07-17 08:49:08 +02:00
Jan Beulich 27815a123a VMX: suppress pointless indirect calls
Get the other virtual interrupt delivery related actors in sync
with the newly added handle_eoi() one: Clear the respective pointers
(thus avoiding the call from generic code) when the feature is
unavailable instead of checking feature availability in the actors.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
2013-07-17 08:48:24 +02:00
Jan Beulich 303066fdb1 VMX: fix interaction of APIC-V and Viridian emulation
Viridian using a synthetic MSR for issuing EOI notifications bypasses
the normal in-processor handling, which would clear
GUEST_INTR_STATUS.SVI. Hence we need to do this in software in order
for future interrupts to get delivered.

Based on analysis by Yang Z Zhang <yang.z.zhang@intel.com>.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
2013-07-17 08:47:18 +02:00
Andrew Cooper 85047d9e4f x86/cpuidle: Change logging for unknown APIC IDs
Dom0 uses this hypercall to pass ACPI information to Xen.  It is not very
uncommon for more cpus to be listed in the ACPI tables than are present on the
system, particularly on systems with a common BIOS for a 2 and 4 socket server
varients.

As Dom0 does not control the number of entries in the ACPI tables, and is
required to pass everything it finds to Xen, change the logging.

There is now an single unconditional warning for the first unknown ID, and
further warnings if "cpuinfo" is requested by the user on the command line.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2013-07-17 08:45:20 +02:00
Suravee Suthikulpanit 5d0ca62156 AMD IOMMU: Add debug-key for dumping IRTEs
Support debug-key "V" to allow IOMMU IRTE dumping.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
2013-07-16 11:56:13 +02:00
Jan Beulich c610867bf4 AMD IOMMU: enable for multi-vector MSI
The main change being to make alloc_intremap_entry() capable of
allocating a block of entries.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
2013-07-16 11:55:33 +02:00
Jan Beulich 561e0f8666 AMD IOMMU: untie remap and vector maps
With the specific IRTEs used for an interrupt no longer depending on
the vector, there's no need to tie the remap sharing model to the
vector sharing one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
2013-07-16 11:54:07 +02:00
Jan Beulich 2ca9fbd739 AMD IOMMU: allocate IRTE entries instead of using a static mapping
For multi-vector MSI, where we surely don't want to allocate
contiguous vectors and be able to set affinities of the individual
vectors separately, we need to drop the use of the tuple of vector and
delivery mode to determine the IRTE to use, and instead allocate IRTEs
(which imo should have been done from the beginning).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
2013-07-16 11:52:38 +02:00
Chen Baozi 3726b101a5 extract register definitions from ns16550 into a separated header
Signed-off-by: Chen Baozi <baozich@gmail.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-16 11:13:00 +02:00
Andrew Cooper fca11da0ec x86: Special case __HYPERVISOR_iret rather more when writing hypercall pages
In all cases when a hypercall page is written, __HYPERVISOR_iret is first
written as a regular hypercall, then subsequently rewritten in its special
case.

For VMX and SVM, this means that following the ud2a instruction is 3 bytes of
an imm32 parameter.  For a ring3 kernel, this means that following the syscall
instruction is the second half of 'pop %r11'.

For a ring1 kernel, the iret case ends up as the same number of bytes as the
rest of the hypercalls, but it is pointless writing it twice, and is changed
for consistency.

Therefore, skip the loop iteration which would write the incorrect
__HYPERVISOR_iret hypercall.  This removes junk machine code from the tail and
makes disassemblers rather more happy when looking at the hypercall page.

Also, a miscellaneous whitespace fix in the comment for ring3 kernel.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2013-07-16 11:10:45 +02:00
Jan Beulich d7f913b8de AMD IOMMU: use ioremap()
There's no point in using the fixmap here, and it gets
map_iommu_mmio_region() in line with unmap_iommu_mmio_region(), which
was already using iounmap() (thus crashing if actually used).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
2013-07-15 14:21:45 +02:00
Jan Beulich 99321e0e6c VT-d: use ioremap()
There's no point in using the fixmap here, and it gets iommu_alloc()
in line with iommu_free(), which was already using iounmap() (thus
crashing if actually used).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-15 14:21:03 +02:00
Jan Beulich 8bfaa2c23f x86: add locking to map_pages_to_xen()
While boot time calls don't need this, run time uses of the function
which may result in L2 page tables getting populated need to be
serialized to avoid two CPUs populating the same L2 (or L3) entry,
overwriting each other's results.

This is expected to fix what would seem to be a regression from commit
b0581b92 ("x86: make map_domain_page_global() a simple wrapper around
vmap()"), albeit that change only made more readily visible the already
existing issue.

This patch intentionally does not
- add locking to the page table de-allocation logic in
  destroy_xen_mappings() (the only user having potential races here,
  msix_put_fixmap(), gets converted to use __set_fixmap() instead)
- avoid races between super page splitting and reconstruction in
  map_pages_to_xen() (no such uses exist; races between multiple
  splitting attempts or between multiple reconstruction attempts are
  being taken care of)
If we wanted to take care of these, we'd need to alter the behavior
of virt_to_xen_l?e() - they would need to return with the lock held
then.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-15 14:17:56 +02:00
Andrew Cooper 395f777ae0 xl: Add 'xen_version' to xl info
Getting the full Xen version in an easily scriptable way is awkward,
especially if trying to piece together from xen_{major,minor,extra}.

This reflects $(XEN_FULLVERSION) in the build system (but under a more
sensible name, as $(XEN_VERSION) is just the major number).

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-07-12 17:34:03 +01:00
David Vrabel cd79a9bf36 docs: add xenstore-chmod man page
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2013-07-12 14:17:15 +01:00
David Vrabel 8cb199926c docs: add xenstore-ls man page
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2013-07-12 14:17:15 +01:00
David Vrabel fbfcf225a4 docs: add xenstore utility man page
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2013-07-12 14:17:15 +01:00
Jan Beulich 521ce5beba x86/HVM: key handler registration functions can be __init
This applies to both SVM and VMX.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-10 13:45:55 +02:00
Ian Campbell 74d57ce43b arm: correct vfp save/restore asm constraints
Some versions of gcc complain:
> vfp.c: In function 'vfp_restore_state':
> vfp.c:45:27: error: memory input 0 is not directly addressable
> vfp.c:51:31: error: memory input 0 is not directly addressable

There is no way to express the constraint we want (which is the address of the
array, clobbering the whole array). Therefore we have to fake it up by using
two constraints.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Will.Deacon@arm.com
Acked-by: Julien Grall <julien.grall@linaro.org>
2013-07-10 12:54:00 +02:00
Jan Beulich 1d75c9148c also allow building .s files from .c ones
... along the lines of allowing .i files to be built from .c ones as
well as .s from .S (aiding the analysis of occasional build problems).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-10 10:05:34 +02:00
Jan Beulich 5656b93d21 adjust x86 EFI build
While the rule to generate .init.o files from .o ones already correctly
included $(extra-y), the setting of the necessary compiler flag didn't
have the same. With some yet to be posted patch this resulted in build
breakage because of the compiler deciding not to inline a few functions
(which then results in .text not being empty as required for these
object files).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-10 10:03:40 +02:00
Jan Beulich 4867685f79 Revert "hvmloader: always include HPET table"
This reverts commit e4fd0475a0.

Conflicts:
	tools/firmware/hvmloader/acpi/build.c

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir.xen@gmail.com>
2013-07-08 13:20:20 +02:00
Jan Beulich 642e4f3315 Revert "/home/jbeulich/tmp/commit.txt"
This reverts commit 80e3eddcc4.
2013-07-08 13:16:29 +02:00
Jan Beulich 80e3eddcc4 /home/jbeulich/tmp/commit.txt 2013-07-08 13:15:10 +02:00
Wei Liu 8960761b1c netif.h: fix typo, BLKIF -> NETIF
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-07-08 11:04:27 +02:00
James Bulpin 767423f205 docs: record reservations of device IDs under the Xen vendor ID
This patch introduces a documentation file to record reservations of
ranges of PCI device IDs within the Xen vendor ID 0x5853.

Signed-off-by: James Bulpin <james.bulpin@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-04 11:13:37 +01:00
Julien Grall b9fa02b901 xen/arm32: implement VFP context switch
Add support for VFP context switch on arm32 and a dummy support for arm64

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-07-04 11:10:06 +01:00
Julien Grall acd7c3f1bb xen/arm: don't enable VFP on XEN during the boot
We can safely remove VFP support in XEN because:
    - the guest will enable VFP support when a process requires it
    - XEN doesn't use VFP

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-07-04 11:09:57 +01:00
Chen Baozi 2548700af6 mini-os: eliminate duplicated definition of spin_unlock_wait
Signed-off-by: Chen Baozi <baozich@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2013-07-04 10:55:12 +01:00
Marek Marczykowski af5102b81f libxl: do not call exit() in libxl_device_vtpm_list
Signal error with NULL return value, do not terminate the whole process.

Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-07-04 10:38:16 +01:00
Andrew Cooper d3a55d7d9b x86/mm: Ensure useful progress in alloc_l2_table()
While debugging the issue which turned out to be XSA-58, a printk in this loop
showed that it was quite easy to never make useful progress, because of
consistently failing the preemption check.

One single l2 entry is a reasonable amount of work to do, even if an action is
pending, and also assures forwards progress across repeat continuations.

Tweak the continuation criteria to fail on the first iteration of the loop.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-04 10:33:18 +02:00
Ian Campbell b12649ce9e use SMP barrier in common code dealing with shared memory protocols
Xen currently makes no strong distinction between the SMP barriers (smp_mb
etc) and the regular barrier (mb etc). In Linux, where we inherited these
names from having imported Linux code which uses them, the SMP barriers are
intended to be sufficient for implementing shared-memory protocols between
processors in an SMP system while the standard barriers are useful for MMIO
etc.

On x86 with the stronger ordering model there is not much practical difference
here but ARM has weaker barriers available which are suitable for use as SMP
barriers.

Therefore ensure that common code uses the SMP barriers when that is all which
is required.

On both ARM and x86 both types of barrier are currently identical so there is
no actual change. A future patch will change smp_mb to a weaker barrier on
ARM.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-04 10:32:44 +02:00
Jan Beulich b0581b9214 x86: make map_domain_page_global() a simple wrapper around vmap()
This is in order to reduce the number of fundamental mapping mechanisms
as well as to reduce the amount of code to be maintained. In the course
of this the virtual space available to vmap() is being grown from 16Gb
to 64Gb.

Note that this requires callers of unmap_domain_page_global() to no
longer pass misaligned pointers - map_domain_page_global() returns page
size aligned pointers, so unmappinmg should be done accordingly.
unmap_vcpu_info() violated this and is being adjusted here.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-04 10:27:39 +02:00
Jan Beulich d8a7694e5a bitmap_*() should cope with zero size bitmaps
... to match expectations set by memset()/memcpy().

Similarly for find_{first,next}_{,zero_}_bit() on x86.

__bitmap_shift_{left,right}() would also need fixing (they more
generally can't cope with the shift count being larger than the bitmap
size, and they perform undefined operations by possibly shifting an
unsigned long value by BITS_PER_LONG bits), but since these functions
aren't really used anywhere I wonder if we wouldn't better simply get
rid of them.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-04 10:26:24 +02:00
Jan Beulich 966e77e9d6 x86: drop MAX_VECTOR definition
.. in favor of NR_VECTORS, as being redundant and as the latter is
correct in terms of its naming, while the former is off by one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2013-07-04 10:25:31 +02:00
Ben Guthro da72c56322 x86: Restore reboot quirks by DMI, fix reboot on a number of systems
The following patch ports the functionality following changeset from
Linux (from 2008) to xen:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=14d7ca5c
It implements an additional reboot quirk to do a PCI reset via port
CF9.

This also restores some code dropped in the x86_32 target removal
(changeset 5d1181a5ea) which sets some
quirks based on DMI matching.

This will add reboot quirks on the following systems that are known to
be necessary on Linux:

    Dell E520
    Dell PowerEdge 1300
    Dell PowerEdge 300
    Dell OptiPlex 745
    Dell OptiPlex 745
    Dell OptiPlex 745
    Dell OptiPlex 330
    Dell OptiPlex 360
    Dell OptiPlex 760
    Dell PowerEdge 2400
    Dell Precision T5400
    Dell Precision T7400
    HP Compaq Laptop
    Dell XPS710
    Dell DXP061
    Sony VGN-Z540N
    ASUS P4S800
    Acer Aspire One A110
    Apple MacBook5
    Apple MacBookPro5
    Apple Macmini3,1
    Apple iMac9,1
    Dell Latitude E6320
    Dell Latitude E5420
    Dell Latitude E6220
    Dell Latitude E6420
    Dell OptiPlex 990
    Dell OptiPlex 990
    Dell Latitude E6520
    Dell OptiPlex 790
    Dell OptiPlex 990
    Dell OptiPlex 390
    Dell Latitude E6320
    Dell Latitude E6420
    Dell Latitude E6520

I clearly have not been able to test on all of these systems.
It does fix rebooting on the Dell 790, and should *not* change the
reboot paths of systems not on this DMI match list.

Signed-off-by: Ben Guthro <benjamin.guthro@citrix.com>

Use driver_data, thus requiring only a single handler function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org
Acked-by: Ben Guthro <benjamin.guthro@citrix.com>
2013-07-04 10:23:36 +02:00
Andrew Cooper f487767ad0 docs: Pull Xen version from canonical location
rather than hard coding it and being wrong every time we branch for a release.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-07-03 16:35:14 +01:00
Suravee Suthikulpanit 9eabb07354 iommu/amd: Workaround for erratum 787
The IOMMU interrupt handling in bottom half must clear the PPR log interrupt
and event log interrupt bits to re-enable the interrupt. This is done by
writing 1 to the memory mapped register to clear the bit. Due to hardware bug,
if the driver tries to clear this bit while the IOMMU hardware also setting
this bit, the conflict will result with the bit being set. If the interrupt
handling code does not make sure to clear this bit, subsequent changes in the
event/PPR logs will no longer generating interrupts, and would result if
buffer overflow. After clearing the bits, the driver must read back
the register to verify.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

Adjust to apply on top of heavily modified patch 1. Adjust flow to get away
with a single readl() in each instance of the status register checks.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
2013-07-02 08:50:41 +02:00
Suravee Suthikulpanit 2823a0c7df iommu/amd: Fix logic for clearing the IOMMU interrupt bits
The IOMMU interrupt bits in the IOMMU status registers are
"read-only, and write-1-to-clear (RW1C).  Therefore, the existing
logic which reads the register, set the bit, and then writing back
the values could accidentally clear certain bits if it has been set.

The correct logic would just be writing only the value which only
set the interrupt bits, and leave the rest to zeros.

This patch also, clean up #define masks as Jan has suggested.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

With iommu_interrupt_handler() properly having got switched its readl()
from status to control register, the subsequent writel() needed to be
switched too (and the RW1C comment there was bogus).

Some of the cleanup went too far - undone.

Further, with iommu_interrupt_handler() now actually disabling the
interrupt sources, they also need to get re-enabled by the tasklet once
it finished processing the respective log. This also implies re-running
the tasklet so that log entries added between reading the log and re-
enabling the interrupt will get handled in a timely manner.

Finally, guest write emulation to the status register needs to be done
with the RW1C (and RO for all other bits) semantics in mind too.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
2013-07-02 08:49:43 +02:00
Jan Beulich 5ad914bc86 x86: don't pass negative time to gtime_to_gtsc() (try 2)
This mostly reverts commit eb60be3d ("x86: don't pass negative time to
gtime_to_gtsc()") and instead corrects __update_vcpu_system_time()'s
handling of this_cpu(cpu_time).stime_local_stamp dating back before the
start of a HVM guest (which would otherwise lead to a negative value
getting passed to gtime_to_gtsc(), causing scale_delta() to produce
meaningless output).

Flushing the value to zero was wrong, and printing a message for
something that can validly happen wasn't very useful either.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-02 08:48:03 +02:00
Jacob Shin 6b104d91b8 cpufreq, xenpm: fix cpufreq and xenpm mismatch
Currently cpufreq and xenpm are out of sync. Fix cpufreq reporting of
if turbo mode is enabled or not. Fix xenpm to not decode for tristate,
but a boolean.

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
2013-07-02 08:47:00 +02:00
Matthew Daley ec7e270db8 gnttab: remove unused MAPTRACK_MAX_ENTRIES define
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>
2013-07-02 08:44:41 +02:00
Jan Beulich f6c8c79152 x86/fxsave: bring in line with recent xsave adjustments
Defer the FIP/FDP pointer reset needed on AMD CPUs to the restore path,
and switch from using EMMS to FFREE here too (to be resistant against
eventual future CPUs without MMX support). Also switch from using an
almost typeless pointer in fpu_fxrstor() to a properly typed one, thus
telling the compiler the truth about which memory gets accessed.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-02 08:42:49 +02:00
Jan Beulich f9755488bf x86/xsave: adjust state management
The initial state for a vCPU is using default values, so there's no
need to force the XRSTOR to read the state from memory. This saves a
couple of thousand restores from memory just during boot of Linux on
my Sandy Bridge system (I didn't try to make further measurements).

The above requires that arch_set_info_guest() updates the state flags
in the save area when valid floating point state got passed in, but
that would really have been needed even before in case XSAVE{,OPT}
decided to clear one or both of the FP and SSE bits.

Furthermore, hvm_vcpu_reset_state() shouldn't just clear out the FPU/
SSE area, but needs to re-initialized MXCSR and FCW.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-07-02 08:41:28 +02:00
Ian Jackson 7b62e6bd2f README: Fix a whitespace error
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2013-07-01 17:36:07 +01:00