lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Jul 2013 19:15:39 -0300
From:	Marcelo Tosatti <mtosatti@...hat.com>
To:	Gleb Natapov <gleb@...hat.com>
Cc:	Peter Zijlstra <peterz@...radead.org>, mingo@...hat.com,
	glommer@...allels.com, tglx@...utronix.de, jeremy@...p.org,
	rostedt@...dmis.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] remove sched notifier for cross-cpu migrations

On Thu, Jul 11, 2013 at 11:10:25AM +0300, Gleb Natapov wrote:
> On Wed, Jul 10, 2013 at 10:21:57PM -0300, Marcelo Tosatti wrote:
> > 
> > Linux as a guest on KVM hypervisor, the only user of the pvclock      
> > vsyscall interface, does not require notification on task migration 
> > because:
> > 
> > 1. cpu ID number maps 1:1 to per-CPU pvclock time info.
> > 2. per-CPU pvclock time info is updated if the
> >    underlying CPU changes.
> > 3. that version is increased whenever underlying CPU 
> >    changes.
> > 
> Is this the case with KVM though? IIRC KVM does not updates kvmclock
> on vcpu migration if host has synchronized TSC.

KVM does not update kvmclock on vcpu->pcpu migration if the 
master clock scheme is used, which depends on synchronized TSC.
In that case, it is safe to migrate a thread/vcpu to another cpu without
updating kvmclock area (because all vcpus contain the same value as
system timestamp and different tsc_timestamps, but all (tsc_timestamps)
usable as deltas on any given pcpu.

So the 3 items are necessary in the general case of hypervisor
maintaining distinct kvmclock vcpu areas (copy&pasted the comment from
the code comment).

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