xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: xen-devel@lists.xenproject.org
Cc: George.Dunlap@eu.citrix.com, JBeulich@suse.com
Subject: [PATCH v2] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1
Date: Fri, 21 Mar 2014 16:43:05 -0700	[thread overview]
Message-ID: <1395445385-24794-3-git-send-email-mukesh.rathor@oracle.com> (raw)
In-Reply-To: <1395445385-24794-1-git-send-email-mukesh.rathor@oracle.com>

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

      parent reply	other threads:[~2014-03-21 23:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395445385-24794-3-git-send-email-mukesh.rathor@oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).