All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: hangaohuai@huawei.com, sstabellini@kernel.org,
	ian.jackson@eu.citrix.com, peter.huangpeng@huawei.com,
	xen-devel@lists.xen.org, julien.grall@arm.com,
	shannon.zhao@linaro.org, boris.ostrovsky@oracle.com
Subject: Re: [PATCH v3 04/17] libxl/arm: prepare for constructing ACPI tables
Date: Tue, 12 Jul 2016 15:05:34 +0800	[thread overview]
Message-ID: <578496BE.1020205@huawei.com> (raw)
In-Reply-To: <20160707155015.GZ416@citrix.com>



On 2016/7/7 23:50, Wei Liu wrote:
> On Tue, Jul 05, 2016 at 11:12:34AM +0800, Shannon Zhao wrote:
>> > From: Shannon Zhao <shannon.zhao@linaro.org>
>> > 
>> > It only constructs the ACPI tables for 64-bit ARM DomU when user enables
>> > acpi because 32-bit DomU doesn't support ACPI.
>> > 
>> > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
>> > ---
>> >  tools/libxl/Makefile         |  4 ++++
>> >  tools/libxl/libxl_arm.c      | 19 ++++++++++++++-
>> >  tools/libxl/libxl_arm.h      | 33 ++++++++++++++++++++++++++
>> >  tools/libxl/libxl_arm_acpi.c | 56 ++++++++++++++++++++++++++++++++++++++++++++
>> >  4 files changed, 111 insertions(+), 1 deletion(-)
>> >  create mode 100644 tools/libxl/libxl_arm.h
>> >  create mode 100644 tools/libxl/libxl_arm_acpi.c
>> > 
>> > diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
>> > index 0cf9f6a..88ab4d2 100644
>> > --- a/tools/libxl/Makefile
>> > +++ b/tools/libxl/Makefile
>> > @@ -91,6 +91,10 @@ acpi:
>> >  
>> >  LIBXL_OBJS-$(CONFIG_X86) += libxl_cpuid.o libxl_x86.o libxl_psr.o libxl_x86_acpi.o
>> >  LIBXL_OBJS-$(CONFIG_ARM) += libxl_nocpuid.o libxl_arm.o libxl_libfdt_compat.o
>> > +LIBXL_OBJS-$(CONFIG_ARM) += libxl_arm_acpi.o
>> > +
>> > +libxl_arm_acpi.o: libxl_arm_acpi.c
>> > +	$(CC) -c $(CFLAGS) -I../../xen/include/ -o $@ libxl_arm_acpi.c
>> >  
>> >  ifeq ($(CONFIG_NetBSD),y)
>> >  LIBXL_OBJS-y += libxl_netbsd.o
>> > diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
>> > index 4a57dd7..7c522e1 100644
>> > --- a/tools/libxl/libxl_arm.c
>> > +++ b/tools/libxl/libxl_arm.c
>> > @@ -1,6 +1,7 @@
>> >  #include "libxl_internal.h"
>> >  #include "libxl_arch.h"
>> >  #include "libxl_libfdt_compat.h"
>> > +#include "libxl_arm.h"
>> >  
>> >  #include <xc_dom.h>
>> >  #include <stdbool.h>
>> > @@ -885,8 +886,24 @@ int libxl__arch_domain_init_hw_description(libxl__gc *gc,
>> >                                             libxl__domain_build_state *state,
>> >                                             struct xc_dom_image *dom)
>> >  {
>> > +    int rc;
>> > +
>> >      assert(info->type == LIBXL_DOMAIN_TYPE_PV);
>> > -    return libxl__prepare_dtb(gc, info, state, dom);
>> > +    rc = libxl__prepare_dtb(gc, info, state, dom);
>> > +    if (rc)
>> > +        return rc;
>> > +
>> > +    if (!libxl_defbool_val(info->arch_arm.acpi)) {
>> > +        LOG(DEBUG, "Generating ACPI tables is disabled by user.");
>> > +        return 0;
>> > +    }
>> > +
>> > +    if (strcmp(dom->guest_type, "xen-3.0-aarch64")) {
>> > +        LOG(ERROR, "Can not enable xl option 'acpi' for %s", dom->guest_type);
>> > +        return ERROR_FAIL;
>> > +    }
>> > +
>> > +    return libxl__prepare_acpi(gc, info, state, dom);
> Please use goto style error handling for consistency. See
> tools/libxl/CODING_STYLE. Please fix all other instances as well.
> 
Ok, will fix these. Thanks.

-- 
Shannon


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-07-12  7:05 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05  3:12 [PATCH v3 00/17] Xen ARM DomU ACPI support Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 01/17] libxl/arm: Factor out codes for generating DTB Shannon Zhao
2016-07-07 15:41   ` Wei Liu
2016-07-07 15:48     ` Boris Ostrovsky
2016-07-07 16:06       ` Julien Grall
2016-07-07 16:09         ` Wei Liu
2016-07-07 16:12         ` Boris Ostrovsky
2016-07-07 16:15           ` Julien Grall
2016-07-07 16:16           ` Wei Liu
2016-07-07 16:08       ` Wei Liu
2016-07-05  3:12 ` [PATCH v3 02/17] libxc: Add placeholders for ACPI tables blob and size Shannon Zhao
2016-07-07 15:42   ` Wei Liu
2016-07-05  3:12 ` [PATCH v3 03/17] libxl/arm: Add a configuration option for ARM DomU ACPI Shannon Zhao
2016-07-07 15:48   ` Wei Liu
2016-07-05  3:12 ` [PATCH v3 04/17] libxl/arm: prepare for constructing ACPI tables Shannon Zhao
2016-07-07 15:50   ` Wei Liu
2016-07-12  7:05     ` Shannon Zhao [this message]
2016-07-05  3:12 ` [PATCH v3 05/17] libxl/arm: Generate static ACPI DSDT table Shannon Zhao
2016-07-07 15:52   ` Wei Liu
2016-07-12  3:50     ` Shannon Zhao
2016-07-12 11:38       ` Wei Liu
2016-07-12 14:49         ` Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 06/17] libxl/arm: Estimate the size of ACPI tables Shannon Zhao
2016-07-07 16:07   ` Wei Liu
2016-07-07 16:39     ` Julien Grall
2016-07-08 10:45       ` Wei Liu
2016-07-05  3:12 ` [PATCH v3 07/17] libxl/arm: Construct ACPI RSDP table Shannon Zhao
2016-07-07 22:43   ` Boris Ostrovsky
2016-07-08  3:31     ` Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 08/17] libxl/arm: Construct ACPI XSDT table Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 09/17] libxl/arm: Construct ACPI GTDT table Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 10/17] libxl/arm: Factor MPIDR computing codes out as a helper Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 11/17] libxl/arm: Construct ACPI MADT table Shannon Zhao
2016-07-07 16:11   ` Wei Liu
2016-07-07 16:46     ` Julien Grall
2016-07-05  3:12 ` [PATCH v3 12/17] libxl/arm: Construct ACPI FADT table Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 13/17] libxl/arm: Construct ACPI DSDT table Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 14/17] libxl/arm: Factor finalise_one_memory_node as a gerneric function Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 15/17] libxl/arm: Add ACPI module Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 16/17] libxc/xc_dom_core: Copy ACPI tables to guest space Shannon Zhao
2016-07-05  3:12 ` [PATCH v3 17/17] libxl/arm: Initialize domain param HVM_PARAM_CALLBACK_IRQ Shannon Zhao
2016-07-07 16:15   ` Wei Liu
2016-07-07 16:57     ` Julien Grall
2016-07-08  3:41       ` Shannon Zhao
2016-07-08 10:47       ` Wei Liu
2016-07-05 10:32 ` [PATCH v3 00/17] Xen ARM DomU ACPI support Julien Grall
2016-07-05 14:09   ` Shannon Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=578496BE.1020205@huawei.com \
    --to=zhaoshenglong@huawei.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hangaohuai@huawei.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@arm.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=shannon.zhao@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.