Re: [Qemu-devel] [PATCH v5 10/12] hw/mips: malta: Add KVM support

2014-06-19 Thread Sanjay Lal
On Jun 19, 2014, at 9:27 AM, Aurelien Jarno 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, it means tha

Re: [Qemu-devel] [PATCH 11/12] KVM/MIPS: MIPS specfic APIs for KVM.

2013-03-06 Thread Sanjay Lal
On Mar 2, 2013, at 7:45 AM, Peter Maydell wrote: > On 2 March 2013 15:18, Sanjay Lal 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

Re: [Qemu-devel] [PATCH 03/12] KVM/MIPS: Add save/restore state APIs for saving/restoring KVM guests.

2013-03-06 Thread Sanjay Lal
On Mar 2, 2013, at 7:27 AM, Peter Maydell wrote: > 2013/3/2 Sanjay Lal : >> +static void gt64xxx_save(QEMUFile *f, void *opaque) >> +{ >> +GT64120State *s = opaque; >> + >> +/* CPU Configuration */ >> +qemu_put_be32s(f, &s->regs[GT_CPU]

Re: [Qemu-devel] [PATCH 01/12] KVM/MIPS: Bootcode for MIPS SMP configurations with a GCMP

2013-03-06 Thread Sanjay Lal
On Mar 2, 2013, at 12:03 PM, Peter Maydell wrote: > On 2 March 2013 15:18, Sanjay Lal 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 Rel

[Qemu-devel] [PATCH 10/12] KVM/MIPS: Set page size to 16K in KVM mode.

2013-03-02 Thread Sanjay Lal
--- target-mips/mips-defs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h index bf094a3..473ddf8 100644 --- a/target-mips/mips-defs.h +++ b/target-mips/mips-defs.h @@ -5,7 +5,12 @@ //#define USE_HOST_FLOAT_REGS /* Real pages are vari

[Qemu-devel] [PATCH 04/12] KVM/MIPS: Do not start the periodic timer in KVM mode. Compare/Count timer interrupts are handled in-kernel.

2013-03-02 Thread Sanjay Lal
--- 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 DE

[Qemu-devel] [PATCH 06/12] KVM/MIPS: Define APIs to convert Guest KSEG0 <-> Guest Physical addresses.

2013-03-02 Thread Sanjay Lal
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 ++ h

[Qemu-devel] [PATCH 01/12] MIPS: Bootcode for MIPS SMP configurations with a GCMP

2013-03-02 Thread Sanjay Lal
--- 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 +++ b/hw/mips_cps

[Qemu-devel] [PATCH 05/12] KVM/MIPS: In KVM mode, inject IRQ2 (I/O) interupts via ioctls(). COP0 emulation is in-kernel

2013-03-02 Thread Sanjay Lal
--- 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" +#incl

[Qemu-devel] [PATCH 01/12] KVM/MIPS: Bootcode for MIPS SMP configurations with a GCMP

2013-03-02 Thread Sanjay Lal
--- 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 +++ b/hw/mips_cps

[Qemu-devel] [PATCH 08/12] KVM/MIPS: Enable KVM/MIPS for MIPS targets. Add MIPS GIC code to the build.

2013-03-02 Thread Sanjay Lal
--- 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 @@ case

[Qemu-devel] [PATCH 12/12] KVM/MIPS: General KVM support and support for SMP Guests

2013-03-02 Thread Sanjay Lal
- 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 +

[Qemu-devel] [PATCH 00/12] KVM Support for MIPS32 Processors

2013-03-02 Thread Sanjay Lal
a cluster of MIPS32R2 cpus. There is a companion kernel patchset for KVM that has been posted on the KVM/MIPS mailing lists. -- Sanjay Lal (12): KVM/MIPS: Bootcode for MIPS SMP configurations with a GCMP KVM/MIPS: GIC emulation for SMP guests. KVM/MIPS: Add save/restore state APIs for sav

[Qemu-devel] [PATCH 11/12] KVM/MIPS: MIPS specfic APIs for KVM.

2013-03-02 Thread Sanjay Lal
MIPS: MIPS specific KVM APIs + * + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. + * Authors: Sanjay Lal +*/ + +#include +#include +#include + +#include + +#include "qemu-common.h" +#include "qemu/timer.h" +#include "sysemu/sysemu.h" +#include &q

[Qemu-devel] [PATCH 09/12] KVM/MIPS: set sigmask length to 16 for MIPS targets.

2013-03-02 Thread Sanjay Lal
--- 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) + sizeof(

[Qemu-devel] [PATCH 07/12] KVM/MIPS: QEMU <-> Kernel interface for KVM/MIPS

2013-03-02 Thread Sanjay Lal
rectory of this archive + * for more details. + * + * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. + * Authors: Sanjay Lal + */ + +#ifndef __LINUX_KVM_MIPS_H +#define __LINUX_KVM_MIPS_H + +#include + +#define __KVM_MIPS + +#define N_MIPS_COPROC_REGS 32 +#define N_MIPS_

[Qemu-devel] [PATCH 03/12] KVM/MIPS: Add save/restore state APIs for saving/restoring KVM guests.

2013-03-02 Thread Sanjay Lal
--- 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

[Qemu-devel] [PATCH 02/12] KVM/MIPS: GIC emulation for SMP guests.

2013-03-02 Thread Sanjay Lal
--- hw/mips_gcmpregs.h | 122 hw/mips_gic.c | 418 + hw/mips_gic.h | 378 3 files changed, 918 insertions(+) create mode 100644 hw/mips_gcmpregs.h create mode 100644 hw