From: Julien Grall <julien.grall@linaro.org>
To: Paul Durrant <Paul.Durrant@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Kevin Tian <kevin.tian@intel.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Razvan Cojocaru <rcojocaru@bitdefender.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
"Tim (Xen.org)" <tim@xen.org>,
George Dunlap <George.Dunlap@citrix.com>,
Julien Grall <julien.grall@arm.com>,
Tamas K Lengyel <tamas@tklengyel.com>,
Jan Beulich <jbeulich@suse.com>,
Shane Wang <shane.wang@intel.com>,
Ian Jackson <Ian.Jackson@citrix.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Gang Wei <gang.wei@intel.com>
Subject: Re: [PATCH v2 9/9] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN
Date: Fri, 6 Oct 2017 12:00:06 +0100 [thread overview]
Message-ID: <07420ef8-1e07-06f6-b805-e5bf03fa7bb1@linaro.org> (raw)
In-Reply-To: <e9a985d467f14f7bb146a535c3f57b9a@AMSPEX02CL03.citrite.net>
On 06/10/17 11:55, Paul Durrant wrote:
>>>> diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-
>> priv-
>>>> op.c
>>>> index dd90713acf..9ccbd021ef 100644
>>>> --- a/xen/arch/x86/pv/emul-priv-op.c
>>>> +++ b/xen/arch/x86/pv/emul-priv-op.c
>>>> @@ -43,16 +43,6 @@
>>>> #include "emulate.h"
>>>> #include "mm.h"
>>>>
>>>> -/* Override macros from asm/page.h to make them work with mfn_t */
>>>> -#undef mfn_to_page
>>>> -#define mfn_to_page(mfn) __mfn_to_page(mfn_x(mfn))
>>>> -#undef page_to_mfn
>>>> -#define page_to_mfn(pg) _mfn(__page_to_mfn(pg))
>>>> -
>>>> -/***********************
>>>> - * I/O emulation support
>>>> - */
>>>> -
>>>
>>> What's wrong with the comment?
>>
>> The file is dedicated to I/O emulation support as said in the header and
>> the name. I can understand why it was there given there was macros
>> defined not related to I/O. Now they are dropped, why would you need a
>> comment to separate includes and the code?
>>
>
> It makes the hunk look odd though. I think you should leave the comment alone in this patch, even if you do think it superfluous.
Please get agree with Andrew... Here his comment on the previous version:
"If you're making this change, please take out the Descriptor Tables
comment like you do with I/O below, because the entire file is dedicated
to descriptor table support and it will save me one item on a cleanup
patch :)."
>
>> [...]
>>
>>>> diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
>>>> index 86506f3747..b85394d1f9 100644
>>>> --- a/xen/arch/x86/traps.c
>>>> +++ b/xen/arch/x86/traps.c
>>>> @@ -811,7 +811,7 @@ int wrmsr_hypervisor_regs(uint32_t idx, uint64_t
>> val)
>>>>
>>>> gdprintk(XENLOG_WARNING,
>>>> "Bad GMFN %lx (MFN %lx) to MSR %08x\n",
>>>> - gmfn, page ? page_to_mfn(page) : -1UL, base);
>>>> + gmfn, page ? mfn_x(page_to_mfn(page)) : -1UL, base);
>>>
>>> Would this not be better as mfn_x(page ? page_to_mfn(page) :
>> INVALID_MFN), as you have done elsewhere?
>>
>> See above.
>
> And again, you are modifying the code so why not modify it such that it is coded appropriately, as you have in other places in this patch?
I will see what I can do when I will have time to spend on clean-up...
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-10-06 11:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 17:42 [PATCH v2 0/9] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN Julien Grall
2017-10-05 17:42 ` [PATCH v2 1/9] xen/arm: domain_build: Clean-up insert_11_bank Julien Grall
2017-10-05 17:42 ` [PATCH v2 2/9] xen/arm32: mm: Rework is_xen_heap_page to avoid nameclash Julien Grall
2017-10-05 17:42 ` [PATCH v2 3/9] xen/x86: mem_sharing: Use copy_domain_page in __mem_sharing_unshare_page Julien Grall
2017-10-05 17:49 ` Andrew Cooper
2017-10-05 17:52 ` Tamas K Lengyel
2017-10-05 17:42 ` [PATCH v2 4/9] xen/x86: Use maddr_to_page and maddr_to_mfn to avoid open-coded >> PAGE_SHIFT Julien Grall
2017-10-05 17:42 ` [PATCH v2 5/9] xen/kimage: Remove defined but unused variables Julien Grall
2017-10-05 17:42 ` [PATCH v2 6/9] xen/kexec, kimage: Convert kexec and kimage to use typesafe mfn_t Julien Grall
2017-10-05 17:51 ` Andrew Cooper
2017-10-05 17:42 ` [PATCH v2 7/9] xen/xenoprof: Convert the file to use typesafe MFN Julien Grall
2017-10-05 17:42 ` [PATCH v2 8/9] xen/tmem: Convert the file common/tmem_xen.c " Julien Grall
2017-10-05 17:42 ` [PATCH v2 9/9] xen: Convert __page_to_mfn and __mfn_to_page " Julien Grall
2017-10-05 17:59 ` Andrew Cooper
2017-10-05 18:31 ` Razvan Cojocaru
2017-10-06 9:11 ` Paul Durrant
2017-10-06 10:49 ` Julien Grall
2017-10-06 10:55 ` Paul Durrant
2017-10-06 11:00 ` Julien Grall [this message]
2017-10-06 11:44 ` Paul Durrant
2017-10-06 13:02 ` Boris Ostrovsky
2017-10-09 11:42 ` Jan Beulich
2017-10-09 12:20 ` Julien Grall
2017-10-09 13:40 ` Jan Beulich
2017-10-09 13:48 ` Julien Grall
2017-10-09 14:07 ` Jan Beulich
2017-10-10 5:18 ` Tian, Kevin
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=07420ef8-1e07-06f6-b805-e5bf03fa7bb1@linaro.org \
--to=julien.grall@linaro.org \
--cc=Andrew.Cooper3@citrix.com \
--cc=George.Dunlap@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=Paul.Durrant@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=gang.wei@intel.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=konrad.wilk@oracle.com \
--cc=rcojocaru@bitdefender.com \
--cc=shane.wang@intel.com \
--cc=sstabellini@kernel.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=tamas@tklengyel.com \
--cc=tim@xen.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 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).