Re: The virtuailization patches break Voyager.

2007-04-28 Thread Thomas Gleixner
systems (e.g. by Thomas Gleixner). Probably not with the recent changes though. Last test was 2.6.21-rc7, where I fixed the non-WP thing. The FP-emulator seems to work. Which kind of breakage is new ? tglx ___ Virtualization mailing list

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Mon, 21 Feb 2011, KY Srinivasan wrote: Like most virtualization platforms, Hyper-V also emulates the full PC platform. So, it is possible that the driver of some other emulated devices might register for the IRQ line we might have selected. That is the race this code addresses. For

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Sat, 19 Feb 2011, KY Srinivasan wrote: When grabbing some random irq from the PIC is not an issue, then what's the point of this probing, retry loop and the comments about racing ? What races here? That does not make sense at all. Like most virtualization platforms, Hyper-V also

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Sat, 19 Feb 2011, KY Srinivasan wrote: From: Thomas Gleixner [mailto:t...@linutronix.de] Please do not use probe_irq_on for dynamic irq allocation. Highjacking the lower PIC irqs is really not a good idea. Depending on when this runs, you might grab an irq required by a driver which

Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Tue, 15 Feb 2011, K. Y. Srinivasan wrote: -/* FIXME! We need to do this dynamically for PIC and APIC system */ -#define VMBUS_IRQ0x5 -#define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static int vmbus_irq; /* Main vmbus driver data structure */ struct vmbus_driver_context { @@

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Mon, 21 Feb 2011, KY Srinivasan wrote: There are various ways to solve that proper. - You can provide the interrupt number from ACPI/PCI or whatever your HV provides as enumeration. - Use a fixed vector like XEN does for the event channel - Use dynamic

Re: [PATCH 2/4] staging: hv: Fix the code depending on struct netvsc_driver_context data order

2011-02-23 Thread Thomas Gleixner
On Wed, 23 Feb 2011, Haiyang Zhang wrote: @@ -137,8 +135,8 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) struct net_device_context *net_device_ctx = netdev_priv(net); struct driver_context *driver_ctx =

Re: [PATCH 12/21] Staging: hv: Cleanup irq management

2011-03-10 Thread Thomas Gleixner
On Thu, 10 Mar 2011, K. Y. Srinivasan wrote: Now that vmbus_driver is a platform pci driver, cleanup the irq allocation mess by using the standard irq allocation mechanisms. Note that this patch generates an error when the checkpatch script is run because of the IRQF_SAMPLE_RANDOM flag used

Re: [PATCH 13/21] [PATCH 13/21] Staging: hv: Rename vmbus_driver_context structure

2011-03-10 Thread Thomas Gleixner
On Thu, 10 Mar 2011, K. Y. Srinivasan wrote: Now that struct vmbus_driver_context is properly cleaned up, rename this structure appropriately and cleanup the code. @@ -877,10 +873,10 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) /* Schedules a dpc if necessary */ if

RE: vmbus driver

