handleVmBind only if all the num_binds and num_extension events
and UFENCE events have arrived.
Related-To: NEO-11083
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
Prior to the return of object in use error, the device is bind and init
again
Related-To: NEO-10946
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
Also remove not needed resumeImp and interruptImp methods
from level_zero/tools/source/debug/linux/xe/debug_session.h
The correct implementation is in DebugSessionLinux and
the overrides in DebugSessionLinuxXe are not needed
Related-To: NEO-8407
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
Reuse code from i915 implementation for accesing SBA, module debug,
and context save area
Related-to: NEO-9161
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
The correct implementation is in DebugSessionLinux and
the overrides in DebugSessionLinuxXe are not needed
Related-to: NEO-9669
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
driver is built with xe drm support by default
added cmake flag to control xe eu debug API support
NEO_ENABLE_XE_EU_DEBUG_SUPPORT
This flag is disabled by default and uapi-eu-debug headers are not
needed for driver compilation as these headers are not a part of
upstream kernel yet.
Related-To: NEO-10780
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
- The unbind and bind operations in the device reset are now used
for the FLR and Cold Reset and not for Warm reset.
Related-To: NEO-10452
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
- Added the Display error category in the tools code as well.
- Added the index increment logic for the tools code as well.
Related-To: NEO-10362
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
-replace i915 event with generic EventToAck type
-Move isamap to common Client Connection
-Move isa memory access functions to common linux imp
Related-to: NEO-9669
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
Move common attention handling code from prelim in common linux
debug_session(.h/.cpp) files.
This common code could be shared to handle attention events for
prelim and xe driver based Eu Debug
Related-To: NEO-9673
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
- Add base ClientConnection type and derived i915/xe types
- Add accessor function fo retreive ClientConnection
- Move getElfOffset to common linux code
- Add accessor functions for getElfSize and getElfData
Related-to: NEO-9669
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
- makes prelim read/writeGpuMemory generic
- Implements Xe specific ioctls and fsyncs
- Refactors dbg IoctlHelper to use shared base class
for Xe and i915
Related-to: NEO-9668
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
- while resuming threads - after checking threads stopped immediately
check for FE bit, if set do not generate thread stop event
- if PageFault occured, report stop event based on pagefault event
Related-To: GSD-7316
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
Invoking close on invalid fd result in undesired behaviour.
Pass proper file descriptor for close to avoid unnecessary
aborts during destruction.
Related-To: GSD-6816
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
- Add new extension property for user to query platform DP support.
- Add new blackbox and ULTs for extension.
Related-To: NEO-8786
Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
- Add new extension property for user to query platform DP support.
- Add new blackbox and ULTs for extension.
Related-To: NEO-8786
Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
DebugSessionLinux is common base class for all linux dbgUMD
implementations. This patch also moves DrmHelper to common debug folder
Related-to: NEO-8404
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
Outdated info that is present in several modules
because of reset result in crash when module info
is retrieved after reset.
Release and re-create module handles during reset
to avoid crash.
Related-To: NEO-9100
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
when class defines copy/move ctor then corresponding assign operator(s)
should be defined or deleted
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Rename to DebugSessionLinuxi915 in preparation
for implementation of Xe debugger
Related-to: NEO-8404
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
When a thread is stopped due to potential page fault
we must check AIP against start IP to ensure it is not
a newly started thread accidentally caught by PF algorithm
Related-to: NEO-8617
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
- The FsAccess, ProcFsAccess and SysfsAccess classes have been added in
a file in the Sysman Shared directory. The instances of these classes
are maintained in the Sysman Kmd Interface classes.
- Added functions for opendir, readdir and closedir in the shared code.
- Added a ULT in the sysman directory to cover these new functions from
the shared code.
Related-To: LOCI-4689
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
Related-To: LOCI-4819
- When communicating with the Metrics Libraries, if one is using a
specific sub device, then the correct physical sub device index and
number of sub devices must be used.
- When Affinity Mask is set, this hierarchy information is lost,
therefore the sub device hierarchy data is stored in a map to each
"device" to be returned to the user allowing for the correct sub device
information to be passed to the metrics library.
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Add support for new GTPin loading logic in OCL path, similar to existing
in L0 - invoking exposed, dedicated API call (OpenGTPinOCL).
- Move logic to shared, including unit tests
- Check whether instrumentation is required on
context creation and if yes,
make a call to OpenGTPinOCL function.
Handle potential errors gracefully without exiting.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Add support for new GTPin loading logic in OCL path, similar to existing
in L0 - invoking exposed, dedicated API call (OpenGTPinOCL).
- Move logic to shared, including unit tests
- Check whether instrumentation is required on
clGetPlatformIDs API call, and if yes,
make a call to OpenGTPinOCL function.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
numDeviceEvents out param is not being updated in case
there are no events and device events map is not overridden
on multiple register calls result in failure.
Related-To: LOCI-4751
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
- The sysfs filenames have been added in the sysfsNameToFileMap of the
SysmanKmdInterface classes.
- The functions returning the sysfs filenames have been removed from the
shared directory.
- The ULTs have been added to return the sysfs filenames.
Related-To: LOCI-4699
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
- Added new sysman APIs introduced in spec1.7
- Added ULTs to cover the new APIs
Related-To: LOCI-4667
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
Maintain cache of file names and file descriptor to
avoid invoking open and close system calls on every
read call.
Related-To: LOCI-4556
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
The files containing the new 'SysmanKmdInterface' has been moved into
the new 'shared' directory in the existing sysman directory. More files
are to be added in this directory which will be used by all the sysman
modules in the sysman and tools directories.
Related-To: LOCI-4649
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
- do not allocate state save area every time attention event
is handled
- keep allocated memory for subsequent events
- remove not needed DBEUG_BREAK
Related-To: NEO-8183
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- check threads with attention state before reading SR_IDENT
- memory read is costly, for threads already in stopped state
there is no need to read sr_ident and check thread state again
- single stepping one thread performance is substantially improved,
by the factor of 6x
Related-To: NEO-8183
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
The new classes SysmanKmdInterface, SysmanKmdInterfaceI915 and
SysmanKmdInterfaceXe have been introduced.
A map is maintained in the SysmanKmdInterfaceI915 and
SysmanKmdInterfaceXe class for the sysfs file names.
The access specifier of the function getDrmVersion has been changed from
protected to public so as to use it in the sysman code. This is required
for the SysmanKmdInterface pointer to point to the
SysmanKmdInterfaceI915 and SysmanKmdInterfaceXe accordingly.
The ULTs have been added for the new sysfs file path corresponding to
the i915 and the Xe driver.
Related-To: LOCI-4399
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
- all bos from Module must have requireImmediateBinding
flag set
- this change fixes hang in debugger - where MODULE LOAD event
was not sent
Resolves: NEO-8121
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
Storing config space during sysman init might result in
providing inappropriate properties as config space can be
modified.
Read config space whenever properties are queried.
Related-To: LOCI-4513
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
System Routine changes for implementing large-grf debugging
will result in GRF count of 256 being reported for kernels
in all GRF modes. Applications using L0 Debug API do not
yet have a way to determine actual GRF count for kernel.
This commit is a temporary adjustment to avoid breaking debug
API users after new system routine is enabled.
This problem will be fully solved in follow up patch with switch to
zetDebugGetThreadRegisterSetProperties
Related-to: NEO-7370
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
- Port events module to new sysman design
- Add events ULTs for new sysman interface
Related-To: LOCI-4120
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
The Memory Info object is used in the getState function for memory.
Some of the ULTS in the memory modules has been modified.
A function to return the sysfs nodes for the Memory address range has
been added in the IoctlHelper class corresponding to the XE and i915
driver.
Related-To: LOCI-4397
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
Added ULTs for Fan module in new sysman implementation
Added support for Fan in zello_sysman
Related-To: LOCI-4409, LOCI-4412
Signed-off-by: Kumar, Shubham <shubham.kumar@intel.com>
On Warm reset, With default bar size set by bios, VF bar
allocation is getting failed because of bug in pci driver
which impacts SRIOV functionality.
Resize VF bar size for succesful allocation of VF bar
post warm reset.
Related-To: LOCI-4481
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
Added support for the Performance APIs in the new sysman design.
Added ULTs for the Performance APIs in the new sysman design.
In the black box test for performance, the API to compute the number
of sub devices has been changed in order to get the sub device count
regardless of the sysman initialization using zeInit or zesInit.
Related-To: LOCI-4294
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
Current SIP implementation has constant reg descs for all threads.
Initial implementation of this API always returns same reg descs as the
non-thread version of API. When SIP exposes per-thread reg descs,
this API will be updated to expose them.
Related-to: NEO-7370
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
Replacing normal pointers by smart pointers in diagnostics module of L0 sysman.
Related-To: LOCI-2810
Signed-off-by: Singh, Prasoon <prasoon.singh@intel.com>
Replacing normal pointers by smart pointers in performance module of L0 sysman.
Related-To: LOCI-2810
Signed-off-by: Singh, Prasoon <prasoon.singh@intel.com>
Add debug variable to set sleep duration for HBM
IFR to complete
Related-To: LOCI-4298
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
Added support for the Temperature APIs in the new sysman design.
Added ULTs for the Temperature APIs in the new sysman design.
Related-To: LOCI-4293
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
- when resume(all) is called - all threads' sr counter needs to be
verified. Reading state save area separately for all threads takes
longer than reading whole state save area once. State save area is
only read again if sr counter wasn't updated
- fail while reading state save area means threads might have completed
execution
- this fix optimizes time spent in resume(all), that may be called before
debugger detaches
Related-To: NEO-7897
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>