VirtualBox

Changeset 21955 in vbox


Ignore:
Timestamp:
Aug 4, 2009 1:35:06 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50652
Message:

Linux host driver: workaround for the 2.6.31 performance counter framework initializing the LVTPC APIC vector as NMI

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r21949 r21955  
    488488            if ((GET_APIC_DELIVERY_MODE(v) == APIC_MODE_NMI) && !(v & APIC_LVT_MASKED))
    489489            {
     490# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) && defined(CONFIG_PERF_COUNTERS)
     491                /* 2.6.31+: The performance counter framework will initialize the LVTPC
     492                 * vector as NMI. We can't disable the framework but the kernel loader
     493                 * script will do 'echo 2 > /proc/sys/kernel/perf_counter_paranoid'
     494                 * which hopefilly prevents any usage of hardware performance counters
     495                 * and therefore triggering of NMIs. */
     496                printk(KERN_ERR DEVICE_NAME
     497                       ": Warning: 2.6.31+ kernel detected. Most likely the hwardware performance\n"
     498                                DEVICE_NAME
     499                       ": counter framework which can generate NMIs is active. You have to prevent\n"
     500                                DEVICE_NAME
     501                       ": the usage of hardware performance counters by\n"
     502                                DEVICE_NAME
     503                       ":   echo 2 > /proc/sys/kernel/perf_counter_paranoid\n");
     504                /* We can't do more here :-( */
     505                goto no_error;
     506# endif
     507
    490508# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) || defined CONFIG_X86_64
    491509                printk(KERN_ERR DEVICE_NAME
     
    509527# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
    510528    printk(KERN_DEBUG DEVICE_NAME ": Successfully done.\n");
     529no_error:
    511530# endif /* >= 2.6.19 */
    512531#endif /* CONFIG_X86_LOCAL_APIC */
  • trunk/src/VBox/Installer/linux/vboxdrv.sh.in

    r21244 r21955  
    153153        if ! rm -f $DEVICE; then
    154154            failure "Cannot remove $DEVICE"
     155        fi
     156        # HACK: disable the hardware performance counter framework
     157        if [ -e /proc/sys/kernel/perf_counter_paranoid ]; then
     158          echo 2 > /proc/sys/kernel/perf_counter_paranoid
    155159        fi
    156160        if ! modprobe vboxdrv > /dev/null 2>&1; then
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette