* A wrong assert in get_ioreq()?
@ 2007-07-04 11:05 Paul Samon
2007-07-04 11:12 ` Paul Samon
0 siblings, 1 reply; 4+ messages in thread
From: Paul Samon @ 2007-07-04 11:05 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 259 bytes --]
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?
[-- Attachment #1.2: Type: text/html, Size: 412 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A wrong assert in get_ioreq()?
2007-07-04 11:05 A wrong assert in get_ioreq()? Paul Samon
@ 2007-07-04 11:12 ` Paul Samon
2007-07-04 13:22 ` Keir Fraser
0 siblings, 1 reply; 4+ messages in thread
From: Paul Samon @ 2007-07-04 11:12 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 259 bytes --]
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?
>
>
[-- Attachment #1.2: Type: text/html, Size: 651 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: A wrong assert in get_ioreq()?
2007-07-04 11:12 ` Paul Samon
@ 2007-07-04 13:22 ` Keir Fraser
2007-07-05 1:08 ` Paul Samon
0 siblings, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2007-07-04 13:22 UTC (permalink / raw)
To: Paul Samon, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 638 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 1584 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: A wrong assert in get_ioreq()?
2007-07-04 13:22 ` Keir Fraser
@ 2007-07-05 1:08 ` Paul Samon
0 siblings, 0 replies; 4+ messages in thread
From: Paul Samon @ 2007-07-05 1:08 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 565 bytes --]
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
>
[-- Attachment #1.2: Type: text/html, Size: 1043 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-05 1:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-04 11:05 A wrong assert in get_ioreq()? Paul Samon
2007-07-04 11:12 ` Paul Samon
2007-07-04 13:22 ` Keir Fraser
2007-07-05 1:08 ` Paul Samon
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.