public inbox for linux-coco@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 0/1] [Test Report] get qutoe time via tdvmcall
@ 2026-02-11  8:58 Jun Miao
  2026-02-11  8:58 ` [PATCH 1/1] virt: tdx-guest: Optimize the get-quote polling interval time Jun Miao
  0 siblings, 1 reply; 5+ messages in thread
From: Jun Miao @ 2026-02-11  8:58 UTC (permalink / raw)
  To: kas, dave.hansen, rick.p.edgecombe, sathyanarayanan.kuppuswamy
  Cc: linux-coco, kvm, linux-kernel, jun.miao

[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(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-10 18:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11  8:58 [PATCH 0/1] [Test Report] get qutoe time via tdvmcall Jun Miao
2026-02-11  8:58 ` [PATCH 1/1] virt: tdx-guest: Optimize the get-quote polling interval time Jun Miao
2026-02-20 18:45   ` Kuppuswamy Sathyanarayanan
2026-02-22  2:17     ` Miao, Jun
2026-03-10 18:58       ` Kuppuswamy Sathyanarayanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox