From patchwork Thu May 23 16:49:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 2608341 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9D5E5DFB78 for ; Thu, 23 May 2013 16:51:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759902Ab3EWQv2 (ORCPT ); Thu, 23 May 2013 12:51:28 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:53721 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759328Ab3EWQtS (ORCPT ); Thu, 23 May 2013 12:49:18 -0400 Received: by mail-pa0-f47.google.com with SMTP id kl1so1336306pab.34 for ; Thu, 23 May 2013 09:49:17 -0700 (PDT) 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=JsgnZp241nCsOxSJ4CiUtqI7TpbRK52en1o0CPY8/1k=; b=p9QgzX7clA76MN4iwPPGuyOjY30Hyjcg3uPDcXo1izBVZ9iU7JibnbJ8PgyuabMyUD dA61zA+wkboKUAP+SxX00kJCRJuNUZIljjgTiACz7pbd30kIyOXsTfDbpd2jNgmdg6Dh qK/C5ydPBO3fodXH89c3xgxbfNnl2kKX+Tl7msaqhHnISLc1K7bV8ShXtWbGuxGGH+hb 0PmFCFiiGJpdklgnEe2ww88KxzLeF35xsKIOw5K+S6jrG66D9KdeDfZ9TsxCBDh+O1gs 6sXWV2asPxrNhswiwQTgecL7N7EZHZtUmHtw+UreDyokabxLt963srHIUg5GYFVqN9EU vang== X-Received: by 10.68.179.194 with SMTP id di2mr8458163pbc.214.1369327757708; Thu, 23 May 2013 09:49:17 -0700 (PDT) Received: from dl.caveonetworks.com (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id zs12sm13510789pab.0.2013.05.23.09.49.15 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 May 2013 09:49:15 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id r4NGnEDf028623; Thu, 23 May 2013 09:49:14 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id r4NGnDbA028622; Thu, 23 May 2013 09:49:13 -0700 From: David Daney To: linux-mips@linux-mips.org, ralf@linux-mips.org, kvm@vger.kernel.org, Sanjay Lal , Gleb Natapov Cc: linux-kernel@vger.kernel.org, David Daney Subject: [PATCH v6 1/6] mips/kvm: Fix ABI for use of FPU. Date: Thu, 23 May 2013 09:49:05 -0700 Message-Id: <1369327750-28580-2-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1369327750-28580-1-git-send-email-ddaney.cavm@gmail.com> References: <1369327750-28580-1-git-send-email-ddaney.cavm@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: David Daney Define a non-empty struct kvm_fpu. Signed-off-by: David Daney Acked-by: Sanjay Lal --- arch/mips/include/uapi/asm/kvm.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/uapi/asm/kvm.h b/arch/mips/include/uapi/asm/kvm.h index 85789ea..0e8f565 100644 --- a/arch/mips/include/uapi/asm/kvm.h +++ b/arch/mips/include/uapi/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 -*/ + * 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 + */ #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 {