Re: powerpc/64: Include KVM guest test in all interrupt vectors

2015-12-07 Thread Michael Ellerman
On Thu, 2015-12-11 at 05:44:42 UTC, Paul Mackerras wrote: > Currently, if HV KVM is configured but PR KVM isn't, we don't include > a test to see whether we were interrupted in KVM guest context for the > set of interrupts which get delivered directly to the guest by hardware > if they occur in

Re: [v2,2/9] powerpc/smp: Add smp_muxed_ipi_set_message

2015-12-06 Thread Michael Ellerman
On Wed, 2015-25-11 at 23:44:49 UTC, "Suresh E. Warrier" wrote: > smp_muxed_ipi_message_pass() invokes smp_ops->cause_ipi, which > updates the MFFR through an ioremapped address, to cause the > IPI. Because of this real mode callers cannot call > smp_muxed_ipi_message_pass() for IPI messaging.

Re: [v2,3/9] powerpc/powernv: Add icp_native_cause_ipi_rm

2015-12-06 Thread Michael Ellerman
Subject would be better as "powerpc/xics". On Wed, 2015-25-11 at 23:44:50 UTC, "Suresh E. Warrier" wrote: > Function to cause an IPI. Requires kvm_hstate.xics_phys > to be initialized with physical address of XICS. Please expand the change log a bit, this is a bit terse. > diff --git

Re: [kbuild-all] [PATCH 5/6] KVM: PPC: Book3S HV: Send IPI to host core to wake VCPU

2015-11-02 Thread Michael Ellerman
On Mon, 2015-11-02 at 16:10 -0600, Suresh E. Warrier wrote: > Hi Fengguang, > > I understand the problem. > > I will send you the URL for the powerpc git tree once my patches > are pulled in so that we can then pass that to the robot. The robot already knows about the powerpc next tree. It

Re: [Qemu-devel] [PATCH 19/23] userfaultfd: activate syscall

2015-09-08 Thread Michael Ellerman
On Wed, 2015-08-12 at 10:53 +0530, Bharata B Rao wrote: > On Tue, Aug 11, 2015 at 03:48:26PM +0200, Andrea Arcangeli wrote: > > Hello Bharata, > > > > On Tue, Aug 11, 2015 at 03:37:29PM +0530, Bharata B Rao wrote: > > > May be it is a bit late to bring this up, but I needed the following fix > >

Re: [Qemu-devel] [PATCH 19/23] userfaultfd: activate syscall

2015-09-08 Thread Michael Ellerman
On Tue, 2015-09-08 at 12:09 +0530, Bharata B Rao wrote: > On Tue, Sep 08, 2015 at 04:08:06PM +1000, Michael Ellerman wrote: > > On Wed, 2015-08-12 at 10:53 +0530, Bharata B Rao wrote: > > > On Tue, Aug 11, 2015 at 03:48:26PM +0200, Andrea Arcangeli wrote: >

Re: [Qemu-devel] [PATCH 19/23] userfaultfd: activate syscall

2015-09-08 Thread Michael Ellerman
On Tue, 2015-09-08 at 17:14 +1000, Michael Ellerman wrote: > On Tue, 2015-09-08 at 12:09 +0530, Bharata B Rao wrote: > > On Tue, Sep 08, 2015 at 04:08:06PM +1000, Michael Ellerman wrote: > > > Hmm, not for me. See below. > > > > > > What setup were you testing

Re: [PATCH] kvm:powerpc:Fix return statements for wrapper functions in the file book3s_64_mmu_hv.c

2015-08-13 Thread Michael Ellerman
On Wed, 2015-08-12 at 21:06 +0200, Alexander Graf wrote: On 10.08.15 17:27, Nicholas Krause wrote: This fixes the wrapper functions kvm_umap_hva_hv and the function kvm_unmap_hav_range_hv to return the return value of the function kvm_handle_hva or kvm_handle_hva_range that they are

Re: [PATCH] kvm:powerpc:Fix return statements for wrapper functions in the file book3s_64_mmu_hv.c

2015-08-13 Thread Michael Ellerman
On Wed, 2015-08-12 at 21:06 +0200, Alexander Graf wrote: On 10.08.15 17:27, Nicholas Krause wrote: This fixes the wrapper functions kvm_umap_hva_hv and the function kvm_unmap_hav_range_hv to return the return value of the function kvm_handle_hva or kvm_handle_hva_range that they are

Re: powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

2015-08-02 Thread Michael Ellerman
On Fri, 2015-17-07 at 10:46:58 UTC, Thomas Huth wrote: The EPOW interrupt handler uses rtas_get_sensor(), which in turn uses rtas_busy_delay() to wait for RTAS becoming ready in case it is necessary. But rtas_busy_delay() is annotated with might_sleep() and thus may not be used by interrupts

Re: powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

