[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 04/10] Introduce the CPU address space destruction functio
From: |
lixianglai |
Subject: |
Re: [PATCH v2 04/10] Introduce the CPU address space destruction function |
Date: |
Thu, 14 Sep 2023 21:00:32 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
Hi David:
On 12.09.23 04:11, xianglai li wrote:
Introduce new function to destroy CPU address space resources
for cpu hot-(un)plug.
How do other archs handle that? Or how are they able to get away
without destroying?
They do not remove the cpu address space, taking the X86 architecture as
an example:
1.Start the x86 VM:
./qemu-system-x86_64 \
-machine q35 \
-cpu Broadwell-IBRS \
-smp 1,maxcpus=100,sockets=100,cores=1,threads=1 \
-m 4G \
-drive file=~/anolis-8.8.qcow2 \
-serial stdio \
-monitor telnet:localhost:4498,server,nowait \
-nographic
2.Connect the qemu monitor
telnet 127.0.0.1 4498
info mtree
address-space: cpu-memory-0
address-space: memory
0000000000000000-ffffffffffffffff (prio 0, i/o): system
0000000000000000-000000007fffffff (prio 0, ram): alias ram-below-4g
@pc.ram 0000000000000000-000000007fffffff
0000000000000000-ffffffffffffffff (prio -1, i/o): pci
00000000000a0000-00000000000bffff (prio 1, i/o): vga-lowmem
3.Perform cpu hot swap int qemu monitor
device_add
Broadwell-IBRS-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=cpu1
device_del cpu1
info mtree
address-space: cpu-memory-0
address-space: cpu-memory-1
address-space: memory
0000000000000000-ffffffffffffffff (prio 0, i/o): system
0000000000000000-000000007fffffff (prio 0, ram): alias ram-below-4g
@pc.ram 0000000000000000-000000007fffffff
0000000000000000-ffffffffffffffff (prio -1, i/o): pci
00000000000a0000-00000000000bffff (prio 1, i/o): vga-lowmem
From the above test, you can see whether the address space of cpu1 is
residual after a cpu hot swap, and whether it is reasonable?
The address space destruction function of the CPU can be used to delete
the residual address space of the CPU1.
Thanks,
xianglai.
- [PATCH v2 00/10] Adds CPU hot-plug support to Loongarch, xianglai li, 2023/09/11
- [PATCH v2 03/10] make qdev_disconnect_gpio_out_named() public, xianglai li, 2023/09/11
- [PATCH v2 05/10] Added CPU topology support for Loongarch, xianglai li, 2023/09/11
- [PATCH v2 08/10] Add support of *unrealize* for Loongarch cpu, xianglai li, 2023/09/11
- [PATCH v2 07/10] Add basic CPU hot-(un)plug support for Loongarch, xianglai li, 2023/09/11
- [PATCH v2 04/10] Introduce the CPU address space destruction function, xianglai li, 2023/09/11
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, David Hildenbrand, 2023/09/12
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function,
lixianglai <=
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, David Hildenbrand, 2023/09/14
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, lixianglai, 2023/09/14
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, lixianglai, 2023/09/14
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, David Hildenbrand, 2023/09/15
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, lixianglai, 2023/09/15
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, Philippe Mathieu-Daudé, 2023/09/15
- Re: [PATCH v2 04/10] Introduce the CPU address space destruction function, David Hildenbrand, 2023/09/15
- RE: [PATCH v2 04/10] Introduce the CPU address space destruction function, Salil Mehta, 2023/09/26
- RE: [PATCH v2 04/10] Introduce the CPU address space destruction function, Salil Mehta, 2023/09/26
- RE: [PATCH v2 04/10] Introduce the CPU address space destruction function, Salil Mehta, 2023/09/26