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:   Fri, 20 Jan 2017 13:55:57 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Marcelo Tosatti <mtosatti@...hat.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Radim Krcmar <rkrcmar@...hat.com>,
        Richard Cochran <richardcochran@...il.com>,
        Miroslav Lichvar <mlichvar@...hat.com>
Subject: Re: [patch 3/5] kvmclock: export kvmclock clocksource pointer



On 20/01/2017 13:20, Marcelo Tosatti wrote:
> To be used by KVM PTP driver.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@...hat.com>
> 
> ---
>  arch/x86/include/asm/kvmclock.h |    6 ++++++
>  arch/x86/kernel/kvmclock.c      |    6 ++++++
>  2 files changed, 12 insertions(+)
> 
> Index: kvm-ptpdriver/arch/x86/include/asm/kvmclock.h
> ===================================================================
> --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> +++ kvm-ptpdriver/arch/x86/include/asm/kvmclock.h	2017-01-18 18:20:35.463472189 -0200
> @@ -0,0 +1,6 @@
> +#ifndef _ASM_X86_KVM_CLOCK_H
> +#define _ASM_X86_KVM_CLOCK_H
> +
> +struct clocksource *get_kvmclock_cs(void);
> +
> +#endif /* _ASM_X86_KVM_CLOCK_H */
> Index: kvm-ptpdriver/arch/x86/kernel/kvmclock.c
> ===================================================================
> --- kvm-ptpdriver.orig/arch/x86/kernel/kvmclock.c	2017-01-11 21:22:13.306315984 -0200
> +++ kvm-ptpdriver/arch/x86/kernel/kvmclock.c	2017-01-18 18:20:02.543397125 -0200
> @@ -28,6 +28,7 @@
>  
>  #include <asm/x86_init.h>
>  #include <asm/reboot.h>
> +#include <asm/kvmclock.h>
>  
>  static int kvmclock __ro_after_init = 1;
>  static int msr_kvm_system_time = MSR_KVM_SYSTEM_TIME;
> @@ -182,6 +183,11 @@
>  	.flags = CLOCK_SOURCE_IS_CONTINUOUS,
>  };
>  
> +struct clocksource *get_kvmclock_cs(void)
> +{
> +	return &kvm_clock;

You can export kvm_clock directly (rename it to clocksource_kvmclock if
you prefer).

Paolo

> +}
> +
>  int kvm_register_clock(char *txt)
>  {
>  	int cpu = smp_processor_id();
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