aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/viridian.c
Commit message (Collapse)AuthorAgeFilesLines
* hvm/vidirian: Avoid printing page_to_mfn(NULL) on error pathsAndrew Cooper2013-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | While working in the viridian code, I noticed that 4cb6c4f4941 "x86/hvm: Use get_page_from_gfn() instead of get_gfn()/put_gfn." introduced two error paths where page_to_mfn(NULL) would be formatted and presented as a bad MFN. This provides junk in the warning rather than something useful. These two codepaths are fixed up to match their counterpart in wrmsr_hypervisor_regs() While auditing the other changes from 4cb6c4f4941, I noticed a small optimisation which could be made by changing the order of the validity checks to remove 6 NULL pointer checks. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* Viridian: cleanupJan Beulich2013-07-171-4/+4
| | | | | | | | | - 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>
* Viridian: populate CPUID leaf 6Jan Beulich2013-07-171-0/+14
| | | | | | | | | 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>
* VMX/Viridian: suppress MSR-based APIC suggestion when having APIC-VJan Beulich2013-06-251-2/+3
| | | | | | | | | | | When the CPU has the necessary capabilities, having Windows use synthetic MSR reads/writes is bogus, as this still requires emulation (which is pretty much guaranteed to be slower than having the hardware carry out the operation). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* hvm: Improve APIC INIT/SIPI emulation, fixing it for call paths other than ↵Keir Fraser2013-03-281-2/+2
| | | | | | | | | | | | | | x86_emulate(). In particular, on broadcast/multicast INIT/SIPI, we handle all target APICs at once in a single invocation of the init/sipi tasklet. This avoids needing to return an X86EMUL_RETRY error code to the caller, which was being ignored by all except x86_emulate(). The original bug, and the general approach in this fix, pointed out by Intel (yang.z.zhang@intel.com). Signed-off-by: Keir Fraser <keir@xen.org>
* x86: enable VIA CPU supportJan Beulich2012-09-211-2/+1
| | | | | | | | | | | | | Newer VIA CPUs have both 64-bit and VMX support. Enable them to be recognized for these purposes, at once stripping off any 32-bit CPU only bits from the respective CPU support file, and adding 64-bit ones found in recent Linux. This particularly implies untying the VMX == Intel assumption in a few places. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: Remove x86_32 build target.Keir Fraser2012-09-121-4/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86/hvm: Use get_page_from_gfn() instead of get_gfn()/put_gfn.Tim Deegan2012-05-171-16/+16
| | | | | Signed-off-by: Tim Deegan <tim@xen.org> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
* replace bogus gdprintk() uses with {,d}printk()Jan Beulich2012-02-161-1/+2
| | | | | | | | | | | When the subject domain is not the current one (e.g. during domctl or HVM save/restore handling), use of gdprintk() is questionable at best, as it won't give the intended information on what domain is affected. Use plain printk() or dprintk() instead, but keep things (mostly) as guest messages by using XENLOG_G_*. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* hvm/viridian: Ditch the extra assertions/warnings for non-viridian guests.Paul Durrant2011-11-251-12/+2
| | | | | | | Consensus is they are over-aggressive. Signed-off-by: Keir Fraser <keir@xen.org> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
* Fix save/restore for HVM domains with viridian=1Paul Durrant2011-11-251-2/+12
| | | | | | | | | | | | | xc_domain_save/restore currently pay no attention to HVM_PARAM_VIRIDIAN which results in an HVM domain running a recent version on Windows (post-Vista) locking up on a domain restore due to EOIs (done via a viridian MSR write) being silently dropped. This patch adds an extra save entry for the viridian parameter and also adds code in the viridian kernel module to catch attempted use of viridian functionality when the HVM parameter has not been set. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* Modify naming of queries into the p2mAndres Lagar-Cavilla2011-11-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | Callers of lookups into the p2m code are now variants of get_gfn. All callers need to call put_gfn. The code behind it is a no-op at the moment, but will change to proper locking in a later patch. This patch does not change functionality. Only naming, and adds put_gfn's. set_p2m_entry retains its name because it is always called with p2m_lock held. This patch is humongous, unfortunately, given the dozens of call sites involved. After this patch, anyone using old style gfn_to_mfn will not succeed in compiling their code. This is on purpose: adapt to the new API. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Keir Fraser <keir@xen.org>
* Add save/restore support for viridian APIC assist pfn.Paul Durrant2011-09-261-12/+55
| | | | | | | | | | c/s 17b754cab7b0 introduced a per-VCPU viridian structure to store the APIC assist pfn. This patch adds support for save and restore of that value. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/hvm: Tidy up the viridian code a little and flesh out the APICPaul Durrant2011-09-171-48/+91
| | | | | | | | | | | assist MSR handling code. We don't say we that handle that MSR but Windows assumes it. In Windows 7 it just wrote to the MSR and we used to handle that ok. Windows 8 also reads from the MSR so we need to keep a record of the contents. Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
* x86: Do not include apic.h/io_apic.h from asm/smp.hKeir Fraser2010-06-111-0/+1
| | | | | | ...and fix up the ensuing fall-out of implicit dependencies Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: cleanup rdmsr/wrmsrKeir Fraser2009-08-141-13/+10
| | | | | | | Use a 64bit value instead of extracting/merging two 32bit values. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Mapping grant references into HVM guests, take 2Keir Fraser2009-07-131-1/+1
| | | | | | | | | | | | | After some discussion, here's a second version of the patch I posted a couple of weeks back to map grant references into HVM guests. As before, this is done by modifying the P2M map, but this time there's no new hypercall to do it. Instead, the existing GNTTABOP_map is overloaded to perform a P2M mapping if called from a shadow mode translate guest. This matches the IA64 API. Signed-off-by: Steven Smith <steven.smith@citrix.com> Acked-by: Tim Deegan <tim.deegan@citrix.com> CC: Bhaskar Jayaraman <Bhaskar.Jayaraman@lsi.com>
* x86 hvm viridian: Provide dummy support for APIC assist page to satisfy Win7.Keir Fraser2009-05-261-2/+27
| | | | | From: Tim Deegan <tim.deegan@citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvm: Tell Viridian-enabled OS to relax timer interrupt checks.Keir Fraser2009-01-061-1/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Fix non-debug build.Keir Fraser2008-10-151-2/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86, hvm: Hyper-V guest interface support with small set of enlightenmentsKeir Fraser2008-10-141-0/+350
A minimal implementation of the Viridian (Hyper-V) guest interface. The only enlightenments advertised and supported are vAPIC MSRs and long-spin-wait notifications. The set of enlightenments can easily be extended in future, as they are found to provide a performance win, and configured via an extended HVM_PARAM_VIRIDIAN hvm parameter. Signed-off-by: Peter Johnston <peter.johnston@citrix.com> Signed-off-by: Tim Deegan <tim.deegan@citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>