2011-05-23 Thread Thomas Gleixner
On Mon, 23 May 2011, KY Srinivasan wrote: I am working on getting Hyper-V drivers (drivers/staging/hv/*) out of staging. I would like to request you to look at the Hyper-V timesource driver: drivers/staging/hv/hv_timesource.c. The supporting code for this driver is already part of the base

Re: [PATCH 1/1] Staging: hv: Integrate the time source driver with Hyper-V detection code

2011-09-02 Thread Thomas Gleixner
driver. Andrew, could you take this patch for the -mm tree. I have sent this patch out multiple times and I have not recived any response or comments. Signed-off-by: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Acked-by: Thomas Gleixner t

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-03-30 Thread Thomas Gleixner
On Fri, 30 Mar 2012, H. Peter Anvin wrote: What is the current status of this patchset? I haven't looked at it too closely because I have been focused on 3.4 up until now... The real question is whether these heuristics are the correct approach or not. If I look at it from the non

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-03-30 Thread Thomas Gleixner
On Sat, 31 Mar 2012, Andi Kleen wrote: So if a guest exits due to an external event it's easy to inspect the state of that guest and avoid to schedule away when it was interrupted in a spinlock held section. That guest/host shared state needs to be On a large system under high contention

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-04-02 Thread Thomas Gleixner
On Sun, 1 Apr 2012, Avi Kivity wrote: On 03/31/2012 01:07 AM, Thomas Gleixner wrote: On Fri, 30 Mar 2012, H. Peter Anvin wrote: What is the current status of this patchset? I haven't looked at it too closely because I have been focused on 3.4 up until now... The real question

Re: [PATCH RFC V8 0/17] Paravirtualized ticket spinlocks

2012-05-07 Thread Thomas Gleixner
On Mon, 7 May 2012, Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: PS: Nikunj had experimented that pv-flush tlb + paravirt-spinlock is a win on PLE where only one of them alone could not prove the benefit. I'd like to see those numbers, then. Ingo, please hold on

Re: [Xen-devel] [PATCH 05/27] xen, cpu hotplug: Don't call cpu_bringup() in xen_play_dead()

2012-06-05 Thread Thomas Gleixner
On Sat, 2 Jun 2012, Srivatsa S. Bhat wrote: Ok.. So, I would love to hear a confirmation about whether this patch (which removes cpu_bringup() in xen_play_dead()) will break things or it is good as is. If its not correct, then we can probably make __cpu_post_online() return an int, with

Re: [PATCH] x86: make IDT read-only

2013-04-09 Thread Thomas Gleixner
On Mon, 8 Apr 2013, H. Peter Anvin wrote: On 04/08/2013 03:43 PM, Kees Cook wrote: This makes the IDT unconditionally read-only. This primarily removes the IDT from being a target for arbitrary memory write attacks. It has an added benefit of also not leaking (via the sidt instruction) the

Re: [RFC] Implement Batched (group) ticket lock

2014-05-28 Thread Thomas Gleixner
On Wed, 28 May 2014, Linus Torvalds wrote: If somebody has a P4 still, that's likely the worst case by far. I do, but I'm only using it during winter and only if the ia64 machine does not provide sufficient heating. So you have to wait at least half a year until I'm able to test it.

Re: [PATCH v13 10/11] pvqspinlock, x86: Enable PV qspinlock for KVM

2014-12-02 Thread Thomas Gleixner
On Wed, 29 Oct 2014, Waiman Long wrote: AIM7 XFS Disk Test (no overcommit) kernel JPMReal Time Sys TimeUsr Time - ---- PV ticketlock 25423737.08 98.95 5.44 PV

Re: [PATCH 0/6] x86: reduce paravirtualized spinlock overhead

2015-06-16 Thread Thomas Gleixner
On Tue, 16 Jun 2015, Juergen Gross wrote: AFAIK there are no outstanding questions for more than one month now. I'd appreciate some feedback or accepting these patches. They are against dead code, which will be gone soon. We switched over to queued locks. Thanks, tglx

Re: [PATCH v3 27/41] x86: define __smp_xxx

2016-01-12 Thread Thomas Gleixner
; > Acked-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Thomas Gleixner <t...@linutronix.de> ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v3 13/41] x86: reuse asm-generic/barrier.h

2016-01-12 Thread Thomas Gleixner
in preparation to refactoring this code area. > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > Acked-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Thomas Gleixner <t...@linutronix.de> ___ Virtualization mailing list Virtu

Re: [PATCH RFC 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-08 Thread Thomas Gleixner
On Wed, 8 Feb 2017, Andy Lutomirski wrote: > > +#ifdef CONFIG_HYPERV_CLOCK > > +/* (a * b) >> 64 implementation */ > > +static inline u64 mul64x64_hi(u64 a, u64 b) > > +{ > > + u64 a_lo, a_hi, b_lo, b_hi, p1, p2; > > + > > + a_lo = (u32)a; > > + a_hi = a >> 32; > > + b_lo =

Re: [PATCH v2 0/3] x86/vdso: Add Hyper-V TSC page clocksource support

2017-02-17 Thread Thomas Gleixner
On Fri, 17 Feb 2017, Andy Lutomirski wrote: > On Fri, Feb 17, 2017 at 2:14 AM, Vitaly Kuznetsov wrote: > > Not only. As far as I understand (and I *think* K. Y. pointed this out) > > when VM is migrating to another host TSC page clocksource is disabled for > > extended period

Re: [PATCH v2 0/3] x86/vdso: Add Hyper-V TSC page clocksource support

2017-02-14 Thread Thomas Gleixner
On Tue, 14 Feb 2017, Vitaly Kuznetsov wrote: > Hi, > > while we're still waiting for a definitive ACK from Microsoft that the > algorithm is good for SMP case (as we can't prevent the code in vdso from > migrating between CPUs) I'd like to send v2 with some modifications to keep > the discussion

RE: [PATCH 1/2] hyperv: implement hv_get_tsc_page()

2017-02-09 Thread Thomas Gleixner
On Thu, 9 Feb 2017, Stephen Hemminger wrote: > The actual code looks fine, but the style police will not like you. > { should be at start of line on functions. > And #else should be at start of line, > > But maybe this was just more of exchange mangling the mail. Looks like. > +struct

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-10 Thread Thomas Gleixner
On Fri, 10 Feb 2017, Stephen Hemminger wrote: > Since sequence count algorithm is done by hypervisor, better to not reuse > seqcount. > Still concerned that the code is racy. That's a different question and can only be answered by the hypervisor folks. Dunno, whether they have barrier

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-13 Thread Thomas Gleixner
On Mon, 13 Feb 2017, Dexuan Cui wrote: > > From: Thomas Gleixner [mailto:t...@linutronix.de] > > Sent: Saturday, February 11, 2017 02:02 > > ... > > That's important if the stuff happens cross CPU. If the update happens on > > the same CPU then this is a different

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-13 Thread Thomas Gleixner
On Mon, 13 Feb 2017, Andy Lutomirski wrote: > On Sun, Feb 12, 2017 at 11:49 PM, Dexuan Cui <de...@microsoft.com> wrote: > >> From: Thomas Gleixner [mailto:t...@linutronix.de] > >> Sent: Saturday, February 11, 2017 02:02 > >> ... > >> That's important

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-10 Thread Thomas Gleixner
On Fri, 10 Feb 2017, Vitaly Kuznetsov wrote: > Thomas Gleixner <t...@linutronix.de> writes: > > > On Thu, 9 Feb 2017, Vitaly Kuznetsov wrote: > >> +#ifdef CONFIG_HYPERV_TSCPAGE > >> +static notrace u64 vread_hvclock(int *mode) > >> +{ &g

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-10 Thread Thomas Gleixner
On Fri, 10 Feb 2017, Vitaly Kuznetsov wrote: > Stephen Hemminger writes: > > > Why not use existing seqlock's? > > > > To be honest I don't quite understand how we could use it -- the > sequence locking here is done against the page updated by the > hypersior, we're not

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Thomas Gleixner
On Thu, 9 Feb 2017, Vitaly Kuznetsov wrote: > +#ifdef CONFIG_HYPERV_TSCPAGE > +static notrace u64 vread_hvclock(int *mode) > +{ > + const struct ms_hyperv_tsc_page *tsc_pg = > + (const struct ms_hyperv_tsc_page *)_page; > + u64 sequence, scale, offset, current_tick, cur_tsc; >

Re: [PATCH v2 0/3] x86/vdso: Add Hyper-V TSC page clocksource support

2017-02-16 Thread Thomas Gleixner
On Wed, 15 Feb 2017, Vitaly Kuznetsov wrote: > Actually, we already have an implementation of TSC page update in KVM > (see arch/x86/kvm/hyperv.c, kvm_hv_setup_tsc_page()) and the update does > the following: > > 0) stash seq into seq_prev > 1) seq = 0 making all reads from the page invalid > 2)

