On Thu, 2020-07-02 at 21:50 -0600, Simon Glass wrote: > Hi Anastasiia, > > On Wed, 1 Jul 2020 at 10:30, Anastasiia Lukianenko < > vicooo...@gmail.com> wrote: > > > > From: Anastasiia Lukianenko <anastasiia_lukiane...@epam.com> > > > > 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_andrushche...@epam.com> > > Signed-off-by: Anastasiia Lukianenko < > > anastasiia_lukiane...@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 <blk.h> > > @@ -10,26 +11,289 @@ > > #include <malloc.h> > > #include <part.h> > > > > +#include <asm/armv8/mmu.h> > > +#include <asm/io.h> > > +#include <asm/xen/system.h> > > + > > +#include <linux/compat.h> > > + > > +#include <xen/events.h> > > +#include <xen/gnttab.h> > > +#include <xen/hvm.h> > > #include <xen/xenbus.h> > > > > +#include <xen/interface/io/ring.h> > > +#include <xen/interface/io/blkif.h> > > +#include <xen/interface/io/protocols.h> > > + > > #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