qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Kamil Rytarowski <n54@gmx.com>, qemu-devel@nongnu.org
Cc: cota@braap.org, alex.bennee@linaro.org
Subject: Re: [Qemu-devel] [PATCH for-4.0 5/5] tcg/i386: Add setup_guest_base_seg for FreeBSD
Date: Mon, 3 Dec 2018 12:35:35 -0600	[thread overview]
Message-ID: <ad5bd9c1-72fd-496c-0cb8-4c94cd27e919@linaro.org> (raw)
In-Reply-To: <58a36fe9-8a56-d949-a942-a5ca3cc243f5@gmx.com>

On 12/3/18 11:01 AM, Kamil Rytarowski wrote:
> On 03.12.2018 17:08, Richard Henderson wrote:
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>  tcg/i386/tcg-target.inc.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c
>> index b8d2dd5ba3..3a39b51685 100644
>> --- a/tcg/i386/tcg-target.inc.c
>> +++ b/tcg/i386/tcg-target.inc.c
>> @@ -1873,6 +1873,15 @@ static inline int setup_guest_base_seg(void)
>>      }
>>      return 0;
>>  }
>> +# elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
>> +#  include <machine/sysarch.h>
>> +static inline int setup_guest_base_seg(void)
>> +{
>> +    if (sysarch(AMD64_SET_GSBASE, &guest_base) == 0) {
>> +        return P_GS;
>> +    }
>> +    return 0;
>> +}
>>  # else
>>  static inline int setup_guest_base_seg(void)
>>  {
>>
> 
> There is also X86_SET_GSBASE in <include/sysarch.h> in NetBSD. Do we
> need to set it for this OS too?

You will want to do so, yes.  In the meantime NetBSD should not break; it is
only an optimization.


r~

  reply	other threads:[~2018-12-03 18:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 16:08 [Qemu-devel] [PATCH for-4.0 0/5] tcg/i386: Improve guest_base handling Richard Henderson
2018-12-03 16:08 ` [Qemu-devel] [PATCH for-4.0 1/5] tcg/i386: Propagate is64 to tcg_out_qemu_ld_direct Richard Henderson
2018-12-03 16:08 ` [Qemu-devel] [PATCH for-4.0 2/5] tcg/i386: Implement INDEX_op_extr{lh}_i64_i32 for 32-bit guests Richard Henderson
2018-12-03 16:08 ` [Qemu-devel] [PATCH for-4.0 3/5] tcg/i386: Assume 32-bit values are zero-extended Richard Henderson
2018-12-03 16:08 ` [Qemu-devel] [PATCH for-4.0 4/5] tcg/i386: Precompute all guest_base parameters Richard Henderson
2018-12-03 16:08 ` [Qemu-devel] [PATCH for-4.0 5/5] tcg/i386: Add setup_guest_base_seg for FreeBSD Richard Henderson
2018-12-03 17:01   ` Kamil Rytarowski
2018-12-03 18:35     ` Richard Henderson [this message]
2018-12-03 22:28 ` [Qemu-devel] [PATCH for-4.0 0/5] tcg/i386: Improve guest_base handling no-reply
2018-12-10 21:53 ` Emilio G. Cota

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad5bd9c1-72fd-496c-0cb8-4c94cd27e919@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=n54@gmx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).