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

Re: [PATCH 8/9] xen/ppc: Add stub function and symbol definitions


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 8 Aug 2023 12:27:37 +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=p0017iN4hQj/VyiDseYwsrRDB1EjpFC20roEf6xPZg0=; b=gT8NZ8hvx01WqdW3iGe37kaOpIPOsdkRDh9/0x/QrEo2Kd7VWLnNcmeZD3d0osZeh8jUdvqBtAhGKEfsqEhoCXWZTGa18SfYdSgK9Tlvoq3nJGyFKT1vktFsHuzqjdXO0mcJCQgkAToTkSk7eyS8f9ZDehh0RYhSabsZayrZPp3tpldTym37xaBzEUO0oJb3fsc336gCSyF7hLE/xRrQK5SQqDisldJTDL8ntItgYwnLEcNiDWfoeUmmPUqN8qQM5/bkrlrtKC0wb9CgkntoR8g7Vv0siB52HQ33v8+lixoZTcGfuvrUsLOPlmEuXol70o1KXt1krmT4PkknSp9rHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j1MPDeyYi4+5zCex9lGXDobjwUvlloBn/fKQ+Gi1ZwLZjU4KTEK0QiES2VaWEKL3qbkTvkEnm/Y9PDI9sdKkyeJGNzwjWAgMncyyTMDjd9keCqHNrlIB3pR8iKEpiYdnipsaJNVKN/TB2dNWj29YUx2b/EPPAAw6MAWq8FaVtRlW6NWVzTsMUrTBo80zd6mZ94KBRLu+qElQRNIe6PrDhALelLgSVFdhmYseLhdBmjVH6z7vmkGXR/HmnoS3gsyRJNKjUuC2tIP9bFbAFl3ZdlYREYq6XTmGLPH1niRCnKLrGj+fUYmlhmA2Y+MeNjtrs5Faqw/E4oOJubd5pYIHVQ==
  • 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: Tue, 08 Aug 2023 10:27:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.08.2023 01:03, Shawn Anastasio wrote:
> --- a/xen/arch/ppc/mm-radix.c
> +++ b/xen/arch/ppc/mm-radix.c
> @@ -266,3 +266,47 @@ void __init setup_initial_pagetables(void)
>      /* Turn on the MMU */
>      enable_mmu();
>  }
> +
> +

Nit: No double blank lines please.

> +/*
> + * TODO: Implement the functions below
> + */
> +unsigned long total_pages;

Hmm, yet one more prereq patch for me to make: There should be no need
for every arch to have a definition, when common code requires the
variable. While looking there I found max_page, which common code
references as well. I'm surprised you get away without. I guess I'll
learn why that is when making the patch moving both.

> +unsigned long frametable_base_pdx __read_mostly;

While we still have many instances like this, we prefer this form:

unsigned long __read_mostly frametable_base_pdx;

> +
> +void put_page(struct page_info *p)
> +{
> +    BUG();
> +}
> +
> +void arch_dump_shared_mem_info(void)
> +{
> +    BUG();
> +}

And perhaps one further prereq patch to avoid the need for this.

> +int xenmem_add_to_physmap_one(struct domain *d,
> +                              unsigned int space,
> +                              union add_to_physmap_extra extra,
> +                              unsigned long idx,
> +                              gfn_t gfn)
> +{
> +    BUG();
> +}
> +
> +int destroy_xen_mappings(unsigned long s, unsigned long e)
> +{
> +    BUG();
> +}
> +
> +int map_pages_to_xen(unsigned long virt,
> +                     mfn_t mfn,
> +                     unsigned long nr_mfns,
> +                     unsigned int flags)

There's a patch in flight regarding the naming of this last parameter.
I guess PPC would best be in sync right away.

> --- a/xen/arch/ppc/setup.c
> +++ b/xen/arch/ppc/setup.c
> @@ -1,5 +1,8 @@
>  /* SPDX-License-Identifier: GPL-2.0-or-later */
> +#include <xen/lib.h>
>  #include <xen/init.h>
> +#include <xen/mm.h>
> +#include <public/version.h>
>  #include <asm/boot.h>
>  #include <asm/early_printk.h>
>  #include <asm/processor.h>

There's no need for xen/lib.h to come ahead of xen/init.h, is there?

> --- /dev/null
> +++ b/xen/arch/ppc/stubs.c
> @@ -0,0 +1,351 @@
>[...]
> +static void ack_none(struct irq_desc *irq)
> +{
> +    BUG();
> +}
> +
> +static void end_none(struct irq_desc *irq)
> +{
> +    BUG();
> +}
> +
> +hw_irq_controller no_irq_type = {
> +    .typename = "none",
> +    .startup = irq_startup_none,
> +    .shutdown = irq_shutdown_none,
> +    .enable = irq_enable_none,
> +    .disable = irq_disable_none,
> +    .ack = ack_none,
> +    .end = end_none
> +};

I would recommend to avoid filling pointers (and hence having private
hook functions) where it's not clear whether they'll be required. "end",
for example, is an optional hook on x86. Iirc common code doesn't use
any of the hooks.

Jan



 


Rackspace

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