From patchwork Tue Sep 27 15:57:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9352191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8778F60757 for ; Tue, 27 Sep 2016 16:00:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79B012928A for ; Tue, 27 Sep 2016 16:00:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EC1A2928B; Tue, 27 Sep 2016 16:00:53 +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=-4.2 required=2.0 tests=BAYES_00, 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 AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C0D9C2928E for ; Tue, 27 Sep 2016 16:00:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bouls-0007XZ-Rd; Tue, 27 Sep 2016 15:58:16 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boulr-0007Ue-7u for xen-devel@lists.xenproject.org; Tue, 27 Sep 2016 15:58:15 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id 62/C1-30284-6179AE75; Tue, 27 Sep 2016 15:58:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPIsWRWlGSWpSXmKPExsXitHSDva7Y9Ff hBldWMVp83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkzW/4xF9xgq7iwaj97A+NV1i5GDg4JAX+J bV9yuxg5OdgEdCQuzt3JBhIWEVCRuL3XoIuRi4NZYAOjxPTHt1lBaoQFsiT+P9zIBFLDIqAq0 d4tABLmFXCRuL78ITuILSGgK/Hw3G+wck4BV4netgVMILYQUM3dmR9ZIeoFJU7OfMICYjMLaE q0bv/NDmHLSzRvnc0MUa8o0T/vARvETG6J26enMk9g5J+FpH0WkvZZSNoXMDKvYtQoTi0qSy3 SNTTUSyrKTM8oyU3MzNE1NDDVy00tLk5MT81JTCrWS87P3cQIDEAGINjBuLLd+RCjJAeTkiiv RvurcCG+pPyUyozE4oz4otKc1OJDjBocHAJXDh6ZzSjFkpefl6okwesxFahOsCg1PbUiLTMHG CMwpRIcPEoivDzTgNK8xQWJucWZ6RCpU4y6HAt+3F7LJAQ2Q0qctwFkhgBIUUZpHtwIWLxeYp SVEuZlBDpQiKcgtSg3swRV/hWjOAejkjCvAsgqnsy8ErhNr4COYAI6YumJFyBHlCQipKQaGFU Wmt0+xHDwpdrWyEe7pWxiixgdrW9IL1XuCY3UjOffFh63yEq94636592BLfOeL/qs1C1xKth1 3t8bH7utVwcenRQyr3mJ3u6/4hLi5x4f7ObQD/G6cClhpu9q9wm7U77xf9D+oztDJKg1w+9EA tv7yTHdDJWnzs2smm0X+GxfXVDRz77nr5RYijMSDbWYi4oTAUw7AH3SAgAA X-Env-Sender: prvs=071b8e69e=roger.pau@citrix.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1474991886!60100383!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17033 invoked from network); 27 Sep 2016 15:58:13 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-5.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 27 Sep 2016 15:58:13 -0000 X-IronPort-AV: E=Sophos;i="5.30,405,1470700800"; d="scan'208";a="389169482" From: Roger Pau Monne To: Date: Tue, 27 Sep 2016 17:57:00 +0200 Message-ID: <1474991845-27962-6-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.7.4 (Apple Git-66) In-Reply-To: <1474991845-27962-1-git-send-email-roger.pau@citrix.com> References: <1474991845-27962-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Andrew Cooper , boris.ostrovsky@oracle.com, Roger Pau Monne , Jan Beulich Subject: [Xen-devel] [PATCH v2 05/30] xen/x86: assert that local_events_need_delivery is not called by the idle domain X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP It doesn't make sense since the idle domain doesn't receive any events. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/include/asm-x86/event.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/asm-x86/event.h b/xen/include/asm-x86/event.h index a82062e..d589d6f 100644 --- a/xen/include/asm-x86/event.h +++ b/xen/include/asm-x86/event.h @@ -23,6 +23,9 @@ int hvm_local_events_need_delivery(struct vcpu *v); static inline int local_events_need_delivery(void) { struct vcpu *v = current; + + ASSERT(!is_idle_vcpu(v)); + return (has_hvm_container_vcpu(v) ? hvm_local_events_need_delivery(v) : (vcpu_info(v, evtchn_upcall_pending) && !vcpu_info(v, evtchn_upcall_mask)));