From: Dongli Zhang <dongli.zhang@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
xen-devel@lists.xenproject.org, x86@kernel.org
Cc: linux-kernel@vger.kernel.org, jgross@suse.com,
sstabellini@kernel.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, joe.jin@oracle.com
Subject: Re: [PATCH v4 2/2] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32
Date: Wed, 2 Mar 2022 19:08:11 -0800 [thread overview]
Message-ID: <a40326c0-bdad-da76-9271-61bd8f3fa436@oracle.com> (raw)
In-Reply-To: <272a69ec-4cc8-f282-8499-88b24b61f130@oracle.com>
Hi Boris,
On 3/2/22 6:11 PM, Boris Ostrovsky wrote:
>
> On 3/2/22 7:31 PM, Dongli Zhang wrote:
>> Hi Boris,
>>
>> On 3/2/22 4:20 PM, Boris Ostrovsky wrote:
>>> On 3/2/22 11:40 AM, Dongli Zhang wrote:
>>>> void __init xen_hvm_init_time_ops(void)
>>>> {
>>>> + static bool hvm_time_initialized;
>>>> +
>>>> + if (hvm_time_initialized)
>>>> + return;
>>>> +
>>>> /*
>>>> * vector callback is needed otherwise we cannot receive interrupts
>>>> * on cpu > 0 and at this point we don't know how many cpus are
>>>> * available.
>>>> */
>>>> if (!xen_have_vector_callback)
>>>> - return;
>>>> + goto exit;
>>>
>>> Why not just return? Do we expect the value of xen_have_vector_callback to
>>> change?
>> I just want to keep above sync with ....
>>
>>>
>>> -boris
>>>
>>>
>>>> if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
>>>> pr_info("Xen doesn't support pvclock on HVM, disable pv timer");
>>>> + goto exit;
>>>> + }
>> ... here.
>>
>> That is, I want the main logic of xen_hvm_init_time_ops() to run for at most
>> once. Both of above two if statements will "go to exit".
>
>
> I didn't notice this actually.
>
>
> I think both of them should return early, there is no reason to set
> hvm_time_initialized to true when, in fact, we have not initialized anything.
> And to avoid printing the warning twice we can just replace it with pr_info_once().
>
>
> I can fix it up when committing so no need to resend. So unless you disagree
Thank you very much for fixing it during committing.
Dongli Zhang
next prev parent reply other threads:[~2022-03-03 3:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 16:40 [PATCH v4 0/2] xen: fix HVM kexec kernel panic Dongli Zhang
2022-03-02 16:40 ` [PATCH v4 1/2] x86/xen/time: fix indentation issue Dongli Zhang
2022-03-02 16:40 ` [PATCH v4 2/2] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32 Dongli Zhang
2022-03-03 0:20 ` Boris Ostrovsky
2022-03-03 0:31 ` Dongli Zhang
2022-03-03 2:11 ` Boris Ostrovsky
2022-03-03 3:08 ` Dongli Zhang [this message]
2022-03-11 14:19 ` Boris Ostrovsky
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=a40326c0-bdad-da76-9271-61bd8f3fa436@oracle.com \
--to=dongli.zhang@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=jgross@suse.com \
--cc=joe.jin@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sstabellini@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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
all inboxes | Powered by JetHome®