From: Anastasiia Lukianenko Date: Mon, 6 Jul 2020 09:08:05 +0000 Subject: [PATCH 14/17] xen: pvblock: Read XenStore configuration and initialize In-Reply-To: References: <20200701162959.9814-1-vicooodin@gmail.com> <20200701162959.9814-15-vicooodin@gmail.com> Message-ID: <04cc3d12e85068f19f1a230f3c41fb3475015f8a.camel@epam.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2020-07-02 at 21:50 -0600, Simon Glass wrote: > Hi Anastasiia, > > On Wed, 1 Jul 2020 at 10:30, Anastasiia Lukianenko < > vicooodin at gmail.com> wrote: > > > > From: Anastasiia Lukianenko > > > > Read essential virtual block device configuration data from > > XenStore, > > initialize front ring and event channel. > > Update block device description with actual block size. > > > > Use code for XenStore from mini-os. > > > > Signed-off-by: Oleksandr Andrushchenko < > > oleksandr_andrushchenko at epam.com> > > Signed-off-by: Anastasiia Lukianenko < > > anastasiia_lukianenko at epam.com> > > --- > > drivers/xen/pvblock.c | 272 > > +++++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 271 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c > > index 6ce0ae97c3..9ed18be633 100644 > > --- a/drivers/xen/pvblock.c > > +++ b/drivers/xen/pvblock.c > > @@ -1,6 +1,7 @@ > > /* > > * SPDX-License-Identifier: GPL-2.0+ > > * > > + * (C) 2007-2008 Samuel Thibault. > > * (C) Copyright 2020 EPAM Systems Inc. > > */ > > #include > > @@ -10,26 +11,289 @@ > > #include > > #include > > > > +#include > > +#include > > +#include > > + > > +#include > > + > > +#include > > +#include > > +#include > > #include > > > > +#include > > +#include > > +#include > > + > > #define DRV_NAME "pvblock" > > #define DRV_NAME_BLK "pvblock_blk" > > > > +#define O_RDONLY 00 > > +#define O_RDWR 02 > > + > > +struct blkfront_info { > > + u64 sectors; > > + unsigned int sector_size; > > + int mode; > > + int info; > > + int barrier; > > + int flush; > > +}; > > + > > struct blkfront_dev { > > - char dummy; > > + domid_t dom; > > + > > + struct blkif_front_ring ring; > > + grant_ref_t ring_ref; > > + evtchn_port_t evtchn; > > + blkif_vdev_t handle; > > + > > + char *nodename; > > + char *backend; > > + struct blkfront_info info; > > + unsigned int devid; > > How about some comments? > Ok, will add. > Regards, > Simon Regards, Anastasiia