[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v3 20/23] VT-d: free all-empty page tables


  • To: "Beulich, Jan" <JBeulich@xxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Mon, 14 Mar 2022 04:01:11 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ie85Mj/g5KeuT8Nxnk7L5VDB//4wcRDAhiKjOiS51Xc=; b=Q2p+UqMKQTnCuRVkgyeqePgiXhf4Iks7362HWTcjAtNTbwnnYtL6PE38d9qvs0gBT04YYEP0mscAM2Z2nNTnUTl+LoR+q7BfYShvkzU8HeFxwB4cEOuFXon5gBBSJVS0BstGudnpo8DfzB8PfwWv0+zIGcmXcAj8QN9gj+z1NXF1i3h94Y/LtSkls35K6brlPVWcHg8HiJax1wHHJjh4cJyIlZ3M82RubCb946SO97CCqeC/aQUUgMllQJIsCxntrqdJAAS8D1/KCyreE/Ir37xVCW7TLkOKT07+jD4F4qk1nuW+ReWIn3TF7cDQGydlbHIYblxB3N2SGImMtFmk6Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZHb67Xrk8qaptf6O2VJUrz6HKJDBkQnFniIE2GoW85UwAlFdOPdf2FIU5RcW1D1d5fYw0ETD5QyRfvxxKjjUm/OejjNm2m+fqpv1glL0F6KT5zs8n6lngvoXqzbStdm6WFoy5zPwN90jx/Qfm07U0/hE5IAOKm5mgbktM/EY3pU0TjeoCRrb85f80Fn6GXL93u/8w+3agl/ySOeD+gKp/wpy+8cb4AlPD/FAZ6RWwZ2mmffgw+odlBTB3OHDD1gGBdBYceT3EJcrX2QMfHXdHjRJ0fX3qkqYGBDwcS9u3Jhh9d+jeZEhG5vPbEqi0jZIyaR4N+Ta496ktvGmKsKyog==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
  • Cc: "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Pau Monné, Roger <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 14 Mar 2022 04:01:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYBkBAHcUqxDPFCEWIL9jRoPTFzayZAFJQgAA29ICAJWrDAA==
  • Thread-topic: [PATCH v3 20/23] VT-d: free all-empty page tables

> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Friday, February 18, 2022 4:31 PM
> 
> On 18.02.2022 06:20, Tian, Kevin wrote:
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >> Sent: Tuesday, January 11, 2022 12:36 AM
> >>
> >> When a page table ends up with no present entries left, it can be
> >> replaced by a non-present entry at the next higher level. The page table
> >> itself can then be scheduled for freeing.
> >>
> >> Note that while its output isn't used there yet,
> >> pt_update_contig_markers() right away needs to be called in all places
> >> where entries get updated, not just the one where entries get cleared.
> >>
> >> Note further that while pt_update_contig_markers() updates perhaps
> >> several PTEs within the table, since these are changes to "avail" bits
> >> only I do not think that cache flushing would be needed afterwards. Such
> >> cache flushing (of entire pages, unless adding yet more logic to me more
> >> selective) would be quite noticable performance-wise (very prominent
> >> during Dom0 boot).
> >>
> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> >> ---
> >> v3: Properly bound loop. Re-base over changes earlier in the series.
> >> v2: New.
> >> ---
> >> The hang during boot on my Latitude E6410 (see the respective code
> >> comment) was pretty close after iommu_enable_translation(). No errors,
> >> no watchdog would kick in, just sometimes the first few pixel lines of
> >> the next log message's (XEN) prefix would have made it out to the screen
> >> (and there's no serial there). It's been a lot of experimenting until I
> >> figured the workaround (which I consider ugly, but halfway acceptable).
> >> I've been trying hard to make sure the workaround wouldn't be masking a
> >> real issue, yet I'm still wary of it possibly doing so ... My best guess
> >> at this point is that on these old IOMMUs the ignored bits 52...61
> >> aren't really ignored for present entries, but also aren't "reserved"
> >> enough to trigger faults. This guess is from having tried to set other
> >
> > Is this machine able to capture any VT-d faults before?
> 
> Not sure what you mean here. I don't think I can trigger any I/O at this
> point in time, and hence I also couldn't try to trigger a fault. But if
> the question is whether fault reporting at this time actually works,
> then yes, I think so: This is during Dom0 construction, i.e. late enough
> for fault reporting to be fully set up and enabled.
> 

My point was that with your guess that the ignored bits are not
ignored some VT-d faults should be triggered. If the reason why
you cannot observe such faults is because they happened too
early so no much can be shown on the screen then trying to
setting those bits at much later point might get more shown to
verify your guess. 

btw any progress since last post? How urgent do you want this
feature in (compared to the issue that it may paper over)? 

Thanks
Kevin

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.