Received: from eggs.gnu.org ([2001:4830:134:3::10]:44336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzJdG-0007kI-Oa for qemu-devel@nongnu.org; Mon, 01 Jun 2015 02:55:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzJdD-0000Yj-CD for qemu-devel@nongnu.org; Mon, 01 Jun 2015 02:55:34 -0400 Received: from mail.emea.novell.com ([130.57.118.101]:50179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzJdD-0000YV-3k for qemu-devel@nongnu.org; Mon, 01 Jun 2015 02:55:31 -0400 Message-Id: <556C1DFF020000780007F82F@mail.emea.novell.com> Date: Mon, 01 Jun 2015 07:55:27 +0100 From: "Jan Beulich" References: <555606B3020000780007A8F1@mail.emea.novell.com> In-Reply-To: <555606B3020000780007A8F1@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: [Qemu-devel] Ping: [PATCH] xen/pass-through: fold host PCI command register writes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini , qemu-devel@nongnu.org Cc: xen-devel Ping? >>> On 15.05.15 at 14:46, wrote: > The code introduced to address XSA-126 allows simplification of other > code in xen_pt_initfn(): All we need to do is update "cmd" suitably, > as it'll be written back to the host register near the end of the > function anyway. >=20 > Signed-off-by: Jan Beulich >=20 > --- a/hw/xen/xen_pt.c > +++ b/hw/xen/xen_pt.c > @@ -698,10 +698,7 @@ static int xen_pt_initfn(PCIDevice *d) > machine_irq, pirq, rc); > =20 > /* Disable PCI intx assertion (turn on bit10 of devctl) */ > - xen_host_pci_set_word(&s->real_device, > - PCI_COMMAND, > - pci_get_word(s->dev.config + PCI_COMMAND) > - | PCI_COMMAND_INTX_DISABLE); > + cmd |=3D PCI_COMMAND_INTX_DISABLE; > machine_irq =3D 0; > s->machine_irq =3D 0; > } else { > @@ -723,9 +720,7 @@ static int xen_pt_initfn(PCIDevice *d) > e_intx, rc); > =20 > /* Disable PCI intx assertion (turn on bit10 of devctl) */ > - xen_host_pci_set_word(&s->real_device, PCI_COMMAND, > - *(uint16_t *)(&s->dev.config[PCI_COMMA= ND]) > - | PCI_COMMAND_INTX_DISABLE); > + cmd |=3D PCI_COMMAND_INTX_DISABLE; > xen_pt_mapped_machine_irq[machine_irq]--; > =20 > if (xen_pt_mapped_machine_irq[machine_irq] =3D=3D 0) { >=20 >=20 >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org=20 > http://lists.xen.org/xen-devel=20