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

RE: [PATCH v4 16/21] VT-d: free all-empty page tables


  • To: "Beulich, Jan" <JBeulich@xxxxxxxx>, Pau Monné, Roger <roger.pau@xxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Fri, 20 May 2022 00:38:39 +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=mZD+eysfE5wzUcPQkxrPInegcpLTHXSHQSGYSuJL1wo=; b=lSQ1JSBx0A3pcdI/5u1py4aoZrWpcPDuyIZNzoI1MFgMaA0YPFC0rLcwTQJAYASy2op92HfOjluBqtj+Y54UHzJTmlZ42Syo76YbkiMgNGldq7G3QVzQSDJn9BBqRySSlNt0npfTe2dSL5eFgF1IBo8gn/IlKduc/FQu5pMDM8cYy2xlQQmr1AFTjfzqZK0zCiEGL7+hYDI+j3eUZi5mg6QGNpXllTWrbbokNHfto5YUtQQYXxwyGYa4UmxtDCt3Zm7GGPkJCS3ps0R5/m1BB7BzLVs+2I9/ojLbKxrNK0KBWfjR4KefoZmYRfjub1RPPTMQD1RFXD/KxjSUlbLT9w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ih1QUnV0kzPdfUjNHMtuVarG5CU0vNtk9XkS7PDryAVtoaS6auEDA2hIVPfv/rE4lmkV1h/3CU8w2aYaWtFYltoupyzHGFZzt6g9Li6D0dLPElTjBtZMSvWzWzgSlMo3JmioIyoSbJUUl4QpCO2Mcbyyacyw9J1/zQ2suR116DhCBU/f8bqUQIdcaxGKfByunAay9CFug/CxmKIF+kwIUBKG8Jn/avtikg6QRIJPQkeFm0hAZ1BZQI7OR4Yeh5yZNmO4pTscirgrTjyn2jwGt8mS5W0rjStK1HJE79S54ABiEmLVv5eF7aCRI7HxPR9n9lqqfXLCVGidiAc31xLqDA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Fri, 20 May 2022 00:38:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYWIB55LiJis4LlU+Of8jQSBwnua0YQ++AgAxOaYCAAoAxgA==
  • Thread-topic: [PATCH v4 16/21] VT-d: free all-empty page tables

> From: Jan Beulich
> Sent: Wednesday, May 18, 2022 6:26 PM
> 
> On 10.05.2022 16:30, Roger Pau Monné wrote:
> > On Mon, Apr 25, 2022 at 10:42:50AM +0200, Jan Beulich wrote:
> >> 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>
> >> ---
> >> v4: Re-base over changes earlier in the series.
> >> 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
> >> bits in this range (unconditionally, and with the workaround here in
> >> place), which yielded the same behavior.
> >
> > Should we take Kevin's Reviewed-by as a heads up that bits 52..61 on
> > some? IOMMUs are not usable?
> >
> > Would be good if we could get a more formal response I think.
> 
> A more formal response would be nice, but given the age of the affected
> hardware I don't expect anything more will be done there by Intel.
> 

I didn't hear response on this open internally.

 


Rackspace

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