From patchwork Tue Jul 16 17:06:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petre Ovidiu PIRCALABU X-Patchwork-Id: 11046531 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B7991800 for ; Tue, 16 Jul 2019 17:08:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53E9028682 for ; Tue, 16 Jul 2019 17:08:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EDFC28688; Tue, 16 Jul 2019 17:08:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6171328682 for ; Tue, 16 Jul 2019 17:08:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hnQuL-0005nE-Id; Tue, 16 Jul 2019 17:06:29 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hnQuK-0005n2-Jb for xen-devel@lists.xenproject.org; Tue, 16 Jul 2019 17:06:28 +0000 X-Inumbo-ID: 0bea4cb3-a7ec-11e9-8980-bc764e045a96 Received: from mx01.bbu.dsd.mx.bitdefender.com (unknown [91.199.104.161]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 0bea4cb3-a7ec-11e9-8980-bc764e045a96; Tue, 16 Jul 2019 17:06:27 +0000 (UTC) Received: from smtp.bitdefender.com (smtp02.buh.bitdefender.net [10.17.80.76]) by mx01.bbu.dsd.mx.bitdefender.com (Postfix) with ESMTPS id CC961305FFA0; Tue, 16 Jul 2019 20:06:25 +0300 (EEST) Received: from bitdefender.com (unknown [195.189.155.70]) by smtp.bitdefender.com (Postfix) with ESMTPSA id BDFDA305B7B4; Tue, 16 Jul 2019 20:06:25 +0300 (EEST) From: Petre Pircalabu To: xen-devel@lists.xenproject.org Date: Tue, 16 Jul 2019 20:06:17 +0300 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Subject: [Xen-devel] [PATCH v2 03/10] vm_event: Add 'struct domain' backpointer to vm_event_domain. X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Petre Pircalabu , Tamas K Lengyel , Wei Liu , Razvan Cojocaru , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Stefano Stabellini , Jan Beulich , Alexandru Isaila MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Petre Pircalabu Acked-by: Tamas K Lengyel --- xen/common/vm_event.c | 2 ++ xen/include/xen/sched.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c index 515a917..787c61c 100644 --- a/xen/common/vm_event.c +++ b/xen/common/vm_event.c @@ -71,6 +71,8 @@ static int vm_event_enable( if ( rc < 0 ) goto err; + ved->d = d; + rc = prepare_ring_for_helper(d, ring_gfn, &ved->ring_pg_struct, &ved->ring_page); if ( rc < 0 ) diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 97a3ab5..e3093d3 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -279,6 +279,8 @@ struct vcpu /* VM event */ struct vm_event_domain { + /* Domain reference */ + struct domain *d; spinlock_t lock; /* The ring has 64 entries */ unsigned char foreign_producers;