I don't remember of the top of my head exactly the reason to enable all those features in the CPUID. I do remember trying not to enable things that gem5 does not support like SSEx, SSSE and AVX. I also remember encountering problems with libc that uses x87 instructions and pxor, so I had to enable MMX and x87.
Alex -----Original Message----- From: gem5-dev [mailto:gem5-dev-boun...@gem5.org] On Behalf Of Gabe Black via gem5-dev Sent: Monday, December 15, 2014 12:35 AM To: gem5 Developer List Subject: Re: [gem5-dev] Kernel panic caused by changeset 10552 I tried reverting this change and it fixes the undefined instruction exceptions I was seeing. It does break KVM in SE mode though, so we probably shouldn't yank it out entirely. We need to find a minimal version of that change which makes KVM in SE work without breaking other things. Gabe On Wed, Dec 10, 2014 at 1:40 AM, Gabe Black <gabebl...@google.com> wrote: > > Yeah, I was going to say something about that. CPUID shouldn't > advertise features that we don't support. For instance, that change > tells CPUID to say we support AVX, but the decoder has no idea what to > do with those instructions and will trigger an exception if one is > executed. I noticed a bunch of undefined instruction exceptions in my > own workload that weren't happening before, and I wonder if that's the cause. > > I'm not sure how that change helps support KVM in SE mode. Perhaps it > should be reverted? Can you explain why it's necessary Alex? If it is, > maybe we can reshape it a bit to avoid these side effects. > > Gabe > > On Wed, Dec 10, 2014 at 12:43 AM, 马久跃 via gem5-dev <gem5-dev@gem5.org> > wrote: > >> Hi everyone, >> >> I found "x86_64-vmlinux-2.6.28.4" panic when apply changeset 10552: >> cpuid, >> x86: Enabling more features in CPUid. (2.6.22.9 works fine) The gem5 >> also report "warn: x86 cpuid: unimplemented function 13", and kernel >> report BUG at arch/x86/kernel/xsave.c:323 as following. >> >> Can anybody check/fix this bug? >> >> Thanks. >> >> -------------------------------- KERNEL OUTPUT >> ---------------------------------- >> MPTABLE: APIC at: 0xFEE00000 >> Processor #0 (Bootup-CPU) >> I/O APIC #1 Version 17 at 0xFEC00000. >> Processors: 1 >> Allocating PCI resources starting at c4000000 (gap: >> c0000000:3fff0000) Built 1 zonelists in Zone order, mobility grouping on. >> Total pages: >> 127500 >> Kernel command line: earlyprintk=ttyS0 console=ttyS0 lpj=7999923 >> root=/dev/hda1 >> Initializing CPU#0 >> FP/SSE not shown under xsave features 0x800500330000000d >> ------------[ cut here ]------------ kernel BUG at >> arch/x86/kernel/xsave.c:323! >> invalid opcode: 0000 [#1] >> last sysfs file: >> CPU 0 >> Modules linked in: >> Pid: 0, comm: swapper Tainted: G W 2.6.28.4 #2 >> RIP: 0010:[<ffffffff80577b45>] [<ffffffff80577b45>] >> xsave_cntxt_init+0x35/0x130 >> RSP: 0018:ffffffff80769f48 EFLAGS: 000000b8 >> RAX: 000000000000003c RBX: 0000000000000000 RCX: ffffffff807cd460 >> RDX: 00000000ffffffff RSI: 0000000000000d5c RDI: ffffffff80702180 >> RBP: 0000000000000000 R08: 00000000ffffffff R09: 00000000000003fd >> R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 >> R13: ffffffffffffffff R14: 0000000000000000 R15: 0000000000000000 >> FS: 0000000000000000(0000) GS:ffffffff807bf020(0000) >> knlGS:0000000000000000 >> CS: 0010 DS: 0018 ES: 0018 CR0: 0000000080050033 >> CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006a0 >> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 >> DR3: 0000000000000000 DR6: 0000000000000000 DR7: 0000000000000000 >> Process swapper (pid: 0, threadinfo ffffffff80768000, task >> ffffffff806f5380) >> Stack: >> 0000000000000000 ffffffff8078f133 ffffffff80795000 ffffffff8078fe72 >> 8000896f59002087 00000000ffffffff 8022ee0000104a50 ffffffff80794000 >> ffffffff80795000 ffffffff8076a98d 0000000000000000 ffffffff80795000 >> Call Trace: >> [<ffffffff8078f133>] fpu_init+0x3e/0x8e [<ffffffff8078fe72>] >> cpu_init+0x222/0x240 [<ffffffff8076a98d>] start_kernel+0x16f/0x2d9 >> [<ffffffff8076a407>] x86_64_start_kernel+0xd9/0xdfCode: 48 c1 e2 20 >> 89 c0 >> 48 >> 8d 34 02 48 89 f0 48 89 35 12 a6 24 00 83 e0 03 48 83 f8 03 74 12 48 >> c7 c7 >> 50 74 67 80 31 c0 e8 9c 30 01 00 <0f> 0b eb fe f6 05 57 b7 1e 00 04 >> 48 c7 >> 05 >> e5 a5 24 00 03 00 00 >> RIP [<ffffffff80577b45>] xsave_cntxt_init+0x35/0x130 RSP >> <ffffffff80769f48> ---[ end trace 4eaa2a86a8e2da22 ]--- Kernel panic >> - not syncing: Attempted to kill the idle task! >> >> >> ---- >> Jiuyue >> >> >> _______________________________________________ >> gem5-dev mailing list >> gem5-dev@gem5.org >> http://m5sim.org/mailman/listinfo/gem5-dev >> > > _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev