linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] rust: arch/um: Rust support for UML
@ 2022-12-17  4:44 David Gow
  2022-12-17  4:44 ` [PATCH 1/3] rust: arch/um: Use 'pie' relocation mode under UML David Gow
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: David Gow @ 2022-12-17  4:44 UTC (permalink / raw)
  To: Miguel Ojeda, Björn Roy Baron, Richard Weinberger,
	Anton Ivanov, Johannes Berg, Thomas Gleixner, Ingo Molnar,
	Nathan Chancellor, Nick Desaulniers
  Cc: David Gow, rust-for-linux, linux-um, llvm, linux-doc, kunit-dev,
	x86, linux-kernel, Wedson Almeida Filho, Gary Guo,
	Brendan Higgins, Daniel Latypov, Jonathan Corbet

This series adds support for building and running code in the Rust
programming language under x86_64 UML kernels.

It is based on two Pull Requests from the Rust-for-Linux GitHub page:
- https://github.com/Rust-for-Linux/linux/pull/766
- https://github.com/Rust-for-Linux/linux/pull/881

The series consists of three patches: the first two set up various
compiler options to match both the UML and the X86 CFLAGS.

Rust support can be enabled by setting CONFIG_RUST=y, when the suitable
Rust compiler and bindgen versions are available (run make rustavaiable
to check). LLVM=1 is also required at present with all Rust builds.

The whole thing can be built and tested with kunit.py:
./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_RUST=y --make_options LLVM=1

(Note that there are no Rust-based KUnit tests upstream yet. The "rust"
branch of the Rust-for-Linux GitHub repository does use KUnit for its
"doctests", and all of those tests pass under UML with these patches.)

This series is currently based on the uml/next branch: I'm happy to
rebase it next year once we're past the 6.2 merge window (though it
applies cleanly to torvalds/master at the moment). Equally, it
should be possible to take these changes in via the rust tree instead,
but since it's mostly UML Makefile changes, it probably makes more sense
for it to go in via the uml tree.

Also note that this series marks UML as a "maintained" architecture for
Rust support. It's definitely my intention to keep this working, but if
anyone has serious concerns, we can downgrade that.

Cheers,
-- David

David Gow (3):
  rust: arch/um: Use 'pie' relocation mode under UML
  rust: arch/um: Disable FP/SIMD instruction to match x86
  rust: arch/um: Add support for CONFIG_RUST under x86_64 UML

 Documentation/rust/arch-support.rst | 2 ++
 arch/um/Kconfig                     | 1 +
 arch/um/Makefile                    | 2 ++
 arch/x86/Makefile.um                | 6 ++++++
 4 files changed, 11 insertions(+)

-- 
2.39.0.314.g84b9a713c41-goog


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-15 21:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-17  4:44 [PATCH 0/3] rust: arch/um: Rust support for UML David Gow
2022-12-17  4:44 ` [PATCH 1/3] rust: arch/um: Use 'pie' relocation mode under UML David Gow
2023-01-15 10:30   ` Thomas Meyer
2022-12-17  4:44 ` [PATCH 2/3] rust: arch/um: Disable FP/SIMD instruction to match x86 David Gow
2023-01-15  9:47   ` Sergio González Collado
2022-12-17  4:44 ` [PATCH 3/3] rust: arch/um: Add support for CONFIG_RUST under x86_64 UML David Gow
2023-01-15  9:49   ` Sergio González Collado
2023-01-15  9:51   ` Sergio González Collado
2023-01-15 21:42   ` Miguel Ojeda
2022-12-17 11:59 ` [PATCH 0/3] rust: arch/um: Rust support for UML Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).