Message ID | 20240125015420.1960090-5-maobibo@loongson.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | VM: selftests: Add LoongArch support | expand |
On Thu, Jan 25, 2024, Bibo Mao wrote: > diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c b/tools/testing/selftests/kvm/set_memory_region_test.c > index 075b80dbe237..7b09e59296be 100644 > --- a/tools/testing/selftests/kvm/set_memory_region_test.c > +++ b/tools/testing/selftests/kvm/set_memory_region_test.c > @@ -333,7 +333,7 @@ static void test_invalid_memory_region_flags(void) > struct kvm_vm *vm; > int r, i; > > -#if defined __aarch64__ || defined __x86_64__ > +#if defined __aarch64__ || defined __x86_64__ || __loongarch__ I assume that last one wants to be "defined __loongarch__" > supported_flags |= KVM_MEM_READONLY; > #endif > > -- > 2.39.3 >
On 2024/1/27 上午4:28, Sean Christopherson wrote: > On Thu, Jan 25, 2024, Bibo Mao wrote: >> diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c b/tools/testing/selftests/kvm/set_memory_region_test.c >> index 075b80dbe237..7b09e59296be 100644 >> --- a/tools/testing/selftests/kvm/set_memory_region_test.c >> +++ b/tools/testing/selftests/kvm/set_memory_region_test.c >> @@ -333,7 +333,7 @@ static void test_invalid_memory_region_flags(void) >> struct kvm_vm *vm; >> int r, i; >> >> -#if defined __aarch64__ || defined __x86_64__ >> +#if defined __aarch64__ || defined __x86_64__ || __loongarch__ > > I assume that last one wants to be "defined __loongarch__" Good catch, it should be "defined __loongarch__". And I will refresh the patch in the next version. Regards Bibo Mao > >> supported_flags |= KVM_MEM_READONLY; >> #endif >> >> -- >> 2.39.3 >>
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index 492e937fab00..0261c87b0bb3 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -56,6 +56,10 @@ LIBKVM_s390x += lib/s390x/ucall.c LIBKVM_riscv += lib/riscv/processor.c LIBKVM_riscv += lib/riscv/ucall.c +LIBKVM_loongarch += lib/loongarch/processor.c +LIBKVM_loongarch += lib/loongarch/ucall.c +LIBKVM_loongarch += lib/loongarch/exception.S + # Non-compiled test targets TEST_PROGS_x86_64 += x86_64/nx_huge_pages_test.sh @@ -196,6 +200,18 @@ TEST_GEN_PROGS_riscv += steal_time SPLIT_TESTS += get-reg-list +TEST_GEN_PROGS_loongarch += demand_paging_test +TEST_GEN_PROGS_loongarch += dirty_log_perf_test +TEST_GEN_PROGS_loongarch += dirty_log_test +TEST_GEN_PROGS_loongarch += guest_print_test +TEST_GEN_PROGS_loongarch += hardware_disable_test +TEST_GEN_PROGS_loongarch += kvm_binary_stats_test +TEST_GEN_PROGS_loongarch += kvm_create_max_vcpus +TEST_GEN_PROGS_loongarch += kvm_page_table_test +TEST_GEN_PROGS_loongarch += memslot_modification_stress_test +TEST_GEN_PROGS_loongarch += memslot_perf_test +TEST_GEN_PROGS_loongarch += set_memory_region_test + TEST_PROGS += $(TEST_PROGS_$(ARCH_DIR)) TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(ARCH_DIR)) TEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c b/tools/testing/selftests/kvm/set_memory_region_test.c index 075b80dbe237..7b09e59296be 100644 --- a/tools/testing/selftests/kvm/set_memory_region_test.c +++ b/tools/testing/selftests/kvm/set_memory_region_test.c @@ -333,7 +333,7 @@ static void test_invalid_memory_region_flags(void) struct kvm_vm *vm; int r, i; -#if defined __aarch64__ || defined __x86_64__ +#if defined __aarch64__ || defined __x86_64__ || __loongarch__ supported_flags |= KVM_MEM_READONLY; #endif