diff mbox

[RFC,v6,06/14] configure: Use slow-path for atomic only when the softmmu is enabled

Message ID 1450082498-27109-7-git-send-email-a.rigo@virtualopensystems.com
State New
Headers show

Commit Message

Alvise Rigo Dec. 14, 2015, 8:41 a.m. UTC
Use the new slow path for atomic instruction translation when the
softmmu is enabled.

Suggested-by: Jani Kokkonen <jani.kokkonen@huawei.com>
Suggested-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Paolo Bonzini Dec. 14, 2015, 9:38 a.m. UTC | #1
On 14/12/2015 09:41, Alvise Rigo wrote:
> Use the new slow path for atomic instruction translation when the
> softmmu is enabled.
> 
> Suggested-by: Jani Kokkonen <jani.kokkonen@huawei.com>
> Suggested-by: Claudio Fontana <claudio.fontana@huawei.com>
> Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
> ---
>  configure | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/configure b/configure
> index b9552fd..cc3891a 100755
> --- a/configure
> +++ b/configure
> @@ -4794,6 +4794,7 @@ echo "Install blobs     $blobs"
>  echo "KVM support       $kvm"
>  echo "RDMA support      $rdma"
>  echo "TCG interpreter   $tcg_interpreter"
> +echo "use ld/st excl    $softmmu"
>  echo "fdt support       $fdt"
>  echo "preadv support    $preadv"
>  echo "fdatasync         $fdatasync"
> @@ -5186,6 +5187,9 @@ fi
>  if test "$tcg_interpreter" = "yes" ; then
>    echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
>  fi
> +if test "$softmmu" = "yes" ; then
> +  echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak
> +fi

Just use CONFIG_SOFTMMU in translate.c, no?

A target other than ARM might need ll/sc in user-mode emulation as well.

Paolo

>  if test "$fdatasync" = "yes" ; then
>    echo "CONFIG_FDATASYNC=y" >> $config_host_mak
>  fi
>
Paolo Bonzini Dec. 14, 2015, 9:39 a.m. UTC | #2
On 14/12/2015 10:38, Paolo Bonzini wrote:
>> > +if test "$softmmu" = "yes" ; then
>> > +  echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak
>> > +fi
> Just use CONFIG_SOFTMMU in translate.c, no?
> 
> A target other than ARM might need ll/sc in user-mode emulation as well.

Sorry, that makes no sense.  Couldn't hit cancel in time. :)

Paolo
Laurent Vivier Dec. 14, 2015, 10:14 a.m. UTC | #3
On 14/12/2015 09:41, Alvise Rigo wrote:
> Use the new slow path for atomic instruction translation when the
> softmmu is enabled.
> 
> Suggested-by: Jani Kokkonen <jani.kokkonen@huawei.com>
> Suggested-by: Claudio Fontana <claudio.fontana@huawei.com>
> Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
> ---
>  configure | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/configure b/configure
> index b9552fd..cc3891a 100755
> --- a/configure
> +++ b/configure
> @@ -4794,6 +4794,7 @@ echo "Install blobs     $blobs"
>  echo "KVM support       $kvm"
>  echo "RDMA support      $rdma"
>  echo "TCG interpreter   $tcg_interpreter"
> +echo "use ld/st excl    $softmmu"
>  echo "fdt support       $fdt"
>  echo "preadv support    $preadv"
>  echo "fdatasync         $fdatasync"
> @@ -5186,6 +5187,9 @@ fi
>  if test "$tcg_interpreter" = "yes" ; then
>    echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
>  fi
> +if test "$softmmu" = "yes" ; then
> +  echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak
> +fi

why is this "$softmmu" and not "$target_softmmu" ?

>  if test "$fdatasync" = "yes" ; then
>    echo "CONFIG_FDATASYNC=y" >> $config_host_mak
>  fi
>
Alvise Rigo Dec. 15, 2015, 2:23 p.m. UTC | #4
Hi,

On Mon, Dec 14, 2015 at 11:14 AM, Laurent Vivier <lvivier@redhat.com> wrote:
>
>
> On 14/12/2015 09:41, Alvise Rigo wrote:
>> Use the new slow path for atomic instruction translation when the
>> softmmu is enabled.
>>
>> Suggested-by: Jani Kokkonen <jani.kokkonen@huawei.com>
>> Suggested-by: Claudio Fontana <claudio.fontana@huawei.com>
>> Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
>> ---
>>  configure | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/configure b/configure
>> index b9552fd..cc3891a 100755
>> --- a/configure
>> +++ b/configure
>> @@ -4794,6 +4794,7 @@ echo "Install blobs     $blobs"
>>  echo "KVM support       $kvm"
>>  echo "RDMA support      $rdma"
>>  echo "TCG interpreter   $tcg_interpreter"
>> +echo "use ld/st excl    $softmmu"
>>  echo "fdt support       $fdt"
>>  echo "preadv support    $preadv"
>>  echo "fdatasync         $fdatasync"
>> @@ -5186,6 +5187,9 @@ fi
>>  if test "$tcg_interpreter" = "yes" ; then
>>    echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
>>  fi
>> +if test "$softmmu" = "yes" ; then
>> +  echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak
>> +fi
>
> why is this "$softmmu" and not "$target_softmmu" ?