2015-07-22 Thread Michael Ellerman
On Fri, 2015-17-07 at 10:46:58 UTC, Thomas Huth wrote: The EPOW interrupt handler uses rtas_get_sensor(), which in turn uses rtas_busy_delay() to wait for RTAS becoming ready in case it is necessary. But rtas_busy_delay() is annotated with might_sleep() and thus may not be used by interrupts

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Michael Ellerman
calibration so I think it really does want to get memory on the specified node, or else fail. Acked-by: Michael Ellerman m...@ellerman.id.au cheers -- 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

Re: [PATCH 1/2] powerpc: Define the hcall opcodes return values we need

2015-06-23 Thread Michael Ellerman
On Tue, 2015-06-23 at 11:33 +0200, Paolo Bonzini wrote: On 19/06/2015 09:21, Michael Ellerman wrote: diff --git a/powerpc/spapr.h b/powerpc/spapr.h index 0537f881c0e4..7a377d093ef4 100644 --- a/powerpc/spapr.h +++ b/powerpc/spapr.h @@ -16,17 +16,32 @@ #include inttypes.h

Re: [PATCH 1/2] powerpc: Define the hcall opcodes return values we need

2015-06-23 Thread Michael Ellerman
On Tue, 2015-06-23 at 11:33 +0200, Paolo Bonzini wrote: On 19/06/2015 09:21, Michael Ellerman wrote: diff --git a/powerpc/spapr.h b/powerpc/spapr.h index 0537f881c0e4..7a377d093ef4 100644 --- a/powerpc/spapr.h +++ b/powerpc/spapr.h @@ -16,17 +16,32 @@ #include inttypes.h

Re: [PATCH 2/3] powerpc: use default endianness for converting guest/init

2015-06-21 Thread Michael Ellerman
On Fri, 2015-06-19 at 17:15 +0100, Andre Przywara wrote: What works though is using xxd to convert the binary guest/init into a C array: $ xxd -i guest/init | $(CC) -x c -c - -o guest/guest_init.o This has the nice property of using the same compiler that generates the other object files and

Re: [PATCH 2/3] powerpc: use default endianness for converting guest/init

2015-06-21 Thread Michael Ellerman
On Fri, 2015-06-19 at 17:15 +0100, Andre Przywara wrote: What works though is using xxd to convert the binary guest/init into a C array: $ xxd -i guest/init | $(CC) -x c -c - -o guest/guest_init.o This has the nice property of using the same compiler that generates the other object files and

Re: [PATCH 1/2] powerpc: Define the hcall opcodes return values we need

2015-06-19 Thread Michael Ellerman
On Fri, 2015-06-19 at 17:21 +1000, Michael Ellerman wrote: Now that we don't have the kernel header on hand, just define the minimum set of hcall opcodes and return values we need in order to build. Hi Andre, I hope you don't mind me jumping in here but I thought I should help out rather than

Re: [PATCH 1/2] powerpc: Define the hcall opcodes return values we need

2015-06-19 Thread Michael Ellerman
On Fri, 2015-06-19 at 17:21 +1000, Michael Ellerman wrote: Now that we don't have the kernel header on hand, just define the minimum set of hcall opcodes and return values we need in order to build. Hi Andre, I hope you don't mind me jumping in here but I thought I should help out rather than

[PATCH 2/2] powerpc: Enable 32-bit build

2015-06-19 Thread Michael Ellerman
We have always built kvmtool as 64-bit on powerpc, but mainly just out of habit. There's not AFAIK any reason we *can't* build 32-bit. So fix up a few places where we were assuming 64-bit, and drop the Makefile logic that forces 64-bit. Signed-off-by: Michael Ellerman m...@ellerman.id.au

[PATCH 1/2] powerpc: Define the hcall opcodes return values we need

2015-06-19 Thread Michael Ellerman
Now that we don't have the kernel header on hand, just define the minimum set of hcall opcodes and return values we need in order to build. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- powerpc/spapr.h | 25 - 1 file changed, 20 insertions(+), 5 deletions

[PATCH 2/2] powerpc: Enable 32-bit build

2015-06-19 Thread Michael Ellerman
We have always built kvmtool as 64-bit on powerpc, but mainly just out of habit. There's not AFAIK any reason we *can't* build 32-bit. So fix up a few places where we were assuming 64-bit, and drop the Makefile logic that forces 64-bit. Signed-off-by: Michael Ellerman m...@ellerman.id.au

[PATCH 1/2] powerpc: Define the hcall opcodes return values we need

2015-06-19 Thread Michael Ellerman
Now that we don't have the kernel header on hand, just define the minimum set of hcall opcodes and return values we need in order to build. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- powerpc/spapr.h | 25 - 1 file changed, 20 insertions(+), 5 deletions

Re: [PATCH] kvmtool: Makefile: allow overriding CC and LD

