Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Suraj Jitindar Singh
On Tue, 2018-01-09 at 15:48 +1100, Paul Mackerras wrote: > This adds three new capabilities that give userspace information > about > the underlying machine's level of vulnerability to the Meltdown and > Spectre attacks, and what instructions the hardware implements to > assist software to work aro

Re: [PATCH v2] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Suraj Jitindar Singh
s as a speculation barrier. > > KVM_CAP_PPC_SAFE_INDIRECT_BRANCH reports the vulnerability of the > machine to attacks based on poisoning the indirect branch predictor. > No workaround that requires software changes is provided; the current > hardware fix is to prevent speculation p

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Suraj Jitindar Singh
On Tue, 2018-01-09 at 23:44 +1100, Alexey Kardashevskiy wrote: > On 09/01/18 19:39, Suraj Jitindar Singh wrote: > > On Tue, 2018-01-09 at 15:48 +1100, Paul Mackerras wrote: > > > This adds three new capabilities that give userspace information > > > about > > &g

[PATCH 0/6] kvm: powerpc halt polling updates

2016-10-13 Thread Suraj Jitindar Singh
Jitindar Singh (6): kvm: export kvm module parameter variables powerpc/kvm: Use generic kvm module parameters in kvm-hv powerpc/kvm: Add check for module parameter halt_poll_ns powerpc/kvm: Decrease the powerpc default halt poll max value powerpc/kvm: Comment style and print format fixups doc

[PATCH 1/6] kvm: export kvm module parameter variables

2016-10-13 Thread Suraj Jitindar Singh
: Suraj Jitindar Singh --- include/linux/kvm_host.h | 4 virt/kvm/kvm_main.c | 9 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 01c0b9c..29b500a 100644 --- a/include/linux/kvm_host.h +++ b/include/linux

[PATCH 2/6] powerpc/kvm: Use generic kvm module parameters in kvm-hv

2016-10-13 Thread Suraj Jitindar Singh
module parameters which was redundant and should reduce confusion when tuning them. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s_hv.c | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm

[PATCH 3/6] powerpc/kvm: Add check for module parameter halt_poll_ns

2016-10-13 Thread Suraj Jitindar Singh
de so that we always check for a new module param value of halt_poll_ns and set the current halt polling interval to it if it's currently greater than the new max. This means that it's redundant to also perform this check in the grow_halt_poll_ns() function now. Signed-off-by: Suraj

[PATCH 4/6] powerpc/kvm: Decrease the powerpc default halt poll max value

2016-10-13 Thread Suraj Jitindar Singh
affinity for halt polling based on the trade off between power and performance which they are willing to make. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch

[PATCH 5/6] powerpc/kvm: Comment style and print format fixups

2016-10-13 Thread Suraj Jitindar Singh
Fix comment block to match kernel comment style. Fix print format from signed to unsigned. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s_hv.c | 3 ++- arch/powerpc/kvm/trace_hv.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm

[PATCH 6/6] doc/kvm: Add halt polling documentation

2016-10-13 Thread Suraj Jitindar Singh
: Suraj Jitindar Singh --- Documentation/virtual/kvm/00-INDEX | 2 + Documentation/virtual/kvm/halt-polling.txt | 127 + 2 files changed, 129 insertions(+) create mode 100644 Documentation/virtual/kvm/halt-polling.txt diff --git a/Documentation/virtual/kvm/00

Re: [PATCH 6/6] doc/kvm: Add halt polling documentation

2016-10-13 Thread Suraj Jitindar Singh
On Fri, 2016-10-14 at 09:16 +0800, Wanpeng Li wrote: > 2016-10-14 8:53 GMT+08:00 Suraj Jitindar Singh com>: > > > > There is currently no documentation about the halt polling > > capabilities > > of the kvm module. Add some documentation describing the mechanism

[PATCH 0/2] powerpc: add support for ISA v2.07 compat level

2016-10-26 Thread Suraj Jitindar Singh
Version v3.00 of the ISA added a new compat level to the processor compatibility register (PCR), an ISA v2.07 compatibility mode. Upstream QEMU already supports this so it may as well go into the kernel now. Suraj Jitindar Singh (2): powerpc: Define new ISA v3.00 logical PVR value and PCR

