Compare commits
13
Commits
w15.5.0
...
w15.5.2-k4.16
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5879d1a579 | ||
|
|
5a787a3885 | ||
|
|
088bb0b42a | ||
|
|
0e49b360f8 | ||
|
|
2d784fa447 | ||
|
|
c98c7ac72f | ||
|
|
2339a171cd | ||
|
|
69c1fd1ebc | ||
|
|
a05174e18d | ||
|
|
6147a29561 | ||
|
|
f7e11fa412 | ||
|
|
02fd1f0829 | ||
|
|
bf5aeaca48 |
No files matched your search
@@ -136,9 +136,6 @@ ifdef VMX86_DEBUG
|
||||
CC_OPTS += -DVMX86_DEBUG
|
||||
endif
|
||||
|
||||
# Add Spectre options when available
|
||||
CC_OPTS += $(call vm_check_gcc,-mindirect-branch=thunk -mindirect-branch-register,)
|
||||
|
||||
include $(SRCROOT)/Makefile.kernel
|
||||
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@ $(DRIVER)-y := $(subst $(SRCROOT)/, , $(patsubst %.c, %.o, \
|
||||
$(SRCROOT)/bootstrap/*.c)))
|
||||
|
||||
clean:
|
||||
rm -rf $(wildcard $(DRIVER).mod.c $(DRIVER).ko .tmp_versions \
|
||||
rm -rf $(wildcard $(DRIVER).mod.c $(DRIVER).ko .tmp_versions .cache.mk \
|
||||
Module.symvers Modules.symvers Module.markers modules.order \
|
||||
$(foreach dir,linux/ common/ vmcore/ bootstrap/ \
|
||||
./,$(addprefix $(dir),.*.cmd .*.o.flags *.o)))
|
||||
@@ -2307,12 +2307,23 @@ TaskSwitchToMonitor(VMCrossPage *crosspage)
|
||||
{
|
||||
uint64 raxGetsWiped, rcxGetsWiped;
|
||||
|
||||
#ifdef CALL_NOSPEC
|
||||
__asm__ __volatile__(CALL_NOSPEC
|
||||
: "=a" (raxGetsWiped),
|
||||
"=c" (rcxGetsWiped)
|
||||
: "0" (codePtr),
|
||||
"1" (crosspage),
|
||||
THUNK_TARGET(codePtr)
|
||||
: "rdx", "r8", "r9", "r10", "r11", "cc", "memory");
|
||||
#else
|
||||
__asm__ __volatile__("call *%%rax"
|
||||
: "=a" (raxGetsWiped),
|
||||
"=c" (rcxGetsWiped)
|
||||
: "0" (codePtr),
|
||||
"1" (crosspage)
|
||||
: "rdx", "r8", "r9", "r10", "r11", "cc", "memory");
|
||||
#endif
|
||||
|
||||
}
|
||||
#elif defined(_MSC_VER)
|
||||
/*
|
||||
|
||||
@@ -67,6 +67,7 @@ extern "C" {
|
||||
#if defined (VMKPANIC)
|
||||
#include "vmk_assert.h"
|
||||
#else /* !VMKPANIC */
|
||||
#include <linux/kernel.h>
|
||||
#define _ASSERT_PANIC(name) \
|
||||
Panic(_##name##Fmt "\n", __FILE__, __LINE__)
|
||||
#define _ASSERT_PANIC_BUG(bug, name) \
|
||||
@@ -107,7 +108,7 @@ NORETURN void Panic_NoSave(const char *fmt, ...) PRINTF_DECL(1, 2);
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
NORETURN void Panic(const char *fmt, ...) PRINTF_DECL(1, 2);
|
||||
#define Panic panic
|
||||
#endif
|
||||
|
||||
void LogThrottled(uint32 *count, const char *fmt, ...) PRINTF_DECL(2, 3);
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#define INCLUDE_ALLOW_VMCORE
|
||||
#include "includeCheck.h"
|
||||
|
||||
#include <asm/processor-flags.h>
|
||||
|
||||
#define X86_MAX_INSTR_LEN 15 /* Max byte length of an x86 instruction. */
|
||||
|
||||
#define NUM_IDT_VECTORS 256
|
||||
@@ -75,7 +77,9 @@
|
||||
#define CR3_PDB_MASK 0xfffff000
|
||||
#define CR3_IGNORE 0xFFF
|
||||
#define PAE_CR3_IGNORE 0x1F
|
||||
#ifndef CR3_PCID_MASK
|
||||
#define CR3_PCID_MASK 0xFFF
|
||||
#endif
|
||||
#define CR3_NO_FLUSH (1ULL << 63)
|
||||
|
||||
#define CR4_VME 0x00000001
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#ifndef _X86MSR_H_
|
||||
#define _X86MSR_H_
|
||||
#include <asm/msr-index.h>
|
||||
#define INCLUDE_ALLOW_USERLEVEL
|
||||
#define INCLUDE_ALLOW_VMX
|
||||
|
||||
@@ -119,6 +120,7 @@ MSRQuery;
|
||||
#define MSR_ARCH_CAPABILITIES_RSBA (1ULL << 2)
|
||||
#define MSR_ARCH_CAPABILITIES_NOL1F_VMENTRY (1ULL << 3)
|
||||
#define MSR_ARCH_CAPABILITIES_SSB_NO (1ULL << 4)
|
||||
#define MSR_ARCH_CAPABILITIES_MDS_NO (1ULL << 5)
|
||||
|
||||
#define MSR_FLUSH_CMD 0x10b
|
||||
#define MSR_FLUSH_CMD_FLUSH_L1D (1ULL << 0)
|
||||
@@ -129,7 +131,10 @@ MSRQuery;
|
||||
|
||||
#define MSR_PRED_CMD_IBPB (1UL << 0)
|
||||
|
||||
|
||||
#ifndef MSR_MISC_FEATURES_ENABLES
|
||||
#define MSR_MISC_FEATURES_ENABLES 0x140
|
||||
#endif
|
||||
|
||||
/* Intel Core Architecture and later: use only architected counters. */
|
||||
#define IA32_MSR_PERF_CAPABILITIES 0x345
|
||||
@@ -469,7 +474,9 @@ typedef enum {
|
||||
#define MSR_K7_HWCR_SSEDIS 0x00008000ULL // Disable SSE bit
|
||||
#define MSR_K7_HWCR_MONMWAITUSEREN 0x00000400ULL // Enable MONITOR/MWAIT CPL>0
|
||||
#define MSR_K7_HWCR_TLBFFDIS 0x00000040ULL // Disable TLB Flush Filter
|
||||
#ifndef MSR_K7_HWCR_SMMLOCK
|
||||
#define MSR_K7_HWCR_SMMLOCK 0x00000001ULL // Lock SMM environment
|
||||
#endif
|
||||
|
||||
#ifndef MSR_K8_SYSCFG
|
||||
#define MSR_K8_SYSCFG 0xc0010010
|
||||
@@ -682,7 +689,11 @@ typedef unsigned char MTRRType;
|
||||
/*
|
||||
* MISC_FEATURES_ENABLES bits
|
||||
*/
|
||||
#ifdef MSR_MISC_FEATURES_ENABLES_CPUID_FAULT
|
||||
#define MSR_MISC_FEATURES_ENABLES_CPUID_FAULTING MSR_MISC_FEATURES_ENABLES_CPUID_FAULT
|
||||
#else
|
||||
#define MSR_MISC_FEATURES_ENABLES_CPUID_FAULTING 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -957,7 +957,7 @@ LinuxDriverReadTSC(void *data, // OUT: TSC values
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
__attribute__((always_inline)) static Bool
|
||||
__always_inline static Bool
|
||||
LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
|
||||
{
|
||||
TSCDelta tscDelta;
|
||||
@@ -1533,7 +1533,7 @@ LinuxDriver_Ioctl(struct file *filp, // IN:
|
||||
}
|
||||
|
||||
case IOCTL_VMX86_WRITE_PAGE: {
|
||||
#if VMX86_DEVEL
|
||||
#ifdef VMX86_DEVEL
|
||||
VMMReadWritePage req;
|
||||
|
||||
retval = HostIF_CopyFromUser(&req, ioarg, sizeof req);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*********************************************************
|
||||
* Copyright (C) 1998-2019 VMware, Inc. All rights reserved.
|
||||
* Copyright (C) 1998-2020 VMware, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -2323,7 +2323,7 @@ SetVMAPICAddr(VMDriver *vm, // IN/OUT: driver state
|
||||
volatile void *hostapic;
|
||||
|
||||
ASSERT_ON_COMPILE(APICR_SIZE <= PAGE_SIZE);
|
||||
hostapic = (volatile void *) ioremap_nocache(ma, PAGE_SIZE);
|
||||
hostapic = (volatile void *) ioremap(ma, PAGE_SIZE);
|
||||
if (hostapic) {
|
||||
if ((APIC_VERSIONREG(hostapic) & 0xF0) == 0x10) {
|
||||
vm->hostAPIC.base = (volatile uint32 (*)[4]) hostapic;
|
||||
|
||||
@@ -136,9 +136,6 @@ ifdef VMX86_DEBUG
|
||||
CC_OPTS += -DVMX86_DEBUG
|
||||
endif
|
||||
|
||||
# Add Spectre options when available
|
||||
CC_OPTS += $(call vm_check_gcc,-mindirect-branch=thunk -mindirect-branch-register,)
|
||||
|
||||
include $(SRCROOT)/Makefile.kernel
|
||||
|
||||
else
|
||||
|
||||
@@ -32,6 +32,6 @@ $(DRIVER)-y := driver.o hub.o userif.o netif.o bridge.o procfs.o smac_compat.o \
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -rf $(DRIVER).o $(DRIVER).mod.o $(DRIVER).mod.c $(DRIVER).ko \
|
||||
rm -rf $(DRIVER).o $(DRIVER).mod.o $(DRIVER).mod.c $(DRIVER).ko .cache.mk \
|
||||
.tmp_versions Module.symvers Modules.symvers Module.markers \
|
||||
modules.order $($(DRIVER)-y) .*.cmd .*.o.flags
|
||||
+8
-1
@@ -1,5 +1,5 @@
|
||||
/*********************************************************
|
||||
* Copyright (C) 1998-2013 VMware, Inc. All rights reserved.
|
||||
* Copyright (C) 1998-2013, 2020 VMware, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -137,6 +137,7 @@ VNetProcShow(struct seq_file *p, // IN:
|
||||
}
|
||||
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -168,6 +169,7 @@ static struct file_operations fops = {
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -203,7 +205,12 @@ VNetProcMakeEntryInt(VNetProcEntry *parent, // IN:
|
||||
} else {
|
||||
ent->data = data;
|
||||
ent->fn = fn;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||
ent->pde = proc_create_single_data(name, mode, parent->pde,
|
||||
VNetProcShow, ent);
|
||||
#else
|
||||
ent->pde = proc_create_data(name, mode, parent->pde, &fops, ent);
|
||||
#endif
|
||||
}
|
||||
if (ent->pde != NULL) {
|
||||
*ret = ent;
|
||||
|
||||
+11
-11
@@ -78,11 +78,11 @@ static int VNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp);
|
||||
extern unsigned int vnet_max_qlen;
|
||||
|
||||
#if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
|
||||
# define compat_kmap(page) kmap(page)
|
||||
# define compat_kunmap(page) kunmap(page)
|
||||
#else
|
||||
# define compat_kmap(page) kmap((page).p)
|
||||
# define compat_kunmap(page) kunmap((page).p)
|
||||
# define skb_frag_page(frag) (frag)->page
|
||||
# define skb_frag_size(frag) (frag)->size
|
||||
#endif
|
||||
#if COMPAT_LINUX_VERSION_CHECK_LT(5, 4, 0)
|
||||
# define skb_frag_off(frag) (frag)->page_offset
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -568,20 +568,20 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
|
||||
for (frag = skb_shinfo(skb)->frags;
|
||||
frag != skb_shinfo(skb)->frags + skb_shinfo(skb)->nr_frags;
|
||||
frag++) {
|
||||
if (frag->size > 0) {
|
||||
if (skb_frag_size(frag) > 0) {
|
||||
unsigned int tmpCsum;
|
||||
const void *vaddr;
|
||||
|
||||
vaddr = compat_kmap(frag->page);
|
||||
tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
|
||||
curr, frag->size, 0, &err);
|
||||
compat_kunmap(frag->page);
|
||||
vaddr = kmap(skb_frag_page(frag));
|
||||
tmpCsum = csum_and_copy_to_user(vaddr + skb_frag_off(frag),
|
||||
curr, skb_frag_size(frag), 0, &err);
|
||||
kunmap(skb_frag_page(frag));
|
||||
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
csum = csum_block_add(csum, tmpCsum, curr - buf);
|
||||
curr += frag->size;
|
||||
curr += skb_frag_size(frag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <linux/pci_ids.h>
|
||||
|
||||
/* LSILogic 53C1030 Parallel SCSI controller
|
||||
* LSILogic SAS1068 SAS controller
|
||||
*/
|
||||
@@ -53,7 +55,10 @@
|
||||
* VMware HD Audio codec
|
||||
* VMware HD Audio controller
|
||||
*/
|
||||
#ifndef PCI_VENDOR_ID_VMWARE
|
||||
#define PCI_VENDOR_ID_VMWARE 0x15AD
|
||||
#endif
|
||||
|
||||
#define PCI_DEVICE_ID_VMWARE_SVGA3 0x0406
|
||||
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
|
||||
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
|
||||
@@ -71,7 +76,11 @@
|
||||
#define PCI_DEVICE_ID_VMWARE_1394 0x0780
|
||||
#define PCI_DEVICE_ID_VMWARE_BRIDGE 0x0790
|
||||
#define PCI_DEVICE_ID_VMWARE_ROOTPORT 0x07A0
|
||||
|
||||
#ifndef PCI_DEVICE_ID_VMWARE_VMXNET3
|
||||
#define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07B0
|
||||
#endif
|
||||
|
||||
#define PCI_DEVICE_ID_VMWARE_PVSCSI 0x07C0
|
||||
#define PCI_DEVICE_ID_VMWARE_82574 0x07D0
|
||||
#define PCI_DEVICE_ID_VMWARE_AHCI 0x07E0
|
||||
|
||||
Reference in new issue
Block a user