[Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.

Yang Zhong posted 6 patches 6 years, 10 months ago
Only 5 patches received!
Makefile.objs                                | 1 +
Makefile.target                              | 8 ++------
tcg/Makefile.objs                            | 2 ++
tcg-runtime.c => tcg/tcg-runtime.c           | 0
tci.c => tcg/tci.c                           | 0
tcg/trace-events                             | 6 ++++++
translate-all.c => tcg/translate-all.c       | 2 +-
translate-all.h => tcg/translate-all.h       | 0
translate-common.c => tcg/translate-common.c | 0
trace-events                                 | 3 ---
10 files changed, 12 insertions(+), 10 deletions(-)
create mode 100644 tcg/Makefile.objs
rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
rename tci.c => tcg/tci.c (100%)
create mode 100644 tcg/trace-events
rename translate-all.c => tcg/translate-all.c (99%)
rename translate-all.h => tcg/translate-all.h (100%)
rename translate-common.c => tcg/translate-common.c (100%)
[Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.
Posted by Yang Zhong 6 years, 10 months ago
Move the tcg related files into tcg/ subdirectory, which will make
the code more clean in qemu. Next step, we will base on those changes 
to disable tcg.

Yang Zhong (6):
  tcg: move tcg-runtime.c to tcg/ subdirectory
  tcg: move translate-all.c to tcg/ subdirectory
  tcg: move tcg header file
  tcg: move translate-common.c to tcg/ subdirectory
  tcg: move tci.c to tcg/ subdirectory
  tcg: change tcg related file's compile definition

 Makefile.objs                                | 1 +
 Makefile.target                              | 8 ++------
 tcg/Makefile.objs                            | 2 ++
 tcg-runtime.c => tcg/tcg-runtime.c           | 0
 tci.c => tcg/tci.c                           | 0
 tcg/trace-events                             | 6 ++++++
 translate-all.c => tcg/translate-all.c       | 2 +-
 translate-all.h => tcg/translate-all.h       | 0
 translate-common.c => tcg/translate-common.c | 0
 trace-events                                 | 3 ---
 10 files changed, 12 insertions(+), 10 deletions(-)
 create mode 100644 tcg/Makefile.objs
 rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
 rename tci.c => tcg/tci.c (100%)
 create mode 100644 tcg/trace-events
 rename translate-all.c => tcg/translate-all.c (99%)
 rename translate-all.h => tcg/translate-all.h (100%)
 rename translate-common.c => tcg/translate-common.c (100%)

-- 
1.9.1


[Qemu-devel] [PATCH v2 3/6] tcg: move tcg header file
Posted by Yang Zhong 6 years, 10 months ago
tcg: move translate-all.h to tcg/ subdirectory

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 translate-all.h => tcg/translate-all.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename translate-all.h => tcg/translate-all.h (100%)

diff --git a/translate-all.h b/tcg/translate-all.h
similarity index 100%
rename from translate-all.h
rename to tcg/translate-all.h
-- 
1.9.1


Re: [Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.
Posted by Paolo Bonzini 6 years, 10 months ago

On 31/05/2017 08:28, Yang Zhong wrote:
> Move the tcg related files into tcg/ subdirectory, which will make
> the code more clean in qemu. Next step, we will base on those changes 
> to disable tcg.

You should also move cpu-exec.c, cpu-exec-common.c and cputlb.c.

Also, feel free to squash everything in a single patch.
Thanks,

Paolo

> Yang Zhong (6):
>   tcg: move tcg-runtime.c to tcg/ subdirectory
>   tcg: move translate-all.c to tcg/ subdirectory
>   tcg: move tcg header file
>   tcg: move translate-common.c to tcg/ subdirectory
>   tcg: move tci.c to tcg/ subdirectory
>   tcg: change tcg related file's compile definition
> 
>  Makefile.objs                                | 1 +
>  Makefile.target                              | 8 ++------
>  tcg/Makefile.objs                            | 2 ++
>  tcg-runtime.c => tcg/tcg-runtime.c           | 0
>  tci.c => tcg/tci.c                           | 0
>  tcg/trace-events                             | 6 ++++++
>  translate-all.c => tcg/translate-all.c       | 2 +-
>  translate-all.h => tcg/translate-all.h       | 0
>  translate-common.c => tcg/translate-common.c | 0
>  trace-events                                 | 3 ---
>  10 files changed, 12 insertions(+), 10 deletions(-)
>  create mode 100644 tcg/Makefile.objs
>  rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
>  rename tci.c => tcg/tci.c (100%)
>  create mode 100644 tcg/trace-events
>  rename translate-all.c => tcg/translate-all.c (99%)
>  rename translate-all.h => tcg/translate-all.h (100%)
>  rename translate-common.c => tcg/translate-common.c (100%)
> 

Re: [Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.
Posted by Laurent Desnogues 6 years, 10 months ago
Hello,

On Wed, May 31, 2017 at 2:54 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 31/05/2017 08:28, Yang Zhong wrote:
>> Move the tcg related files into tcg/ subdirectory, which will make
>> the code more clean in qemu. Next step, we will base on those changes
>> to disable tcg.
>
> You should also move cpu-exec.c, cpu-exec-common.c and cputlb.c.

The LICENSE file in tcg directory contains this:

---------------------------------------------------------------------
All the files in this directory and subdirectories are released under
a BSD like license (see header in each file). No other license is
accepted.
---------------------------------------------------------------------

All source files have an explicit BSD license except tcg-runtime.h
which has none and aarch64 files which are licensed under GPL.  So we
are already not following the rule expressed in LICENSE.

tcg-runtime.c is BSD
tci.c is GPL
translate-all.[ch] are GPL
translate-common.c is GPL
cpu-exec.c cpu-exec-common.c cputlb.c are GPL

I guess the LICENSE file has become obsolete and so should be removed
(and Fabrice Bellard should perhaps be let know about that just in
case).

Thanks,

Laurent

> Also, feel free to squash everything in a single patch.
> Thanks,
>
> Paolo
>
>> Yang Zhong (6):
>>   tcg: move tcg-runtime.c to tcg/ subdirectory
>>   tcg: move translate-all.c to tcg/ subdirectory
>>   tcg: move tcg header file
>>   tcg: move translate-common.c to tcg/ subdirectory
>>   tcg: move tci.c to tcg/ subdirectory
>>   tcg: change tcg related file's compile definition
>>
>>  Makefile.objs                                | 1 +
>>  Makefile.target                              | 8 ++------
>>  tcg/Makefile.objs                            | 2 ++
>>  tcg-runtime.c => tcg/tcg-runtime.c           | 0
>>  tci.c => tcg/tci.c                           | 0
>>  tcg/trace-events                             | 6 ++++++
>>  translate-all.c => tcg/translate-all.c       | 2 +-
>>  translate-all.h => tcg/translate-all.h       | 0
>>  translate-common.c => tcg/translate-common.c | 0
>>  trace-events                                 | 3 ---
>>  10 files changed, 12 insertions(+), 10 deletions(-)
>>  create mode 100644 tcg/Makefile.objs
>>  rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
>>  rename tci.c => tcg/tci.c (100%)
>>  create mode 100644 tcg/trace-events
>>  rename translate-all.c => tcg/translate-all.c (99%)
>>  rename translate-all.h => tcg/translate-all.h (100%)
>>  rename translate-common.c => tcg/translate-common.c (100%)
>>
>

Re: [Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.
Posted by Paolo Bonzini 6 years, 10 months ago

On 31/05/2017 18:24, Laurent Desnogues wrote:
> All source files have an explicit BSD license except tcg-runtime.h
> which has none and aarch64 files which are licensed under GPL.  So we
> are already not following the rule expressed in LICENSE.
> 
> tcg-runtime.c is BSD
> tci.c is GPL
> translate-all.[ch] are GPL
> translate-common.c is GPL
> cpu-exec.c cpu-exec-common.c cputlb.c are GPL
> 
> I guess the LICENSE file has become obsolete and so should be removed
> (and Fabrice Bellard should perhaps be let know about that just in
> case).

We can change it to "The TCG backend files", followed by a list of
files.  But even then, aarch64 files are GPL...

Paolo

Re: [Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.
Posted by Zhong Yang 6 years, 10 months ago
 Wed, May 31, 2017 at 02:54:05PM +0200, Paolo Bonzini wrote:
> 
> 
> On 31/05/2017 08:28, Yang Zhong wrote:
> > Move the tcg related files into tcg/ subdirectory, which will make
> > the code more clean in qemu. Next step, we will base on those changes 
> > to disable tcg.
> 
> You should also move cpu-exec.c, cpu-exec-common.c and cputlb.c.
>
  In fact, there are other two patchsets for those files. Since this patchset
  is only for moving TCG backend files into tcg/ subdirectory, i firstly upload
  this patchset.

  Let me explain my plan here, 

  In order to disable tcg, the first phase is to split some
  tcg code and separate those tcg related files into one
  directory. The next phase will disable tcg more easily and
  cleanly.

  In the first phase, there are three patchsets to
  deal with split code and separate the files.
  1) split the tcg exec code.
     a)split the tcg accelerators from accel.c file and re-name
       tcg accelerator to tcg-all.c, like kvm-all.c did.
     b)create one accel directory, which will include kvm,
       tcg and general exec files.
     c)move tcg exec files into ./accel/tcg directory.
  2) move tcg related backend files into tcg/ directory
     those files include translate-all.(ch), translate-common.c,
     tci.c and tcg-runtime.c.
  3) move kvm exec and exec.c file.
     a)move kvm related exec files into ./accel/kvm directory.
     b)move exec.c in ./accel directory.

  after 1) and 3) done, the file tree like below:
  accel/
  ├── accel.c
  ├── exec.c
  ├── kvm
  │   ├── kvm-all.c
  │   ├── kvm-stub.c
  │   ├── Makefile.objs
  │   └── trace-events
  ├── Makefile.objs
  └── tcg
      ├── cpu-exec.c
      ├── cpu-exec-common.c
      ├── cputlb.c
      ├── Makefile.objs
      ├── tcg-all.c
      └── trace-events
  
  please help me check whether this kind of arrange is suitable? 