[PATCH 1/2] powerpc: Define new ISA v3.00 logical PVR value and PCR register value

2016-10-26 Thread Suraj Jitindar Singh
ISA 3.00 adds the logical PVR value 0x0f05, so add a definition for this. Define PCR_ARCH_207 to reflect ISA 2.07 compatibility mode in the processor compatibility register (PCR). Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/reg.h | 2 ++ 1 file changed, 2 insertions

[PATCH 2/2] powerpc/kvm: Update kvmppc_set_arch_compat() for ISA v3.00

2016-10-26 Thread Suraj Jitindar Singh
actually aware of. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s_hv.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 3686471..f9ae3fb 100644 --- a/arch/powerpc

[PATCH V2 0/2] powerpc: add support for ISA v2.07 compat level

2016-10-30 Thread Suraj Jitindar Singh
nge Suraj Jitindar Singh (2): powerpc: Define new ISA v3.00 logical PVR value and PCR register value powerpc/kvm: Update kvmppc_set_arch_compat() for ISA v3.00 arch/powerpc/include/asm/reg.h | 2 ++ arch/powerpc/kvm/book3s_hv.c | 32 +++- 2 files changed,

[PATCH V2 1/2] powerpc: Define new ISA v3.00 logical PVR value and PCR register value

2016-10-30 Thread Suraj Jitindar Singh
ISA 3.00 adds the logical PVR value 0x0f05, so add a definition for this. Define PCR_ARCH_207 to reflect ISA 2.07 compatibility mode in the processor compatibility register (PCR). Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/reg.h | 2 ++ 1 file changed, 2 insertions

[PATCH V2 2/2] powerpc/kvm: Update kvmppc_set_arch_compat() for ISA v3.00

2016-10-30 Thread Suraj Jitindar Singh
the PCR. We also add a check to ensure the processor we are running on is capable of emulating the chosen processor (for example a POWER7 cannot emulate a POWER8, similarly with a POWER8 and a POWER9). Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s_hv.c | 32

Re: [PATCH V2 2/2] powerpc/kvm: Update kvmppc_set_arch_compat() for ISA v3.00

2016-10-31 Thread Suraj Jitindar Singh
On Mon, 2016-10-31 at 16:44 +1100, Paul Mackerras wrote: > On Mon, Oct 31, 2016 at 11:28:23AM +1100, Suraj Jitindar Singh wrote: > > > > The function kvmppc_set_arch_compat() is used to determine the > > value of the > > processor compatibility register (PCR) for a g

[PATCH V3 0/2] powerpc: add support for ISA v2.07 compat level

2016-10-31 Thread Suraj Jitindar Singh
nge V2 -> V3: - Reworked logic again, no functional change Suraj Jitindar Singh (2): powerpc: Define new ISA v3.00 logical PVR value and PCR register value powerpc/kvm: Update kvmppc_set_arch_compat() for ISA v3.00 arch/powerpc/include/asm/reg.h | 3 +++ arch/powerpc/kvm/book3s_hv.c

[PATCH V3 1/2] powerpc: Define new ISA v3.00 logical PVR value and PCR register value

2016-10-31 Thread Suraj Jitindar Singh
determining the PCR value. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/reg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 9cd4e8c..3fb6192 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc

[PATCH V3 2/2] powerpc/kvm: Update kvmppc_set_arch_compat() for ISA v3.00

2016-10-31 Thread Suraj Jitindar Singh
the PCR. We also add a check to ensure the processor we are running on is capable of emulating the chosen processor (for example a POWER7 cannot emulate a POWER8, similarly with a POWER8 and a POWER9). Based on work by: Paul Mackerras Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm

Re: [PATCH V3 1/2] powerpc: Define new ISA v3.00 logical PVR value and PCR register value

2016-11-08 Thread Suraj Jitindar Singh
On Tue, 2016-11-08 at 19:21 +1100, Michael Ellerman wrote: > Suraj Jitindar Singh writes: > > > > > ISA 3.00 adds the logical PVR value 0x0f05, so add a definition > > for > > this. > > > > Define PCR_ARCH_207 to reflect ISA 2.07 compatibility m

[PATCH] powerpc/mm: Correct process and partition table max size

2016-11-08 Thread Suraj Jitindar Singh
than 24 and 23. Fixes: 2bfd65e45e877fb5704730244da67c748d28a1b8 Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/mm/pgtable-radix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index ed7bddc..80f3479

Re: [PATCH V3 1/2] powerpc: Define new ISA v3.00 logical PVR value and PCR register value

2016-11-10 Thread Suraj Jitindar Singh
On Thu, 2016-11-10 at 21:36 +1100, Michael Ellerman wrote: > Suraj Jitindar Singh writes: > > > > > On Tue, 2016-11-08 at 19:21 +1100, Michael Ellerman wrote: > > > > > > Suraj Jitindar Singh writes: > > > > > > > > > > &

[PATCH V4 0/2] powerpc: add support for ISA v2.07 compat level

2016-11-13 Thread Suraj Jitindar Singh
nge V2 -> V3: - Reworked logic again, no functional change V3 -> V4: - Added a comment in the first patch to clarify why a 'dummy' PCR v3.00 value is needed Suraj Jitindar Singh (2): powerpc: Define new ISA v3.00 logical PVR value and PCR register value powerpc/kvm: Update kvm

[PATCH V4 1/2] powerpc: Define new ISA v3.00 logical PVR value and PCR register value

2016-11-13 Thread Suraj Jitindar Singh
moment) we need a PCR_ARCH_300 bit to represent this, however currently there is no such bit defined by the ISA. Thus we define a 'dummy' v3.00 compat bit to be used. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/reg.h | 11 +++ 1 file changed, 11 insertion

[PATCH V4 2/2] powerpc/kvm: Update kvmppc_set_arch_compat() for ISA v3.00

2016-11-13 Thread Suraj Jitindar Singh
the PCR. We also add a check to ensure the processor we are running on is capable of emulating the chosen processor (for example a POWER7 cannot emulate a POWER8, similarly with a POWER8 and a POWER9). Based on work by: Paul Mackerras Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm

Re: [PATCH 2/2] powerpc: Update of_remove_property() call sites to remove null checking

2016-05-05 Thread Suraj Jitindar Singh
On 05/05/16 16:50, Michael Ellerman wrote: > On Tue, 2016-05-03 at 15:32 -0700, Tyrel Datwyler wrote: >> On 04/27/2016 > 10:34 PM, Suraj Jitindar Singh wrote: >>> diff --git > a/arch/powerpc/platforms/pseries/mobility.c > b/arch/powerpc/platforms/pseries/mobility.c

Re: [PATCH 2/2] powerpc: Update of_remove_property() call sites to remove null checking

2016-05-05 Thread Suraj Jitindar Singh
On 05/05/16 16:50, Michael Ellerman wrote: > On Tue, 2016-05-03 at 15:32 -0700, Tyrel Datwyler wrote: >> On 04/27/2016 10:34 PM, Suraj Jitindar Singh wrote: >>> diff --git a/arch/powerpc/platforms/pseries/mobility.c >>> b/arch/powerpc/platforms/pseries/mobility.c

Re: powerpc: Add out of bounds check to crash_shutdown_unregister()

2016-05-08 Thread Suraj Jitindar Singh
On 03/05/16 15:00, Michael Ellerman wrote: > On Thu, 2016-28-04 at 06:17:45 UTC, Suraj Jitindar Singh wrote: >> When unregistering a crash_shutdown_handle in the function >> crash_shutdown_unregister() the other handles are shifted down in the >> array to replace the unregis

[PATCH] powerpc: Add array bounds checking to crash_shutdown_handlers

2016-05-10 Thread Suraj Jitindar Singh
ement explicit array bounds checking when accessing the elements of the crash_shutdown_handles[] array in crash_shutdown_unregister() and default_machine_crash_shutdown(). Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kernel/crash.c | 13 + 1 file changed, 9 insertions(+), 4 dele

[PATCH 1/4] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-06-15 Thread Suraj Jitindar Singh
. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_host.h | 3 +- arch/powerpc/kvm/book3s_hv.c| 68 +++-- 2 files changed, 43 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm

[PATCH 2/4] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-06-15 Thread Suraj Jitindar Singh
Bonzini, and on direction from Paul Mackerras. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_host.h | 2 + arch/powerpc/kvm/book3s_hv.c| 115 +++- arch/powerpc/kvm/trace_hv.h | 22 +++ 3 files changed, 125 insertions

[PATCH 3/4] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-06-15 Thread Suraj Jitindar Singh
for the display of 64-bit vcpu statistics. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s.c | 1 + include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 60 +++ 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a

[PATCH 4/4] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-06-15 Thread Suraj Jitindar Singh
e kvm module parameters based on the calculated average wait and poll times. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_host.h | 3 +++ arch/powerpc/kvm/book3s.c | 3 +++ arch/powerpc/kvm/book3s_hv.c| 14 +- 3 files changed, 19 insertions(

Re: [V3, 2/2] powerpc/drivers: Add driver for operator panel on FSP machines

2016-06-20 Thread Suraj Jitindar Singh
On Thu, 16 Jun 2016 20:22:39 +1000 (AEST) Michael Ellerman wrote: > On Thu, 2016-28-04 at 07:02:38 UTC, Suraj Jitindar Singh wrote: > > Implement new character device driver to allow access from user > > space to the 2x16 character operator panel display present on IBM > > P

[PATCH V4 1/3] devicetree/bindings: Add binding for operator panel on FSP machines

2016-06-27 Thread Suraj Jitindar Singh
Add a binding to Documentation/devicetree/bindings/powerpc/opal (oppanel-opal.txt) for the operator panel which is present on IBM Power Systems machines with FSPs. Signed-off-by: Suraj Jitindar Singh Acked-by: Rob Herring Acked-by: Stewart Smith --- Change Log: V1 -> V2: - Noth

[PATCH V4 2/3] powerpc/opal: Add #define to get rc from an ASYNC_COMP opal_msg

2016-06-27 Thread Suraj Jitindar Singh
om an opal_msg and update call sites accordingly. Signed-off-by: Suraj Jitindar Singh --- Change Log: -> V4: - Added Patch to Series --- arch/powerpc/include/asm/opal-api.h| 4 arch/powerpc/platforms/powernv/opal-sensor.c | 2 +- arch/powerpc/platforms/powernv/opal-sy

[PATCH V4 3/3] powerpc/drivers: Add driver for operator panel on FSP machines

2016-06-27 Thread Suraj Jitindar Singh
accessed by a single process at a time. Signed-off-by: Suraj Jitindar Singh Reviewed-by: Andrew Donnellan --- Change Log: V1 -> V2: - Replace "IBM pSeries machines" with "IBM Power Systems machines with FSPs" for improved clarity - Basic wording

Re: [V4, 2/3] powerpc/opal: Add #define to get rc from an ASYNC_COMP opal_msg

2016-06-28 Thread Suraj Jitindar Singh
On Tue, 28 Jun 2016 21:58:28 +1000 (AEST) Michael Ellerman wrote: > On Tue, 2016-28-06 at 04:40:56 UTC, Suraj Jitindar Singh wrote: > > An opal_msg of type OPAL_MSG_ASYNC_COMP contains the return code in > > the params[1] struct member. However this isn't intuitive or >

[PATCH V5 1/3] devicetree/bindings: Add binding for operator panel on FSP machines

2016-06-28 Thread Suraj Jitindar Singh
Add a binding to Documentation/devicetree/bindings/powerpc/opal (oppanel-opal.txt) for the operator panel which is present on IBM Power Systems machines with FSPs. Signed-off-by: Suraj Jitindar Singh Acked-by: Rob Herring Acked-by: Stewart Smith --- Change Log: V1 -> V2: - Noth

[PATCH V5 2/3] powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg

2016-06-28 Thread Suraj Jitindar Singh
code from an opal_msg and update call sites accordingly. Signed-off-by: Suraj Jitindar Singh --- Change Log: -> V4: - Added Patch to Series V4 -> V5: - Changed from #define in opal-api.h to inline in opal.h --- arch/powerpc/include/asm/opal.h| 8 a

[PATCH V5 3/3] powerpc/drivers: Add driver for operator panel on FSP machines

2016-06-28 Thread Suraj Jitindar Singh
accessed by a single process at a time. Signed-off-by: Suraj Jitindar Singh Reviewed-by: Andrew Donnellan --- Change Log: V1 -> V2: - Replace "IBM pSeries machines" with "IBM Power Systems machines with FSPs" for improved clarity - Basic wording

Re: [PATCH 1/4] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-06-28 Thread Suraj Jitindar Singh
On 24/06/16 19:59, Paul Mackerras wrote: > On Wed, Jun 15, 2016 at 07:21:05PM +1000, Suraj Jitindar Singh wrote: >> The struct kvmppc_vcore is a structure used to store various information >> about a virtual core for a kvm guest. The runnable_threads element of the >> struct p

[PATCH] powerpc/crash: Rearrange loop condition to avoid out of bounds array access

2016-07-10 Thread Suraj Jitindar Singh
hecking the first condition before exiting on the second condition. To avoid the out of bounds access, simply reorder the loop conditions. Fixes Coverity bug #128232 Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kernel/crash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH 1/4] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-10 Thread Suraj Jitindar Singh
On 29/06/16 22:51, Paolo Bonzini wrote: > > On 29/06/2016 06:44, Suraj Jitindar Singh wrote: >> Thanks for catching that, yeah I see. >> >> I don't think we can trivially move the struct kvmppc_vcore definition into >> kvm_book3s.h as other code in kvm_host.h (

[PATCH V2 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h

2016-07-11 Thread Suraj Jitindar Singh
s due to MAX_SMT_THREADS not being defined. Move the struct kvmppc_vcore definition to kvm_book3s.h which explicitly includes kvm_book3s_asm.h. --- Change Log: V1 -> V2: - Added patch to series Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3

[PATCH V2 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-11 Thread Suraj Jitindar Singh
. --- Change Log: V1 -> V2: - Nothing Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c | 68 +-- 3 files changed, 43 inserti

[PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-11 Thread Suraj Jitindar Singh
Bonzini, and on direction from Paul Mackerras. --- Change Log: V1 -> V2: - Nothing Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_hv.c |

[PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread Suraj Jitindar Singh
for the display of 64-bit vcpu statistics. --- Change Log: V1 -> V2: - Nothing Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s.c | 1 + include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 60 +++ 3 files changed,

[PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-11 Thread Suraj Jitindar Singh
e kvm module parameters based on the calculated average wait and poll times. --- Change Log: V1 -> V2: - Nothing Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_host.h | 3 +++ arch/powerpc/kvm/book3s.c | 3 +++ arch/powerpc/kvm/book3s_hv.c

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-11 Thread Suraj Jitindar Singh
On 12/07/16 05:45, David Matlack wrote: > On Mon, Jul 11, 2016 at 12:31 PM, Paolo Bonzini wrote: >> >> On 11/07/2016 19:30, David Matlack wrote: >>> On Mon, Jul 11, 2016 at 10:05 AM, Paolo Bonzini wrote: On 11/07/2016 18:51, David Matlack wrote: >>> vcpus have statistics associate

Re: [PATCH V2 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-11 Thread Suraj Jitindar Singh
On 12/07/16 03:26, David Matlack wrote: > On Mon, Jul 11, 2016 at 10:07 AM, Paolo Bonzini wrote: >> >> On 11/07/2016 18:57, David Matlack wrote: >>> On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh >>> wrote: >>>> This patch introduces n

Re: [PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-12 Thread Suraj Jitindar Singh
On 12/07/16 02:49, David Matlack wrote: > On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh > wrote: >> vcpu stats are used to collect information about a vcpu which can be viewed >> in the debugfs. For example halt_attempted_poll and halt_successful_poll >> are u

Re: [PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-12 Thread Suraj Jitindar Singh
On 12/07/16 16:17, Suraj Jitindar Singh wrote: > On 12/07/16 02:49, David Matlack wrote: >> On Mon, Jul 11, 2016 at 12:08 AM, Suraj Jitindar Singh >> wrote: >>> vcpu stats are used to collect information about a vcpu which can be viewed >>> in the debugfs. Fo

[PATCH V3 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h

2016-07-13 Thread Suraj Jitindar Singh
s due to MAX_SMT_THREADS not being defined. Move the struct kvmppc_vcore definition to kvm_book3s.h which explicitly includes kvm_book3s_asm.h. --- Change Log: V1 -> V2: - Added patch to series V2 -> V3: - Nothing Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/

[PATCH V3 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-13 Thread Suraj Jitindar Singh
. --- Change Log: V1 -> V3: - Nothing Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c | 68 +-- 3 files changed, 43 inserti

[PATCH V3 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-13 Thread Suraj Jitindar Singh
Bonzini, and on direction from Paul Mackerras. --- Change Log: V1 -> V3: - Nothing Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_hv.c |

[PATCH V3 4/5] kvm/stats: Add provisioning for 64-bit vm and vcpu statistics

2016-07-13 Thread Suraj Jitindar Singh
ns and modify them to expect u64s. Thus update all vm and vcpu statistics to u64s accordingly. Signed-off-by: Suraj Jitindar Singh --- arch/arm/include/asm/kvm_host.h | 12 ++-- arch/arm64/include/asm/kvm_host.h | 12 ++-- arch/mips/include/asm/kvm_host.h| 46 ++---

[PATCH V3 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-13 Thread Suraj Jitindar Singh
hange Log: V1 -> V2: - Nothing V2 -> V3: - Rename vcpu stats to express with greater clarity what they represent: halt_poll_time -> halt_block_time_successful_poll halt_wait_time -> halt_block_time_waited Signed-off-by: Sur

Re: [PATCH V3 4/5] kvm/stats: Add provisioning for 64-bit vm and vcpu statistics

2016-07-15 Thread Suraj Jitindar Singh
On 13/07/16 19:04, Christian Borntraeger wrote: > On 07/13/2016 10:53 AM, Suraj Jitindar Singh wrote: >> vms and vcpus have statistics associated with them which can be viewed >> within the debugfs. Currently it is assumed within the vcpu_stat_get() and >> vm_stat_get()

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-15 Thread Suraj Jitindar Singh
On 14/07/16 19:42, Paolo Bonzini wrote: > > On 13/07/2016 20:00, Christian Borntraeger wrote: >> I thought u64 still existed on 32-bit architectures. unsigned long >> would be fine but with the caveat that certain stats would overflow on >> 32-bit architectures. Yes, but not all

Re: [PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-15 Thread Suraj Jitindar Singh
On 14/07/16 03:20, David Matlack wrote: > On Tue, Jul 12, 2016 at 11:07 PM, Suraj Jitindar Singh > wrote: >> On 12/07/16 16:17, Suraj Jitindar Singh wrote: >>> On 12/07/16 02:49, David Matlack wrote: > [snip] >>>> It's possible to poll and wa

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-18 Thread Suraj Jitindar Singh
On 18/07/16 18:24, Paolo Bonzini wrote: > > On 18/07/2016 09:17, Christian Borntraeger wrote: >> On 07/15/2016 09:52 AM, Suraj Jitindar Singh wrote: >>> >>> On 14/07/16 19:42, Paolo Bonzini wrote: >>>> On 13/07/2016 20:00, Christian Borntraeger wrote: &

[PATCH V4 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h

2016-07-19 Thread Suraj Jitindar Singh
s due to MAX_SMT_THREADS not being defined. Move the struct kvmppc_vcore definition to kvm_book3s.h which explicitly includes kvm_book3s_asm.h. Signed-off-by: Suraj Jitindar Singh --- Change Log: V1 -> V2: - Added patch to series --- arch/powerpc/include/asm/kvm_book3

[PATCH V4 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-19 Thread Suraj Jitindar Singh
. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c | 68 +-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/arch/powerpc

[PATCH V4 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-19 Thread Suraj Jitindar Singh
Bonzini, and on direction from Paul Mackerras. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_hv.c | 116 ++ arch/powerpc/kvm/trace_hv.h

[PATCH V4 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats

2016-07-19 Thread Suraj Jitindar Singh
rs. Modify vm_stat_get() to expect ulongs. Signed-off-by: Suraj Jitindar Singh --- Change Log: V2 -> V3: - Instead of implementing separate u32 and u64 functions keep the generic functions and modify them to expect u64s. Thus update all vm and vcpu statistics to u64s accordin

[PATCH V4 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-19 Thread Suraj Jitindar Singh
le to determine the average poll and wait times. This will give the ability to tune the kvm module parameters based on the calculated average wait and poll times. Signed-off-by: Suraj Jitindar Singh --- Change Log: V3 -> V4: - Instead of accounting just wait and poll time, separa

Re: [PATCH V4 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-21 Thread Suraj Jitindar Singh
On 20/07/16 04:58, David Matlack wrote: > On Tue, Jul 19, 2016 at 1:12 AM, Suraj Jitindar Singh > wrote: >> This patch introduces new halt polling functionality into the kvm_hv kernel >> module. When a vcore is idle it will poll for some period of time before >&g

[PATCH V5 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h

2016-07-21 Thread Suraj Jitindar Singh
s due to MAX_SMT_THREADS not being defined. Move the struct kvmppc_vcore definition to kvm_book3s.h which explicitly includes kvm_book3s_asm.h. Signed-off-by: Suraj Jitindar Singh --- Change Log: V1 -> V2: - Added patch to series --- arch/powerpc/include/asm/kvm_book3

[PATCH V5 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-21 Thread Suraj Jitindar Singh
. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c | 68 +-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/arch/powerpc

[PATCH V5 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-21 Thread Suraj Jitindar Singh
through module parameters. Based on the implementation in the generic kvm module by Wanpeng Li and Paolo Bonzini, and on direction from Paul Mackerras. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 1 + arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc

[PATCH V5 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats

2016-07-21 Thread Suraj Jitindar Singh
rs. Modify vm_stat_get() to expect ulongs. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Matlack Acked-by: Christian Borntraeger --- Change Log: V2 -> V3: - Instead of implementing separate u32 and u64 functions keep the generic functions and modify them to expect u64s. Th

[PATCH V5 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-21 Thread Suraj Jitindar Singh
le to determine the average poll and wait times. This will give the ability to tune the kvm module parameters based on the calculated average wait and poll times. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Matlack --- Change Log: V3 -> V4: - Instead of accounting just wait

Re: [PATCH V5 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-24 Thread Suraj Jitindar Singh
On 23/07/16 07:53, David Matlack wrote: > On Thu, Jul 21, 2016 at 8:41 PM, Suraj Jitindar Singh > wrote: >> vcpu stats are used to collect information about a vcpu which can be viewed >> in the debugfs. For example halt_attempted_poll and halt_successful_poll >> are u

[RESEND] [PATCH V5 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h

2016-08-01 Thread Suraj Jitindar Singh
s due to MAX_SMT_THREADS not being defined. Move the struct kvmppc_vcore definition to kvm_book3s.h which explicitly includes kvm_book3s_asm.h. Signed-off-by: Suraj Jitindar Singh --- Change Log: V1 -> V2: - Added patch to series --- arch/powerpc/include/asm/kvm_book3

[RESEND] [PATCH V5 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-08-01 Thread Suraj Jitindar Singh
. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_book3s.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c | 68 +-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/arch/powerpc

[RESEND] [PATCH V5 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-08-01 Thread Suraj Jitindar Singh
through module parameters. Based on the implementation in the generic kvm module by Wanpeng Li and Paolo Bonzini, and on direction from Paul Mackerras. Signed-off-by: Suraj Jitindar Singh --- Change Log: V4 -> V5: - Add single_task_running() check to polling loop --- arch/powerpc/incl

[RESEND] [PATCH V5 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats

2016-08-01 Thread Suraj Jitindar Singh
rs. Modify vm_stat_get() to expect ulongs. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Matlack Acked-by: Christian Borntraeger --- Change Log: V2 -> V3: - Instead of implementing separate u32 and u64 functions keep the generic functions and modify them to expect u64s. Th

[RESEND] [PATCH V5 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-08-01 Thread Suraj Jitindar Singh
le to determine the average poll and wait times. This will give the ability to tune the kvm module parameters based on the calculated average wait and poll times. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Matlack --- Change Log: V3 -> V4: - Instead of accounting just wait

[RFC] [PATCH 1/3] powernv/opal: Introduce new opal_oppanel interface to expose the op_panel

2016-08-02 Thread Suraj Jitindar Singh
display buffer. Signed-off-by: Suraj Jitindar Singh --- MAINTAINERS | 1 + arch/powerpc/include/asm/opal.h | 7 + arch/powerpc/platforms/powernv/Kconfig| 4 + arch/powerpc/platforms/powernv/Makefile | 1 + arch/powerpc/platforms

[RFC] [PATCH 2/3] powernv/setup: Initialise opal_oppanel and display information on boot

2016-08-02 Thread Suraj Jitindar Singh
Jitindar Singh --- arch/powerpc/platforms/powernv/opal.c | 8 +--- arch/powerpc/platforms/powernv/setup.c | 27 +++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index

[RFC] [PATCH 3/3] powernv/oppanel: Update op_panel module to utilise opal_oppanel interface

2016-08-02 Thread Suraj Jitindar Singh
lot of the module code. Thus update the powernv_op_panel kernel module to access the display through the opal_oppanel interface. Signed-off-by: Suraj Jitindar Singh --- drivers/char/powernv-op-panel.c | 153 ++-- 1 file changed, 51 insertions(+), 102 deletions

Re: KVM guests freeze under upstream kernel

2017-07-26 Thread Suraj Jitindar Singh
On Thu, 2017-07-27 at 13:14 +1000, Michael Ellerman wrote: > jos...@linux.vnet.ibm.com writes: > > On Thu, Jul 20, 2017 at 10:18:18PM -0300, jos...@linux.vnet.ibm.com > > wrote: > > > On Thu, Jul 20, 2017 at 03:21:59PM +1000, Paul Mackerras wrote: > > > > > > > > Did you check the host kernel log

Re: [PATCH v2] powerpc/mm: Check for _PAGE_PTE in *_devmap()

2017-07-27 Thread Suraj Jitindar Singh
& cpu_to_be64(_PAGE_DEVMAP)); > + uint64_t mask = cpu_to_be64(_PAGE_DEVMAP | _PAGE_PTE); > + > + return (pte_raw(pte) & mask) == mask; >  } >   >  static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) Reviewed-by: Suraj Jitindar Singh

[PATCH] powerpc/mm: Invalidate partition table cache on host proc tbl base update

2017-08-02 Thread Suraj Jitindar Singh
to call mmu_partition_table_set_entry(), this ensures all appropriate invalidation will be performed. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/mm/pgtable-radix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm

Re: [PATCH] powerpc/mm: Invalidate partition table cache on host proc tbl base update

2017-08-03 Thread Suraj Jitindar Singh
On Thu, 2017-08-03 at 17:35 +1000, Benjamin Herrenschmidt wrote: > On Thu, 2017-08-03 at 16:30 +1000, Michael Ellerman wrote: > > Suraj Jitindar Singh writes: > > > > > The host process table base is stored in the partition table by > > > calling > > >

Re: [PATCH] powerpc/mm: Invalidate partition table cache on host proc tbl base update

2017-08-03 Thread Suraj Jitindar Singh
On Fri, 2017-08-04 at 11:31 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2017-08-04 at 11:02 +1000, Suraj Jitindar Singh wrote: > > > > I guess there's the possibility of: > > [x] randomly crash > > > > This is required to run a powernv kernel as a gues

Re: [PATCH] powerpc/mm: Invalidate partition table cache on host proc tbl base update

2017-08-14 Thread Suraj Jitindar Singh
On Wed, 2017-08-09 at 20:30 +1000, Michael Ellerman wrote: > Suraj Jitindar Singh writes: > > > The host process table base is stored in the partition table by > > calling > > the function native_register_process_table(). Currently this just > > sets > >

<    1   2