All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/
@ 2017-09-11 21:33 Philippe Mathieu-Daudé
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 1/5] tcg: Move softmmu_template.h to the accel/tcg/ folder Philippe Mathieu-Daudé
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-11 21:33 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Peter Crosthwaite, Thomas Huth
  Cc: Philippe Mathieu-Daudé, qemu-devel

As suggested by Paolo:

  That part of tcg/tcg-runtime.c probably should be moved to user-exec.c,
  and user-exec.c should in turn be in accel/tcg.

in http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg03657.html

also update MAINTAINERS accordingly.

Regards,

Phil.

Philippe Mathieu-Daudé (4):
  tcg: move user-exec
  tcg: move tcg-runtime to accel/tcg/
  tcg: move atomic_template.h to accel/tcg/
  tcg: restrict i386 regs definitions

Thomas Huth (1):
  tcg: Move softmmu_template.h to the accel/tcg/ folder

 Makefile.target                                    |  6 +++---
 atomic_template.h => accel/tcg/atomic_template.h   |  0
 softmmu_template.h => accel/tcg/softmmu_template.h |  0
 {tcg => accel/tcg}/tcg-runtime.h                   |  0
 {tcg => accel/tcg}/tcg-runtime.c                   |  0
 user-exec-stub.c => accel/tcg/user-exec-stub.c     |  0
 user-exec.c => accel/tcg/user-exec.c               | 18 +++++++++---------
 MAINTAINERS                                        |  4 +---
 accel/tcg/Makefile.objs                            |  4 ++++
 9 files changed, 17 insertions(+), 15 deletions(-)
 rename atomic_template.h => accel/tcg/atomic_template.h (100%)
 rename softmmu_template.h => accel/tcg/softmmu_template.h (100%)
 rename {tcg => accel/tcg}/tcg-runtime.h (100%)
 rename {tcg => accel/tcg}/tcg-runtime.c (100%)
 rename user-exec-stub.c => accel/tcg/user-exec-stub.c (100%)
 rename user-exec.c => accel/tcg/user-exec.c (100%)

Based-on: 20170911204936.5020-1-f4bug@amsat.org

-- 
2.14.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v2 1/5] tcg: Move softmmu_template.h to the accel/tcg/ folder
  2017-09-11 21:33 [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Philippe Mathieu-Daudé
@ 2017-09-11 21:33 ` Philippe Mathieu-Daudé
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 2/5] tcg: move user-exec to accel/tcg/ Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-11 21:33 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Peter Crosthwaite, Thomas Huth
  Cc: qemu-devel, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

The header is only used by accel/tcg/cputlb.c so we can
move it to the accel/tcg/ folder, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
[PMD: reword commit title to match series]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 softmmu_template.h => accel/tcg/softmmu_template.h | 0
 MAINTAINERS                                        | 1 -
 2 files changed, 1 deletion(-)
 rename softmmu_template.h => accel/tcg/softmmu_template.h (100%)

diff --git a/softmmu_template.h b/accel/tcg/softmmu_template.h
similarity index 100%
rename from softmmu_template.h
rename to accel/tcg/softmmu_template.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 36eeb42d19..a6b7e1c19f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -86,7 +86,6 @@ M: Richard Henderson <rth@twiddle.net>
 S: Maintained
 F: cpus.c
 F: exec.c
-F: softmmu_template.h
 F: accel/tcg/
 F: include/exec/cpu*.h
 F: include/exec/exec-all.h
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v2 2/5] tcg: move user-exec to accel/tcg/
  2017-09-11 21:33 [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Philippe Mathieu-Daudé
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 1/5] tcg: Move softmmu_template.h to the accel/tcg/ folder Philippe Mathieu-Daudé
@ 2017-09-11 21:33 ` Philippe Mathieu-Daudé
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 3/5] tcg: move tcg-runtime " Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-11 21:33 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Peter Crosthwaite, Thomas Huth
  Cc: Philippe Mathieu-Daudé, qemu-devel

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 Makefile.target                                | 4 ++--
 user-exec-stub.c => accel/tcg/user-exec-stub.c | 0
 user-exec.c => accel/tcg/user-exec.c           | 0
 MAINTAINERS                                    | 3 +--
 accel/tcg/Makefile.objs                        | 3 +++
 5 files changed, 6 insertions(+), 4 deletions(-)
 rename user-exec-stub.c => accel/tcg/user-exec-stub.c (100%)
 rename user-exec.c => accel/tcg/user-exec.c (100%)

diff --git a/Makefile.target b/Makefile.target
index 7f42c45db8..520305b025 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -119,7 +119,7 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \
              -I$(SRC_PATH)/linux-user
 
 obj-y += linux-user/
-obj-y += gdbstub.o thunk.o user-exec.o user-exec-stub.o
+obj-y += gdbstub.o thunk.o
 
 endif #CONFIG_LINUX_USER
 
@@ -132,7 +132,7 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR) \
 			 -I$(SRC_PATH)/bsd-user/$(HOST_VARIANT_DIR)
 
 obj-y += bsd-user/
-obj-y += gdbstub.o user-exec.o user-exec-stub.o
+obj-y += gdbstub.o
 
 endif #CONFIG_BSD_USER
 
diff --git a/user-exec-stub.c b/accel/tcg/user-exec-stub.c
similarity index 100%
rename from user-exec-stub.c
rename to accel/tcg/user-exec-stub.c
diff --git a/user-exec.c b/accel/tcg/user-exec.c
similarity index 100%
rename from user-exec.c
rename to accel/tcg/user-exec.c
diff --git a/MAINTAINERS b/MAINTAINERS
index a6b7e1c19f..b2d4a4711f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1602,8 +1602,7 @@ Overall
 M: Riku Voipio <riku.voipio@iki.fi>
 S: Maintained
 F: thunk.c
-F: user-exec.c
-F: user-exec-stub.c
+F: accel/tcg/user-exec*.c
 
 BSD user
 S: Orphan
diff --git a/accel/tcg/Makefile.objs b/accel/tcg/Makefile.objs
index 22642e6f75..f2422d0fb3 100644
--- a/accel/tcg/Makefile.objs
+++ b/accel/tcg/Makefile.objs
@@ -2,3 +2,6 @@ obj-$(CONFIG_SOFTMMU) += tcg-all.o
 obj-$(CONFIG_SOFTMMU) += cputlb.o
 obj-y += cpu-exec.o cpu-exec-common.o translate-all.o
 obj-y += translator.o
+
+obj-$(CONFIG_USER_ONLY) += user-exec.o
+obj-$(call lnot,$(CONFIG_SOFTMMU)) += user-exec-stub.o
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v2 3/5] tcg: move tcg-runtime to accel/tcg/
  2017-09-11 21:33 [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Philippe Mathieu-Daudé
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 1/5] tcg: Move softmmu_template.h to the accel/tcg/ folder Philippe Mathieu-Daudé
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 2/5] tcg: move user-exec to accel/tcg/ Philippe Mathieu-Daudé
@ 2017-09-11 21:33 ` Philippe Mathieu-Daudé
  2017-09-11 21:47   ` Paolo Bonzini
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 4/5] tcg: move atomic_template.h " Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-11 21:33 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Peter Crosthwaite, Thomas Huth
  Cc: Philippe Mathieu-Daudé, qemu-devel

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 Makefile.target                  | 2 +-
 {tcg => accel/tcg}/tcg-runtime.h | 0
 {tcg => accel/tcg}/tcg-runtime.c | 0
 accel/tcg/Makefile.objs          | 1 +
 4 files changed, 2 insertions(+), 1 deletion(-)
 rename {tcg => accel/tcg}/tcg-runtime.h (100%)
 rename {tcg => accel/tcg}/tcg-runtime.c (100%)

diff --git a/Makefile.target b/Makefile.target
index 520305b025..6361f957fb 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -94,7 +94,7 @@ all: $(PROGS) stap
 obj-y += exec.o
 obj-y += accel/
 obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
-obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/tcg-runtime.o
+obj-$(CONFIG_TCG) += tcg/tcg-common.o
 obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
 obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
 obj-y += fpu/softfloat.o
diff --git a/tcg/tcg-runtime.h b/accel/tcg/tcg-runtime.h
similarity index 100%
rename from tcg/tcg-runtime.h
rename to accel/tcg/tcg-runtime.h
diff --git a/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c
similarity index 100%
rename from tcg/tcg-runtime.c
rename to accel/tcg/tcg-runtime.c
diff --git a/accel/tcg/Makefile.objs b/accel/tcg/Makefile.objs
index f2422d0fb3..228cd84fa4 100644
--- a/accel/tcg/Makefile.objs
+++ b/accel/tcg/Makefile.objs
@@ -1,5 +1,6 @@
 obj-$(CONFIG_SOFTMMU) += tcg-all.o
 obj-$(CONFIG_SOFTMMU) += cputlb.o
+obj-y += tcg-runtime.o
 obj-y += cpu-exec.o cpu-exec-common.o translate-all.o
 obj-y += translator.o
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v2 4/5] tcg: move atomic_template.h to accel/tcg/
  2017-09-11 21:33 [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 3/5] tcg: move tcg-runtime " Philippe Mathieu-Daudé
@ 2017-09-11 21:33 ` Philippe Mathieu-Daudé
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions Philippe Mathieu-Daudé
  2017-09-12 18:22 ` [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Richard Henderson
  5 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-11 21:33 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Peter Crosthwaite, Thomas Huth
  Cc: Philippe Mathieu-Daudé, qemu-devel

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Thomas Huth <thuth@redhat.com>
---
 atomic_template.h => accel/tcg/atomic_template.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename atomic_template.h => accel/tcg/atomic_template.h (100%)

diff --git a/atomic_template.h b/accel/tcg/atomic_template.h
similarity index 100%
rename from atomic_template.h
rename to accel/tcg/atomic_template.h
-- 
2.14.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions
  2017-09-11 21:33 [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 4/5] tcg: move atomic_template.h " Philippe Mathieu-Daudé
@ 2017-09-11 21:33 ` Philippe Mathieu-Daudé
  2017-09-11 21:44   ` Kamil Rytarowski
  2017-09-12 18:22 ` [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Richard Henderson
  5 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-11 21:33 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Peter Crosthwaite, Thomas Huth
  Cc: Philippe Mathieu-Daudé, qemu-devel

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
cleaning while here :)

 accel/tcg/user-exec.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 2a975eaf69..484a3f5f8f 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -25,15 +25,6 @@
 #include "exec/cpu_ldst.h"
 #include "translate-all.h"
 
-#undef EAX
-#undef ECX
-#undef EDX
-#undef EBX
-#undef ESP
-#undef EBP
-#undef ESI
-#undef EDI
-#undef EIP
 #ifdef __linux__
 #include <sys/ucontext.h>
 #endif
@@ -131,6 +122,15 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
 }
 
 #if defined(__i386__)
+#undef EAX
+#undef ECX
+#undef EDX
+#undef EBX
+#undef ESP
+#undef EBP
+#undef ESI
+#undef EDI
+#undef EIP
 
 #if defined(__NetBSD__)
 #include <ucontext.h>
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions Philippe Mathieu-Daudé
@ 2017-09-11 21:44   ` Kamil Rytarowski
  2017-09-11 22:13     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 11+ messages in thread
From: Kamil Rytarowski @ 2017-09-11 21:44 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	Paolo Bonzini, Richard Henderson, Peter Crosthwaite, Thomas Huth
  Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

On 11.09.2017 23:33, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> cleaning while here :)
> 
>  accel/tcg/user-exec.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
> index 2a975eaf69..484a3f5f8f 100644
> --- a/accel/tcg/user-exec.c
> +++ b/accel/tcg/user-exec.c
> @@ -25,15 +25,6 @@
>  #include "exec/cpu_ldst.h"
>  #include "translate-all.h"
>  
> -#undef EAX
> -#undef ECX
> -#undef EDX
> -#undef EBX
> -#undef ESP
> -#undef EBP
> -#undef ESI
> -#undef EDI
> -#undef EIP
>  #ifdef __linux__
>  #include <sys/ucontext.h>
>  #endif
> @@ -131,6 +122,15 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
>  }
>  
>  #if defined(__i386__)
> +#undef EAX
> +#undef ECX
> +#undef EDX
> +#undef EBX
> +#undef ESP
> +#undef EBP
> +#undef ESI
> +#undef EDI
> +#undef EIP
>  
>  #if defined(__NetBSD__)
>  #include <ucontext.h>
> 

Why to move under i386?

SmartOS pollutes namespace with these symbols on x86_64.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v2 3/5] tcg: move tcg-runtime to accel/tcg/
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 3/5] tcg: move tcg-runtime " Philippe Mathieu-Daudé
@ 2017-09-11 21:47   ` Paolo Bonzini
  0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2017-09-11 21:47 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Richard Henderson, Peter Crosthwaite, Thomas Huth, qemu-devel



----- Original Message -----
> From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
> To: "Paolo Bonzini" <pbonzini@redhat.com>, "Richard Henderson" <rth@twiddle.net>, "Peter Crosthwaite"
> <crosthwaite.peter@gmail.com>, "Thomas Huth" <thuth@redhat.com>
> Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
> Sent: Monday, September 11, 2017 11:33:26 PM
> Subject: [PATCH v2 3/5] tcg: move tcg-runtime to accel/tcg/
> 
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

To make this better, the "#ifndef CONFIG_SOFTMMU" part at the
end of this should be moved to user-exec.c.  Feel free to just
post a sixth patch for it.

Paolo

> ---
>  Makefile.target                  | 2 +-
>  {tcg => accel/tcg}/tcg-runtime.h | 0
>  {tcg => accel/tcg}/tcg-runtime.c | 0
>  accel/tcg/Makefile.objs          | 1 +
>  4 files changed, 2 insertions(+), 1 deletion(-)
>  rename {tcg => accel/tcg}/tcg-runtime.h (100%)
>  rename {tcg => accel/tcg}/tcg-runtime.c (100%)
> 
> diff --git a/Makefile.target b/Makefile.target
> index 520305b025..6361f957fb 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -94,7 +94,7 @@ all: $(PROGS) stap
>  obj-y += exec.o
>  obj-y += accel/
>  obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
> -obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/tcg-runtime.o
> +obj-$(CONFIG_TCG) += tcg/tcg-common.o
>  obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
>  obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
>  obj-y += fpu/softfloat.o
> diff --git a/tcg/tcg-runtime.h b/accel/tcg/tcg-runtime.h
> similarity index 100%
> rename from tcg/tcg-runtime.h
> rename to accel/tcg/tcg-runtime.h
> diff --git a/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c
> similarity index 100%
> rename from tcg/tcg-runtime.c
> rename to accel/tcg/tcg-runtime.c
> diff --git a/accel/tcg/Makefile.objs b/accel/tcg/Makefile.objs
> index f2422d0fb3..228cd84fa4 100644
> --- a/accel/tcg/Makefile.objs
> +++ b/accel/tcg/Makefile.objs
> @@ -1,5 +1,6 @@
>  obj-$(CONFIG_SOFTMMU) += tcg-all.o
>  obj-$(CONFIG_SOFTMMU) += cputlb.o
> +obj-y += tcg-runtime.o
>  obj-y += cpu-exec.o cpu-exec-common.o translate-all.o
>  obj-y += translator.o
>  
> --
> 2.14.1
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions
  2017-09-11 21:44   ` Kamil Rytarowski
@ 2017-09-11 22:13     ` Philippe Mathieu-Daudé
  2017-09-11 22:37       ` Kamil Rytarowski
  0 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-11 22:13 UTC (permalink / raw)
  To: Kamil Rytarowski, Paolo Bonzini
  Cc: Richard Henderson, Peter Crosthwaite, Thomas Huth, qemu-devel

On 09/11/2017 06:44 PM, Kamil Rytarowski wrote:
> On 11.09.2017 23:33, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> cleaning while here :)
>>
>>   accel/tcg/user-exec.c | 18 +++++++++---------
>>   1 file changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
>> index 2a975eaf69..484a3f5f8f 100644
>> --- a/accel/tcg/user-exec.c
>> +++ b/accel/tcg/user-exec.c
>> @@ -25,15 +25,6 @@
>>   #include "exec/cpu_ldst.h"
>>   #include "translate-all.h"
>>   
>> -#undef EAX
>> -#undef ECX
>> -#undef EDX
>> -#undef EBX
>> -#undef ESP
>> -#undef EBP
>> -#undef ESI
>> -#undef EDI
>> -#undef EIP
>>   #ifdef __linux__
>>   #include <sys/ucontext.h>
>>   #endif
>> @@ -131,6 +122,15 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
>>   }
>>   
>>   #if defined(__i386__)
>> +#undef EAX
>> +#undef ECX
>> +#undef EDX
>> +#undef EBX
>> +#undef ESP
>> +#undef EBP
>> +#undef ESI
>> +#undef EDI
>> +#undef EIP
>>   
>>   #if defined(__NetBSD__)
>>   #include <ucontext.h>
>>
> 
> Why to move under i386?

I tracked the origin of these #defines in op-i386.c (7bfdb6d18c7b) and 
thought the Exx naming was for i386 while the x86_64 uses the Rxx naming 
(RAX .. RIP) so you'd only have them on i386 arch.
However it seems I didn't realize you can access x86_64 registers in 
32-bit mode via the EAX .. EIP naming, as you see I'm not confident with 
this CISC arch :S

So I guess it's best to ignore this patch?

> 
> SmartOS pollutes namespace with these symbols on x86_64.
> 

you should provide some VM :P

I plan to test this project soon:
https://www.packer.io/docs/builders/qemu.html

Regards,

Phil.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions
  2017-09-11 22:13     ` Philippe Mathieu-Daudé
@ 2017-09-11 22:37       ` Kamil Rytarowski
  0 siblings, 0 replies; 11+ messages in thread
From: Kamil Rytarowski @ 2017-09-11 22:37 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Paolo Bonzini
  Cc: Richard Henderson, Peter Crosthwaite, Thomas Huth, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

On 12.09.2017 00:13, Philippe Mathieu-Daudé wrote:
> On 09/11/2017 06:44 PM, Kamil Rytarowski wrote:
>> On 11.09.2017 23:33, Philippe Mathieu-Daudé wrote:
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>> cleaning while here :)
>>>
>>>   accel/tcg/user-exec.c | 18 +++++++++---------
>>>   1 file changed, 9 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
>>> index 2a975eaf69..484a3f5f8f 100644
>>> --- a/accel/tcg/user-exec.c
>>> +++ b/accel/tcg/user-exec.c
>>> @@ -25,15 +25,6 @@
>>>   #include "exec/cpu_ldst.h"
>>>   #include "translate-all.h"
>>>   -#undef EAX
>>> -#undef ECX
>>> -#undef EDX
>>> -#undef EBX
>>> -#undef ESP
>>> -#undef EBP
>>> -#undef ESI
>>> -#undef EDI
>>> -#undef EIP
>>>   #ifdef __linux__
>>>   #include <sys/ucontext.h>
>>>   #endif
>>> @@ -131,6 +122,15 @@ static inline int handle_cpu_signal(uintptr_t
>>> pc, unsigned long address,
>>>   }
>>>     #if defined(__i386__)
>>> +#undef EAX
>>> +#undef ECX
>>> +#undef EDX
>>> +#undef EBX
>>> +#undef ESP
>>> +#undef EBP
>>> +#undef ESI
>>> +#undef EDI
>>> +#undef EIP
>>>     #if defined(__NetBSD__)
>>>   #include <ucontext.h>
>>>
>>
>> Why to move under i386?
> 
> I tracked the origin of these #defines in op-i386.c (7bfdb6d18c7b) and
> thought the Exx naming was for i386 while the x86_64 uses the Rxx naming
> (RAX .. RIP) so you'd only have them on i386 arch.
> However it seems I didn't realize you can access x86_64 registers in
> 32-bit mode via the EAX .. EIP naming, as you see I'm not confident with
> this CISC arch :S
> 
> So I guess it's best to ignore this patch?
> 

A typical 64-bit x86_64 OS can run 32-bit programs and reuse x86 32-bit
headers.

>>
>> SmartOS pollutes namespace with these symbols on x86_64.
>>
> 
> you should provide some VM :P
> 

Hope to see it too.

> I plan to test this project soon:
> https://www.packer.io/docs/builders/qemu.html
> 
> Regards,
> 
> Phil.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 850 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/
  2017-09-11 21:33 [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions Philippe Mathieu-Daudé
@ 2017-09-12 18:22 ` Richard Henderson
  5 siblings, 0 replies; 11+ messages in thread
From: Richard Henderson @ 2017-09-12 18:22 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	Paolo Bonzini, Peter Crosthwaite, Thomas Huth
  Cc: qemu-devel

On 09/11/2017 02:33 PM, Philippe Mathieu-Daudé wrote:
> 
> Philippe Mathieu-Daudé (4):
>   tcg: move user-exec
>   tcg: move tcg-runtime to accel/tcg/
>   tcg: move atomic_template.h to accel/tcg/
>   tcg: restrict i386 regs definitions
> 
> Thomas Huth (1):
>   tcg: Move softmmu_template.h to the accel/tcg/ folder

Queued 1-4.


r~

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-09-12 18:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11 21:33 [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Philippe Mathieu-Daudé
2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 1/5] tcg: Move softmmu_template.h to the accel/tcg/ folder Philippe Mathieu-Daudé
2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 2/5] tcg: move user-exec to accel/tcg/ Philippe Mathieu-Daudé
2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 3/5] tcg: move tcg-runtime " Philippe Mathieu-Daudé
2017-09-11 21:47   ` Paolo Bonzini
2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 4/5] tcg: move atomic_template.h " Philippe Mathieu-Daudé
2017-09-11 21:33 ` [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions Philippe Mathieu-Daudé
2017-09-11 21:44   ` Kamil Rytarowski
2017-09-11 22:13     ` Philippe Mathieu-Daudé
2017-09-11 22:37       ` Kamil Rytarowski
2017-09-12 18:22 ` [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/ Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.