xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Don Slutz <dslutz@verizon.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [RFC PATCH 1/1] Add pci_hole_min_size
Date: Mon, 03 Mar 2014 11:07:40 -0500	[thread overview]
Message-ID: <5314A8CC.1060003@oracle.com> (raw)
In-Reply-To: <5314A017.6030004@terremark.com>

On 03/03/2014 10:30 AM, Don Slutz wrote:
> On 02/28/14 17:07, Boris Ostrovsky wrote:
>>
>>> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
>>> index a604cd8..24ceac6 100644
>>> --- a/tools/libxl/libxl_create.c
>>> +++ b/tools/libxl/libxl_create.c
>>> @@ -388,13 +388,15 @@ int libxl__domain_build(libxl__gc *gc,
>>>           vments[4] = "start_time";
>>>           vments[5] = libxl__sprintf(gc, "%lu.%02d", 
>>> start_time.tv_sec,(int)start_time.tv_usec/10000);
>>>   -        localents = libxl__calloc(gc, 7, sizeof(char *));
>>> +        localents = libxl__calloc(gc, 9, sizeof(char *));
>>>           localents[0] = "platform/acpi";
>>>           localents[1] = libxl_defbool_val(info->u.hvm.acpi) ? "1" : 
>>> "0";
>>>           localents[2] = "platform/acpi_s3";
>>>           localents[3] = libxl_defbool_val(info->u.hvm.acpi_s3) ? 
>>> "1" : "0";
>>>           localents[4] = "platform/acpi_s4";
>>>           localents[5] = libxl_defbool_val(info->u.hvm.acpi_s4) ? 
>>> "1" : "0";
>>> +        localents[6] = "platform/pci_hole_min_size";
>>> +        localents[7] = libxl__sprintf(gc, "%llu", (unsigned long 
>>> long)info->u.hvm.pci_hole_min_size);
>>
>> Do you want to always store this parameter? There is a default 
>> already (HVM_BELOW_4G_MMIO_LENGTH) so if it's not set in the config 
>> file it may be safe to omit it.
>>
>
> I do not always need to store it.  Since none of the rest of these are 
> conditional stores, I just followed them.  Since this is the minimum 
> size, I can add a check on pci_hole_min_size > 
> HVM_BELOW_4G_MMIO_LENGTH here and skip the xenstore write if you want.

If you decide to do this I think the better place may be in 
libxl__build_post().

>
>> ...
>>
>>
>>> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
>>> index 4fc46eb..fe247ee 100644
>>> --- a/tools/libxl/xl_cmdimpl.c
>>> +++ b/tools/libxl/xl_cmdimpl.c
>>> @@ -1025,6 +1025,12 @@ static void parse_config_data(const char 
>>> *config_source,
>>>           xlu_cfg_get_defbool(config, "hpet", &b_info->u.hvm.hpet, 0);
>>>           xlu_cfg_get_defbool(config, "vpt_align", 
>>> &b_info->u.hvm.vpt_align, 0);
>>>   +        if (!xlu_cfg_get_long(config, "pci_hole_min_size", &l, 0)) {
>>> +            b_info->u.hvm.pci_hole_min_size = (uint64_t) l;
>>> +            if (dom_info->debug)
>>> +                fprintf(stderr, "pci_hole_min_size: %llu\n", 
>>> (unsigned long long) b_info->u.hvm.pci_hole_min_size);
>>> +        }
>>
>> You probably want to set b_info->u.hvm.pci_hole_min_size to 0 (or 
>> HVM_BELOW_4G_MMIO_LENGTH?) in case it's not specified in 
>> libxl__domain_build_info_setdefault().
>
> Since 0 is a valid value, I do not think that 
> libxl__domain_build_info_setdefault() needs to do any thing. Should I be
> specifying a default in the idl of 0?


What I meant (but apparently not what I wrote) was that if config file 
doesn't have "pci_hole_min_size" then b_info->u.hvm.pci_hole_min_size 
will be left uninitialized and I don't know whether we can assume that 
it will be zero.

-boris


>
>    -Don Slutz
>>
>> -boris
>>
>>
>>> +
>>>           if (!xlu_cfg_get_long(config, "timer_mode", &l, 1)) {
>>>               const char *s = libxl_timer_mode_to_string(l);
>>>               fprintf(stderr, "WARNING: specifying \"timer_mode\" as 
>>> an integer is deprecated. "
>>
>

  reply	other threads:[~2014-03-03 16:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 20:15 [RFC PATCH 0/1] Add pci_hole_min_size Don Slutz
2014-02-28 20:15 ` [RFC PATCH 1/1] " Don Slutz
2014-02-28 22:07   ` Boris Ostrovsky
2014-03-03 15:30     ` Don Slutz
2014-03-03 16:07       ` Boris Ostrovsky [this message]
2014-03-03 20:43         ` Don Slutz
2014-03-03 22:54           ` Boris Ostrovsky
2014-03-04 13:25   ` George Dunlap
2014-03-04 18:57     ` Don Slutz
2014-03-07 19:28       ` Konrad Rzeszutek Wilk
2014-03-11 12:54         ` George Dunlap
2014-03-11 17:16           ` Don Slutz
  -- strict thread matches above, loose matches on Subject: below --
2014-03-11 17:01 [RFC PATCH 0/1] " Don Slutz
2014-03-11 17:01 ` [RFC PATCH 1/1] " Don Slutz

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=5314A8CC.1060003@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=dslutz@verizon.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).