|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 02/16] libxc: Load BIOS and ACPI table into guest memory
On Tue, Mar 01, 2016 at 11:51:30AM +0000, Wei Liu wrote:
> On Thu, Feb 25, 2016 at 02:56:00PM +0000, Anthony PERARD wrote:
> > This adds two new firmware module, bios_module and full_acpi_module. They
> > are loaded in the guest memory and final location is provided to hvmloader
> > via the hvm_start_info struct.
> >
> > This patch create the hvm_start_info struct for HVM guest that have a
> > device model, so this is now common code with HVM guest without device
> > model.
> >
>
> I think you also need to update the relevant headers to say the
> structures is now used by both PVHv2 and HVM.
Yes, I can do that.
> > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> > ---
> > Change in V3:
> > - rename acpi_table_module to full_acpi_module.
> > - factorise module loading, using new function to load existing optinal
> > module, this should not change anything
> > - should now use the same code to loads modules as for HVMlite VMs.
> > this avoid duplication of code.
> > - no more generic cmdline with a list of modules, each module have its name
> > in the module specific cmdline.
> > - scope change for common code between hvmlite and hvmloader
> > ---
> > tools/libxc/include/xc_dom.h | 4 ++
> > tools/libxc/xc_dom_hvmloader.c | 4 ++
> > tools/libxc/xc_dom_x86.c | 130
> > ++++++++++++++++++++++++++++-------------
> > 3 files changed, 96 insertions(+), 42 deletions(-)
> >
> > diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h
> > index 6ebe946..7dc3fe7 100644
> > --- a/tools/libxc/include/xc_dom.h
> > +++ b/tools/libxc/include/xc_dom.h
> > @@ -209,6 +209,10 @@ struct xc_dom_image {
> > /* If unset disables the setup of the IOREQ pages. */
> > bool device_model;
> >
> > + /* BIOS and ACPI tables passed to HVMLOADER */
> > + struct xc_hvm_firmware_module bios_module;
> > + struct xc_hvm_firmware_module full_acpi_module;
> > +
> > /* Extra ACPI tables passed to HVMLOADER */
> > struct xc_hvm_firmware_module acpi_module;
> >
>
> What is the difference between "ACPI tables" and "Extra ACPI tables"?
The first one is a DSDT table that we generate and compile into AML that is
currently embedded into hvmloader.
The extra one are tables that a user can provide via the "acpi_firmware"
option from xl.
> > diff --git a/tools/libxc/xc_dom_hvmloader.c b/tools/libxc/xc_dom_hvmloader.c
> > index 54e096c..2c965c9 100644
> > --- a/tools/libxc/xc_dom_hvmloader.c
> > +++ b/tools/libxc/xc_dom_hvmloader.c
> > @@ -160,6 +160,10 @@ static int modules_init(struct xc_dom_image *dom)
> > {
> > int rc;
> [...]
> > }
> > else
> > {
> > + start_info_size +=
> > + sizeof(struct hvm_modlist_entry) * HVMLOADER_MODULE_MAX_COUNT;
> > + /* Add extra space to write modules name */
> > + start_info_size += 10 * HVMLOADER_MODULE_MAX_COUNT;
>
> Why magic number 10? I guess this is the length limit of the name? Can
> you have a #define somewhere?
I wanted to reserve some space to write the names of the modules without
knowing the actual size. I can add a define for it.
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |