Skip to contentSkip to conversation

gitignore: Add tags file to .gitignore

PATCH In review Siddharth Chandrasekaran 2 participants 5 messages Jun 9, 2021 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitignore: Add tags file to .gitignore

Add ctags tags file to .gitignore so they don't get checked-in accidentally.

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 784cb2d..8534fb7 100644
@@ -1,3 +1,4 @@
+tags
 .gdbinit
 *.a
 *.d
Signature · 12 lines
2.17.1




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
#1 lore raw

PATCH 1/1 x86: Fix misspelled KVM parameter in error message

KVM module parameter force_emulation_prefix is misspelled with a "forced"; fix it.

---
 x86/emulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/emulator.c +1 -1
index 6100b6d..97f28ba 100644
@@ -1124,7 +1124,7 @@ int main(void)
 		test_mov_dr(mem);
 	} else {
 		report_skip("skipping register-only tests, "
-			    "use kvm.forced_emulation_prefix=1 to enable");
+			    "use kvm.force_emulation_prefix=1 to enable");
 	}
 
 	test_push16(mem);
Signature · 12 lines
2.17.1




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
#3 lore raw

PATCH 1/1 x86: Add hyper-v overlay page tests

In reply to Siddharth Chandrasekaran

Patch series [1] starts treating hypercall code page as an overlay page (along with the existing synic event and message pages). Add KVM unit tests to make sure the underlying page contents are intact with various overlay workflows.

[1]: https://www.spinics.net/lists/kvm/msg244569.html

---
 x86/Makefile.common  |  3 ++
 x86/hyperv.h         |  1 +
 x86/hyperv_overlay.c | 96 ++++++++++++++++++++++++++++++++++++++++++++
 x86/unittests.cfg    |  5 +++
 4 files changed, 105 insertions(+)
 create mode 100644 x86/hyperv_overlay.c
x86/Makefile.common +3 -0
index 55f7f28..85dc427 100644
@@ -62,6 +62,7 @@ tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
                $(TEST_DIR)/init.flat $(TEST_DIR)/smap.flat \
                $(TEST_DIR)/hyperv_synic.flat $(TEST_DIR)/hyperv_stimer.flat \
                $(TEST_DIR)/hyperv_connections.flat \
+               $(TEST_DIR)/hyperv_overlay.flat \
                $(TEST_DIR)/umip.flat $(TEST_DIR)/tsx-ctrl.flat
 
 test_cases: $(tests-common) $(tests)
@@ -82,6 +83,8 @@ $(TEST_DIR)/hyperv_stimer.elf: $(TEST_DIR)/hyperv.o
 
 $(TEST_DIR)/hyperv_connections.elf: $(TEST_DIR)/hyperv.o
 
+$(TEST_DIR)/hyperv_overlay.elf: $(TEST_DIR)/hyperv.o
+
 arch_clean:
 	$(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
 	$(TEST_DIR)/.*.d lib/x86/.*.d \
x86/hyperv.h +1 -0
index e135221..6f69c29 100644
@@ -52,6 +52,7 @@
 #define HV_X64_MSR_STIMER3_CONFIG               0x400000B6
 #define HV_X64_MSR_STIMER3_COUNT                0x400000B7
 
+#define HV_OVERLAY_ENABLE                       (1ULL << 0)
 #define HV_SYNIC_CONTROL_ENABLE                 (1ULL << 0)
 #define HV_SYNIC_SIMP_ENABLE                    (1ULL << 0)
 #define HV_SYNIC_SIEFP_ENABLE                   (1ULL << 0)
x86/hyperv_overlay.c new file +96 -0

96 lines not on this page · raw message

x86/unittests.cfg +5 -0
index 0698d15..330a829 100644
@@ -372,6 +372,11 @@ arch = x86_64
 groups = hyperv
 check = /sys/devices/system/clocksource/clocksource0/current_clocksource=tsc
 
+[hyperv_overlay]
+file = hyperv_overlay.flat
+extra_params = -cpu kvm64,hv_vpindex,hv_synic
+groups = hyperv
+
 [intel_iommu]
 file = intel-iommu.flat
 arch = x86_64
Signature · 12 lines
2.17.1




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
maintainer
#4 lore raw
In reply to Siddharth Chandrasekaran
Quoted 14 lines · Siddharth Chandrasekaran

Add ctags tags file to .gitignore so they don't get checked-in accidentally.

---
  .gitignore | 1 +
  1 file changed, 1 insertion(+)
.gitignore +0 -0
index 784cb2d..8534fb7 100644

.gitignore line 4

Quoted 4 lines
.gitignore +1 -0
@@ -1,3 +1,4 @@
+tags
  .gdbinit
  *.a
  *.d

If you're using them, you might consider adding the Makefile rules to create the files. Alternatively, you can add "tags" to your global ~/.git/info/exclude.

Having the file but not the rules feels like the worst of both worlds...

maintainer Applied
#2 lore raw

Re: [kvm-unit-tests PATCH] x86: Fix misspelled KVM parameter in error message

In reply to Siddharth Chandrasekaran
Quoted 14 lines · Siddharth Chandrasekaran

KVM module parameter force_emulation_prefix is misspelled with a "forced"; fix it.

---
  x86/emulator.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
x86/emulator.c +0 -0
index 6100b6d..97f28ba 100644

x86/emulator.c int main(void) · line 1130

Quoted 8 lines
x86/emulator.c +1 -1
@@ -1124,7 +1124,7 @@ int main(void)
  		test_mov_dr(mem);
  	} else {
  		report_skip("skipping register-only tests, "
-			    "use kvm.forced_emulation_prefix=1 to enable");
+			    "use kvm.force_emulation_prefix=1 to enable");
  	}
 
  	test_push16(mem);

Queued this one, thanks!

Paolo