Home | History | Annotate | Download | only in hw
      1 /* Copyright (C) 2007-2008 The Android Open Source Project
      2 **
      3 ** This software is licensed under the terms of the GNU General Public
      4 ** License version 2, as published by the Free Software Foundation, and
      5 ** may be copied, distributed, and modified under those terms.
      6 **
      7 ** This program is distributed in the hope that it will be useful,
      8 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
      9 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     10 ** GNU General Public License for more details.
     11 */
     12 #ifndef GOLDFISH_VMEM_H
     13 #define GOLDFISH_VMEM_H
     14 
     15 // Call these functions instead of cpu_memory_rw_debug and
     16 // cpu_get_phys_page_debug to ensure virtual address translation always works
     17 // properly, and efficently, under KVM.
     18 
     19 int safe_memory_rw_debug(CPUState *env, target_ulong addr, uint8_t *buf,
     20                          int len, int is_write);
     21 
     22 target_phys_addr_t safe_get_phys_page_debug(CPUState *env, target_ulong addr);
     23 
     24 
     25 #endif  /* GOLDFISH_VMEM_H */
     26