Skip to content
Snippets Groups Projects
Select Git revision
  • ac4812c5ffbb88dd3280a6dacd39fcb73e077fe4
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

binder.c

Blame
    • Martijn Coenen's avatar
      ac4812c5
      binder: Support multiple /dev instances · ac4812c5
      Martijn Coenen authored
      
      Add a new module parameter 'devices', that can be
      used to specify the names of the binder device
      nodes we want to populate in /dev.
      
      Each device node has its own context manager, and
      is therefore logically separated from all the other
      device nodes.
      
      The config option CONFIG_ANDROID_BINDER_DEVICES can
      be used to set the default value of the parameter.
      
      This approach was favored over using IPC namespaces,
      mostly because we require a single process to be a
      part of multiple binder contexts, which seemed harder
      to achieve with namespaces.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: default avatarMartijn Coenen <maco@google.com>
      [jstultz: minor checkpatch warning fix]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac4812c5
      History
      binder: Support multiple /dev instances
      Martijn Coenen authored
      
      Add a new module parameter 'devices', that can be
      used to specify the names of the binder device
      nodes we want to populate in /dev.
      
      Each device node has its own context manager, and
      is therefore logically separated from all the other
      device nodes.
      
      The config option CONFIG_ANDROID_BINDER_DEVICES can
      be used to set the default value of the parameter.
      
      This approach was favored over using IPC namespaces,
      mostly because we require a single process to be a
      part of multiple binder contexts, which seemed harder
      to achieve with namespaces.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: default avatarMartijn Coenen <maco@google.com>
      [jstultz: minor checkpatch warning fix]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    svm.c 145.35 KiB
    /*
     * Kernel-based Virtual Machine driver for Linux
     *
     * AMD SVM support
     *
     * Copyright (C) 2006 Qumranet, Inc.
     * Copyright 2010 Red Hat, Inc. and/or its affiliates.
     *
     * Authors:
     *   Yaniv Kamay  <yaniv@qumranet.com>
     *   Avi Kivity   <avi@qumranet.com>
     *
     * This work is licensed under the terms of the GNU GPL, version 2.  See
     * the COPYING file in the top-level directory.
     *
     */
    
    #define pr_fmt(fmt) "SVM: " fmt
    
    #include <linux/kvm_host.h>
    
    #include "irq.h"
    #include "mmu.h"
    #include "kvm_cache_regs.h"
    #include "x86.h"
    #include "cpuid.h"
    #include "pmu.h"
    
    #include <linux/module.h>
    #include <linux/mod_devicetable.h>
    #include <linux/kernel.h>
    #include <linux/vmalloc.h>
    #include <linux/highmem.h>
    #include <linux/sched.h>
    #include <linux/trace_events.h>
    #include <linux/slab.h>
    #include <linux/amd-iommu.h>
    #include <linux/hashtable.h>
    #include <linux/frame.h>
    
    #include <asm/apic.h>
    #include <asm/perf_event.h>
    #include <asm/tlbflush.h>
    #include <asm/desc.h>
    #include <asm/debugreg.h>
    #include <asm/kvm_para.h>
    #include <asm/irq_remapping.h>
    
    #include <asm/virtext.h>
    #include "trace.h"
    
    #define __ex(x) __kvm_handle_fault_on_reboot(x)
    
    MODULE_AUTHOR("Qumranet");
    MODULE_LICENSE("GPL");
    
    static const struct x86_cpu_id svm_cpu_id[] = {
    	X86_FEATURE_MATCH(X86_FEATURE_SVM),
    	{}
    };
    MODULE_DEVICE_TABLE(x86cpu, svm_cpu_id);
    
    #define IOPM_ALLOC_ORDER 2
    #define MSRPM_ALLOC_ORDER 1
    
    #define SEG_TYPE_LDT 2
    #define SEG_TYPE_BUSY_TSS16 3
    
    #define SVM_FEATURE_NPT            (1 <<  0)
    #define SVM_FEATURE_LBRV           (1 <<  1)