All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <srostedt@redhat.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com, Jan Beulich <jbeulich@novell.com>
Subject: Re: Re: [PATCH] Fix >4G i386 PAE grant table interface
Date: Sat, 04 Nov 2006 09:25:38 -0500	[thread overview]
Message-ID: <454CA2E2.6060606@redhat.com> (raw)
In-Reply-To: <C171F4CA.3D26%Keir.Fraser@cl.cam.ac.uk>

Keir Fraser wrote:
> On 3/11/06 10:46 pm, "Steven Rostedt" <srostedt@redhat.com> 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

  reply	other threads:[~2006-11-04 14:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02 16:53 [PATCH] Fix >4G i386 PAE grant table interface Steven Rostedt
2006-11-02 18:16 ` Keir Fraser
2006-11-03  9:28   ` Jan Beulich
2006-11-03 22:46     ` Steven Rostedt
2006-11-04  7:42       ` Keir Fraser
2006-11-04 14:25         ` Steven Rostedt [this message]
2006-11-04 16:23           ` Keir Fraser
2006-11-04 17:10             ` Steven Rostedt
2006-11-03  8:42 ` Jan Beulich
2006-11-03 13:43   ` Steven Rostedt
2006-11-03 14:27     ` Jan Beulich
2006-11-03 20:43       ` Keir Fraser
2006-11-06  8:21         ` Jan Beulich
2006-11-03  9:56 ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=454CA2E2.6060606@redhat.com \
    --to=srostedt@redhat.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=jbeulich@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.