OpenCloudOS-Kernel/arch
Bibo Mao c555314c68 LoongArch: KVM: Add PV steal time support in guest side
commit 03779999ac30 ("LoongArch: KVM: Add PV steal time support in guest side")
Conflict: none
Backport-reason: Synchronize upstream linux loongarch kvm
patch to support loongarch virtualization.
Checkpatch: no, to be consistent with upstream commit.

Per-cpu struct kvm_steal_time is added here, its size is 64 bytes and
also defined as 64 bytes, so that the whole structure is in one physical
page.

When a VCPU is online, function pv_enable_steal_time() is called. This
function will pass guest physical address of struct kvm_steal_time and
tells hypervisor to enable steal time. When a vcpu is offline, physical
address is set as 0 and tells hypervisor to disable steal time.

Here is an output of vmstat on guest when there is workload on both host
and guest. It shows steal time stat information.

procs -----------memory---------- -----io---- -system-- ------cpu-----
 r  b   swpd   free  inact active   bi    bo   in   cs us sy id wa st
15  1      0 7583616 184112  72208    20    0  162   52 31  6 43  0 20
17  0      0 7583616 184704  72192    0     0 6318 6885  5 60  8  5 22
16  0      0 7583616 185392  72144    0     0 1766 1081  0 49  0  1 50
16  0      0 7583616 184816  72304    0     0 6300 6166  4 62 12  2 20
18  0      0 7583632 184480  72240    0     0 2814 1754  2 58  4  1 35

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
2024-11-06 19:36:38 +08:00
..
alpha Revert "change alloc_pages name in dma_map_ops to avoid name conflicts" 2024-09-04 13:28:24 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:32:33 +02:00
arm crypto: simd - Do not call crypto_alloc_tfm during registration 2024-10-10 11:57:26 +02:00
arm64 config: iommu: default arm64 iommu Lazy mode 2024-10-16 12:40:03 +08:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:34:02 +02:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:34:02 +02:00
ia64 vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
loongarch LoongArch: KVM: Add PV steal time support in guest side 2024-11-06 19:36:38 +08:00
m68k m68k: Fix kernel_clone_args.flags in m68k_clone() 2024-10-04 16:29:05 +02:00
microblaze microblaze: don't treat zero reserved memory regions as error 2024-09-30 16:25:08 +02:00
mips MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed 2024-09-12 11:11:39 +02:00
nios2
openrisc openrisc: Call setup_memory() earlier in the init sequence 2024-08-29 17:33:39 +02:00
parisc parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards 2024-10-10 11:57:49 +02:00
powerpc Merge linux 6.6.57 2024-10-21 14:40:59 +08:00
riscv Merge linux 6.6.57 2024-10-21 14:40:59 +08:00
s390 Merge linux 6.6.57 2024-10-21 14:40:59 +08:00
sh sh: rework sync_file_range ABI 2024-07-05 09:34:02 +02:00
sparc sparc64: Fix incorrect function signature and add prototype for prom_cif_init 2024-08-03 08:53:55 +02:00
um um: line: always fill *error_out in setup_one_line() 2024-09-12 11:11:35 +02:00
x86 x86/mce: Avoid triggering a schedule call in the NMI context 2024-11-04 16:54:55 +08:00
xtensa xtensa: fix MAKE_PC_FROM_RA second argument 2024-05-17 12:02:32 +02:00
.gitignore
Kconfig config: set CPU_MITIGATIONS_DEFAULT_OFF in debug kernel 2024-09-26 20:57:38 +08:00