xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] pvh: disallow pirq eio physdevop
@ 2014-03-21 23:43 Mukesh Rathor
  2014-03-21 23:43 ` [PATCH v2] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1 Mukesh Rathor
  2014-03-21 23:43 ` Mukesh Rathor
  0 siblings, 2 replies; 3+ messages in thread
From: Mukesh Rathor @ 2014-03-21 23:43 UTC (permalink / raw)
  To: xen-devel; +Cc: George.Dunlap, JBeulich

Hi,

I am confused what the conclusion was on this from the previous 
version submitted under "pvh: misc bug fixes", so I'm submitting
both versions discussed in that thread. Please apply one.

thanks
mukesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1
  2014-03-21 23:43 [PATCH v2] pvh: disallow pirq eio physdevop Mukesh Rathor
@ 2014-03-21 23:43 ` Mukesh Rathor
  2014-03-21 23:43 ` Mukesh Rathor
  1 sibling, 0 replies; 3+ messages in thread
From: Mukesh Rathor @ 2014-03-21 23:43 UTC (permalink / raw)
  To: xen-devel; +Cc: George.Dunlap, JBeulich

A call to do_physdev_op with PHYSDEVOP_pirq_eoi_gmfn_v2/v1 will corrupt
struct hvm_domain when it writes to domain->arch.pv_domain.pirq_eoi_map.
Disallow that. Currently, such a path exists for linux dom0 pvh.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 xen/arch/x86/hvm/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 9dd56f7..08ab9cb 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3427,6 +3427,12 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
         return do_physdev_op(cmd, arg);
+
+    /* pvh fixme: coming soon */
+    case PHYSDEVOP_pirq_eoi_gmfn_v1:
+    case PHYSDEVOP_pirq_eoi_gmfn_v2:
+        return -ENOSYS;
+
     }
 }
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1
  2014-03-21 23:43 [PATCH v2] pvh: disallow pirq eio physdevop Mukesh Rathor
  2014-03-21 23:43 ` [PATCH v2] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1 Mukesh Rathor
@ 2014-03-21 23:43 ` Mukesh Rathor
  1 sibling, 0 replies; 3+ messages in thread
From: Mukesh Rathor @ 2014-03-21 23:43 UTC (permalink / raw)
  To: xen-devel; +Cc: George.Dunlap, JBeulich

A call to do_physdev_op with PHYSDEVOP_pirq_eoi_gmfn_v2/v1 will corrupt
struct hvm_domain when it writes to domain->arch.pv_domain.pirq_eoi_map.
Disallow that. Currently, such a path exists for linux dom0 pvh.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 xen/arch/x86/physdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index bc0634c..30af0ab 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -343,6 +343,11 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&info, arg, 1) != 0 )
             break;
 
+        /* pvh fixme: add pirq eoi support */
+        ret = -ENOSYS;
+        if ( is_pvh_vcpu(current) )
+            break;
+
         ret = -EINVAL;
         page = get_page_from_gfn(current->domain, info.gmfn, NULL, P2M_ALLOC);
         if ( !page )
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-21 23:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 23:43 [PATCH v2] pvh: disallow pirq eio physdevop Mukesh Rathor
2014-03-21 23:43 ` [PATCH v2] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1 Mukesh Rathor
2014-03-21 23:43 ` Mukesh Rathor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).