[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [edk2] [PATCH v3 15/19] OvmfPkg/XenBusDxe: Indroduce XenBus support itself.
On Sun, Oct 19, 2014 at 05:20:45PM -0700, Jordan Justen wrote: > On 2014-10-17 10:03:58, Anthony PERARD wrote: > > This is a bus-like on top of XenStore. It will look for advertised > > ParaVirtualized devices and initialize them by producing XenBus > > protocol. > > > > Origin: FreeBSD 10.0 > > > > License: This patch adds XenBus.c which is under the MIT licence. > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> > > > > --- > > Change in V3: > > - Insert to ChildList later, once populated. > > - Remove XENBUS_XENSTORE_NODE macro. > > - add comment to XenBusAddDevice and XenBusEnumerateBus about > > concurrency calls. > > - Add a description to the introduced member to the protocol. > > > > Change in V2: > > - comment, file header > > - Fix comment style > > - Error handling in the main init function > > - coding style > > - Fix error path in add device. > > --- > > OvmfPkg/Include/Protocol/XenBus.h | 19 ++ > > OvmfPkg/XenBusDxe/XenBus.c | 372 > > ++++++++++++++++++++++++++++++++++++++ > > OvmfPkg/XenBusDxe/XenBus.h | 64 +++++++ > > OvmfPkg/XenBusDxe/XenBusDxe.c | 66 +++++++ > > OvmfPkg/XenBusDxe/XenBusDxe.h | 19 ++ > > OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 + > > 6 files changed, 543 insertions(+) > > create mode 100644 OvmfPkg/XenBusDxe/XenBus.c > > create mode 100644 OvmfPkg/XenBusDxe/XenBus.h > > > diff --git a/OvmfPkg/XenBusDxe/XenBus.h b/OvmfPkg/XenBusDxe/XenBus.h > > new file mode 100644 > > index 0000000..7ff25c3 > > --- /dev/null > > +++ b/OvmfPkg/XenBusDxe/XenBus.h > > @@ -0,0 +1,64 @@ > > +/** @file > > + Core definitions and data structures shareable across OS platforms. > > + > > + Copyright (c) 2010 Spectra Logic Corporation > > + Copyright (C) 2008 Doug Rabson > > + All rights reserved. > > + Copyright (C) 2014, Citrix Ltd. > > + > > + Redistribution and use in source and binary forms, with or without > > + modification, are permitted provided that the following conditions > > + are met: > > + 1. Redistributions of source code must retain the above copyright > > + notice, this list of conditions, and the following disclaimer, > > + without modification. > > + 2. Redistributions in binary form must reproduce at minimum a disclaimer > > + substantially similar to the "NO WARRANTY" disclaimer below > > + ("Disclaimer") and any redistribution must be conditioned upon > > + including a substantially similar Disclaimer requirement for further > > + binary redistribution. > > + > > + NO WARRANTY > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR > > + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > > + HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR > > CONSEQUENTIAL > > + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > > + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING > > + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > > + POSSIBILITY OF SUCH DAMAGES. > > What is this license? > > The code below appears to have been written just for EDK II, so maybe > just use the standard EDK II license header? Yes, there is nothing left from the original file. I will use the standard license header. > -Jordan > > > + > > +**/ > > +#ifndef _XEN_XENBUS_XENBUSB_H > > +#define _XEN_XENBUS_XENBUSB_H > > + > > +#include "XenBusDxe.h" > > + > > +#define XENBUS_DEVICE_PATH_TYPE_VBD 0x1 > > +struct _XENBUS_DEVICE_PATH { > > + VENDOR_DEVICE_PATH Vendor; > > + UINT8 Type; > > + UINT16 DeviceId; > > +}; > > + > > + > > +/** > > + Perform XenBus bus enumeration and install protocol for children. > > + > > + Caller should ensure that it is the only one to call this function. This > > + function cannot be called concurrently. > > + > > + @param Dev The NewBus device representing this XenBus bus. > > + > > + @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno > > value > > + indicating the type of failure. > > +**/ > > +XENSTORE_STATUS > > +XenBusEnumerateBus ( > > + XENBUS_DEVICE *Dev > > + ); > > + > > +#endif /* _XEN_XENBUS_XENBUSB_H */ -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |