Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151211522
D10540.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10540.diff
View Options
Index: sys/amd64/vmm/intel/ept.c
===================================================================
--- sys/amd64/vmm/intel/ept.c
+++ sys/amd64/vmm/intel/ept.c
@@ -54,13 +54,17 @@
#define AD_BITS_SUPPORTED(cap) ((cap) & (1UL << 21))
#define INVVPID_SUPPORTED(cap) ((cap) & (1UL << 32))
-#define INVVPID_ALL_TYPES_MASK 0xF0000000000UL
-#define INVVPID_ALL_TYPES_SUPPORTED(cap) \
- (((cap) & INVVPID_ALL_TYPES_MASK) == INVVPID_ALL_TYPES_MASK)
-
-#define INVEPT_ALL_TYPES_MASK 0x6000000UL
-#define INVEPT_ALL_TYPES_SUPPORTED(cap) \
- (((cap) & INVEPT_ALL_TYPES_MASK) == INVEPT_ALL_TYPES_MASK)
+#define INVVPID_REQUIRED_TYPES_MASK \
+ ((1UL << (INVVPID_TYPE_SINGLE_CONTEXT + 40)) | \
+ (1UL << (INVVPID_TYPE_ALL_CONTEXTS + 40)))
+#define INVVPID_REQUIRED_TYPES_SUPPORTED(cap) \
+ (((cap) & INVVPID_REQUIRED_TYPES_MASK) == INVVPID_REQUIRED_TYPES_MASK)
+
+#define INVEPT_REQUIRED_TYPES_MASK \
+ ((1UL << (INVEPT_TYPE_SINGLE_CONTEXT + 24)) | \
+ (1UL << (INVEPT_TYPE_ALL_CONTEXTS + 24)))
+#define INVEPT_REQUIRED_TYPES_SUPPORTED(cap) \
+ (((cap) & INVEPT_REQUIRED_TYPES_MASK) == INVEPT_REQUIRED_TYPES_MASK)
#define EPT_PWLEVELS 4 /* page walk levels */
#define EPT_ENABLE_AD_BITS (1 << 6)
@@ -86,15 +90,15 @@
* Verify that:
* - page walk length is 4 steps
* - extended page tables can be laid out in write-back memory
- * - invvpid instruction with all possible types is supported
- * - invept instruction with all possible types is supported
+ * - invvpid instruction with required types is supported
+ * - invept instruction with required types is supported
*/
if (!EPT_PWL4(cap) ||
!EPT_MEMORY_TYPE_WB(cap) ||
!INVVPID_SUPPORTED(cap) ||
- !INVVPID_ALL_TYPES_SUPPORTED(cap) ||
+ !INVVPID_REQUIRED_TYPES_SUPPORTED(cap) ||
!INVEPT_SUPPORTED(cap) ||
- !INVEPT_ALL_TYPES_SUPPORTED(cap))
+ !INVEPT_REQUIRED_TYPES_SUPPORTED(cap))
return (EINVAL);
ept_pmap_flags = ipinum & PMAP_NESTED_IPIMASK;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 9:09 PM (7 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31049697
Default Alt Text
D10540.diff (1 KB)
Attached To
Mode
D10540: vmx: explicit checking for necessary invvpid/invept types
Attached
Detach File
Event Timeline
Log In to Comment