From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Radim Krcmar <rkrcmar@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Miroslav Lichvar <mlichvar@redhat.com>
Subject: Re: [patch 3/5] kvmclock: export kvmclock clocksource pointer
Date: Fri, 20 Jan 2017 13:55:57 +0100 [thread overview]
Message-ID: <098a3f20-565f-934c-98c7-6be3ff2d5dee@redhat.com> (raw)
In-Reply-To: <20170120122503.656729077@redhat.com>
On 20/01/2017 13:20, Marcelo Tosatti wrote:
> To be used by KVM PTP driver.
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.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();
>
>
next prev parent reply other threads:[~2017-01-20 13:07 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 12:20 [patch 0/5] KVM virtual PTP driver (v3) Marcelo Tosatti
2017-01-20 12:20 ` [patch 1/5] KVM: x86: provide realtime host clock via vsyscall notifiers Marcelo Tosatti
2017-01-20 12:20 ` [patch 2/5] KVM: x86: add KVM_HC_CLOCK_OFFSET hypercall Marcelo Tosatti
2017-01-20 12:20 ` [patch 3/5] kvmclock: export kvmclock clocksource pointer Marcelo Tosatti
2017-01-20 12:55 ` Paolo Bonzini [this message]
2017-01-20 12:20 ` [patch 4/5] PTP: add PTP_SYS_OFFSET emulation via cross timestamps infrastructure Marcelo Tosatti
2017-01-20 12:55 ` Paolo Bonzini
2017-01-20 13:07 ` Marcelo Tosatti
2017-01-20 13:36 ` Paolo Bonzini
2017-01-20 13:52 ` Marcelo Tosatti
2017-01-20 14:02 ` Radim Krcmar
2017-01-20 14:23 ` Paolo Bonzini
2017-01-20 14:31 ` Miroslav Lichvar
2017-01-20 18:30 ` Radim Krcmar
2017-01-20 20:25 ` Richard Cochran
2017-01-23 13:19 ` Marcelo Tosatti
2017-01-23 18:44 ` Richard Cochran
2017-01-23 19:44 ` Paolo Bonzini
2017-01-24 5:43 ` Richard Cochran
2017-01-24 11:23 ` Marcelo Tosatti
2017-01-24 11:35 ` Richard Cochran
2017-01-23 23:06 ` Marcelo Tosatti
2017-01-24 5:32 ` Richard Cochran
2017-01-24 8:15 ` Miroslav Lichvar
2017-01-20 12:20 ` [patch 5/5] PTP: add kvm PTP driver Marcelo Tosatti
2017-01-20 12:58 ` Paolo Bonzini
2017-01-20 13:11 ` Marcelo Tosatti
2017-01-20 14:12 ` Radim Krcmar
2017-01-20 14:20 ` Radim Krcmar
2017-01-20 15:00 ` Marcelo Tosatti
2017-01-20 17:11 ` Paolo Bonzini
2017-01-20 18:08 ` Radim Krcmar
2017-01-20 19:10 ` Marcelo Tosatti
2017-01-21 8:02 ` Paolo Bonzini
2017-01-20 13:10 ` [patch 0/5] KVM virtual PTP driver (v3) Paolo Bonzini
2017-01-20 14:51 [patch 0/5] KVM virtual PTP driver (v4) Marcelo Tosatti
2017-01-20 14:51 ` [patch 3/5] kvmclock: export kvmclock clocksource pointer Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=098a3f20-565f-934c-98c7-6be3ff2d5dee@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlichvar@redhat.com \
--cc=mtosatti@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®