diff mbox

kvmclock: Define pvclock_pvti_cpu0_va setter for X86_32

Message ID 20180621121325.9326-1-mpagano@gentoo.org (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Pagano June 21, 2018, 12:13 p.m. UTC
From: Mike Pagano <mpagano@gentoo.org>

setup_vsyscall_timeinfo() is only defined for x86_64, thus
clock_set_pvti_cpu0_va() does not get called resulting in
the failure of ptp_kvm initialization for Linux X86_32 guests.
The result of this being that the 32 bit guest userspace has
no /dev/ptp0 device.

See Gentoo bug 658544 located at the following link:
https://bugs.gentoo.org/658544

Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Signed-off-by: Andreas Steinmetz <ast@domdv.de>
---
 arch/x86/kernel/kvmclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

kernel test robot June 21, 2018, 2:58 p.m. UTC | #1
Hi Mike,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on kvm/linux-next]
[also build test WARNING on v4.18-rc1 next-20180621]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/mpagano-gentoo-org/kvmclock-Define-pvclock_pvti_cpu0_va-setter-for-X86_32/20180621-220955
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: i386-randconfig-x014-201824 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   arch/x86/kernel/kvmclock.c: In function 'kvm_setup_vsyscall_timeinfo':
>> arch/x86/kernel/kvmclock.c:353:22: warning: extra tokens at end of #ifdef directive
    #ifdef CONFIG_X86_64 || defined(CONFIG_X86_32)
                         ^~
>> arch/x86/kernel/kvmclock.c:353:22: warning: extra tokens at end of #ifdef directive
    #ifdef CONFIG_X86_64 || defined(CONFIG_X86_32)
                         ^~

vim +353 arch/x86/kernel/kvmclock.c

   350	
   351	int __init kvm_setup_vsyscall_timeinfo(void)
   352	{
 > 353	#ifdef CONFIG_X86_64 || defined(CONFIG_X86_32)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index bf8d1eb7fca3..6aee5c6265b3 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -350,7 +350,7 @@  void __init kvmclock_init(void)
 
 int __init kvm_setup_vsyscall_timeinfo(void)
 {
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_X86_64 || defined(CONFIG_X86_32)
 	int cpu;
 	u8 flags;
 	struct pvclock_vcpu_time_info *vcpu_time;