In the function get_ioreq(), there is a line: ASSERT((v == current) || spin_is_locked(&d->arch.hvm_domain.ioreq.lock)); I don''t think it should be ASSERT(v == current). we don''t get the lock first, and I think we needn''t it. Am I missing something? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Sorry, I meant the assert should "ASSERT(v == current)." On 7/4/07, Paul Samon <paul.samon@gmail.com> wrote:> > I don''t think it should be > ASSERT(v == current). > we don''t get the lock first, and I think we needn''t it. > > Am I missing something? > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
The lock is taken in, for example, hvm_vcpu_initialise(), which calles get_ioreq(v) with v!=current. So the assertion is correct as-is. -- Keir On 4/7/07 12:12, "Paul Samon" <paul.samon@gmail.com> wrote:> Sorry, I meant the assert should "ASSERT(v == current)." > > On 7/4/07, Paul Samon <paul.samon@gmail.com> wrote: >> I don''t think it should be >> ASSERT(v == current). >> we don''t get the lock first, and I think we needn''t it. >> >> Am I missing something? >> >> > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yes, the lock is necessary (for hvm_vcpu_initialise()), but my question is: in the ASSERT of get_ioreq(), we shouldn''t check if we have got the lock, and we don''t have the lock in it (if I''m wrong, please point out where we get the lock), that is, in get_ioreq(), I think spin_is_locked(&d-> arch.hvm_domain.ioreq.lock) always returns false. -- Paul S. On 7/4/07, Keir Fraser <keir@xensource.com> wrote:> > The lock is taken in, for example, hvm_vcpu_initialise(), which calles > get_ioreq(v) with v!=current. So the assertion is correct as-is. > > -- Keir >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel