On Jun 19, 2014, at 9:27 AM, Aurelien Jarno aurel...@aurel32.net wrote:
On Tue, Jun 17, 2014 at 11:10:35PM +0100, James Hogan wrote:
In KVM mode the bootrom is loaded and executed from the last 1MB of
DRAM.
What is the reason for that? I am not opposed to that, but if it is
really needed,
power consumption on a modern
48-Way SMP SoC based system.
What
about running non pv UP systems?
See above. I think this is what Sanjay Lal is doing.
The KVM implementation from MIPS (currently in mainline) supports UP systems in
trap and emulate mode. The patch set I posted earlier
On Jun 7, 2013, at 4:03 PM, David Daney wrote:
From: David Daney david.da...@cavium.com
These patches take a somewhat different approach to MIPS
virtualization via the MIPS-VZ extensions than the patches previously
sent by Sanjay Lal.
Several facts about the code:
o Currently
On May 30, 2013, at 10:07 AM, David Daney wrote:
On 05/28/2013 09:34 AM, Paolo Bonzini wrote:
Il 19/05/2013 07:47, Sanjay Lal ha scritto:
- Add API to allow clients (QEMU etc.) to check whether the H/W
supports the MIPS VZ-ASE.
Why does this matter to userspace? Do the userspace have
On May 28, 2013, at 8:04 AM, Paolo Bonzini wrote:
Il 19/05/2013 07:47, Sanjay Lal ha scritto:
+static int kvm_vz_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs
*regs)
+{
+struct mips_coproc *cop0 = vcpu-arch.cop0;
+
+/* some registers are not restored
+ * random
On May 28, 2013, at 9:14 AM, Paolo Bonzini wrote:
Il 19/05/2013 07:47, Sanjay Lal ha scritto:
+#endif
+local_irq_save(flags);
+if (kvm_mips_handle_vz_root_tlb_fault(badvaddr, vcpu) 0) {
+run-exit_reason = KVM_EXIT_INTERNAL_ERROR
On May 30, 2013, at 1:11 PM, Paolo Bonzini wrote:
Il 30/05/2013 20:35, Sanjay Lal ha scritto:
+#endif
+local_irq_save(flags);
+if (kvm_mips_handle_vz_root_tlb_fault(badvaddr, vcpu)
0) {
+run-exit_reason = KVM_EXIT_INTERNAL_ERROR
On May 22, 2013, at 5:54 AM, Gleb Natapov wrote:
On Tue, May 21, 2013 at 01:54:49PM -0700, David Daney wrote:
From: David Daney david.da...@cavium.com
The initial patch set implementing MIPS KVM does not handle 64-bit
guests or use of the FPU. This patch set corrects these ABI issues,
On May 21, 2013, at 1:54 PM, David Daney wrote:
From: David Daney david.da...@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
---
4 files changed, 367 insertions(+), 102 deletions(-)
--
1.7.11.7
Acked-by: Sanjay Lal sanj...@kymasys.com
Regards
Sanjay
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On May 21, 2013, at 1:00 AM, Gleb Natapov wrote:
On Sun, May 19, 2013 at 10:36:32AM -0400, Sanjay Lal wrote:
On May 19, 2013, at 8:52 AM, Gleb Natapov wrote:
On Sat, May 18, 2013 at 06:54:24AM -0700, Sanjay Lal wrote:
- As suggested by Gleb, wrap calls to gfn_to_pfn
On May 20, 2013, at 8:50 AM, David Daney wrote:
On 05/18/2013 10:47 PM, Sanjay Lal wrote:
The following patch set adds support for the recently announced
virtualization
extensions for the MIPS32 architecture and allows running unmodified kernels
in
Guest Mode.
For more info please
On May 20, 2013, at 10:29 AM, David Daney wrote:
On 05/20/2013 09:58 AM, Sanjay Lal wrote:
On May 20, 2013, at 8:50 AM, David Daney wrote:
On 05/18/2013 10:47 PM, Sanjay Lal wrote:
The following patch set adds support for the recently announced
virtualization
extensions for the MIPS32
On May 19, 2013, at 8:52 AM, Gleb Natapov wrote:
On Sat, May 18, 2013 at 06:54:24AM -0700, Sanjay Lal wrote:
- As suggested by Gleb, wrap calls to gfn_to_pfn() with
srcu_read_lock/unlock().
Memory slots should be acccessed from a SRCU read section.
- kvm_mips_map_page() now returns
KVM/MIPS ABI
defined by David Daney @ Cavium.
--
Sanjay Lal (4):
KVM/MIPS32: Move include/asm/kvm.h = include/uapi/asm/kvm.h since it
is a user visible API.
KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()
KVM/MIPS32: Export min_low_pfn.
KVM/MIPS32: Bring in patch
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm.h | 55
arch/mips/include/uapi/asm/kvm.h | 55
2 files changed, 55 insertions(+), 55 deletions(-)
delete mode 100644 arch/mips
-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_tlb.c | 36 +++-
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/arch/mips/kvm/kvm_tlb.c b/arch/mips/kvm/kvm_tlb.c
index 89511a9..ab2e9b0 100644
--- a/arch/mips/kvm/kvm_tlb.c
+++ b/arch/mips/kvm
The KVM module uses the standard MIPS cache management routines, which use
min_low_pfn.
This creates and indirect dependency, requiring min_low_pfn to be exported.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kernel/mips_ksyms.c | 6 ++
arch/mips/kvm/kvm_tlb.c | 1 -
2
be hidden behind
function pointers as appropriate.
Signed-off-by: David Daney david.da...@cavium.com
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm_host.h | 4 -
arch/mips/include/uapi/asm/kvm.h | 106 ++---
arch/mips/kvm/kvm_mips.c | 102
in Guest mode. This greatly reduces VM
exits.
(2) Trap and Emulate: Runs minimally modified guest kernels in UM and uses
binary patching
to minimize the number of traps and improve performance. This is used for
processors
that do not support the VZ-ASE.
--
Sanjay Lal (18):
Revert MIPS
This reverts commit d532f3d26716a39dfd4b88d687bd344fbe77e390.
Conflicts:
arch/mips/mm/tlbex.c
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/mmu_context.h | 95 ++---
arch/mips/kernel/genex.S| 2 +-
arch/mips/kernel
This reverts commit f6b06d9361a008afb93b97fb3683a6e92d69d0f4.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/mm/tlbex.c | 34 ++
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 4d46d37
Signed-off-by: Sanjay Lal sanj...@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
The KVM module uses the standard MIPS cache management routines, which use
min_low_pfn.
This creates and indirect dependency, requiring min_low_pfn to be exported.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kernel/mips_ksyms.c | 6 ++
1 file changed, 6 insertions(+)
diff
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/mipsvzregs.h | 494 +
1 file changed, 494 insertions(+)
create mode 100644 arch/mips/include/asm/mipsvzregs.h
diff --git a/arch/mips/include/asm/mipsvzregs.h
b/arch/mips/include/asm
- GuestIDs and Virtual IRQs are optional
- New TLBINV instruction is also optional
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/cpu-features.h | 36
arch/mips/include/asm/cpu-info.h | 21 +
arch/mips/include
- Add VZ specific VM Exit reasons to the traces.
- Add top level handler for Guest Exit exceptions.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_mips.c | 73 +++-
1 file changed, 53 insertions(+), 20 deletions(-)
diff --git
The VZ-ASE provices the Guest with its own COP0 context, so the types of
exceptions
that will trap to the root a lot fewer than in the trap and emulate case.
- Root level TLB miss handlers that map GPAs to RPAs.
- Guest Exits
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm
- Add support for the MIPS VZ-ASE
- Whitespace fixes
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_locore.S | 1088 +++-
1 file changed, 573 insertions(+), 515 deletions(-)
diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm
- Now that commit d532f3d26 has been reverted in the MIPS tree,
revert back to the older method of using the ASID_MASK.
- Trivial cleanup: s/unsigned long/long
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_mips_dyntrans.c | 24 ++--
arch/mips/kvm/kvm_mips_emul.c
- Add config option for KVM/MIPS with VZ support.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/Kconfig | 14 +-
arch/mips/kvm/Makefile | 14 +-
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/arch/mips/kvm/Kconfig b/arch/mips/kvm
- Add API to allow clients (QEMU etc.) to check whether the H/W
supports the MIPS VZ-ASE.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
include/uapi/linux/kvm.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index a5c86fc..5889e976
- Guest physical addresses need to be mapped by the Root TLB.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_tlb.c | 444 +++-
1 file changed, 359 insertions(+), 85 deletions(-)
diff --git a/arch/mips/kvm/kvm_tlb.c b/arch/mips/kvm
- Additional VZ related exit reasons, used in the trace logs.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_mips_stats.c | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/arch/mips/kvm/kvm_mips_stats.c b/arch/mips/kvm/kvm_mips_stats.c
- In Trap Emulate the hypervisor maintains exception priority
in order to comply with the priorities defined by the architecture.
- In VZ mode, we just set all the pending exception bits, and let
the processor deliver them to the guest in the expected priority
order.
Signed-off-by: Sanjay
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_trap_emul.c | 68 ---
1 file changed, 44 insertions(+), 24 deletions(-)
diff --git a/arch/mips/kvm/kvm_trap_emul.c b/arch/mips/kvm/kvm_trap_emul.c
index 466aeef..19b32a1 100644
--- a/arch
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm_host.h | 244 ++-
1 file changed, 191 insertions(+), 53 deletions(-)
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h
index e68781e..c92e297 100644
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kernel/proc.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index a3e4614..308e042 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -99,6 +99,17
The KVM module uses the standard MIPS cache management routines, which use
min_low_pfn.
This creates and indirect dependency, requiring min_low_pfn to be exported.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kernel/mips_ksyms.c | 6 ++
1 file changed, 6 insertions(+)
diff
The following patch set fixes a few issues with KVM/MIPS32 in Linux 3.10.
--
Sanjay Lal (3):
KVM/MIPS32: Move include/asm/kvm.h = include/uapi/asm/kvm.h since it
is a user visible API.
KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()
KVM/MIPS32: Fix up KVM breakage
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm.h | 55
arch/mips/include/uapi/asm/kvm.h | 55
2 files changed, 55 insertions(+), 55 deletions(-)
delete mode 100644 arch/mips
-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_tlb.c | 36 +++-
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/arch/mips/kvm/kvm_tlb.c b/arch/mips/kvm/kvm_tlb.c
index 89511a9..ab2e9b0 100644
--- a/arch/mips/kvm/kvm_tlb.c
+++ b/arch/mips/kvm
on the MIPS mailing list and until a solution is found,
For now define KVM_ASID_MASK as 0xFF to fix this issue up for Linux 3.10.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm_host.h | 5 +
arch/mips/kvm/kvm_mips_emul.c| 22 +++---
arch/mips/kvm
On May 14, 2013, at 2:27 AM, Gleb Natapov wrote:
+EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported
by generic code */
+
What you need this for? It is not used anywhere in this patch and by
mips/kvm code in general.
I did some digging around myself, since the
On May 15, 2013, at 10:30 AM, Gleb Natapov wrote:
On Wed, May 15, 2013 at 09:54:24AM -0700, David Daney wrote:
On 05/15/2013 08:54 AM, Sanjay Lal wrote:
On May 14, 2013, at 2:27 AM, Gleb Natapov wrote:
+EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not
exported
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_tlb.c | 38 +-
1 file changed, 29 insertions(+), 9 deletions(-)
diff --git a/arch/mips/kvm/kvm_tlb.c b/arch/mips/kvm/kvm_tlb.c
index 89511a9..218075f 100644
--- a/arch/mips/kvm/kvm_tlb.c
for a particular gfn.
- Follow the latest convention and move the kvm.h API file under uapi/...
--
Sanjay Lal (2):
KVM/MIPS32: Move include/asm/kvm.h = include/uapi/asm/kvm.h since it
is a user visible API.
KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()
arch/mips/include/asm/kvm.h
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm.h | 55
arch/mips/include/uapi/asm/kvm.h | 55
2 files changed, 55 insertions(+), 55 deletions(-)
delete mode 100644 arch/mips
On May 13, 2013, at 2:07 PM, David Daney wrote:
Sanjay,
Have you looked at:
http://www.linux-mips.org/archives/linux-mips/2013-05/msg00049.html
We should start working toward unifying the KVM interface.
David Daney.
Hey David, I am currently in the process of integrating and
On May 6, 2013, at 3:39 PM, David Daney wrote:
/* for KVM_GET_REGS and KVM_SET_REGS */
+/*
+ * If Config[AT] is zero (32-bit CPU), the register contents are
+ * stored in the lower 32-bits of the struct kvm_regs fields and sign
+ * extended to 64-bits.
+ */
struct kvm_regs {
-
On Mar 18, 2013, at 12:04 PM, Jonas Gorski wrote:
On 15 March 2013 03:09, Sanjay Lal sanj...@kymasys.com wrote:
- Rename KVM_MEMORY_SLOTS - KVM_USER_MEM_SLOTS
- Fix kvm_arch_{prepare,commit}_memory_region()
- Also remove kvm_arch_set_memory_region which was unused.
I just stumbled upon
)
Reported-by: Andrew Morton a...@linux-foundation.org
Cc: Alex Williamson alex.william...@redhat.com
Cc: Marcelo Tosatti mtosa...@redhat.com
Cc: Gleb Natapov g...@redhat.com
Cc: Ralf Baechle r...@linux-mips.org
Signed-off-by: Andrew Morton a...@linux-foundation.org
Signed-off-by: Sanjay Lal sanj
- Rename KVM_MEMORY_SLOTS - KVM_USER_MEM_SLOTS
- Fix kvm_arch_{prepare,commit}_memory_region()
- Also remove kvm_arch_set_memory_region which was unused.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm_host.h | 2 +-
arch/mips/kvm/kvm_mips.c | 12
On Mar 2, 2013, at 7:45 AM, Peter Maydell wrote:
On 2 March 2013 15:18, Sanjay Lal sanj...@kymasys.com wrote:
+/* If we have an interrupt but the guest is not ready to receive an
+ * interrupt, request an interrupt window exit. This will
+ * cause a return to userspace as soon
On Mar 2, 2013, at 12:03 PM, Peter Maydell wrote:
On 2 March 2013 15:18, Sanjay Lal sanj...@kymasys.com wrote:
--- /dev/null
+++ b/hw/mips_cps_bootcode.h
@@ -0,0 +1,310 @@
+/* Sample boot code for 1004K CPS (Coherent Processing System.)
+ * Not Generic for all Release 2 or higher MIPS32
On Mar 2, 2013, at 7:27 AM, Peter Maydell wrote:
2013/3/2 Sanjay Lal sanj...@kymasys.com:
+static void gt64xxx_save(QEMUFile *f, void *opaque)
+{
+GT64120State *s = opaque;
+
+/* CPU Configuration */
+qemu_put_be32s(f, s-regs[GT_CPU]);
+qemu_put_be32s(f, s-regs[GT_MULTI
---
hw/mips_cps_bootcode.h | 310 +
1 file changed, 310 insertions(+)
create mode 100644 hw/mips_cps_bootcode.h
diff --git a/hw/mips_cps_bootcode.h b/hw/mips_cps_bootcode.h
new file mode 100644
index 000..40289a4
--- /dev/null
+++
---
hw/mips_cps_bootcode.h | 310 +
1 file changed, 310 insertions(+)
create mode 100644 hw/mips_cps_bootcode.h
diff --git a/hw/mips_cps_bootcode.h b/hw/mips_cps_bootcode.h
new file mode 100644
index 000..40289a4
--- /dev/null
+++
.
+ *
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
+ * Authors: Sanjay Lal sanj...@kymasys.com
+*/
+
+#include hw.h
+#include qemu/bitmap.h
+#include exec/memory.h
+#include sysemu/sysemu.h
+
+#ifdef CONFIG_KVM
+#include sysemu/kvm.h
+#include kvm_mips.h
+#endif
+
+#include
---
hw/mips_int.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/hw/mips_int.c b/hw/mips_int.c
index 6423fd0..6c655af 100644
--- a/hw/mips_int.c
+++ b/hw/mips_int.c
@@ -23,6 +23,8 @@
#include hw.h
#include mips_cpudevs.h
#include cpu.h
+#include sysemu/kvm.h
+#include
---
hw/gt64xxx.c | 317 +++
1 file changed, 317 insertions(+)
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
index 977a2c5..3583ca8 100644
--- a/hw/gt64xxx.c
+++ b/hw/gt64xxx.c
@@ -31,6 +31,8 @@
//#define DEBUG
+#define GT64XXX_VM_VERSION
---
hw/mips_timer.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/mips_timer.c b/hw/mips_timer.c
index 83c400c..0c86a3b 100644
--- a/hw/mips_timer.c
+++ b/hw/mips_timer.c
@@ -19,11 +19,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
In trap and emulate mode both the guest kernel and guest userspace execute in
UM:
Guest User address space: 0x - 0x4000
Guest Kernel Unmapped: 0x4000 - 0x6000
Guest Kernel Mapped:0x6000 - 0x8000
---
hw/mips_addr.c| 14 ++
- In KVM mode the bootrom is loaded and executed from the last 1MB of DRAM.
- Use the CPS bootrom from MIPS in KVM mode. This allows bootstrapping of
multiple cores.
- Add suport for MIPS GIC emulation for SMP Guests.
---
hw/mips_malta.c | 192
of this archive
+ * for more details.
+ *
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
+ * Authors: Sanjay Lal sanj...@kymasys.com
+ */
+
+#ifndef __LINUX_KVM_MIPS_H
+#define __LINUX_KVM_MIPS_H
+
+#include linux/types.h
+
+#define __KVM_MIPS
+
+#define N_MIPS_COPROC_REGS 32
---
configure | 17 +++--
hw/mips/Makefile.objs | 2 +-
target-mips/Makefile.objs | 1 +
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index bf5970f..5447661 100755
--- a/configure
+++ b/configure
@@ -1370,7 +1370,12 @@
---
kvm-all.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/kvm-all.c b/kvm-all.c
index 4decfdc..2ac9e88 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1966,7 +1966,12 @@ int kvm_set_signal_mask(CPUArchState *env, const
sigset_t *sigset)
sigmask = g_malloc(sizeof(*sigmask) +
On Feb 18, 2013, at 1:44 AM, Gleb Natapov wrote:
On Fri, Feb 15, 2013 at 11:10:46AM -0500, Sanjay Lal wrote:
On Feb 6, 2013, at 8:20 AM, Gleb Natapov wrote:
On Wed, Nov 21, 2012 at 06:34:09PM -0800, Sanjay Lal wrote:
+static gpa_t kvm_trap_emul_gva_to_gpa_cb(gva_t gva)
+{
+ gpa_t gpa
On Feb 15, 2013, at 1:41 PM, Gleb Natapov wrote:
On Fri, Feb 15, 2013 at 01:19:29PM -0500, Sanjay Lal wrote:
On Feb 6, 2013, at 7:08 AM, Gleb Natapov wrote:
+static void kvm_mips_map_page(struct kvm *kvm, gfn_t gfn)
+{
+ pfn_t pfn;
+
+ if (kvm-arch.guest_pmap[gfn
On Feb 6, 2013, at 8:20 AM, Gleb Natapov wrote:
On Wed, Nov 21, 2012 at 06:34:09PM -0800, Sanjay Lal wrote:
+static gpa_t kvm_trap_emul_gva_to_gpa_cb(gva_t gva)
+{
+gpa_t gpa;
+uint32_t kseg = KSEGX(gva);
+
+if ((kseg == CKSEG0) || (kseg == CKSEG1))
You seems to be using
On Feb 6, 2013, at 7:08 AM, Gleb Natapov wrote:
+static void kvm_mips_map_page(struct kvm *kvm, gfn_t gfn)
+{
+pfn_t pfn;
+
+if (kvm-arch.guest_pmap[gfn] != KVM_INVALID_PAGE)
+return;
+
+pfn =kvm_mips_gfn_to_pfn(kvm, gfn);
This call should be in srcu read
On Feb 6, 2013, at 8:17 AM, Gleb Natapov wrote:
On Wed, Nov 21, 2012 at 06:34:07PM -0800, Sanjay Lal wrote:
+int kvm_mips_dump_stats(struct kvm_vcpu *vcpu)
+{
+int i, j __unused;
+#ifdef CONFIG_KVM_MIPS_DEBUG_COP0_COUNTERS
+printk(\nKVM VCPU[%d] COP0 Access Profile:\n, vcpu
On Jan 24, 2013, at 10:05 AM, Ralf Baechle wrote:
On Wed, Nov 21, 2012 at 06:33:58PM -0800, Sanjay Lal wrote:
I've queued the patch set. I've done a few stylistic changes such as
getting rid of all use of ulong and u_long data types in favor of
unsigned long. I also ran
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
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/kvm.h | 55
arch/mips/include/asm/kvm_host.h | 669 +++
2 files changed, 724 insertions(+)
create mode 100644 arch/mips/include/asm/kvm.h
create mode 100644 arch/mips/include
.
As a workaround, make sure that CONFIG_SMP is disabled for Guest kernels.
This will be fixed in a future release.
(4) FPU support:
Currently KVM/MIPS emulates a 24K CPU without a FPU.
This will be fixed in a future release
--
Sanjay Lal (18):
KVM/MIPS32: Infrastructure/build files.
KVM
] and this is mapped into the guest kernel address space @ VA 0x0.
mfc0/mtc0 operations are transformed to load/stores.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_mips_comm.h | 23 ++
arch/mips/kvm/kvm_mips_commpage.c | 37 ++
arch/mips/kvm/kvm_mips_dyntrans.c | 149
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kernel/asm-offsets.c | 66 ++
1 file changed, 66 insertions(+)
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 0c4bce4..66895de 100644
--- a/arch/mips/kernel
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/mm/c-r4k.c | 6 --
arch/mips/mm/cache.c | 1 +
arch/mips/mm/tlb-r4k.c | 2 ++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 2b61462..1923063 100644
--- a/arch
to the guest
If entry does exist in the Guest TLB and is VALID
Inject the TLB entry into the Shadow TLB
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_tlb.c | 932
1 file changed, 932 insertions(+)
create
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/00README.txt | 31 +++
arch/mips/kvm/Makefile | 17 +
2 files changed, 48 insertions(+)
create mode 100644 arch/mips/kvm/00README.txt
create mode 100644 arch/mips/kvm/Makefile
diff
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kernel/smp.c | 1 +
mm/bootmem.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 9005bf9..60ea489 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_mips_int.c | 243 +++
arch/mips/kvm/kvm_mips_int.h | 49 +
2 files changed, 292 insertions(+)
create mode 100644 arch/mips/kvm/kvm_mips_int.c
create mode 100644 arch/mips/kvm
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_cb.c| 14 ++
arch/mips/kvm/kvm_trap_emul.c | 482 ++
2 files changed, 496 insertions(+)
create mode 100644 arch/mips/kvm/kvm_cb.c
create mode 100644 arch/mips/kvm
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_mips_stats.c | 81 ++
1 file changed, 81 insertions(+)
create mode 100644 arch/mips/kvm/kvm_mips_stats.c
diff --git a/arch/mips/kvm/kvm_mips_stats.c b/arch/mips/kvm/kvm_mips_stats.c
new
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
virt/kvm/kvm_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index be70035..ecd96ce 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1880,7 +1880,7 @@ static long
This bug is discussed in:
http://lkml.indiana.edu/hypermail/linux/kernel/1205.2/00719.html
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kernel/entry.S | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
- The Guest kernel is run in UM and privileged instructions cause a trap.
- If the instruction causing the trap is in a branch delay slot, the branch
needs to be emulated to figure
out the PC @ which the guest will resume execution.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips
- Implements the arch specific APIs for KVM, some are stubs for MIPS
- kvm_mips_handle_exit(): Main 'C' distpatch routine for handling exceptions
while in Guest mode.
- Also implements in-kernel timer interrupt support for the guest.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips
-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/mach-generic/spaces.h | 9 -
arch/mips/include/asm/processor.h | 5 +
arch/mips/include/asm/uaccess.h | 11 ++-
arch/mips/kernel/binfmt_elfo32.c| 4
arch/mips/kernel/cevt
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/mmu_context.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/mips/include/asm/mmu_context.h
b/arch/mips/include/asm/mmu_context.h
index 9b02cfb..10a3fd2 100644
--- a/arch/mips/include/asm/mmu_context.h
+++ b
while in
guest context. Save guest context, restore some kernel context and jump to
main 'C' handler: kvm_mips_handle_exit()
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_locore.S | 651 +
1 file changed, 651 insertions
On Nov 1, 2012, at 11:18 AM, Avi Kivity wrote:
+
+/* Set the appropriate status bits based on host CPU features, before
we hit the scheduler */
+kvm_mips_set_c0_status();
+
+local_irq_enable();
Ah, so you handle exits with interrupts enabled. But that's not how we
usually
On Nov 1, 2012, at 11:24 AM, Avi Kivity wrote:
On 10/31/2012 05:19 PM, Sanjay Lal wrote:
Currently, the following instructions are translated:
- CACHE (indexed)
- CACHE (va based): translated to a synci, overkill on D-CACHE operations,
but still much faster than a trap.
- mfc0/mtc0
On Nov 1, 2012, at 11:24 AM, Avi Kivity wrote:
On 10/31/2012 05:19 PM, Sanjay Lal wrote:
Currently, the following instructions are translated:
- CACHE (indexed)
- CACHE (va based): translated to a synci, overkill on D-CACHE operations,
but still much faster than a trap.
- mfc0/mtc0
On Nov 1, 2012, at 11:04 AM, Avi Kivity wrote:
On 10/31/2012 05:18 PM, Sanjay Lal wrote:
+
+/* Special address that contains the comm page, used for reducing # of
traps */
+#define KVM_GUEST_COMMPAGE_ADDR 0x0
+
+struct kvm_arch
+{
+/* Guest GVA-HPA page table */
+ulong
On Nov 1, 2012, at 10:51 AM, Avi Kivity wrote:
On 10/31/2012 05:17 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
- Implements the arch specific APIs for KVM, some are stubs for MIPS
- kvm_mips_handle_exit(): Main 'C' distpatch routine for handling exceptions
while in Guest mode.
- Also implements in-kernel timer interrupt support for the guest.
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips
-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/include/asm/mach-generic/spaces.h | 9 -
arch/mips/include/asm/processor.h | 5 +
arch/mips/include/asm/uaccess.h | 15 ---
arch/mips/kernel/binfmt_elfo32.c| 6 +-
arch/mips/kernel
to the guest
If entry does exist in the Guest TLB and is VALID
Inject the TLB entry into the Shadow TLB
Signed-off-by: Sanjay Lal sanj...@kymasys.com
---
arch/mips/kvm/kvm_tlb.c | 889
1 file changed, 889 insertions(+)
create
1 - 100 of 117 matches
Mail list logo