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

Re: [PATCH v2] x86emul: de-duplicate scatters to the same linear address


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 18 Oct 2021 14:52:28 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=nINN8uLBn/KX27mhSapKsCS5RQcml78jX28DdteYTB8=; b=UCMBZigOqnaTbRojbgm6te6DmtCxDUeEC7CcAWvjX7Zn/aUoZOJE63k8h8iLxW55eZ9nzvtjGECkX6aDaXGx6TpKq91Gy1+wrzhBcuPcLQMc8T2kg+gx3ZLQ7CJwu09A2Id+zae32xefClrzIDyLrIObON5KzIokxRXG01SXvf5JOgrjfKbopTqLLl8zWAkvX5EWxt0M608KrHM6/0ukJpZWrUIXuwrZiog/CgJR+zjfdVeH8fpMzaj2BXoe92SCNAHS9dSWx/UIiufNXlvoH5qgL9muPX43SgvZddWzCbCp6SpcI1+ecEie+1KYQF9NRvAfGPBu4DfLzByeq6/bIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jq569W/rMWF290iCsK0z1pyO0OZzuZCPRVkYtm0Dk7madeda1BQeFjj8rND6dp8c/MWDZdhX5TbEd+nO+Z8W6HcmcJwKDmGm5N76xfG7K7SNUOF7PM3hucpl8loUKIzTW4mxhAl5YhUQBNH+uvR6x59N/++eEA4NDoigvZ0flD9yZCnCfveLwDQXQ8VWzAODyAnY9SzImh5vNxFKrxfAcGWQjZYdLSVMgNGdd2u/r1EkERpGCO4AqPsVsen0Khgd5ny0UDqZod/5NsKaDzk4zuwwyT9z/s02KSYTv3EfxbQKm+hPf4paL8iwailZ1KKA/ieYT0wcLZ43VDD1PIrIhw==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 18 Oct 2021 12:52:58 +0000
  • Ironport-data: A9a23:Rceh6qDliJ+j6RVW//Lkw5YqxClBgxIJ4kV8jS/XYbTApDJx32AAm mNOXj3UPfiJYWWjL41xb4rjoBgE7cOEyoJqQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMo/u1Si6FatANl1ElvU2zbue6WLOs1hxZH1c+EX550EI7wYbVv6Yz6TSHK1LV0 T/Ni5W31G+Ng1aY5UpNtspvADs21BjDkGtwUm4WPJinj3eH/5UhN7oNJLnZEpfNatI88thW5 Qr05OrREmvxp3/BAz4++1rxWhVirrX6ZWBihpfKMkQLb9crSiEai84G2PQghUh/lwiJs4h46 NJ3kd+UdwMZA4Kdgv44akwNe81+FfUuFL7vJHG+tYqYzlHccmuqyPJrZK00FdRGoKAtWzgIr KFGbmBWBvyAr7veLLaTUO5ji95lNMD2FIgepmth3XfSCvNOrZXrHviWvIAJgGlYasZmHNDaW ucpdGJUZ0rrYR5IGwgMEKo5g7L97pX4W2IB8w/EzUYt2EDMyCRh3b6rN8DaEvSaSMMQkkuGq 2bu+2XiHgpcJNGZ0SCC8H+nmqnIhyyTcIAYGaC89/VqqEaO3WFVAxoTPWZXutHg1BT4AYgGb RVJpGx+9sDe6XBHUPHhYh2U+HekuSQ4GP5uF90Hx1CX0I/ttlPx6nc/chZNb9kvtckTTDMs1 0OUk96BOQ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HAIGsMQnDuRSDzraXGeLDM2dKbRf6 Dsn/avyQDQHkj+Oa+Adwc4tqX41pH2vaOjRSRDKw8s6QGIgz/twLnmEyKA1hNbdz9U278t/U XMjgS8v8yYwr+G4y6Z81WWw4VdmdPnxNcGLMuQivINIjGprgqzfoxuV5CLoThwiuCy71QBls XKvn4bTotOwkKUWlvwjQrm2gHm3jprw3j+yWWAiX+mmsD9TCJSMbsLuatpNj/ir2YwttB116 xGm0iDsYBMMB/GlCPho/DVShBDjCOP0DkfuN9Wq0YafZoVabdXo4Ba1lhSCo08ECXz751iOP VyDfvb+O1dfTqhHjDkV1FUsZmRt0kIb1O7qhBogL3T79EWpgE586Ig/r1cop9an6hNDaWt5I z/Q+xVff91P5YrhQ8UPpZ3fSKNMB25ffv7ChPaHb3WLtB0B5vzke+C3FwU3pDhRHVa9up+pH z+OGkow1LaPXieUfGz4A==
  • Ironport-sdr: TfFC3RXOjTaeYtaGwovoWzwQqZYigTtcaLj1Jv9zH9ia5lpEMdpslwE9Lwxi4f3hfzHJEAQv3i QfoM0S6NiiUKZV8fdXW4flM0QUunmv+olKhiiJViFVbp5dmJYVfQVTOzlEvuC8AC1cXhznMl74 vdQIiOB3pOnwiY86iajaanoJYAvZS3lxcSdjOqn0jNf75wVKQiFnla3ei7OwjbuI/+sSlKxn0m cKumWjnOv1iWDKqfAQS9ss70cLg3+gjDFjprn+rM1NFgcpSi7AEzt1burPA/9rfeDPbxKJdvAv /C4hmPZUwt5SFalb+B13wb2F
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 18, 2021 at 02:17:39PM +0200, Jan Beulich wrote:
> On 18.10.2021 13:19, Roger Pau Monné wrote:
> > On Thu, May 20, 2021 at 03:34:28PM +0200, Jan Beulich wrote:
> >> The SDM specifically allows for earlier writes to fully overlapping
> >> ranges to be dropped. If a guest did so, hvmemul_phys_mmio_access()
> >> would crash it if varying data was written to the same address. Detect
> >> overlaps early, as doing so in hvmemul_{linear,phys}_mmio_access() would
> >> be quite a bit more difficult. To maintain proper faulting behavior,
> >> instead of dropping earlier write instances of fully overlapping slots
> >> altogether, write the data of the final of these slots multiple times.
> > 
> > Is it possible for a later (non duplicated slot) to cause a fault
> > ending the instruction without reaching that final slot that contains
> > the written data?
> 
> Yes, but that's not a problem: Only faults are required to be ordered,
> and when a fault occurs guarantees are made only towards lower indices
> (read: all lower index writes would have completed, while nothing can
> be said about higher indices). All non-faulting writes can go out in
> any order (unless there are [partial] overlaps, but afaict that case
> still gets dealt with within spec by the proposed new logic).

Oh, OK, so it's fine for a later write to be 'completed' even if one
of the previous ones faulted. In that case:

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks, Roger.



 


Rackspace

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