Re: [Xen-devel] [PATCH 14/34] x86/pt: add HVM check to XEN_DOMCTL_unbind_pt_irq

2018-08-20 Thread Jan Beulich
>>> On 17.08.18 at 17:12,  wrote:
> Its counterpart is HVM only. Add the check to help dead code
> elimination to figure out the call to pt_irq_destroy_bind is not
> needed when HVM is not enabled.
> 
> Signed-off-by: Wei Liu 

Acked-by: Jan Beulich 

And strictly speaking this would make more sense if placed ahead
of the patch making io.c compilation CONFIG_HVM only.

Jan



___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 14/34] x86/pt: add HVM check to XEN_DOMCTL_unbind_pt_irq

2018-08-17 Thread Wei Liu
Its counterpart is HVM only. Add the check to help dead code
elimination to figure out the call to pt_irq_destroy_bind is not
needed when HVM is not enabled.

Signed-off-by: Wei Liu 
---
 xen/arch/x86/domctl.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index a8325f5..4869e88 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -715,6 +715,10 @@ long arch_do_domctl(
 struct xen_domctl_bind_pt_irq *bind = &domctl->u.bind_pt_irq;
 int irq = domain_pirq_to_irq(d, bind->machine_irq);
 
+ret = -EINVAL;
+if ( !is_hvm_domain(d) )
+break;
+
 ret = -EPERM;
 if ( irq <= 0 || !irq_access_permitted(currd, irq) )
 break;
-- 
git-series 0.9.1

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel