From patchwork Fri Feb 12 00:22:04 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: 8286691 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 B5CA19F38B for ; Fri, 12 Feb 2016 00:25:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D391920270 for ; Fri, 12 Feb 2016 00:25:16 +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 E9FEF2025B for ; Fri, 12 Feb 2016 00:25:15 +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 1aU1V1-0006Ho-Vs; Fri, 12 Feb 2016 00:22:15 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aU1Uz-0006GF-Pn for xen-devel@lists.xenproject.org; Fri, 12 Feb 2016 00:22:13 +0000 Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id 3B/2F-25438-5B52DB65; Fri, 12 Feb 2016 00:22:13 +0000 X-Env-Sender: tlengyel@novetta.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1455236531!23232985!1 X-Originating-IP: [209.85.214.173] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59352 invoked from network); 12 Feb 2016 00:22:12 -0000 Received: from mail-ob0-f173.google.com (HELO mail-ob0-f173.google.com) (209.85.214.173) by server-15.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 12 Feb 2016 00:22:12 -0000 Received: by mail-ob0-f173.google.com with SMTP id ba1so98435210obb.3 for ; Thu, 11 Feb 2016 16:22:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=novetta-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=cYK4z6kRXIW8bmnGLIZ1JYEvDlch7kfaqpT1b2ROA8w=; b=QvhR0sfjQ8Mrs0UZqsSiywGVvQSMVYD0ucusmOmEMXwUf2ny7WDxJTgi+tJMDnkKxb /b4KhxnpSeANCrLgIwjizX0OLId09pyR3MoZydBTsQWHNRjGTX3hj4hBTsNpwrw4HVe0 0gPFNs9nopFLbpa9w5OXiBsuLODwmG2NU6I+SGkWClduYO8ug0GpNhxhp+rwnItntOZN 0suxAkVsdw3wO565z9ptG17CShQoMgay+X/YybssSR0C1iWBiRAWaDGJFQiBguonKTz6 1ANIHFpsoJUqqg8E7VszwL8cB7xjyC9UEZsQr0w8nxLvNs3G8B6fbDE9gW8oL7S2J7Ho tyiA== 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; bh=cYK4z6kRXIW8bmnGLIZ1JYEvDlch7kfaqpT1b2ROA8w=; b=SrOcmuIwAvkg1vIlXyY4aIvPmsD++JagguKigNsod0Ankf5sjh6/99ZHHl8ycPIMyh So2JbeYIed+wiTLqfoc8iFuXz8//enc60YTBptgzBGO0FbHTjwlSesefqjSbsG+O3tly NwS4aEbiYIzoQCv1IHBkdNZeyZEHRu8sp9oPzQh5H2RD9RSORGd3dJuAue6FiMyZ7WOy XtmyhMT8Tn2IMOamupXMkzPJIeplRgoe18i142uGTJWHJ8t9MptbN1I2931doJrT7Md2 3CcDxeIHP7NE4xUAWXTnDGlVwfocN6j4l6YyFRlE+SZh9MdrSLGPCbrc8dAT5qWc2oGx f5jw== X-Gm-Message-State: AG10YOT12RyA2NKkRYuMzVKvydCnYMs2IDJ0ZY0Si+2eobEVNN4Nx2J960uY8QAMMawazv9/ X-Received: by 10.182.116.200 with SMTP id jy8mr51078452obb.35.1455236530904; Thu, 11 Feb 2016 16:22:10 -0800 (PST) Received: from l1.lan (c-73-14-35-59.hsd1.co.comcast.net. [73.14.35.59]) by smtp.gmail.com with ESMTPSA id n6sm7110604obv.0.2016.02.11.16.22.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Feb 2016 16:22:10 -0800 (PST) From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Thu, 11 Feb 2016 17:22:04 -0700 Message-Id: <1455236525-14866-1-git-send-email-tlengyel@novetta.com> X-Mailer: git-send-email 2.1.4 Cc: Kevin Tian , Keir Fraser , Jun Nakajima , Andrew Cooper , Jan Beulich , Tamas K Lengyel Subject: [Xen-devel] [PATCH v2 1/2] hvm/vmx: save dr7 during vmx_vmcs_save 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, 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 Sending the dr7 register during vm_events is useful for various applications, but the current way the register value is gathered is incorrent. In this patch we extend vmx_vmcs_save so that we get the correct value. Suggested-by: Andrew Cooper Signed-off-by: Tamas K Lengyel Cc: Jun Nakajima Cc: Kevin Tian Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Acked-by: Razvan Cojocaru --- xen/arch/x86/hvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index b9f340c..ae05794 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -490,6 +490,7 @@ static void vmx_vmcs_save(struct vcpu *v, struct hvm_hw_cpu *c) __vmread(GUEST_SYSENTER_CS, &c->sysenter_cs); __vmread(GUEST_SYSENTER_ESP, &c->sysenter_esp); __vmread(GUEST_SYSENTER_EIP, &c->sysenter_eip); + __vmread(GUEST_DR7, &c->dr7); c->pending_event = 0; c->error_code = 0;