Re: [PATCH 2/9] MIPS OCTEON Enable use of FPU

2015-01-12 Thread David Daney
A for these. Add r4k_fpu.o to handle low level FPU initialization. Modify octeon_switch.S to save the FPU registers. And include r4k_switch.S to pick up more FPU support. Get rid of "#define cpu_has_fpu 0" Signed-off-by: David Daney Signed-off-by: Andreas Herrmann Cc: linux-m...@li

Re: [PATCH v4 5/7] MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_"

2014-06-26 Thread David Daney
On 06/26/2014 04:21 PM, James Hogan wrote: On 26 June 2014 22:55, David Daney wrote: There is precedence in x86 for some of the names though. But really why churn up the code in the first place? the kvm_mips prefix does tell us exactly what we are dealing with. That's why people cr

Re: [PATCH v4 5/7] MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_"

2014-06-26 Thread David Daney
On 06/26/2014 12:55 PM, Deng-Cheng Zhu wrote: On 06/26/2014 12:28 PM, David Daney wrote: On 06/26/2014 12:11 PM, Deng-Cheng Zhu wrote: From: Deng-Cheng Zhu Since all the files are in arch/mips/kvm/, there's no need of the prefixes "kvm_" and "kvm_mips_". I don

Re: [PATCH v4 5/7] MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_"

2014-06-26 Thread David Daney
On 06/26/2014 12:11 PM, Deng-Cheng Zhu wrote: From: Deng-Cheng Zhu Since all the files are in arch/mips/kvm/, there's no need of the prefixes "kvm_" and "kvm_mips_". I don't like this change. It will leads me to confuse arch/mips/kvm/interrupt.h with include/linux/interrupt.h x86 calls t

Re: [PATCH v2 09/13] MIPS: Add functions for hypervisor call

2014-06-03 Thread David Daney
In cases like this, I always wonder WWPD (What Would Pinski Do)... Let's get him to opine. Andrew, the patch in question is: http://www.linux-mips.org/archives/linux-mips/2014-05/msg00309.html Thanks, David Daney On 06/03/2014 08:03 AM, Andreas Herrmann wrote: On Tue, Jun 03, 2014 at

Re: [PATCH 10/15] MIPS: Add code for new system 'paravirt'.

2014-05-21 Thread David Daney
On 05/21/2014 06:39 AM, James Hogan wrote: [...] diff --git a/arch/mips/paravirt/paravirt-irq.c b/arch/mips/paravirt/paravirt-irq.c new file mode 100644 index 000..e1603dd --- /dev/null +++ b/arch/mips/paravirt/paravirt-irq.c [...] +static void irq_core_set_enable_local(void *arg) +{ +

Re: [PATCH 06/15] MIPS: Add minimal support for OCTEON3 to c-r4k.c

2014-05-21 Thread David Daney
On 05/21/2014 03:04 AM, James Hogan wrote: On 20/05/14 15:47, Andreas Herrmann wrote: From: David Daney These are needed to boot a generic mips64r2 kernel on OCTEONIII. Signed-off-by: David Daney Signed-off-by: Andreas Herrmann --- arch/mips/include/asm/r4kcache.h |2 ++ arch/mips

Re: [PATCH 03/15] MIPS: OCTEON: Move CAVIUM_OCTEON_CVMSEG_SIZE to CPU_CAVIUM_OCTEON

2014-05-20 Thread David Daney
On 05/20/2014 03:52 PM, James Hogan wrote: Hi Andreas, On Tuesday 20 May 2014 16:47:04 Andreas Herrmann wrote: From: David Daney CVMSEG is related to the CPU core not the SoC system. So needs to be configurable there. Signed-off-by: David Daney Signed-off-by: Andreas Herrmann --- arch

Re: [PATCH 05/21] MIPS: KVM: Add CP0_EPC KVM register access

2014-04-25 Thread David Daney
On 04/25/2014 01:29 PM, James Hogan wrote: Hi David, On Friday 25 April 2014 09:44:17 David Daney wrote: On 04/25/2014 08:19 AM, James Hogan wrote: Contrary to the comment, the guest CP0_EPC register cannot be set via kvm_regs, since it is distinct from the guest PC. Add the EPC register to

Re: [PATCH 14/21] MIPS: KVM: Add nanosecond count bias KVM register

2014-04-25 Thread David Daney
u new have two ways to access and manipulate the same thing. 1) The architecturally specified CP0_COUNT. 2) This new bias thing. What if we just let userspace directly manipulate the CP0_COUNT, and if necessary only maintain a bias as an internal implementation detail? David Daney. Sig

Re: [PATCH 11/21] MIPS: KVM: Rewrite count/compare timer emulation

2014-04-25 Thread David Daney
[...] diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index f56bb699506e..57c1085fd6ab 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h @@ -404,8 +404,15 @@ struct kvm_vcpu_arch { u32 io_gpr; /* GPR used as

Re: [PATCH 09/21] MIPS: KVM: Fix timer race modifying guest CP0_Cause

2014-04-25 Thread David Daney
On 04/25/2014 08:19 AM, James Hogan wrote: The hrtimer callback for guest timer timeouts sets the guest's CP0_Cause.TI bit to indicate to the guest that a timer interrupt is pending, however there is no mutual exclusion implemented to prevent this occurring while the guest's CP0_Cause register is

Re: [PATCH 05/21] MIPS: KVM: Add CP0_EPC KVM register access

2014-04-25 Thread David Daney
Cc: kvm@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: David Daney Cc: Sanjay Lal NACK... --- arch/mips/kvm/kvm_mips.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 46cea0bad518

Re: [PATCH 04/21] MIPS: KVM: Fix CP0_EBASE KVM register id

2014-04-25 Thread David Daney
eb Natapov Cc: kvm@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: David Daney Cc: Sanjay Lal --- arch/mips/kvm/kvm_mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 14511138f187..46cea0bad

Re: [PATCH 25/31] mips/kvm: Add some asm-offsets constants used by MIPSVZ.

2013-08-06 Thread David Daney
the patch dependencies/ordering correct can be tricky. David Daney Ralf -- 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/majordomo-info.html

Re: [PATCH] kvm: Make kvm_rebooting visible

2013-08-05 Thread David Daney
many of these are there kernel wide? Could you do something like this instead: DEFINE_AND_EXPORT_GPL(bool, kvm_rebooting); The definition of DEFINE_AND_EXPORT_GPL(_type, _name) is left as an exercise for the reader. David Daney -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH 1/3] mips/kvm: Improve code formatting in arch/mips/kvm/kvm_locore.S

2013-08-05 Thread David Daney
On 08/05/2013 06:43 AM, Gleb Natapov wrote: On Mon, Aug 05, 2013 at 03:21:57PM +0200, Ralf Baechle wrote: On Mon, Aug 05, 2013 at 02:17:01PM +0100, James Hogan wrote: On 01/08/13 21:22, David Daney wrote: From: David Daney No code changes, just reflowing some comments and consistently

[PATCH 2/3] mips/kvm: Cleanup .push/.pop directives in kvm_locore.S

2013-08-01 Thread David Daney
From: David Daney There are: .setpush .setnoreorder .setnoat . . . .setpop Sequences all over the place in this file, but in some places the final ".set pop" is erroneously converted to ".set push&quo

[PATCH 3/3] mips/kvm: Make kvm_locore.S 64-bit buildable/safe.

2013-08-01 Thread David Daney
From: David Daney We need to use more of the Macros in asm.h to allow kvm_locore.S to build in a 64-bit kernel. For 32-bit there is no change in the generated object code. Signed-off-by: David Daney Acked-by: Ralf Baechle --- arch/mips/kvm/kvm_locore.S | 54

[PATCH 1/3] mips/kvm: Improve code formatting in arch/mips/kvm/kvm_locore.S

2013-08-01 Thread David Daney
From: David Daney No code changes, just reflowing some comments and consistently using tabs and spaces. Object code is verified to be unchanged. Signed-off-by: David Daney Acked-by: Ralf Baechle --- arch/mips/kvm/kvm_locore.S | 971 +++-- 1 file

[PATCH 0/3] mips/kvm: Code cleanups for kvm_locore.S

2013-08-01 Thread David Daney
From: David Daney These shouldn't be too controversial, they just clean things up without changing the generated code. More substantial patches will follow, but it seemed like a good idea to clean this up first. David Daney (3): mips/kvm: Improve code formatting in arch/mips/kvm/kvm_loc

[PATCH 1/2] kvm: Add definition of KVM_REG_MIPS

2013-06-10 Thread David Daney
From: David Daney We use 0x7000ULL as 0x6000ULL is reserved for ARM64. Signed-off-by: David Daney --- 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..d88c8ee 100644 --- a

[PATCH 2/2] mips/kvm: Use KVM_REG_MIPS and proper size indicators for *_ONE_REG

2013-06-10 Thread David Daney
From: David Daney The API requires that the GET_ONE_REG and SET_ONE_REG ioctls have this extra information encoded in the register identifiers. Signed-off-by: David Daney --- arch/mips/include/uapi/asm/kvm.h | 81 +++ arch/mips/kvm/kvm_mips.c | 83

[PATCH 0/2] kvm/mips: ABI fix for 3.10

2013-06-10 Thread David Daney
From: David Daney As requested by Gleb Natapov, we need to define and use KVM_REG_MIPS when using the GET_ONE_REG/SET_ONE_REG ioctl. Since this is part of the MIPS kvm support that is new in 3.10, it should be merged before a bad ABI leaks out into an 'official' kernel release. Davi

Re: [PATCH 00/31] KVM/MIPS: Implement hardware virtualization via the MIPS-VZ extensions.

2013-06-10 Thread David Daney
On 06/10/2013 09:43 AM, Sanjay Lal wrote: On Jun 7, 2013, at 4:03 PM, David Daney wrote: From: David Daney 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

Re: [PATCH 00/31] KVM/MIPS: Implement hardware virtualization via the MIPS-VZ extensions.

2013-06-09 Thread David Daney
On 06/09/2013 12:31 AM, Gleb Natapov wrote: On Fri, Jun 07, 2013 at 04:15:00PM -0700, David Daney wrote: I should also add that I will shortly send patches for the kvm tool required to drive this VM as well as a small set of patches that create a para-virtualized MIPS/Linux guest kernel. The

Re: [PATCH v5 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG

2013-06-09 Thread David Daney
On 06/08/2013 04:05 AM, Gleb Natapov wrote: On Wed, May 22, 2013 at 11:43:55AM -0700, David Daney wrote: From: David Daney 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. Now unused

Re: [PATCH 20/31] mips/kvm: Hook into TLB fault handlers.

2013-06-07 Thread David Daney
On 06/07/2013 04:34 PM, Sergei Shtylyov wrote: Hello. On 06/08/2013 03:03 AM, David Daney wrote: From: David Daney If the CPU is operating in guest mode when a TLB related excpetion occurs, give KVM a chance to do emulation. Signed-off-by: David Daney --- arch/mips/mm/fault.c | 8

[PATCH 00/31] KVM/MIPS: Implement hardware virtualization via the MIPS-VZ extensions.

2013-06-07 Thread David Daney
From: David Daney 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 Existing exception handlers are modified to hook in to KVM instead of intercepting all

[PATCH 04/31] mips/kvm: Add casts to avoid pointer width mismatch build failures.

2013-06-07 Thread David Daney
From: David Daney When building for 64-bits we need these cases to make it build. Signed-off-by: David Daney --- arch/mips/kvm/kvm_mips.c | 4 ++-- arch/mips/kvm/kvm_mips_dyntrans.c | 4 ++-- arch/mips/kvm/kvm_mips_emul.c | 2 +- arch/mips/kvm/kvm_tlb.c | 4 ++-- 4

[PATCH 02/31] MIPS: Save and restore K0/K1 when CONFIG_KVM_MIPSVZ

2013-06-07 Thread David Daney
From: David Daney We cannot clobber any registers on exceptions as any guest will need them all. Signed-off-by: David Daney --- arch/mips/include/asm/mipsregs.h | 2 ++ arch/mips/include/asm/stackframe.h | 15 +++ arch/mips/kernel/cpu-probe.c | 7 ++- arch/mips

[PATCH 03/31] mips/kvm: Fix 32-bitisms in kvm_locore.S

2013-06-07 Thread David Daney
From: David Daney For a warning free compile, we need to use the width aware PTR_LI and PTR_LA macros. Use LI variant for immediate data and LA variant for addresses. Signed-off-by: David Daney --- arch/mips/kvm/kvm_locore.S | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 05/31] mips/kvm: Use generic cache flushing functions.

2013-06-07 Thread David Daney
From: David Daney We don't know if we have the r4k specific functions available, so use universally available __flush_cache_all() instead. This takes longer as it flushes both i-cache and d-cache, but is available for all CPUs. Signed-off-by: David Daney --- arch/mips/kvm/kvm_mips_emul.

Re: [PATCH 00/31] KVM/MIPS: Implement hardware virtualization via the MIPS-VZ extensions.

2013-06-07 Thread David Daney
that uses a handful of hypercalls, but mostly just uses virtio devices. It has no emulated real hardware (no 8250 UART, no emulated legacy anything...) David Daney On 06/07/2013 04:03 PM, David Daney wrote: From: David Daney These patches take a somewhat different approach to MIPS

[PATCH 08/31] mips/kvm: Fix code formatting in arch/mips/kvm/kvm_locore.S

2013-06-07 Thread David Daney
From: David Daney It was a completely inconsistent mix of spaces and tabs. Signed-off-by: David Daney --- arch/mips/kvm/kvm_locore.S | 921 +++-- 1 file changed, 464 insertions(+), 457 deletions(-) diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips

[PATCH 06/31] mips/kvm: Rename kvm_vcpu_arch.pc to kvm_vcpu_arch.epc

2013-06-07 Thread David Daney
From: David Daney The proper MIPS name for this register is EPC, so use that. Change the asm-offsets name to KVM_VCPU_ARCH_EPC, so that the symbol name prefix matches the structure name. Signed-off-by: David Daney --- arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kernel/asm-offsets.c

[PATCH 10/31] mips/kvm: Implement ioctls to get and set FPU registers.

2013-06-07 Thread David Daney
From: David Daney The current implementation does nothing with them, but future MIPSVZ work need them. Also add the asm-offsets accessors for the fields. Signed-off-by: David Daney --- arch/mips/include/asm/kvm_host.h | 8 arch/mips/kernel/asm-offsets.c | 8 arch/mips

[PATCH 07/31] mips/kvm: Rename VCPU_registername to KVM_VCPU_ARCH_registername

2013-06-07 Thread David Daney
From: David Daney This makes it follow the pattern where the structure name is the symbol name prefix. Signed-off-by: David Daney --- arch/mips/kernel/asm-offsets.c | 68 +++--- arch/mips/kvm/kvm_locore.S | 206 - 2 files changed, 137

[PATCH 15/31] mips/kvm: Exception handling to leave and reenter guest mode.

2013-06-07 Thread David Daney
From: David Daney Currently this is a little complex, here are the facts about how it works: o When running in Guest mode we set the high bit of CP0_XCONTEXT. If this bit is clear, we don't do anything special on an exception. o If we are in guest mode, upon an exception we: 1) loa

[PATCH 16/31] mips/kvm: Add exception handler for MIPSVZ Guest exceptions.

2013-06-07 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/kernel/genex.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index 163e299..ce0be96 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -486,6 +486,9

[PATCH 17/31] MIPS: Quit exposing Kconfig symbols in uapi headers.

2013-06-07 Thread David Daney
From: David Daney The kernel's struct pt_regs has many fields conditional on various Kconfig variables, we cannot be exporting this garbage to user-space. Move the kernel's definition to asm/ptrace.h, and put a uapi only version in uapi/asm/ptrace.h gated by #ifndef __KERNEL__ Sig

[PATCH 13/31] mips/kvm: Add accessors for MIPS VZ registers.

2013-06-07 Thread David Daney
From: David Daney There are accessors for both the guest control registers as well as guest CP0 context. Signed-off-by: David Daney --- arch/mips/include/asm/mipsregs.h | 260 +++ 1 file changed, 260 insertions(+) diff --git a/arch/mips/include/asm

[PATCH 20/31] mips/kvm: Hook into TLB fault handlers.

2013-06-07 Thread David Daney
From: David Daney If the CPU is operating in guest mode when a TLB related excpetion occurs, give KVM a chance to do emulation. Signed-off-by: David Daney --- arch/mips/mm/fault.c | 8 arch/mips/mm/tlbex-fault.S | 6 ++ 2 files changed, 14 insertions(+) diff --git a/arch

[PATCH 21/31] mips/kvm: Allow set_except_vector() to be used from MIPSVZ code.

2013-06-07 Thread David Daney
From: David Daney We need to move it out of __init so we don't have section mismatch problems. Signed-off-by: David Daney --- arch/mips/include/asm/uasm.h | 2 +- arch/mips/kernel/traps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/uas

[PATCH 22/31] mips/kvm: Split get_new_mmu_context into two parts.

2013-06-07 Thread David Daney
From: David Daney The new function (part) get_new_asid() can now be used from MIPSVZ code. Signed-off-by: David Daney --- arch/mips/include/asm/mmu_context.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include

[PATCH 19/31] mips/kvm: Add host definitions for MIPS VZ based host.

2013-06-07 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/include/asm/kvm_mips_vz.h | 29 + 1 file changed, 29 insertions(+) create mode 100644 arch/mips/include/asm/kvm_mips_vz.h diff --git a/arch/mips/include/asm/kvm_mips_vz.h b/arch/mips/include/asm

[PATCH 14/31] mips/kvm: Add thread_info flag to indicate operation in MIPS VZ Guest Mode.

2013-06-07 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/include/asm/thread_info.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 895320e..a7a894a 100644 --- a/arch/mips/include/asm/thread_info.h +++ b

[PATCH 18/31] mips/kvm: Add pt_regs slots for BadInstr and BadInstrP

2013-06-07 Thread David Daney
From: David Daney These save the instruction word to be used by MIPSVZ code for instruction emulation. Signed-off-by: David Daney --- arch/mips/include/asm/ptrace.h | 4 arch/mips/kernel/asm-offsets.c | 4 2 files changed, 8 insertions(+) diff --git a/arch/mips/include/asm/ptrace.h

[PATCH 25/31] mips/kvm: Add some asm-offsets constants used by MIPSVZ.

2013-06-07 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/kernel/asm-offsets.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 37fd9e2..db09376 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel

[PATCH 26/31] mips/kvm: Split up Kconfig and Makefile definitions in preperation for MIPSVZ.

2013-06-07 Thread David Daney
From: David Daney Create the symbol KVM_MIPSTE, and use it to select the trap and emulate specific things. Signed-off-by: David Daney --- arch/mips/kvm/Kconfig | 14 +- arch/mips/kvm/Makefile | 14 -- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a

[PATCH 28/31] mips/kvm: Only use KVM_COALESCED_MMIO_PAGE_OFFSET with KVM_MIPSTE

2013-06-07 Thread David Daney
From: David Daney The forthcoming MIPSVZ code doesn't currently use this, so it must only be enabled for KVM_MIPSTE. Signed-off-by: David Daney --- arch/mips/include/asm/kvm_host.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/includ

[PATCH 23/31] mips/kvm: Hook into CP unusable exception handler.

2013-06-07 Thread David Daney
From: David Daney The MIPS VZ KVM code needs this to be able to manage the FPU. Signed-off-by: David Daney --- arch/mips/kernel/traps.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index fca0a2f..2bdeb32 100644 --- a/arch/mips

[PATCH 24/31] mips/kvm: Add thread_struct fields used by MIPSVZ hosts.

2013-06-07 Thread David Daney
From: David Daney ... and their accessors in asm-offsets.c Signed-off-by: David Daney --- arch/mips/include/asm/processor.h | 6 ++ arch/mips/kernel/asm-offsets.c| 5 + 2 files changed, 11 insertions(+) diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm

[PATCH 31/31] mips/kvm: Allow for upto 8 KVM vcpus per vm.

2013-06-07 Thread David Daney
From: David Daney The mipsvz implementation allows for SMP, so let's be able to create all those vcpus. Signed-off-by: David Daney --- arch/mips/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/includ

[PATCH 27/31] mips/kvm: Gate the use of kvm_local_flush_tlb_all() by KVM_MIPSTE

2013-06-07 Thread David Daney
From: David Daney Only the trap-and-emulate KVM code needs a Special tlb flusher. All other configurations should use the regular version. Signed-off-by: David Daney --- arch/mips/include/asm/mmu_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include

[PATCH 30/31] mips/kvm: Enable MIPSVZ in Kconfig/Makefile

2013-06-07 Thread David Daney
From: David Daney Also let CPU_CAVIUM_OCTEON select KVM. Signed-off-by: David Daney --- arch/mips/Kconfig | 1 + arch/mips/kvm/Kconfig | 9 + arch/mips/kvm/Makefile | 1 + 3 files changed, 11 insertions(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 7a58ab9

[PATCH 12/31] MIPS: Add instruction format information for WAIT, MTC0, MFC0, et al.

2013-06-07 Thread David Daney
From: David Daney --- arch/mips/include/uapi/asm/inst.h | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h index 0f4aec2..133abc1 100644 --- a/arch/mips/include/uapi/asm/inst.h +++ b

[PATCH 11/31] MIPS: Rearrange branch.c so it can be used by kvm code.

2013-06-07 Thread David Daney
From: David Daney Introduce __compute_return_epc_for_insn0() entry point. Signed-off-by: David Daney --- arch/mips/include/asm/branch.h | 7 + arch/mips/kernel/branch.c | 63 +++--- 2 files changed, 54 insertions(+), 16 deletions(-) diff --git a

[PATCH 01/31] MIPS: Move allocate_kscratch to cpu-probe.c and make it public.

2013-06-07 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/include/asm/mipsregs.h | 2 ++ arch/mips/kernel/cpu-probe.c | 29 + arch/mips/mm/tlbex.c | 20 +--- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/arch/mips

Re: [PATCH 10/18] KVM/MIPS32-VZ: Add API for VZ-ASE Capability

2013-05-30 Thread David Daney
On 05/30/2013 10:51 AM, Paolo Bonzini wrote: Il 30/05/2013 19:07, David Daney ha scritto: 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

Re: [PATCH 10/18] KVM/MIPS32-VZ: Add API for VZ-ASE Capability

2013-05-30 Thread David Daney
y the desired style David Daney Paolo Signed-off-by: Sanjay Lal --- 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 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -

Re: [PATCH v5 0/6] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-23 Thread David Daney
On 05/23/2013 03:28 AM, Gleb Natapov wrote: On Wed, May 22, 2013 at 11:43:50AM -0700, David Daney wrote: From: David Daney Please regenerate against master. arch/mips/include/asm/kvm.h does not exists any more. New patch sent. I gather from this message, that you want to merge this

[PATCH v6 1/6] mips/kvm: Fix ABI for use of FPU.

2013-05-23 Thread David Daney
From: David Daney Define a non-empty struct kvm_fpu. Signed-off-by: David Daney Acked-by: Sanjay Lal --- arch/mips/include/uapi/asm/kvm.h | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/uapi/asm/kvm.h b/arch/mips/include

[PATCH v6 3/6] mips/kvm: Fix name of gpr field in struct kvm_regs.

2013-05-23 Thread David Daney
From: David Daney Signed-off-by: David Daney Acked-by: Sanjay Lal --- arch/mips/include/uapi/asm/kvm.h | 3 ++- arch/mips/kvm/kvm_mips.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/uapi/asm/kvm.h b/arch/mips/include/uapi/asm/kvm.h index

[PATCH v6 4/6] mips/kvm: Use ARRAY_SIZE() instead of hardcoded constants in kvm_arch_vcpu_ioctl_{s,g}et_regs

2013-05-23 Thread David Daney
From: David Daney Also we cannot set special zero register, so force it to zero. Signed-off-by: David Daney Acked-by: Sanjay Lal --- arch/mips/kvm/kvm_mips.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index

[PATCH v6 2/6] mips/kvm: Fix ABI for use of 64-bit registers.

2013-05-23 Thread David Daney
From: David Daney All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. Signed-off-by: David Daney Acked-by: Sanjay Lal --- arch/mips/include/uapi/asm/kvm.h | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff

[PATCH v6 0/6] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-23 Thread David Daney
From: David Daney 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, and does some very minor clean up. Changes from v5: Adjust for kvm.h moving to uapi/asm. Code formatting to achieve line

[PATCH v6 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG

2013-05-23 Thread David Daney
From: David Daney 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. Now unused code and definitions are removed. Signed-off-by: David Daney Acked-by: Sanjay Lal --- arch/mips/include

[PATCH v6 6/6] mips/kvm: Use ENOIOCTLCMD to indicate unimplemented ioctls.

2013-05-23 Thread David Daney
From: David Daney The Linux Way is to return -ENOIOCTLCMD to the vfs when an unimplemented ioctl is requested. Do this in kvm_mips instead of a random mixture of -ENOTSUPP and -EINVAL. Signed-off-by: David Daney Acked-by: Sanjay Lal --- arch/mips/kvm/kvm_mips.c | 18 +- 1

[PATCH v5 3/6] mips/kvm: Fix name of gpr field in struct kvm_regs.

2013-05-22 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 3 ++- arch/mips/kvm/kvm_mips.c| 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h index 86812fb..d145ead 100644 --- a/arch/mips

[PATCH v5 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG

2013-05-22 Thread David Daney
From: David Daney 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. Now unused code and definitions are removed. Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 91

[PATCH v5 4/6] mips/kvm: Use ARRAY_SIZE() instead of hardcoded constants in kvm_arch_vcpu_ioctl_{s,g}et_regs

2013-05-22 Thread David Daney
From: David Daney Also we cannot set special zero register, so force it to zero. Signed-off-by: David Daney --- arch/mips/kvm/kvm_mips.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 93da750..71a1fc1 100644

[PATCH v5 6/6] mips/kvm: Use ENOIOCTLCMD to indicate unimplemented ioctls.

2013-05-22 Thread David Daney
From: David Daney The Linux Way is to return -ENOIOCTLCMD to the vfs when an unimplemented ioctl is requested. Do this in kvm_mips instead of a random mixture of -ENOTSUPP and -EINVAL. Signed-off-by: David Daney --- arch/mips/kvm/kvm_mips.c | 18 +- 1 file changed, 9

[PATCH v5 1/6] mips/kvm: Fix ABI for use of FPU.

2013-05-22 Thread David Daney
From: David Daney Define a non-empty struct kvm_fpu. Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h index 85789ea..0e8f565

[PATCH v5 2/6] mips/kvm: Fix ABI for use of 64-bit registers.

2013-05-22 Thread David Daney
From: David Daney All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/mips/include

[PATCH v5 0/6] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-22 Thread David Daney
From: David Daney 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, and does some very minor clean up. Changes from v4: No code change, just keep more of the code in kvm_mips.c rather than

Re: [PATCH v4 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG

2013-05-22 Thread David Daney
On 05/22/2013 10:44 AM, Sanjay Lal wrote: On May 21, 2013, at 1:54 PM, David Daney wrote: From: David Daney 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

[PATCH v4 3/6] mips/kvm: Fix name of gpr field in struct kvm_regs.

2013-05-21 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 3 ++- arch/mips/kvm/kvm_mips.c| 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h index 86812fb..d145ead 100644 --- a/arch/mips

[PATCH v4 4/6] mips/kvm: Use ARRAY_SIZE() instead of hardcoded constants in kvm_arch_vcpu_ioctl_{s,g}et_regs

2013-05-21 Thread David Daney
From: David Daney Also we cannot set special zero register, so force it to zero. Signed-off-by: David Daney --- arch/mips/kvm/kvm_mips.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 93da750..71a1fc1 100644

[PATCH v4 5/6] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG

2013-05-21 Thread David Daney
From: David Daney 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

[PATCH v4 6/6] mips/kvm: Use ENOIOCTLCMD to indicate unimplemented ioctls.

2013-05-21 Thread David Daney
From: David Daney The Linux Way is to return -ENOIOCTLCMD to the vfs when an unimplemented ioctl is requested. Do this in kvm_mips instead of a random mixture of -ENOTSUPP and -EINVAL. Signed-off-by: David Daney --- arch/mips/kvm/kvm_mips.c | 18 +- 1 file changed, 9

[PATCH v4 1/6] mips/kvm: Fix ABI for use of FPU.

2013-05-21 Thread David Daney
From: David Daney Define a non-empty struct kvm_fpu. Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h index 85789ea..0e8f565

[PATCH v4 2/6] mips/kvm: Fix ABI for use of 64-bit registers.

2013-05-21 Thread David Daney
From: David Daney All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/mips/include

[PATCH v4 0/6] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-21 Thread David Daney
From: David Daney 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, and does some very minor clean up. Chandes from v3: Use KVM_SET_ONE_REG instead of KVM_SET_MSRS. Added ENOIOCTLCMD patch

Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS

2013-05-21 Thread David Daney
On 05/21/2013 09:28 AM, Gleb Natapov wrote: On Tue, May 21, 2013 at 09:21:06AM -0700, David Daney wrote: On 05/21/2013 08:37 AM, Gleb Natapov wrote: On Mon, May 20, 2013 at 02:01:26PM -0700, David Daney wrote: From: David Daney Because not all 256 CP0 registers are ever implemented, we need

Re: [PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS

2013-05-21 Thread David Daney
On 05/21/2013 08:37 AM, Gleb Natapov wrote: On Mon, May 20, 2013 at 02:01:26PM -0700, David Daney wrote: From: David Daney Because not all 256 CP0 registers are ever implemented, we need a different method of manipulating them. Use the KVM_GET_MSRS/KVM_SET_MSRS mechanism as x86 does for its

[PATCH v3 4/5] mips/kvm: Use ARRAY_SIZE() instead of hardcoded constants in kvm_arch_vcpu_ioctl_{s,g}et_regs

2013-05-20 Thread David Daney
From: David Daney Also we cannot set special zero register, so force it to zero. Signed-off-by: David Daney --- arch/mips/kvm/kvm_mips.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 93da750..71a1fc1 100644

[PATCH v3 1/5] mips/kvm: Fix ABI for use of FPU.

2013-05-20 Thread David Daney
From: David Daney Define a non-empty struct kvm_fpu. Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h index 85789ea..0e8f565

[PATCH v3 5/5] mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_MSRS

2013-05-20 Thread David Daney
From: David Daney Because not all 256 CP0 registers are ever implemented, we need a different method of manipulating them. Use the KVM_GET_MSRS/KVM_SET_MSRS mechanism as x86 does for its MSRs. Code related to implementing KVM_GET_MSRS/KVM_SET_MSRS is consolidated in to kvm_trap_emul.c, now

[PATCH v3 2/5] mips/kvm: Fix ABI for use of 64-bit registers.

2013-05-20 Thread David Daney
From: David Daney All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/mips/include

[PATCH v3 0/5] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-20 Thread David Daney
From: David Daney 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, and does some very minor clean up. Changes from v2: Split into five parts, no code change. David Daney (5): mips/kvm: Fix ABI for use of

[PATCH v3 3/5] mips/kvm: Fix name of gpr field in struct kvm_regs.

2013-05-20 Thread David Daney
From: David Daney Signed-off-by: David Daney --- arch/mips/include/asm/kvm.h | 3 ++- arch/mips/kvm/kvm_mips.c| 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/asm/kvm.h b/arch/mips/include/asm/kvm.h index 86812fb..d145ead 100644 --- a/arch/mips

Re: [PATCH 00/18] KVM/MIPS32: Support for the new Virtualization ASE (VZ-ASE)

2013-05-20 Thread David Daney
me of the existing CP0 registers. David Daney -- 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/majordomo-info.html

Re: [PATCH 00/18] KVM/MIPS32: Support for the new Virtualization ASE (VZ-ASE)

2013-05-20 Thread David Daney
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 architecture and allows running unmodified kernels in

Re: [PATCH 00/18] KVM/MIPS32: Support for the new Virtualization ASE (VZ-ASE)

2013-05-20 Thread David Daney
this stuff? David Daney (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: micr

Re: [PATCH 4/4] KVM/MIPS32: Bring in patch from David Daney with new 64 bit compatible ABI.

2013-05-19 Thread David Daney
On 05/19/2013 07:17 AM, Gleb Natapov wrote: On Sat, May 18, 2013 at 06:54:26AM -0700, Sanjay Lal wrote: From: David Daney There are several parts to this: o All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. o FPU register

Re: [PATCH] KVM/MIPS32: Export min_low_pfn.

2013-05-17 Thread David Daney
doing architecture specific exports of the same symbol is not a clean way of doing things. The second time something needs to be done, it should be factored out into common code. David Daney -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a me

Re: [PATCH 2/2] KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()

2013-05-15 Thread David Daney
f the min_low_pfn definition, not in some random architecture file. An alternative is to fix the cache management functions so they don't require the export. David Daney Regards Sanjay -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of

Re: [PATCH 0/2] KVM/MIPS32: Fixes for Linux 3.10

2013-05-13 Thread David Daney
panic() if it cannot find a mapping for a particular gfn. - Follow the latest convention and move the kvm.h API file under uapi/... 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.

[PATCH v2] mips/kvm: Fix ABI for compatibility with 64-bit guests.

2013-05-07 Thread David Daney
From: David Daney There are several parts to this: o All registers are 64-bits wide, 32-bit guests use the least significant portion of the register storage fields. o FPU register formats are defined. o CP0 Registers are manipulated via the KVM_GET_MSRS/KVM_SET_MSRS mechanism. The

  1   2   >