[Xen-devel] [PATCH v7 15/15] tools/xen-access: altp2m testcases

2015-07-22 Thread Ed White
From: Tamas K Lengyel Working altp2m test-case. Extended the test tool to support singlestepping to better highlight the core feature of altp2m view switching. Signed-off-by: Tamas K Lengyel Signed-off-by: Ed White Reviewed-by: Razvan Cojocaru Acked-by: Wei Liu --- Changes since v6

[Xen-devel] [PATCH v7 14/15] tools/libxc: add support to altp2m hvmops

2015-07-22 Thread Ed White
From: Tamas K Lengyel Wrappers to issue altp2m hvmops. Signed-off-by: Tamas K Lengyel Signed-off-by: Ravi Sahita Acked-by: Ian Campbell --- Changes since v6: no changes tools/libxc/Makefile | 1 + tools/libxc/include/xenctrl.h | 22 tools/libxc/xc_altp2m.c |

[Xen-devel] [PATCH v7 13/15] x86/altp2m: XSM hooks for altp2m HVM ops

2015-07-22 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita Acked-by: Daniel De Graaf --- Changes since v6: no changes tools/flask/policy/policy/modules/xen/xen.if | 4 ++-- xen/arch/x86/hvm/hvm.c | 6 ++ xen/include/xsm/dummy.h | 12 xe

[Xen-devel] [PATCH v7 12/15] x86/altp2m: Add altp2mhvm HVM domain parameter.

2015-07-22 Thread Ed White
The altp2mhvm and nestedhvm parameters are mutually exclusive and cannot be set together. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: Wei Liu --- Changes since v6: no changes docs/man/xl.cfg.pod.5 | 12 tools/libxl/libxl.h | 6

[Xen-devel] [PATCH v7 11/15] x86/altp2m: define and implement alternate p2m HVMOP types.

2015-07-22 Thread Ed White
Signed-off-by: Ed White Acked-by: Jan Beulich --- Changes since v6: fix cmd range check rework domain locking add Jan's ack xen/arch/x86/hvm/hvm.c | 138 xen/include/public/hvm/hvm_op.h

[Xen-devel] [PATCH v7 10/15] x86/altp2m: add remaining support routines.

2015-07-22 Thread Ed White
Add the remaining routines required to support enabling the alternate p2m functionality. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- Changes since v6: rename altp2m lazy copier, make bool_t, use __put_gfn throughout, and move to p2m.c, eliminating altp2m_hap.c

[Xen-devel] [PATCH v7 08/15] x86/altp2m: add control of suppress_ve.

2015-07-22 Thread Ed White
From: George Dunlap The existing ept_set_entry() and ept_get_entry() routines are extended to optionally set/get suppress_ve. Passing -1 will set suppress_ve on new p2m entries, or retain suppress_ve flag on existing entries. Signed-off-by: George Dunlap Signed-off-by: Ravi Sahita Reviewed-b

[Xen-devel] [PATCH v7 09/15] x86/altp2m: alternate p2m memory events.

2015-07-22 Thread Ed White
Add a flag to indicate that a memory event occurred in an alternate p2m and a field containing the p2m index. Allow any event response to switch to a different alternate p2m using the same flag and field. Modify p2m_mem_access_check() to handle alternate p2m's. Signed-off-by: Ed White Ack

[Xen-devel] [PATCH v7 07/15] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator.

2015-07-22 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita Acked-by: Jan Beulich --- Changes since v6: remove incorrect cast add Jan's ack xen/arch/x86/hvm/emulate.c | 18 +++-- xen/arch/x86/hvm/vmx/vmx.c | 36 ++ xen/arch

[Xen-devel] [PATCH v7 05/15] x86/altp2m: basic data structures and support routines.

2015-07-22 Thread Ed White
lso splits the p2m lock into one lock type for altp2m's and another type for all other p2m's. The purpose of this is to place the altp2m list lock between the types, so the list lock can be acquired whilst holding the host p2m lock. Signed-off-by: Ed White --- Changes since v6:

[Xen-devel] [PATCH v7 03/15] VMX: implement suppress #VE.

2015-07-22 Thread Ed White
t EPT violations only the hypervisor is able to handle the violation. Signed-off-by: Ed White Acked-by: George Dunlap Acked-by: Jun Nakajima --- Changes since v6: add Jun's ack xen/arch/x86/mm/p2m-ept.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff -

[Xen-devel] [PATCH v7 06/15] VMX/altp2m: add code to support EPTP switching and #VE.

2015-07-22 Thread Ed White
Implement and hook up the code to enable VMX support of VMFUNC and #VE. VMFUNC leaf 0 (EPTP switching) emulation is added in a later patch. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: Jun Nakajima --- Changes since v6: remove casts around p2midx handling fix

[Xen-devel] [PATCH v7 02/15] VMX: VMFUNC and #VE definitions and detection.

2015-07-22 Thread Ed White
Currently, neither is enabled globally but may be enabled on a per-VCPU basis by the altp2m code. Remove the check for EPTE bit 63 == zero in ept_split_super_page(), as that bit is now hardware-defined. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: George Dunlap Acked-by: Jun

[Xen-devel] [PATCH v7 04/15] x86/HVM: Hardware alternate p2m support detection.

2015-07-22 Thread Ed White
As implemented here, only supported on platforms with VMX HAP. By default this functionality is force-disabled, it can be enabled by specifying altp2m=1 on the Xen command line. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- Changes since v6: no changes docs/misc/xen-command

[Xen-devel] [PATCH v7 01/15] common/domain: Helpers to pause a domain while in context

2015-07-22 Thread Ed White
From: Andrew Cooper For use on codepaths which would need to use domain_pause() but might be in the target domain's context. In the case that the target domain is in context, all other vcpus are paused. Signed-off-by: Andrew Cooper Reviewed-by: George Dunlap --- Changes since v6: add

[Xen-devel] [PATCH v7 00/15] Alternate p2m: support multiple copies of host p2m

2015-07-22 Thread Ed White
on toolstack support for cross-domain testing with a slightly earlier patch series, and we hope he will submit that support. Not all of the patches will be of interest to everyone copied here. I've copied everyone on this initial mailing to give context. Andrew Cooper (1): common/do

[Xen-devel] [PATCH v6 13/15] x86/altp2m: XSM hooks for altp2m HVM ops

2015-07-20 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita Acked-by: Daniel De Graaf --- tools/flask/policy/policy/modules/xen/xen.if | 4 ++-- xen/arch/x86/hvm/hvm.c | 6 ++ xen/include/xsm/dummy.h | 12 xen/include/xsm/xsm.h

[Xen-devel] [PATCH v6 14/15] tools/libxc: add support to altp2m hvmops

2015-07-20 Thread Ed White
From: Tamas K Lengyel Wrappers to issue altp2m hvmops. Signed-off-by: Tamas K Lengyel Signed-off-by: Ravi Sahita Acked-by: Ian Campbell --- tools/libxc/Makefile | 1 + tools/libxc/include/xenctrl.h | 22 tools/libxc/xc_altp2m.c | 248 ++

[Xen-devel] [PATCH v6 12/15] x86/altp2m: Add altp2mhvm HVM domain parameter.

2015-07-20 Thread Ed White
The altp2mhvm and nestedhvm parameters are mutually exclusive and cannot be set together. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: Wei Liu --- docs/man/xl.cfg.pod.5 | 12 tools/libxl/libxl.h | 6 ++ tools/libxl/libxl_create.c

[Xen-devel] [PATCH v6 10/15] x86/altp2m: add remaining support routines.

2015-07-20 Thread Ed White
Add the remaining routines required to support enabling the alternate p2m functionality. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/hvm.c | 58 +- xen/arch/x86/mm/hap/Makefile | 1 + xen/arch/x86/mm/hap/altp2m_hap.c | 98 ++ xen/arch

[Xen-devel] [PATCH v6 15/15] tools/xen-access: altp2m testcases

2015-07-20 Thread Ed White
From: Tamas K Lengyel Working altp2m test-case. Extended the test tool to support singlestepping to better highlight the core feature of altp2m view switching. Signed-off-by: Tamas K Lengyel Signed-off-by: Ed White Reviewed-by: Razvan Cojocaru Acked-by: Wei Liu --- tools/tests/xen-access

[Xen-devel] [PATCH v6 11/15] x86/altp2m: define and implement alternate p2m HVMOP types.

2015-07-20 Thread Ed White
Signed-off-by: Ed White --- xen/arch/x86/hvm/hvm.c | 139 xen/include/public/hvm/hvm_op.h | 89 + 2 files changed, 228 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 38cf0c6..15973b4

[Xen-devel] [PATCH v6 08/15] x86/altp2m: add control of suppress_ve.

2015-07-20 Thread Ed White
From: George Dunlap The existing ept_set_entry() and ept_get_entry() routines are extended to optionally set/get suppress_ve. Passing -1 will set suppress_ve on new p2m entries, or retain suppress_ve flag on existing entries. Signed-off-by: George Dunlap Signed-off-by: Ravi Sahita Reviewed-b

[Xen-devel] [PATCH v6 09/15] x86/altp2m: alternate p2m memory events.

2015-07-20 Thread Ed White
Add a flag to indicate that a memory event occurred in an alternate p2m and a field containing the p2m index. Allow any event response to switch to a different alternate p2m using the same flag and field. Modify p2m_mem_access_check() to handle alternate p2m's. Signed-off-by: Ed White Ack

[Xen-devel] [PATCH v6 07/15] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator.

2015-07-20 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita --- xen/arch/x86/hvm/emulate.c | 18 +++-- xen/arch/x86/hvm/vmx/vmx.c | 36 ++ xen/arch/x86/x86_emulate/x86_emulate.c | 19 -- xen/arch/x86/x86_emulate/x86_emulate.h

[Xen-devel] [PATCH v6 06/15] VMX/altp2m: add code to support EPTP switching and #VE.

2015-07-20 Thread Ed White
Implement and hook up the code to enable VMX support of VMFUNC and #VE. VMFUNC leaf 0 (EPTP switching) emulation is added in a later patch. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: Jun Nakajima --- xen/arch/x86/hvm/vmx/vmx.c | 139

[Xen-devel] [PATCH v6 03/15] VMX: implement suppress #VE.

