From patchwork Thu Jun 2 22:52:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 9151235 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 AECA460751 for ; Thu, 2 Jun 2016 22:55:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A11492832E for ; Thu, 2 Jun 2016 22:55:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93DF526D19; Thu, 2 Jun 2016 22:55:02 +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 2841626D19 for ; Thu, 2 Jun 2016 22:55:02 +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 1b8bTj-0008Tq-8O; Thu, 02 Jun 2016 22:52:39 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8bTh-0008TH-Pk for xen-devel@lists.xenproject.org; Thu, 02 Jun 2016 22:52:37 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id 23/69-15536-4B8B0575; Thu, 02 Jun 2016 22:52:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBIsWRWlGSWpSXmKPExsVyMfSas+6WHQH hBkfncVh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBlfF1YUbFWsOL15J1sD40zpLkYuDiGB6YwS UxY0s3UxcnJICPSzSkw/rAVhx0j03ZzCDGFXSOyZ8xGsRkhAQ+L2zUZ2iOaJTBJzru5nAkmwC WhLtL3exQpiiwgoSdxbNZkJpIhZYCWjxMa7/8CKhAXcJNbMOQY2iUVAVeJd8yd2EJtXwFmi/8 dDqG1yEpenPwCr4RRwkbjfcYkVYrOzxMKn1xknMPIvYGRYxahenFpUllqka6SXVJSZnlGSm5i Zo2toYKyXm1pcnJiempOYVKyXnJ+7iREYPvUMDIw7GE81Ox9ilORgUhLlZYwNCBfiS8pPqcxI LM6ILyrNSS0+xCjDwaEkwRu4HSgnWJSanlqRlpkDDGSYtAQHj5IIb/M2oDRvcUFibnFmOkTqF KMxx5bf19YycWybem8tkxBLXn5eqpQ470aQSQIgpRmleXCDYBF2iVFWSpiXkYGBQYinILUoN7 MEVf4VozgHo5IwrwjIFJ7MvBK4fa+ATmECOqXgkT/IKSWJCCmpBkZjvvtyq9LnZ2uKnv/msH/ 1m8MNCzSLl+848Mg5smD7R9HyFY1O14LNDaK9VX/t0pky//b6i3Jei70WaDn8fFW3o8WBfcaB 3UbxvkfMct9cZn4eZFk969ZfecYJ6xkurbnmXLg7v+XJzRmrWZMZX15TNGafe6BmIdevxPBbc xdqbHVlzZSfEJKgxFKckWioxVxUnAgAma2lTKsCAAA= X-Env-Sender: tamas.k.lengyel@gmail.com X-Msg-Ref: server-3.tower-31.messagelabs.com!1464907955!43490017!1 X-Originating-IP: [209.85.214.67] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1730 invoked from network); 2 Jun 2016 22:52:36 -0000 Received: from mail-it0-f67.google.com (HELO mail-it0-f67.google.com) (209.85.214.67) by server-3.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 2 Jun 2016 22:52:36 -0000 Received: by mail-it0-f67.google.com with SMTP id u203so943637itc.0 for ; Thu, 02 Jun 2016 15:52:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mM1GngMwaRPZDDT1tD1UJhHjN1Mo9H3NmUHa/nA8ENs=; b=SuWR1mvQJf+8uJnswt4fEGWFZZzyAXVbjBXwfb7n1hPZ7Vpbm+IoR25KyO/Tj0JrzT 5rcq2P4JPJJCAEcFl+1HdfuYf0uPXiF1miCB0sYvbsKF+zBJjzbZm4EYt6saheV/GEJC xH8VXUI/ZkZGFVu/P4nD0xHeZPiazGofey8ju2jt67k13fx05D9sKsv+t5rrbl+EC1bu VH/Q2QN65c1RO0MK/Leam4rxdcUZ+F25sJdxjtjW5ZgjjqakpSKyBO0OahQOK2IaxgGY J5fYosHZ7VBlCp7vwLzX3wV6FyeUnKM7WfFtBSh+XXF7yxRl9I6lCOciZUg01Hd7kn3Z YYzg== X-Gm-Message-State: ALyK8tK/z47GRqLRZAorGSXDY/UJK2BEsQ0fCZIOKXDzWjSAsysWhqfIzZXUqlGn2LQVkA== X-Received: by 10.36.17.207 with SMTP id 198mr6417132itf.81.1464907954675; Thu, 02 Jun 2016 15:52:34 -0700 (PDT) Received: from l1.lan (c-73-14-35-59.hsd1.co.comcast.net. [73.14.35.59]) by smtp.gmail.com with ESMTPSA id t91sm1484649ioi.26.2016.06.02.15.52.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jun 2016 15:52:33 -0700 (PDT) From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Thu, 2 Jun 2016 16:52:20 -0600 Message-Id: <1464907946-19242-3-git-send-email-tamas@tklengyel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464907946-19242-1-git-send-email-tamas@tklengyel.com> References: <1464907946-19242-1-git-send-email-tamas@tklengyel.com> Cc: Andrew Cooper , Julien Grall , Tamas K Lengyel , Stefano Stabellini Subject: [Xen-devel] [PATCH v5 3/9] monitor: Rename vm_event_monitor_guest_request 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Mechanical renaming and relocation to the monitor subsystem. Signed-off-by: Tamas K Lengyel Acked-by: Razvan Cojocaru Acked-by: Jan Beulich Acked-by: Julien Grall --- Cc: Stefano Stabellini Cc: Julien Grall Cc: Andrew Cooper --- xen/arch/arm/hvm.c | 4 ++-- xen/arch/x86/hvm/hvm.c | 3 ++- xen/common/monitor.c | 17 +++++++++++++++++ xen/common/vm_event.c | 16 ---------------- xen/include/xen/monitor.h | 1 + xen/include/xen/vm_event.h | 2 -- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/xen/arch/arm/hvm.c b/xen/arch/arm/hvm.c index c01123a..d999bde 100644 --- a/xen/arch/arm/hvm.c +++ b/xen/arch/arm/hvm.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include @@ -75,7 +75,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg) case HVMOP_guest_request_vm_event: if ( guest_handle_is_null(arg) ) - vm_event_monitor_guest_request(); + monitor_guest_request(); else rc = -EINVAL; break; diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 5040a5c..7bf6a36 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -5704,7 +5705,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg) case HVMOP_guest_request_vm_event: if ( guest_handle_is_null(arg) ) - vm_event_monitor_guest_request(); + monitor_guest_request(); else rc = -EINVAL; break; diff --git a/xen/common/monitor.c b/xen/common/monitor.c index 7c3d1c8..436214a 100644 --- a/xen/common/monitor.c +++ b/xen/common/monitor.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -84,6 +85,22 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop) return 0; } +void monitor_guest_request(void) +{ + struct vcpu *curr = current; + struct domain *d = curr->domain; + + if ( d->monitor.guest_request_enabled ) + { + vm_event_request_t req = { + .reason = VM_EVENT_REASON_GUEST_REQUEST, + .vcpu_id = curr->vcpu_id, + }; + + vm_event_monitor_traps(curr, d->monitor.guest_request_sync, &req); + } +} + /* * Local variables: * mode: C diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c index fe86fb9..068d587 100644 --- a/xen/common/vm_event.c +++ b/xen/common/vm_event.c @@ -825,22 +825,6 @@ int vm_event_monitor_traps(struct vcpu *v, uint8_t sync, return rc; } -void vm_event_monitor_guest_request(void) -{ - struct vcpu *curr = current; - struct domain *d = curr->domain; - - if ( d->monitor.guest_request_enabled ) - { - vm_event_request_t req = { - .reason = VM_EVENT_REASON_GUEST_REQUEST, - .vcpu_id = curr->vcpu_id, - }; - - vm_event_monitor_traps(curr, d->monitor.guest_request_sync, &req); - } -} - /* * Local variables: * mode: C diff --git a/xen/include/xen/monitor.h b/xen/include/xen/monitor.h index 7015e6d..204d5cc 100644 --- a/xen/include/xen/monitor.h +++ b/xen/include/xen/monitor.h @@ -26,5 +26,6 @@ struct domain; struct xen_domctl_monitor_op; int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *op); +void monitor_guest_request(void); #endif /* __XEN_MONITOR_H__ */ diff --git a/xen/include/xen/vm_event.h b/xen/include/xen/vm_event.h index beda9fe..89e6243 100644 --- a/xen/include/xen/vm_event.h +++ b/xen/include/xen/vm_event.h @@ -81,8 +81,6 @@ void vm_event_vcpu_unpause(struct vcpu *v); int vm_event_monitor_traps(struct vcpu *v, uint8_t sync, vm_event_request_t *req); -void vm_event_monitor_guest_request(void); - #endif /* __VM_EVENT_H__ */