diff mbox series

[01/11] Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>

Message ID 20230421052255.5603-2-krm.taha@outlook.com
State New
Headers show
Series Contribution task implementations, for the 'FreeBSD user emulation improvements' project. | expand

Commit Message

Karim Taha April 21, 2023, 5:22 a.m. UTC
From: Warner Losh <imp@bsdimp.com>

Allow guest_base to be initialized on 64-bit hosts, the initial value is used by g2h_untagged function defined in include/exec/cpu_ldst.h
---
 bsd-user/main.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

Comments

Daniel P. Berrangé April 21, 2023, 7:17 a.m. UTC | #1
On Fri, Apr 21, 2023 at 07:22:45AM +0200, Karim Taha wrote:
> From: Warner Losh <imp@bsdimp.com>
> 
> Allow guest_base to be initialized on 64-bit hosts, the initial value is used by g2h_untagged function defined in include/exec/cpu_ldst.h

This commit message is all incorrectly structured I'm afraid.

There needs to a short 1 line summary, then a blank line,
then the full commit description text, then a blank line,
then the Signed-off-by tag(s).

Also if you're sending work done by Warner (as the From
tag suggests), then we would expect to see Warner's own
Signed-off-by tag, in addition to your own Signed-off-by.

> ---
>  bsd-user/main.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/bsd-user/main.c b/bsd-user/main.c
> index babc3b009b..afdc1b5f3c 100644
> --- a/bsd-user/main.c
> +++ b/bsd-user/main.c
> @@ -50,8 +50,22 @@
>  #include "target_arch_cpu.h"
>  
>  int singlestep;
> -uintptr_t guest_base;
> +
> +/*
> + * Going hand in hand with the va space needed (see below), we need
> + * to find a host address to map the guest to. Assume that qemu
> + * itself doesn't need memory above 32GB (or that we don't collide
> + * with anything interesting). This is selected rather arbitrarily,
> + * but seems to produce good results in tests to date.
> + */
> +# if HOST_LONG_BITS >= 64
> +uintptr_t guest_base = 0x800000000ul;    /* at 32GB */
> +bool have_guest_base = true;
> +#else
> +uintptr_t guest_base;    /* TODO: use sysctl to find big enough hole */
>  bool have_guest_base;
> +#endif
> +
>  /*
>   * When running 32-on-64 we should make sure we can fit all of the possible
>   * guest address space into a contiguous chunk of virtual host memory.
> -- 
> 2.40.0
> 
> 

With regards,
Daniel
Karim Taha April 21, 2023, 4:56 p.m. UTC | #2
On Fri, Apr 21, 2023 at 9:17 AM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Fri, Apr 21, 2023 at 07:22:45AM +0200, Karim Taha wrote:
> > From: Warner Losh <imp@bsdimp.com>
> >
> > Allow guest_base to be initialized on 64-bit hosts, the initial value is
> used by g2h_untagged function defined in include/exec/cpu_ldst.h
>
> This commit message is all incorrectly structured I'm afraid.
>
> There needs to a short 1 line summary, then a blank line,
> then the full commit description text, then a blank line,
> then the Signed-off-by tag(s).
>
> Also if you're sending work done by Warner (as the From
> tag suggests), then we would expect to see Warner's own
> Signed-off-by tag, in addition to your own Signed-off-by.
>
> > ---
> >  bsd-user/main.c | 16 +++++++++++++++-
> >  1 file changed, 15 insertions(+), 1 deletion(-)
> >
> > diff --git a/bsd-user/main.c b/bsd-user/main.c
> > index babc3b009b..afdc1b5f3c 100644
> > --- a/bsd-user/main.c
> > +++ b/bsd-user/main.c
> > @@ -50,8 +50,22 @@
> >  #include "target_arch_cpu.h"
> >
> >  int singlestep;
> > -uintptr_t guest_base;
> > +
> > +/*
> > + * Going hand in hand with the va space needed (see below), we need
> > + * to find a host address to map the guest to. Assume that qemu
> > + * itself doesn't need memory above 32GB (or that we don't collide
> > + * with anything interesting). This is selected rather arbitrarily,
> > + * but seems to produce good results in tests to date.
> > + */
> > +# if HOST_LONG_BITS >= 64
> > +uintptr_t guest_base = 0x800000000ul;    /* at 32GB */
> > +bool have_guest_base = true;
> > +#else
> > +uintptr_t guest_base;    /* TODO: use sysctl to find big enough hole */
> >  bool have_guest_base;
> > +#endif
> > +
> >  /*
> >   * When running 32-on-64 we should make sure we can fit all of the
> possible
> >   * guest address space into a contiguous chunk of virtual host memory.
> > --
> > 2.40.0
> >
> >
>
> With regards,
> Daniel
> --
> |: https://berrange.com      -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
> https://www.instagram.com/dberrange :|
>
>
Alright, thanks for the commit formatting tips, I resent the patch series,
with my signed off by tag and the author signed off by tags as well.

Best regards,
Karim
Alex Bennée April 21, 2023, 5:21 p.m. UTC | #3
Karim Taha <kariem.taha2.7@gmail.com> writes:

> On Fri, Apr 21, 2023 at 9:17 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
>  On Fri, Apr 21, 2023 at 07:22:45AM +0200, Karim Taha wrote:
>  > From: Warner Losh <imp@bsdimp.com>
>  > 
>  > Allow guest_base to be initialized on 64-bit hosts, the initial value is used by g2h_untagged function
>  defined in include/exec/cpu_ldst.h
>
>  This commit message is all incorrectly structured I'm afraid.
>
>  There needs to a short 1 line summary, then a blank line,
>  then the full commit description text, then a blank line,
>  then the Signed-off-by tag(s).
>
>  Also if you're sending work done by Warner (as the From
>  tag suggests), then we would expect to see Warner's own
>  Signed-off-by tag, in addition to your own Signed-off-by.
<snip>
>
> Alright, thanks for the commit formatting tips, I resent the patch series, with my signed off by tag and the
> author signed off by tags as well.

Hmm something has gone wrong. Was this sent with a plain git-send-email
or using a tool like git-publish?

Can you point to a branch?

>
> Best regards,
> Karim
Karim Taha April 21, 2023, 10:40 p.m. UTC | #4
It was sent with git-publish, what do you mean by pointing to a branch?

On Fri, Apr 21, 2023 at 7:22 PM Alex Bennée <alex.bennee@linaro.org> wrote:

>
> Karim Taha <kariem.taha2.7@gmail.com> writes:
>
> > On Fri, Apr 21, 2023 at 9:17 AM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
> >
> >  On Fri, Apr 21, 2023 at 07:22:45AM +0200, Karim Taha wrote:
> >  > From: Warner Losh <imp@bsdimp.com>
> >  >
> >  > Allow guest_base to be initialized on 64-bit hosts, the initial value
> is used by g2h_untagged function
> >  defined in include/exec/cpu_ldst.h
> >
> >  This commit message is all incorrectly structured I'm afraid.
> >
> >  There needs to a short 1 line summary, then a blank line,
> >  then the full commit description text, then a blank line,
> >  then the Signed-off-by tag(s).
> >
> >  Also if you're sending work done by Warner (as the From
> >  tag suggests), then we would expect to see Warner's own
> >  Signed-off-by tag, in addition to your own Signed-off-by.
> <snip>
> >
> > Alright, thanks for the commit formatting tips, I resent the patch
> series, with my signed off by tag and the
> > author signed off by tags as well.
>
> Hmm something has gone wrong. Was this sent with a plain git-send-email
> or using a tool like git-publish?
>
> Can you point to a branch?
>
> >
> > Best regards,
> > Karim
>
>
> --
> Alex Bennée
> Virtualisation Tech Lead @ Linaro
>
Karim Taha April 22, 2023, 7:23 p.m. UTC | #5
I made a fork on gitlab and pushed a branch at
https://gitlab.com/Kariiem/qemu/-/tree/gsoc23-task3/ .

On Sat, Apr 22, 2023 at 1:18 AM Warner Losh <imp@bsdimp.com> wrote:

> Usually this means pushing a branch off of mastar to a service like github
> or gitlab, and then
> posting a URL with where to get it.
>
> Warner
>
> On Fri, Apr 21, 2023 at 4:40 PM Karim Taha <kariem.taha2.7@gmail.com>
> wrote:
>
>> It was sent with git-publish, what do you mean by pointing to a branch?
>>
>> On Fri, Apr 21, 2023 at 7:22 PM Alex Bennée <alex.bennee@linaro.org>
>> wrote:
>>
>>>
>>> Karim Taha <kariem.taha2.7@gmail.com> writes:
>>>
>>> > On Fri, Apr 21, 2023 at 9:17 AM Daniel P. Berrangé <
>>> berrange@redhat.com> wrote:
>>> >
>>> >  On Fri, Apr 21, 2023 at 07:22:45AM +0200, Karim Taha wrote:
>>> >  > From: Warner Losh <imp@bsdimp.com>
>>> >  >
>>> >  > Allow guest_base to be initialized on 64-bit hosts, the initial
>>> value is used by g2h_untagged function
>>> >  defined in include/exec/cpu_ldst.h
>>> >
>>> >  This commit message is all incorrectly structured I'm afraid.
>>> >
>>> >  There needs to a short 1 line summary, then a blank line,
>>> >  then the full commit description text, then a blank line,
>>> >  then the Signed-off-by tag(s).
>>> >
>>> >  Also if you're sending work done by Warner (as the From
>>> >  tag suggests), then we would expect to see Warner's own
>>> >  Signed-off-by tag, in addition to your own Signed-off-by.
>>> <snip>
>>> >
>>> > Alright, thanks for the commit formatting tips, I resent the patch
>>> series, with my signed off by tag and the
>>> > author signed off by tags as well.
>>>
>>> Hmm something has gone wrong. Was this sent with a plain git-send-email
>>> or using a tool like git-publish?
>>>
>>> Can you point to a branch?
>>>
>>> >
>>> > Best regards,
>>> > Karim
>>>
>>>
>>> --
>>> Alex Bennée
>>> Virtualisation Tech Lead @ Linaro
>>>
>>
Alex Bennée April 24, 2023, 9:14 a.m. UTC | #6
Karim Taha <kariem.taha2.7@gmail.com> writes:

> I made a fork on gitlab and pushed a branch at
> https://gitlab.com/Kariiem/qemu/-/tree/gsoc23-task3/ .

OK so I can see the original commits are not following the correct form
so this wasn't introduced by the tool send the emails. As Daniel
mentioned previously the format of the commit message is:

  [subsystem ref]: short description of commit

  A few more lines of explanation about the commit that explain
  why it does what it does.

  Optional bug reference
  DCO tags (Signed-off-by, Reviewed-by, Acked-by etc)


>
> On Sat, Apr 22, 2023 at 1:18 AM Warner Losh <imp@bsdimp.com> wrote:
>
>  Usually this means pushing a branch off of mastar to a service like github or gitlab, and then
>  posting a URL with where to get it.
>
>  Warner
>
>  On Fri, Apr 21, 2023 at 4:40 PM Karim Taha <kariem.taha2.7@gmail.com> wrote:
>
>  It was sent with git-publish, what do you mean by pointing to a branch?
>
>  On Fri, Apr 21, 2023 at 7:22 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
>  Karim Taha <kariem.taha2.7@gmail.com> writes:
>
>  > On Fri, Apr 21, 2023 at 9:17 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>  >
>  >  On Fri, Apr 21, 2023 at 07:22:45AM +0200, Karim Taha wrote:
>  >  > From: Warner Losh <imp@bsdimp.com>
>  >  > 
>  >  > Allow guest_base to be initialized on 64-bit hosts, the initial value is used by g2h_untagged
>  function
>  >  defined in include/exec/cpu_ldst.h
>  >
>  >  This commit message is all incorrectly structured I'm afraid.
>  >
>  >  There needs to a short 1 line summary, then a blank line,
>  >  then the full commit description text, then a blank line,
>  >  then the Signed-off-by tag(s).
>  >
>  >  Also if you're sending work done by Warner (as the From
>  >  tag suggests), then we would expect to see Warner's own
>  >  Signed-off-by tag, in addition to your own Signed-off-by.
>  <snip>
>  >
>  > Alright, thanks for the commit formatting tips, I resent the patch series, with my signed off by
>  tag and the
>  > author signed off by tags as well.
>
>  Hmm something has gone wrong. Was this sent with a plain git-send-email
>  or using a tool like git-publish?
>
>  Can you point to a branch?
>
>  >
>  > Best regards,
>  > Karim
>
>  -- 
>  Alex Bennée
>  Virtualisation Tech Lead @ Linaro
diff mbox series

Patch

diff --git a/bsd-user/main.c b/bsd-user/main.c
index babc3b009b..afdc1b5f3c 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -50,8 +50,22 @@ 
 #include "target_arch_cpu.h"
 
 int singlestep;
-uintptr_t guest_base;
+
+/*
+ * Going hand in hand with the va space needed (see below), we need
+ * to find a host address to map the guest to. Assume that qemu
+ * itself doesn't need memory above 32GB (or that we don't collide
+ * with anything interesting). This is selected rather arbitrarily,
+ * but seems to produce good results in tests to date.
+ */
+# if HOST_LONG_BITS >= 64
+uintptr_t guest_base = 0x800000000ul;    /* at 32GB */
+bool have_guest_base = true;
+#else
+uintptr_t guest_base;    /* TODO: use sysctl to find big enough hole */
 bool have_guest_base;
+#endif
+
 /*
  * When running 32-on-64 we should make sure we can fit all of the possible
  * guest address space into a contiguous chunk of virtual host memory.