From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Sanjay Lal <sanjayl@kymasys.com>
Cc: kvm@vger.kernel.org, linux-mips@linux-mips.org,
Ralf Baechle <ralf@linux-mips.org>,
Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH 05/18] KVM/MIPS32-VZ: VZ-ASE assembler wrapper functions to set GuestIDs
Date: Sun, 19 May 2013 17:36:33 +0400 [thread overview]
Message-ID: <5198D561.9080508@cogentembedded.com> (raw)
In-Reply-To: <1368942460-15577-6-git-send-email-sanjayl@kymasys.com>
Hello.
On 19-05-2013 9:47, Sanjay Lal wrote:
> Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
> ---
> arch/mips/kvm/kvm_vz_locore.S | 74 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 74 insertions(+)
> create mode 100644 arch/mips/kvm/kvm_vz_locore.S
> diff --git a/arch/mips/kvm/kvm_vz_locore.S b/arch/mips/kvm/kvm_vz_locore.S
> new file mode 100644
> index 0000000..6d037d7
> --- /dev/null
> +++ b/arch/mips/kvm/kvm_vz_locore.S
> @@ -0,0 +1,74 @@
> +/*
> + * 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.
> + *
> + * KVM/MIPS: Assembler support for hardware virtualization extensions
> + *
> + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
> + * Authors: Yann Le Du <ledu@kymasys.com>
> + */
> +
> +#include <asm/asm.h>
> +#include <asm/asmmacro.h>
> +#include <asm/regdef.h>
> +#include <asm/mipsregs.h>
> +#include <asm/asm-offsets.h>
> +#include <asm/mipsvzregs.h>
> +
> +#define MIPSX(name) mips32_ ## name
> +
> +/*
> + * This routine sets GuestCtl1.RID to GUESTCTL1_VZ_ROOT_GUESTID
> + * Inputs: none
> + */
> +LEAF(MIPSX(ClearGuestRID))
> + .set push
> + .set mips32r2
> + .set noreorder
> + mfc0 t0, CP0_GUESTCTL1
> + addiu t1, zero, GUESTCTL1_VZ_ROOT_GUESTID
> + ins t0, t1, GUESTCTL1_RID_SHIFT, GUESTCTL1_RID_WIDTH
> + mtc0 t0, CP0_GUESTCTL1 # Set GuestCtl1.RID = GUESTCTL1_VZ_ROOT_GUESTID
> + ehb
> + j ra
Not jr?
> + nop # BD Slot
Instruction in the delay slot is usually indented by extra space.
> + .set pop
> +END(MIPSX(ClearGuestRID))
> +
> +
> +/*
> + * This routine sets GuestCtl1.RID to a new value
> + * Inputs: a0 = new GuestRID value (right aligned)
> + */
> +LEAF(MIPSX(SetGuestRID))
> + .set push
> + .set mips32r2
> + .set noreorder
> + mfc0 t0, CP0_GUESTCTL1
> + ins t0, a0, GUESTCTL1_RID_SHIFT, GUESTCTL1_RID_WIDTH
> + mtc0 t0, CP0_GUESTCTL1 # Set GuestCtl1.RID
> + ehb
> + j ra
> + nop # BD Slot
Same here...
> + .set pop
> +END(MIPSX(SetGuestRID))
> +
> +
> + /*
> + * This routine sets GuestCtl1.RID to GuestCtl1.ID
> + * Inputs: none
> + */
> +LEAF(MIPSX(SetGuestRIDtoGuestID))
> + .set push
> + .set mips32r2
> + .set noreorder
> + mfc0 t0, CP0_GUESTCTL1 # Get current GuestID
> + ext t1, t0, GUESTCTL1_ID_SHIFT, GUESTCTL1_ID_WIDTH
> + ins t0, t1, GUESTCTL1_RID_SHIFT, GUESTCTL1_RID_WIDTH
> + mtc0 t0, CP0_GUESTCTL1 # Set GuestCtl1.RID = GuestCtl1.ID
> + ehb
> + j ra
> + nop # BD Slot
... and here.
> + .set pop
> +END(MIPSX(SetGuestRIDtoGuestID))
WBR, Sergei
next prev parent reply other threads:[~2013-05-19 13:36 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-19 5:47 [PATCH 00/18] KVM/MIPS32: Support for the new Virtualization ASE (VZ-ASE) Sanjay Lal
2013-05-19 5:47 ` [PATCH 01/18] Revert "MIPS: microMIPS: Support dynamic ASID sizing." Sanjay Lal
2013-05-19 5:47 ` [PATCH 02/18] Revert "MIPS: Allow ASID size to be determined at boot time." Sanjay Lal
2013-05-19 5:47 ` [PATCH 03/18] KVM/MIPS32: Export min_low_pfn Sanjay Lal
2013-05-19 5:47 ` [PATCH 04/18] KVM/MIPS32-VZ: MIPS VZ-ASE related register defines and helper macros Sanjay Lal
2013-05-19 5:47 ` [PATCH 05/18] KVM/MIPS32-VZ: VZ-ASE assembler wrapper functions to set GuestIDs Sanjay Lal
2013-05-19 13:36 ` Sergei Shtylyov [this message]
2013-05-19 5:47 ` [PATCH 06/18] KVM/MIPS32-VZ: VZ-ASE related callbacks to handle guest exceptions that trap to the Root context Sanjay Lal
2013-05-28 15:04 ` Paolo Bonzini
2013-05-30 18:35 ` Sanjay Lal
2013-05-28 16:14 ` Paolo Bonzini
2013-05-30 18:35 ` Sanjay Lal
2013-05-30 20:11 ` Paolo Bonzini
2013-05-31 1:56 ` Sanjay Lal
2013-05-19 5:47 ` [PATCH 07/18] KVM/MIPS32: VZ-ASE related CPU feature flags and options Sanjay Lal
2013-05-19 5:47 ` [PATCH 08/18] KVM/MIPS32-VZ: Entry point for trampolining to the guest and trap handlers Sanjay Lal
2013-05-28 14:43 ` Paolo Bonzini
2013-05-19 5:47 ` [PATCH 09/18] KVM/MIPS32-VZ: Add support for CONFIG_KVM_MIPS_VZ option Sanjay Lal
2013-05-19 5:47 ` [PATCH 10/18] KVM/MIPS32-VZ: Add API for VZ-ASE Capability Sanjay Lal
2013-05-28 16:34 ` Paolo Bonzini
2013-05-30 17:07 ` David Daney
2013-05-30 17:51 ` Paolo Bonzini
2013-05-30 18:35 ` David Daney
2013-05-30 18:30 ` Sanjay Lal
2013-05-19 5:47 ` [PATCH 11/18] KVM/MIPS32-VZ: VZ: Handle Guest TLB faults that are handled in Root context Sanjay Lal
2013-05-19 5:47 ` [PATCH 12/18] KVM/MIPS32-VZ: VM Exit Stats, add VZ exit reasons Sanjay Lal
2013-05-19 5:47 ` [PATCH 13/18] KVM/MIPS32-VZ: Top level handler for Guest faults Sanjay Lal
2013-05-19 5:47 ` [PATCH 14/18] KVM/MIPS32-VZ: Guest exception batching support Sanjay Lal
2013-05-19 5:47 ` [PATCH 15/18] KVM/MIPS32: Add dummy trap handler to catch unexpected exceptions and dump out useful info Sanjay Lal
2013-05-19 5:47 ` [PATCH 16/18] KVM/MIPS32-VZ: Add VZ-ASE support to KVM/MIPS data structures Sanjay Lal
2013-05-28 15:24 ` Paolo Bonzini
2013-05-19 5:47 ` [PATCH 17/18] KVM/MIPS32: Revert to older method for accessing ASID parameters Sanjay Lal
2013-05-19 5:47 ` [PATCH 18/18] KVM/MIPS32-VZ: Dump out additional info about VZ features as part of /proc/cpuinfo Sanjay Lal
2013-05-20 15:50 ` [PATCH 00/18] KVM/MIPS32: Support for the new Virtualization ASE (VZ-ASE) David Daney
2013-05-20 16:58 ` Sanjay Lal
2013-05-20 17:29 ` David Daney
2013-05-20 17:34 ` Sanjay Lal
2013-05-20 18:36 ` Maciej W. Rozycki
2013-05-20 18:58 ` David Daney
2013-05-27 12:45 ` Maciej W. Rozycki
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=5198D561.9080508@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mtosatti@redhat.com \
--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.