2015-07-20 Thread Ed White
t EPT violations only the hypervisor is able to handle the violation. Signed-off-by: Ed White Acked-by: George Dunlap --- xen/arch/x86/mm/p2m-ept.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 9a

[Xen-devel] [PATCH v6 02/15] VMX: VMFUNC and #VE definitions and detection.

2015-07-20 Thread Ed White
Currently, neither is enabled globally but may be enabled on a per-VCPU basis by the altp2m code. Remove the check for EPTE bit 63 == zero in ept_split_super_page(), as that bit is now hardware-defined. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: George Dunlap Acked-by: Jun

[Xen-devel] [PATCH v6 05/15] x86/altp2m: basic data structures and support routines.

2015-07-20 Thread Ed White
holding the host p2m lock. Signed-off-by: Ed White --- xen/arch/x86/hvm/Makefile| 1 + xen/arch/x86/hvm/altp2m.c| 77 + xen/arch/x86/hvm/hvm.c | 21 xen/arch/x86/mm/hap/hap.c| 38 ++- xen/arch/x86/mm/mm

[Xen-devel] [PATCH v6 04/15] x86/HVM: Hardware alternate p2m support detection.

2015-07-20 Thread Ed White
As implemented here, only supported on platforms with VMX HAP. By default this functionality is force-disabled, it can be enabled by specifying altp2m=1 on the Xen command line. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- docs/misc/xen-command-line.markdown | 7 +++ xen/arch

[Xen-devel] [PATCH v6 00/15] Alternate p2m: support multiple copies of host p2m

2015-07-20 Thread Ed White
ve context. Andrew Cooper (1): common/domain: Helpers to pause a domain while in context Ed White (9): VMX: VMFUNC and #VE definitions and detection. VMX: implement suppress #VE. x86/HVM: Hardware alternate p2m support detection. x86/altp2m: basic data structures and support routin

[Xen-devel] [PATCH v6 01/15] common/domain: Helpers to pause a domain while in context

2015-07-20 Thread Ed White
From: Andrew Cooper For use on codepaths which would need to use domain_pause() but might be in the target domain's context. In the case that the target domain is in context, all other vcpus are paused. Signed-off-by: Andrew Cooper --- xen/common/domain.c | 28

[Xen-devel] [PATCH v5 15/15] tools/xen-access: altp2m testcases

2015-07-13 Thread Ed White
From: Tamas K Lengyel Working altp2m test-case. Extended the test tool to support singlestepping to better highlight the core feature of altp2m view switching. Signed-off-by: Tamas K Lengyel Signed-off-by: Ed White Reviewed-by: Razvan Cojocaru --- tools/tests/xen-access/xen-access.c | 173

[Xen-devel] [PATCH v5 13/15] x86/altp2m: XSM hooks for altp2m HVM ops

2015-07-13 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita Acked-by: Daniel De Graaf --- tools/flask/policy/policy/modules/xen/xen.if | 4 ++-- xen/arch/x86/hvm/hvm.c | 6 ++ xen/include/xsm/dummy.h | 12 xen/include/xsm/xsm.h

[Xen-devel] [PATCH v5 14/15] tools/libxc: add support to altp2m hvmops

2015-07-13 Thread Ed White
From: Tamas K Lengyel Wrappers to issue altp2m hvmops. Signed-off-by: Tamas K Lengyel Signed-off-by: Ravi Sahita Acked-by: Ian Campbell --- tools/libxc/Makefile | 1 + tools/libxc/include/xenctrl.h | 21 tools/libxc/xc_altp2m.c | 237 +++

[Xen-devel] [PATCH v5 12/15] x86/altp2m: Add altp2mhvm HVM domain parameter.

2015-07-13 Thread Ed White
The altp2mhvm and nestedhvm parameters are mutually exclusive and cannot be set together. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: Wei Liu --- docs/man/xl.cfg.pod.5 | 12 tools/libxl/libxl.h | 6 ++ tools/libxl/libxl_create.c

[Xen-devel] [PATCH v5 11/15] x86/altp2m: define and implement alternate p2m HVMOP types.

2015-07-13 Thread Ed White
Signed-off-by: Ed White --- xen/arch/x86/hvm/hvm.c | 142 xen/include/public/hvm/hvm_op.h | 82 +++ 2 files changed, 224 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index a9f4b1b..df6c6b6

[Xen-devel] [PATCH v5 10/15] x86/altp2m: add remaining support routines.

2015-07-13 Thread Ed White
Add the remaining routines required to support enabling the alternate p2m functionality. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/hvm.c | 58 +- xen/arch/x86/mm/hap/Makefile | 1 + xen/arch/x86/mm/hap/altp2m_hap.c | 98 ++ xen/arch

[Xen-devel] [PATCH v5 05/15] x86/altp2m: basic data structures and support routines.

2015-07-13 Thread Ed White
holding the host p2m lock. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/Makefile| 1 + xen/arch/x86/hvm/altp2m.c| 77 + xen/arch/x86/hvm/hvm.c | 21 xen/arch/x86/mm/hap/hap.c| 38 ++-

[Xen-devel] [PATCH v5 07/15] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator.

2015-07-13 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita --- xen/arch/x86/hvm/emulate.c | 19 +++-- xen/arch/x86/hvm/vmx/vmx.c | 38 ++ xen/arch/x86/x86_emulate/x86_emulate.c | 19 +++-- xen/arch/x86/x86_emulate/x86_emulate.h |

[Xen-devel] [PATCH v5 08/15] x86/altp2m: add control of suppress_ve.

2015-07-13 Thread Ed White
From: George Dunlap The existing ept_set_entry() and ept_get_entry() routines are extended to optionally set/get suppress_ve. Passing -1 will set suppress_ve on new p2m entries, or retain suppress_ve flag on existing entries. Signed-off-by: George Dunlap Signed-off-by: Ravi Sahita Reviewed-b

[Xen-devel] [PATCH v5 09/15] x86/altp2m: alternate p2m memory events.

2015-07-13 Thread Ed White
Add a flag to indicate that a memory event occurred in an alternate p2m and a field containing the p2m index. Allow any event response to switch to a different alternate p2m using the same flag and field. Modify p2m_mem_access_check() to handle alternate p2m's. Signed-off-by: Ed White Ack

[Xen-devel] [PATCH v5 06/15] VMX/altp2m: add code to support EPTP switching and #VE.

2015-07-13 Thread Ed White
Implement and hook up the code to enable VMX support of VMFUNC and #VE. VMFUNC leaf 0 (EPTP switching) emulation is added in a later patch. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: Jun Nakajima --- xen/arch/x86/hvm/vmx/vmx.c | 138

[Xen-devel] [PATCH v5 04/15] x86/HVM: Hardware alternate p2m support detection.

2015-07-13 Thread Ed White
As implemented here, only supported on platforms with VMX HAP. By default this functionality is force-disabled, it can be enabled by specifying altp2m=1 on the Xen command line. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- docs/misc/xen-command-line.markdown | 7 +++ xen/arch

[Xen-devel] [PATCH v5 00/15] Alternate p2m: support multiple copies of host p2m

2015-07-13 Thread Ed White
ll be of interest to everyone copied here. I've copied everyone on this initial mailing to give context. Andrew Cooper (1): common/domain: Helpers to pause a domain while in context Ed White (9): VMX: VMFUNC and #VE definitions and detection. VMX: implement suppress #VE. x86/HVM: Hardwar

[Xen-devel] [PATCH v5 02/15] VMX: VMFUNC and #VE definitions and detection.

2015-07-13 Thread Ed White
Currently, neither is enabled globally but may be enabled on a per-VCPU basis by the altp2m code. Remove the check for EPTE bit 63 == zero in ept_split_super_page(), as that bit is now hardware-defined. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: George Dunlap Acked-by: Jun

[Xen-devel] [PATCH v5 01/15] common/domain: Helpers to pause a domain while in context

2015-07-13 Thread Ed White
From: Andrew Cooper For use on codepaths which would need to use domain_pause() but might be in the target domain's context. In the case that the target domain is in context, all other vcpus are paused. Signed-off-by: Andrew Cooper --- xen/common/domain.c | 28

[Xen-devel] [PATCH v5 03/15] VMX: implement suppress #VE.

2015-07-13 Thread Ed White
t EPT violations only the hypervisor is able to handle the violation. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Reviewed-by: George Dunlap Acked-by: Jun Nakajima --- xen/arch/x86/mm/p2m-ept.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xen/arch/x

[Xen-devel] [PATCH v4 15/15] tools/xen-access: altp2m testcases

2015-07-09 Thread Ed White
From: Tamas K Lengyel Working altp2m test-case. Extended the test tool to support singlestepping to better highlight the core feature of altp2m view switching. Signed-off-by: Tamas K Lengyel Signed-off-by: Ed White --- tools/tests/xen-access/xen-access.c | 173

[Xen-devel] [PATCH v4 14/15] tools/libxc: add support to altp2m hvmops

2015-07-09 Thread Ed White
From: Tamas K Lengyel Wrappers to issue altp2m hvmops. Signed-off-by: Tamas K Lengyel Signed-off-by: Ravi Sahita --- tools/libxc/Makefile | 1 + tools/libxc/include/xenctrl.h | 21 tools/libxc/xc_altp2m.c | 237 ++ 3 files changed

[Xen-devel] [PATCH v4 13/15] x86/altp2m: XSM hooks for altp2m HVM ops

2015-07-09 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita Acked-by: Daniel De Graaf --- tools/flask/policy/policy/modules/xen/xen.if | 4 ++-- xen/arch/x86/hvm/hvm.c | 6 ++ xen/include/xsm/dummy.h | 12 xen/include/xsm/xsm.h

[Xen-devel] [PATCH v4 12/15] x86/altp2m: Add altp2mhvm HVM domain parameter.

2015-07-09 Thread Ed White
The altp2mhvm and nestedhvm parameters are mutually exclusive and cannot be set together. Signed-off-by: Ed White Reviewed-by: Andrew Cooper for the hypervisor bits. --- docs/man/xl.cfg.pod.5 | 12 tools/libxl/libxl.h | 6 ++ tools/libxl/libxl_create.c

[Xen-devel] [PATCH v4 11/15] x86/altp2m: define and implement alternate p2m HVMOP types.

2015-07-09 Thread Ed White
Signed-off-by: Ed White --- xen/arch/x86/hvm/hvm.c | 138 xen/include/public/hvm/hvm_op.h | 82 2 files changed, 220 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index bda6c1e..23cd507

[Xen-devel] [PATCH v4 10/15] x86/altp2m: add remaining support routines.

2015-07-09 Thread Ed White
Add the remaining routines required to support enabling the alternate p2m functionality. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/hvm.c | 58 +- xen/arch/x86/mm/hap/Makefile | 1 + xen/arch/x86/mm/hap/altp2m_hap.c | 98 ++ xen/arch

[Xen-devel] [PATCH v4 09/15] x86/altp2m: alternate p2m memory events.

2015-07-09 Thread Ed White
Add a flag to indicate that a memory event occurred in an alternate p2m and a field containing the p2m index. Allow any event response to switch to a different alternate p2m using the same flag and field. Modify p2m_mem_access_check() to handle alternate p2m's. Signed-off-by: Ed White Ack

[Xen-devel] [PATCH v4 08/15] x86/altp2m: add control of suppress_ve.

2015-07-09 Thread Ed White
From: George Dunlap The existing ept_set_entry() and ept_get_entry() routines are extended to optionally set/get suppress_ve. Passing -1 will set suppress_ve on new p2m entries, or retain suppress_ve flag on existing entries. Signed-off-by: George Dunlap --- xen/arch/x86/mm/mem_sharing.c | 5

[Xen-devel] [PATCH v4 07/15] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator.

2015-07-09 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita --- xen/arch/x86/hvm/emulate.c | 19 +-- xen/arch/x86/hvm/vmx/vmx.c | 29 + xen/arch/x86/x86_emulate/x86_emulate.c | 20 +++- xen/arch/x86/x86_emulate/x86_emulate.h |

[Xen-devel] [PATCH v4 05/15] x86/altp2m: basic data structures and support routines.

2015-07-09 Thread Ed White
holding the host p2m lock. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/Makefile| 1 + xen/arch/x86/hvm/altp2m.c| 92 + xen/arch/x86/hvm/hvm.c | 21 + xen/arch/x86/mm/hap/hap.c| 32 ++

[Xen-devel] [PATCH v4 06/15] VMX/altp2m: add code to support EPTP switching and #VE.

2015-07-09 Thread Ed White
Implement and hook up the code to enable VMX support of VMFUNC and #VE. VMFUNC leaf 0 (EPTP switching) emulation is added in a later patch. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: Jun Nakajima --- xen/arch/x86/hvm/vmx/vmx.c | 138

[Xen-devel] [PATCH v4 04/15] x86/HVM: Hardware alternate p2m support detection.

2015-07-09 Thread Ed White
As implemented here, only supported on platforms with VMX HAP. By default this functionality is force-disabled, it can be enabled by specifying altp2m=1 on the Xen command line. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- docs/misc/xen-command-line.markdown | 7 +++ xen/arch

[Xen-devel] [PATCH v4 02/15] VMX: VMFUNC and #VE definitions and detection.

2015-07-09 Thread Ed White
Currently, neither is enabled globally but may be enabled on a per-VCPU basis by the altp2m code. Remove the check for EPTE bit 63 == zero in ept_split_super_page(), as that bit is now hardware-defined. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Acked-by: George Dunlap Acked-by: Jun

[Xen-devel] [PATCH v4 00/15] Alternate p2m: support multiple copies of host p2m

2015-07-09 Thread Ed White
domain testing with a slightly earlier patch series, and we hope he will submit that support. Not all of the patches will be of interest to everyone copied here. I've copied everyone on this initial mailing to give context. Andrew Cooper (1): common/domain: Helpers to pause a domain whil

[Xen-devel] [PATCH v4 03/15] VMX: implement suppress #VE.

2015-07-09 Thread Ed White
t EPT violations only the hypervisor is able to handle the violation. Signed-off-by: Ed White Reviewed-by: Andrew Cooper Reviewed-by: George Dunlap Acked-by: Jun Nakajima --- xen/arch/x86/mm/p2m-ept.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git

[Xen-devel] [PATCH v4 01/15] common/domain: Helpers to pause a domain while in context

2015-07-09 Thread Ed White
From: Andrew Cooper For use on codepaths which would need to use domain_pause() but might be in the target domain's context. In the case that the target domain is in context, all other vcpus are paused. Signed-off-by: Andrew Cooper --- xen/common/domain.c | 28

Re: [Xen-devel] [PATCH v2 07/12] x86/altp2m: add control of suppress_ve.

2015-07-07 Thread Ed White
On 07/07/2015 03:10 AM, George Dunlap wrote: > On 07/06/2015 07:43 PM, Ed White wrote: >>> Introducing yet another layer -- particularly in a hooked interface like >>> this -- just seems clunky. It's not the worst thing in the world; if I >>> thought this would

Re: [Xen-devel] [PATCH v3 05/13] x86/altp2m: basic data structures and support routines.

