Skip to content

Commit

Permalink
Return failure from PTE sync if master mapping does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
udosteinberg committed Aug 9, 2013
1 parent 41db102 commit 6bc45a3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/hpt.cpp
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2009-2011 Udo Steinberg <udo@hypervisor.org>
* Economic rights: Technische Universitaet Dresden (Germany)
*
* Copyright (C) 2012 Udo Steinberg, Intel Corporation.
* Copyright (C) 2012-2013 Udo Steinberg, Intel Corporation.
*
* This file is part of the NOVA microhypervisor.
*
Expand All @@ -26,9 +26,11 @@ bool Hpt::sync_from (Hpt src, mword v, mword o)
{
mword l = (bit_scan_reverse (v ^ o) - PAGE_BITS) / bpl();

Hpt *s = static_cast<Hpt *>(src.walk (v, l, false)), *d = static_cast<Hpt *>(walk (v, l));
Hpt *s = static_cast<Hpt *>(src.walk (v, l, false));
if (!s)
return false;

assert (s);
Hpt *d = static_cast<Hpt *>(walk (v, l));
assert (d);

if (d->val == s->val)
Expand Down

0 comments on commit 6bc45a3

Please sign in to comment.