Re: [PATCH v2 0/3] x86/vdso: Add Hyper-V TSC page clocksource support

2017-02-17 Thread Thomas Gleixner
On Fri, 17 Feb 2017, Vitaly Kuznetsov wrote: > Thomas Gleixner <t...@linutronix.de> writes: > > On Wed, 15 Feb 2017, Vitaly Kuznetsov wrote: > >> Actually, we already have an implementation of TSC page update in KVM > >> (see arch/x86/kvm/hyperv.c, kvm_hv_setu

Re: [PATCH] x86/vmware: Skip lapic calibration on VMware.

2016-09-30 Thread Thomas Gleixner
On Thu, 29 Sep 2016, Renat Valiullin wrote: > In virtualized environment the APIC timer calibration could go wrong > when the host is overcommitted or the guest is running nested, > this would result in the APIC timers operating at an incorrect frequency. > Since VMware supports a mechanism to

Re: [RESEND PATCH 3/3] x86/vmware: Add paravirt sched clock

2016-10-27 Thread Thomas Gleixner
On Thu, 27 Oct 2016, Alexey Makhalov wrote: > Set pv_time_ops.sched_clock to vmware_sched_clock(). Please do not describe WHAT the patch does, describe why. Describe the problem you are solving. I can see from the patch > + pv_time_ops.sched_clock = vmware_sched_clock; that you

Re: [RESEND PATCH 1/3] x86/vmware: Use tsc_khz value for calibrate_cpu()

2016-10-27 Thread Thomas Gleixner
On Thu, 27 Oct 2016, Alexey Makhalov wrote: > [RESEND PATCH 1/3] x86/vmware: Use tsc_khz value for calibrate_cpu() Please don't do that. RESEND is a keyword, when the same patch (series) is sent again without any modification vs. the first patch (series). A possible reason to do so is when a

Re: [PATCH 3/3] x86/vmware: Add paravirt sched clock

2016-10-26 Thread Thomas Gleixner
On Tue, 25 Oct 2016, Alexey Makhalov wrote: > no-vmw-sched-clock kernel parameter is added to switch back to the > native_sched_clock() implementation. You are not switching back. The parameter is used to disable the paravirt sched clock. > #ifdef CONFIG_PARAVIRT > +static struct cyc2ns_data

Re: [PATCH 2/3] x86/vmware: Add basic paravirt ops support

2016-10-26 Thread Thomas Gleixner
On Wed, 26 Oct 2016, Tim Mann wrote: > I believe our trademark guidelines say we aren't supposed to use VMware as a > noun to mean a product, only to mean the company. So we can say "running on > VMware ESXi" or "running in a VMware virtual machine", but "running on VMware" > is wrong. There is

Re: [PATCH v3 2/3] x86/hyperv: move TSC reading method to asm/mshyperv.h

2017-03-04 Thread Thomas Gleixner
On Fri, 3 Mar 2017, Stephen Hemminger wrote: > static inline u64 hv_read_tsc_page(const struct ms_hyperv_tsc_page *tsc_pg) > { > u64 scale, offset, cur_tsc; > u32 start; > > /* >* The protocol for reading Hyper-V TSC page is specified in Hypervisor >* Top-Level

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-15 Thread Thomas Gleixner
On Wed, 15 Nov 2017, Peter Zijlstra wrote: > On Mon, Nov 13, 2017 at 06:06:02PM +0800, Quan Xu wrote: > > From: Yang Zhang > > > > Implement a generic idle poll which resembles the functionality > > found in arch/. Provide weak arch_cpu_idle_poll function which > > can

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-17 Thread Thomas Gleixner
On Fri, 17 Nov 2017, Quan Xu wrote: > On 2017-11-16 17:53, Thomas Gleixner wrote: > > That's just plain wrong. We don't want to see any of this PARAVIRT crap in > > anything outside the architecture/hypervisor interfacing code which really > > needs it. > > > > T

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-16 Thread Thomas Gleixner
On Thu, 16 Nov 2017, Peter Zijlstra wrote: > On Wed, Nov 15, 2017 at 11:03:08PM +0100, Thomas Gleixner wrote: > > If I understand the problem correctly then he wants to avoid the heavy > > lifting in tick_nohz_idle_enter() in the first place, but there is already > >

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-16 Thread Thomas Gleixner
On Thu, 16 Nov 2017, Quan Xu wrote: > On 2017-11-16 16:45, Peter Zijlstra wrote: > > I really have considered this factor, and try my best not to interfere with > scheduler/idle code. > > if irq_timings code is ready, I can use it directly. I think irq_timings > is not an easy task, I'd like to

Re: [PATCH RFC v3 3/6] sched/idle: Add a generic poll before enter real idle path

2017-11-16 Thread Thomas Gleixner
On Thu, 16 Nov 2017, Quan Xu wrote: > On 2017-11-16 06:03, Thomas Gleixner wrote: > --- a/drivers/cpuidle/cpuidle.c > +++ b/drivers/cpuidle/cpuidle.c > @@ -210,6 +210,13 @@ int cpuidle_enter_state(struct cpuidle_device *dev, > struct cpuidle_driver *drv, >     targ

Re: [PATCH RESEND] x86-64: use RIP-relative calls for paravirt indirect ones

2018-08-20 Thread Thomas Gleixner
viewed-by: Juergen Gross Reviewed-by: Thomas Gleixner ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v2 03/11] x86/paravirt: remove clobbers from struct paravirt_patch_site

2018-08-24 Thread Thomas Gleixner
rgen Gross Reviewed-by: Thomas Gleixner ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v2 02/11] x86/paravirt: remove clobbers parameter from paravirt patch functions

2018-08-24 Thread Thomas Gleixner
On Mon, 13 Aug 2018, Juergen Gross wrote: > The clobbers parameter from paravirt_patch_default() et al isn't used > any longer. Remove it. > > Signed-off-by: Juergen Gross Reviewed-by: Thomas Gleixner ___ Virtualization mailing list Vi

Re: [PATCH v5 0/7] jailhouse: Enhance secondary Jailhouse guest support /wrt PCI

2018-03-19 Thread Thomas Gleixner
Bjorn, On Mon, 19 Mar 2018, Bjorn Helgaas wrote: > On Wed, Mar 07, 2018 at 08:39:11AM +0100, Jan Kiszka wrote: > > Basic x86 support [1] for running Linux as secondary Jailhouse [2] guest > > is currently pending in the tip tree. This builds on top and enhances > > the PCI support for x86 and

Re: [PATCH v2 2/6] PCI: Scan all functions when running over Jailhouse

2018-02-28 Thread Thomas Gleixner
On Wed, 28 Feb 2018, Jan Kiszka wrote: > From: Jan Kiszka > > Per PCIe r4.0, sec 7.5.1.1.9, multi-function devices are required to > have a function 0. Therefore, Linux scans for devices at function 0 > (devfn 0/8/16/...) and only scans for other functions if function 0

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-27 Thread Thomas Gleixner
On Wed, 19 Sep 2018, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Andy Lutomirski wrote: > > > On Sep 18, 2018, at 3:46 PM, Thomas Gleixner wrote: > > > On Tue, 18 Sep 2018, Andy Lutomirski wrote: > > >> Do we do better if we use signed arithmetic for the whole

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-27 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Thomas Gleixner wrote: > > So if the TSC on CPU1 is slightly behind the TSC on CPU0 then now1 can be > > smaller than cycle_last. The TSC sync stuff does not catch the small delta > > for unknown rais

Re: [PATCH 0/2] i8253: Fix PIT shutdown quirk on Hyper-V

2018-11-03 Thread Thomas Gleixner
ed patch with a different > > approach. This new approach follows comments from Thomas Gleixner. > > Did you consider using a static_key instead? You could set it in > ms_hyperv_init_platform(). This would enable you to support future > Hyper-V versions which don't require avoiding

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Thomas Gleixner
On Wed, 3 Oct 2018, Andy Lutomirski wrote: > > On Oct 3, 2018, at 5:01 AM, Vitaly Kuznetsov wrote: > > Not all Hyper-V hosts support reenlightenment notifications (and, if I'm > > not mistaken, you need to enable nesting for the VM to get the feature - > > and most VMs don't have this) so I think

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-19 Thread Thomas Gleixner
On Wed, 19 Sep 2018, Rasmus Villemoes wrote: > On 2018-09-19 00:46, Thomas Gleixner wrote: > > On Tue, 18 Sep 2018, Andy Lutomirski wrote: > >>> > >> > >> Do we do better if we use signed arithmetic for the whole calculation? > >> Then a small back

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Andy Lutomirski wrote: > > On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: > > > > With the storage array in place it's now trivial to support CLOCK_TAI in > > the vdso. Instead of extending the array to accomodate CLOCK_TAI,

Re: [patch 02/11] x86/time: Implement clocksource_arch_init()

2018-09-15 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Vitaly Kuznetsov wrote: > Thomas Gleixner writes: > > + > > + if (cs->archdata.vclock_mode >= VCLOCK_MAX) { > > It should be '>' as VCLOCK_MAX == VCLOCK_HVCLOCK == 3 Indeed. Thanks, tglx _

Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-16 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Andy Lutomirski wrote: > > On Sep 14, 2018, at 7:27 AM, Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Andy Lutomirski wrote: > >> That’s... horrible. In an amazing way. Can you add BUILD_BUG_ON somewhere > >> to assert that this actually work

[patch 01/11] clocksource: Provide clocksource_arch_init()

2018-09-14 Thread Thomas Gleixner
Architectures have extra archdata in the clocksource, e.g. for VDSO support. There are no sanity checks or general initializations for this available. Add support for that. Signed-off-by: Thomas Gleixner --- include/linux/clocksource.h |5 + kernel/time/Kconfig |4

[patch 02/11] x86/time: Implement clocksource_arch_init()

2018-09-14 Thread Thomas Gleixner
Runtime validate the VCLOCK_MODE in clocksource::archdata and disable VCLOCK if invalid, which disables the VDSO but keeps the system running. Signed-off-by: Thomas Gleixner --- arch/x86/Kconfig |1 + arch/x86/kernel/time.c | 16 2 files changed, 17 insertions

[patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() implementation, which extended the clockid switch case and added yet another slightly different copy of the same code. Especially the extended switch case is problematic as the compiler tends to generate a jump table which then

[patch 03/11] x86/vdso: Enforce 64bit clocksource

2018-09-14 Thread Thomas Gleixner
All VDSO clock sources are TSC based and use CLOCKSOURCE_MASK(64). There is no point in masking with all FF. Get rid of it and enforce the mask in the sanity checker. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |2 +- arch/x86/kernel/time.c |6

[patch 04/11] x86/vdso: Use unsigned int consistently for vsyscall_gtod_data::seq

2018-09-14 Thread Thomas Gleixner
The sequence count in vgtod_data is unsigned int, but the call sites use unsigned long, which is a pointless exercise. Fix the call sites and replace 'unsigned' with unsinged 'int' while at it. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |8 arch/x86

[patch 07/11] x86/vdso: Collapse coarse functions

2018-09-14 Thread Thomas Gleixner
do_realtime_coarse() and do_monotonic_coarse() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 20 1 file changed, 4 insertions

[patch 06/11] x86/vdso: Collapse high resolution functions

2018-09-14 Thread Thomas Gleixner
do_realtime() and do_monotonic() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 35 +++ 1 file changed, 7 insertions

[patch 05/11] x86/vdso: Introduce and use vgtod_ts

2018-09-14 Thread Thomas Gleixner
over to use it. The new storage does not longer use gtod_long_t for seconds depending on 32 or 64 bit compile because this needs to be the full 64bit value even for 32bit when a Y2038 function is added. No point in keeping the distinction alive in the internal representation. Signed-off-by: Thomas

[patch 08/11] x86/vdso: Replace the clockid switch case

2018-09-14 Thread Thomas Gleixner
nsible for other clock ids. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 38 --- 1 file changed, 18 insertions(+), 20 deletions(-) --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -239,29 +239,27 @@ n

[patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-14 Thread Thomas Gleixner
and gains a few cycles back. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 81 +-- 1 file changed, 21 insertions(+), 60 deletions(-) --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -48,16 +48,6

[patch 10/11] x86/vdso: Move cycle_last handling into the caller

2018-09-14 Thread Thomas Gleixner
s well, but I have no way to test that. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 39 ++- 1 file changed, 7 insertions(+), 32 deletions(-) --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -76,9

[patch 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
- CLOCK_TAI is id 11 which results in 3 when masked with 0x3 Add the mask to the basetime array lookup and set up the CLOCK_TAI base time in update_vsyscall(). The performance impact of the mask operation is within the noise. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Florian Weimer wrote: > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > implementation, which extended the clockid switch case and added yet > > another slightly different

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Florian Weimer wrote: > On 09/14/2018 03:05 PM, Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Florian Weimer wrote: > > > > > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > > > Matt attempted to add CLOCK_TAI support to the VDSO cl

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Peter Zijlstra wrote: > On Tue, Sep 18, 2018 at 09:52:26AM +0200, Thomas Gleixner wrote: > > On Mon, 17 Sep 2018, John Stultz wrote: > > > On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > > > > Also, I'm not entirely convinced th

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Peter Zijlstra wrote: > > > Your memory serves you right. That's indeed observable on CPUs which > > > lack TSC_ADJUST. > > > > But, if the gtod code can observe this, then why doesn't

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Mon, 17 Sep 2018, John Stultz wrote: > On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > > Also, I'm not entirely convinced that this "last" thing is needed at > > all. John, what's the scenario under which we need it? > > So my memory is probably a bit foggy, but I recall that as

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Thomas Gleixner wrote: > So if the TSC on CPU1 is slightly behind the TSC on CPU0 then now1 can be > smaller than cycle_last. The TSC sync stuff does not catch the small delta > for unknown raisins. I'll go and find that machine and test that again. Of cours

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Andy Lutomirski wrote: > > On Sep 18, 2018, at 3:46 PM, Thomas Gleixner wrote: > > On Tue, 18 Sep 2018, Andy Lutomirski wrote: > >> Do we do better if we use signed arithmetic for the whole calculation? > >> Then a small backwards movement wou

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Andy Lutomirski wrote: > > On Sep 18, 2018, at 12:52 AM, Thomas Gleixner wrote: > > > >> On Mon, 17 Sep 2018, John Stultz wrote: > >>> On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > >>> Also, I'm not entire

[patch V2 03/11] x86/vdso: Enforce 64bit clocksource

2018-09-17 Thread Thomas Gleixner
All VDSO clock sources are TSC based and use CLOCKSOURCE_MASK(64). There is no point in masking with all FF. Get rid of it and enforce the mask in the sanity checker. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |2 +- arch/x86/kernel/time.c |6

[patch V2 02/11] x86/time: Implement clocksource_arch_init()

2018-09-17 Thread Thomas Gleixner
Runtime validate the VCLOCK_MODE in clocksource::archdata and disable VCLOCK if invalid, which disables the VDSO but keeps the system running. Signed-off-by: Thomas Gleixner --- V2: Fix the VCLOCK_MAX check arch/x86/Kconfig |1 + arch/x86/kernel/time.c | 16 2

[patch V2 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-17 Thread Thomas Gleixner
Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() implementation, which extended the clockid switch case and added yet another slightly different copy of the same code. Especially the extended switch case is problematic as the compiler tends to generate a jump table which then

[patch V2 04/11] x86/vdso: Use unsigned int consistently for vsyscall_gtod_data::seq

2018-09-17 Thread Thomas Gleixner
The sequence count in vgtod_data is unsigned int, but the call sites use unsigned long, which is a pointless exercise. Fix the call sites and replace 'unsigned' with unsinged 'int' while at it. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c |8 arch/x86

[patch V2 05/11] x86/vdso: Introduce and use vgtod_ts

2018-09-17 Thread Thomas Gleixner
over to use it. The new storage does not longer use gtod_long_t for seconds depending on 32 or 64 bit compile because this needs to be the full 64bit value even for 32bit when a Y2038 function is added. No point in keeping the distinction alive in the internal representation. Signed-off-by: Thomas

[patch V2 06/11] x86/vdso: Collapse high resolution functions

2018-09-17 Thread Thomas Gleixner
do_realtime() and do_monotonic() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 35 +++ 1 file changed, 7 insertions

[patch V2 08/11] x86/vdso: Replace the clockid switch case

2018-09-17 Thread Thomas Gleixner
nsible for other clock ids. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 38 --- 1 file changed, 18 insertions(+), 20 deletions(-) --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -239,29 +239,27 @@ n

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-17 Thread Thomas Gleixner
On Fri, 14 Sep 2018, Arnd Bergmann wrote: > On Fri, Sep 14, 2018 at 2:52 PM Thomas Gleixner wrote: > A couple of architectures (s390, ia64, riscv, powerpc, arm64) > implement the vdso as assembler code at the moment, so they > won't be as easy to consolidate (other than outright r

[patch V2 01/11] clocksource: Provide clocksource_arch_init()

2018-09-17 Thread Thomas Gleixner
Architectures have extra archdata in the clocksource, e.g. for VDSO support. There are no sanity checks or general initializations for this available. Add support for that. Signed-off-by: Thomas Gleixner --- include/linux/clocksource.h |5 + kernel/time/Kconfig |4

[patch V2 07/11] x86/vdso: Collapse coarse functions

2018-09-17 Thread Thomas Gleixner
do_realtime_coarse() and do_monotonic_coarse() are now the same except for the storage array index. Hand the index in as an argument and collapse the functions. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 20 1 file changed, 4 insertions

[patch V2 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-17 Thread Thomas Gleixner
and gains a few cycles back. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 81 +-- 1 file changed, 21 insertions(+), 60 deletions(-) --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -48,16 +48,6

[patch V2 10/11] x86/vdso: Move cycle_last handling into the caller

2018-09-17 Thread Thomas Gleixner
s well, but I have no way to test that. Signed-off-by: Thomas Gleixner --- arch/x86/entry/vdso/vclock_gettime.c | 39 ++- 1 file changed, 7 insertions(+), 32 deletions(-) --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -76,9

[patch V2 11/11] x66/vdso: Add CLOCK_TAI support

2018-09-17 Thread Thomas Gleixner
With the storage array in place it's now trivial to support CLOCK_TAI in the vdso. Extend the base time storage array and add the update code. Signed-off-by: Thomas Gleixner --- V2: Remove the masking trick arch/x86/entry/vsyscall/vsyscall_gtod.c |4 arch/x86/include/asm/vgtod.h

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Thomas Gleixner wrote: > > On Tue, 18 Sep 2018, Peter Zijlstra wrote: > > > > Your memory serves you right. That's indeed observable on CPUs which > > > > lack TSC_ADJUST. > > >

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Peter Zijlstra wrote: > On Tue, Sep 18, 2018 at 12:41:57PM +0200, Thomas Gleixner wrote: > > I still have one of the machines which is affected by this. > > Are we sure this isn't a load vs rdtsc reorder? Because if I look at the > current code: The loa

Re: [PATCH] x86/ioperm: add new paravirt function update_io_bitmap

2020-02-28 Thread Thomas Gleixner
Jürgen Groß writes: > Friendly ping... Ooops. I pick it up first thing tomorrow morning ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] x86/ioperm: add new paravirt function update_io_bitmap

2020-02-18 Thread Thomas Gleixner
Juergen Gross writes: > Commit 111e7b15cf10f6 ("x86/ioperm: Extend IOPL config to control > ioperm() as well") reworked the iopl syscall to use I/O bitmaps. > > Unfortunately this broke Xen PV domains using that syscall as there > is currently no I/O bitmap support in PV domains. > > Add I/O

Re: [PATCH] x86/ioperm: add new paravirt function update_io_bitmap

2020-02-19 Thread Thomas Gleixner
Jürgen Groß writes: > On 18.02.20 22:03, Thomas Gleixner wrote: >> BTW, why isn't stuff like this not catched during next or at least >> before the final release? Is nothing running CI on upstream with all >> that XEN muck active? > > This problem showed up by not being

Re: [PATCH 0/5] x86/vmware: Steal time accounting support

2020-03-12 Thread Thomas Gleixner
e for vmw_sched_clock Reviewed-by: Thomas Gleixner ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [RFC PATCH 00/26] Runtime paravirt patching

2020-04-08 Thread Thomas Gleixner
Ankur Arora writes: > A KVM host (or another hypervisor) might advertise paravirtualized > features and optimization hints (ex KVM_HINTS_REALTIME) which might > become stale over the lifetime of the guest. For instance, the > host might go from being undersubscribed to being oversubscribed > (or

Re: [PATCH v2 05/12] x86: rework arch_local_irq_restore() to not use popf

2020-12-09 Thread Thomas Gleixner
On Wed, Dec 09 2020 at 18:15, Mark Rutland wrote: > In arch/x86/kernel/apic/io_apic.c's timer_irq_works() we do: > > local_irq_save(flags); > local_irq_enable(); > > [ trigger an IRQ here ] > > local_irq_restore(flags); > > ... and in check_timer() we call that a number of

Re: [PATCH v2 03/12] x86/pv: switch SWAPGS to ALTERNATIVE

2020-12-09 Thread Thomas Gleixner
> Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  1   2   >