Compare commits

...
Author SHA1 Message Date
Michal Kubecek 29cfea0504 vmnet: use standard definition of PCI_VENDOR_ID_VMWARE if available
The PCI_VENDOR_ID_VMWARE macro is defined in mainline pci_ids.h since
commit 94e57fea6202 ("PCI: Move PCI_VENDOR_ID_VMWARE to pci_ids.h")
in v3.18-rc1.
2020-09-15 21:59:56 +02:00
Michal Kubecek b4610316f5 vmmon: fix version check for <linux/frame.h> include
Both the version check for include of <linux/frame.h> in common/crosspage.c
and the comment explaining it are wrong for multiple reasons:

  1. <linux/frame.h> was introduced in v4.6-rc1, not v4.5-rc5
  2. ANNOTATE_INTRA_FUNCTION_CALL was introduced in v5.8-rc1, not v5.7
  3. Even if it were, the check should use ">=", not ">"
  4. Most important, the code in fact needs STACK_FRAME_NON_STANDARD

Without the definition of STACK_FRAME_NON_STANDARD, build against vanilla
5.7 kernel fails on objtool error (but succeeds against 5.7.1, because of
the mistake from point 3).

Change the check from "> 5.7" to ">= 4.6" to get STACK_FRAME_NON_STANDARD
whenever available and update the explaining comment.
2020-09-15 21:59:56 +02:00
Michal Kubecek 572c0ba586 vmmon: fix wrong VMX86_DEVEL test
If VMX86_DEVEL macro is not defined, preprocessor warns when it is tested
with "#if" in vmmon-only/linux/driver.c. As VMX86_DEVEL is tested with
"#ifdef" everywhere else, change this one test to match the rest.
2020-09-15 17:11:01 +02:00
3 changed files with 9 additions and 4 deletions

No files matched your search

+3 -3
View File
@@ -48,10 +48,10 @@
#ifdef __linux__
# include "driver-config.h"
/*
* linux/frame.h dates back to 4.5-rc5, we need the ANNOTATE_INTRA_FUNCTION_CALL
* definition from it which came in with 5.7.
* linux/frame.h dates back to 4.6-rc1, we need the STACK_FRAME_NON_STANDARD
* definition from it which is there from the start.
*/
# if LINUX_VERSION_CODE > KERNEL_VERSION(5, 7, 0)
# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
# include <linux/frame.h>
# endif
#endif
+1 -1
View File
@@ -1256,7 +1256,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);
+5
View File
@@ -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