Skip to content

Commit 48866f7

Browse files
committed
Compiles and works for Workstation 17.5.2 and Mainline kernel 6.9.1. Applied mkubecek#243 (comment) and mkubecek#239 (comment)
1 parent 2c6d66f commit 48866f7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

vmmon-only/include/x86msr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef struct MSRReply {
6767
typedef struct MSRQuery {
6868
uint32 msrNum; // IN
6969
uint32 numLogicalCPUs; // IN/OUT
70-
MSRReply logicalCPUs[0]; // OUT
70+
MSRReply logicalCPUs[]; // OUT
7171
} MSRQuery;
7272
#pragma pack(pop)
7373

vmnet-only/vmnetInt.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@
4141
compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \
4242
dev_queue_xmit(skb) \
4343
)
44-
#define dev_lock_list() read_lock(&dev_base_lock)
45-
#define dev_unlock_list() read_unlock(&dev_base_lock)
44+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
45+
# define dev_lock_list() rcu_read_lock()
46+
# define dev_unlock_list() rcu_read_unlock()
47+
#else
48+
# define dev_lock_list() read_lock(&dev_base_lock)
49+
# define dev_unlock_list() read_unlock(&dev_base_lock)
50+
#endif
4651

4752

4853
extern struct proto vmnet_proto;

0 commit comments

Comments
 (0)