Such information will be needed in order to remove foreign mappings during
teardown for HVM guests.
Right now the introduced counter is not consumed.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
unsigned int flags;
unsigned long entry_count;
} ioreq;
+
+ /* Number of foreign mappings. */
+ unsigned long nr_foreign;
#endif /* CONFIG_HVM */
};
if ( !page_get_owner_and_reference(mfn_to_page(nfn)) )
return -EBUSY;
+ p2m->nr_foreign++;
+
break;
default:
return -EINVAL;
}
put_page(mfn_to_page(ofn));
+ p2m->nr_foreign--;
break;
default: