[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 18/19] libxl/acpi: Build ACPI tables for HVMlite guests
>>> On 07.09.16 at 20:59, <boris.ostrovsky@xxxxxxxxxx> wrote: > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> > --- > Changes in v3: > * Some constification of call parameters > * Format adjustments > * New acpi_mem_free hook (a nop) > * Changes in init_acpi_config() to deal with constified acpi_numa's > pointers (initialize pointers as temp variabales) > * Add '-include acpi' directive in Makefile to make sure acpi > target is built before build.o dependencies are processed > (specifically, ssdt_*.h files need to exist) > > > .gitignore | 12 ++- > tools/libacpi/build.c | 7 +- > tools/libacpi/libacpi.h | 15 ++- > tools/libxl/Makefile | 18 +++- > tools/libxl/libxl_arch.h | 3 + > tools/libxl/libxl_x86.c | 30 ++++-- > tools/libxl/libxl_x86_acpi.c | 218 > +++++++++++++++++++++++++++++++++++++++++++ > tools/libxl/libxl_x86_acpi.h | 35 +++++++ > 8 files changed, 318 insertions(+), 20 deletions(-) > create mode 100644 tools/libxl/libxl_x86_acpi.c > create mode 100644 tools/libxl/libxl_x86_acpi.h > > diff --git a/.gitignore b/.gitignore > index 9b2c405..9f5bd8c 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -173,15 +173,19 @@ tools/include/xen/* > tools/include/xen-xsm/* > tools/include/xen-foreign/*.(c|h|size) > tools/include/xen-foreign/checker > -tools/libxl/libxlu_cfg_y.output > +tools/libxl/_libxl.api-for-check > +tools/libxl/*.api-ok > tools/libxl/*.pc > tools/libxl/*.pc.in > -tools/libxl/xl > +tools/libxl/dsdt*.c > +tools/libxl/dsdt_*.asl > +tools/libxl/libxlu_cfg_y.output > +tools/libxl/mk_dsdt > +tools/libxl/ssdt_*.h > tools/libxl/testenum > tools/libxl/testenum.c > tools/libxl/tmp.* > -tools/libxl/_libxl.api-for-check > -tools/libxl/*.api-ok > +tools/libxl/xl > tools/misc/cpuperf/cpuperf-perfcntr > tools/misc/cpuperf/cpuperf-xen > tools/misc/xc_shadow > diff --git a/tools/libacpi/build.c b/tools/libacpi/build.c > index 1cd640d..ee5f779 100644 > --- a/tools/libacpi/build.c > +++ b/tools/libacpi/build.c > @@ -20,6 +20,7 @@ > #include "ssdt_s4.h" > #include "ssdt_tpm.h" > #include "ssdt_pm.h" > +#include <xen/hvm/hvm_info_table.h> > #include <xen/hvm/hvm_xs_strings.h> > #include <xen/hvm/params.h> > > @@ -495,7 +496,7 @@ static int new_vm_gid(struct acpi_ctxt *ctxt, > return 1; > } > > -void acpi_build_tables(struct acpi_ctxt *ctxt, struct acpi_config *config) > +int acpi_build_tables(struct acpi_ctxt *ctxt, struct acpi_config *config) > { > struct acpi_info *acpi_info; > struct acpi_20_rsdp *rsdp; > @@ -630,11 +631,11 @@ void acpi_build_tables(struct acpi_ctxt *ctxt, struct > acpi_config *config) > if ( !new_vm_gid(ctxt, config, acpi_info) ) > goto oom; > > - return; > + return 0; > > oom: > printf("unable to build ACPI tables: out of memory\n"); > - > + return -1; > } > > /* > diff --git a/tools/libacpi/libacpi.h b/tools/libacpi/libacpi.h > index d803139..b0ff5aa 100644 > --- a/tools/libacpi/libacpi.h > +++ b/tools/libacpi/libacpi.h > @@ -48,6 +48,15 @@ struct acpi_ctxt { > void (*free)(struct acpi_ctxt *ctxt, void *v, uint32_t size); > unsigned long (*v2p)(struct acpi_ctxt *ctxt, void *v); > } mem_ops; > + > + unsigned int page_size; > + unsigned int page_shift; > + > + /* Memory allocator */ > + unsigned long alloc_base_paddr; > + unsigned long alloc_base_vaddr; > + unsigned long alloc_currp; > + unsigned long alloc_end; > }; There not being (or getting added) any users of these in libacpi/, I wonder how this is related to the subject of the patch. If this is data that only libxl needs for its own purposes, then surely this shouldn't get added to struct acpi_ctxt, but should be a libxl private extension of that structure. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |