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

Re: [PATCH] xen: Modify domain_crash() to take a print string


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 24 Mar 2023 09:10:42 +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=jmn2JmQ8KiQWMrbnNm6jJQWPPPTIcQVfXKmORKF3PQk=; b=mcdpWkDsT2TZpsybFR6C6Gll0XPqsu+KyssHyDXC8yBj5rCwAEJyjl1ZKHxhL1FRMFApXjRKcuvJCg09o11kKBDRVDofFGKzvCYejPVeKAsKmrC462Bm2L++Jdl2v1gcSrYobGZFQzJBmmBkEsbZADhuoV01e1ix+JpssQbcYXBTRWtcI6u3Qc1lG/EipMvE5oShfA8pCuUdS4PcbQL+zUzaqYO8MGraWYWy4eYYp5IhLXEmsH0hrXs4Wqg6fV+SjYo2Vcu6bInKfXtVMjmN9ZhZvjtbLFYcNziIkfy1NZ37KQ1uR3I4IfIyq4iLnUhLxSY1mB4rCIzSCLRhdKyi3w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OCssRc7ib16/V/M1/xVgDWXGasG+pbjn8CrBUuHub9B7cFEaHWv3M4xlvC2Ajf/wIH7H0ylWq3uqtNhBrpuOlo9zeFCDyxgsYFZ0nHoO8tUZ6XxxaeroiZyryTZ8G7gJMT7y74VfnyIJ2zYt1/tyKLQrMpb59Suf/GGXRVhvoYjTLMz+VEU7oJzHIouiDIv+7MLlhz8xnnwjJO+8lBM4N2tdKJgWdSKq+PFqQBK0yeUf+k9ulHEZnaY4hYKtJhqRusIaLVIVJW2zbHO1WmTwZWIFrqnc550jF6ILJPVE8EDsI03UBdiaguqp04C9H+rZBfkHyO8PBuoAMdLo4RBr8g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 24 Mar 2023 08:11:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.03.2023 00:15, Andrew Cooper wrote:
> On 04/02/2022 12:54 pm, Jan Beulich wrote:
>> On 03.02.2022 14:38, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/domain.c
>>> +++ b/xen/arch/x86/domain.c
>>> @@ -1693,11 +1693,8 @@ static void load_segments(struct vcpu *n)
>>>                   put_guest(uregs->fs,   esp - 5) |
>>>                   put_guest(uregs->es,   esp - 6) |
>>>                   put_guest(uregs->ds,   esp - 7) )
>>> -            {
>>> -                gprintk(XENLOG_ERR,
>>> -                        "error while creating compat failsafe
>>> callback frame\n");
>>> -                domain_crash(n->domain);
>>> -            }
>>> +                domain_crash(n->domain,
>>> +                             "Error creating compat failsafe
>>> callback frame\n");
>>>  
>>>              if ( n->arch.pv.vgc_flags & VGCF_failsafe_disables_events )
>>>                  vcpu_info(n, evtchn_upcall_mask) = 1;
>>> @@ -1732,11 +1729,8 @@ static void load_segments(struct vcpu *n)
>>>               put_guest(uregs->ds,   rsp -  9) |
>>>               put_guest(regs->r11,   rsp - 10) |
>>>               put_guest(regs->rcx,   rsp - 11) )
>>> -        {
>>> -            gprintk(XENLOG_ERR,
>>> -                    "error while creating failsafe callback frame\n");
>>> -            domain_crash(n->domain);
>>> -        }
>>> +            domain_crash(n->domain,
>>> +                         "Error creating failsafe callback frame\n");
>>
>> I assume it wasn't really intended to hide potentially relevant
>> information
>> (the subject vCPU) by this change, which - by way of gprintk() - did get
>> logged before (since we already have n == current at this point)?
> 
> The information is not lost.  __domain_crash() prints current too,
> albeit in a long-winded way.

Oh, right - n == current guarantees the middle path to be taken there.
Considering the other sub-thread also ended up okay-ish:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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