Keir Fraser wrote:
On 3/11/06 10:46 pm, "Steven Rostedt" <srostedt@xxxxxxxxxx> wrote:
It's much worst than that!
Without this patch, my patch is still broken. In the hypervisor this
flag is checked, and will go down the wrong path when it is missing:
The hypervisor remembers the flags for itself, so the kernel can only
confuse itself. Still, it was a bug.
Well the flag for the application map isn't the problem. But I do see
missing the flag for contains pte is a problem.
int create_grant_host_mapping(
u64 addr, unsigned long frame, unsigned int flags)
{
l1_pgentry_t pte = l1e_from_pfn(frame, GRANT_PTE_FLAGS);
if ( (flags & GNTMAP_application_map) )
l1e_add_flags(pte,_PAGE_USER);
if ( !(flags & GNTMAP_readonly) )
l1e_add_flags(pte,_PAGE_RW);
if ( flags & GNTMAP_contains_pte )
return create_grant_pte_mapping(addr, pte, current);
return create_grant_va_mapping(addr, pte, current);
}
int destroy_grant_host_mapping(
u64 addr, unsigned long frame, unsigned int flags)
{
if ( flags & GNTMAP_contains_pte )
return destroy_grant_pte_mapping(addr, frame, current->domain);
return destroy_grant_va_mapping(addr, frame, current);
}
So is there a difference between create_grant_pte_mapping and
create_grant_va_mapping. As well as destroy_grant_pte_mapping and
destroy_grant_va_mapping. So calling pte create, and then va destroy on
the same mapping is not a bug?
-- Steve
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|