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

Re: [PATCH for-next 5/6] xen: Add files needed for minimal riscv build


  • To: Connor Davis <connojdavis@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 25 Feb 2021 23:14:53 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=iS4d3V536nQHSLVDQ4f2Rad+5QcRgjHc9Atug2YiTxQ=; b=UH7uPkgTFDu+PuPSAFXbXzXJSoStclX91yKSw27c0u9RTJmVYMeFvFvM5IavlHgiSqSwhupz+3ibnNpMjILXhFnMOVt+FQwB8C9777UsgIhRUqxSoqo5SY1uEyjtDg0vVV27G+bD6DrlRwDV66bAeb7qJVwJgkHWsIN5AqwaSDJE/UlOnA+kqs4MTg22Ly5/OQiG6eZoSUHk4WPTS2B75FEOOc+xNbpC5Iw3UTWJI3niCpkgORPyvOHHJRdkfOKCjov7a7bh23zH6aUHJ55jdBA+6Wz/N9XD4IsDiD0YBdebiqaecM8/lplF4dd3BEsIz+nZtQeIOqHB1fRrcxGddw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AckXllqC29DG4hA2nAeGGje9HsewVmQJJS0GLP7ajbGT8blpWrnPdLKMzsN0k88UQPUX4y+h5hasUFgmZE0Qlpj4B/zGegMCG1eURdWjMS224xJFzGifq6nHcmmPPoE+UIPr/T34GW1zDKJbfPa6ip5rkmlsZ0Jd3vJFaN3g/URXj3oxcrbpuOT7bvpp+PgWt1hMr6ZjYoH/87Ub+YpCorqZN7e2msyeO1EYj2y2mn9RBGUjF8BX80XEAgP0tef0YnPPvMyXwy+JotwocWkFfTxQHyiZjs609/T9o3AdWYz4AUO5YfoVdYejOuiDKexant5auSWdzWy63TXM3sGl0Q==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Bobby Eshleman <bobbyeshleman@xxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Feb 2021 23:15:32 +0000
  • Ironport-sdr: RcA/4aZsQLkKV5IyqIhyU8SxcfoGrv7hOo4OoyFGs360lv21b//ZXoJTkJq9oLmalQE30gLMo1 ghjePXEyRGh+0fS6Da1YuBdIt+2FokK77HNFhU8ORXkc48kGvCnhqVix9CXkCicD8Bmead4FKt +O/wI0XofRFDdDWE7cC5bjSvA6NH1LoJ4NMhEXGQyrCdRtwG9JVLow1og9Eu8CfFEUyGgYtQwg kl5fEnmTclyAiNW7gqDKFWGdbu/7H2dezXvXdUOef6rUMEmAV4YM2O+NA7eU0CF4CyVbakqsIn Rns=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25/02/2021 15:24, Connor Davis wrote:
> Add the minimum code required to get xen to build with
> XEN_TARGET_ARCH=riscv64. It is minimal in the sense that every file and
> function added is required for a successful build, given the .config
> generated from riscv64_defconfig. The function implementations are just
> stubs; actual implmentations will need to be added later.
>
> Signed-off-by: Connor Davis <connojdavis@xxxxxxxxx>
> ---
>  config/riscv64.mk                        |   7 +
>  xen/Makefile                             |   8 +-
>  xen/arch/riscv/Kconfig                   |  54 ++++
>  xen/arch/riscv/Kconfig.debug             |   0
>  xen/arch/riscv/Makefile                  |  57 ++++
>  xen/arch/riscv/README.source             |  19 ++
>  xen/arch/riscv/Rules.mk                  |  13 +
>  xen/arch/riscv/arch.mk                   |   7 +
>  xen/arch/riscv/configs/riscv64_defconfig |  12 +
>  xen/arch/riscv/delay.c                   |  16 +
>  xen/arch/riscv/domain.c                  | 144 +++++++++
>  xen/arch/riscv/domctl.c                  |  36 +++
>  xen/arch/riscv/guestcopy.c               |  57 ++++
>  xen/arch/riscv/head.S                    |   6 +
>  xen/arch/riscv/irq.c                     |  78 +++++
>  xen/arch/riscv/lib/Makefile              |   1 +
>  xen/arch/riscv/lib/find_next_bit.c       | 284 +++++++++++++++++
>  xen/arch/riscv/mm.c                      |  93 ++++++
>  xen/arch/riscv/p2m.c                     | 150 +++++++++
>  xen/arch/riscv/percpu.c                  |  17 +
>  xen/arch/riscv/platforms/Kconfig         |  31 ++
>  xen/arch/riscv/riscv64/asm-offsets.c     |  31 ++
>  xen/arch/riscv/setup.c                   |  27 ++
>  xen/arch/riscv/shutdown.c                |  28 ++
>  xen/arch/riscv/smp.c                     |  35 +++
>  xen/arch/riscv/smpboot.c                 |  34 ++
>  xen/arch/riscv/sysctl.c                  |  33 ++
>  xen/arch/riscv/time.c                    |  35 +++
>  xen/arch/riscv/traps.c                   |  35 +++
>  xen/arch/riscv/vm_event.c                |  39 +++
>  xen/arch/riscv/xen.lds.S                 | 113 +++++++
>  xen/drivers/char/serial.c                |   1 +
>  xen/include/asm-riscv/altp2m.h           |  39 +++
>  xen/include/asm-riscv/asm.h              |  77 +++++
>  xen/include/asm-riscv/asm_defns.h        |  24 ++
>  xen/include/asm-riscv/atomic.h           | 204 ++++++++++++
>  xen/include/asm-riscv/bitops.h           | 331 ++++++++++++++++++++
>  xen/include/asm-riscv/bug.h              |  54 ++++
>  xen/include/asm-riscv/byteorder.h        |  16 +
>  xen/include/asm-riscv/cache.h            |  24 ++
>  xen/include/asm-riscv/cmpxchg.h          | 382 +++++++++++++++++++++++
>  xen/include/asm-riscv/compiler_types.h   |  32 ++
>  xen/include/asm-riscv/config.h           | 110 +++++++
>  xen/include/asm-riscv/cpufeature.h       |  17 +
>  xen/include/asm-riscv/csr.h              | 219 +++++++++++++
>  xen/include/asm-riscv/current.h          |  47 +++
>  xen/include/asm-riscv/debugger.h         |  15 +
>  xen/include/asm-riscv/delay.h            |  15 +
>  xen/include/asm-riscv/desc.h             |  12 +
>  xen/include/asm-riscv/device.h           |  15 +
>  xen/include/asm-riscv/div64.h            |  23 ++
>  xen/include/asm-riscv/domain.h           |  50 +++
>  xen/include/asm-riscv/event.h            |  42 +++
>  xen/include/asm-riscv/fence.h            |  12 +
>  xen/include/asm-riscv/flushtlb.h         |  34 ++
>  xen/include/asm-riscv/grant_table.h      |  12 +
>  xen/include/asm-riscv/guest_access.h     |  41 +++
>  xen/include/asm-riscv/guest_atomics.h    |  60 ++++
>  xen/include/asm-riscv/hardirq.h          |  27 ++
>  xen/include/asm-riscv/hypercall.h        |  12 +
>  xen/include/asm-riscv/init.h             |  42 +++
>  xen/include/asm-riscv/io.h               | 283 +++++++++++++++++
>  xen/include/asm-riscv/iocap.h            |  13 +
>  xen/include/asm-riscv/iommu.h            |  46 +++
>  xen/include/asm-riscv/irq.h              |  58 ++++
>  xen/include/asm-riscv/mem_access.h       |   4 +
>  xen/include/asm-riscv/mm.h               | 246 +++++++++++++++
>  xen/include/asm-riscv/monitor.h          |  65 ++++
>  xen/include/asm-riscv/nospec.h           |  25 ++
>  xen/include/asm-riscv/numa.h             |  41 +++
>  xen/include/asm-riscv/p2m.h              | 218 +++++++++++++
>  xen/include/asm-riscv/page-bits.h        |  11 +
>  xen/include/asm-riscv/page.h             |  73 +++++
>  xen/include/asm-riscv/paging.h           |  15 +
>  xen/include/asm-riscv/pci.h              |  31 ++
>  xen/include/asm-riscv/percpu.h           |  33 ++
>  xen/include/asm-riscv/processor.h        |  59 ++++
>  xen/include/asm-riscv/random.h           |   9 +
>  xen/include/asm-riscv/regs.h             |  23 ++
>  xen/include/asm-riscv/setup.h            |  14 +
>  xen/include/asm-riscv/smp.h              |  46 +++
>  xen/include/asm-riscv/softirq.h          |  16 +
>  xen/include/asm-riscv/spinlock.h         |  12 +
>  xen/include/asm-riscv/string.h           |  28 ++
>  xen/include/asm-riscv/sysregs.h          |  16 +
>  xen/include/asm-riscv/system.h           |  99 ++++++
>  xen/include/asm-riscv/time.h             |  31 ++
>  xen/include/asm-riscv/trace.h            |  12 +
>  xen/include/asm-riscv/types.h            |  60 ++++
>  xen/include/asm-riscv/vm_event.h         |  55 ++++
>  xen/include/asm-riscv/xenoprof.h         |  12 +
>  xen/include/public/arch-riscv.h          | 183 +++++++++++
>  xen/include/public/arch-riscv/hvm/save.h |  39 +++
>  xen/include/public/hvm/save.h            |   2 +
>  xen/include/public/pmu.h                 |   2 +
>  xen/include/public/xen.h                 |   2 +
>  xen/include/xen/domain.h                 |   1 +

Well - this is orders of magnitude more complicated than it ought to
be.  An empty head.S doesn't (well - shouldn't) need the overwhelming
majority of this.

Do you know how all of this is being pulled in?  Is it from attempting
to compile common/ by any chance?

Now is also an excellent opportunity to nuke the x86isms which have
escaped into common code (debugger and xenoprof in particular), and
rethink some of our common/arch split.

When it comes to header files specifically, I want to start using
xen/arch/$ARCH/include/asm/ and retrofit this to x86 and ARM.  It has
two important properties - first, that you don't need to symlink the
tree to make compilation work, and second that patches touching multiple
architectures have hunks ordered in a more logical way.

~Andrew



 


Rackspace

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