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

Ping: [PATCH] x86: enable interrupts around dump_execstate()


  • To: Andrew Cooper <amc96@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 11 Jan 2022 11:08:51 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sg6ZJz3EwiS/ErXJXNgrX9w7L3rFFVG2WlJfpbWcJn0=; b=KHxKKHzMuCGW4+x1KdJo+/L3k7hmD7BwHMZjNeMbA+sWa40GNIDC1KpCEH4SIb+CFYtnmW1nNWSIg2ZQ5tbeBAsCaqziMBfp070+FuwaXE73QE98zlk223FChwwJ99vhJnabuIUG6lHy5jgvPkHTxfrWeaTLERV8M1Y5pJ5bhwHeHVGgcL7eFQ9cB/ZyNAUKHOYB1EHJ7nPRg2+wcQwfcwymMDmDEQntTh0QMGqgGkX7IFR4Y9zCfhKxt1b1XBePipwrTCjjYHQBI+jymaWa29XmiFjNtvwt0AzLK04xLOELs+ug+TXqFtq5+msanF0/GQLl3Uy3+c/H90yLHIEAjg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LhYOIW9WgToQ6cSliSJMZEYnliC4XNS57OKN0GE4ny2NWbIn/uLrklSVDTKB1WeXhTtroCXWBX772JDM9yn7Omdo76zfKh+fseFyXl0jT31/xbcJoG9t4AtNstPHtVUSGUwJNGZEGacqlssryzaWWUuid9iDcguTcNutK2yo/kCyMncvBKxsgRDqufziNk4GtIQGe/dH8Tm90XQehj69g9Wv8SsZUBCYzwmxPjeYQ3uptGwMJZ4b8dILaymXdeYdQjdpw1yiFkuenNkcDsFaY5Jc+Zj/b49I3NDTCvM5ZM3OUqxKbYsBJ0yryAAgXEAv2JRO71U7DXc70oMH/8rqIA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 11 Jan 2022 10:09:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.12.2021 14:33, Jan Beulich wrote:
> On 16.12.2021 12:54, Andrew Cooper wrote:
>> On 13/12/2021 15:12, Jan Beulich wrote:
>>> show_hvm_stack() requires interrupts to be enabled to avoids triggering
>>> the consistency check in check_lock() for the p2m lock. To do so in
>>> spurious_interrupt() requires adding reentrancy protection / handling
>>> there.
>>>
>>> Fixes: adb715db698b ("x86/HVM: also dump stacks from 
>>> show_execution_state()")
>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

There's a bug here which we need to deal with one way or another.
May I please ask for a response to the issues pointed out with
what you said in your earlier reply?

Thanks, Jan

>>> ---
>>> The obvious (but imo undesirable) alternative is to suppress the call to
>>> show_hvm_stack() when interrupts are disabled.
>>
>> show_execution_state() need to work in any context including the #DF
>> handler,
> 
> Why? There's no show_execution_state() on that path.
> 
>> and
>>
>>     /*
>>      * Stop interleaving prevention: The necessary P2M lookups
>>      * involve locking, which has to occur with IRQs enabled.
>>      */
>>     console_unlock_recursive_irqrestore(flags);
>>     
>>     show_hvm_stack(curr, regs);
>>
>> is looking distinctly dodgy...
> 
> Well, yes, it does. If you have any better idea ...
> 
>> For these kinds of purposes, it ought to be entirely fine to do a
>> lockless pagewalk of the p2m, because we have to maintain atomicity of
>> updates vs the hardware pagewalk anyway.  We do not care about any side
>> effects if the target isn't a RAM page.
>>
>> That ought to remove any IRQ problems from the equation.
> 
> First - how do you suggest to signal to the page walk logic that there
> should be no lock acquired? And then I don't think there's a direct
> relationship here with what we need to guarantee correct hardware page
> walk behavior. Unless you mean to suggest that here we want to rely on
> either locking or interrupts being off (the latter guaranteeing that
> flush IPIs wouldn't complete while we're still doing software walking
> here).
> 
> Jan
> 
> 




 


Rackspace

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