From patchwork Wed Dec 23 14:53:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 7913001 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 18DD19F349 for ; Wed, 23 Dec 2015 14:57:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41CD0205D3 for ; Wed, 23 Dec 2015 14:57:34 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7396B205B1 for ; Wed, 23 Dec 2015 14:57:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aBko9-0002c2-UF; Wed, 23 Dec 2015 14:54:29 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aBko8-0002bv-Hm for xen-devel@lists.xenproject.org; Wed, 23 Dec 2015 14:54:28 +0000 Received: from [85.158.143.35] by server-2.bemta-4.messagelabs.com id A8/EF-18316-3A5BA765; Wed, 23 Dec 2015 14:54:27 +0000 X-Env-Sender: tamas.k.lengyel@gmail.com X-Msg-Ref: server-10.tower-21.messagelabs.com!1450882467!6893143!1 X-Originating-IP: [74.125.82.42] X-SpamReason: No, hits=0.2 required=7.0 tests=RCVD_ILLEGAL_IP X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18836 invoked from network); 23 Dec 2015 14:54:27 -0000 Received: from mail-wm0-f42.google.com (HELO mail-wm0-f42.google.com) (74.125.82.42) by server-10.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 23 Dec 2015 14:54:27 -0000 Received: by mail-wm0-f42.google.com with SMTP id p187so147917286wmp.0 for ; Wed, 23 Dec 2015 06:54:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SicZUYBbKhXrVEkrBsc7JNSW96rXsr8u1Rc3v2CBqus=; b=BKxACgBOTJ+/udArX9I101vWDyRmdvaf1f59AIwkumZ0jw32kPcrE0/rBXtyQztWMY 1CRQ97hBZziV0IihEBaHBi4iI9mvYTyuYtdwurWWtaruv39/77VnJYyPBMAxFi1UG6BC Kg2LRiq9Ax0qCh8fJ7Mz0LLYZejFfJzOcyZrn9qK5MQfZJMrSCWRA9lMhtUQ0qYk/Yv6 52uEIOyuqfDZIBYiUsM2I8nUYFPlPFX9dFx0nQbf1cgpVkJRlweN7Ix37VaXnUjqW/qD x0ezA+mPcEtCP7gi9B69V1tp17jewkTtLTwS+zvJ5m9aroEoWZYFWmakvVL3thtmt/bX TpFQ== X-Received: by 10.194.9.169 with SMTP id a9mr33913607wjb.60.1450882467201; Wed, 23 Dec 2015 06:54:27 -0800 (PST) Received: from localhost.localdomain (catv-5-148-229-101.catv.broadband.hu. [5.148.229.101]) by smtp.gmail.com with ESMTPSA id 186sm29637406wmv.9.2015.12.23.06.54.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Dec 2015 06:54:26 -0800 (PST) From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Wed, 23 Dec 2015 15:53:52 +0100 Message-Id: <1450882432-10484-2-git-send-email-tamas@tklengyel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450882432-10484-1-git-send-email-tamas@tklengyel.com> References: <1450882432-10484-1-git-send-email-tamas@tklengyel.com> Cc: Andrew Cooper , Tamas K Lengyel , Keir Fraser , Jan Beulich , Razvan Cojocaru Subject: [Xen-devel] [PATCH 2/2] vm_event: Add altp2m info to HVM events as well X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add altp2m information to HVM events as well when altp2m is active. Cc: Razvan Cojocaru Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Signed-off-by: Tamas K Lengyel Acked-by: Razvan Cojocaru Reviewed-by: Andrew Cooper --- xen/arch/x86/hvm/event.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c index 73c8f14..a3d4892 100644 --- a/xen/arch/x86/hvm/event.c +++ b/xen/arch/x86/hvm/event.c @@ -22,6 +22,7 @@ #include #include #include +#include #include static void hvm_event_fill_regs(vm_event_request_t *req) @@ -83,6 +84,12 @@ static int hvm_event_traps(uint8_t sync, vm_event_request_t *req) vm_event_vcpu_pause(curr); } + if ( altp2m_active(currd) ) + { + req->flags |= VM_EVENT_FLAG_ALTERNATE_P2M; + req->altp2m_idx = vcpu_altp2m(curr).p2midx; + } + hvm_event_fill_regs(req); vm_event_put_request(currd, &currd->vm_event->monitor, req);