Diff for /qemu/kqemu.c between versions 1.1.1.6 and 1.1.1.7

version 1.1.1.6, 2018/04/24 16:50:18 version 1.1.1.7, 2018/04/24 17:20:20
Line 14 Line 14
  * Lesser General Public License for more details.   * Lesser General Public License for more details.
  *   *
  * You should have received a copy of the GNU Lesser General Public   * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software   * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA  
  */   */
 #include "config.h"  #include "config.h"
 #ifdef _WIN32  #ifdef _WIN32
 #define WIN32_LEAN_AND_MEAN  
 #include <windows.h>  #include <windows.h>
 #include <winioctl.h>  #include <winioctl.h>
 #else  #else
Line 42 Line 40
 #include "exec-all.h"  #include "exec-all.h"
 #include "qemu-common.h"  #include "qemu-common.h"
   
 #ifdef USE_KQEMU  #ifdef CONFIG_KQEMU
   
 #define DEBUG  #define DEBUG
 //#define PROFILE  //#define PROFILE
Line 82  int kqemu_fd = KQEMU_INVALID_FD; Line 80  int kqemu_fd = KQEMU_INVALID_FD;
    1 = user kqemu     1 = user kqemu
    2 = kernel kqemu     2 = kernel kqemu
 */  */
 int kqemu_allowed = 1;  int kqemu_allowed = 0;
 uint64_t *pages_to_flush;  uint64_t *pages_to_flush;
 unsigned int nb_pages_to_flush;  unsigned int nb_pages_to_flush;
 uint64_t *ram_pages_to_update;  uint64_t *ram_pages_to_update;
Line 92  unsigned int nb_modified_ram_pages; Line 90  unsigned int nb_modified_ram_pages;
 uint8_t *modified_ram_pages_table;  uint8_t *modified_ram_pages_table;
 int qpi_io_memory;  int qpi_io_memory;
 uint32_t kqemu_comm_base; /* physical address of the QPI communication page */  uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
   ram_addr_t kqemu_phys_ram_size;
   uint8_t *kqemu_phys_ram_base;
   
 #define cpuid(index, eax, ebx, ecx, edx) \  #define cpuid(index, eax, ebx, ecx, edx) \
   asm volatile ("cpuid" \    asm volatile ("cpuid" \
Line 215  int kqemu_init(CPUState *env) Line 215  int kqemu_init(CPUState *env)
                                       sizeof(uint64_t));                                        sizeof(uint64_t));
     if (!modified_ram_pages)      if (!modified_ram_pages)
         goto fail;          goto fail;
     modified_ram_pages_table = qemu_mallocz(phys_ram_size >> TARGET_PAGE_BITS);      modified_ram_pages_table =
           qemu_mallocz(kqemu_phys_ram_size >> TARGET_PAGE_BITS);
     if (!modified_ram_pages_table)      if (!modified_ram_pages_table)
         goto fail;          goto fail;
   
     memset(&kinit, 0, sizeof(kinit)); /* set the paddings to zero */      memset(&kinit, 0, sizeof(kinit)); /* set the paddings to zero */
     kinit.ram_base = phys_ram_base;      kinit.ram_base = kqemu_phys_ram_base;
     kinit.ram_size = phys_ram_size;      kinit.ram_size = kqemu_phys_ram_size;
     kinit.ram_dirty = phys_ram_dirty;      kinit.ram_dirty = phys_ram_dirty;
     kinit.pages_to_flush = pages_to_flush;      kinit.pages_to_flush = pages_to_flush;
     kinit.ram_pages_to_update = ram_pages_to_update;      kinit.ram_pages_to_update = ram_pages_to_update;
Line 988  static CPUWriteMemoryFunc *qpi_mem_write Line 989  static CPUWriteMemoryFunc *qpi_mem_write
 static void qpi_init(void)  static void qpi_init(void)
 {  {
     kqemu_comm_base = 0xff000000 | 1;      kqemu_comm_base = 0xff000000 | 1;
     qpi_io_memory = cpu_register_io_memory(0,       qpi_io_memory = cpu_register_io_memory(
                                            qpi_mem_read,                                              qpi_mem_read, 
                                            qpi_mem_write, NULL);                                             qpi_mem_write, NULL);
     cpu_register_physical_memory(kqemu_comm_base & ~0xfff,       cpu_register_physical_memory(kqemu_comm_base & ~0xfff, 

Removed from v.1.1.1.6  
changed lines
  Added in v.1.1.1.7


unix.superglobalmegacorp.com