2015-07-07 Thread Ed White
On 07/07/2015 08:22 AM, Tim Deegan wrote: > At 16:04 +0100 on 07 Jul (1436285059), George Dunlap wrote: >> On 07/01/2015 07:09 PM, Ed White wrote: >>> diff --git a/xen/arch/x86/mm/mm-locks.h b/xen/arch/x86/mm/mm-locks.h >>> index b4f035e..301ca59 100644 >>&

Re: [Xen-devel] [PATCH v3 12/13] x86/altp2m: Add altp2mhvm HVM domain parameter.

2015-07-06 Thread Ed White
On 07/06/2015 11:18 AM, Wei Liu wrote: > On Mon, Jul 06, 2015 at 11:01:27AM -0700, Ed White wrote: >> On 07/06/2015 10:49 AM, Wei Liu wrote: >>>> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl >>>> index 23f27d4..66a89cf 100644 >&

Re: [Xen-devel] [PATCH v2 07/12] x86/altp2m: add control of suppress_ve.

2015-07-06 Thread Ed White
On 07/06/2015 11:29 AM, George Dunlap wrote: > On 07/06/2015 06:35 PM, Ed White wrote: >> On 07/06/2015 10:12 AM, George Dunlap wrote: >>> On Fri, Jun 26, 2015 at 5:27 PM, Ed White wrote: >>>> On 06/25/2015 11:04 PM, Jan Beulich wrote: >>>>>>>&

Re: [Xen-devel] [PATCH v3 11/13] x86/altp2m: define and implement alternate p2m HVMOP types.

2015-07-06 Thread Ed White
On 07/06/2015 10:08 AM, Ian Jackson wrote: > Ed White writes ("Re: [Xen-devel] [PATCH v3 11/13] x86/altp2m: define and > implement alternate p2m HVMOP types."): >> On 07/06/2015 03:09 AM, Andrew Cooper wrote: >>> I am still very much unconvinced by the a

Re: [Xen-devel] [PATCH v3 12/13] x86/altp2m: Add altp2mhvm HVM domain parameter.

2015-07-06 Thread Ed White
On 07/06/2015 10:49 AM, Wei Liu wrote: >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl >> index 23f27d4..66a89cf 100644 >> --- a/tools/libxl/libxl_types.idl >> +++ b/tools/libxl/libxl_types.idl >> @@ -437,6 +437,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ >

Re: [Xen-devel] [PATCH v2 07/12] x86/altp2m: add control of suppress_ve.

2015-07-06 Thread Ed White
On 07/06/2015 10:12 AM, George Dunlap wrote: > On Fri, Jun 26, 2015 at 5:27 PM, Ed White wrote: >> On 06/25/2015 11:04 PM, Jan Beulich wrote: >>>>>> On 25.06.15 at 18:36, wrote: >>>> On 06/25/2015 01:12 AM, Jan Beulich wrote: >>>>>>>&

Re: [Xen-devel] [PATCH v3 05/13] x86/altp2m: basic data structures and support routines.

2015-07-06 Thread Ed White
On 07/06/2015 02:56 AM, Jan Beulich wrote: >>>> On 03.07.15 at 18:22, wrote: >> On 01/07/15 19:09, Ed White wrote: >>> Add the basic data structures needed to support alternate p2m's and >>> the functions to initialise them and tear them down. >>>

Re: [Xen-devel] [PATCH v3 11/13] x86/altp2m: define and implement alternate p2m HVMOP types.

2015-07-06 Thread Ed White
On 07/06/2015 03:09 AM, Andrew Cooper wrote: > On 01/07/15 19:09, Ed White wrote: >> Signed-off-by: Ed White > > I am still very much unconvinced by the argument against having a single > HVMOP_altp2m and a set of subops. do_domctl() and do_sysctl() are > examples of a

Re: [Xen-devel] [PATCH v3 05/13] x86/altp2m: basic data structures and support routines.

2015-07-06 Thread Ed White
On 07/03/2015 09:22 AM, Andrew Cooper wrote: > On 01/07/15 19:09, Ed White wrote: >> Add the basic data structures needed to support alternate p2m's and >> the functions to initialise them and tear them down. >> >> Although Intel hardware can handle 512 EPTP'

[Xen-devel] [PATCH v3 13/13] x86/altp2m: XSM hooks for altp2m HVM ops

2015-07-01 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita --- tools/flask/policy/policy/modules/xen/xen.if | 4 +- xen/arch/x86/hvm/hvm.c | 118 --- xen/include/xsm/dummy.h | 12 +++ xen/include/xsm/xsm.h| 12 +++

[Xen-devel] [PATCH v3 12/13] x86/altp2m: Add altp2mhvm HVM domain parameter.

2015-07-01 Thread Ed White
The altp2mhvm and nestedhvm parameters are mutually exclusive and cannot be set together. Signed-off-by: Ed White --- docs/man/xl.cfg.pod.5 | 12 tools/libxl/libxl_create.c | 1 + tools/libxl/libxl_dom.c | 2 ++ tools/libxl/libxl_types.idl | 1 + tools

[Xen-devel] [PATCH v3 10/13] x86/altp2m: add remaining support routines.

2015-07-01 Thread Ed White
Add the remaining routines required to support enabling the alternate p2m functionality. Signed-off-by: Ed White --- xen/arch/x86/hvm/hvm.c | 58 +- xen/arch/x86/mm/hap/Makefile | 1 + xen/arch/x86/mm/hap/altp2m_hap.c | 98 ++ xen/arch/x86/mm/p2m-ept.c| 3

[Xen-devel] [PATCH v3 08/13] x86/altp2m: add control of suppress_ve.

2015-07-01 Thread Ed White
pointers are added to p2m_domain to allow direct access to the extended routines. Signed-off-by: Ed White --- xen/arch/x86/mm/p2m-ept.c | 40 +--- xen/include/asm-x86/p2m.h | 13 + 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/xen

[Xen-devel] [PATCH v3 09/13] x86/altp2m: alternate p2m memory events.

2015-07-01 Thread Ed White
Add a flag to indicate that a memory event occurred in an alternate p2m and a field containing the p2m index. Allow any event response to switch to a different alternate p2m using the same flag and field. Modify p2m_memory_access_check() to handle alternate p2m's. Signed-off-by: Ed

[Xen-devel] [PATCH v3 11/13] x86/altp2m: define and implement alternate p2m HVMOP types.

2015-07-01 Thread Ed White
Signed-off-by: Ed White --- xen/arch/x86/hvm/hvm.c | 201 xen/include/public/hvm/hvm_op.h | 69 ++ 2 files changed, 270 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index d2d90c8..0d81050 100644 --- a

[Xen-devel] [PATCH v3 03/13] VMX: implement suppress #VE.

2015-07-01 Thread Ed White
t EPT violations only the hypervisor is able to handle the violation. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- xen/arch/x86/mm/p2m-ept.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-

[Xen-devel] [PATCH v3 00/12] Alternate p2m: support multiple copies of host p2m

2015-07-01 Thread Ed White
t support. Not all of the patches will be of interest to everyone copied here. I've copied everyone on this initial mailing to give context. Andrew Cooper (1): common/domain: Helpers to pause a domain while in context Ed White (10): VMX: VMFUNC and #VE definitions and detection.

[Xen-devel] [PATCH v3 05/13] x86/altp2m: basic data structures and support routines.

2015-07-01 Thread Ed White
holding the host p2m lock. Signed-off-by: Ed White --- xen/arch/x86/hvm/Makefile| 1 + xen/arch/x86/hvm/altp2m.c| 92 + xen/arch/x86/hvm/hvm.c | 21 + xen/arch/x86/mm/hap/hap.c| 31 - xen/arch/x86/mm/m

[Xen-devel] [PATCH v3 07/13] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator.

2015-07-01 Thread Ed White
From: Ravi Sahita Signed-off-by: Ravi Sahita --- xen/arch/x86/hvm/emulate.c | 12 +++-- xen/arch/x86/hvm/vmx/vmx.c | 30 + xen/arch/x86/x86_emulate/x86_emulate.c | 48 +- xen/arch/x86/x86_emulate/x86_emulate.h | 4

[Xen-devel] [PATCH v3 06/13] VMX/altp2m: add code to support EPTP switching and #VE.

2015-07-01 Thread Ed White
Implement and hook up the code to enable VMX support of VMFUNC and #VE. VMFUNC leaf 0 (EPTP switching) emulation is added in a later patch. Signed-off-by: Ed White --- xen/arch/x86/hvm/vmx/vmx.c | 138 + 1 file changed, 138 insertions(+) diff --git

[Xen-devel] [PATCH v3 01/13] common/domain: Helpers to pause a domain while in context

2015-07-01 Thread Ed White
From: Andrew Cooper For use on codepaths which would need to use domain_pause() but might be in the target domain's context. In the case that the target domain is in context, all other vcpus are paused. Signed-off-by: Andrew Cooper --- xen/common/domain.c | 28

[Xen-devel] [PATCH v3 04/13] x86/HVM: Hardware alternate p2m support detection.

2015-07-01 Thread Ed White
As implemented here, only supported on platforms with VMX HAP. By default this functionality is force-disabled, it can be enabled by specifying altp2m=1 on the Xen command line. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- docs/misc/xen-command-line.markdown | 7 +++ xen/arch

[Xen-devel] [PATCH v3 02/13] VMX: VMFUNC and #VE definitions and detection.

2015-07-01 Thread Ed White
Currently, neither is enabled globally but may be enabled on a per-VCPU basis by the altp2m code. Remove the check for EPTE bit 63 == zero in ept_split_super_page(), as that bit is now hardware-defined. Signed-off-by: Ed White Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/vmx/vmcs.c

Re: [Xen-devel] [PATCH v2 09/12] x86/altp2m: add remaining support routines.

2015-06-29 Thread Ed White
On 06/29/2015 06:03 AM, Andrew Cooper wrote: > On 26/06/15 17:30, Ed White wrote: >> On 06/24/2015 11:19 AM, Andrew Cooper wrote: >>> On 24/06/15 18:47, Ed White wrote: >>>>>> This looks like some hoop jumping around the assertions in >>>>>> do

Re: [Xen-devel] [PATCH v2 04/12] x86/altp2m: basic data structures and support routines.

