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

Re: [PATCH v2 2/2] xen/ppc: Implement a basic exception handler


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 20 Oct 2023 08:22:43 +0200
  • 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=eoAtz4WDTTn2dMSL09FgOWGApZOQNwAa89RAE8QS11A=; b=ALIdwlpGEmwcUWPlQeSXJp9MmCj7t7cVKy9y9X4pnTQa9qTLveegX4WR1JSB4zyRBkhGuMaDyr6sm3JHZNVLZw/rJGKCsa5edfiud7V/wc76PLkHXeu2iP+4tXtMEPBD7n7Ut2ClJFF+Uzpbir1n2Kj+gxrczZZKeLr3ZFL+9e1/Y6vdXS0ajTeBf6QJdJ0Ex0B/RQ0WVn7wW7mRMaFAJCGvV3NX7dU78PulKtTS3rXY2LlnmchIBjIK3IoHY+fGIObmTPK6Zd+gbvvrVBrOMcRxHOm8eKc8dpBA3biHsVrrbaBmvEqGnHZLAMcZ3lyZmcDr7dqmqS3zpqbEL9efxQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zd/BL7Pc6qYyjuTJMqXK8IIyolCF8qHa1xQPWNl9PwgoGgYP2bhAVJ1PuDIkBUpqZLY6pQ/fBIFbdQvRMjSzhAP6PMBplfbjjd1iW/B1wOXMyTtlVb2MpN5up487sRzmZsNJmPhE3T++0v8b4LTmDCUcUVHSAMmvAqybi/xzhJGzdDPtzK7EaNelCwyGJJZXNp3mmj1g4UrzseBZKz42I6gz/PTaZzYsAsidYQ2y4HoP6mKmKbhuyoV5DFuwXynKIIP2XYA3pakazv5O4uqxP7LmsfOzGtLm+Z4GnpJ4Ak+g23xsXnCOEK/HrHZkZ8G61RhSg6rhRQ047IGZBeI/Rg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 20 Oct 2023 06:22:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.10.2023 22:02, Shawn Anastasio wrote:
> On 10/18/23 10:43 AM, Jan Beulich wrote:
>> On 13.10.2023 20:13, Shawn Anastasio wrote:
>>> --- a/xen/arch/ppc/setup.c
>>> +++ b/xen/arch/ppc/setup.c
>>> @@ -11,6 +11,15 @@
>>>  /* Xen stack for bringing up the first CPU. */
>>>  unsigned char __initdata cpu0_boot_stack[STACK_SIZE] __aligned(STACK_SIZE);
>>>
>>> +void setup_exceptions(void)
>>> +{
>>> +    unsigned long lpcr;
>>> +
>>> +    /* Set appropriate interrupt location in LPCR */
>>> +    lpcr = mfspr(SPRN_LPCR);
>>> +    mtspr(SPRN_LPCR, lpcr | LPCR_AIL_3);
>>> +}
>>
>> Please forgive my lack of PPC knowledge: There's no use of any address
>> here afaict. Where's the link to (presumably) AIL_VECTOR_BASE? If that
>> address is kind of magic, I'm then lacking a connection between
>> XEN_VIRT_START and that constant. (If Xen needed moving around in
>> address space, it would be nice if changing a single constant would
>> suffice.)
>>
> 
> AIL_VECTOR_BASE is indeed a magic address defined by the ISA for AIL=3.
> As for the second part of your question, I'm a bit confused as to what
> you're asking. The ISRs are placed at a position relative to
> the start of the .text.exceptions section (EXCEPTION_VECTORS_START), so
> Xen can be arbitrarily shuffled around in address space as long as
> EXCEPTION_VECTORS_START lies at or before AIL_VECTOR_BASE.

Well, AIL_VECTOR_BASE is #define-d to a plain constant, not derived
from EXCEPTION_VECTORS_START. In turn EXCEPTION_VECTORS_START is
#define-d to a plain constant in patch 1, not derived from
XEN_VIRT_START. Therefore moving Xen around would require to change
(at least) 3 #define-s afaict.

Jan



 


Rackspace

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