2015-06-18 Thread Michael Ellerman
On Thu, 2015-06-18 at 16:50 +0100, Andre Przywara wrote: Currently we set CC unconditionally to ${CROSS_COMPILE}gcc, the same for LD. Allow people to override the compiler name by specifying it explicitly on the command line or via the environment. Beside calling a certain compiler binary

Re: [PATCH] kvmtool: Makefile: allow overriding CC and LD

2015-06-18 Thread Michael Ellerman
On Thu, 2015-06-18 at 16:50 +0100, Andre Przywara wrote: Currently we set CC unconditionally to ${CROSS_COMPILE}gcc, the same for LD. Allow people to override the compiler name by specifying it explicitly on the command line or via the environment. Beside calling a certain compiler binary

Re: [PATCH 2/3] powerpc: use default endianness for converting guest/init

2015-06-18 Thread Michael Ellerman
On Thu, 2015-06-18 at 15:52 +0100, Andre Przywara wrote: Hi, On 06/17/2015 10:43 AM, Andre Przywara wrote: For converting the guest/init binary into an object file, we call the linker binary, setting the endianness to big endian explicitly when compiling kvmtool for powerpc. This

Re: [PATCH 2/3] powerpc: use default endianness for converting guest/init

2015-06-18 Thread Michael Ellerman
On Thu, 2015-06-18 at 15:52 +0100, Andre Przywara wrote: Hi, On 06/17/2015 10:43 AM, Andre Przywara wrote: For converting the guest/init binary into an object file, we call the linker binary, setting the endianness to big endian explicitly when compiling kvmtool for powerpc. This

Re: [PATCH 1/3] powerpc: implement barrier primitives

2015-06-18 Thread Michael Ellerman
On Wed, 2015-06-17 at 11:15 +0100, Will Deacon wrote: On Wed, Jun 17, 2015 at 10:43:48AM +0100, Andre Przywara wrote: Instead of referring to the Linux header including the barrier macros, copy over the rather simple implementation for the PowerPC barrier instructions kvmtool uses. This

Re: [PATCH 1/3] powerpc: implement barrier primitives

2015-06-18 Thread Michael Ellerman
On Wed, 2015-06-17 at 11:15 +0100, Will Deacon wrote: On Wed, Jun 17, 2015 at 10:43:48AM +0100, Andre Przywara wrote: Instead of referring to the Linux header including the barrier macros, copy over the rather simple implementation for the PowerPC barrier instructions kvmtool uses. This

Re: [PATCH 3/3] powerpc: add hvcall.h header from Linux

2015-06-18 Thread Michael Ellerman
On Wed, 2015-06-17 at 11:13 +0100, Will Deacon wrote: On Wed, Jun 17, 2015 at 10:43:50AM +0100, Andre Przywara wrote: The powerpc code uses some PAPR hypercalls, of which we need the hypercall number. Copy the macro definition parts from the kernel's (private) hvcall.h file and remove the

Re: [PATCH 3/3] powerpc: add hvcall.h header from Linux

2015-06-18 Thread Michael Ellerman
On Wed, 2015-06-17 at 11:13 +0100, Will Deacon wrote: On Wed, Jun 17, 2015 at 10:43:50AM +0100, Andre Przywara wrote: The powerpc code uses some PAPR hypercalls, of which we need the hypercall number. Copy the macro definition parts from the kernel's (private) hvcall.h file and remove the

Re: [kvm-ppc:kvm-ppc-queue 7/9] ERROR: .__spin_yield [arch/powerpc/kvm/kvm.ko] undefined!

2015-03-22 Thread Michael Ellerman
to linuxppc-...@ozlabs.org and I acked. I think the best thing at this stage is probably for Alex to take that patch through his tree, assuming Michael is OK with that. Fine by me. Acked-by: Michael Ellerman m...@ellerman.id.au cheers -- To unsubscribe from this list: send the line

Re: [kvm-ppc:kvm-ppc-queue 7/9] ERROR: .__spin_yield [arch/powerpc/kvm/kvm.ko] undefined!

2015-03-22 Thread Michael Ellerman
to linuxppc-...@ozlabs.org and I acked. I think the best thing at this stage is probably for Alex to take that patch through his tree, assuming Michael is OK with that. Fine by me. Acked-by: Michael Ellerman m...@ellerman.id.au cheers -- To unsubscribe from this list: send the line

Re: [PATCH 1/8] ppc/kvm: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Michael Ellerman
On Thu, 2015-01-15 at 09:58 +0100, Christian Borntraeger wrote: ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step

Re: [PATCH 1/8] ppc/kvm: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Michael Ellerman
On Thu, 2015-01-15 at 09:58 +0100, Christian Borntraeger wrote: ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step

Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest

2014-12-21 Thread Michael Ellerman
On Sun, 2014-12-21 at 23:56 +0100, Alexander Graf wrote: On 21.12.14 15:13, Andreas Schwab wrote: arch/powerpc/kvm/built-in.o: In function `kvm_no_guest': arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x724): undefined reference to `power7_wakeup_loss' Ugh. We just removed support for

Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest

2014-12-21 Thread Michael Ellerman
On Sun, 2014-12-21 at 23:56 +0100, Alexander Graf wrote: On 21.12.14 15:13, Andreas Schwab wrote: arch/powerpc/kvm/built-in.o: In function `kvm_no_guest': arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x724): undefined reference to `power7_wakeup_loss' Ugh. We just removed support for

Re: [PATCH 6/6] kvm_stat: Add powerpc support

2014-11-02 Thread Michael Ellerman
On Fri, 2014-10-31 at 16:36 +0100, Paolo Bonzini wrote: Thanks, applied the series at last. Thanks. cheers -- 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

[PATCH] powerpc/kvm: Create proper names for the kvm_host_state PMU fields

2014-07-10 Thread Michael Ellerman
, particularly for the MMCRx/SIxR/SDAR fields, and might have helped us notice the recent double restore bug we had in this code. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- This is on top of powerpc/kvm: Remove redundant save of SIER AND MMCR2. arch/powerpc/kernel/asm-offsets.c

Re: [PATCH] powerpc/kvm: Create proper names for the kvm_host_state PMU fields

2014-07-10 Thread Michael Ellerman
On Thu, 2014-07-10 at 12:16 +0200, Alexander Graf wrote: On 10.07.14 11:34, Michael Ellerman wrote: We have two arrays in kvm_host_state that contain register values for the PMU. Currently we only create an asm-offsets symbol for the base of the arrays, and do the array offset

[PATCH] powerpc/kvm: Fix build break with CONFIG_KVM_BOOK3S_64_HV=y

2014-06-24 Thread Michael Ellerman
Commit e58e263 PPC, KVM, CMA: use general CMA reserved area management framework in next-20140624 removed arch/powerpc/kvm/book3s_hv_cma.c but neglected to update the Makefile, thus breaking the build. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- Hi Andrew, This is in your akpm

Re: [PATCH] powerpc/kvm: Fix build break with CONFIG_KVM_BOOK3S_64_HV=y

2014-06-24 Thread Michael Ellerman
On Tue, 2014-06-24 at 15:51 +0900, Joonsoo Kim wrote: On Tue, Jun 24, 2014 at 04:36:47PM +1000, Michael Ellerman wrote: Commit e58e263 PPC, KVM, CMA: use general CMA reserved area management framework in next-20140624 removed arch/powerpc/kvm/book3s_hv_cma.c but neglected to update

[PATCH 3/6] kvm_stat: Rework platform detection

2014-06-17 Thread Michael Ellerman
. We'd also like to add another platform, powerpc, which will just make it worse. So clean it up in preparation. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- scripts/kvm/kvm_stat | 44 +--- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git

[PATCH 5/6] kvm_stat: Abstract ioctl numbers

2014-06-17 Thread Michael Ellerman
Unfortunately ioctl numbers are platform specific, so abstract them out of the code so they can be overridden. As it happens x86 and s390 share the same values, so nothing needs to change yet. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- scripts/kvm/kvm_stat | 12 +--- 1 file

[PATCH 4/6] kvm_stat: Fix tracepoint filter definition for s390

2014-06-17 Thread Michael Ellerman
is 'reason'. So invert the way we setup filters, define it by default for the generic tracepoint 'kvm_userspace_exit', and let x86 override it. Doing it this way will also work for powerpc when we add it. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- scripts/kvm/kvm_stat | 14

[PATCH 1/6] kvm_stat: Only consider online cpus

2014-06-17 Thread Michael Ellerman
, the online file will not be present at all. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- scripts/kvm/kvm_stat | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index d7e97e7..2a788bc 100755 --- a/scripts

[PATCH 2/6] kvm_stat: Fix the non-x86 exit reasons

2014-06-17 Thread Michael Ellerman
are incorrect. As far as I can tell this does not matter in practice because s390 does not define a kvm_exit trace point. While we're there, fix the whitespace to match the rest of the file. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- scripts/kvm/kvm_stat | 49

[PATCH 6/6] kvm_stat: Add powerpc support

2014-06-17 Thread Michael Ellerman
Add support for powerpc platforms. We use uname -m, which allows us to detect ppc, ppc64 and ppc64le/el. Signed-off-by: Michael Ellerman m...@ellerman.id.au --- scripts/kvm/kvm_stat | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/kvm/kvm_stat b

Re: [PATCH 6/6] kvm_stat: Add powerpc support

2014-06-17 Thread Michael Ellerman
On Tue, 2014-06-17 at 10:27 +0200, Alexander Graf wrote: On 17.06.14 09:54, Michael Ellerman wrote: Add support for powerpc platforms. We use uname -m, which allows us to detect ppc, ppc64 and ppc64le/el. Signed-off-by: Michael Ellerman m...@ellerman.id.au Could you please add support

Re: [PATCH 6/6] kvm_stat: Add powerpc support

