2
0
Gráfico de cometimentos

2959 Cometimentos

Autor(a) SHA1 Mensagem Data
Philip Cox c2c1385e29 libhsakmt: Update wave suspend/resume API
This is updating to the new suspend and resume API for the
KFD and the thunk.  We now support passing in a list of queues
to suspend, and not just all of the queues for the process.

The kfdtest testcase was also updated so it still compiles.

Change-Id: I71d1b178476bd9df0c311bdedaa6a891528cebcf
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-05-03 10:32:47 -04:00
Philip Cox d21e9d5bbd libhsakmt: Update HsaQueueInfo for GetQueueInfo
hsaKmtGetQueueInfo needs to return the control stack size, and the
wave state size for the debugger.  These changes are needed to support
returning the new values.

Change-Id: Ib4c60e0ea34446c06aef4a86996250989f348a69
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-05-03 10:32:47 -04:00
Oak Zeng b26580788b Host HDP flush test
Change-Id: I396ac021d15da972f4841d6d8f90d4b175e64ecd
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-05-03 09:31:41 -04:00
Felix Kuehling c8d823eb10 kfdtest: Make eviction tests more robust
- Run more graphics command submissions with shorter delay between
  them
- Synchronize after every graphics command submission
- Include the big VRAM BO in the BOList of the command submission
  to trigger more evictions
- In QueueTest, run AMDGPU command submissions concurrently with
  compute shader on the user mode queue
- Submit AMDGPU commands to GFX queue instead of compute queue to
  avoid deadlocks between user-mode and kernel-mode queues on the
  same pipe
- Allocate slightly less memory from KFD to avoid allocation errors
  due to fragmentation or memory leaks in previous tests
- Running only two processes maximizes the number of KFD evictions
  (probably because of lower chances of evicting non-KFD BOs)

Change-Id: If05d53f5fcf690b6488998a3f933f120ddaa71ee
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-05-02 17:34:11 -04:00
Oak Zeng 804aa90a22 Add MMIO_REMAP heap type
Add a MMIO_REMAP heap type and expose mmio virtual address
through HsaKmtGetNodeMemoryProperties



Change-Id: I1e585e6dfbec8fa7c85f1dda7b89b763a8e2c439
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-04-30 15:40:50 -05:00
Oak Zeng e4a6a01389 Fix return value of fmm_get_aperture_base_and_limit
Only return success when the aperture is valid

Change-Id: I63b97fd0450e1ff277cf45abc7a1be9f7a0c0d50
2019-04-30 09:38:46 -05:00
Oak Zeng ae111689f0 Map remapped mmio page to process space
HDP conherence registers are remapped at driver level
to an empty page in mmio space (the remapped mmio page).
This change allocate and map the remapped mmio page to
process space.



Change-Id: I89c405c41870a79c5b58eea0d8e564aa35f55182
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-04-30 09:00:16 -05:00
Sean Keely e89f9807f1 Patch from github.
At the moment it is not possible to build ROCr with Clang. This is
a spurious limitation. The present PR addresses it by guarding GCC
only flags and by fixing some additional warnings that Clang triggers;
one of said warnings did outline a rather interesting issue with math
being done on void*s. - AlexVlx

Void ptr arithmetic had already been fixed in amd-master branch.

Change-Id: I5ee97e20b5c40b10dd73facecabe75f02ba46462
2019-04-29 16:17:24 -04:00
Felix Kuehling 0c6b9532d4 Use non-paged memory for IPC signals
Non-paged memory can be IPC-shared even when HSA_USERPTR_FOR_PAGED_MEM
is enabled.

Change-Id: I8b1fa6d7a4a9327c78a77b3679697fbf55397093
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-04-29 09:20:11 -04:00
Yong Zhao 5b18614eaf kfdtest: Add CreateDestroyCpQueue and CreateDestroySdmaQueue test
Those two tests cover the basic queue creation and destruction
without submitting packets to CP and SDMA user queues. During bringup,
they bring values in term of untangling the issues arising in queue
creation and packet execution, which are two very different kinds.

Because of those two tests, we also rename some existing tests as
follows:
CreateCpQueue             ->   SubmitPacketCpQueue
CreateSdmaQueue           ->   SubmitPacketSdmaQueue
CreateMultipleCpQueues    ->   MultipleCpQueues
CreateMultipleSdmaQueues  ->   MultipleSdmaQueues

Lastly, move MultipleCpQueues test closer to the CP queue section
rather than leaving it behind the SDMA queue section.

Change-Id: I110fb3f3fb21878339045dd1d1c8c9d61b8988b7
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-04-23 15:08:17 -04:00
Kent Russell e109ce541c Fix test if Render Node can't be found
If a Render Node can't be found, we should finish off all child
processes immediately, then return.

Trying to do the check before forking the children results in the test
failing as well, regardless of the status of finding the render node,
which is likely why the forking occurred first in the test's initial
creation. This way we ensure that things finish cleanly before moving to
the next test


Change-Id: I2e1b62fed25c30ff1f179612127c23960da4ee5e
2019-04-23 07:14:35 -04:00
Alex Voicu ee9831779c Macros are devious, wrap argument to prevent surprises.
Change-Id: Ib99e7d2ec1e7a2802f4ae7946ba1fa92c9940a85
2019-04-19 07:06:28 -04:00
Alex Voicu fdadae6745 Fix Clang build
Change-Id: I0b51699c0a1368cf5813bd9d3cd4479139d23d6a
2019-04-19 07:06:28 -04:00
Andreas Schneider 0045974858 cmake: Do not mess with CMAKE flags
Specifically, don't mess with CMAKE_SHARED_LINKER_FLAGS or
CMAKE_C_FLAGS

Change-Id: I73e287df5b80d440079c6b3abe8c401d492d11dd
2019-04-19 07:06:28 -04:00
Andreas Schneider 8ccfa4c75c cmake: Do not strip targets in the release build
Distributions want to generate debuginfo packages, do not strip them! If
you want to do it during installation use 'make install/strip'!

Change-Id: I3983af24ce4f4ddb189ede0ed0820dfee83b6280
2019-04-19 07:06:28 -04:00
Sean Keely 1251842900 Don't create blits when copy profiling is enabled.
Change-Id: I879827133957ee610c3381ea30c536ec7d10ffab
2019-04-18 20:00:02 -05:00
Jay Cornwall 56f280c8a7 Detect memory event through Flags field insetad of Failure
KFD no longer reports MemoryAccessFault.Failure with retry fault
implementation. ROCr ignores the memory event when Failure = 0.

Use the Flags field instead, which will be non-zero when the
event is triggered.

Change-Id: Ie90799a303b0b2f1b476b20ffafdde79ae137182
2019-04-15 19:16:07 -05:00
Ramesh Errabolu ba029ebe21 Remove instantiation of MemoryRegion for heap type SVM surfaced by ROCt
Change-Id: Ib4ff7e7cabe9aacb811888aeb74f652dcb57f9e0
2019-04-10 18:33:07 -05:00
Andreas Schneider b8a1331763 cmake: Create cmake config file
Another cmake project like hsa-runtime could just use:

find_package(hsakmt REQUIRED 1.9.0)

Change-Id: Ia1c9a80ef287facdd607382d69649b0718d687b4
2019-04-03 08:36:09 -04:00
Konstantin Zhuravlyov 7001134757 Process symbols with 0 address
Change-Id: I9ed943a8ccd3b103edd6aba8264c009d8cda29fa
2019-03-30 02:14:43 -04:00
Sean Keely a535e18cc1 Add hsa_amd_memory_lock_to_pool.
Makes malloc memory accessible to GPUs so that the memory has the
capabilities of the pool it is locked to.
This admits fine grained locked memory and reserves API space for any future
special CPU pools.

Change-Id: If8c3dd8582a43f19d3d36b3763c1a688cc419ef0
2019-03-29 01:09:21 -05:00
Sean Keely 9f7df6d6fe Remove legacy memory fault event name.
Change-Id: I3ad240482523409e1152548009aecf127e63bbfa
2019-03-28 15:25:25 -05:00
Sean Keely e5de33dd9a Fix void* arithmetic.
GCC allows arithmetic on void* treating void as char.  Clang and
the language spec does not.

