kvm-all.c (1be5a765c08cee3a9587c8a8d3fc2ea247b13f9c) kvm-all.c (9323e79f10e5f5d8fffc3b307776173ca11faeae)
1/*
2 * QEMU KVM support
3 *
4 * Copyright IBM, Corp. 2008
5 * Red Hat, Inc. 2008
6 *
7 * Authors:
8 * Anthony Liguori <aliguori@us.ibm.com>

--- 1332 unchanged lines hidden (view full) ---

1341}
1342
1343static void kvm_set_phys_mem(KVMMemoryListener *kml,
1344 MemoryRegionSection *section, bool add)
1345{
1346 KVMSlot *mem;
1347 int err;
1348 MemoryRegion *mr = section->mr;
1/*
2 * QEMU KVM support
3 *
4 * Copyright IBM, Corp. 2008
5 * Red Hat, Inc. 2008
6 *
7 * Authors:
8 * Anthony Liguori <aliguori@us.ibm.com>

--- 1332 unchanged lines hidden (view full) ---

1341}
1342
1343static void kvm_set_phys_mem(KVMMemoryListener *kml,
1344 MemoryRegionSection *section, bool add)
1345{
1346 KVMSlot *mem;
1347 int err;
1348 MemoryRegion *mr = section->mr;
1349 bool writeable = !mr->readonly && !mr->rom_device;
1349 bool writable = !mr->readonly && !mr->rom_device;
1350 hwaddr start_addr, size, slot_size, mr_offset;
1351 ram_addr_t ram_start_offset;
1352 void *ram;
1353
1354 if (!memory_region_is_ram(mr)) {
1350 hwaddr start_addr, size, slot_size, mr_offset;
1351 ram_addr_t ram_start_offset;
1352 void *ram;
1353
1354 if (!memory_region_is_ram(mr)) {
1355 if (writeable || !kvm_readonly_mem_allowed) {
1355 if (writable || !kvm_readonly_mem_allowed) {
1356 return;
1357 } else if (!mr->romd_mode) {
1358 /* If the memory device is not in romd_mode, then we actually want
1359 * to remove the kvm memory slot so all accesses will trap. */
1360 add = false;
1361 }
1362 }
1363

--- 2336 unchanged lines hidden ---
1356 return;
1357 } else if (!mr->romd_mode) {
1358 /* If the memory device is not in romd_mode, then we actually want
1359 * to remove the kvm memory slot so all accesses will trap. */
1360 add = false;
1361 }
1362 }
1363

--- 2336 unchanged lines hidden ---