2014-06-17 Thread Michael Ellerman
On Wed, 2014-06-18 at 02:59 +0200, Alexander Graf wrote: On 18.06.14 02:50, Michael Ellerman wrote: On Tue, 2014-06-17 at 10:27 +0200, Alexander Graf wrote: On 17.06.14 09:54, Michael Ellerman wrote: Add support for powerpc platforms. We use uname -m, which allows us to detect ppc, ppc64

Re: powerpc/pseries: Use new defines when calling h_set_mode

2014-05-30 Thread Michael Ellerman
On Thu, 2014-05-29 at 17:45 +1000, Michael Neuling wrote: +/* Values for 2nd argument to H_SET_MODE */ +#define H_SET_MODE_RESOURCE_SET_CIABR1 +#define H_SET_MODE_RESOURCE_SET_DAWR2 +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE3 +#define H_SET_MODE_RESOURCE_LE

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-02 Thread Michael Ellerman
On Wed, 2013-10-02 at 13:02 +0300, Gleb Natapov wrote: On Wed, Oct 02, 2013 at 11:50:50AM +0200, Alexander Graf wrote: On 02.10.2013, at 11:11, Alexander Graf wrote: So how do you solve live migration between a kernel that has this patch and one that doesn't? Yes, I alluded to it

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-02 Thread Michael Ellerman
On Wed, 2013-10-02 at 13:02 +0300, Gleb Natapov wrote: On Wed, Oct 02, 2013 at 11:50:50AM +0200, Alexander Graf wrote: On 02.10.2013, at 11:11, Alexander Graf wrote: So how do you solve live migration between a kernel that has this patch and one that doesn't? Yes, I alluded to it

Re: [PATCH 2/3] hwrng: Add a driver for the hwrng found in power7+ systems

2013-10-01 Thread Michael Ellerman
On Thu, Sep 26, 2013 at 06:01:27PM +1000, Benjamin Herrenschmidt wrote: On Thu, 2013-09-26 at 16:31 +1000, Michael Ellerman wrote: + pr_info(registered powernv hwrng.\n); First letter of a line should get a capital :-) Also since it's per-device, at least indicate the OF path

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-01 Thread Michael Ellerman
On Thu, Sep 26, 2013 at 11:06:59AM +0200, Paolo Bonzini wrote: Il 26/09/2013 08:31, Michael Ellerman ha scritto: Some powernv systems include a hwrng. Guests can access it via the H_RANDOM hcall. Is there any reason to do this in the kernel? It's less code, and it's faster :) It does

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-01 Thread Michael Ellerman
On Fri, Sep 27, 2013 at 07:45:45PM +0530, Anshuman Khandual wrote: On 09/26/2013 12:01 PM, Michael Ellerman wrote: +int powernv_hwrng_present(void) +{ + return __raw_get_cpu_var(powernv_rng) != NULL; +} + static unsigned long rng_whiten(struct powernv_rng *rng, unsigned long val

Re: [PATCH 2/3] hwrng: Add a driver for the hwrng found in power7+ systems

2013-10-01 Thread Michael Ellerman
On Thu, Sep 26, 2013 at 06:01:27PM +1000, Benjamin Herrenschmidt wrote: On Thu, 2013-09-26 at 16:31 +1000, Michael Ellerman wrote: + pr_info(registered powernv hwrng.\n); First letter of a line should get a capital :-) Also since it's per-device, at least indicate the OF path

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-01 Thread Michael Ellerman
On Thu, Sep 26, 2013 at 11:06:59AM +0200, Paolo Bonzini wrote: Il 26/09/2013 08:31, Michael Ellerman ha scritto: Some powernv systems include a hwrng. Guests can access it via the H_RANDOM hcall. Is there any reason to do this in the kernel? It's less code, and it's faster :) It does

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-01 Thread Michael Ellerman
On Fri, Sep 27, 2013 at 07:45:45PM +0530, Anshuman Khandual wrote: On 09/26/2013 12:01 PM, Michael Ellerman wrote: +int powernv_hwrng_present(void) +{ + return __raw_get_cpu_var(powernv_rng) != NULL; +} + static unsigned long rng_whiten(struct powernv_rng *rng, unsigned long val

[PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-09-26 Thread Michael Ellerman
Some powernv systems include a hwrng. Guests can access it via the H_RANDOM hcall. We add a real mode implementation of H_RANDOM when a hwrng is found. Userspace can detect the presence of the hwrng by quering the KVM_CAP_PPC_HWRNG capability. Signed-off-by: Michael Ellerman mich

[PATCH 1/3] powerpc: Implement arch_get_random_long/int() for powernv

2013-09-26 Thread Michael Ellerman
the dieharder tests. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- arch/powerpc/Kconfig| 3 + arch/powerpc/include/asm/archrandom.h | 32 + arch/powerpc/include/asm/machdep.h | 4 ++ arch/powerpc/platforms/powernv/Kconfig | 1 + arch/powerpc/platforms

[PATCH 2/3] hwrng: Add a driver for the hwrng found in power7+ systems

2013-09-26 Thread Michael Ellerman
the closest device, avoiding inter-chip memory traffic. Signed-off-by: Guo Chao y...@linux.vnet.ibm.com Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- drivers/char/hw_random/Kconfig | 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/powernv-rng.c | 81

[PATCH 1/3] powerpc: Implement arch_get_random_long/int() for powernv

2013-09-26 Thread Michael Ellerman
the dieharder tests. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- arch/powerpc/Kconfig| 3 + arch/powerpc/include/asm/archrandom.h | 32 + arch/powerpc/include/asm/machdep.h | 4 ++ arch/powerpc/platforms/powernv/Kconfig | 1 + arch/powerpc/platforms

[PATCH 2/3] hwrng: Add a driver for the hwrng found in power7+ systems

2013-09-26 Thread Michael Ellerman
the closest device, avoiding inter-chip memory traffic. Signed-off-by: Guo Chao y...@linux.vnet.ibm.com Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- drivers/char/hw_random/Kconfig | 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/powernv-rng.c | 81

[PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-09-26 Thread Michael Ellerman
Some powernv systems include a hwrng. Guests can access it via the H_RANDOM hcall. We add a real mode implementation of H_RANDOM when a hwrng is found. Userspace can detect the presence of the hwrng by quering the KVM_CAP_PPC_HWRNG capability. Signed-off-by: Michael Ellerman mich

[PATCH] kvm tools: powerpc: Implement system-reboot RTAS call

2013-08-12 Thread Michael Ellerman
spinning in the guest. We can't implement reboot properly, ie. causing a reboot, but it's still preferable to implement it as halt rather than not implementing it at all. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/spapr_rtas.c | 14 ++ 1 file changed

[PATCH] kvm tools: Fix build of guest init with biarch powerpc compilers

2013-08-07 Thread Michael Ellerman
and x86-64. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index 8f996cd..b614aab 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -150,6 +150,7

Re: [v1][PATCH 1/1] powerpc/ppc64: rename SOFT_DISABLE_INTS with RECONCILE_IRQ_STATE

2013-07-23 Thread Michael Ellerman
On Tue, Jul 16, 2013 at 11:09:30AM +0800, Tiejun Chen wrote: The SOFT_DISABLE_INTS seems an odd name for something that updates the software state to be consistent with interrupts being hard disabled, so rename SOFT_DISABLE_INTS with RECONCILE_IRQ_STATE to avoid this confusion. Yes! I have a

Re: [v1][PATCH 1/1] powerpc/ppc64: rename SOFT_DISABLE_INTS with RECONCILE_IRQ_STATE

2013-07-23 Thread Michael Ellerman
On Tue, Jul 16, 2013 at 11:09:30AM +0800, Tiejun Chen wrote: The SOFT_DISABLE_INTS seems an odd name for something that updates the software state to be consistent with interrupts being hard disabled, so rename SOFT_DISABLE_INTS with RECONCILE_IRQ_STATE to avoid this confusion. Yes! I have a

Re: [PATCH] kvm tools: fix boot of guests with more than 4gb of ram

2013-06-24 Thread Michael Ellerman
On Sun, 2013-06-23 at 21:23 -0400, Sasha Levin wrote: Commit kvm tools: virtio: remove hardcoded assumptions about guest page size has introduced a bug that prevented guests with more than 4gb of ram from booting. The issue is that 'pfn' is a 32bit integer, so when multiplying it by page

Re: [RFC PATCH 00/11] kvm tools: allow ioport emulation to be used on ARM

2013-05-03 Thread Michael Ellerman
On Wed, 2013-05-01 at 16:50 +0100, Will Deacon wrote: Hi guys, This RFC series does a number of things, but the main goal is to allow re-use of the emulation code under hw/ on architectures other than x86. It also comes about after discussions concerning virtio-console for earlyprintk:

Re: [PATCH] kvm tools: remove arbitrary minimum RAM limitation

2013-04-24 Thread Michael Ellerman
On Tue, 2013-04-23 at 10:57 -0400, Sasha Levin wrote: We don't really need 64MB of RAM to boot, it's a nice default if we don't have anything else - but it's not actually required for anything: Nice, I am carrying something similar locally so I can boot in 4K :) cheers -- To unsubscribe from

[PATCH 3/6] kvm tools: Rework stdio/stdout handling to support redirection

2013-02-06 Thread Michael Ellerman
. Note that we skip registering the cleanup routines, so we don't need to modify them. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/term.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/kvm/term.c b/tools/kvm/term.c index 4413450

[PATCH 2/6] kvm tools: More error handling in the ipc code

2013-02-06 Thread Michael Ellerman
Add perror() calls to a couple of exit paths, to ease debugging. There are also two places where we print Failed starting IPC thread, but one is really an epoll failure, so make that obvious. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/kvm-ipc.c | 17

[PATCH 4/6] kvm tools: powerpc: Fix buglet in xics_init() handling of nrcpus

2013-02-06 Thread Michael Ellerman
In xics_init() we set the maximum server to kvm-nrcpus, and then set the nr_servers using maximum server + 1. That is off by one, in the harmless direction. Simplify it to just set nr_servers = kvm-nrcpus. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/xics.c

[PATCH 1/6] kvm tools: Return error status in lkvm list

2013-02-06 Thread Michael Ellerman
Currently list always returns 0, even if there was an error. Instead have it accumulate any errors and return that. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/builtin-list.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/kvm

[PATCH 6/6] kvm tools: powerpc: Only emit TB freq if it's non-zero

2013-02-06 Thread Michael Ellerman
The kernel can handle a missing timebase-frequency property much better than one that claims zero. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/kvm.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/kvm/powerpc/kvm.c b/tools/kvm

[PATCH 5/6] kvm tools: powerpc: Add cpu info entry for POWER8

2013-02-06 Thread Michael Ellerman
We should hard-code less of this stuff, but for now this works. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/cpu_info.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/kvm/powerpc/cpu_info.c b/tools/kvm/powerpc/cpu_info.c index 11ca14e

[PATCH] kvm tools: Fix powerpc build after kvm__dump_mem() change

2013-02-04 Thread Michael Ellerman
Commit 21692d1 (Beautify debug output) broke the powerpc build because it changed the signature for kvm__dump_mem() but didn't update all callers. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/kvm-cpu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] kvm/powerpc: Handle errors in secondary thread grabbing

2012-10-16 Thread Michael Ellerman
On Tue, 2012-10-16 at 14:13 +1100, Paul Mackerras wrote: Michael, On Tue, Oct 16, 2012 at 11:15:50AM +1100, Michael Ellerman wrote: In the Book3s HV code, kvmppc_run_core() has logic to grab the secondary threads of the physical core. If for some reason a thread is stuck

[PATCH] MAINTAINERS: Add git tree link for PPC KVM

2012-10-15 Thread Michael Ellerman
Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e73060f..32dc107 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4244,6 +4244,7 @@ KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC M

[PATCH] kvm/powerpc: Handle errors in secondary thread grabbing

2012-10-15 Thread Michael Ellerman
. Instead we should check for failure and bail out. I've moved the grabbing prior to the startup of runnable threads, to simplify the error case. AFAICS this is harmless, but I could be missing something subtle. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- Or we could just BUG_ON

[PATCH] MAINTAINERS: Add git tree link for PPC KVM

2012-10-15 Thread Michael Ellerman
Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e73060f..32dc107 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4244,6 +4244,7 @@ KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC M

Re: [PATCH 1/3] kvm tools: Fix powerpc build errors caused by recent changes

2012-10-05 Thread Michael Ellerman
On Fri, 2012-10-05 at 09:30 +0300, Pekka Enberg wrote: Applied all three patches, thanks Michael! Thanks Pekka. cheers -- 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

Re: [PATCH 1/3] kvm tools: Fix powerpc build errors caused by recent changes

2012-10-05 Thread Michael Ellerman
On Fri, 2012-10-05 at 09:30 +0300, Pekka Enberg wrote: Applied all three patches, thanks Michael! Thanks Pekka. cheers -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH 1/3] kvm tools: Fix powerpc build errors caused by recent changes

2012-10-04 Thread Michael Ellerman
() of kvm-cfg.active_console but needs to be vcpu-kvm-cfg.active_console. That commit also missed updates to term_putc() term_getc() in spapr_rtas.c, and I'm guessing that we need similar checks of active_console in rtas_put_term_char() rtas_get_term_char(). Signed-off-by: Michael Ellerman mich

[PATCH 2/3] kvm tools: Fix segfault on powerpc in xics_register()

2012-10-04 Thread Michael Ellerman
-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/irq.c | 19 --- tools/kvm/powerpc/kvm-cpu.c |3 --- tools/kvm/powerpc/xics.c| 38 +++--- tools/kvm/powerpc/xics.h|5 - 4 files changed, 23 insertions(+), 42

[PATCH 3/3] kvm tools: Do setup_fdt() later, get powerpc to boot again

2012-10-04 Thread Michael Ellerman
() and make it a firmware_init() call of its own. With this patch I am able to boot guests again on HV KVM. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/kvm.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/kvm/powerpc/kvm.c b

[PATCH 1/3] kvm tools: Fix powerpc build errors caused by recent changes

2012-10-04 Thread Michael Ellerman
() of kvm-cfg.active_console but needs to be vcpu-kvm-cfg.active_console. That commit also missed updates to term_putc() term_getc() in spapr_rtas.c, and I'm guessing that we need similar checks of active_console in rtas_put_term_char() rtas_get_term_char(). Signed-off-by: Michael Ellerman mich

[PATCH 2/3] kvm tools: Fix segfault on powerpc in xics_register()

2012-10-04 Thread Michael Ellerman
-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/irq.c | 19 --- tools/kvm/powerpc/kvm-cpu.c |3 --- tools/kvm/powerpc/xics.c| 38 +++--- tools/kvm/powerpc/xics.h|5 - 4 files changed, 23 insertions(+), 42

[PATCH 3/3] kvm tools: Do setup_fdt() later, get powerpc to boot again

2012-10-04 Thread Michael Ellerman
() and make it a firmware_init() call of its own. With this patch I am able to boot guests again on HV KVM. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/kvm.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/kvm/powerpc/kvm.c b

Re: [PATCH 2/2] kvm tools: Check for unknown parameters in network option handling

2012-08-12 Thread Michael Ellerman
On Sat, 2012-08-11 at 08:21 +0800, Asias He wrote: On Fri, Aug 10, 2012 at 1:38 PM, Michael Ellerman mich...@ellerman.id.au wrote: Currently the parsing of network command line parameters doesn't check for unknown parameters. For example -n mod=none will cause kvmtool to setup TAP

[PATCH] kvm tools: Fix crash when /etc/resolv.conf doesn't exist

2012-08-09 Thread Michael Ellerman
In uip_dhcp_get_dns() we try to open /etc/resolv.conf. If we fail to open it we then SEGV trying to fclose() it. Fix the code to just return directly if we can't open it. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/net/uip/dhcp.c |3 +-- 1 file changed, 1 insertion

[PATCH 1/2] kvm tools: Fix formatting of error message in TAP handling

2012-08-09 Thread Michael Ellerman
. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/virtio/net.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c index 10420ae..8f3735b 100644 --- a/tools/kvm/virtio/net.c +++ b/tools/kvm/virtio/net.c @@ -526,8

[PATCH 2/2] kvm tools: Check for unknown parameters in network option handling

2012-08-09 Thread Michael Ellerman
Currently the parsing of network command line parameters doesn't check for unknown parameters. For example -n mod=none will cause kvmtool to setup TAP networking. Save users from their typos by checking for unknown parameters and bailing. Signed-off-by: Michael Ellerman mich...@ellerman.id.au

Re: [RFC/PATCH] Use kernel supplied MMU info for kvm tool

2012-07-17 Thread Michael Ellerman
On Tue, 2012-07-17 at 10:33 +0100, Matt Evans wrote: Hi Michael, On 2012-07-17 06:00, Michael Ellerman wrote: This is a series for kvmtool that uses a newish kernel API to get MMU info, which is then fed to the guest. Currently we just make a good guess based on the PVR

Re: [RFC/PATCH] Use kernel supplied MMU info for kvm tool

2012-07-17 Thread Michael Ellerman
On Tue, 2012-07-17 at 17:09 +0300, Pekka Enberg wrote: On Tue, Jul 17, 2012 at 12:33 PM, Matt Evans m...@ozlabs.org wrote: Just had a look, all good. Thanks for tidying some old FIXMEs, especially the page/segment DT props encoding grot -- and the designated inits in the cpuinfo struct,

Re: [RFC/PATCH] Use kernel supplied MMU info for kvm tool

2012-07-17 Thread Michael Ellerman
On Tue, 2012-07-17 at 10:33 +0100, Matt Evans wrote: Hi Michael, On 2012-07-17 06:00, Michael Ellerman wrote: This is a series for kvmtool that uses a newish kernel API to get MMU info, which is then fed to the guest. Currently we just make a good guess based on the PVR

Re: [RFC/PATCH] Use kernel supplied MMU info for kvm tool

2012-07-17 Thread Michael Ellerman
On Tue, 2012-07-17 at 17:09 +0300, Pekka Enberg wrote: On Tue, Jul 17, 2012 at 12:33 PM, Matt Evans m...@ozlabs.org wrote: Just had a look, all good. Thanks for tidying some old FIXMEs, especially the page/segment DT props encoding grot -- and the designated inits in the cpuinfo struct,

[RFC/PATCH] Use kernel supplied MMU info for kvm tool

2012-07-16 Thread Michael Ellerman
Hi all, This is a series for kvmtool that uses a newish kernel API to get MMU info, which is then fed to the guest. Currently we just make a good guess based on the PVR, but that is potentially flakey in a few ways. The most notable is that if you don't specify hugepages we don't boot - because

[PATCH 03/10] kvm tools: Remember page size as kvm-ram_pagesize

2012-07-16 Thread Michael Ellerman
-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/include/kvm/util.h |4 +++- tools/kvm/powerpc/include/kvm/kvm-arch.h |1 + tools/kvm/powerpc/kvm.c |2 +- tools/kvm/util/util.c| 13 + tools/kvm/x86/include/kvm/kvm

  1   2   >