Comments (10)
- VS 2019 (latest updates 16.11.0 ), WDK - Win10 (10.0.19041.685)
- C2131 errors (with non initialized members in constexpr) is still present, you can disable the constexpr as :
static auto nmi = // delete the constexpr
interrupt_t {
vmx::interrupt_type::nmi,
exception_vector::nmi_interrupt
}; // interrupt.h - C2220 error :
Configuration Properties > C++ > WX-
Configuration Properties > C++ > Command Line : /Zc:strictStrings- - LNK4210 :
Configuration Properties > Linker > Command Line /IGNORE:4210
from hvpp.
modify the interrupt_t private constructor like below
constexpr
interrupt_t(
vmx::interrupt_type interrupt_type,
exception_vector exception_vector,
exception_error_code_t exception_code,
bool exception_code_valid,
int rip_adjust
) noexcept
: info_{
.vector = static_cast<uint32_t>(exception_vector),
.type = static_cast<uint32_t>(interrupt_type),
//
// Final sanitization of the following fields takes place
// in vcpu::interrupt_inject_force().
//
.error_code_valid = exception_code_valid,
.nmi_unblocking = 0,
.reserved = 0,
.valid = true,
}
, error_code_{exception_code}
, rip_adjust_{rip_adjust}
{
}
from hvpp.
After update Visual Studio to 16.10.0, this LNK4210 issue should be fixed.
from hvpp.
After update Visual Studio to 16.10.0, this LNK4210 issue should be fixed.
It's still there
from hvpp.
After update Visual Studio to 16.10.0, this LNK4210 issue should be fixed.
It's still there
Hi,Do you solve tis problem about LNK4210
from hvpp.
The problem still seems to be present with latest 16.10.4.
Some header is including chrono which is pulling in dynamic initializer that is incompatible with kernel.
<snip>
Dump of file hvpp.lib
File Type: LIBRARY
Summary
10 .CRT$XCU <--- hvpp.lib includes these CRT sections.
2B74 .bss
A048 .chks64
</snip>
Using the showIncludes option during compilation we can see that gets included which sometimes includes and hence the issue.
<snip>
bin\x64\Debug\hdrs.txt
69891: COMDAT; sym= "public: __cdecl std::locale::id::id(unsigned __int64)" (??0id@locale@std@@QEAA@_K@Z)
70155: COMDAT; sym= "void __cdecl `dynamic initializer for 'public: static class std::locale::id std::numpunct<char>::id''(void)" (??__E?id@?$numpunct@D@std@@2V0locale@2@A@@YAXXZ)
70188: COMDAT; sym= "void __cdecl `dynamic initializer for 'public: static class std::locale::id std::numpunct<unsigned short>::id''(void)" (??__E?id@?$numpunct@G@std@@2V0locale@2@A@@YAXXZ)
</snip>
from hvpp.
1>Note: including file: J:\dev\hypervisor\hvpp\src\hvpp\hvpp\ia32\arch/**xsave.h** <--- one such instance
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\cinttypes
1>Note: including file: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\inttypes.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\numeric
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\mutex
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\chrono <--- This is where chrono is getting included
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\ratio
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\__msvc_tzdb.hpp
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\cmath
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\forward_list
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\istream
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\ostream
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\ios
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xlocnum
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\iterator
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\streambuf
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xiosbase
1>Note: including file: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\share.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xlocale
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\memory
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\typeinfo
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\vcruntime_typeinfo.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\vcruntime_exception.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\eh.h
1>Note: including file: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_terminate.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xfacet
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xlocinfo
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xlocinfo.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\cctype
1>Note: including file: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\ctype.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\clocale
1>Note: including file: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\locale.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\optional
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xsmf_control.h
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\sstream
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\string
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\vector
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xloctime
1>Note: including file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\format
from hvpp.
@manurautela you build it success ?
from hvpp.
@manurautela you build it success ?
No, it fails with the above mentioned LNK4210.
But if you disable the linker warning "4210" it links properly and generates .sys file.
Although disabling this warning might not be desirable, as it allows devs to introduce such code unintentionally.
I was able to load and run the test binary hvppctrl.exe after loading the driver.
from hvpp.
some references regarding the .CRT link warning
http://www.zer0mem.sk/?p=517
https://github.com/jxy-s/stlkrn
https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/using-the-microsoft-c-runtime-with-user-mode-drivers-and-apps
from hvpp.
Related Issues (20)
- Is there anyway to hook external process? HOT 1
- BSOD when running vmware 15.0.2 HOT 6
- EPT lags out PC; while it's working on VM HOT 5
- kernel_security_check_failure HOT 2
- proper use of mtf HOT 9
- [hvppdrv] Unloading is currently broken HOT 2
- KERNEL_SECURITY_CHECK_FAILURE (139)
- Issue with multiple hidden pages HOT 1
- How to complete ForEachLogicalCore () in the driver HOT 4
- A bugfix I would like to contribute back HOT 1
- What version of SDK and WDK was used for compilation? HOT 8
- Syntax error occurs in vmexit_passthrough.cpp file HOT 1
- BSOD on r3 memory access
- simple of syscall interception,What shall I do?(EFER HOOK or SysCall HOOK) HOT 9
- syscall hooking freezes Windows when stopping the hypervisor
- How to send buffer to driver while the hypervisor is running?
- Is this project actively being worked on still? HOT 1
- hooking cpu instructions HOT 2
- WindowsKernelDriver(10) missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hvpp.