I see now that is $target_softmmu setting CONFIG_SOFTMMU=y.
So for my understanding, which are the cases where $softmmu is set
while $target_softmmu is not?

Thank you,
alvise

>
>>  if test "$fdatasync" = "yes" ; then
>>    echo "CONFIG_FDATASYNC=y" >> $config_host_mak
>>  fi
>>
Paolo Bonzini Dec. 15, 2015, 2:31 p.m. UTC | #5
On 15/12/2015 15:23, alvise rigo wrote:
> Hi,
> 
> On Mon, Dec 14, 2015 at 11:14 AM, Laurent Vivier <lvivier@redhat.com> wrote:
>>
>>
>> On 14/12/2015 09:41, Alvise Rigo wrote:
>>> Use the new slow path for atomic instruction translation when the
>>> softmmu is enabled.
>>>
>>> Suggested-by: Jani Kokkonen <jani.kokkonen@huawei.com>
>>> Suggested-by: Claudio Fontana <claudio.fontana@huawei.com>
>>> Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
>>> ---
>>>  configure | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/configure b/configure
>>> index b9552fd..cc3891a 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -4794,6 +4794,7 @@ echo "Install blobs     $blobs"
>>>  echo "KVM support       $kvm"
>>>  echo "RDMA support      $rdma"
>>>  echo "TCG interpreter   $tcg_interpreter"
>>> +echo "use ld/st excl    $softmmu"
>>>  echo "fdt support       $fdt"
>>>  echo "preadv support    $preadv"
>>>  echo "fdatasync         $fdatasync"
>>> @@ -5186,6 +5187,9 @@ fi
>>>  if test "$tcg_interpreter" = "yes" ; then
>>>    echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
>>>  fi
>>> +if test "$softmmu" = "yes" ; then
>>> +  echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak
>>> +fi
>>
>> why is this "$softmmu" and not "$target_softmmu" ?
> 
> I see now that is $target_softmmu setting CONFIG_SOFTMMU=y.
> So for my understanding, which are the cases where $softmmu is set
> while $target_softmmu is not?

When compiling foo-linux-user.

Paolo
Laurent Vivier Dec. 15, 2015, 3:18 p.m. UTC | #6
On 15/12/2015 15:31, Paolo Bonzini wrote:
> 
> 
> On 15/12/2015 15:23, alvise rigo wrote:
>> Hi,
>>
>> On Mon, Dec 14, 2015 at 11:14 AM, Laurent Vivier <lvivier@redhat.com> wrote:
>>>
>>>
>>> On 14/12/2015 09:41, Alvise Rigo wrote:
>>>> Use the new slow path for atomic instruction translation when the
>>>> softmmu is enabled.
>>>>
>>>> Suggested-by: Jani Kokkonen <jani.kokkonen@huawei.com>
>>>> Suggested-by: Claudio Fontana <claudio.fontana@huawei.com>
>>>> Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com>
>>>> ---
>>>>  configure | 4 ++++
>>>>  1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/configure b/configure
>>>> index b9552fd..cc3891a 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -4794,6 +4794,7 @@ echo "Install blobs     $blobs"
>>>>  echo "KVM support       $kvm"
>>>>  echo "RDMA support      $rdma"
>>>>  echo "TCG interpreter   $tcg_interpreter"
>>>> +echo "use ld/st excl    $softmmu"
>>>>  echo "fdt support       $fdt"
>>>>  echo "preadv support    $preadv"
>>>>  echo "fdatasync         $fdatasync"
>>>> @@ -5186,6 +5187,9 @@ fi
>>>>  if test "$tcg_interpreter" = "yes" ; then
>>>>    echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
>>>>  fi
>>>> +if test "$softmmu" = "yes" ; then
>>>> +  echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak
>>>> +fi
>>>
>>> why is this "$softmmu" and not "$target_softmmu" ?
>>
>> I see now that is $target_softmmu setting CONFIG_SOFTMMU=y.
>> So for my understanding, which are the cases where $softmmu is set
>> while $target_softmmu is not?
> 
> When compiling foo-linux-user.

In fact, after having asked the question, I've found that it is right to
use softmmu which is a host parameter (while target_softmmu is guest
parameter) and softmmu is set to true if there is at least one *-softmmu
target.

Laurent
diff mbox

Patch

diff --git a/configure b/configure
index b9552fd..cc3891a 100755
--- a/configure
+++ b/configure
@@ -4794,6 +4794,7 @@  echo "Install blobs     $blobs"
 echo "KVM support       $kvm"
 echo "RDMA support      $rdma"
 echo "TCG interpreter   $tcg_interpreter"
+echo "use ld/st excl    $softmmu"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
 echo "fdatasync         $fdatasync"
@@ -5186,6 +5187,9 @@  fi
 if test "$tcg_interpreter" = "yes" ; then
   echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
 fi
+if test "$softmmu" = "yes" ; then
+  echo "CONFIG_TCG_USE_LDST_EXCL=y" >> $config_host_mak
+fi
 if test "$fdatasync" = "yes" ; then
   echo "CONFIG_FDATASYNC=y" >> $config_host_mak
 fi