[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.13] x86/vmx: always sync PIR to IRR before vmentry



On 18.11.2019 15:03, Roger Pau Monné  wrote:
> On Mon, Nov 18, 2019 at 01:26:46PM +0100, Jan Beulich wrote:
>> On 18.11.2019 11:16, Roger Pau Monne wrote:
>>> @@ -1954,48 +1952,28 @@ static void __vmx_deliver_posted_interrupt(struct 
>>> vcpu *v)
>>>       * 2. The target vCPU is the current vCPU and we're in non-interrupt
>>>       * context.
>>>       */
>>> -    if ( running && (in_irq() || (v != current)) )
>>> -    {
>>> +    if ( vcpu_runnable(v) && v != current )
>>
>> I'm afraid you need to be more careful with the running vs runnable
>> distinction here. The comment above here becomes stale with the
>> change (also wrt the removal of in_irq(), which I'm at least uneasy
>> about), and the new commentary below also largely says/assumes
>> "running", not "runnable".
> 
> I've missed to fix that comment, will take care in the next version.
> Note also that the comment is quite pointless, it only states what the
> code below is supposed to do, but doesn't give any reasoning as to why
> in_irq is relevant here.

It's main "value" is to refer to vcpu_kick(), which has ...

> TBH I'm not sure of the point of the in_irq check, I don't think it's
> relevant for the code here.

... a similar in_irq() check. Sadly that one, while having a bigger
comment, also doesn't explain what it's needed for. It looks like I
should recall the reason, but I'm sorry - I don't right now.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.