> Also, feel free to squash everything in a single patch.

  for the tcg/ subdirectory, i will make those 6 patchset to one single patch. thanks!

> Thanks,
> 
> Paolo
> 
> > Yang Zhong (6):
> >   tcg: move tcg-runtime.c to tcg/ subdirectory
> >   tcg: move translate-all.c to tcg/ subdirectory
> >   tcg: move tcg header file
> >   tcg: move translate-common.c to tcg/ subdirectory
> >   tcg: move tci.c to tcg/ subdirectory
> >   tcg: change tcg related file's compile definition
> > 
> >  Makefile.objs                                | 1 +
> >  Makefile.target                              | 8 ++------
> >  tcg/Makefile.objs                            | 2 ++
> >  tcg-runtime.c => tcg/tcg-runtime.c           | 0
> >  tci.c => tcg/tci.c                           | 0
> >  tcg/trace-events                             | 6 ++++++
> >  translate-all.c => tcg/translate-all.c       | 2 +-
> >  translate-all.h => tcg/translate-all.h       | 0
> >  translate-common.c => tcg/translate-common.c | 0
> >  trace-events                                 | 3 ---
> >  10 files changed, 12 insertions(+), 10 deletions(-)
> >  create mode 100644 tcg/Makefile.objs
> >  rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
> >  rename tci.c => tcg/tci.c (100%)
> >  create mode 100644 tcg/trace-events
> >  rename translate-all.c => tcg/translate-all.c (99%)
> >  rename translate-all.h => tcg/translate-all.h (100%)
> >  rename translate-common.c => tcg/translate-common.c (100%)
> > 

Re: [Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.
Posted by Paolo Bonzini 6 years, 10 months ago

On 01/06/2017 07:27, Zhong Yang wrote:
>   In the first phase, there are three patchsets to
>   deal with split code and separate the files.
>   1) split the tcg exec code.
>      a)split the tcg accelerators from accel.c file and re-name
>        tcg accelerator to tcg-all.c, like kvm-all.c did.
>      b)create one accel directory, which will include kvm,
>        tcg and general exec files.
>      c)move tcg exec files into ./accel/tcg directory.
>   2) move tcg related backend files into tcg/ directory
>      those files include translate-all.(ch), translate-common.c,
>      tci.c and tcg-runtime.c.
>   3) move kvm exec and exec.c file.
>      a)move kvm related exec files into ./accel/kvm directory.
>      b)move exec.c in ./accel directory.
> 
>   after 1) and 3) done, the file tree like below:
>   accel/
>   ├── accel.c
>   ├── exec.c
>   ├── kvm
>   │   ├── kvm-all.c
>   │   ├── kvm-stub.c
>   │   ├── Makefile.objs
>   │   └── trace-events
>   ├── Makefile.objs
>   └── tcg
>       ├── cpu-exec.c
>       ├── cpu-exec-common.c
>       ├── cputlb.c
>       ├── Makefile.objs
>       ├── tcg-all.c
>       └── trace-events
>   
>   please help me check whether this kind of arrange is suitable? 

Oh, I see now.  I think translate-all.[ch] and translate-common.c belong
in accel/tcg more than tcg/.

Thanks,

Paolo

Re: [Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.
Posted by Zhong Yang 6 years, 10 months ago
On Thu, Jun 01, 2017 at 10:14:34AM +0200, Paolo Bonzini wrote:
> 
> 
> On 01/06/2017 07:27, Zhong Yang wrote:
> >   In the first phase, there are three patchsets to
> >   deal with split code and separate the files.
> >   1) split the tcg exec code.
> >      a)split the tcg accelerators from accel.c file and re-name
> >        tcg accelerator to tcg-all.c, like kvm-all.c did.
> >      b)create one accel directory, which will include kvm,
> >        tcg and general exec files.
> >      c)move tcg exec files into ./accel/tcg directory.
> >   2) move tcg related backend files into tcg/ directory
> >      those files include translate-all.(ch), translate-common.c,
> >      tci.c and tcg-runtime.c.
> >   3) move kvm exec and exec.c file.
> >      a)move kvm related exec files into ./accel/kvm directory.
> >      b)move exec.c in ./accel directory.
> > 
> >   after 1) and 3) done, the file tree like below:
> >   accel/
> >   ├── accel.c
> >   ├── exec.c
> >   ├── kvm
> >   │   ├── kvm-all.c
> >   │   ├── kvm-stub.c
> >   │   ├── Makefile.objs
> >   │   └── trace-events
> >   ├── Makefile.objs
> >   └── tcg
> >       ├── cpu-exec.c
> >       ├── cpu-exec-common.c
> >       ├── cputlb.c
> >       ├── Makefile.objs
> >       ├── tcg-all.c
> >       └── trace-events
> >   
> >   please help me check whether this kind of arrange is suitable? 
> 
> Oh, I see now.  I think translate-all.[ch] and translate-common.c belong
> in accel/tcg more than tcg/.

  okay, i will make those changes into one patchset and send v3 to all, thanks!

  Yang.
> 
> Thanks,
> 
> Paolo