Received: from eggs.gnu.org ([2001:4830:134:3::10]:33025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5yAD-00058d-Db for qemu-devel@nongnu.org; Mon, 07 Dec 2015 10:57:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5yA8-0007Ej-KI for qemu-devel@nongnu.org; Mon, 07 Dec 2015 10:57:21 -0500 Received: from prv-mh.provo.novell.com ([137.65.248.74]:49280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5yA8-0007Ef-D5 for qemu-devel@nongnu.org; Mon, 07 Dec 2015 10:57:16 -0500 Message-Id: <5665BA6702000078000BCBCE@prv-mh.provo.novell.com> Date: Mon, 07 Dec 2015 08:57:11 -0700 From: "Jan Beulich" References: <56548BD202000078000B881F@prv-mh.provo.novell.com> <56548D1C02000078000B8834@prv-mh.provo.novell.com> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH v2 1/4] xen/MSI-X: latch MSI-X table writes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: xen-devel , qemu-devel@nongnu.org >>> On 07.12.15 at 13:41, wrote: > On Tue, 24 Nov 2015, Jan Beulich wrote: >> @@ -332,6 +334,13 @@ static int xen_pt_msix_update_one(XenPCI >> =20 >> pirq =3D entry->pirq; >=20 > I know that in your opinion is superfluous, nonetheless could you please > add 2-3 lines of in-code comment right here, to explain what you are > doing with the check? Something like: >=20 > /* > * Update the entry addr and data to the latest values only when the > * entry is masked or they are all masked, as required by the spec. > * Addr and data changes while the MSI-X entry is unmasked will be > * delayed until the next masking->unmasking. > */ >=20 >=20 >> + if (pirq =3D=3D XEN_PT_UNASSIGNED_PIRQ || s->msix->maskall || >> + (vec_ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT)) { >> + entry->addr =3D entry->latch(LOWER_ADDR) | >> + ((uint64_t)entry->latch(UPPER_ADDR) << 32); >> + entry->data =3D entry->latch(DATA); >> + } Adding a comment like this is fine of course, namely if it helps acceptance. Jan