From: "Jan Beulich" Subject: [PATCH 08/11] hvmctl: convert HVMOP_inject_trap Date: Mon, 20 Jun 2016 06:56:41 -0600 Message-ID: <5768042902000078000F6BFA@prv-mh.provo.novell.com> References: <5768002C02000078000F6B8D@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartA99F9419.3__=" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEynN-0007N4-8w for xen-devel@lists.xenproject.org; Mon, 20 Jun 2016 12:59:17 +0000 In-Reply-To: <5768002C02000078000F6B8D@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Paul Durrant , dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartA99F9419.3__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Signed-off-by: Jan Beulich --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -584,31 +584,15 @@ int xc_hvm_inject_trap( uint32_t type, uint32_t error_code, uint32_t insn_len, uint64_t cr2) { - DECLARE_HYPERCALL_BUFFER(struct xen_hvm_inject_trap, arg); - int rc; + DECLARE_HVMCTL(inject_trap, dom, + .vcpuid =3D vcpu, + .type =3D type, + .vector =3D vector, + .insn_len =3D insn_len, + .error_code =3D error_code, + .cr2 =3D cr2); =20 - arg =3D xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg)); - if ( arg =3D=3D NULL ) - { - PERROR("Could not allocate memory for xc_hvm_inject_trap = hypercall"); - return -1; - } - - arg->domid =3D dom; - arg->vcpuid =3D vcpu; - arg->vector =3D vector; - arg->type =3D type; - arg->error_code =3D error_code; - arg->insn_len =3D insn_len; - arg->cr2 =3D cr2; - - rc =3D xencall2(xch->xcall, __HYPERVISOR_hvm_op, - HVMOP_inject_trap, - HYPERCALL_BUFFER_AS_ARG(arg)); - - xc_hypercall_buffer_free(xch, arg); - - return rc; + return do_hvmctl(xch, &hvmctl); } =20 int xc_livepatch_upload(xc_interface *xch, --- a/tools/tests/xen-access/xen-access.c +++ b/tools/tests/xen-access/xen-access.c @@ -41,6 +41,7 @@ #include #include #include +#include =20 #if defined(__arm__) || defined(__aarch64__) #include @@ -643,7 +644,7 @@ int main(int argc, char *argv[]) /* Reinject */ rc =3D xc_hvm_inject_trap( xch, domain_id, req.vcpu_id, 3, - HVMOP_TRAP_sw_exc, -1, 0, 0); + XEN_HVMCTL_TRAP_sw_exc, -1, 0, 0); if (rc < 0) { ERROR("Error %d injecting breakpoint\n", rc); --- a/xen/arch/x86/hvm/control.c +++ b/xen/arch/x86/hvm/control.c @@ -91,6 +91,32 @@ static int track_dirty_vram(struct domai : hap_track_dirty_vram(d, op->first_gfn, op->nr, op->dirty_bitm= ap); } =20 +static int inject_trap(struct domain *d, + const struct xen_hvm_inject_trap *op) +{ + struct vcpu *v; + + if ( !is_hvm_domain(d) ) + return -EINVAL; + + if ( op->rsvd8 || op->rsvd32 ) + return -EINVAL; + + if ( op->vcpuid >=3D d->max_vcpus || (v =3D d->vcpu[op->vcpuid]) = =3D=3D NULL ) + return -ENOENT; + + if ( v->arch.hvm_vcpu.inject_trap.vector !=3D -1 ) + return -EBUSY; + + v->arch.hvm_vcpu.inject_trap.vector =3D op->vector; + v->arch.hvm_vcpu.inject_trap.type =3D op->type; + v->arch.hvm_vcpu.inject_trap.error_code =3D op->error_code; + v->arch.hvm_vcpu.inject_trap.insn_len =3D op->insn_len; + v->arch.hvm_vcpu.inject_trap.cr2 =3D op->cr2; + + return 0; +} + /* * Note that this value is effectively part of the ABI, even if we don't = need * to make it a formal part of it. Hence this value may only be changed = if @@ -265,6 +291,10 @@ long do_hvmctl(XEN_GUEST_HANDLE_PARAM(xe rc =3D set_mem_type(d, &op.u.set_mem_type, &iter); break; =20 + case XEN_HVMCTL_inject_trap: + rc =3D inject_trap(d, &op.u.inject_trap); + break; + default: rc =3D -EOPNOTSUPP; break; --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -5366,48 +5366,6 @@ long do_hvm_op(unsigned long op, XEN_GUE break; } =20 - case HVMOP_inject_trap:=20 - { - xen_hvm_inject_trap_t tr; - struct domain *d; - struct vcpu *v; - - if ( copy_from_guest(&tr, arg, 1 ) ) - return -EFAULT; - - rc =3D rcu_lock_remote_domain_by_id(tr.domid, &d); - if ( rc !=3D 0 ) - return rc; - - rc =3D -EINVAL; - if ( !is_hvm_domain(d) ) - goto injtrap_fail; - - rc =3D xsm_hvm_control(XSM_DM_PRIV, d, op); - if ( rc ) - goto injtrap_fail; - - rc =3D -ENOENT; - if ( tr.vcpuid >=3D d->max_vcpus || (v =3D d->vcpu[tr.vcpuid]) = =3D=3D NULL ) - goto injtrap_fail; - =20 - if ( v->arch.hvm_vcpu.inject_trap.vector !=3D -1 ) - rc =3D -EBUSY; - else=20 - { - v->arch.hvm_vcpu.inject_trap.vector =3D tr.vector; - v->arch.hvm_vcpu.inject_trap.type =3D tr.type; - v->arch.hvm_vcpu.inject_trap.error_code =3D tr.error_code; - v->arch.hvm_vcpu.inject_trap.insn_len =3D tr.insn_len; - v->arch.hvm_vcpu.inject_trap.cr2 =3D tr.cr2; - rc =3D 0; - } - - injtrap_fail: - rcu_unlock_domain(d); - break; - } - case HVMOP_guest_request_vm_event: if ( guest_handle_is_null(arg) ) vm_event_monitor_guest_request(); --- a/xen/include/public/hvm/control.h +++ b/xen/include/public/hvm/control.h @@ -89,6 +89,37 @@ struct xen_hvm_set_mem_type { uint64_aligned_t first_gfn; }; =20 +/* XEN_HVMCTL_inject_trap */ +/* + * Inject a trap into a VCPU, which will get taken up on the next + * scheduling of it. Note that the caller should know enough of the + * state of the CPU before injecting, to know what the effect of + * injecting the trap will be. + */ +struct xen_hvm_inject_trap { + /* VCPU */ + uint32_t vcpuid; + /* Trap type (XEN_HVMCTL_TRAP_*). */ + uint8_t type; +/* NB. This enumeration precisely matches hvm.h:X86_EVENTTYPE_*. */ +#define XEN_HVMCTL_TRAP_ext_int 0 /* external interrupt */ +#define XEN_HVMCTL_TRAP_nmi 2 /* NMI */ +#define XEN_HVMCTL_TRAP_hw_exc 3 /* hardware exception */ +#define XEN_HVMCTL_TRAP_sw_int 4 /* software interrupt (CD nn) */ +#define XEN_HVMCTL_TRAP_pri_sw_exc 5 /* ICEBP (F1) */ +#define XEN_HVMCTL_TRAP_sw_exc 6 /* INT3 (CC), INTO (CE) */ + /* Vector number. */ + uint8_t vector; + /* Instruction length. */ + uint8_t insn_len; + uint8_t rsvd8; + /* Error code, or ~0u to skip. */ + uint32_t error_code; + uint32_t rsvd32; + /* CR2 for page faults. */ + uint64_aligned_t cr2; +}; + struct xen_hvmctl { uint16_t interface_version; /* XEN_HVMCTL_INTERFACE_VERSION */ domid_t domain; @@ -99,6 +130,7 @@ struct xen_hvmctl { #define XEN_HVMCTL_track_dirty_vram 4 #define XEN_HVMCTL_modified_memory 5 #define XEN_HVMCTL_set_mem_type 6 +#define XEN_HVMCTL_inject_trap 7 uint16_t opaque; /* Must be zero on initial invocation. = */ union { struct xen_hvm_set_pci_intx_level set_pci_intx_level; @@ -107,6 +139,7 @@ struct xen_hvmctl { struct xen_hvm_track_dirty_vram track_dirty_vram; struct xen_hvm_modified_memory modified_memory; struct xen_hvm_set_mem_type set_mem_type; + struct xen_hvm_inject_trap inject_trap; uint8_t pad[120]; } u; }; --- a/xen/include/public/hvm/hvm_op.h +++ b/xen/include/public/hvm/hvm_op.h @@ -123,49 +123,6 @@ struct xen_hvm_xentrace { typedef struct xen_hvm_xentrace xen_hvm_xentrace_t; DEFINE_XEN_GUEST_HANDLE(xen_hvm_xentrace_t); =20 -/* Following tools-only interfaces may change in future. */ -#if defined(__XEN__) || defined(__XEN_TOOLS__) - -/* Deprecated by XENMEM_access_op_set_access */ -#define HVMOP_set_mem_access 12 - -/* Deprecated by XENMEM_access_op_get_access */ -#define HVMOP_get_mem_access 13 - -#define HVMOP_inject_trap 14 -/* Inject a trap into a VCPU, which will get taken up on the next - * scheduling of it. Note that the caller should know enough of the - * state of the CPU before injecting, to know what the effect of - * injecting the trap will be. - */ -struct xen_hvm_inject_trap { - /* Domain to be queried. */ - domid_t domid; - /* VCPU */ - uint32_t vcpuid; - /* Vector number */ - uint32_t vector; - /* Trap type (HVMOP_TRAP_*) */ - uint32_t type; -/* NB. This enumeration precisely matches hvm.h:X86_EVENTTYPE_* */ -# define HVMOP_TRAP_ext_int 0 /* external interrupt */ -# define HVMOP_TRAP_nmi 2 /* nmi */ -# define HVMOP_TRAP_hw_exc 3 /* hardware exception */ -# define HVMOP_TRAP_sw_int 4 /* software interrupt (CD nn) */ -# define HVMOP_TRAP_pri_sw_exc 5 /* ICEBP (F1) */ -# define HVMOP_TRAP_sw_exc 6 /* INT3 (CC), INTO (CE) */ - /* Error code, or ~0u to skip */ - uint32_t error_code; - /* Intruction length */ - uint32_t insn_len; - /* CR2 for page faults */ - uint64_aligned_t cr2; -}; -typedef struct xen_hvm_inject_trap xen_hvm_inject_trap_t; -DEFINE_XEN_GUEST_HANDLE(xen_hvm_inject_trap_t); - -#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */ - #define HVMOP_get_mem_type 15 /* Return hvmmem_type_t for the specified pfn. */ struct xen_hvm_get_mem_type { --- a/xen/xsm/flask/policy/access_vectors +++ b/xen/xsm/flask/policy/access_vectors @@ -273,8 +273,7 @@ class hvm # XEN_HVMCTL_track_dirty_vram trackdirtyvram # XEN_HVMCTL_modified_memory, HVMOP_get_mem_type, XEN_HVMCTL_set_mem_type,= -# HVMOP_set_mem_access, HVMOP_get_mem_access, HVMOP_pagetable_dying, -# HVMOP_inject_trap +# HVMOP_pagetable_dying, XEN_HVMCTL_inject_trap hvmctl # XEN_DOMCTL_mem_sharing_op and XENMEM_sharing_op_{share,add_physmap} = with: # source =3D the domain making the hypercall --=__PartA99F9419.3__= Content-Type: text/plain; name="hvmctl-07.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="hvmctl-07.patch" hvmctl: convert HVMOP_inject_trap=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/tools/libxc/xc_misc.c=0A+++ b/tools/libxc/xc= _misc.c=0A@@ -584,31 +584,15 @@ int xc_hvm_inject_trap(=0A uint32_t = type, uint32_t error_code, uint32_t insn_len,=0A uint64_t cr2)=0A = {=0A- DECLARE_HYPERCALL_BUFFER(struct xen_hvm_inject_trap, arg);=0A- = int rc;=0A+ DECLARE_HVMCTL(inject_trap, dom,=0A+ = .vcpuid =3D vcpu,=0A+ .type =3D type,=0A+ = .vector =3D vector,=0A+ .insn_len =3D = insn_len,=0A+ .error_code =3D error_code,=0A+ = .cr2 =3D cr2);=0A =0A- arg =3D xc_hypercall_buffer_alloc(x= ch, arg, sizeof(*arg));=0A- if ( arg =3D=3D NULL )=0A- {=0A- = PERROR("Could not allocate memory for xc_hvm_inject_trap hypercall");=0A- = return -1;=0A- }=0A-=0A- arg->domid =3D dom;=0A- = arg->vcpuid =3D vcpu;=0A- arg->vector =3D vector;=0A- = arg->type =3D type;=0A- arg->error_code =3D error_code;=0A- = arg->insn_len =3D insn_len;=0A- arg->cr2 =3D cr2;=0A-=0A- = rc =3D xencall2(xch->xcall, __HYPERVISOR_hvm_op,=0A- = HVMOP_inject_trap,=0A- HYPERCALL_BUFFER_AS_ARG(arg));=0A-= =0A- xc_hypercall_buffer_free(xch, arg);=0A-=0A- return rc;=0A+ = return do_hvmctl(xch, &hvmctl);=0A }=0A =0A int xc_livepatch_upload(xc_inte= rface *xch,=0A--- a/tools/tests/xen-access/xen-access.c=0A+++ b/tools/tests= /xen-access/xen-access.c=0A@@ -41,6 +41,7 @@=0A #include =0A = #include =0A #include =0A+#include =0A =0A #if defined(__arm__) || defined(__aarch64__)=0A #include = =0A@@ -643,7 +644,7 @@ int main(int argc, char *argv[])=0A = /* Reinject */=0A rc =3D xc_hvm_inject_trap= (=0A xch, domain_id, req.vcpu_id, 3,=0A- = HVMOP_TRAP_sw_exc, -1, 0, 0);=0A+ XEN_HVMCTL_TRAP_s= w_exc, -1, 0, 0);=0A if (rc < 0)=0A {=0A = ERROR("Error %d injecting breakpoint\n", rc);=0A--- = a/xen/arch/x86/hvm/control.c=0A+++ b/xen/arch/x86/hvm/control.c=0A@@ -91,6 = +91,32 @@ static int track_dirty_vram(struct domai=0A : = hap_track_dirty_vram(d, op->first_gfn, op->nr, op->dirty_bitmap);=0A }=0A = =0A+static int inject_trap(struct domain *d,=0A+ = const struct xen_hvm_inject_trap *op)=0A+{=0A+ struct vcpu *v;=0A+=0A+ = if ( !is_hvm_domain(d) )=0A+ return -EINVAL;=0A+=0A+ if ( = op->rsvd8 || op->rsvd32 )=0A+ return -EINVAL;=0A+=0A+ if ( = op->vcpuid >=3D d->max_vcpus || (v =3D d->vcpu[op->vcpuid]) =3D=3D NULL = )=0A+ return -ENOENT;=0A+=0A+ if ( v->arch.hvm_vcpu.inject_trap.v= ector !=3D -1 )=0A+ return -EBUSY;=0A+=0A+ v->arch.hvm_vcpu.injec= t_trap.vector =3D op->vector;=0A+ v->arch.hvm_vcpu.inject_trap.type = =3D op->type;=0A+ v->arch.hvm_vcpu.inject_trap.error_code =3D = op->error_code;=0A+ v->arch.hvm_vcpu.inject_trap.insn_len =3D = op->insn_len;=0A+ v->arch.hvm_vcpu.inject_trap.cr2 =3D = op->cr2;=0A+=0A+ return 0;=0A+}=0A+=0A /*=0A * Note that this value is = effectively part of the ABI, even if we don't need=0A * to make it a = formal part of it. Hence this value may only be changed if=0A@@ -265,6 = +291,10 @@ long do_hvmctl(XEN_GUEST_HANDLE_PARAM(xe=0A rc =3D = set_mem_type(d, &op.u.set_mem_type, &iter);=0A break;=0A =0A+ = case XEN_HVMCTL_inject_trap:=0A+ rc =3D inject_trap(d, &op.u.inject_= trap);=0A+ break;=0A+=0A default:=0A rc =3D -EOPNOTSUPP;= =0A break;=0A--- a/xen/arch/x86/hvm/hvm.c=0A+++ b/xen/arch/x86/hvm/= hvm.c=0A@@ -5366,48 +5366,6 @@ long do_hvm_op(unsigned long op, XEN_GUE=0A = break;=0A }=0A =0A- case HVMOP_inject_trap: =0A- {=0A- = xen_hvm_inject_trap_t tr;=0A- struct domain *d;=0A- = struct vcpu *v;=0A-=0A- if ( copy_from_guest(&tr, arg, 1 ) )=0A- = return -EFAULT;=0A-=0A- rc =3D rcu_lock_remote_domain_by_id(= tr.domid, &d);=0A- if ( rc !=3D 0 )=0A- return rc;=0A-=0A= - rc =3D -EINVAL;=0A- if ( !is_hvm_domain(d) )=0A- = goto injtrap_fail;=0A-=0A- rc =3D xsm_hvm_control(XSM_DM_PRIV, d, = op);=0A- if ( rc )=0A- goto injtrap_fail;=0A-=0A- = rc =3D -ENOENT;=0A- if ( tr.vcpuid >=3D d->max_vcpus || (v =3D = d->vcpu[tr.vcpuid]) =3D=3D NULL )=0A- goto injtrap_fail;=0A- = =0A- if ( v->arch.hvm_vcpu.inject_trap.vector !=3D -1 )=0A- = rc =3D -EBUSY;=0A- else =0A- {=0A- = v->arch.hvm_vcpu.inject_trap.vector =3D tr.vector;=0A- = v->arch.hvm_vcpu.inject_trap.type =3D tr.type;=0A- v->arch.hvm_v= cpu.inject_trap.error_code =3D tr.error_code;=0A- v->arch.hvm_vc= pu.inject_trap.insn_len =3D tr.insn_len;=0A- v->arch.hvm_vcpu.in= ject_trap.cr2 =3D tr.cr2;=0A- rc =3D 0;=0A- }=0A-=0A- = injtrap_fail:=0A- rcu_unlock_domain(d);=0A- break;=0A- = }=0A-=0A case HVMOP_guest_request_vm_event:=0A if ( guest_handl= e_is_null(arg) )=0A vm_event_monitor_guest_request();=0A--- = a/xen/include/public/hvm/control.h=0A+++ b/xen/include/public/hvm/control.h= =0A@@ -89,6 +89,37 @@ struct xen_hvm_set_mem_type {=0A uint64_aligned_t= first_gfn;=0A };=0A =0A+/* XEN_HVMCTL_inject_trap */=0A+/*=0A+ * Inject a = trap into a VCPU, which will get taken up on the next=0A+ * scheduling of = it. Note that the caller should know enough of the=0A+ * state of the CPU = before injecting, to know what the effect of=0A+ * injecting the trap will = be.=0A+ */=0A+struct xen_hvm_inject_trap {=0A+ /* VCPU */=0A+ = uint32_t vcpuid;=0A+ /* Trap type (XEN_HVMCTL_TRAP_*). */=0A+ = uint8_t type;=0A+/* NB. This enumeration precisely matches hvm.h:X86_EVENTT= YPE_*. */=0A+#define XEN_HVMCTL_TRAP_ext_int 0 /* external interrupt = */=0A+#define XEN_HVMCTL_TRAP_nmi 2 /* NMI */=0A+#define XEN_HVMCTL_= TRAP_hw_exc 3 /* hardware exception */=0A+#define XEN_HVMCTL_TRAP_sw_in= t 4 /* software interrupt (CD nn) */=0A+#define XEN_HVMCTL_TRAP_pri_sw_= exc 5 /* ICEBP (F1) */=0A+#define XEN_HVMCTL_TRAP_sw_exc 6 /* INT3 = (CC), INTO (CE) */=0A+ /* Vector number. */=0A+ uint8_t vector;=0A+ = /* Instruction length. */=0A+ uint8_t insn_len;=0A+ uint8_t = rsvd8;=0A+ /* Error code, or ~0u to skip. */=0A+ uint32_t error_code;= =0A+ uint32_t rsvd32;=0A+ /* CR2 for page faults. */=0A+ = uint64_aligned_t cr2;=0A+};=0A+=0A struct xen_hvmctl {=0A uint16_t = interface_version; /* XEN_HVMCTL_INTERFACE_VERSION */=0A domid_t = domain;=0A@@ -99,6 +130,7 @@ struct xen_hvmctl {=0A #define XEN_HVMCTL_trac= k_dirty_vram 4=0A #define XEN_HVMCTL_modified_memory = 5=0A #define XEN_HVMCTL_set_mem_type 6=0A+#define = XEN_HVMCTL_inject_trap 7=0A uint16_t opaque; = /* Must be zero on initial invocation. */=0A union {=0A = struct xen_hvm_set_pci_intx_level set_pci_intx_level;=0A@@ -107,6 +139,7 = @@ struct xen_hvmctl {=0A struct xen_hvm_track_dirty_vram = track_dirty_vram;=0A struct xen_hvm_modified_memory modified_memory= ;=0A struct xen_hvm_set_mem_type set_mem_type;=0A+ struct = xen_hvm_inject_trap inject_trap;=0A uint8_t pad[120];=0A } = u;=0A };=0A--- a/xen/include/public/hvm/hvm_op.h=0A+++ b/xen/include/public= /hvm/hvm_op.h=0A@@ -123,49 +123,6 @@ struct xen_hvm_xentrace {=0A typedef = struct xen_hvm_xentrace xen_hvm_xentrace_t;=0A DEFINE_XEN_GUEST_HANDLE(xen_= hvm_xentrace_t);=0A =0A-/* Following tools-only interfaces may change in = future. */=0A-#if defined(__XEN__) || defined(__XEN_TOOLS__)=0A-=0A-/* = Deprecated by XENMEM_access_op_set_access */=0A-#define HVMOP_set_mem_acces= s 12=0A-=0A-/* Deprecated by XENMEM_access_op_get_access */=0A-#defi= ne HVMOP_get_mem_access 13=0A-=0A-#define HVMOP_inject_trap = 14=0A-/* Inject a trap into a VCPU, which will get taken up on the = next=0A- * scheduling of it. Note that the caller should know enough of = the=0A- * state of the CPU before injecting, to know what the effect = of=0A- * injecting the trap will be.=0A- */=0A-struct xen_hvm_inject_trap = {=0A- /* Domain to be queried. */=0A- domid_t domid;=0A- /* VCPU = */=0A- uint32_t vcpuid;=0A- /* Vector number */=0A- uint32_t = vector;=0A- /* Trap type (HVMOP_TRAP_*) */=0A- uint32_t type;=0A-/* = NB. This enumeration precisely matches hvm.h:X86_EVENTTYPE_* */=0A-# = define HVMOP_TRAP_ext_int 0 /* external interrupt */=0A-# define = HVMOP_TRAP_nmi 2 /* nmi */=0A-# define HVMOP_TRAP_hw_exc 3 /* = hardware exception */=0A-# define HVMOP_TRAP_sw_int 4 /* software = interrupt (CD nn) */=0A-# define HVMOP_TRAP_pri_sw_exc 5 /* ICEBP (F1) = */=0A-# define HVMOP_TRAP_sw_exc 6 /* INT3 (CC), INTO (CE) */=0A- = /* Error code, or ~0u to skip */=0A- uint32_t error_code;=0A- /* = Intruction length */=0A- uint32_t insn_len;=0A- /* CR2 for page = faults */=0A- uint64_aligned_t cr2;=0A-};=0A-typedef struct xen_hvm_inje= ct_trap xen_hvm_inject_trap_t;=0A-DEFINE_XEN_GUEST_HANDLE(xen_hvm_inject_tr= ap_t);=0A-=0A-#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) = */=0A-=0A #define HVMOP_get_mem_type 15=0A /* Return hvmmem_type_t for = the specified pfn. */=0A struct xen_hvm_get_mem_type {=0A--- a/xen/xsm/flas= k/policy/access_vectors=0A+++ b/xen/xsm/flask/policy/access_vectors=0A@@ = -273,8 +273,7 @@ class hvm=0A # XEN_HVMCTL_track_dirty_vram=0A = trackdirtyvram=0A # XEN_HVMCTL_modified_memory, HVMOP_get_mem_type, = XEN_HVMCTL_set_mem_type,=0A-# HVMOP_set_mem_access, HVMOP_get_mem_access, = HVMOP_pagetable_dying,=0A-# HVMOP_inject_trap=0A+# HVMOP_pagetable_dying, = XEN_HVMCTL_inject_trap=0A hvmctl=0A # XEN_DOMCTL_mem_sharing_op and = XENMEM_sharing_op_{share,add_physmap} with:=0A # source =3D the domain = making the hypercall=0A --=__PartA99F9419.3__= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --=__PartA99F9419.3__=--