Re: [PATCH 6/8] docs/gpu: fix a documentation build break in i915.rst

2019-05-28 Thread Daniel Vetter
On Wed, May 22, 2019 at 10:51 PM Jonathan Corbet wrote: > > Documentation/gpu/i915.rst is not included in the TOC tree, but newer > versions of sphinx parse it anyway. That leads to this hard build failure: It is included I think: Documentation/gpu/index.rst -> drivers.rst -> i915.rst. With that

Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions

2019-05-28 Thread Tao Xu
On 5/29/2019 10:38 AM, Paolo Bonzini wrote: On 29/05/19 04:05, Tao Xu wrote: Thank you Paolo, but I have another question. I was wondering if it is appropriate to enable X86_FEATURE_WAITPKG when QEMU uses "-overcommit cpu-pm=on"? "-overcommit" only establishes the behavior of KVM, it doesn'

Re: [PATCH v2 3/3] KVM: vmx: handle vm-exit for UMWAIT and TPAUSE

2019-05-28 Thread Paolo Bonzini
On 29/05/19 04:25, Tao Xu wrote: >> > OK, but should we just drop this patch? > Or add the VMX_EXIT_REASONS bits of UMWAIT and TPAUSE and handle like > XSAVES/XRSTORS: > "kvm_skip_emulated_instruction(vcpu);" > "WARN(1, "this should never happen\n");" Yes, this sounds good to me. Paolo

Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions

2019-05-28 Thread Paolo Bonzini
On 29/05/19 04:05, Tao Xu wrote: >> > > Thank you Paolo, but I have another question. I was wondering if it is > appropriate to enable X86_FEATURE_WAITPKG when QEMU uses "-overcommit > cpu-pm=on"? "-overcommit" only establishes the behavior of KVM, it doesn't change the cpuid bits. So you'd need

Re: [PATCH v2 3/3] KVM: vmx: handle vm-exit for UMWAIT and TPAUSE

2019-05-28 Thread Tao Xu
On 29/05/2019 09:28, Paolo Bonzini wrote: On 24/05/19 09:56, Tao Xu wrote: As the latest Intel 64 and IA-32 Architectures Software Developer's Manual, UMWAIT and TPAUSE instructions cause a VM exit if the “RDTSC exiting” and “enable user wait and pause” VM-execution controls are both 1. This pa

Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions

2019-05-28 Thread Tao Xu
On 29/05/2019 09:24, Paolo Bonzini wrote: On 24/05/19 09:56, Tao Xu wrote: +7.19 KVM_CAP_ENABLE_USR_WAIT_PAUSE + +Architectures: x86 +Parameters: args[0] whether feature should be enabled or not + +With this capability enabled, a VM can use UMONITOR, UMWAIT and TPAUSE +instructions. If the ins

Re: [PATCH v2 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL

2019-05-28 Thread Tao Xu
On 29/05/2019 09:29, Paolo Bonzini wrote: On 24/05/19 09:56, Tao Xu wrote: + + if (rdmsrl_safe(MSR_IA32_UMWAIT_CONTROL, &host_umwait_control)) + return; + Does the host value ever change? If not, this can perhaps be read once when kvm_intel is loaded. And if it changes of

Re: [PATCH v2 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL

2019-05-28 Thread Paolo Bonzini
On 24/05/19 09:56, Tao Xu wrote: > + > + if (rdmsrl_safe(MSR_IA32_UMWAIT_CONTROL, &host_umwait_control)) > + return; > + Does the host value ever change? If not, this can perhaps be read once when kvm_intel is loaded. And if it changes often, it should be shadowed into a percpu v

Re: [PATCH v2 3/3] KVM: vmx: handle vm-exit for UMWAIT and TPAUSE

2019-05-28 Thread Paolo Bonzini
On 24/05/19 09:56, Tao Xu wrote: > As the latest Intel 64 and IA-32 Architectures Software Developer's > Manual, UMWAIT and TPAUSE instructions cause a VM exit if the > “RDTSC exiting” and “enable user wait and pause” VM-execution controls > are both 1. > > This patch is to handle the vm-exit for

Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions

2019-05-28 Thread Paolo Bonzini
On 28/05/19 09:19, Tao Xu wrote: > > Thank you! This information really helped me. After I read the code in > KVM/QEMU, I was wondering that with qemu command-line "-cpu > host,+kvm-hint-dedicated", then in KVM, > "kvm_hint_has_feature(KVM_HINTS_DEDICATED)" will be true, am I right? Yes, but it d

Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions

2019-05-28 Thread Paolo Bonzini
On 27/05/19 12:30, Peter Zijlstra wrote: >> This patch adds support for UMONITOR, UMWAIT and TPAUSE instructions >> in kvm, and by default dont't expose it to kvm and provide a capability >> to enable it. > > I'm thinking this should be conditional on the guest being a 1:1 guest, > and I also seem

Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions

2019-05-28 Thread Paolo Bonzini
On 24/05/19 09:56, Tao Xu wrote: > +7.19 KVM_CAP_ENABLE_USR_WAIT_PAUSE > + > +Architectures: x86 > +Parameters: args[0] whether feature should be enabled or not > + > +With this capability enabled, a VM can use UMONITOR, UMWAIT and TPAUSE > +instructions. If the instruction causes a delay, the amou

Re: [PATCH 1/3] xen: remove tmem driver

2019-05-28 Thread Boris Ostrovsky
> diff --git a/include/xen/balloon.h b/include/xen/balloon.h > index 4914b93a23f2..a72ef3f88b39 100644 > --- a/include/xen/balloon.h > +++ b/include/xen/balloon.h > @@ -28,14 +28,6 @@ int alloc_xenballooned_pages(int nr_pages, struct page > **pages); > void free_xenballooned_pages(int nr_pages,

Re: [PATCH v2 1/1] sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices

2019-05-28 Thread Dave Chiluk
On Fri, May 24, 2019 at 5:07 PM Peter Oskolkov wrote: > Linux CPU scheduling tail latency is a well-known issue and a major > pain point in some workloads: > https://www.google.com/search?q=linux+cpu+scheduling+tail+latency > > Even assuming that nobody noticed this particular cause > of CPU sched

Re: [PATCH RFC 0/5] Remove some notrace RCU APIs

2019-05-28 Thread Paul E. McKenney
On Tue, May 28, 2019 at 03:00:07PM -0400, Joel Fernandes wrote: > On Tue, May 28, 2019 at 05:24:47AM -0700, Paul E. McKenney wrote: > > On Sat, May 25, 2019 at 02:14:07PM -0400, Joel Fernandes wrote: > > > On Sat, May 25, 2019 at 08:50:35AM -0700, Paul E. McKenney wrote: > > > > On Sat, May 25, 201

Re: [PATCH RFC 0/5] Remove some notrace RCU APIs

2019-05-28 Thread Joel Fernandes
On Tue, May 28, 2019 at 05:24:47AM -0700, Paul E. McKenney wrote: > On Sat, May 25, 2019 at 02:14:07PM -0400, Joel Fernandes wrote: > > On Sat, May 25, 2019 at 08:50:35AM -0700, Paul E. McKenney wrote: > > > On Sat, May 25, 2019 at 10:19:54AM -0400, Joel Fernandes wrote: > > > > On Sat, May 25, 201

Re: [PATCH 2/3] tools/objtool: add kasan_check_* to uaccess whitelist

2019-05-28 Thread Peter Zijlstra
On Tue, May 28, 2019 at 06:32:57PM +0200, Marco Elver wrote: > This is a pre-requisite for enabling bitops instrumentation. Some bitops > may safely be used with instrumentation in uaccess regions. > > For example, on x86, `test_bit` is used to test a CPU-feature in a > uaccess region: arch/x86/

Re: [PATCH 1/3] lib/test_kasan: Add bitops tests

2019-05-28 Thread Mark Rutland
Hi, On Tue, May 28, 2019 at 06:32:56PM +0200, Marco Elver wrote: > +static noinline void __init kasan_bitops(void) > +{ > + long bits = 0; > + const long bit = sizeof(bits) * 8; You can use BITS_PER_LONG here. Thanks, Mark.

Re: [PATCH 3/3] asm-generic, x86: Add bitops instrumentation for KASAN

2019-05-28 Thread Mark Rutland
On Tue, May 28, 2019 at 06:32:58PM +0200, Marco Elver wrote: > This adds a new header to asm-generic to allow optionally instrumenting > architecture-specific asm implementations of bitops. > > This change includes the required change for x86 as reference and > changes the kernel API doc to point

Purchase_rfq

2019-05-28 Thread aishatu
INQUIRY_4178916..xlsx Description: Binary data

[PATCH 3/3] asm-generic, x86: Add bitops instrumentation for KASAN

2019-05-28 Thread Marco Elver
This adds a new header to asm-generic to allow optionally instrumenting architecture-specific asm implementations of bitops. This change includes the required change for x86 as reference and changes the kernel API doc to point to bitops-instrumented.h instead. Rationale: the functions in x86's bit

[PATCH 2/3] tools/objtool: add kasan_check_* to uaccess whitelist

2019-05-28 Thread Marco Elver
This is a pre-requisite for enabling bitops instrumentation. Some bitops may safely be used with instrumentation in uaccess regions. For example, on x86, `test_bit` is used to test a CPU-feature in a uaccess region: arch/x86/ia32/ia32_signal.c:361 Signed-off-by: Marco Elver --- tools/objtool/

[PATCH 1/3] lib/test_kasan: Add bitops tests

2019-05-28 Thread Marco Elver
This adds bitops tests to the test_kasan module. In a follow-up patch, support for bitops instrumentation will be added. Signed-off-by: Marco Elver --- lib/test_kasan.c | 73 ++-- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/lib/test_

Re: [PATCH v2 2/2] tracing/kprobe: Add kprobe_event= boot parameter

2019-05-28 Thread Anders Roxell
> > > > > > This puts a probe on vfs_read with argument1 and 2, and > > > enable the new event. > > > > > > Signed-off-by: Masami Hiramatsu > > > > I built an arm64 kernel from todays linux-next tag next-20190528 and > > ran in to this is

Re: [PATCH v2 2/2] tracing/kprobe: Add kprobe_event= boot parameter

2019-05-28 Thread Steven Rostedt
; > interface, but use ',' and ';' instead of ' ' and '\n' > > respectively. e.g. > > > > kprobe_event=p,vfs_read,$arg1,$arg2 > > > > This puts a probe on vfs_read with argument1 and 2, and > > enable the new event. > &g

Re: [PATCH RFC 0/5] Remove some notrace RCU APIs

2019-05-28 Thread Paul E. McKenney
On Sat, May 25, 2019 at 02:14:07PM -0400, Joel Fernandes wrote: > On Sat, May 25, 2019 at 08:50:35AM -0700, Paul E. McKenney wrote: > > On Sat, May 25, 2019 at 10:19:54AM -0400, Joel Fernandes wrote: > > > On Sat, May 25, 2019 at 07:08:26AM -0400, Steven Rostedt wrote: > > > > On Sat, 25 May 2019 0

Re: [PATCH v2 2/2] tracing/kprobe: Add kprobe_event= boot parameter

2019-05-28 Thread Anders Roxell
#x27;\n' > respectively. e.g. > > kprobe_event=p,vfs_read,$arg1,$arg2 > > This puts a probe on vfs_read with argument1 and 2, and > enable the new event. > > Signed-off-by: Masami Hiramatsu I built an arm64 kernel from todays linux-next tag next-20190528 and ran in to thi

Re: [PATCH v2 1/3] KVM: x86: add support for user wait instructions

2019-05-28 Thread Tao Xu
On 28/05/2019 14:11, Wanpeng Li wrote: On Tue, 28 May 2019 at 13:16, Tao Xu wrote: On 27/05/2019 18:30, Peter Zijlstra wrote: On Fri, May 24, 2019 at 03:56:35PM +0800, Tao Xu wrote: This patch adds support for UMONITOR, UMWAIT and TPAUSE instructions in kvm, and by default dont't expose i