Kouya Shimura
2009-Nov-27 06:22 UTC
[Xen-devel] [PATCH] x86/mm: disallow mmu hypercalls for a dying domain
The race condition should be avoided for efficiency. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Nov-27 08:08 UTC
Re: [Xen-devel] [PATCH] x86/mm: disallow mmu hypercalls for a dying domain
Since the check is made with no locks held, I don''t think any race can be completely avoided here. I''m not sure the performance argument holds much water either -- this just looks like a pointless extra check. -- Keir On 27/11/2009 06:22, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote:> The race condition should be avoided for efficiency. > > Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kouya Shimura
2009-Nov-27 09:10 UTC
Re: [Xen-devel] [PATCH] x86/mm: disallow mmu hypercalls for a dying domain
I observed that dom0 kept on issuing a mmu_update hypercall while the domain is dying. So I don''t feel happy with it. But I''m ok if the patch is dropped. Thanks, Kouya Keir Fraser writes:> Since the check is made with no locks held, I don''t think any race can be > completely avoided here. I''m not sure the performance argument holds much > water either -- this just looks like a pointless extra check. > > -- Keir > > On 27/11/2009 06:22, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote: > > > The race condition should be avoided for efficiency. > > > > Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Nov-27 09:43 UTC
Re: [Xen-devel] [PATCH] x86/mm: disallow mmu hypercalls for a dying domain
Probably coming from dom0 userspace somewhere, such as qemu. By the time you get down to the hypercall implementation in Xen, you''ve already done the expensive traps via dom0 kernel. -- Keir On 27/11/2009 09:10, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote:> I observed that dom0 kept on issuing a mmu_update hypercall while the > domain is dying. So I don''t feel happy with it. > But I''m ok if the patch is dropped. > > Thanks, > Kouya > > Keir Fraser writes: >> Since the check is made with no locks held, I don''t think any race can be >> completely avoided here. I''m not sure the performance argument holds much >> water either -- this just looks like a pointless extra check. >> >> -- Keir >> >> On 27/11/2009 06:22, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote: >> >>> The race condition should be avoided for efficiency. >>> >>> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> >>> >>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel