> -----Original Message-----
> From: Greg KH [mailto:[email protected]]
> Sent: Friday, February 11, 2011 4:24 PM
> To: KY Srinivasan
> Cc: [email protected]; [email protected];
> [email protected]; Hank Janssen
> Subject: Re: [PATCH 1/3]: Staging: hv: Use native page allocation/free 
> functions
> 
> On Fri, Feb 11, 2011 at 08:55:56PM +0000, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Greg KH [mailto:[email protected]]
> > > Sent: Friday, February 11, 2011 1:30 PM
> > > To: KY Srinivasan
> > > Cc: [email protected]; [email protected];
> > > [email protected]; Hank Janssen
> > > Subject: Re: [PATCH 1/3]: Staging: hv: Use native page allocation/free
> functions
> > >
> > > On Fri, Feb 11, 2011 at 09:59:00AM -0800, K. Y. Srinivasan wrote:
> > > > --- a/drivers/staging/hv/hv.c
> > > > +++ b/drivers/staging/hv/hv.c
> > > > @@ -230,7 +230,12 @@ int hv_init(void)
> > > >         * Allocate the hypercall page memory
> > > >         * virtaddr = osd_page_alloc(1);
> > > >         */
> > > > -       virtaddr = osd_virtual_alloc_exec(PAGE_SIZE);
> > > > +#ifdef __x86_64__
> > > > +       virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC);
> > > #else
> > > > +       virtaddr =  __vmalloc(PAGE_SIZE, GFP_KERNEL,
> > > > +                       __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); #endif
> > >
> > > I'm not saying this patch is wrong at all, but I still don't understand 
> > > why this is
> > > different depending on the architecture of the machine.  Why is this
> necessary, it
> > > should be ok to do the same type of allocation no matter what the 
> > > processor
> is,
> > > right?
> >
> > You are right Greg; I don't think there is a need to specify different page
> > protection bits based on the architecture - PAGE_KERNEL_EXEC should be
> enough.
> 
> I thought so, but for some reason Hank said there this was needed.
> Hank, is it still true?
> 
> > However, this is the code that is currently in the tree - refer to osd.c.
> 
> Oh, I remember, it's not a critique of this patch, it just reminded me
> of this question I always had for this code.
> 
> > If it is ok with you, I could submit an additional patch to clean this up.
> 
> If Hank says it is ok, and you all test it to verify nothing breaks,
> please send it on.
Will do; the new patch will be on top of the 3 patch sequence I sent earlier 
today.

Regards,

K. Y
> 
> thanks,
> 
> greg k-h

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Reply via email to