#include <linux/compiler.h>
#include <linux/kvm_host.h>
#include <asm/debug-monitors.h>
#include <asm/kvm_asm.h>
#include <asm/kvm_hyp.h>
#include <asm/kvm_mmu.h>
Go to the source code of this file.
◆ read_debug
      
        
          | #define read_debug | 
          ( | 
            | 
          r,  | 
        
        
           | 
           | 
            | 
          n  | 
        
        
           | 
          ) | 
           |    read_sysreg(r##n##_el1) | 
        
      
 
 
◆ restore_debug
      
        
          | #define restore_debug | 
          ( | 
            | 
          ptr,  | 
        
        
           | 
           | 
            | 
          reg,  | 
        
        
           | 
           | 
            | 
          nr  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ save_debug
      
        
          | #define save_debug | 
          ( | 
            | 
          ptr,  | 
        
        
           | 
           | 
            | 
          reg,  | 
        
        
           | 
           | 
            | 
          nr  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ write_debug
      
        
          | #define write_debug | 
          ( | 
            | 
          v,  | 
        
        
           | 
           | 
            | 
          r,  | 
        
        
           | 
           | 
            | 
          n  | 
        
        
           | 
          ) | 
           |    write_sysreg(v, r##n##_el1) | 
        
      
 
 
◆ __debug_restore_state()
  
  
      
        
          | static void __debug_restore_state  | 
          ( | 
          struct kvm_guest_debug_arch *  | 
          dbg,  | 
         
        
           | 
           | 
          struct kvm_cpu_context *  | 
          ctxt  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Definition at line 109 of file debug-sr.h.
  115     aa64dfr0 = read_sysreg(id_aa64dfr0_el1);
 
  117     brps = (aa64dfr0 >> 12) & 0xf;
 
  118     wrps = (aa64dfr0 >> 20) & 0xf;
 
  125     write_sysreg(ctxt_sys_reg(ctxt, MDCCINT_EL1), mdccint_el1);
 
#define restore_debug(ptr, reg, nr)
 
 
 
 
◆ __debug_save_state()
  
  
      
        
          | static void __debug_save_state  | 
          ( | 
          struct kvm_guest_debug_arch *  | 
          dbg,  | 
         
        
           | 
           | 
          struct kvm_cpu_context *  | 
          ctxt  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Definition at line 91 of file debug-sr.h.
   97     aa64dfr0 = read_sysreg(id_aa64dfr0_el1);
 
   98     brps = (aa64dfr0 >> 12) & 0xf;
 
   99     wrps = (aa64dfr0 >> 20) & 0xf;
 
  106     ctxt_sys_reg(ctxt, MDCCINT_EL1) = read_sysreg(mdccint_el1);
 
#define save_debug(ptr, reg, nr)
 
 
 
 
◆ __debug_switch_to_guest_common()
  
  
      
        
          | static void __debug_switch_to_guest_common  | 
          ( | 
          struct kvm_vcpu *  | 
          vcpu | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 128 of file debug-sr.h.
  130     struct kvm_cpu_context *host_ctxt;
 
  131     struct kvm_cpu_context *guest_ctxt;
 
  132     struct kvm_guest_debug_arch *host_dbg;
 
  133     struct kvm_guest_debug_arch *guest_dbg;
 
  135     if (!vcpu_get_flag(vcpu, DEBUG_DIRTY))
 
  138     host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt;
 
  139     guest_ctxt = &vcpu->arch.ctxt;
 
  140     host_dbg = &vcpu->arch.host_debug_state.regs;
 
  141     guest_dbg = kern_hyp_va(vcpu->arch.debug_ptr);
 
static void __debug_restore_state(struct kvm_guest_debug_arch *dbg, struct kvm_cpu_context *ctxt)
 
static void __debug_save_state(struct kvm_guest_debug_arch *dbg, struct kvm_cpu_context *ctxt)
 
 
 
 
◆ __debug_switch_to_host_common()
  
  
      
        
          | static void __debug_switch_to_host_common  | 
          ( | 
          struct kvm_vcpu *  | 
          vcpu | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 147 of file debug-sr.h.
  149     struct kvm_cpu_context *host_ctxt;
 
  150     struct kvm_cpu_context *guest_ctxt;
 
  151     struct kvm_guest_debug_arch *host_dbg;
 
  152     struct kvm_guest_debug_arch *guest_dbg;
 
  154     if (!vcpu_get_flag(vcpu, DEBUG_DIRTY))
 
  157     host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt;
 
  158     guest_ctxt = &vcpu->arch.ctxt;
 
  159     host_dbg = &vcpu->arch.host_debug_state.regs;
 
  160     guest_dbg = kern_hyp_va(vcpu->arch.debug_ptr);
 
  165     vcpu_clear_flag(vcpu, DEBUG_DIRTY);