Re: [PATCH] kvm/vmx: EPTP switching test

2015-11-16 Thread Andy Lutomirski
On Mon, Nov 16, 2015 at 10:18 AM, =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= wrote: > 2015-11-16 19:59+0200, Michael S. Tsirkin: >> On Mon, Nov 16, 2015 at 06:51:06PM +0100, >> =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= wrote: >>> 2015-11-15 18:00+0200, Michael S. Tsirkin: >>>

Re: [PATCH v4 0/6] virtio core DMA API conversion

2015-11-10 Thread Andy Lutomirski
On Nov 10, 2015 4:44 PM, "Benjamin Herrenschmidt" <b...@kernel.crashing.org> wrote: > > On Tue, 2015-11-10 at 15:44 -0800, Andy Lutomirski wrote: > > > > > What about partition <-> partition virtio such as what we could do on > > >

Re: [PATCH v4 0/6] virtio core DMA API conversion

2015-11-09 Thread Andy Lutomirski
On Mon, Nov 9, 2015 at 2:58 PM, Benjamin Herrenschmidt wrote: > So ... > > I've finally tried to sort that out for powerpc and I can't find a way > to make that work that isn't a complete pile of stinking shit. > > I'm very tempted to go back to my original idea: virtio

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-02 Thread Andy Lutomirski
On Mon, Nov 2, 2015 at 3:16 AM, Cornelia Huck <cornelia.h...@de.ibm.com> wrote: > On Fri, 30 Oct 2015 13:33:07 -0700 > Andy Lutomirski <l...@amacapital.net> wrote: > >> On Fri, Oct 30, 2015 at 1:25 AM, Cornelia Huck <cornelia.h...@de.ibm.com> >> wrote:

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-10-30 Thread Andy Lutomirski
On Fri, Oct 30, 2015 at 1:25 AM, Cornelia Huck <cornelia.h...@de.ibm.com> wrote: > On Thu, 29 Oct 2015 15:50:38 -0700 > Andy Lutomirski <l...@amacapital.net> wrote: > >> Progress! After getting that sort-of-working, I figured out what was >> wrong with my earlie

Re: [PATCH v4 1/6] virtio-net: Stop doing DMA from the stack

2015-10-30 Thread Andy Lutomirski
On Fri, Oct 30, 2015 at 6:55 AM, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > Am 30.10.2015 um 02:09 schrieb Andy Lutomirski: >> From: "Michael S. Tsirkin" <m...@redhat.com> >> >> Once virtio starts using the DMA API, we won't be able to saf

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-03 Thread Andy Lutomirski
On Tue, Nov 3, 2015 at 12:14 AM, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > Am 02.11.2015 um 21:23 schrieb Andy Lutomirski: >> On Mon, Nov 2, 2015 at 3:16 AM, Cornelia Huck <cornelia.h...@de.ibm.com> >> wrote: >>> On Fri, 30 Oct 2015 1

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-03 Thread Andy Lutomirski
On Tue, Nov 3, 2015 at 9:59 AM, Cornelia Huck wrote: > It's just failing very early in the setup phase. As it works for me > with a kvm setup, I'm suspecting some error in qemu's emulation code, > which is unfortunately not my turf. > That should be easy to rule out.

Re: [PATCH 3/3] s390/dma: Allow per device dma ops

2015-11-05 Thread Andy Lutomirski
On 11/05/2015 01:33 AM, Christian Borntraeger wrote: Am 03.11.2015 um 13:26 schrieb Cornelia Huck: On Tue, 3 Nov 2015 12:54:39 +0100 Christian Borntraeger wrote: As virtio-ccw now has dma ops, we can no longer default to the PCI ones. Make use of dev_archdata to keep

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-04 Thread Andy Lutomirski
2 bit values. The conversion from host > endianness to BE now treats them as LE on your system... > > Could you please give the following qemu patch a try? Tested-by: Andy Lutomirski <l...@kernel.org> Now my test script panics for the right reason (init isn't actually an s390 binar

Re: [GIT PULL v4 0/3] dma and virtio prep patches

2015-11-05 Thread Andy Lutomirski
On Thu, Nov 5, 2015 at 12:08 PM, Christian Borntraeger wrote: > Andy, > > to make it obvious which version is the latest, here is a branch > > The following changes since commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861: > > Linux 4.3 (2015-11-01 16:05:25 -0800) > > are

Re: [PATCH v4 0/6] virtio core DMA API conversion

2015-10-29 Thread Andy Lutomirski
On Thu, Oct 29, 2015 at 6:09 PM, Andy Lutomirski <l...@kernel.org> wrote: > This switches virtio to use the DMA API unconditionally. I'm sure > it breaks things, but it seems to work on x86 using virtio-pci, with > and without Xen, and using both the modern 1.0 variant and the &

Re: [PATCH v4 2/6] virtio_ring: Support DMA APIs

2015-10-30 Thread Andy Lutomirski
On Fri, Oct 30, 2015 at 5:05 AM, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > Am 30.10.2015 um 13:01 schrieb Cornelia Huck: >> On Thu, 29 Oct 2015 18:09:47 -0700 >> Andy Lutomirski <l...@kernel.org> wrote: >> >>> virtio_ring currently sends the

[PATCH 3/3] x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y

2015-09-16 Thread Andy Lutomirski
Enabling CONFIG_PARAVIRT had an unintended side effect: rdmsr turned into rdmsr_safe and wrmsr turned into wrmsr_safe, even on bare metal. Undo that by using the new unsafe paravirt MSR hooks. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/include/asm/paravirt.h | 9 +++---

[PATCH 2/3] x86/paravirt: Add paravirt_{read,write}_msr

2015-09-16 Thread Andy Lutomirski
think that should be done separately by the Xen maintainers. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/include/asm/paravirt.h | 11 +++ arch/x86/include/asm/paravirt_types.h | 10 -- arch/x86/kernel/paravirt.c| 2 ++ arch/x86/xen/enlig

[PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops

2015-09-16 Thread Andy Lutomirski
make Arjan and the rest of the Clear Containers people happy :) Andy Lutomirski (3): x86/paravirt: Add _safe to the read_msr and write_msr PV hooks x86/paravirt: Add paravirt_{read,write}_msr x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y arch/x86/include/asm/

[PATCH 1/3] x86/paravirt: Add _safe to the read_msr and write_msr PV hooks

2015-09-16 Thread Andy Lutomirski
These hooks match the _safe variants, so name them accordingly. This will make room for unsafe PV hooks. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/include/asm/paravirt.h | 33 + arch/x86/include/asm/paravirt_types.h | 8

Re: [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops

2015-09-17 Thread Andy Lutomirski
On Thu, Sep 17, 2015 at 12:19 AM, Ingo Molnar <mi...@kernel.org> wrote: > > * Andy Lutomirski <l...@kernel.org> wrote: > >> Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently >> turns all rdmsr and wrmsr operations into the safe variants without

Re: [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops

2015-09-17 Thread Andy Lutomirski
On Thu, Sep 17, 2015 at 8:17 AM, Peter Zijlstra <pet...@infradead.org> wrote: > On Thu, Sep 17, 2015 at 08:17:18AM -0700, Andy Lutomirski wrote: > >> > Ah, that would be good news. Andy earlier argued I could not rely on >> > rdmsr_safe() faulting on unknown MSRs.

Re: [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops

2015-09-17 Thread Andy Lutomirski
On Sep 17, 2015 5:33 AM, "Peter Zijlstra" wrote: > > On Thu, Sep 17, 2015 at 01:40:30PM +0200, Paolo Bonzini wrote: > > > > > > On 17/09/2015 10:58, Peter Zijlstra wrote: > > > But the far greater problem I have with the whole virt thing is that > > > you cannot use

Re: [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops

2015-09-17 Thread Andy Lutomirski
On Thu, Sep 17, 2015 at 10:30 AM, Ingo Molnar <mi...@kernel.org> wrote: > > * Andy Lutomirski <l...@amacapital.net> wrote: > >> On Thu, Sep 17, 2015 at 12:19 AM, Ingo Molnar <mi...@kernel.org> wrote: >> > >> > * Andy Lutomirski <l...@kerne

Re: rdmsr_safe in Linux PV (under Xen) gets an #GP:Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-17 Thread Andy Lutomirski
On Thu, Sep 17, 2015 at 1:10 PM, Konrad Rzeszutek Wilk wrote: > On Wed, Sep 16, 2015 at 06:39:03PM -0400, Cole Robinson wrote: >> On 09/16/2015 05:08 PM, Konrad Rzeszutek Wilk wrote: >> > On Wed, Sep 16, 2015 at 05:04:31PM -0400, Cole Robinson wrote: >> >> On 09/16/2015

[PATCH 0/2] x86/msr: MSR access failure changes

2015-09-17 Thread Andy Lutomirski
This applies on top of my earlier MSR series. Andy Lutomirski (2): x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops x86/msr: Set the return value to zero when native_rdmsr_safe fails arch/x86/include/asm/msr.h | 5 - arch/x86/kernel/traps

[PATCH 2/2] x86/msr: Set the return value to zero when native_rdmsr_safe fails

2015-09-17 Thread Andy Lutomirski
This will cause unchecked native_rdmsr_safe failures to return deterministic results. We could poison the results with something other than zero, but that would increase code size. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/include/asm/msr.h | 5 - 1 file chan

[PATCH 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-17 Thread Andy Lutomirski
o minimize the chance of nasty undebuggable failures due on systems that used to work due to a now-fixed CONFIG_PARAVIRT=y bug. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/kernel/traps.c | 51 + 1 file changed, 51 insertion

Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-30 Thread Andy Lutomirski
; regular MSRs. > > These could still be open coded in an inlined fashion, like the scheduler > usage. > We could have a raw_rdmsr for those. OTOH, I'm still not 100% convinced that this warn-but-don't-die behavior is worth the effort. This isn't a frequent source of bugs to my

Re: [PATCH 26/26] x86, pkeys: Documentation

2015-10-01 Thread Andy Lutomirski
On Thu, Oct 1, 2015 at 3:33 PM, Dave Hansen wrote: > On 10/01/2015 01:39 PM, Kees Cook wrote: >> On Thu, Oct 1, 2015 at 4:17 AM, Ingo Molnar wrote: >>> So could we try to add an (opt-in) kernel option that enables this >>> transparently >>> and automatically for

Re: [PATCH] x86: Use entire page for the per-cpu GDT only if paravirt-enabled

2015-09-29 Thread Andy Lutomirski
On Tue, Sep 29, 2015 at 10:50 AM, Linus Torvalds <torva...@linux-foundation.org> wrote: > On Tue, Sep 29, 2015 at 1:35 PM, Andy Lutomirski <l...@amacapital.net> wrote: >> >> Does anyone know what happens if you stick a non-accessed segment in >> the GDT, map t

Re: [PATCH] x86: Use entire page for the per-cpu GDT only if paravirt-enabled

2015-09-29 Thread Andy Lutomirski
On Sep 29, 2015 2:01 AM, "Ingo Molnar" wrote: > > > * Denys Vlasenko wrote: > > > On 09/28/2015 09:58 AM, Ingo Molnar wrote: > > > > > > * Denys Vlasenko wrote: > > > > > >> On 09/26/2015 09:50 PM, H. Peter Anvin wrote: > > >>> NAK.

Re: [PATCH] x86: Use entire page for the per-cpu GDT only if paravirt-enabled

2015-09-29 Thread Andy Lutomirski
On Tue, Sep 29, 2015 at 11:18 AM, H. Peter Anvin wrote: > SGDT would be easy to use, and it is logical that it is faster since it reads > an internal register. SIDT does too but unlike the GDT has a secondary limit > (it can never be larger than 4096 bytes) and so all limits in

[PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-20 Thread Andy Lutomirski
the chance of nasty undebuggable failures due on systems that used to work due to a now-fixed CONFIG_PARAVIRT=y bug. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/kernel/traps.c | 55 + 1 file changed, 55 insertions(+) diff

[PATCH v2 2/2] x86/msr: Set the return value to zero when native_rdmsr_safe fails

2015-09-20 Thread Andy Lutomirski
This will cause unchecked native_rdmsr_safe failures to return deterministic results. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/include/asm/msr.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm

[PATCH v2 0/2] x86/msr: MSR access failure changes

2015-09-20 Thread Andy Lutomirski
This applies on top of my earlier paravirt MSR series. Changes from v1: - Return zero instead of poison on bad RDMSRs. Andy Lutomirski (2): x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops x86/msr: Set the return value to zero when native_rdmsr_

Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-20 Thread Andy Lutomirski
On Sep 20, 2015 5:15 PM, "Linus Torvalds" <torva...@linux-foundation.org> wrote: > > On Sun, Sep 20, 2015 at 5:02 PM, Andy Lutomirski <l...@kernel.org> wrote: > > This demotes an OOPS and likely panic due to a failed non-"safe" MSR > > access to

Re: rdmsr_safe in Linux PV (under Xen) gets an #GP:Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-20 Thread Andy Lutomirski
On Fri, Sep 18, 2015 at 12:04 PM, Borislav Petkov <b...@alien8.de> wrote: > On Fri, Sep 18, 2015 at 08:20:46AM -0700, Andy Lutomirski wrote: >> In any event, Borislav, you must have typed rdmsr_safe for a reason :) > > Wasn't me: > > 6c62aa4a3c12 ("x86: make amd.c

Re: rdmsr_safe in Linux PV (under Xen) gets an #GP:Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-22 Thread Andy Lutomirski
On Tue, Sep 22, 2015 at 11:23 AM, Konrad Rzeszutek Wilk <konrad.w...@oracle.com> wrote: > On Sun, Sep 20, 2015 at 09:49:04PM -0700, Andy Lutomirski wrote: >> On Fri, Sep 18, 2015 at 12:04 PM, Borislav Petkov <b...@alien8.de> wrote: >> > On Fri, Sep 18, 2015 at 08:

Re: rdmsr_safe in Linux PV (under Xen) gets an #GP:Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-18 Thread Andy Lutomirski
On Fri, Sep 18, 2015 at 6:54 AM, Borislav Petkov <b...@alien8.de> wrote: > On Thu, Sep 17, 2015 at 01:23:31PM -0700, Andy Lutomirski wrote: >> Cc: Borislav. Is TSEG guaranteed to exist? Can we defer that until > > Why not? It is the tseg base address. > > I think

Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-21 Thread Andy Lutomirski
On Mon, Sep 21, 2015 at 9:49 AM, Arjan van de Ven wrote: > On 9/21/2015 9:36 AM, Linus Torvalds wrote: >> >> On Mon, Sep 21, 2015 at 1:46 AM, Ingo Molnar wrote: >>> >>> >>> Linus, what's your preference? >> >> >> So quite frankly, is there any reason we

Re: [PATCH v2 1/2] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2015-09-21 Thread Andy Lutomirski
On Mon, Sep 21, 2015 at 9:36 AM, Linus Torvalds wrote: > On Mon, Sep 21, 2015 at 1:46 AM, Ingo Molnar wrote: >> >> Linus, what's your preference? > > So quite frankly, is there any reason we don't just implement > native_read_msr() as just > >

kvmclock doesn't work, help?

2015-12-09 Thread Andy Lutomirski
tempted to suggest that we delete kvmclock entirely and start over. A correctly functioning KVM guest using TSC (i.e. ignoring kvmclock entirely) seems to work rather more reliably and considerably faster than a kvmclock guest. --Andy -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscr

Re: kvmclock doesn't work, help?

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 1:16 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 09/12/2015 22:10, Andy Lutomirski wrote: >> Can we please stop making kvmclock more complex? It's a beast right >> now, and not in a good way. It's far too tangled with the vclock &g

Re: kvmclock doesn't work, help?

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 2:12 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 09/12/2015 22:49, Andy Lutomirski wrote: >> On Wed, Dec 9, 2015 at 1:16 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: >>> >>> >>> On 09/12/2015 22:10, Andy Lut

Re: kvmclock doesn't work, help?

2015-12-09 Thread Andy Lutomirski
On Wed, Dec 9, 2015 at 2:27 PM, Andy Lutomirski <l...@amacapital.net> wrote: > On Wed, Dec 9, 2015 at 2:12 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: >> >> >> On 09/12/2015 22:49, Andy Lutomirski wrote: >>> On Wed, Dec 9, 2015 at 1:16 PM,

[PATCH 1/5] x86/kvm: On KVM re-enable (e.g. after suspend), update clocks

2015-12-09 Thread Andy Lutomirski
This gets rid of the "did TSC go backwards" logic and just updates all clocks. It should work better (no more disabling of fast timing) and more reliably (all of the clocks are actually updated). Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x8

[PATCH 2/5] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2015-12-09 Thread Andy Lutomirski
From: Andy Lutomirski <l...@amacapital.net> The pvclock vdso code was too abstracted to understand easily and excessively paranoid. Simplify it for a huge speedup. This opens the door for additional simplifications, as the vdso no longer accesses the pvti for any vcpu other than vcpu 0.

[PATCH 0/5] x86: KVM vdso and clock improvements

2015-12-09 Thread Andy Lutomirski
not currently set up to test it. (The KVM people could also do it very easily on top of these patches.) Andy Lutomirski (5): x86/kvm: On KVM re-enable (e.g. after suspend), update clocks x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader x86/vdso: Get pvclock data from the vvar VMA

[PATCH 3/5] x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap

2015-12-09 Thread Andy Lutomirski
Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/entry/vdso/vclock_gettime.c | 20 arch/x86/entry/vdso/vdso-layout.lds.S | 3 ++- arch/x86/entry/vdso/vdso2c.c | 3 +++ arch/x86/entry/vdso/vma.c | 13 + arch/x86/inclu

[PATCH 4/5] x86/vdso: Remove pvclock fixmap machinery

2015-12-09 Thread Andy Lutomirski
Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/entry/vdso/vclock_gettime.c | 1 - arch/x86/entry/vdso/vma.c| 1 + arch/x86/include/asm/fixmap.h| 5 - arch/x86/include/asm/pvclock.h | 5 - arch/x86/kernel/kvmclock.c | 6 --

[PATCH 5/5] x86/vdso: Enable vdso pvclock access on all vdso variants

2015-12-09 Thread Andy Lutomirski
Now that pvclock doesn't require access to the fixmap, all vdso variants can use it. The kernel side isn't wired up for 32-bit kernels yet, but this covers 32-bit and x32 userspace on 64-bit kernels. Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/entry/vdso/vclock_gettime.

Re: kvmclock doesn't work, help?

2015-12-11 Thread Andy Lutomirski
On Thu, Dec 10, 2015 at 1:32 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Wed, Dec 09, 2015 at 01:10:59PM -0800, Andy Lutomirski wrote: >> I'm trying to clean up kvmclock and I can't get it to work at all. My >> host is 4.4.0-rc3-ish on a Skylake laptop that has a wo

Re: kvmclock doesn't work, help?

2015-12-16 Thread Andy Lutomirski
On Tue, Dec 15, 2015 at 12:42 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 14/12/2015 23:31, Andy Lutomirski wrote: >> > RAW TSC NTP corrected TSC >> > t0 10 10 >> > t1 20

Re: kvmclock doesn't work, help?

2015-12-16 Thread Andy Lutomirski
On Wed, Dec 16, 2015 at 9:48 AM, Andy Lutomirski <l...@amacapital.net> wrote: > On Tue, Dec 15, 2015 at 12:42 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: >> >> >> On 14/12/2015 23:31, Andy Lutomirski wrote: >>> > RAW TSC

Re: [PATCH] x86/platform/uv: Include clocksource.h for clocksource_touch_watchdog()

2015-12-11 Thread Andy Lutomirski
On Fri, Dec 11, 2015 at 12:06 AM, Ingo Molnar <mi...@kernel.org> wrote: > > * Andy Lutomirski <l...@kernel.org> wrote: > >> diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h >> index f80d70009ff8..6d7d0e52ed5a 100644 >> --- a/arch/x86

Re: [PATCH 2/5] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2015-12-11 Thread Andy Lutomirski
On Fri, Dec 11, 2015 at 12:42 AM, Paolo Bonzini wrote: > > > On 11/12/2015 08:52, Ingo Molnar wrote: >> >> * Paolo Bonzini wrote: >>> >>> Reviewed-by: Paolo Bonzini >> >> Thanks. I've added your Reviewed-by to the 1/5 patch as well

Re: kvmclock doesn't work, help?

2015-12-17 Thread Andy Lutomirski
On Wed, Dec 16, 2015 at 1:57 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Wed, Dec 16, 2015 at 10:17:16AM -0800, Andy Lutomirski wrote: >> On Wed, Dec 16, 2015 at 9:48 AM, Andy Lutomirski <l...@amacapital.net> wrote: >> > On Tue, Dec 15, 2015 at

Re: kvmclock doesn't work, help?

2015-12-14 Thread Andy Lutomirski
On Fri, Dec 11, 2015 at 3:48 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Fri, Dec 11, 2015 at 01:57:23PM -0800, Andy Lutomirski wrote: >> On Thu, Dec 10, 2015 at 1:32 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: >> > On Wed, Dec 09, 2015 at 01:10:59P

Re: kvmclock doesn't work, help?

2015-12-14 Thread Andy Lutomirski
On Mon, Dec 14, 2015 at 2:00 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Mon, Dec 14, 2015 at 02:44:15PM +0100, Paolo Bonzini wrote: >> >> >> On 11/12/2015 22:57, Andy Lutomirski wrote: >> > I'm still not seeing the issue. >> > &

[PATCH] x86/vdso/pvclock: Protect STABLE check with the seqcount

2016-01-04 Thread Andy Lutomirski
If the clock becomes unstable while we're reading it, we need to bail. We can do this by simply moving the check into the seqcount loop. Reported-by: Marcelo Tosatti <mtosa...@redhat.com> Signed-off-by: Andy Lutomirski <l...@kernel.org> --- Marcelo, how's this? arch/x8

Re: [PATCH v2 1/4] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2016-01-04 Thread Andy Lutomirski
On Mon, Jan 4, 2016 at 12:26 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Sun, Dec 20, 2015 at 03:05:41AM -0800, Andy Lutomirski wrote: >> From: Andy Lutomirski <l...@amacapital.net> >> >> The pvclock vdso code was too abstracted to understand easily and &

What's kvmclock's custom sched_clock for?

2016-01-06 Thread Andy Lutomirski
AFAICT KVM reliably passes a monotonic TSC through to guests, even if the host suspends. That's all that sched_clock needs, I think. So why does kvmclock have a custom sched_clock? On a related note, KVM doesn't pass the "invariant TSC" feature through to guests on my machine even though

Re: kvmclock doesn't work, help?

2015-12-21 Thread Andy Lutomirski
On Fri, Dec 18, 2015 at 1:49 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Fri, Dec 18, 2015 at 12:25:11PM -0800, Andy Lutomirski wrote: >> [cc: John Stultz -- maybe you have ideas on how this should best >> integrate with the core code] >> >> On Fri,

Re: kvmclock doesn't work, help?

2015-12-18 Thread Andy Lutomirski
[cc: John Stultz -- maybe you have ideas on how this should best integrate with the core code] On Fri, Dec 18, 2015 at 11:45 AM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Fri, Dec 18, 2015 at 11:27:13AM -0800, Andy Lutomirski wrote: >> On Fri, Dec 18, 2015 at 3:47 AM,

Re: kvmclock doesn't work, help?

2015-12-18 Thread Andy Lutomirski
On Fri, Dec 18, 2015 at 3:47 AM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Thu, Dec 17, 2015 at 05:12:59PM -0800, Andy Lutomirski wrote: >> On Thu, Dec 17, 2015 at 11:08 AM, Marcelo Tosatti <mtosa...@redhat.com> >> wrote: >> > On Thu, Dec 17, 2015

[PATCH v2 3/4] x86/vdso: Remove pvclock fixmap machinery

2015-12-20 Thread Andy Lutomirski
Acked-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/entry/vdso/vclock_gettime.c | 1 - arch/x86/entry/vdso/vma.c| 1 + arch/x86/include/asm/fixmap.h| 5 - arch/x86/include/asm/pvclock.h | 5 ---

[PATCH v2 2/4] x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap

2015-12-20 Thread Andy Lutomirski
Acked-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Andy Lutomirski <l...@kernel.org> --- arch/x86/entry/vdso/vclock_gettime.c | 20 arch/x86/entry/vdso/vdso-layout.lds.S | 3 ++- arch/x86/entry/vdso/vdso2c.c | 3 +++ arch/x86/entr

[PATCH v2 0/4] x86: KVM vdso and clock improvements

2015-12-20 Thread Andy Lutomirski
pvclock on 32-bit guests. I'm not currently set up to test it. (The KVM people could also do it very easily on top of these patches.) Changes from v1: - Dropped patch 1 - Added Paolo's review and acks - Fixed a build issue on some configs Andy Lutomirski (4): x86, vdso, pvclock: Simplify

[PATCH v2 1/4] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2015-12-20 Thread Andy Lutomirski
From: Andy Lutomirski <l...@amacapital.net> The pvclock vdso code was too abstracted to understand easily and excessively paranoid. Simplify it for a huge speedup. This opens the door for additional simplifications, as the vdso no longer accesses the pvti for any vcpu other than vcpu 0.

[PATCH v2 4/4] x86/vdso: Enable vdso pvclock access on all vdso variants

2015-12-20 Thread Andy Lutomirski
Now that pvclock doesn't require access to the fixmap, all vdso variants can use it. The kernel side isn't wired up for 32-bit kernels yet, but this covers 32-bit and x32 userspace on 64-bit kernels. Acked-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Andy Lutomirski <l...@k

Re: [PATCH RFC 1/3] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2015-12-28 Thread Andy Lutomirski
On Mon, Dec 28, 2015 at 1:52 PM, Joao Martins wrote: > Right now there is only a pvclock_pvti_cpu0_va() which is defined on > kvmclock since: > > commit dac16fba6fc5 > ("x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap") > > The only user of this

Re: kvmclock doesn't work, help?

2015-12-23 Thread Andy Lutomirski
On Wed, Dec 23, 2015 at 11:27 AM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Mon, Dec 21, 2015 at 02:49:25PM -0800, Andy Lutomirski wrote: >> On Fri, Dec 18, 2015 at 1:49 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: >> > (busy spin is equally problema

Re: kvmclock doesn't work, help?

2015-12-17 Thread Andy Lutomirski
On Thu, Dec 17, 2015 at 11:08 AM, Marcelo Tosatti <mtosa...@redhat.com> wrote: > On Thu, Dec 17, 2015 at 08:33:17AM -0800, Andy Lutomirski wrote: >> On Wed, Dec 16, 2015 at 1:57 PM, Marcelo Tosatti <mtosa...@redhat.com> wrote: >> > On Wed, Dec 16, 2015 at 10:17:16A

Re: [PATCH RFC 1/3] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2015-12-29 Thread Andy Lutomirski
On Tue, Dec 29, 2015 at 4:50 AM, Joao Martins <joao.m.mart...@oracle.com> wrote: > On 12/28/2015 11:45 PM, Andy Lutomirski wrote: >> On Mon, Dec 28, 2015 at 1:52 PM, Joao Martins <joao.m.mart...@oracle.com> >> wrote: >>> Right now there is only a pvc

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Andy Lutomirski
On Nov 19, 2015 5:45 AM, "Michael S. Tsirkin" <m...@redhat.com> wrote: > > On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: > > This switches virtio to use the DMA API unconditionally. I'm sure > > it breaks things, but it see

[tip:x86/asm] x86/asm/tsc: Remove the rdtscp() and rdtscpll() macros

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: ec69de52c648b1d9416a810943e68dbe9fe519f4 Gitweb: http://git.kernel.org/tip/ec69de52c648b1d9416a810943e68dbe9fe519f4 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:43:59 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:26

[tip:x86/asm] x86/asm/tsc: Use rdtsc_ordered() in read_tsc() instead of get_cycles()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 27c634054a3155e1d9a02f0e362e4f4ff8d28ee7 Gitweb: http://git.kernel.org/tip/27c634054a3155e1d9a02f0e362e4f4ff8d28ee7 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:10 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:29

[tip:x86/asm] x86/asm/tsc: Rename native_read_tsc() to rdtsc()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 4ea1636b04dbd66536fa387bae2eea463efc705b Gitweb: http://git.kernel.org/tip/4ea1636b04dbd66536fa387bae2eea463efc705b Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:07 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:28

[tip:x86/asm] x86/asm/tsc: Replace rdtscll() with native_read_tsc ()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 87be28aaf1458445d5f648688c2eec0f13b8f3b9 Gitweb: http://git.kernel.org/tip/87be28aaf1458445d5f648688c2eec0f13b8f3b9 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:43:58 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:26

[tip:x86/asm] x86/asm/tsc, kvm: Remove vget_cycles()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 881d7bf843d7139c6dfbffdec4903b3354423c49 Gitweb: http://git.kernel.org/tip/881d7bf843d7139c6dfbffdec4903b3354423c49 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:43:56 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:25

[tip:x86/asm] x86/asm/tsc: Inline native_read_tsc() and remove __native_read_tsc()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: c6e5ca35c4685cd920b1d5279dbc9f4483d7dfd4 Gitweb: http://git.kernel.org/tip/c6e5ca35c4685cd920b1d5279dbc9f4483d7dfd4 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:43:55 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:25

[tip:x86/asm] x86/asm/tsc: Remove rdtsc_barrier()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: bb8dd96032fc63babfc8b378a37dd7681eeec326 Gitweb: http://git.kernel.org/tip/bb8dd96032fc63babfc8b378a37dd7681eeec326 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:12 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:30

[tip:x86/asm] x86/asm/tsc, x86/kvm: Drop open-coded barrier and use rdtsc_ordered() in kvmclock

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 502dfeff239e8313bfbe906ca0a1a6827ac8481b Gitweb: http://git.kernel.org/tip/502dfeff239e8313bfbe906ca0a1a6827ac8481b Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:11 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:30

[tip:x86/asm] x86/asm/tsc/sync: Use rdtsc_ordered() in check_tsc_warp() and drop extra barriers

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: eee6946e44510b61c35cf754f5505537c7a8eb77 Gitweb: http://git.kernel.org/tip/eee6946e44510b61c35cf754f5505537c7a8eb77 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:09 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:29

[tip:x86/asm] x86/asm/tsc: Add rdtsc_ordered() and use it in trivial call sites

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 03b9730b769fc4d87e40f6104f4c5b2e43889f19 Gitweb: http://git.kernel.org/tip/03b9730b769fc4d87e40f6104f4c5b2e43889f19 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:08 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:29

[tip:x86/asm] x86/asm/tsc: Remove rdtscl()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: fe47ae6e1a5005b2e82f7eab57b5c3820453293a Gitweb: http://git.kernel.org/tip/fe47ae6e1a5005b2e82f7eab57b5c3820453293a Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:06 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:28

[tip:x86/asm] x86/asm/tsc, input/joystick/analog: Switch from rdtscl() to native_read_tsc()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 016bfc449a88c833e949414a41748b359843dbb1 Gitweb: http://git.kernel.org/tip/016bfc449a88c833e949414a41748b359843dbb1 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:04 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:28

[tip:x86/asm] x86/asm/tsc, drivers/input/gameport: Replace rdtscl () with native_read_tsc()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 732f374ba50b64150bf954c2d4e9f6fae583cccf Gitweb: http://git.kernel.org/tip/732f374ba50b64150bf954c2d4e9f6fae583cccf Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:05 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:28

[tip:x86/asm] x86/asm/tsc, staging/lirc_serial: Remove TSC-based timing

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 3a2c16c8489d967de10b3b7f5cc0f7cab4337770 Gitweb: http://git.kernel.org/tip/3a2c16c8489d967de10b3b7f5cc0f7cab4337770 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:03 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:27

[tip:x86/asm] x86/asm/tsc, x86/cpu/amd: Use the full 64-bit TSC to detect the 2.6.2 bug

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 3796366614598e48edf0561b86f18c230a7debc8 Gitweb: http://git.kernel.org/tip/3796366614598e48edf0561b86f18c230a7debc8 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:01 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:27

[tip:x86/asm] x86/asm/tsc: Use the full 64-bit TSC in delay_tsc()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 9cfa1a0279e22063a727fd204a75cf3672860d83 Gitweb: http://git.kernel.org/tip/9cfa1a0279e22063a727fd204a75cf3672860d83 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:00 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:27

[tip:x86/asm] x86/asm/tsc, x86/paravirt: Remove read_tsc() and read_tscp() paravirt hooks

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: 9261e050b686c9fe229cd9918d997b3caaf20e34 Gitweb: http://git.kernel.org/tip/9261e050b686c9fe229cd9918d997b3caaf20e34 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:43:57 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:26

[tip:x86/asm] x86/asm/tsc, drivers/net/hamradio/baycom_epp: Replace rdtscl() with native_read_tsc()

2015-07-06 Thread tip-bot for Andy Lutomirski
Commit-ID: e18d1f8df176527332761ac29ee3097f8584c478 Gitweb: http://git.kernel.org/tip/e18d1f8df176527332761ac29ee3097f8584c478 Author: Andy Lutomirski l...@kernel.org AuthorDate: Thu, 25 Jun 2015 18:44:02 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 6 Jul 2015 15:23:27

<    1   2   3   4