linux-mips
[Top] [All Lists]

[PATCH v5 1/6] mips/kvm: Fix ABI for use of FPU.

To: linux-mips@linux-mips.org, ralf@linux-mips.org, kvm@vger.kernel.org, Sanjay Lal <sanjayl@kymasys.com>, Gleb Natapov <gleb@redhat.com>
Subject: [PATCH v5 1/6] mips/kvm: Fix ABI for use of FPU.
From: David Daney <ddaney.cavm@gmail.com>
Date: Wed, 22 May 2013 11:43:51 -0700
Cc: linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=0R16bW0lbSIsswX9ItZDifatSI+Hxzx7fnGKYx4ks9I=; b=hStigbX/HdVWcBmPqPm6pL72Mn03d3XO6+zHH750ZOiOscUY6xW0y8mpZgYrTwg8+f HJIppzgHvo7+A6UQL7hHDy3r8N3kCIq+GOuvfLSDpiWn83J9VEXL0O76lH1OACOAEpwK FyFDKQWSyvuOQzGfBYBMfMg8l0QfCkTF/c7rZc5Pyo6Uh9CagkhkMlLEoXkTzPp54JSZ nMBgPTp7Vh09koqY3G3Ta/1Z9lLKEIM8tXPnpz2vMnmp4DXDHTCSqLG2qCos6164OkMC xGlZWMErIssYeaFDtAeMnGVNjhAibopkAq/D7AVzzUchkgHvvz7So+yoRtepNLTMQprL 10fA==
In-reply-to: <1369248236-27237-1-git-send-email-ddaney.cavm@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1369248236-27237-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

Define a non-empty struct kvm_fpu.

Signed-off-by: David Daney <david.daney@cavium.com>
---
 arch/mips/include/asm/kvm.h | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h
index 85789ea..0e8f565 100644
--- a/arch/mips/include/asm/kvm.h
+++ b/arch/mips/include/asm/kvm.h
@@ -1,11 +1,12 @@
 /*
-* This file is subject to the terms and conditions of the GNU General Public
-* License.  See the file "COPYING" in the main directory of this archive
-* for more details.
-*
-* Copyright (C) 2012  MIPS Technologies, Inc.  All rights reserved.
-* Authors: Sanjay Lal <sanjayl@kymasys.com>
-*/
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2012  MIPS Technologies, Inc.  All rights reserved.
+ * Copyright (C) 2013 Cavium, Inc.
+ * Authors: Sanjay Lal <sanjayl@kymasys.com>
+ */
 
 #ifndef __LINUX_KVM_MIPS_H
 #define __LINUX_KVM_MIPS_H
@@ -31,8 +32,20 @@ struct kvm_regs {
 struct kvm_sregs {
 };
 
-/* for KVM_GET_FPU and KVM_SET_FPU */
+/*
+ * for KVM_GET_FPU and KVM_SET_FPU
+ *
+ * If Status[FR] is zero (32-bit FPU), the upper 32-bits of the FPRs
+ * are zero filled.
+ */
 struct kvm_fpu {
+       __u64 fpr[32];
+       __u32 fir;
+       __u32 fccr;
+       __u32 fexr;
+       __u32 fenr;
+       __u32 fcsr;
+       __u32 pad;
 };
 
 struct kvm_debug_exit_arch {
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>