On 9/4/24 05:07, Rick Edgecombe wrote:
+static __always_inline void td_##lclass##_clearbit##bits(struct vcpu_tdx *tdx, \ + u32 field, u64 bit) \ +{ \ + u64 err; \ + \ + tdvps_##lclass##_check(field, bits); \ + err = tdh_vp_wr(tdx, TDVPS_##uclass(field), 0, bit); \ + if (KVM_BUG_ON(err, tdx->vcpu.kvm)) \ + pr_err("TDH_VP_WR["#uclass".0x%x] &= ~0x%llx failed: 0x%llx\n", \ + field, bit, err); \
Maybe a bit large when inlined? Maybe if (unlikely(err)) tdh_vp_wr_failed(tdx, field, bit, err); and add tdh_vp_wr_failed to tdx.c. Paolo