Change-Id: I939f2432f276979bb81881406e10528597ac6001
2019-03-28 12:49:19 -05:00
Sean Keely 7ea0cd688f Disable sram-ecc reporting via ISA until HCC is fixed.
Change-Id: I0382825884b727173385f04da9f2088650c3ba1d
2019-03-21 17:46:56 -04:00
Chris Freehill 68c202de1f Re-enable RSMI call using updated API prototype
Change-Id: Ifc8fa35708fea05cbc8a9bea727a6d4c9d2ecea7
2019-03-18 23:18:42 -05:00
Chris Freehill 7b3537cf44 Temporary disable of rsmi call due to api change
Change-Id: If73f31c5fbe4bcd34f8e52a5109a6fbfff70b5e1
2019-03-16 21:05:47 -05:00
Sean Keely fd9fb77e28 Do not strip release builds.
Customer request.

Change-Id: Id77dcdc0b6908c7a5e460edfd7d9468a1691e351
2019-03-07 14:04:14 -06:00
Tom Stellard 006c2c248d Separate build version from library version
This patch separates the build version (i.e. ROCm version) from the
library version used to set the SONAME of the shared objects.  This
prevents the SONAME from getting bumped each time there is a new ROCm
release without any change to the libhsakmt ABI.

1.0.6 was choosen as the library version since this was the
last library version used prior to switching to the ROCm version
numbers.

Change-Id: I7c29ae84d8a362a831e804569d8147ca65155cad
2019-02-28 21:32:45 -08:00
Eric Huang e5b215570b kfdtest: fix and change in RAS test
1. RAS error injection debugfs interface has been changed which
is using ras_ctrl instead of *_err_inject.

2. Remove ASSERT_SUCCESS for fwrite, because fwrite returns
the size of written item but not the error number.

3. Using throw exception instead of return to avoid a segment fault.

Change-Id: I6c4d9c2f7e66719faec99abd1552105a08c238a4
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2019-03-29 11:00:01 -04:00
Eric Huang d6cde5bf08 libhsakmt: update kfd_ioctl.h regarding RAS interface
It is aligned with RAS changes in KFD.

Change-Id: I52816da01a4001158a40a1207d1fbe6ec3271343
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2019-03-28 21:38:44 -04:00
Sean Keely c7f1277013 Add hsaKmtRegisterMemoryWithFlags.
API follows hsaKmtRegisterMemory but allows passing HsaMemFlags.

Change-Id: I66a230a87c8b085f27c769bdf2cb4d0d96a5d6dd
2019-03-28 17:17:40 -04:00
Kent Russell 1304a92e17 libhsakmt: Add Vega M support
While this may not be supported in the runtime, the kernel/firmware
support it

Change-Id: I7fe4536a6b3055f39e25f453060e899938645d91
Signed-off-by: Kent Russell <kent.russell@amd.com>
2019-03-21 08:05:47 -04:00
Kent Russell c7439a0039 libhsakmt: Add another gfx902 GPU ID
Change-Id: I967f16bf548171df73d2e721f16c1aac52e99852
Signed-off-by: Kent Russell <kent.russell@amd.com>
2019-03-21 08:05:47 -04:00
Philip Yang 0bd9f35563 Revert "kfdtest.exclude: Temporarily blacklist IPC on gfx900"
This reverts commit d00ec779ce.

Fixes for HMM change corner cases are merged in from drm-next.
Tests are passed on gfx900 with the latest amd-kfd-staging.

Change-Id: I6c00d1eacf6b3f1ce715e085ae622b4e9ff1b7ff
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2019-03-18 10:10:00 -04:00
Amber Lin cfa47ac1f9 libhsakmt: Fix missing apicid in topology
While adding x2APIC support, apicid for non-x2apic was missing out by
mistake.



Change-Id: I25eed362c035c0e9fb9ea948899c49f70311f269
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2019-03-11 13:05:37 -04:00
Oak Zeng 1046a1fd72 Introduce XGMI SDMA queue type
Change-Id: I8c6ff04f92c2bbea0bab94ddb8cc4cceb5d74d02
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-03-07 19:42:20 -05:00
Oak Zeng 414a3508d6 Thunk interface to get SDMA engine info
Add SDMA engine info fields to node properties and
modify get node properties API to read SDMA engine
info from sysfs

Change-Id: Iea877b5bc008cc9df9405daf564a359535f1bc9f
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-03-07 14:09:43 -05:00
Oak Zeng e4109de26d Use latest kfd_ioctl.h
A new SDMA queue type for XGMI was added

