get qutoe time via tdvmcall
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | virt: tdx-guest: Optimize the get-quote polling interval timedrivers/ | +4 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] [Test Report] get qutoe time via tdvmcall
[Background]
Currently, many mobile device vendors (such as OPPO and Xiaomi) use TDVM for security management. Each mobile terminal must perform remote attestation before it can access the TDVM confidential container. As a result, there are a large number of remote attestation get-quote requests, especially in cases where vsock is not configured or misconfigured and cannot be used.
[Limitation]
Currently, the polling interval is set to 1 second, which allows at most one quote to be retrieved per second. For workloads with frequent remote attestations, polling once per second severely limits performance. Test like this:
[root@INTELTDX ~]# ./test_tdx_attest-thread
Start tdx_att_get_quote concurrent loop, duration: 1 s, threads: 1
Summary (tdx_att_get_quote)
Threads: 1 Mode: concurrent Duration: requested 1 s, actual 1.036 s Total: 1 Success: 1 Failure: 0 Avg total per 1s: 0.97 Avg success per 1s: 0.97 Avg total per 1s per thread: 0.97 Avg success per 1s per thread: 0.97 Min elapsed_time: 1025.95 ms Max elapsed_time: 1025.95 ms
[Optimization Rationale]
But the actual trace the get quote time on GNR platform:
test_tdx_attest-598 [001] ..... 371.214611: tdx_report_new: [debug start wait]===: I am in function wait_for_quote_completion LINE=155=== test_tdx_attest-598 [001] ..... 371.220287: tdx_report_new: [debug end wait]===: I am in function wait_for_quote_completion LINE=162===
Cost time: 371.220287 - 371.215611 = 0.004676 = 4.6ms
The following test results were obtained on the GNR platform:
| msleep_interruptible(time) | 1ms | 5ms | 1s | | ------------------------------ | -------- | -------- | ---------- | | Duration | 1.004 s | 1.005 s | 1.036 s | | Total(Get Quote) | 167 | 142 | 1 | | Success: | 167 | 142 | 1 | | Failure: | 0 | 0 | 0 | | Avg total / 1s | 166.35 | 141.31 | 0.97 | | Avg success / 1s | 166.35 | 141.31 | 0.97 | | Avg total / 1s / thread | 166.35 | 141.31 | 0.97 | | Avg success / 1s / thread | 166.35 | 141.31 | 0.97 | | Min elapsed_time | 2.99 ms | 6.85 ms | 1025.95 ms | | Max elapsed_time | 10.76 ms | 10.93 ms | 1025.95 ms |
Jun Miao (1):
virt: tdx-guest: Optimize the get-quote polling interval time
drivers/virt/coco/tdx-guest/tdx-guest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.32.0