linux/include/xen/interface
Konrad Rzeszutek Wilk 6efa20e49b xen: Support 64-bit PV guest receiving NMIs
This is based on a patch that Zhenzhong Duan had sent - which
was missing some of the remaining pieces. The kernel has the
logic to handle Xen-type-exceptions using the paravirt interface
in the assembler code (see PARAVIRT_ADJUST_EXCEPTION_FRAME -
pv_irq_ops.adjust_exception_frame and and INTERRUPT_RETURN -
pv_cpu_ops.iret).

That means the nmi handler (and other exception handlers) use
the hypervisor iret.

The other changes that would be neccessary for this would
be to translate the NMI_VECTOR to one of the entries on the
ipi_vector and make xen_send_IPI_mask_allbutself use different
events.

Fortunately for us commit 1db01b4903
(xen: Clean up apic ipi interface) implemented this and we piggyback
on the cleanup such that the apic IPI interface will pass the right
vector value for NMI.

With this patch we can trigger NMIs within a PV guest (only tested
x86_64).

For this to work with normal PV guests (not initial domain)
we need the domain to be able to use the APIC ops - they are
already implemented to use the Xen event channels. For that
to be turned on in a PV domU we need to remove the masking
of X86_FEATURE_APIC.

Incidentally that means kgdb will also now work within
a PV guest without using the 'nokgdbroundup' workaround.

Note that the 32-bit version is different and this patch
does not enable that.

CC: Lisa Nguyen <lisa@xenapiadmin.com>
CC: Ben Guthro <benjamin.guthro@citrix.com>
CC: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v1: Fixed up per David Vrabel comments]
Reviewed-by: Ben Guthro <benjamin.guthro@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
2013-08-09 10:55:47 -04:00
..
hvm Feature: 2012-10-12 22:20:28 +09:00
io Merge branch 'for-3.11/drivers' of git://git.kernel.dk/linux-block 2013-07-22 19:02:52 -07:00
callback.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
elfnote.h Fix common misspellings 2011-03-31 11:26:23 -03:00
event_channel.h xen: Add EVTCHNOP_reset in Xen interface header files. 2012-12-17 21:58:05 -05:00
features.h xen/arm: get privilege status 2012-08-08 17:20:18 +00:00
grant_table.h xen: grant: use xen_pfn_t type for frame_list. 2012-10-19 15:17:55 -04:00
memory.h xen: implement updated XENMEM_add_to_physmap_range ABI 2013-02-19 22:01:55 -05:00
physdev.h xen-pciback: notify hypervisor about devices intended to be assigned to guests 2013-03-22 10:20:55 -04:00
platform.h xen/acpi: ACPI cpu hotplug 2013-02-19 22:02:29 -05:00
sched.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
vcpu.h xen: Support 64-bit PV guest receiving NMIs 2013-08-09 10:55:47 -04:00
version.h xen/acpi: Move the xen_running_on_version_or_later function. 2012-11-28 14:39:31 -05:00
xen-mca.h xen/mce: Add mcelog support for Xen platform 2012-07-19 15:51:36 -04:00
xen.h xen: event channel arrays are xen_ulong_t and not unsigned long 2013-02-20 08:45:07 -05:00
xencomm.h xen: import arch generic part of xencomm 2008-04-24 23:57:32 +02:00