[PATCH kvm-unit-tests 1/5] hyperv: move test dev control codes to C file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hyperv_testdev control codes aren't used outside hyperv.c so move them
there.  While at this, adjust the types to avoid surprizes with left
shifts.

Signed-off-by: Roman Kagan <rkagan@xxxxxxxxxxxxx>
---
 x86/hyperv.h | 6 ------
 x86/hyperv.c | 9 ++++++++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/x86/hyperv.h b/x86/hyperv.h
index bef0317..553c588 100644
--- a/x86/hyperv.h
+++ b/x86/hyperv.h
@@ -155,12 +155,6 @@ struct hv_message_page {
         struct hv_message sint_message[HV_SYNIC_SINT_COUNT];
 };
 
-enum {
-    HV_TEST_DEV_SINT_ROUTE_CREATE = 1,
-    HV_TEST_DEV_SINT_ROUTE_DESTROY,
-    HV_TEST_DEV_SINT_ROUTE_SET_SINT
-};
-
 static inline bool synic_supported(void)
 {
    return cpuid(HYPERV_CPUID_FEATURES).a & HV_X64_MSR_SYNIC_AVAILABLE;
diff --git a/x86/hyperv.c b/x86/hyperv.c
index 2511aa2..aa55614 100644
--- a/x86/hyperv.c
+++ b/x86/hyperv.c
@@ -1,7 +1,14 @@
 #include "hyperv.h"
 #include "asm/io.h"
+#include "smp.h"
 
-static void synic_ctl(u8 ctl, u8 vcpu_id, u8 sint)
+enum {
+    HV_TEST_DEV_SINT_ROUTE_CREATE = 1,
+    HV_TEST_DEV_SINT_ROUTE_DESTROY,
+    HV_TEST_DEV_SINT_ROUTE_SET_SINT,
+};
+
+static void synic_ctl(u32 ctl, u32 vcpu_id, u32 sint)
 {
     outl((ctl << 16)|((vcpu_id) << 8)|sint, 0x3000);
 }
-- 
2.9.4




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux