New issue
Advanced search Search tips

Issue 605395 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

[chromeos-3.18] Kernel build broken when enabled KVM

Reported by gs0...@gmail.com, Apr 21 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.63 Safari/537.36
Platform: All

Steps to reproduce the problem:
This is to clean up aftermath of NMI patchset leading (potential) build break of chromeos-3.18 kernel tree.

The backdrop is in order to fix NMI hard lock issue (chrome-os-partner: 51198), I have to backport the fixes from upstream:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?qt=range&q=db0865543739b3~17..db0865543739b3

So far at least one consequence found it breaks the kernel build when enabling KVM, refer to attached .config.gz

What is the expected behavior?
build pass of sys-kernel/chromeos-kernel-3_18

What went wrong?
Build break

All error/warnings (new ones prefixed by >>):

   In file included from include/trace/define_trace.h:90:0,
                    from arch/x86/kvm/mmutrace.h:333,
                    from arch/x86/kvm/mmu.c:147:
   arch/x86/kvm/./mmutrace.h: In function 'ftrace_raw_output_kvm_mmu_get_page':
>> arch/x86/kvm/./mmutrace.h:25:25: error: 'struct trace_seq' has no member named 'len'
     const u32 saved_len = p->len;     \
                            ^
   include/trace/ftrace.h:291:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
     trace_seq_printf(s, print);     \
                         ^
>> include/trace/ftrace.h:37:9: note: in expansion of macro 'PARAMS'
            PARAMS(print));         \
            ^
>> arch/x86/kvm/./mmutrace.h:147:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(
    ^
>> arch/x86/kvm/./mmutrace.h:162:2: note: in expansion of macro 'TP_printk'
     TP_printk("%s %s", KVM_MMU_PAGE_PRINTK(),
     ^
>> arch/x86/kvm/./mmutrace.h:162:21: note: in expansion of macro 'KVM_MMU_PAGE_PRINTK'
     TP_printk("%s %s", KVM_MMU_PAGE_PRINTK(),
                        ^
   arch/x86/kvm/./mmutrace.h: In function 'ftrace_raw_output_kvm_mmu_page_class':
>> arch/x86/kvm/./mmutrace.h:25:25: error: 'struct trace_seq' has no member named 'len'
     const u32 saved_len = p->len;     \
                            ^
   include/trace/ftrace.h:291:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
     trace_seq_printf(s, print);     \
                         ^
   arch/x86/kvm/./mmutrace.h:179:2: note: in expansion of macro 'TP_printk'
     TP_printk("%s", KVM_MMU_PAGE_PRINTK())
     ^
   arch/x86/kvm/./mmutrace.h:179:18: note: in expansion of macro 'KVM_MMU_PAGE_PRINTK'
     TP_printk("%s", KVM_MMU_PAGE_PRINTK())
                     ^

Did this work before? N/A 

Chrome version: 49.0.2623.63  Channel: n/a
OS Version: chromeos-3.18
Flash Version: Shockwave Flash 21.0 r0
 
.config.gz
20.9 KB Download

Comment 1 Deleted

Comment 2 Deleted

Comment 3 by gs0...@gmail.com, Apr 21 2016

By far two upstream commits are located for tackling this issue:

dbcf3e06cae0 RAS/tracing: Use trace_seq_buffer_ptr() helper instead of open coded
467aa1f276a0 x86/kvm/tracing: Use helper function trace_seq_buffer_ptr()

Comment 4 by gs0...@gmail.com, Apr 21 2016

https://chromium-review.googlesource.com/340047 UPSTREAM: x86/kvm/tracing: Use helper function trace_seq_buffer_ptr()
https://chromium-review.googlesource.com/340048 UPSTREAM: RAS/tracing: Use trace_seq_buffer_ptr() helper instead of open coded

Comment 5 by bleung@chromium.org, Apr 21 2016

Cc: bleung@chromium.org snanda@chromium.org
Labels: Kernel-3.18

Comment 6 by bleung@chromium.org, Apr 21 2016

Owner: bleung@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks Harry!
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 22 2016

Labels: merge-merged-chromeos-3.18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/67ff10248e9b26734a73c73a04cad4c7aadd1bc8

commit 67ff10248e9b26734a73c73a04cad4c7aadd1bc8
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date: Fri Oct 31 23:43:08 2014

UPSTREAM: RAS/tracing: Use trace_seq_buffer_ptr() helper instead of open coded

Use the helper function trace_seq_buffer_ptr() to get the current location
of the next buffer write of a trace_seq object, instead of open coding
it.

This facilitates the conversion of trace_seq to use seq_buf.

BUG= chromium:605395 , chrome-os-partner:51198
TEST=make menuconfig to enable KVM, then build kernel

Tested-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Cc: Chen Gong <gong.chen@linux.intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
(cherry picked from commit dbcf3e06cae0424d85c8dd1a1b93e25e84b06a8d)
Signed-off-by: Harry Pan <harry.pan@intel.com>

Change-Id: I4ad4b703cb5766488b6ba01d12b78203bde182bb
Reviewed-on: https://chromium-review.googlesource.com/340048
Commit-Ready: Harry Pan <harry.pan@intel.com>
Tested-by: Zhuo-hao Lee <zhuo-hao.lee@intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>

[modify] https://crrev.com/67ff10248e9b26734a73c73a04cad4c7aadd1bc8/drivers/firmware/efi/cper.c

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/27a504abf9ff67b279292095d1b9f49de354829a

commit 27a504abf9ff67b279292095d1b9f49de354829a
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date: Wed Sep 24 22:52:39 2014

UPSTREAM: x86/kvm/tracing: Use helper function trace_seq_buffer_ptr()

To allow for the restructiong of the trace_seq code, we need users
of it to use the helper functions instead of accessing the internals
of the trace_seq structure itself.

Link: http://lkml.kernel.org/r/20141104160221.585025609@goodmis.org

BUG= chromium:605395 , chrome-os-partner:51198
TEST=make menuconfig to enable KVM, then build kernel

Tested-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Mark Rustad <mark.d.rustad@intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
(cherry picked from commit 467aa1f276a0cf7445a1f4b9600f03d949b76251)
Signed-off-by: Harry Pan <harry.pan@intel.com>

Change-Id: Ib36afb2464171f0fc64ce6afc1bb5b74c2261a49
Reviewed-on: https://chromium-review.googlesource.com/340047
Commit-Ready: Harry Pan <harry.pan@intel.com>
Tested-by: Zhuo-hao Lee <zhuo-hao.lee@intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>

[modify] https://crrev.com/27a504abf9ff67b279292095d1b9f49de354829a/arch/x86/kvm/mmutrace.h

Comment 9 by bleung@chromium.org, Apr 30 2016

Status: Fixed (was: Assigned)
Thanks Harry.
Bulk verified
Status: Verified (was: Fixed)
bulk verified

Sign in to add a comment