From: Carsten Otte <cotte@de.ibm.com>
To: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
linux-ia64@vger.kernel.org, kvm-ia64-devel@lists.sourceforge.net,
carsteno@de.ibm.com, Jes Sorensen <jes@sgi.com>,
Avi Kivity <avi@qumranet.com>,
virtualization@lists.linux-foundation.org,
kvm-devel@lists.sourceforge.net
Subject: Re: [04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8
Date: Tue, 01 Apr 2008 11:49:30 +0000 [thread overview]
Message-ID: <47F2214A.90407@de.ibm.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC01048735@pdsmsx415.ccr.corp.intel.com>
Zhang, Xiantao wrote:
> Carsten Otte wrote:
>> Zhang, Xiantao wrote:
>>> Carsten Otte wrote:
>>>> Zhang, Xiantao wrote:
>>>>> Hi, Carsten
>>>>> Why do you think it is racy? In this function,
>>>>> target_vcpu->arch.launched should be set to 1 for the first run,
>>>>> and keep its value all the time. Except the first IPI to wake up
>>>>> the vcpu, all IPIs received by target vcpu should go into "else"
>>>>> condition. So you mean the race condition exist in "else" code ?
>>>> For example to lock against destroying that vcpu. Or, the waitqueue
>>>> may become active after if (waitqueue_active()) and before
>>>> wake_up_interruptible(). In that case, the target vcpu might sleep
>>>> and not get waken up by the ipi.
>>> I don't think it may cause issue, because the target vcpu at least
>>> can be waken up by the timer interrupt.
>>>
>>> But as you said, x86 side also have the same race issue ?
>> As far as I can tell, x86 does'nt have that race.
>
> Hi, Carsten
> I can't understand why it only exist at IA64 side. Thank you!
> Xiantao
Well, x86 does'nt signal the target processor by accessing the vcpu
data structure. They use the IPI signal for that as far as I can see.
And s390 does have an explicit lock for this purpose. Itanium however,
does not have a lock but does access the target vcpu struct.
WARNING: multiple messages have this Message-ID (diff)
From: Carsten Otte <cotte@de.ibm.com>
To: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
linux-ia64@vger.kernel.org, kvm-ia64-devel@lists.sourceforge.net,
carsteno@de.ibm.com, Jes Sorensen <jes@sgi.com>,
Avi Kivity <avi@qumranet.com>,
virtualization@lists.linux-foundation.org,
kvm-devel@lists.sourceforge.net
Subject: Re: [04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8
Date: Tue, 01 Apr 2008 13:49:30 +0200 [thread overview]
Message-ID: <47F2214A.90407@de.ibm.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC01048735@pdsmsx415.ccr.corp.intel.com>
Zhang, Xiantao wrote:
> Carsten Otte wrote:
>> Zhang, Xiantao wrote:
>>> Carsten Otte wrote:
>>>> Zhang, Xiantao wrote:
>>>>> Hi, Carsten
>>>>> Why do you think it is racy? In this function,
>>>>> target_vcpu->arch.launched should be set to 1 for the first run,
>>>>> and keep its value all the time. Except the first IPI to wake up
>>>>> the vcpu, all IPIs received by target vcpu should go into "else"
>>>>> condition. So you mean the race condition exist in "else" code ?
>>>> For example to lock against destroying that vcpu. Or, the waitqueue
>>>> may become active after if (waitqueue_active()) and before
>>>> wake_up_interruptible(). In that case, the target vcpu might sleep
>>>> and not get waken up by the ipi.
>>> I don't think it may cause issue, because the target vcpu at least
>>> can be waken up by the timer interrupt.
>>>
>>> But as you said, x86 side also have the same race issue ?
>> As far as I can tell, x86 does'nt have that race.
>
> Hi, Carsten
> I can't understand why it only exist at IA64 side. Thank you!
> Xiantao
Well, x86 does'nt signal the target processor by accessing the vcpu
data structure. They use the IPI signal for that as far as I can see.
And s390 does have an explicit lock for this purpose. Itanium however,
does not have a lock but does access the target vcpu struct.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
next prev parent reply other threads:[~2008-04-01 11:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-31 8:26 [04/17] [PATCH] Add kvm arch-specific core code for kvm/ia64.-V8 Zhang, Xiantao
2008-03-31 12:01 ` Jes Sorensen
2008-03-31 12:01 ` Jes Sorensen
2008-03-31 12:01 ` Jes Sorensen
2008-04-01 1:31 ` Zhang, Xiantao
2008-04-01 1:31 ` Zhang, Xiantao
2008-03-31 14:52 ` Carsten Otte
2008-03-31 14:52 ` Carsten Otte
2008-04-01 1:51 ` Zhang, Xiantao
2008-04-01 1:51 ` Zhang, Xiantao
2008-04-01 2:16 ` Zhang, Xiantao
2008-04-01 2:16 ` Zhang, Xiantao
2008-04-01 7:53 ` Carsten Otte
2008-04-01 7:53 ` Carsten Otte
2008-04-01 7:53 ` Carsten Otte
2008-04-01 9:43 ` Zhang, Xiantao
2008-04-01 9:43 ` Zhang, Xiantao
2008-04-01 10:59 ` Carsten Otte
2008-04-01 10:59 ` Carsten Otte
2008-04-01 11:05 ` Zhang, Xiantao
2008-04-01 11:05 ` Zhang, Xiantao
2008-04-01 11:49 ` Carsten Otte
2008-04-01 11:49 ` Carsten Otte [this message]
2008-04-01 11:49 ` Carsten Otte
2008-04-01 10:59 ` Carsten Otte
2008-03-31 14:52 ` Carsten Otte
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=47F2214A.90407@de.ibm.com \
--to=cotte@de.ibm.com \
--cc=avi@qumranet.com \
--cc=carsteno@de.ibm.com \
--cc=jes@sgi.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=kvm-ia64-devel@lists.sourceforge.net \
--cc=linux-ia64@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xiantao.zhang@intel.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.