[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Xen-devel] [PATCH 15/19] Qemu-Xen-vTPM: Xen frontend d
From: |
Xuquan (Euler) |
Subject: |
Re: [Qemu-devel] [Xen-devel] [PATCH 15/19] Qemu-Xen-vTPM: Xen frontend driver infrastructure |
Date: |
Tue, 9 Aug 2016 11:40:20 +0000 |
On August 07, 2016 7:39 PM, Emil Condrea <address@hidden> wrote:
On Mon, Jul 25, 2016 at 7:01 PM, Anthony PERARD <address@hidden> wrote:
> >
> > > +{
> > > + xs_transaction_t xbt = XBT_NULL;
> > > +
> > > + if (xendev->fe_state == xbus) {
> > > + return 0;
> > > + }
> > > +
> > > + xendev->fe_state = xbus;
> > > + if (xendev->fe == NULL) {
> > > + xen_pv_printf(NULL, 0, "xendev->fe is NULL\n");
> > > + return -1;
> > > + }
> > > +
> > > +retry_transaction:
Add a space here, then
s/retry_transaction:/ retry_transaction:/
the same for the other cases..
> > > + xbt = xs_transaction_start(xenstore);
> > > + if (xbt == XBT_NULL) {
> > > + goto abort_transaction;
> > > + }
> >
> > There is a transaction started, but I don't think it is used by the
> > function below. Could you remove the transaction?
>
> I will remove it. For current version I don't see a direct usage of this
> transaction.
> Quan, did you have a specific reason for past versions for this transaction?
No specific reason, maybe I copied these code from xen / libxl ..
btw, why does libxl use ' retry_transaction: ' logic ... but QEMU doesn't ?
Thank you both.
Quan
> >
> >
> > > + if (xenstore_write_int(xendev->fe, "state", xbus)) {
> > > + goto abort_transaction;
> > > + }
> > > +
> > > + if (!xs_transaction_end(xenstore, xbt, 0)) {
> > > + if (errno == EAGAIN) {
> > > + goto retry_transaction;
> > > + }
> > > + }
> > > +
> > > + return 0;
> > > +
> > > +abort_transaction:
> > > + xs_transaction_end(xenstore, xbt, 1);
> > > + return -1;
> > > +}