2015-06-29 Thread Ed White
On 06/29/2015 06:00 AM, Andrew Cooper wrote: > On 26/06/15 22:17, Ed White wrote: >> On 06/24/2015 03:29 AM, Andrew Cooper wrote: >>> On 22/06/15 19:56, Ed White wrote: >>>> diff --git a/xen/include/asm-x86/hvm/vcpu.h >>>> b/xen/include/asm-x86/hvm

Re: [Xen-devel] [PATCH v2 02/12] VMX: implement suppress #VE.

2015-06-29 Thread Ed White
On 06/29/2015 08:03 AM, George Dunlap wrote: > On Mon, Jun 29, 2015 at 3:31 PM, Andrew Cooper > wrote: >> On 29/06/15 15:20, George Dunlap wrote: >>> On Mon, Jun 22, 2015 at 7:56 PM, Ed White wrote: >>>> In preparation for selectively enabling #VE in a later pa

Re: [Xen-devel] [PATCH v2 04/12] x86/altp2m: basic data structures and support routines.

2015-06-27 Thread Ed White
On 06/26/2015 02:17 PM, Ed White wrote: > On 06/24/2015 03:29 AM, Andrew Cooper wrote: >> On 22/06/15 19:56, Ed White wrote: >>> diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h >>> index 3d8f4dc..a1529c0 100644 >>> --- a/xen/incl

Re: [Xen-devel] [PATCH v2 04/12] x86/altp2m: basic data structures and support routines.

2015-06-26 Thread Ed White
On 06/24/2015 03:29 AM, Andrew Cooper wrote: > On 22/06/15 19:56, Ed White wrote: >> diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h >> index 3d8f4dc..a1529c0 100644 >> --- a/xen/include/asm-x86/hvm/vcpu.h >> +++ b/xen/include/asm-x86/hvm/

Re: [Xen-devel] [PATCH v2 12/12] x86/altp2m: XSM hooks for altp2m HVM ops

2015-06-26 Thread Ed White
On 06/26/2015 12:24 PM, Daniel De Graaf wrote: > On 06/22/2015 02:56 PM, Ed White wrote: >> From: Ravi Sahita >> >> Signed-off-by: Ravi Sahita > > One comment, below. > > [...] >> diff --git a/tools/flask/policy/policy/modules/xen/xen.if >> b

Re: [Xen-devel] [PATCH v2 09/12] x86/altp2m: add remaining support routines.

2015-06-26 Thread Ed White
On 06/24/2015 11:19 AM, Andrew Cooper wrote: > On 24/06/15 18:47, Ed White wrote: >>>> This looks like some hoop jumping around the assertions in >>>> domain_pause() and vcpu_pause(). >>>> >>>> We should probably have some new helpers where th

Re: [Xen-devel] [PATCH v2 07/12] x86/altp2m: add control of suppress_ve.

2015-06-26 Thread Ed White
On 06/25/2015 11:04 PM, Jan Beulich wrote: On 25.06.15 at 18:36, wrote: >> On 06/25/2015 01:12 AM, Jan Beulich wrote: >> On 24.06.15 at 19:53, wrote: On 06/24/2015 07:38 AM, Jan Beulich wrote: On 22.06.15 at 20:56, wrote: >> --- a/xen/include/asm-x86/p2m.h >> +++ b

Re: [Xen-devel] [PATCH v2 09/12] x86/altp2m: add remaining support routines.

2015-06-25 Thread Ed White
On 06/25/2015 03:45 PM, Lengyel, Tamas wrote: > On Thu, Jun 25, 2015 at 4:46 PM, Ed White wrote: > >> On 06/25/2015 11:23 AM, Lengyel, Tamas wrote: >>> On Thu, Jun 25, 2015 at 12:48 PM, Ed White >> wrote: >>> >>>> On 06/25/2015 06:40 AM, Raz

Re: [Xen-devel] [PATCH v2 09/12] x86/altp2m: add remaining support routines.

2015-06-25 Thread Ed White
On 06/25/2015 11:23 AM, Lengyel, Tamas wrote: > On Thu, Jun 25, 2015 at 12:48 PM, Ed White wrote: > >> On 06/25/2015 06:40 AM, Razvan Cojocaru wrote: >>> On 06/25/2015 03:44 PM, Lengyel, Tamas wrote: >>>> On Wed, Jun 24, 2015 at 2:06 PM, Ed White >>>

Re: [Xen-devel] [PATCH v2 00/12] Alternate p2m: support multiple copies of host p2m

2015-06-25 Thread Ed White
On 06/25/2015 10:29 AM, Lengyel, Tamas wrote: >> >> I plan to fix the bug, such that unshare will always occur before a copy. >> I don't plan to make the altp2m's able to have shared pages. >> >> Ed >> > > For now that is of course fine, memsharing is experimental and that's what > I meant above.

Re: [Xen-devel] [PATCH v2 09/12] x86/altp2m: add remaining support routines.

2015-06-25 Thread Ed White
On 06/25/2015 10:42 AM, Lengyel, Tamas wrote: > On Thu, Jun 25, 2015 at 12:31 PM, Ed White wrote: > >> On 06/24/2015 07:44 PM, Lengyel, Tamas wrote: >>>> +if ( altp2m_active ) >>>> +{ >>>> +if ( altp2mhvm_hap_nested_p

  1   2   3   >