From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: [PATCH v2] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1 Date: Fri, 21 Mar 2014 16:43:05 -0700 Message-ID: <1395445385-24794-3-git-send-email-mukesh.rathor@oracle.com> References: <1395445385-24794-1-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WR95t-0001g5-A1 for xen-devel@lists.xenproject.org; Fri, 21 Mar 2014 23:43:27 +0000 In-Reply-To: <1395445385-24794-1-git-send-email-mukesh.rathor@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: George.Dunlap@eu.citrix.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org 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 --- 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