linux-mips
[Top] [All Lists]

Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 regis

To: Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS
From: David Daney <ddaney@caviumnetworks.com>
Date: Tue, 21 May 2013 09:21:06 -0700
Cc: David Daney <ddaney.cavm@gmail.com>, <linux-mips@linux-mips.org>, <ralf@linux-mips.org>, <kvm@vger.kernel.org>, Sanjay Lal <sanjayl@kymasys.com>, <linux-kernel@vger.kernel.org>, David Daney <david.daney@cavium.com>
In-reply-to: <20130521153752.GD14287@redhat.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: <1369083686-27524-1-git-send-email-ddaney.cavm@gmail.com> <1369083686-27524-6-git-send-email-ddaney.cavm@gmail.com> <20130521153752.GD14287@redhat.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4
On 05/21/2013 08:37 AM, Gleb Natapov wrote:
On Mon, May 20, 2013 at 02:01:26PM -0700, David Daney wrote:
From: David Daney <david.daney@cavium.com>

Because not all 256 CP0 registers are ever implemented, we need a
different method of manipulating them.  Use the
KVM_GET_MSRS/KVM_SET_MSRS mechanism as x86 does for its MSRs.

Have you looked at KVM_(GET|SET)_ONE_REG interface (not used by x86, but is
used bu arm/ppc/s390). It looks like it is more suitable for your case.
Actually you can use it instead of KVM_(GET|SET)_REGS for all registers.

Yes, I suppose it could be used. One problem it has is that there is no way to query the set of supported registers. Also you have to make multiple calls to set multiple registers, which involves vcpu_{load,put} for each register.

We will definitely implement it for all the FP and General Purpose registers.


Code related to implementing KVM_GET_MSRS/KVM_SET_MSRS is consolidated



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