Change-Id: Iad065c1a7c053a58e0d86becfb374215e316a611
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-03-07 13:25:33 -05:00
Amber Lin f8028a40fd libhsakmt: Support x2APIC in topology
Current processor/cache topology code implements xAPIC architecture, which
is 8 bits addressability. This is not enough for a system having more than
255 processors. x2APIC is the extension of xAPIC architecture to support
32 bit addressability of processors. This patch detects the x2APIC
enablement and uses the extension leaf to get apicid when detected.

Change-Id: I0826585d02f696a46cd5efb9a6630c60af01e2d8
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2019-03-01 16:42:30 -05:00
Kent Russell d00ec779ce kfdtest.exclude: Temporarily blacklist IPC on gfx900
Due to the recent HMM changes, the KFDIPCTest can intermittently fail,
combined with CrossMemoryAttach consistently failing. Remove it for now
while Philip Yang investigates

Change-Id: Icf272100bb7882eff4202ad6f4ced63b569f4e7d
2019-02-28 07:29:47 -05:00
Sean Keely 67376e06ab Report SRAM ECC errors through the system event handler.
Modify the system event handler to support multiple users.
Name memory fault reason codes.

Change-Id: I1b5979b36ab15637eb2be59a61e2d57e76d0a70e
2019-02-27 18:08:07 -05:00
Kent Russell a0b8dd8462 Temporarily remove CMATest from gfx900
Per Philip Yang:
For forked child process, userptr allocated on heap (through malloc)
will have two vmas if child process malloc smaller size buf, free it,
this is on vma cloned from parent process. Then malloc larger size buf,
kernel will put some pages on previous freed space from vma cloned,
create new vma for the rest of pages. This is what IPCTest does.

Change-Id: I054771e20880f975d7cc774225f19aad5363843f
2019-02-27 07:05:42 -05:00
Sean Keely 3c3db0243e Loader support for SRAM ECC.
Change-Id: I0c6791c356d9186cc8dabae9fd698b1d4de19b09
2019-02-25 18:30:05 -05:00
Yong Zhao 1d478f3cf2 kfdtest: Add a result check in CreateCpQueue test
With the orginal code, CreateCpQueue will report failure if
WaitOnValue return false. Add EXPECT_TRUE() so that in that case
the failure is reported.

Change-Id: I043d013958b452d7ccb9538dc296d99d024abf01
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2019-02-21 17:42:45 -05:00
Sean Keely c56d86100b Add fine grain vram pool.
Part 1 of 2.
Enables fine grain vram over PCIe based on env flag.
Part 2 will extend to XGMI.

Change-Id: I8ad506e004b398d56d462b0200274eae2293a461
2019-02-21 13:08:11 -05:00
Sean Keely 344d964f9f Suppress exception reporting for well defined invalid signal handles.
hsa_exceptions with empty what() strings will not report in debug builds.

Change-Id: I0d424d3b1d3044808ece1720a460a57d68bf878e
2019-02-15 19:35:57 -05:00
Eric Huang 7349276860 kfdtest: add RAS tests
They are disabled for now.

Change-Id: I9c936130cbaf8c773f4b8e94bccf4af1f45eda65
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2019-02-15 15:03:32 -05:00
Philip Cox 90a3697e1d kfdtest: Blacklist BasicDebuggerSuspendResume
We need to black list this testcase temporarily because
it is failing intermittently.  The failure tends to only happen
when the certain build machine is used to build it.

This issue is being tracked by Jira ticket:
    ROCMOPS-389

Change-Id: Ic4682c9da389ed731cbc034dff57e6646bba0e9d
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-02-13 10:45:20 -05:00
Philip Cox ac6f089f26 kfdtest: Initial basic dbg suspend/resume testcase
A basic sanity test that tests the codepath for
the debugger suspend and resume code path.

Change-Id: If4c64f7bd6a1ef45068a33965b829725a78ce492
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-02-08 11:28:33 -05:00
Sean Keely 400304aa10 Remove stop using ROCm release tags for library version numbers.
Version is now a fixed string that matches previous internal builds.
This also matches released DEB/RPM builds (but not github versions).

Change-Id: Id4819b9de8c855250aadf1a1cebb187b5c031721
2019-02-06 19:22:53 -05:00