-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0001-vmmon-bit-fix-for-w17.0.2.patch
196 lines (178 loc) · 5.89 KB
/
0001-vmmon-bit-fix-for-w17.0.2.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
From aafb12380350d4d08b5cbea3aa5fe19522edc47d Mon Sep 17 00:00:00 2001
From: zetta shao <[email protected]>
Date: Sun, 23 Jun 2024 00:41:46 +0800
Subject: [PATCH] vmmon-bit-fix-for-w17.0.2
---
vmmon-only/common/task.c | 2 +-
vmmon-only/common/vmx86.c | 6 +++---
vmmon-only/include/x86cpuid.h | 2 +-
vmmon-only/include/x86msr.h | 2 +-
vmmon-only/linux/driver.c | 4 ++--
vmmon-only/linux/hostif.c | 6 +++---
vmnet-only/bridge.c | 2 +-
vmnet-only/driver.c | 4 ++--
vmnet-only/vnetInt.h | 7 ++++++-
9 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/vmmon-only/common/task.c b/vmmon-only/common/task.c
index 5d34cf4..f375206 100644
--- a/vmmon-only/common/task.c
+++ b/vmmon-only/common/task.c
@@ -544,7 +544,7 @@ Task_Terminate(void)
*-----------------------------------------------------------------------------
*/
-Selector
+static Selector
TaskGetFlatWriteableDataSegment(void)
{
DTR hostGDTR;
diff --git a/vmmon-only/common/vmx86.c b/vmmon-only/common/vmx86.c
index 86e52fb..cf64b12 100644
--- a/vmmon-only/common/vmx86.c
+++ b/vmmon-only/common/vmx86.c
@@ -49,7 +49,7 @@
#include "x86svm.h"
#include "x86cpuid_asm.h"
#if defined(__linux__)
-#include <asm/timex.h>
+#include <linux/timex.h>
#endif
#include "perfctr.h"
#include "x86vtinstr.h"
@@ -696,7 +696,7 @@ Vmx86FreeCrossPages(VMDriver *vm)
*-----------------------------------------------------------------------------
*/
-void
+static void
Vmx86FreeVMDriver(VMDriver *vm)
{
Vmx86_Free(vm->ptRootMpns);
@@ -729,7 +729,7 @@ Vmx86FreeVMDriver(VMDriver *vm)
*-----------------------------------------------------------------------------
*/
-VMDriver *
+static VMDriver *
Vmx86AllocVMDriver(uint32 numVCPUs)
{
VMDriver *vm = Vmx86_Calloc(1, sizeof *vm, TRUE);
diff --git a/vmmon-only/include/x86cpuid.h b/vmmon-only/include/x86cpuid.h
index 1fe6fcd..2996ae4 100644
--- a/vmmon-only/include/x86cpuid.h
+++ b/vmmon-only/include/x86cpuid.h
@@ -92,7 +92,7 @@ typedef struct CPUIDQuery {
uint32 eax; // IN
uint32 ecx; // IN
uint32 numLogicalCPUs; // IN/OUT
- CPUIDReply logicalCPUs[0]; // OUT
+ CPUIDReply logicalCPUs[]; // OUT
} CPUIDQuery;
#pragma pack(pop)
#endif
diff --git a/vmmon-only/include/x86msr.h b/vmmon-only/include/x86msr.h
index 189c982..bc0e6ef 100644
--- a/vmmon-only/include/x86msr.h
+++ b/vmmon-only/include/x86msr.h
@@ -67,7 +67,7 @@ typedef struct MSRReply {
typedef struct MSRQuery {
uint32 msrNum; // IN
uint32 numLogicalCPUs; // IN/OUT
- MSRReply logicalCPUs[0]; // OUT
+ MSRReply logicalCPUs[]; // OUT
} MSRQuery;
#pragma pack(pop)
diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
index 3d8b722..ab8e2dc 100644
--- a/vmmon-only/linux/driver.c
+++ b/vmmon-only/linux/driver.c
@@ -267,7 +267,7 @@ LinuxDriverInitTSCkHz(void)
*----------------------------------------------------------------------
*/
-int
+static int
LinuxDriverInit(void)
{
int retval;
@@ -335,7 +335,7 @@ LinuxDriverInit(void)
*----------------------------------------------------------------------
*/
-void
+static void
LinuxDriverExit(void)
{
/*
diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
index b9e3d30..4ed1d5a 100644
--- a/vmmon-only/linux/hostif.c
+++ b/vmmon-only/linux/hostif.c
@@ -2922,7 +2922,7 @@ HostIF_CallOnEachCPU(void (*func)(void*), // IN: function to call
*-----------------------------------------------------------------------------
*/
-Bool
+static Bool
HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
MPN mpn) // IN: The MPN
{
@@ -3042,7 +3042,7 @@ HostIF_ReadPhysical(VMDriver *vm, // IN: The VM instance
*----------------------------------------------------------------------
*/
-int
+static int
HostIFWritePhysicalWork(MA ma, // MA to be written to
VA64 addr, // src data to write
Bool kernelBuffer, // is the buffer in kernel space?
@@ -3201,7 +3201,7 @@ HostIF_GetCurrentPCPU(void)
*----------------------------------------------------------------------
*/
-int
+static int
HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
unsigned int rate) //IN: current clock rate
{
diff --git a/vmnet-only/bridge.c b/vmnet-only/bridge.c
index bc4727c..be8140e 100644
--- a/vmnet-only/bridge.c
+++ b/vmnet-only/bridge.c
@@ -1411,7 +1411,7 @@ VNetBridgeComputeHeaderPos(struct sk_buff *skb) // IN: buffer to examine
*----------------------------------------------------------------------
*/
-void
+static void
VNetBridgeSendLargePacket(struct sk_buff *skb, // IN: packet to split
VNetBridge *bridge) // IN: bridge
{
diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
index f314ff2..4cf1335 100644
--- a/vmnet-only/driver.c
+++ b/vmnet-only/driver.c
@@ -296,7 +296,7 @@ VNetRemovePortFromList(const VNetPort *port) // IN: port to remove from list
*/
int
-vmnet_init_module(void)
+static vmnet_init_module(void)
{
int retval;
@@ -374,7 +374,7 @@ err_proto:
*----------------------------------------------------------------------
*/
-void
+static void
vmnet_cleanup_module(void)
{
unregister_chrdev(VNET_MAJOR_NUMBER, "vmnet");
diff --git a/vmnet-only/vnetInt.h b/vmnet-only/vnetInt.h
index f6a90a1..c9e8953 100644
--- a/vmnet-only/vnetInt.h
+++ b/vmnet-only/vnetInt.h
@@ -218,7 +218,12 @@ extern int VNetProc_Init(void);
extern void VNetProc_Cleanup(void);
-
+// int VNetNetIf_Create(char *devName, VNetPort **ret, int hubNum);
+// int VNetUserIf_Create(VNetPort **ret);
+// int VNetBridge_Create(const char *devName, uint32 flags, VNetJack *hubJack,
+// VNetPort **ret);
+// int VNetUserListener_Create(uint32 classMask, VNetJack *hubJack,
+// VNetPort **port);
/*
*----------------------------------------------------------------------
*
--
2.43.0