All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Sanjay Lal <sanjayl@kymasys.com>
Cc: David Daney <ddaney.cavm@gmail.com>, <linux-mips@linux-mips.org>,
	<ralf@linux-mips.org>, <kvm@vger.kernel.org>,
	Gleb Natapov <gleb@redhat.com>, <linux-kernel@vger.kernel.org>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v4 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG
Date: Wed, 22 May 2013 10:55:20 -0700	[thread overview]
Message-ID: <519D0688.40007@caviumnetworks.com> (raw)
In-Reply-To: <16CE6694-CEAE-48F1-9F8E-723A657CE470@kymasys.com>

On 05/22/2013 10:44 AM, Sanjay Lal wrote:
>
> On May 21, 2013, at 1:54 PM, 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_SET_ONE_REG/KVM_GET_ONE_REG mechanism.
>>
>> Code related to implementing KVM_SET_ONE_REG/KVM_GET_ONE_REG is
>> consolidated in to kvm_trap_emul.c, now unused code and definitions
>> are removed.
>>
>> Signed-off-by: David Daney <david.daney@cavium.com>
>> ---
>> arch/mips/include/asm/kvm.h      |  91 +++++++++--
>> arch/mips/include/asm/kvm_host.h |   4 -
>> arch/mips/kvm/kvm_mips.c         |  90 +----------
>> arch/mips/kvm/kvm_trap_emul.c    | 338 ++++++++++++++++++++++++++++++++++-----
>> 4 files changed, 383 insertions(+), 140 deletions(-)
[...]
>>
>
> Most of the functions that have been relocated to kvm_trap_emul.c should stay in kvm_mips.c. They are/will shared between the trap and emulate and VZ modes.  They include kvm_mips_reset_vcpu(), kvm_vcpu_ioctl_interrupt(), kvm_arch_vcpu_ioctl().
>
> kvm_mips_get_reg() and kvm_mips_set_reg() should be in kvm_mips.c as they will be shared by the trap and emulate and VZ code.
>

OK, I will revise the patch set to rearrange things in a manner that 
leaves these in kvm_mips.c.  However, this is of secondary importance to 
the question of the suitability of the ABI.


> If you plan on defining specific versions of these functions for Cavium's implementation of KVM, please make them callbacks.
>

There will soon be follow on patches that do exactly that.

WARNING: multiple messages have this Message-ID (diff)
From: David Daney <ddaney@caviumnetworks.com>
To: Sanjay Lal <sanjayl@kymasys.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
	linux-mips@linux-mips.org, ralf@linux-mips.org,
	kvm@vger.kernel.org, Gleb Natapov <gleb@redhat.com>,
	linux-kernel@vger.kernel.org,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v4 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG
Date: Wed, 22 May 2013 10:55:20 -0700	[thread overview]
Message-ID: <519D0688.40007@caviumnetworks.com> (raw)
Message-ID: <20130522175520.NdtTofm7J2-1GiKzSVvSZaxJG_OJX5RRExJwbumDdxc@z> (raw)
In-Reply-To: <16CE6694-CEAE-48F1-9F8E-723A657CE470@kymasys.com>

On 05/22/2013 10:44 AM, Sanjay Lal wrote:
>
> On May 21, 2013, at 1:54 PM, 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_SET_ONE_REG/KVM_GET_ONE_REG mechanism.
>>
>> Code related to implementing KVM_SET_ONE_REG/KVM_GET_ONE_REG is
>> consolidated in to kvm_trap_emul.c, now unused code and definitions
>> are removed.
>>
>> Signed-off-by: David Daney <david.daney@cavium.com>
>> ---
>> arch/mips/include/asm/kvm.h      |  91 +++++++++--
>> arch/mips/include/asm/kvm_host.h |   4 -
>> arch/mips/kvm/kvm_mips.c         |  90 +----------
>> arch/mips/kvm/kvm_trap_emul.c    | 338 ++++++++++++++++++++++++++++++++++-----
>> 4 files changed, 383 insertions(+), 140 deletions(-)
[...]
>>
>
> Most of the functions that have been relocated to kvm_trap_emul.c should stay in kvm_mips.c. They are/will shared between the trap and emulate and VZ modes.  They include kvm_mips_reset_vcpu(), kvm_vcpu_ioctl_interrupt(), kvm_arch_vcpu_ioctl().
>
> kvm_mips_get_reg() and kvm_mips_set_reg() should be in kvm_mips.c as they will be shared by the trap and emulate and VZ code.
>

OK, I will revise the patch set to rearrange things in a manner that 
leaves these in kvm_mips.c.  However, this is of secondary importance to 
the question of the suitability of the ABI.


> If you plan on defining specific versions of these functions for Cavium's implementation of KVM, please make them callbacks.
>

There will soon be follow on patches that do exactly that.

  reply	other threads:[~2013-05-22 17:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 20:54 [PATCH v4 0/6] mips/kvm: Fix ABI for compatibility with 64-bit guests David Daney
2013-05-21 20:54 ` [PATCH v4 1/6] mips/kvm: Fix ABI for use of FPU David Daney
2013-05-21 20:54 ` [PATCH v4 2/6] mips/kvm: Fix ABI for use of 64-bit registers David Daney
2013-05-21 20:54 ` [PATCH v4 3/6] mips/kvm: Fix name of gpr field in struct kvm_regs David Daney
2013-05-21 20:54 ` [PATCH v4 4/6] mips/kvm: Use ARRAY_SIZE() instead of hardcoded constants in kvm_arch_vcpu_ioctl_{s,g}et_regs David Daney
2013-05-21 20:54 ` [PATCH v4 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG David Daney
2013-05-22 17:44   ` Sanjay Lal
2013-05-22 17:55     ` David Daney [this message]
2013-05-22 17:55       ` David Daney
2013-05-21 20:54 ` [PATCH v4 6/6] mips/kvm: Use ENOIOCTLCMD to indicate unimplemented ioctls David Daney
2013-05-22 12:54 ` [PATCH v4 0/6] mips/kvm: Fix ABI for compatibility with 64-bit guests Gleb Natapov
2013-05-22 16:33   ` Sanjay Lal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519D0688.40007@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=david.daney@cavium.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=sanjayl@kymasys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.