From patchwork Thu Feb 5 09:59:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PranavkumarSawargaonkar X-Patchwork-Id: 44417 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6D18921521 for ; Thu, 5 Feb 2015 10:01:09 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf4626234lbd.3 for ; Thu, 05 Feb 2015 02:01:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=RhX7ytC5wpt0BQX/Twjr/5z5ebc7Yj1VcQ/L4gFtPwc=; b=N2bRRcw6acX72JMTGThOyZMDPvtUtAJKvwrcpwPh4zV1wZcfmd+vQzmJGnUSNC0Uhz bYLxvKlfbDiTfnmBZpDPiBmB0YliSJ3kkYGiULdYNwyHc/vB0YCi5t8OV13FevZt7Oxt hqrUR7nRvFh4lFLOIxxdjQoWZe8WLbIXpaxhH/CUI4fdLA43EU1cssgYynbPzSy0OiQJ jmPlpaec3gArf3oGknMnflRGb/lu+uWzb3eYVr2e4E5ci9lFq7/X33prXrkffeMmuYRr 1OMbN6O/Gc+aIFrmtLDoCtAWL4KLXuSmXwPzjuM4WrZBB+0vIW9J20LmMG7/5isb6elY 9fKQ== X-Gm-Message-State: ALoCoQkn6wEjJr+5fc1IVHCVlpFa3ond+5klJDu7TkdV239qJpgX/HNCl3eWx2wzd6eKjgkx6wZj X-Received: by 10.112.174.36 with SMTP id bp4mr340158lbc.15.1423130468374; Thu, 05 Feb 2015 02:01:08 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.99 with SMTP id w3ls158759laz.2.gmail; Thu, 05 Feb 2015 02:01:08 -0800 (PST) X-Received: by 10.112.55.199 with SMTP id u7mr2407630lbp.74.1423130468161; Thu, 05 Feb 2015 02:01:08 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id dw2si3533961lbc.62.2015.02.05.02.01.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 02:01:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id l4so6127096lbv.3 for ; Thu, 05 Feb 2015 02:01:07 -0800 (PST) X-Received: by 10.112.63.134 with SMTP id g6mr2521595lbs.52.1423130467880; Thu, 05 Feb 2015 02:01:07 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1036099lbj; Thu, 5 Feb 2015 02:01:07 -0800 (PST) X-Received: by 10.224.19.193 with SMTP id c1mr6143694qab.73.1423130466667; Thu, 05 Feb 2015 02:01:06 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t20si5500002qad.97.2015.02.05.02.01.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Feb 2015 02:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:40955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJJFB-0006cr-Pi for patch@linaro.org; Thu, 05 Feb 2015 05:01:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJJEL-0005wE-IS for qemu-devel@nongnu.org; Thu, 05 Feb 2015 05:00:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJJEH-0003Mu-0e for qemu-devel@nongnu.org; Thu, 05 Feb 2015 05:00:13 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:48327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJJEG-0003MS-Sb for qemu-devel@nongnu.org; Thu, 05 Feb 2015 05:00:08 -0500 Received: by mail-pa0-f44.google.com with SMTP id rd3so9093429pab.3 for ; Thu, 05 Feb 2015 02:00:08 -0800 (PST) X-Received: by 10.66.154.162 with SMTP id vp2mr2535357pab.73.1423130408237; Thu, 05 Feb 2015 02:00:08 -0800 (PST) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id bi11sm4577429pdb.8.2015.02.05.02.00.04 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Feb 2015 02:00:07 -0800 (PST) From: Pranavkumar Sawargaonkar To: qemu-devel@nongnu.org Date: Thu, 5 Feb 2015 15:29:41 +0530 Message-Id: <1423130382-18640-2-git-send-email-pranavkumar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1423130382-18640-1-git-send-email-pranavkumar@linaro.org> References: <1423130382-18640-1-git-send-email-pranavkumar@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.44 Cc: peter.maydell@linaro.org, patches@apm.com, alex.bennee@linaro.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, Pranavkumar Sawargaonkar Subject: [Qemu-devel] [PATCH V3 1/2] target-arm: KVM64: Get and Sync up guest register state like kvm32. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pranavkumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This patch adds: 1. Call write_kvmstate_to_list() and write_list_to_cpustate() in kvm_arch_get_registers() to sync guest register state. 2. Call write_list_to_kvmstate() in kvm_arch_put_registers() to sync guest register state. These changes are already there for kvm32 in target-arm/kvm32.c. Reviewed-by: Peter Maydell Signed-off-by: Pranavkumar Sawargaonkar --- target-arm/kvm64.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c index ba16821..033babf 100644 --- a/target-arm/kvm64.c +++ b/target-arm/kvm64.c @@ -193,9 +193,12 @@ int kvm_arch_put_registers(CPUState *cs, int level) } } + if (!write_list_to_kvmstate(cpu)) { + return EINVAL; + } + /* TODO: * FP state - * system registers */ return ret; } @@ -269,6 +272,14 @@ int kvm_arch_get_registers(CPUState *cs) } } + if (!write_kvmstate_to_list(cpu)) { + return EINVAL; + } + /* Note that it's OK to have registers which aren't in CPUState, + * so we can ignore a failure return here. + */ + write_list_to_cpustate(cpu); + /* TODO: other registers */ return ret; }