[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/2] x86/altp2m: allow specifying external-only use-case


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
  • Date: Tue, 16 Aug 2016 17:23:25 -0400
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Tamas K Lengyel <tamas.lengyel@xxxxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 16 Aug 2016 21:24:12 +0000
  • Ironport-phdr: 9a23:LI8BZxLOzMCBSLmRMdmcpTZWNBhigK39O0sv0rFitYgVK/zxwZ3uMQTl6Ol3ixeRBMOAuqsC0rWd6v28ESxYuNDa4ShEKMQNHzY+yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9GO35F8bogtit0KjqotuIMlwO3WX2OO4uZFXu9EOK55FQ2dMjYo8KiTLx6kNSfOpXwW46bXmypD3bovmKwZh47i5LsOgg/cMTGY/zfqA/UKAKRG9+azN9zITRuBLCVQqC4GcHGiVTy0IQQlv49hWyYrPd+mu/7LI8i2GmOpjURLZ8czm/66ZgSFe8qg0KKjo4+2H/kdFrgeRQpxf39DJlxIuBTIiTNfd6No/QNfwATGNPFpJdWCBMDZm1R5ceBOoGe+BDps/yoEVY/kj2PhWlGO66kmwAvXTxx6Bvlr17SQw=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 08/11/2016 10:51 AM, Jan Beulich wrote:
On 11.08.16 at 16:37, <tamas.lengyel@xxxxxxxxxxxx> wrote:
On Aug 11, 2016 06:02, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

On 10.08.16 at 17:00, <tamas.lengyel@xxxxxxxxxxxx> wrote:
@@ -5238,18 +5238,19 @@ static int do_altp2m_op(
         goto out;
     }

-    if ( (rc = xsm_hvm_altp2mhvm_op(XSM_TARGET, d)) )
+    if ( !d->arch.hvm_domain.params[HVM_PARAM_ALTP2M] )
+    {
+        rc = -EINVAL;
+        goto out;
+    }
+
+    if ( (rc = xsm_hvm_altp2mhvm_op(XSM_OTHER, d,
+                d->arch.hvm_domain.params[HVM_PARAM_ALTP2M])) )

I'm sorry that this didn't occur to me on v1 already, but is there
really a need for passing this extra argument, when the callee
could - if it cared in the first place - read the value itself?

I'm not sure if it's ok to have xsm poke around in arch specific parts like
this. We are adding this hvm param for ARM in another series but still..

Daniel, what's your opinion?

Jan

XSM does have some required arch-specific knowledge already (x86 IO port
labeling, in particular), so it's really a style question.  I'd prefer the
form with the value passed in so that it's clearer what the XSM check is
inspecting to determine what to do, especially in this case where it changes
what permissions are actually being enforced (in the non-FLASK case).

--
Daniel De Graaf
National Security Agency

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.