* involves making sure there are no writable mappings available to the guest
* for this page.
*/
-void shadow_promote(struct vcpu *v, mfn_t gmfn, unsigned int type)
+void shadow_promote(struct domain *d, mfn_t gmfn, unsigned int type)
{
- struct domain *d = v->domain;
struct page_info *page = mfn_to_page(gmfn);
ASSERT(mfn_valid(gmfn));
TRACE_SHADOW_PATH_FLAG(TRCE_SFLAG_PROMOTE);
}
-void shadow_demote(struct vcpu *v, mfn_t gmfn, u32 type)
+void shadow_demote(struct domain *d, mfn_t gmfn, u32 type)
{
- struct domain *d = v->domain;
struct page_info *page = mfn_to_page(gmfn);
ASSERT(test_bit(_PGC_page_table, &page->count_info));
}
}
- shadow_promote(v, gmfn, shadow_type);
+ shadow_promote(d, gmfn, shadow_type);
set_shadow_status(d, gmfn, shadow_type, smfn);
return smfn;
/* Record that the guest page isn't shadowed any more (in this type) */
gmfn = backpointer(sp);
delete_shadow_status(d, gmfn, t, smfn);
- shadow_demote(v, gmfn, t);
+ shadow_demote(d, gmfn, t);
/* Decrement refcounts of all the old entries */
sl4mfn = smfn;
SHADOW_FOREACH_L4E(sl4mfn, sl4e, 0, 0, d, {
/* Record that the guest page isn't shadowed any more (in this type) */
gmfn = backpointer(sp);
delete_shadow_status(d, gmfn, t, smfn);
- shadow_demote(v, gmfn, t);
+ shadow_demote(d, gmfn, t);
/* Decrement refcounts of all the old entries */
sl3mfn = smfn;
/* Record that the guest page isn't shadowed any more (in this type) */
gmfn = backpointer(sp);
delete_shadow_status(d, gmfn, t, smfn);
- shadow_demote(v, gmfn, t);
+ shadow_demote(d, gmfn, t);
/* Decrement refcounts of all the old entries */
sl2mfn = smfn;
{
mfn_t gmfn = backpointer(sp);
delete_shadow_status(d, gmfn, t, smfn);
- shadow_demote(v, gmfn, t);
+ shadow_demote(d, gmfn, t);
}
if ( shadow_mode_refcounts(d) )
unsigned long n, unsigned int t, mfn_t smfn);
/* shadow promotion */
-void shadow_promote(struct vcpu *v, mfn_t gmfn, u32 type);
-void shadow_demote(struct vcpu *v, mfn_t gmfn, u32 type);
+void shadow_promote(struct domain *d, mfn_t gmfn, u32 type);
+void shadow_demote(struct domain *d, mfn_t gmfn, u32 type);
/* Shadow page allocation functions */
void shadow_prealloc(struct domain *d, u32 shadow_type, unsigned int count);