qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] util: Delete checks for old host definitions
@ 2023-08-10 22:59 Akihiko Odaki
  2023-09-03  5:53 ` Akihiko Odaki
  2023-09-09 21:42 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: Akihiko Odaki @ 2023-08-10 22:59 UTC (permalink / raw)
  Cc: Alex Bennée, pbonzini, laurent, qemu-devel,
	Richard Henderson, Warner Losh, Kyle Evans, Helge Deller,
	Philippe Mathieu-Daudé, John Paul Adrian Glaubitz,
	Peter Maydell, Akihiko Odaki

IA-64 and PA-RISC host support is already removed with commit
b1cef6d02f("Drop remaining bits of ia64 host support").

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 util/async-teardown.c |  3 ---
 util/oslib-posix.c    | 14 ++------------
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/util/async-teardown.c b/util/async-teardown.c
index 62cdeb0f20..396963c091 100644
--- a/util/async-teardown.c
+++ b/util/async-teardown.c
@@ -121,10 +121,7 @@ static void *new_stack_for_clone(void)
 
     /* Allocate a new stack and get a pointer to its top. */
     stack_ptr = qemu_alloc_stack(&stack_size);
-#if !defined(HOST_HPPA)
-    /* The top is at the end of the area, except on HPPA. */
     stack_ptr += stack_size;
-#endif
 
     return stack_ptr;
 }
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 760390b31e..6da3cc5014 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -585,7 +585,7 @@ char *qemu_get_pid_name(pid_t pid)
 
 void *qemu_alloc_stack(size_t *sz)
 {
-    void *ptr, *guardpage;
+    void *ptr;
     int flags;
 #ifdef CONFIG_DEBUG_STACK_USAGE
     void *ptr2;
@@ -618,17 +618,7 @@ void *qemu_alloc_stack(size_t *sz)
         abort();
     }
 
-#if defined(HOST_IA64)
-    /* separate register stack */
-    guardpage = ptr + (((*sz - pagesz) / 2) & ~pagesz);
-#elif defined(HOST_HPPA)
-    /* stack grows up */
-    guardpage = ptr + *sz - pagesz;
-#else
-    /* stack grows down */
-    guardpage = ptr;
-#endif
-    if (mprotect(guardpage, pagesz, PROT_NONE) != 0) {
+    if (mprotect(ptr, pagesz, PROT_NONE) != 0) {
         perror("failed to set up stack guard page");
         abort();
     }
-- 
2.41.0



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

* Re: [PATCH v2] util: Delete checks for old host definitions
  2023-08-10 22:59 [PATCH v2] util: Delete checks for old host definitions Akihiko Odaki
@ 2023-09-03  5:53 ` Akihiko Odaki
  2023-09-09 21:45   ` Richard Henderson
  2023-09-09 21:42 ` Richard Henderson
  1 sibling, 1 reply; 4+ messages in thread
From: Akihiko Odaki @ 2023-09-03  5:53 UTC (permalink / raw)
  Cc: Alex Bennée, pbonzini, laurent, qemu-devel,
	Richard Henderson, Warner Losh, Kyle Evans, Helge Deller,
	Philippe Mathieu-Daudé, John Paul Adrian Glaubitz,
	Peter Maydell

Hi,

Can anyone have look at this?

I also have another patch similar but for thunk. It was reviewed but no 
one has made a pull request yet:
https://patchew.org/QEMU/20230808152314.102036-1-akihiko.odaki@daynix.com/

Regards,
Akihiko Odaki

On 2023/08/11 7:59, Akihiko Odaki wrote:
> IA-64 and PA-RISC host support is already removed with commit
> b1cef6d02f("Drop remaining bits of ia64 host support").
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
>   util/async-teardown.c |  3 ---
>   util/oslib-posix.c    | 14 ++------------
>   2 files changed, 2 insertions(+), 15 deletions(-)
> 
> diff --git a/util/async-teardown.c b/util/async-teardown.c
> index 62cdeb0f20..396963c091 100644
> --- a/util/async-teardown.c
> +++ b/util/async-teardown.c
> @@ -121,10 +121,7 @@ static void *new_stack_for_clone(void)
>   
>       /* Allocate a new stack and get a pointer to its top. */
>       stack_ptr = qemu_alloc_stack(&stack_size);
> -#if !defined(HOST_HPPA)
> -    /* The top is at the end of the area, except on HPPA. */
>       stack_ptr += stack_size;
> -#endif
>   
>       return stack_ptr;
>   }
> diff --git a/util/oslib-posix.c b/util/oslib-posix.c
> index 760390b31e..6da3cc5014 100644
> --- a/util/oslib-posix.c
> +++ b/util/oslib-posix.c
> @@ -585,7 +585,7 @@ char *qemu_get_pid_name(pid_t pid)
>   
>   void *qemu_alloc_stack(size_t *sz)
>   {
> -    void *ptr, *guardpage;
> +    void *ptr;
>       int flags;
>   #ifdef CONFIG_DEBUG_STACK_USAGE
>       void *ptr2;
> @@ -618,17 +618,7 @@ void *qemu_alloc_stack(size_t *sz)
>           abort();
>       }
>   
> -#if defined(HOST_IA64)
> -    /* separate register stack */
> -    guardpage = ptr + (((*sz - pagesz) / 2) & ~pagesz);
> -#elif defined(HOST_HPPA)
> -    /* stack grows up */
> -    guardpage = ptr + *sz - pagesz;
> -#else
> -    /* stack grows down */
> -    guardpage = ptr;
> -#endif
> -    if (mprotect(guardpage, pagesz, PROT_NONE) != 0) {
> +    if (mprotect(ptr, pagesz, PROT_NONE) != 0) {
>           perror("failed to set up stack guard page");
>           abort();
>       }


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

* Re: [PATCH v2] util: Delete checks for old host definitions
  2023-08-10 22:59 [PATCH v2] util: Delete checks for old host definitions Akihiko Odaki
  2023-09-03  5:53 ` Akihiko Odaki
@ 2023-09-09 21:42 ` Richard Henderson
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-09-09 21:42 UTC (permalink / raw)
  To: Akihiko Odaki
  Cc: Alex Bennée, pbonzini, laurent, qemu-devel, Warner Losh,
	Kyle Evans, Helge Deller, Philippe Mathieu-Daudé,
	John Paul Adrian Glaubitz, Peter Maydell

On 8/10/23 15:59, Akihiko Odaki wrote:
> IA-64 and PA-RISC host support is already removed with commit
> b1cef6d02f("Drop remaining bits of ia64 host support").
> 
> Signed-off-by: Akihiko Odaki<akihiko.odaki@daynix.com>
> ---
>   util/async-teardown.c |  3 ---
>   util/oslib-posix.c    | 14 ++------------
>   2 files changed, 2 insertions(+), 15 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

async-teardown.c has since been moved to softmmu/, but I've split
and adjusted the patch to compensate.

Queued to tcg-next.


r~


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

* Re: [PATCH v2] util: Delete checks for old host definitions
  2023-09-03  5:53 ` Akihiko Odaki
@ 2023-09-09 21:45   ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-09-09 21:45 UTC (permalink / raw)
  To: Akihiko Odaki
  Cc: Alex Bennée, pbonzini, laurent, qemu-devel, Warner Losh,
	Kyle Evans, Helge Deller, Philippe Mathieu-Daudé,
	John Paul Adrian Glaubitz, Peter Maydell

On 9/2/23 22:53, Akihiko Odaki wrote:
> Hi,
> 
> Can anyone have look at this?
> 
> I also have another patch similar but for thunk. It was reviewed but no one has made a 
> pull request yet:
> https://patchew.org/QEMU/20230808152314.102036-1-akihiko.odaki@daynix.com/

Queued this one to tcg-next also.


r~


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

end of thread, other threads:[~2023-09-09 21:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 22:59 [PATCH v2] util: Delete checks for old host definitions Akihiko Odaki
2023-09-03  5:53 ` Akihiko Odaki
2023-09-09 21:45   ` Richard Henderson
2023-09-09 21:42 ` Richard Henderson

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).