From patchwork Thu Feb 5 14:03:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 44433 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C300E21521 for ; Thu, 5 Feb 2015 14:06:57 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf5581009lbj.0 for ; Thu, 05 Feb 2015 06:06:56 -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: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=qUedKpV3Q7+CfVUQgdsXulwPK+STgAKt6AJuSpj7YZs=; b=Y4t9/6ydZ9DpWj5iAUi6KKFN6b7FaDgBemoA1LBt5QDtyvpgFhQrNL2LWHc0lCTCJV d8Mzx7P7w2ZZosMrXyWLJYvH9nta1fDwjzzPKSp2t/dR4VSlZN5sMuPgp+yG5bqaJvb/ wWgfER9GY8M0Ev2pVKcScDGeyZaZQUrWtGycNlVTWG+K5hZfskPCIh+0lJrhme6ooXMh rhc4nEPJ+r5RVN9iLEFfzmW1ACjp2nmSJq3W+MjWuPoPuEwp7sAB7Wsgp1pXC1YZwofc p8HzFheSt9IP9AKJGwI+0DHQrN3G9x7mDSV3Og0PoIFMSHyQ4p+hYDw7EE4/VWqeSBSQ 4LkA== X-Gm-Message-State: ALoCoQnePPa17+DmDg/e44mb4BoLDdj15dKOGHtSvM5pJsyrP2h6XMck0UzuaafU6jeC6PPhV+e2 X-Received: by 10.180.12.146 with SMTP id y18mr1116091wib.6.1423145216774; Thu, 05 Feb 2015 06:06:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.67 with SMTP id ju3ls134238lab.105.gmail; Thu, 05 Feb 2015 06:06:56 -0800 (PST) X-Received: by 10.152.9.170 with SMTP id a10mr3680248lab.1.1423145216516; Thu, 05 Feb 2015 06:06:56 -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 bc3si3991518lab.109.2015.02.05.06.06.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 06:06:56 -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 l4so7515942lbv.3 for ; Thu, 05 Feb 2015 06:06:56 -0800 (PST) X-Received: by 10.112.114.230 with SMTP id jj6mr130415lbb.112.1423145216402; Thu, 05 Feb 2015 06:06:56 -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 h5csp1161639lbj; Thu, 5 Feb 2015 06:06:55 -0800 (PST) X-Received: by 10.224.46.132 with SMTP id j4mr8514380qaf.16.1423145212517; Thu, 05 Feb 2015 06:06:52 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p9si6183698qai.60.2015.02.05.06.06.51 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Feb 2015 06:06:52 -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]:42118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJN51-0006hc-IM for patch@linaro.org; Thu, 05 Feb 2015 09:06:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJN1a-0001OR-TK for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:03:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJN1Z-0007TE-4a for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:03:18 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:54955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJN1Y-0007RD-TZ for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:03:17 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YJN1Q-00030q-S6 for qemu-devel@nongnu.org; Thu, 05 Feb 2015 14:03:08 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 5 Feb 2015 14:03:05 +0000 Message-Id: <1423144987-11425-27-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1423144987-11425-1-git-send-email-peter.maydell@linaro.org> References: <1423144987-11425-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 26/28] 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: peter.maydell@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 From: Pranavkumar Sawargaonkar 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 Message-id: 1423130382-18640-2-git-send-email-pranavkumar@linaro.org Signed-off-by: Peter Maydell --- 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; }