[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-next v3 01/22] x86/traps: move privilege instruction emulation code



On 31/05/17 12:01, Wei Liu wrote:
> On Tue, May 30, 2017 at 11:55:15PM -0600, Jan Beulich wrote:
>>>>> On 30.05.17 at 19:30, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> On 30/05/17 18:27, Wei Liu wrote:
>>>> On Mon, May 29, 2017 at 09:14:07AM -0600, Jan Beulich wrote:
>>>>>>>> On 18.05.17 at 19:28, <wei.liu2@xxxxxxxxxx> wrote:
>>>>>> From 58df816b937dc7a3598de01f053a6030e631057e Mon Sep 17 00:00:00 2001
>>>>>> From: Wei Liu <wei.liu2@xxxxxxxxxx>
>>>>>> Date: Thu, 18 May 2017 16:18:56 +0100
>>>>>> Subject: [PATCH] x86/traps: move privilege instruction emulation code
>>>>> privileged
>>>>>
>>>>>> Move relevant code to pv/emulate.c. Export emulate_privileged_op in
>>>>>> pv/traps.h.
>>>>> A name of "emulate.c" sounds like a container for all sorts of cruft.
>>>>> I'd prefer if we could use the opportunity of this re-org to see about
>>>>> not having overly large files. Therefore e.g. "emul-priv.c" or
>>>>> "priv-emul.c" or some such?
>>>>>
>>>> I think this is a fine idea.
>>> If we are doing this, I'd recommend emul-$FOO.c to avoid having
>>> emulation files named invalid.c (which isn't obvious as to its purpose)
>>> as suggested in patch 3.
>> Agreed - I didn't like the bare "invalid.c" very much either, but
>> I also wasn't entirely happy with the longish "emul-invalid.c".
>> Perhaps "emul-inval.c" then?
>>
> No objection from me.
>
> To recap, I'm going to break emulation code into three files:
>
> * emul-inval.c

emul-invalid-op.c ?  emul-inval is still an unhelpful name to describe
its purpose.

> * emul-gate-op.c
> * emul-priv.c

emul-priv-op.c, for consistency?

>
> The exported functions are going to be prefixed with pv_.
>
> The shared functions use by those three files are going to be in
> emul-common.c (?). They are going to be prefixed pv_emulate_ and
> exported via a local header file emul-common.h (?).

+1

~Andrew

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.