From: Lan Tianyu <tianyu.lan@intel.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: kevin.tian@intel.com, wei.liu2@citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org, julien.grall@arm.com, jbeulich@suse.com,
chao.gao@intel.com
Subject: Re: [RFC PATCH V2 2/4] Tool/ACPI: DSDT extension to support more vcpus
Date: Mon, 4 Sep 2017 19:16:31 +0800 [thread overview]
Message-ID: <d80c767e-3558-55f3-393e-47c502d31130@intel.com> (raw)
In-Reply-To: <20170904090507.5zowhreefcwihdcp@MacBook-Pro-de-Roger.local>
On 2017年09月04日 17:05, Roger Pau Monné wrote:
> On Mon, Sep 04, 2017 at 11:07:14AM +0800, Lan Tianyu wrote:
>> On 2017年09月01日 17:41, Roger Pau Monné wrote:
>>> On Fri, Sep 01, 2017 at 10:54:02AM +0800, Lan Tianyu wrote:
>>>> On 2017年08月31日 23:38, Roger Pau Monné wrote:
>>>>> On Thu, Aug 31, 2017 at 01:01:47AM -0400, Lan Tianyu wrote:
>>>>>> This patch is to change DSDT table for processor object to support >128 vcpus
>>>>>> accroding to ACPI spec 8.4 Declaring Processors
>>>>>>
>>>>>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>>>>>> ---
>>>>>> tools/libacpi/mk_dsdt.c | 18 ++++++++++++------
>>>>>> 1 file changed, 12 insertions(+), 6 deletions(-)
>>>>>>
>>>>>> diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
>>>>>> index 2daf32c..6c4c325 100644
>>>>>> --- a/tools/libacpi/mk_dsdt.c
>>>>>> +++ b/tools/libacpi/mk_dsdt.c
>>>>>> @@ -24,6 +24,8 @@
>>>>>> #include <xen/arch-arm.h>
>>>>>> #endif
>>>>>>
>>>>>> +#define CPU_NAME_FMT "P%.03X"
>>>>>> +
>>>>>> static unsigned int indent_level;
>>>>>> static bool debug = false;
>>>>>>
>>>>>> @@ -196,10 +198,14 @@ int main(int argc, char **argv)
>>>>>> /* Define processor objects and control methods. */
>>>>>> for ( cpu = 0; cpu < max_cpus; cpu++)
>>>>>> {
>>>>>> - push_block("Processor", "PR%02X, %d, 0x0000b010, 0x06", cpu, cpu);
>>>>>> + unsigned int apic_id = cpu * 2;
>>>>>
>>>>> This is fragile, ideally there should be a single point where the APIC
>>>>> ID is calculated. Although there are already two places where the APIC
>>>>> ID is calculated, in hvmloader and libxl.
>>>>>
>>>>> And I'm not sure how to use any of those here in order to avoid
>>>>> introducing a third one.
>>>>
>>>> The mk_dsdt is independent tool to build dsdt table. It wasn't linked
>>>> with libxl and hvmloader. We can't reuse old function to do that.
>>>>
>>>> But I think we may introduce a new LAPIC_ID(vcpu) in the arch head
>>>> file(i.e, #include <xen/arch-x86/xen.h>) and replace old ones.
>>>
>>> There's already a LAPIC_ID macro in hvmloader headers which should be
>>> placed somewhere suitable.
>>
>> Yes, this is what I mentioned.
>
> Jan has expressed some concerns with removing the hook, see:
>
> <59A94E320200007800176754@prv-mh.provo.novell.com>
So we still need to introduce LAPIC_ID() here, right?
>
>>> What about removing the lapic_id hook from
>>> acpi_config and placing the LAPIC_ID macro in the libacpi.h header?
>>
>> I think this should be ARCH specific. I am not sure whether ARM follows
>> rule of "apic_id = vcpu_id *2".
>>
>> Julien, could you give some inputs? Thanks.
>
> AFAIK ARM doesn't have a local APIC, so there are no xAPIC/x2APIC
> entries in the ARM MADT.
>
--
Best regards
Tianyu Lan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-04 11:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 5:01 [RFC PATCH V2 0/4] Extend resources to support more vcpus in single VM Lan Tianyu
2017-08-31 5:01 ` [RFC PATCH V2 1/4] xen/hap: Increase hap page pool size for more vcpus support Lan Tianyu
2017-08-31 13:56 ` Andrew Cooper
2017-09-01 8:19 ` Lan Tianyu
2017-09-01 8:34 ` Jan Beulich
2017-09-01 9:12 ` Lan Tianyu
2017-08-31 5:01 ` [RFC PATCH V2 2/4] Tool/ACPI: DSDT extension to support more vcpus Lan Tianyu
2017-08-31 15:38 ` Roger Pau Monné
2017-09-01 2:54 ` Lan Tianyu
2017-09-01 9:41 ` Roger Pau Monné
2017-09-01 10:10 ` Jan Beulich
2017-09-01 10:26 ` Roger Pau Monné
2017-09-04 3:07 ` Lan Tianyu
2017-09-04 9:05 ` Roger Pau Monné
2017-09-04 11:16 ` Lan Tianyu [this message]
2017-09-11 11:15 ` Julien Grall
2017-08-31 5:01 ` [RFC PATCH V2 3/4] hvmload: Add x2apic entry support in the MADT build Lan Tianyu
2017-09-01 9:57 ` Roger Pau Monné
2017-09-04 10:59 ` Lan Tianyu
2017-09-04 11:12 ` Roger Pau Monné
2017-09-04 12:59 ` Jan Beulich
2017-08-31 5:01 ` [RFC PATCH V2 4/4] xl/libacpi: extend lapic_id() to uint32_t Lan Tianyu
2017-08-31 13:58 ` Andrew Cooper
2017-09-01 15:41 ` Wei Liu
2017-09-04 8:20 ` Wei Liu
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=d80c767e-3558-55f3-393e-47c502d31130@intel.com \
--to=tianyu.lan@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=chao.gao@intel.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=kevin.tian@intel.com \
--cc=roger.pau@citrix.com \
--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 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).