All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sanjay Lal <sanjayl@kymasys.com>
To: David Daney <ddaney.cavm@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	kvm@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH v2 00/18] KVM for MIPS32 Processors
Date: Tue, 27 Nov 2012 14:35:27 -0500	[thread overview]
Message-ID: <F6277AC4-0419-40EE-AC54-C144576166EF@kymasys.com> (raw)
In-Reply-To: <50B3BAC0.6070407@gmail.com>


On Nov 26, 2012, at 1:53 PM, David Daney wrote:

> 
> I have several general questions about this patch...
> 
> On 11/21/2012 06:33 PM, Sanjay Lal wrote:
>> The following patchset implements KVM support for MIPS32R2 processors,
>> using Trap & Emulate, with basic runtime binary translation to improve
>> performance.  The goal has been to keep the Guest kernel changes to a
>> minimum.
> 
> What is the point of minimizing guest kernel changes?
> 
> Because you are using an invented memory map, instead of the architecturally defined map, there is no hope of running a single kernel image both natively and as a guest.  So why do you care about how many changes there are.

It makes porting the code easier.  Since we need a special guest kernel, keeping the changes to minimum helps when migrating from one Linux version to another.  At this point we've migrated the code from 2.6.32 to 3.7 with 3.0 along the way, without any issues and anything more than an automatic merge.

> 
>> 
>> The patch is against Linux 3.7-rc6.  This is Version 2 of the patch set.
>> 
>> There is a companion patchset for QEMU that adds KVM support for the
>> MIPS target.
>> 
>> KVM/MIPS should support MIPS32-R2 processors and beyond.
>> It has been tested on the following platforms:
>>  - Malta Board with FPGA based 34K (Little Endian).
>>  - Sigma Designs TangoX board with a 24K based 8654 SoC (Little Endian).
>>  - Malta Board with 74K @ 1GHz (Little Endian).
>>  - OVPSim MIPS simulator from Imperas emulating a Malta board with
>>    24Kc and 1074Kc cores (Little Endian).
> 
> Unlike x86, there is no concept of a canonical MIPS system for you to implement.  So the choice of emulating a Malta or one of the SigmaDesigns boards doesn't seem to me to give you anything.
> 
> Why not just define the guest system to be exactly the facilities provided by the VirtIO drivers?

The above list is a list of "host systems" that we've tested KVM/MIPS on.  The guest kernel runs on the Malta system that is emulated by QEMU regardless of the host system.

And yes we do support VirtIO devices on the emulated Malta board to speed up I/O, but since they attach to the emulated systems' PCI bus, we still need a kernel and system that supports PCI.

Just an FYI, we'll be posting the QEMU patch set shortly.

> 
> 
> Perhaps it is obvious from the patches, but I wasn't able to figure out how you solve the problem of the Root/Host kernel clobbering the K0 and K1 registers in its exception handlers.  These registers are also used by the Guest kernel (aren't they)?

Yes k0/k1 do need to be saved as they are used by both the guest and host kernels.  The code is in kvm_locore.S around line 250 where the L1 exception vectors are installed.

Regards
Sanjay

  reply	other threads:[~2012-11-27 19:36 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  2:33 [PATCH v2 00/18] KVM for MIPS32 Processors Sanjay Lal
2012-11-22  2:33 ` [PATCH v2 01/18] KVM/MIPS32: Infrastructure/build files Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 02/18] KVM/MIPS32: Arch specific KVM data structures Sanjay Lal
2012-12-26 13:14   ` Gleb Natapov
2013-01-24 13:22     ` Ralf Baechle
2013-01-31 20:12   ` David Daney
2013-02-06 13:11   ` Gleb Natapov
2012-11-22  2:34 ` [PATCH v2 03/18] KVM/MIPS32: Entry point for trampolining to the guest and trap handlers Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 04/18] KVM/MIPS32: MIPS arch specific APIs for KVM Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 05/18] KVM/MIPS32: KVM Guest kernel support Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 06/18] KVM/MIPS32: Privileged instruction/target branch emulation Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 07/18] KVM/MIPS32: MMU/TLB operations for the Guest Sanjay Lal
2013-02-06 12:08   ` Gleb Natapov
2013-02-15 18:19     ` Sanjay Lal
2013-02-15 18:41       ` Gleb Natapov
2013-02-16 15:57         ` Sanjay Lal
2013-02-16 16:21           ` Gleb Natapov
2012-11-22  2:34 ` [PATCH v2 08/18] KVM/MIPS32: Release notes and KVM module Makefile Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 09/18] KVM/MIPS32: COP0 accesses profiling Sanjay Lal
2012-11-22 11:45   ` Sergei Shtylyov
2013-02-06 13:17   ` Gleb Natapov
2013-02-15 18:22     ` Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 10/18] KVM/MIPS32: Guest interrupt delivery Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 11/18] KVM/MIPS32: Routines to handle specific traps/exceptions while executing the guest Sanjay Lal
2013-02-06 13:20   ` Gleb Natapov
2013-02-15 16:10     ` Sanjay Lal
2013-02-18  9:44       ` Gleb Natapov
2013-02-19  2:31         ` Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 12/18] MIPS: Export routines needed by the KVM module Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 13/18] MIPS: If KVM is enabled then use the KVM specific routine to flush the TLBs on a ASID wrap Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 14/18] MIPS: ASM offsets for VCPU arch specific fields Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 15/18] MIPS: Pull in MIPS fix: fix endless loop when processing signals for kernel tasks Sanjay Lal
2013-01-24 13:07   ` Ralf Baechle
2012-11-22  2:34 ` [PATCH v2 16/18] MIPS: Export symbols used by KVM/MIPS module Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 17/18] KVM/MIPS32: Do not call vcpu_load when injecting interrupts Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 18/18] KVM/MIPS32: Binary patching of select privileged instructions Sanjay Lal
2012-11-26 18:53 ` [PATCH v2 00/18] KVM for MIPS32 Processors David Daney
2012-11-27 19:35   ` Sanjay Lal [this message]
2013-01-24 15:05 ` Ralf Baechle
2013-01-24 15:59   ` 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=F6277AC4-0419-40EE-AC54-C144576166EF@kymasys.com \
    --to=sanjayl@kymasys.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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.