[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BROKEN] Re: [PATCH v9 0/5] enable MMU for RISC-V
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Wed, 31 May 2023 12:45:52 +0100
- 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/VbPZ4Ysg5oOPxI5dTCJYqTy0gM7MCGNZ/t2NDvd/Dc=; b=LTOtyGhOMiXF5prH03AhistIaKiFG9kiFVcozkZaGLRinLAn2G9X6lklW5rjuSuSRLSnnbD2K6oO70x++gMX9GeDs3fuEA/XXYuk8g9EhDvxbYDhh/Lj0+aLOybI7sxx+SaXEoZSF+3zhhwVNuN9rgAo51XQqrKJ8TRt/3du5nHmBNwpi6anxCudfqd2igixl+gQ38Rfv/W/Lq39CIoHlfCDnZReYInL/lIuPh+15KIlxuKAYPKPqeKYu7LGihNHp+CIN8QpoJ4sj4AhcjkFIrVyCD7msV6L6yjQPfSfc6q9wfEEDgIfsxCeXVUd1CAc+BWZXGmsESPnCBG6sj0R3A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NOSkObuHN/Vijex/ZsHTfVc9bDYUUicAoIF2Dv5kfpbSFh5aOKxSNOXNY/toJhO+1Kgp2NqZdMDam+BjZHGFlTKJEGCdRCpVMeaxjiQ4Y4qcUPt3cmTj8wqnPFJQtHnv2M4vqRpMaS+0AhaTFWn9e+yNUcevRiQVRZXLxBCq9PAAob3T5Fz4AknK+yjYVCK9RomgttbEDynZkWTNFFxYijuAvQA/MTPdHopnp+3WvQ/T5jyEu7H0MwzbxTN1dI9S5n80b6QJeSw2eohRY9qncX0bw0rMgrIQTGe7LHwI+Krx4xEUC/6fkX0TWNLrDh9b8RHoR9tRo/FO1geubEYbgA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>
- Delivery-date: Wed, 31 May 2023 11:46:28 +0000
- Ironport-data: A9a23:ycdq3aqMlVWAFGjPlqxVu5ZmuaFeBmKsZBIvgKrLsJaIsI4StFCzt garIBmAPPiLMGb9L9x+atvg9x8O6MKDy4NqGQRq/CEwEXhA8ZuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKq04GtwUmAWP6gR5weDzCBNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXAGwmSyiqu96f+a+2YeQ0g9QIa/L3YZxK7xmMzRmBZRonabbqZvyQoPV+jHI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jeWraYSEEjCJbZw9ckKwj 2TK5WnmRDodM8SS02Gt+XOwnO7f2yj8Xer+EZXhrq862gTDnD175Bs+ekW+rfvllX6ES+ljK 14M8QUVookq+xn+JjX6d1jiyJKehTYbX9dTCOw7rgKQ0K3f4wWeLmcBRz9FLtchsaceVTEsk 1OEgd7tLThuq6GOD2KQ8K+OqjG/MjRTKnUNDQcGRwYY59jooKkokwnCCN1kFcadlcbpEDv9x zSLqikWhLgJi8MPkaKh8jjvjDOloJzURQcd/ATJWXmk6Ag/b4mgD6Si7lLR/PtbLIKUS1CHl HcBksmaqusJCPmlnSiMW/kEHavv6eyMNjbdmnZwE5Jn/DOok1aoeoZW5zNyLVloKe4LfDboZ AnYvgY52XNIFH6jbKsyaYThDc0vlPLkDY68CKGSacdSaJ9scgPB5DtpeUObw2Hqlg4rjL07P pCYN82rCB72FJha8dZ/fM9FuZdD+8z07Tq7qUzTp/h/7YejWQ==
- Ironport-hdrordr: A9a23:5ypkrKz/FzjlQXax9JKfKrPw6L1zdoMgy1knxilNoHxuH/Bw9v re+cjzsCWftN9/Yh4dcLy7VpVoIkmsl6Kdg7NwAV7KZmCP1FdARLsI0WKI+UyCJ8SRzI9gPa cLSdkFNDXzZ2IK8PoTNmODYqodKNrsytHWuQ/HpU0dKT2D88tbnn9E4gDwKDwQeCB2QaAXOb C7/cR9qz+paR0sH7+G7ilsZZmkmzXT/qiWGCI7Ow==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 25/05/2023 4:28 pm, Oleksii Kurochko wrote:
> Oleksii Kurochko (5):
> xen/riscv: add VM space layout
> xen/riscv: introduce setup_initial_pages
> xen/riscv: align __bss_start
> xen/riscv: setup initial pagetables
> xen/riscv: remove dummy_bss variable
These have just been committed.
But as I fed back to early drafts of this series, patch 2 is
sufficiently fragile and unwise as to be unacceptable in this form.
enable_mmu() is unsafe in multiple ways, from the compiler reordering
statements (the label needs to be in the asm statement for that to work
correctly), and because it * depends* on hooking all exceptions and
pagefault.
Any exception other than pagefault, or not taking a pagefault causes it
to malfunction, which means you will fail to boot depending on where Xen
was loaded into memory. It may not explode inside Qemu right now, but
it will not function reliably in the general case.
Furthermore, a combination of patch 2 and 4 breaks the CI integration of
looking for "All set up" at the end of start_xen(). It's not ok, from a
code quality point of view, to defer 99% of start_xen()'s functionality
into unrelated function.
Please do not do anything else until you've addressed these issues.
enable_mmu() needs to return normally, cont_after_mmu_is_enabled() needs
deleting entirely, and there needs to be an identity page for Xen to
land on so it isn't jumping into the void and praying not to explode.
Other minor issues include page.h not having __ASSEMBLY__ guards, mm.c
locally externing cpu0_boot_stack[] from setup.c when the declaration
needs to be in a header file somewhere, and SPDX tags.
~Andrew
|