Implement a new virtual PCI driver based on the VFIO framework.
This driver allows users to pass through PCI devices to UML via
VFIO. Currently, only MSI-X capable devices are supported, and
it is assumed that drivers will use MSI-X.
Signed-off-by: Tiwei Bie
---
This driver has been tested with
On 2025/4/8 02:12, Sasha Levin wrote:
> From: Tiwei Bie
>
> [ Upstream commit 33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc ]
>
> The existing sigio workaround implementation removes FDs from the
> poll when events are triggered, requiring users to re-add them via
> add_sigio_
On 2025/4/8 02:12, Sasha Levin wrote:
> From: Tiwei Bie
>
> [ Upstream commit d295beeed2552a987796d627ba7d0985b1e2d72f ]
>
> The write_sigio thread and UML kernel thread share the same errno,
> which can lead to conflicts when both call syscalls concurrently.
> Switch
On 2025/4/8 02:10, Sasha Levin wrote:
> From: Tiwei Bie
>
> [ Upstream commit 33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc ]
>
> The existing sigio workaround implementation removes FDs from the
> poll when events are triggered, requiring users to re-add them via
> add_sigio_
On 2025/4/8 02:10, Sasha Levin wrote:
> From: Tiwei Bie
>
> [ Upstream commit d295beeed2552a987796d627ba7d0985b1e2d72f ]
>
> The write_sigio thread and UML kernel thread share the same errno,
> which can lead to conflicts when both call syscalls concurrently.
> Switch
On 2025/3/20 16:32, Johannes Berg wrote:
> On Wed, 2025-03-19 at 21:55 +0800, Tiwei Bie wrote:
>> Directly creating helper threads with VM_CLONE using clone can
>> compromise the thread safety of errno. Since all these helper
>> threads have been converted to use os_run_h
On 2025/3/20 16:50, Johannes Berg wrote:
> On Sun, 2025-03-16 at 00:19 +0800, Tiwei Bie wrote:
>> Implement a new virtual PCI driver based on the VFIO framework.
>> This driver allows users to pass through PCI devices to UML via
>> VFIO. Currently, only MSI-X capable devic
The -x option is deprecated and might be removed in a future release
of gnome-terminal. Let's recommend using -- instead.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/xterm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xt
Under Wayland, we should check WAYLAND_DISPLAY instead.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/xterm.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c
index e4316c7981e8..f607af738eac 100644
--- a/arch/um
Tiwei Bie (2):
um: xterm: Add Wayland support
um: xterm: Update options for gnome-terminal
arch/um/drivers/xterm.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
--
2.34.1
On 2025/3/20 16:32, Johannes Berg wrote:
> On Wed, 2025-03-19 at 21:55 +0800, Tiwei Bie wrote:
>> Directly creating helper threads with VM_CLONE using clone can
>> compromise the thread safety of errno. Since all these helper
>> threads have been converted to use os_run_h
On 2025/3/26 00:31, Benjamin Berg wrote:
> On Tue, 2025-03-18 at 22:55 +0800, Tiwei Bie wrote:
>> On 2025/3/18 21:16, Johannes Berg wrote:
>>> On Tue, 2025-03-18 at 14:06 +0100, Johannes Berg wrote:
>>>> On Thu, 2025-03-06 at 23:07 +0800, Tiwei Bie wrote:
>&g
The ubd io thread and UML kernel thread share the same errno, which
can lead to conflicts when both call syscalls concurrently. Switch to
the pthread-based helper to address this issue.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/ubd.h | 6 --
arch/um/drivers/ubd_kern.c | 25
The write_sigio thread and UML kernel thread share the same errno,
which can lead to conflicts when both call syscalls concurrently.
Switch to the pthread-based helper to address this issue.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/sigio.c | 44 +---
1
/20250221084049.1332318-1-tiwei@antgroup.com/
Tiwei Bie (4):
um: Add pthread-based helper support
um: ubd: Switch to the pthread-based helper
um: Switch to the pthread-based helper in sigio workaround
um: Prohibit the VM_CLONE flag in run_helper_thread()
arch/um/drivers/ubd.h | 6 ++--
arch/um
Introduce a new set of utility functions that can be used to create
pthread-based helpers. Helper threads created in this way will ensure
thread safety for errno while sharing the same memory space.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/os.h | 5 +++
arch/um/os-Linux/helper.c
Directly creating helper threads with VM_CLONE using clone can
compromise the thread safety of errno. Since all these helper
threads have been converted to use os_run_helper_thread(), let's
prevent using this flag in run_helper_thread().
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/hel
On 2025/3/19 17:11, Johannes Berg wrote:
> On Thu, 2025-03-06 at 23:07 +0800, Tiwei Bie wrote:
>> +void os_kill_helper_thread(struct os_helper_thread *td)
>> +{
>> +pthread_kill(td->handle, SIGKILL);
>
> This ends up killing everything.
>
[...]
>
> Any
On 2025/3/18 21:16, Johannes Berg wrote:
> On Tue, 2025-03-18 at 14:06 +0100, Johannes Berg wrote:
>> On Thu, 2025-03-06 at 23:07 +0800, Tiwei Bie wrote:
>>> Introduce a new set of utility functions that can be used to create
>>> pthread-based helpers. Helper threa
On 2025/3/18 21:06, Johannes Berg wrote:
> On Thu, 2025-03-06 at 23:07 +0800, Tiwei Bie wrote:
>> Introduce a new set of utility functions that can be used to create
>> pthread-based helpers. Helper threads created in this way will ensure
>> thread safety for errno while sh
is inefficient due to frequent FD
removal and re-addition. Rewrite the implementation based on epoll
and tgkill for improved efficiency and reliability.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/random.c | 2 +-
arch/um/drivers/rtc_user.c | 2 +-
arch/um/include/shared/os.h
Implement a new virtual PCI driver based on the VFIO framework.
This driver allows users to pass through PCI devices to UML via
VFIO. Currently, only MSI-X capable devices are supported, and
it is assumed that drivers will use MSI-X.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/Kconfig
2926434-1-tiwei@antgroup.com/
v1:
- Add more details in the commit log;
RFC:
https://lore.kernel.org/all/20250310074057.3977758-1-tiwei@antgroup.com/
Tiwei Bie (3):
um: Rewrite the sigio workaround based on epoll and tgkill
um: virt-pci: Refactor virtio_pcidev into its own module
um:
Decouple virt-pci and virtio_pcidev, refactoring virtio_pcidev into
its own module. Define a set of APIs for virt-pci. This allows for
future addition of more PCI emulation implementations.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/Kconfig | 12 +-
arch/um/drivers/Makefile
The current implementation is somewhat convoluted and inefficient,
and can lead to race conditions when updating sigio fds. This change
rewrites the implementation based on epoll and tgkill for improved
scalability and reliability.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/random.c
The ubd io thread and UML kernel thread share the same errno, which
can lead to conflicts when both call syscalls concurrently. Switch to
the pthread-based helper to address this issue.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/ubd.h | 6 --
arch/um/drivers/ubd_kern.c | 25
v2:
- Do not define the thread handle type as void *;
- Minor tweaks to commit messages, log and comments;
v1:
https://lore.kernel.org/all/20250221084049.1332318-1-tiwei@antgroup.com/
Tiwei Bie (4):
um: Add pthread-based helper support
um: ubd: Switch to the pthread-based helper
um
Decouple virt-pci and virtio_pcidev, refactoring virtio_pcidev into
its own module. Define a set of APIs for virt-pci. This allows for
future addition of more PCI emulation implementations.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/Kconfig | 12 +-
arch/um/drivers/Makefile
p.com/
Tiwei Bie (3):
um: Rewrite the sigio workaround based on epoll and tgkill
um: virt-pci: Refactor virtio_pcidev into its own module
um: Add VFIO-based virtual PCI driver
arch/um/drivers/Kconfig | 20 +-
arch/um/drivers/Makefile| 5 +-
arch/um/drivers/random.c
Implement a new virtual PCI driver based on the VFIO framework.
This driver allows users to pass through PCI devices to UML via
VFIO. Currently, only MSI-X capable devices are supported, and
it is assumed that drivers will use MSI-X.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/Kconfig
The write_sigio thread and UML kernel thread share the same errno,
which can lead to conflicts when both call syscalls concurrently.
Switch to the pthread-based helper to address this issue.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/sigio.c | 44 +---
1
Introduce a new set of utility functions that can be used to create
pthread-based helpers. Helper threads created in this way will ensure
thread safety for errno while sharing the same memory space.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/os.h | 5 +++
arch/um/os-Linux/helper.c
Directly creating helper threads with VM_CLONE using clone can
compromise the thread safety of errno. Since all these helper
threads have been converted to use os_run_helper_thread(), let's
prevent using this flag in run_helper_thread().
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/hel
The write_sigio thread and UML kernel thread share the same errno,
which can lead to conflicts when both call syscalls concurrently.
Switch to the pthread-based helper to address this issue.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/sigio.c | 44 +---
1
Directly creating helper threads with VM_CLONE using clone can
compromise the thread safety of errno. Since all these helper
threads have been converted to use os_run_helper_thread(), let's
prevent using this flag in run_helper_thread().
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/hel
The ubd io thread and UML kernel thread share the same errno, which
can lead to conflicts when both call syscalls concurrently. Switch to
the pthread-based helper to address this issue.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/ubd.h | 4 ++--
arch/um/drivers/ubd_kern.c | 25
Introduce a new set of utility functions that can be used to create
pthread-based helpers. Helper threads created in this way will ensure
thread safety for errno while sharing memory address space.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/os.h | 3 ++
arch/um/os-Linux/helper.c
Tiwei Bie (4):
um: Add the pthread-based helper support
um: ubd: Switch to the pthread-based helper
um: Switch to the pthread-based helper in sigio workaround
um: Prohibit the VM_CLONE flag in run_helper_thread()
arch/um/drivers/ubd.h | 4 +--
arch/um/drivers/ubd_kern.c | 25
When uml_reserved is updated, min_low_pfn must also be updated
accordingly. Otherwise, min_low_pfn will not accurately reflect
the lowest available PFN.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/mem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel
Instead of dynamically allocating the pointer to the vdso page during
boot, we can just allocate it statically. Doing so will reduce error
handling and make the code slightly more readable.
Signed-off-by: Tiwei Bie
---
arch/x86/um/vdso/vma.c | 17 +++--
1 file changed, 3 insertions
Tiwei Bie (2):
um: Include missing headers in asm/pgtable.h
um: Remove unused asm/archparam.h header
arch/um/include/asm/pgtable.h | 3 +++
arch/x86/um/asm/archparam.h | 20
2 files changed, 3 insertions(+), 20 deletions(-)
delete mode 100644 arch/x86/um/asm
This header is no longer used after the removal of fixmap support
in commit 5bfc4a3a0af3 ("um: Remove obsolete fixmap support").
Signed-off-by: Tiwei Bie
---
arch/x86/um/asm/archparam.h | 20
1 file changed, 20 deletions(-)
delete mode 100644 arch/x86/um/asm/a
/202501131814.e6cxjull-...@intel.com/
Fixes: 5bfc4a3a0af3 ("um: Remove obsolete fixmap support")
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/pgtable.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index 9be6daca95be..56
Tiwei Bie (9):
um: Mark parse_host_cpu_flags as __init
um: Mark parse_cache_line as __init
um: Mark get_top_address as __init
um: Mark set_stklim as __init
um: Mark install_fatal_handler as __init
um: Mark setup_env_path as __init
um: Remove unused PGD_BOUND macro
um: Remove unused
It's no longer used since commit 11100b1dfb6e ("uml: delete
unused code").
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 3f0be24b3633..13f3bfeb6378 100644
--- a/a
It's only invoked during boot from main().
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index cf9697aa17f3..3f394f25e059 100644
--- a/arch/um/os-Linux/main.c
+++ b
It's no longer used since commit 42fda66387da ("uml: throw out
CONFIG_MODE_TT").
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 13f3bfeb6378..3c63ce19e3bf 100644
-
It's only invoked during boot from main().
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 3f394f25e059..3f0be24b3633 100644
--- a/arch/um/os-Linux/main.c
+++ b
It's only invoked during boot from get_host_cpu_features().
Signed-off-by: Tiwei Bie
---
arch/um/kernel/um_arch.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index c5e91d3fb64e..852267542a06 100644
--- a/ar
It's only invoked during boot from main().
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 0afcdeb8995b..cf9697aa17f3 100644
--- a/arch/um/os-Linux/main.c
+++ b
It's no longer used since commit 6aa802ce6acc ("uml: throw out
CHOOSE_MODE").
Signed-off-by: Tiwei Bie
---
arch/um/kernel/process.c | 8
arch/x86/um/shared/sysdep/ptrace.h | 2 --
2 files changed, 10 deletions(-)
diff --git a/arch/um/kernel/process.c b
It's only invoked during boot from get_host_cpu_features().
Signed-off-by: Tiwei Bie
---
arch/um/kernel/um_arch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 62ddb865eb91..c5e91d3fb64e 100644
--- a/arch/um/k
It's only invoked during boot from linux_main().
Signed-off-by: Tiwei Bie
---
arch/um/kernel/um_arch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 852267542a06..3e03a716c6ec 100644
--- a/arch/um/kernel/um_a
When calculating max_physmem, we've already factored in the space
used by iomem. We don't need to subtract it again.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/um_arch.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel
It's not used anywhere. And its definition doesn't seem right.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/pgtable.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index 12bfc58a8580..79ff979520bb 100644
---
Tiwei Bie (3):
um: Remove unused MODULES_LEN macro
um: Remove obsolete fixmap support
um: Count iomem_size only once in physmem calculation
arch/um/include/asm/fixmap.h | 56 ---
arch/um/include/asm/pgtable.h | 6 +---
arch/um/kernel/mem.c | 15
It was added to support highmem. But since the highmem support has
been removed by commit a98a6d864d3b ("um: Remove broken highmem
support"), it is no longer needed. Remove it to simplify the code.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/fixm
STACKTRACE")
Signed-off-by: Tiwei Bie
---
arch/um/kernel/sysrq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c
index 4bb8622dc512..e3b6a2fd75d9 100644
--- a/arch/um/kernel/sysrq.c
+++ b/arch/um/kernel/sysrq.c
@@ -52,5 +52
Tiwei Bie (4):
um: ubd: Initialize ubd's disk pointer in ubd_add
um: ubd: Do not use drvdata in release
um: net: Do not use drvdata in release
um: vector: Do not use drvdata in release
arch/um/drivers/net_kern.c| 2 +-
arch/um/drivers/ubd_kern.c| 4 +++-
arch/um/dr
1af/0x2c3
[<6004ede3>] ? assign_work+0x0/0x58
[<600527a1>] worker_thread+0x2f7/0x37a
[<6004ee3b>] ? set_pf_worker+0x0/0x64
[<6005765d>] ? arch_local_irq_save+0x0/0x2d
[<60058e07>] ? kthread_exit+0x0/0x3a
[<600524aa>] ? worker_thread+0x0/0x37a
[<60058f9f>] kthr
save+0x0/0x2d
[<6005d748>] ? kthread_exit+0x0/0x3a
[<60057d21>] ? worker_thread+0x0/0x293
[<6005dbf1>] kthread+0x126/0x12b
[<600219c5>] new_thread_handler+0x85/0xb6
Cc: sta...@vger.kernel.org
Signed-off-by: Tiwei Bie
---
arch/um/drivers/net_kern.c | 2 +-
1 file chang
save+0x0/0x2d
[<6005d748>] ? kthread_exit+0x0/0x3a
[<60057d21>] ? worker_thread+0x0/0x293
[<6005dbf1>] kthread+0x126/0x12b
[<600219c5>] new_thread_handler+0x85/0xb6
Cc: sta...@vger.kernel.org
Signed-off-by: Tiwei Bie
---
arch/um/drivers/vector_kern.c | 3 ++-
1 file
Currently, the initialization of the disk pointer in the ubd structure
is missing. It should be initialized with the allocated gendisk pointer
in ubd_add().
Fixes: 32621ad7a7ea ("ubd: remove the ubd_gendisk array")
Signed-off-by: Tiwei Bie
---
arch/um/drivers/ubd_kern.c | 2 ++
1 fi
On 2024/10/26 20:56, Johannes Berg wrote:
> On Sat, 2024-10-26 at 13:04 +0200, Benjamin Berg wrote:
+#include
>>>
>>> Hmm. If this works, why do we have UML_CONFIG_64BIT? For ASM stuff?
>>
>> So, I just had a quick look. It seems that before commit a95b37e20db9
>> ("kbuild: get out of
The write_sigio thread is not really a traditional thread. Set
the parent-death signal for it to ensure that it will be killed
if the UML kernel dies unexpectedly without proper cleanup.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/sigio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a
This helper can be used to set the parent-death signal of the calling
process to SIGKILL to ensure that the process will be killed if the
UML kernel dies unexpectedly without proper cleanup. This helper will
be used in the follow-up patches.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared
Since we have a helper now, let's switch to using it. It will make
the code slightly more consistent.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/chan_user.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
The ubd io thread is not really a traditional thread. Set the
parent-death signal for it to ensure that it will be killed if
the UML kernel dies unexpectedly without proper cleanup.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/ubd_kern.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch
The ubd io and write_sigio threads/processes may leak e.g. when
the main process is killed by "kill -9". Fix it by setting the
parent-death signal for them.
Tiwei Bie (4):
um: Add os_set_pdeathsig helper function
um: Set parent-death signal for ubd io thread/process
um: Set pa
On 2024/10/23 22:08, Benjamin Berg wrote:
[...]
> diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
> index c663b67c3fd3..a29957e021f3 100644
> --- a/arch/um/os-Linux/skas/process.c
> +++ b/arch/um/os-Linux/skas/process.c
> @@ -16,6 +16,7 @@
> #include
> #include
>
code and remove the unreachable code.
Reviewed-by: Benjamin Berg
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/pgtable.h | 37 +++---
arch/um/include/asm/tlbflush.h | 4 +-
arch/um/include/shared/os.h | 2 -
arch/um/include/shared/skas/stub-data.h | 1
g/all/20241011053843.1623089-1-tiwei@antgroup.com/
Tiwei Bie (2):
um: Abandon the _PAGE_NEWPROT bit
um: Rename _PAGE_NEWPAGE to _PAGE_NEEDSYNC
arch/um/include/asm/page.h | 2 +-
arch/um/include/asm/pgtable-2level.h| 2 +-
arch/um/include/asm/pgtable-4level.h| 14 ++---
The _PAGE_NEWPAGE bit does not really indicate that this is a new page,
but rather whether this entry needs to be synced or not. Renaming it
to _PAGE_NEEDSYNC will make it more clear how everything ties together.
Suggested-by: Benjamin Berg
Signed-off-by: Tiwei Bie
---
arch/um/include/asm
Hi,
On 2024/10/11 15:39, Benjamin Berg wrote:
> Hi,
>
> On Fri, 2024-10-11 at 13:38 +0800, Tiwei Bie wrote:
>> When a PTE is updated in the page table, the _PAGE_NEWPAGE bit will
>> always be set. And the corresponding page will always be mapped or
>> unmapped depe
Hi Johannes,
On 2024/10/11 15:38, Johannes Berg wrote:
> Hi Tiwei,
>
> So kind of a nit, but if the resulting code looks like this:
>
>> @@ -184,17 +172,14 @@ static inline pte_t pte_wrprotect(pte_t pte)
>> {
>> if (likely(pte_get_bits(pte, _PAGE_RW)))
>> pte_clear_bits(pte, _
code and remove the unreachable code.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/pgtable.h | 40 ---
arch/um/include/shared/os.h | 2 -
arch/um/include/shared/skas/stub-data.h | 1 -
arch/um/kernel/skas/stub.c | 10
arch/um/kernel/tlb.c
It does nothing but emit a warning when 'debug' is provided in the
kernel command line. It can be a bit annoying, as 'debug' is also a
valid kernel parameter to enable kernel debugging.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/um_arch.c | 13 -
1 file c
This parameter is UML specific and is unknown to kernel. It should
not be propagated to kernel, otherwise it will trigger a warning and
be passed to user space as an environment option.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/hostaudio_kern.c | 1 +
1 file changed, 1 insertion(+)
diff
ned-off-by: Tiwei Bie
---
fs/hostfs/hostfs_kern.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 6d1cf2436ead..8d47c6b70c9f 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -57,6 +57,7 @@ static int __init hostfs
Tiwei Bie (9):
um: Remove UML specific debug parameter
um: Do not propagate mem parameter to kernel
um: Do not propagate uml_dir parameter to kernel
um: Do not propagate dtb parameter to kernel
um: Do not propagate noreboot parameter to kernel
hostfs: Do not propagate hostfs parameter
This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it could be passed to user space as
a command line option by kernel with a warning like:
Unknown kernel command line parameters "noreboot", will be passed to user space.
Signed-off
This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it will be passed to user space as
an environment option by kernel with a warning like:
Unknown kernel command line parameters "mem=2G", will be passed to user space.
Signed-off
This parameter is UML specific and is unknown to kernel. It should
not be propagated to kernel, otherwise it will trigger a warning and
be passed to user space as an environment option.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/hostaudio_kern.c | 1 +
1 file changed, 1 insertion(+)
diff
This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it will be passed to user space as
an environment option by kernel with a warning like:
Unknown kernel command line parameters "dtb=/foo", will be passed to user space.
Signed-off
This parameter is UML specific. It specifies the name of the file
containing the initrd image, which is unknown to kernel.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/initrd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index
ned-off-by: Tiwei Bie
---
arch/um/os-Linux/umid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index e09d65b05d1c..eb523ab1e218 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -358,6 +358,8 @@ char *get_umid(void)
On 2024/7/5 03:05, Benjamin Berg wrote:
[...]
> static int userspace_tramp(void *stack)
> {
> - struct sigaction sa;
> - void *addr;
> - int fd;
> + char *const argv[] = { "uml-userspace", NULL };
> + int pipe_fds[2];
> unsigned long long offset;
> - unsigned long se
On 2024/7/5 03:05, Benjamin Berg wrote:
[...]
> diff --git a/arch/x86/um/os-Linux/task_size.c
> b/arch/x86/um/os-Linux/task_size.c
> index 1dc9adc20b1c..a91599799b1a 100644
> --- a/arch/x86/um/os-Linux/task_size.c
> +++ b/arch/x86/um/os-Linux/task_size.c
> @@ -1,151 +1,19 @@
> // SPDX-License-Ide
On 2024/9/19 15:22, Benjamin Berg wrote:
> On Thu, 2024-09-19 at 08:54 +0200, Johannes Berg wrote:
>> On Wed, 2024-09-18 at 14:17 +0800, Tiwei Bie wrote:
>>> The highmem support has been removed by commit a98a6d864d3b ("um:
>>> Remove broken highmem supp
The highmem support has been removed by commit a98a6d864d3b ("um:
Remove broken highmem support"). The 2-level page table is sufficient
on UML/i386 now. Remove the 3-level page table support on UML/i386
which is still marked as experimental.
Suggested-by: Benjamin Berg
Signed-off-by:
Changes in v2:
- Add "um: Fix potential integer overflow during physmem setup";
v1: https://lore.kernel.org/all/20240913142137.248245-1-tiwei@antgroup.com/
Tiwei Bie (4):
um: Remove the redundant declaration of high_physmem
um: Fix potential integer overflow during physmem
high_physmem has already been declared in as-layout.h, so there is
no need to declare it explicitly in the .c file again.
While at it, group the declarations of __real_malloc and __real_free
together to make the code slightly more readable.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c
Highmem was only supported on UML/i386. And the support has been
removed by commit a98a6d864d3b ("um: Remove broken highmem support").
Remove the leftovers and stop UML from trying to setup highmem when
the sum of physmem_size and iomem_size exceeds max_physmem.
Signed-off-by:
Currently physmem_size is defined as long long but declared locally
as unsigned long long before using it in separate .c files. Make them
match by defining physmem_size as unsigned long long and also move
the declaration to a common header to allow the compiler to check it.
Signed-off-by: Tiwei
This issue happens when the real map size is greater than LONG_MAX,
which can be easily triggered on UML/i386.
Fixes: fe205bdd1321 ("um: Print minimum physical memory requirement")
Signed-off-by: Tiwei Bie
---
arch/um/kernel/physmem.c | 6 +++---
1 file changed, 3 insertions(+), 3
o too.
Regards,
Tiwei
>
> When I took a look at it for the 4-level page table support on 64 bit I
> got a bit confused. But I had not realized that highmem support had
> been removed.
>
> Benjamin
>
> On Fri, 2024-09-13 at 22:21 +0800, Tiwei Bie wrote:
>> Highmem wa
Highmem was only supported on UML/i386. And the support has been
removed by commit a98a6d864d3b ("um: Remove broken highmem support").
Remove the leftovers and stop UML from trying to setup highmem when
the sum of physmem_size and iomem_size exceeds max_physmem.
Signed-off-by:
Tiwei Bie (3):
um: Remove the redundant declaration of high_physmem
um: Remove highmem leftovers
um: Fix the definition for physmem_size
arch/um/drivers/virtio_uml.c | 9 -
arch/um/include/shared/as-layout.h | 3 ++-
arch/um/include/shared/mem_user.h | 5 ++---
arch/um
Currently physmem_size is defined as long long but declared locally
as unsigned long long before using it in separate .c files. Make them
match by defining physmem_size as unsigned long long and also move
the declaration to a common header to allow the compiler to check it.
Signed-off-by: Tiwei
high_physmem has already been declared in as-layout.h, so there is
no need to declare it explicitly in the .c file again.
While at it, group the declarations of __real_malloc and __real_free
together to make the code slightly more readable.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c
1 - 100 of 191 matches
Mail list logo