~ubuntu-branches/ubuntu/vivid/qemu/vivid

« back to all changes in this revision

Viewing changes to memory.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-25 22:31:43 UTC
  • mfrom: (1.8.5)
  • Revision ID: package-import@ubuntu.com-20140225223143-odhqxfc60wxrjl15
Tags: 2.0.0~rc1+dfsg-0ubuntu1
* Merge 2.0.0-rc1
* debian/rules: consolidate ppc filter entries.
* Move qemu-system-arch64 into qemu-system-arm
* debian/patches/define-trusty-machine-type.patch: define a trusty machine
  type, currently the same as pc-i440fx-2.0, to put is in a better position
  to enable live migrations from trusty onward.  (LP: #1294823)
* debian/control: build-dep on libfdt >= 1.4.0  (LP: #1295072)
* Merge latest upstream git to commit dc9528f
* Debian/rules:
  - remove -enable-uname-release=2.6.32
  - don't make the aarch64 target Ubuntu-specific.
* Remove patches which are now upstream:
  - fix-smb-security-share.patch
  - slirp-smb-redirect-port-445-too.patch 
  - linux-user-Implement-sendmmsg-syscall.patch (better version is upstream)
  - signal-added-a-wrapper-for-sigprocmask-function.patch
  - ubuntu/signal-sigsegv-protection-on-do_sigprocmask.patch
  - ubuntu/Don-t-block-SIGSEGV-at-more-places.patch
  - ubuntu/ppc-force-cpu-threads-count-to-be-power-of-2.patch
* add link for /usr/share/qemu/bios-256k.bin
* Remove all linaro patches.
* Remove all arm64/ patches.  Many but not all are upstream.
* Remove CVE-2013-4377.patch which is upstream.
* debian/control-in: don't make qemu-system-aarch64 ubuntu-specific

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <assert.h>
23
23
 
24
24
#include "exec/memory-internal.h"
 
25
#include "exec/ram_addr.h"
25
26
 
26
27
//#define DEBUG_UNASSIGNED
27
28
 
1174
1175
                             hwaddr size, unsigned client)
1175
1176
{
1176
1177
    assert(mr->terminates);
1177
 
    return cpu_physical_memory_get_dirty(mr->ram_addr + addr, size,
1178
 
                                         1 << client);
 
1178
    return cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, client);
1179
1179
}
1180
1180
 
1181
1181
void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr,
1182
1182
                             hwaddr size)
1183
1183
{
1184
1184
    assert(mr->terminates);
1185
 
    return cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size, -1);
 
1185
    cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size);
1186
1186
}
1187
1187
 
1188
1188
bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr,
1190
1190
{
1191
1191
    bool ret;
1192
1192
    assert(mr->terminates);
1193
 
    ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size,
1194
 
                                        1 << client);
 
1193
    ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, client);
1195
1194
    if (ret) {
1196
 
        cpu_physical_memory_reset_dirty(mr->ram_addr + addr,
1197
 
                                        mr->ram_addr + addr + size,
1198
 
                                        1 << client);
 
1195
        cpu_physical_memory_reset_dirty(mr->ram_addr + addr, size, client);
1199
1196
    }
1200
1197
    return ret;
1201
1198
}
1241
1238
                               hwaddr size, unsigned client)
1242
1239
{
1243
1240
    assert(mr->terminates);
1244
 
    cpu_physical_memory_reset_dirty(mr->ram_addr + addr,
1245
 
                                    mr->ram_addr + addr + size,
1246
 
                                    1 << client);
 
1241
    cpu_physical_memory_reset_dirty(mr->ram_addr + addr, size, client);
1247
1242
}
1248
1243
 
1249
1244
void *memory_region_get_ram_ptr(MemoryRegion *mr)
1567
1562
bool memory_region_present(MemoryRegion *parent, hwaddr addr)
1568
1563
{
1569
1564
    MemoryRegion *mr = memory_region_find(parent, addr, 1).mr;
1570
 
    if (!mr) {
 
1565
    if (!mr || (mr == parent)) {
1571
1566
        return false;
1572
1567
    }
1573
1568
    memory_region_unref(mr);
1596
1591
    view = address_space_get_flatview(as);
1597
1592
    fr = flatview_lookup(view, range);
1598
1593
    if (!fr) {
 
1594
        flatview_unref(view);
1599
1595
        return ret;
1600
1596
    }
1601
1597