All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
@ 2017-08-14 14:34 Michael S. Tsirkin
  2017-08-14 15:33 ` Cornelia Huck
  0 siblings, 1 reply; 11+ messages in thread
From: Michael S. Tsirkin @ 2017-08-14 14:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Thomas Huth, Laurent Vivier, Cornelia Huck

Speed up tests on host systems with kvm support.
In particular, this fixes tests with --disable-tcg.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>
Suggested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

Tested on x86 only.

 tests/boot-serial-test.c | 2 +-
 tests/pnv-xscom-test.c   | 4 ++--
 tests/prom-env-test.c    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index 11f48b0..c3b2e4e 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -78,7 +78,7 @@ static void test_machine(const void *data)
     fd = mkstemp(tmpname);
     g_assert(fd != -1);
 
-    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
+    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
                            " -no-shutdown -serial chardev:serial0 %s",
                            test->machine, tmpname, test->extra);
 
diff --git a/tests/pnv-xscom-test.c b/tests/pnv-xscom-test.c
index 5adc3fd..7be396f 100644
--- a/tests/pnv-xscom-test.c
+++ b/tests/pnv-xscom-test.c
@@ -84,7 +84,7 @@ static void test_cfam_id(const void *data)
     char *args;
     const PnvChip *chip = data;
 
-    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
+    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
 
     qtest_start(args);
     test_xscom_cfam_id(chip);
@@ -112,7 +112,7 @@ static void test_core(const void *data)
     char *args;
     const PnvChip *chip = data;
 
-    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
+    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
 
     qtest_start(args);
     test_xscom_core(chip);
diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
index eac207b..0a10f06 100644
--- a/tests/prom-env-test.c
+++ b/tests/prom-env-test.c
@@ -50,7 +50,7 @@ static void test_machine(const void *machine)
     /* The pseries firmware boots much faster without the default devices */
     extra_args = strcmp(machine, "pseries") == 0 ? "-nodefaults" : "";
 
-    args = g_strdup_printf("-M %s,accel=tcg %s -prom-env 'use-nvramrc?=true' "
+    args = g_strdup_printf("-M %s,accel=kvm:tcg %s -prom-env 'use-nvramrc?=true' "
                            "-prom-env 'nvramrc=%x %x l!' ",
                            (const char *)machine, extra_args, MAGIC, ADDRESS);
 
-- 
MST

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-14 14:34 [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg Michael S. Tsirkin
@ 2017-08-14 15:33 ` Cornelia Huck
  2017-08-14 15:47   ` Thomas Huth
  2017-08-15 15:47   ` Richard Henderson
  0 siblings, 2 replies; 11+ messages in thread
From: Cornelia Huck @ 2017-08-14 15:33 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, Paolo Bonzini, Thomas Huth, Laurent Vivier

On Mon, 14 Aug 2017 17:34:15 +0300
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> Speed up tests on host systems with kvm support.
> In particular, this fixes tests with --disable-tcg.
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Laurent Vivier <lvivier@redhat.com>
> Suggested-by: Cornelia Huck <cohuck@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> 
> Tested on x86 only.
> 
>  tests/boot-serial-test.c | 2 +-
>  tests/pnv-xscom-test.c   | 4 ++--
>  tests/prom-env-test.c    | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
> index 11f48b0..c3b2e4e 100644
> --- a/tests/boot-serial-test.c
> +++ b/tests/boot-serial-test.c
> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
>      fd = mkstemp(tmpname);
>      g_assert(fd != -1);
>  
> -    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
>                             " -no-shutdown -serial chardev:serial0 %s",
>                             test->machine, tmpname, test->extra);

This has already been changed upstream.

>  
> diff --git a/tests/pnv-xscom-test.c b/tests/pnv-xscom-test.c
> index 5adc3fd..7be396f 100644
> --- a/tests/pnv-xscom-test.c
> +++ b/tests/pnv-xscom-test.c
> @@ -84,7 +84,7 @@ static void test_cfam_id(const void *data)
>      char *args;
>      const PnvChip *chip = data;
>  
> -    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
> +    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
>  
>      qtest_start(args);
>      test_xscom_cfam_id(chip);
> @@ -112,7 +112,7 @@ static void test_core(const void *data)
>      char *args;
>      const PnvChip *chip = data;
>  
> -    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
> +    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
>  
>      qtest_start(args);
>      test_xscom_core(chip);

These seem to test a specified cpu model explicitly, so I'm not sure
how well this will work with kvm.

> diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
> index eac207b..0a10f06 100644
> --- a/tests/prom-env-test.c
> +++ b/tests/prom-env-test.c
> @@ -50,7 +50,7 @@ static void test_machine(const void *machine)
>      /* The pseries firmware boots much faster without the default devices */
>      extra_args = strcmp(machine, "pseries") == 0 ? "-nodefaults" : "";
>  
> -    args = g_strdup_printf("-M %s,accel=tcg %s -prom-env 'use-nvramrc?=true' "
> +    args = g_strdup_printf("-M %s,accel=kvm:tcg %s -prom-env 'use-nvramrc?=true' "
>                             "-prom-env 'nvramrc=%x %x l!' ",
>                             (const char *)machine, extra_args, MAGIC, ADDRESS);
>  

The header explicitly states that this is supposed to test tcg mode.

Thomas?

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-14 15:33 ` Cornelia Huck
@ 2017-08-14 15:47   ` Thomas Huth
  2017-08-14 18:34     ` Cédric Le Goater
  2017-08-15 15:47   ` Richard Henderson
  1 sibling, 1 reply; 11+ messages in thread
From: Thomas Huth @ 2017-08-14 15:47 UTC (permalink / raw)
  To: Cornelia Huck, Michael S. Tsirkin
  Cc: qemu-devel, Paolo Bonzini, Laurent Vivier, Greg Kurz,
	Cédric Le Goater, qemu-ppc

On 14.08.2017 17:33, Cornelia Huck wrote:
> On Mon, 14 Aug 2017 17:34:15 +0300
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
>> Speed up tests on host systems with kvm support.
>> In particular, this fixes tests with --disable-tcg.
[...]
>> diff --git a/tests/pnv-xscom-test.c b/tests/pnv-xscom-test.c
>> index 5adc3fd..7be396f 100644
>> --- a/tests/pnv-xscom-test.c
>> +++ b/tests/pnv-xscom-test.c
>> @@ -84,7 +84,7 @@ static void test_cfam_id(const void *data)
>>      char *args;
>>      const PnvChip *chip = data;
>>  
>> -    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
>> +    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
>>  
>>      qtest_start(args);
>>      test_xscom_cfam_id(chip);
>> @@ -112,7 +112,7 @@ static void test_core(const void *data)
>>      char *args;
>>      const PnvChip *chip = data;
>>  
>> -    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
>> +    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
>>  
>>      qtest_start(args);
>>      test_xscom_core(chip);
> 
> These seem to test a specified cpu model explicitly, so I'm not sure
> how well this will work with kvm.

AFAIK the powernv machine does not work with KVM yet (Cédric, can you
confirm?), so you better drop the changes to this file.

>> diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
>> index eac207b..0a10f06 100644
>> --- a/tests/prom-env-test.c
>> +++ b/tests/prom-env-test.c
>> @@ -50,7 +50,7 @@ static void test_machine(const void *machine)
>>      /* The pseries firmware boots much faster without the default devices */
>>      extra_args = strcmp(machine, "pseries") == 0 ? "-nodefaults" : "";
>>  
>> -    args = g_strdup_printf("-M %s,accel=tcg %s -prom-env 'use-nvramrc?=true' "
>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg %s -prom-env 'use-nvramrc?=true' "
>>                             "-prom-env 'nvramrc=%x %x l!' ",
>>                             (const char *)machine, extra_args, MAGIC, ADDRESS);
> 
> The header explicitly states that this is supposed to test tcg mode.

This change should be OK here. But it is currently not necessary yet:
The test only runs on SPARC and PPC machines, and both do not support
the --disable-tcg switch yet.

 Thomas

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-14 15:47   ` Thomas Huth
@ 2017-08-14 18:34     ` Cédric Le Goater
  0 siblings, 0 replies; 11+ messages in thread
From: Cédric Le Goater @ 2017-08-14 18:34 UTC (permalink / raw)
  To: Thomas Huth, Cornelia Huck, Michael S. Tsirkin
  Cc: qemu-devel, Paolo Bonzini, Laurent Vivier, Greg Kurz, qemu-ppc

On 08/14/2017 05:47 PM, Thomas Huth wrote:
> On 14.08.2017 17:33, Cornelia Huck wrote:
>> On Mon, 14 Aug 2017 17:34:15 +0300
>> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>>
>>> Speed up tests on host systems with kvm support.
>>> In particular, this fixes tests with --disable-tcg.
> [...]
>>> diff --git a/tests/pnv-xscom-test.c b/tests/pnv-xscom-test.c
>>> index 5adc3fd..7be396f 100644
>>> --- a/tests/pnv-xscom-test.c
>>> +++ b/tests/pnv-xscom-test.c
>>> @@ -84,7 +84,7 @@ static void test_cfam_id(const void *data)
>>>      char *args;
>>>      const PnvChip *chip = data;
>>>  
>>> -    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
>>> +    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
>>>  
>>>      qtest_start(args);
>>>      test_xscom_cfam_id(chip);
>>> @@ -112,7 +112,7 @@ static void test_core(const void *data)
>>>      char *args;
>>>      const PnvChip *chip = data;
>>>  
>>> -    args = g_strdup_printf("-M powernv,accel=tcg -cpu %s", chip->cpu_model);
>>> +    args = g_strdup_printf("-M powernv,accel=kvm:tcg -cpu %s", chip->cpu_model);
>>>  
>>>      qtest_start(args);
>>>      test_xscom_core(chip);
>>
>> These seem to test a specified cpu model explicitly, so I'm not sure
>> how well this will work with kvm.
> 
> AFAIK the powernv machine does not work with KVM yet (Cédric, can you
> confirm?), so you better drop the changes to this file.

No. the powernv machine does not work with KVM.

C.

>>> diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
>>> index eac207b..0a10f06 100644
>>> --- a/tests/prom-env-test.c
>>> +++ b/tests/prom-env-test.c
>>> @@ -50,7 +50,7 @@ static void test_machine(const void *machine)
>>>      /* The pseries firmware boots much faster without the default devices */
>>>      extra_args = strcmp(machine, "pseries") == 0 ? "-nodefaults" : "";
>>>  
>>> -    args = g_strdup_printf("-M %s,accel=tcg %s -prom-env 'use-nvramrc?=true' "
>>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg %s -prom-env 'use-nvramrc?=true' "
>>>                             "-prom-env 'nvramrc=%x %x l!' ",
>>>                             (const char *)machine, extra_args, MAGIC, ADDRESS);
>>
>> The header explicitly states that this is supposed to test tcg mode.
> 
> This change should be OK here. But it is currently not necessary yet:
> The test only runs on SPARC and PPC machines, and both do not support
> the --disable-tcg switch yet.
> 
>  Thomas
> 

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-14 15:33 ` Cornelia Huck
  2017-08-14 15:47   ` Thomas Huth
@ 2017-08-15 15:47   ` Richard Henderson
  2017-08-15 19:28     ` Michael S. Tsirkin
                       ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Richard Henderson @ 2017-08-15 15:47 UTC (permalink / raw)
  To: Cornelia Huck, Michael S. Tsirkin
  Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth, qemu-devel

On 08/14/2017 08:33 AM, Cornelia Huck wrote:
> On Mon, 14 Aug 2017 17:34:15 +0300
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
>> Speed up tests on host systems with kvm support.
>> In particular, this fixes tests with --disable-tcg.
>>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Thomas Huth <thuth@redhat.com>
>> Cc: Laurent Vivier <lvivier@redhat.com>
>> Suggested-by: Cornelia Huck <cohuck@redhat.com>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> ---
>>
>> Tested on x86 only.
>>
>>  tests/boot-serial-test.c | 2 +-
>>  tests/pnv-xscom-test.c   | 4 ++--
>>  tests/prom-env-test.c    | 2 +-
>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
>> index 11f48b0..c3b2e4e 100644
>> --- a/tests/boot-serial-test.c
>> +++ b/tests/boot-serial-test.c
>> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
>>      fd = mkstemp(tmpname);
>>      g_assert(fd != -1);
>>  
>> -    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
>>                             " -no-shutdown -serial chardev:serial0 %s",
>>                             test->machine, tmpname, test->extra);
> 
> This has already been changed upstream.

Ouch.  This is the only real smoke test we have for the tcg backend for the
host.  While it is still going to test tcg for whatever machines do not run
natively on the host, I can't help think we've lost testing.

Can we use accel=tcg:kvm instead?


r~

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-15 15:47   ` Richard Henderson
@ 2017-08-15 19:28     ` Michael S. Tsirkin
  2017-08-15 19:46       ` Richard Henderson
  2017-08-15 19:49     ` Thomas Huth
  2017-08-15 20:04     ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 11+ messages in thread
From: Michael S. Tsirkin @ 2017-08-15 19:28 UTC (permalink / raw)
  To: Richard Henderson
  Cc: Cornelia Huck, Laurent Vivier, Paolo Bonzini, Thomas Huth, qemu-devel

On Tue, Aug 15, 2017 at 08:47:35AM -0700, Richard Henderson wrote:
> On 08/14/2017 08:33 AM, Cornelia Huck wrote:
> > On Mon, 14 Aug 2017 17:34:15 +0300
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > 
> >> Speed up tests on host systems with kvm support.
> >> In particular, this fixes tests with --disable-tcg.
> >>
> >> Cc: Paolo Bonzini <pbonzini@redhat.com>
> >> Cc: Thomas Huth <thuth@redhat.com>
> >> Cc: Laurent Vivier <lvivier@redhat.com>
> >> Suggested-by: Cornelia Huck <cohuck@redhat.com>
> >> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >> ---
> >>
> >> Tested on x86 only.
> >>
> >>  tests/boot-serial-test.c | 2 +-
> >>  tests/pnv-xscom-test.c   | 4 ++--
> >>  tests/prom-env-test.c    | 2 +-
> >>  3 files changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
> >> index 11f48b0..c3b2e4e 100644
> >> --- a/tests/boot-serial-test.c
> >> +++ b/tests/boot-serial-test.c
> >> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
> >>      fd = mkstemp(tmpname);
> >>      g_assert(fd != -1);
> >>  
> >> -    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
> >> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
> >>                             " -no-shutdown -serial chardev:serial0 %s",
> >>                             test->machine, tmpname, test->extra);
> > 
> > This has already been changed upstream.
> 
> Ouch.  This is the only real smoke test we have for the tcg backend for the
> host.  While it is still going to test tcg for whatever machines do not run
> natively on the host, I can't help think we've lost testing.
> 
> Can we use accel=tcg:kvm instead?
> 
> 
> r~

We can add an environment to disable kvm on qemu side,
for e.g. CI systems who have spare time.

-- 
MST

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-15 19:28     ` Michael S. Tsirkin
@ 2017-08-15 19:46       ` Richard Henderson
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Henderson @ 2017-08-15 19:46 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Cornelia Huck, Laurent Vivier, Paolo Bonzini, Thomas Huth, qemu-devel

On 08/15/2017 12:28 PM, Michael S. Tsirkin wrote:
>> Ouch.  This is the only real smoke test we have for the tcg backend for the
>> host.  While it is still going to test tcg for whatever machines do not run
>> natively on the host, I can't help think we've lost testing.
>>
>> Can we use accel=tcg:kvm instead?
>>
>>
>> r~
> 
> We can add an environment to disable kvm on qemu side,
> for e.g. CI systems who have spare time.

Hum.  I'm not especially keen on an environment variable that wouldn't be
useful for anything else.  I'd much rather adjust the test case so that plain
"make check" tests all that we need to test.


r~

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-15 15:47   ` Richard Henderson
  2017-08-15 19:28     ` Michael S. Tsirkin
@ 2017-08-15 19:49     ` Thomas Huth
  2017-08-16  8:07       ` Cornelia Huck
  2017-08-15 20:04     ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 11+ messages in thread
From: Thomas Huth @ 2017-08-15 19:49 UTC (permalink / raw)
  To: Richard Henderson, Cornelia Huck, Michael S. Tsirkin
  Cc: Laurent Vivier, Paolo Bonzini, qemu-devel

On 15.08.2017 17:47, Richard Henderson wrote:
> On 08/14/2017 08:33 AM, Cornelia Huck wrote:
>> On Mon, 14 Aug 2017 17:34:15 +0300
>> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>>
>>> Speed up tests on host systems with kvm support.
>>> In particular, this fixes tests with --disable-tcg.
>>>
>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>> Cc: Thomas Huth <thuth@redhat.com>
>>> Cc: Laurent Vivier <lvivier@redhat.com>
>>> Suggested-by: Cornelia Huck <cohuck@redhat.com>
>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>>
>>> Tested on x86 only.
>>>
>>>  tests/boot-serial-test.c | 2 +-
>>>  tests/pnv-xscom-test.c   | 4 ++--
>>>  tests/prom-env-test.c    | 2 +-
>>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
>>> index 11f48b0..c3b2e4e 100644
>>> --- a/tests/boot-serial-test.c
>>> +++ b/tests/boot-serial-test.c
>>> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
>>>      fd = mkstemp(tmpname);
>>>      g_assert(fd != -1);
>>>  
>>> -    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
>>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
>>>                             " -no-shutdown -serial chardev:serial0 %s",
>>>                             test->machine, tmpname, test->extra);
>>
>> This has already been changed upstream.
> 
> Ouch.  This is the only real smoke test we have for the tcg backend for the
> host.  While it is still going to test tcg for whatever machines do not run
> natively on the host, I can't help think we've lost testing.

Ah, well, I didn't think of that when I suggested to use "kvm:tcg"
here... I rather thought that kvm would be preferable to speed up the
test. But since the test is already quite fast anyway, it's likely also
OK to use "tcg:kvm" here. (But we should keep "kvm:tcg" in the pxe-test
since that is quite slow with TCG, at least on ppc64).

 Thomas

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-15 15:47   ` Richard Henderson
  2017-08-15 19:28     ` Michael S. Tsirkin
  2017-08-15 19:49     ` Thomas Huth
@ 2017-08-15 20:04     ` Philippe Mathieu-Daudé
  2017-08-16  8:04       ` Cornelia Huck
  2 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-08-15 20:04 UTC (permalink / raw)
  To: Richard Henderson, Cornelia Huck, Michael S. Tsirkin
  Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth, qemu-devel

On 08/15/2017 12:47 PM, Richard Henderson wrote:
> On 08/14/2017 08:33 AM, Cornelia Huck wrote:
>> On Mon, 14 Aug 2017 17:34:15 +0300
>> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>>
>>> Speed up tests on host systems with kvm support.
>>> In particular, this fixes tests with --disable-tcg.
>>>
>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>> Cc: Thomas Huth <thuth@redhat.com>
>>> Cc: Laurent Vivier <lvivier@redhat.com>
>>> Suggested-by: Cornelia Huck <cohuck@redhat.com>
>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>>
>>> Tested on x86 only.
>>>
>>>   tests/boot-serial-test.c | 2 +-
>>>   tests/pnv-xscom-test.c   | 4 ++--
>>>   tests/prom-env-test.c    | 2 +-
>>>   3 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
>>> index 11f48b0..c3b2e4e 100644
>>> --- a/tests/boot-serial-test.c
>>> +++ b/tests/boot-serial-test.c
>>> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
>>>       fd = mkstemp(tmpname);
>>>       g_assert(fd != -1);
>>>   
>>> -    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
>>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
>>>                              " -no-shutdown -serial chardev:serial0 %s",
>>>                              test->machine, tmpname, test->extra);
>>
>> This has already been changed upstream.
> 
> Ouch.  This is the only real smoke test we have for the tcg backend for the
> host.  While it is still going to test tcg for whatever machines do not run
> natively on the host, I can't help think we've lost testing.
> 
> Can we use accel=tcg:kvm instead?

can we use the following in this test main()?

/* This test is fast fast enough to use to test the host TCG backend,
  * so use "tcg" as default accel if available. */
#ifdef CONFIG_TCG
static const char *accel = "tcg";
#else
static const char *accel = "kvm";
#endif

> 
> 
> r~
> 

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-15 20:04     ` Philippe Mathieu-Daudé
@ 2017-08-16  8:04       ` Cornelia Huck
  0 siblings, 0 replies; 11+ messages in thread
From: Cornelia Huck @ 2017-08-16  8:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Richard Henderson, Michael S. Tsirkin, Laurent Vivier,
	Paolo Bonzini, Thomas Huth, qemu-devel

On Tue, 15 Aug 2017 17:04:35 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> On 08/15/2017 12:47 PM, Richard Henderson wrote:
> > On 08/14/2017 08:33 AM, Cornelia Huck wrote:  
> >> On Mon, 14 Aug 2017 17:34:15 +0300
> >> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >>  
> >>> Speed up tests on host systems with kvm support.
> >>> In particular, this fixes tests with --disable-tcg.
> >>>
> >>> Cc: Paolo Bonzini <pbonzini@redhat.com>
> >>> Cc: Thomas Huth <thuth@redhat.com>
> >>> Cc: Laurent Vivier <lvivier@redhat.com>
> >>> Suggested-by: Cornelia Huck <cohuck@redhat.com>
> >>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >>> ---
> >>>
> >>> Tested on x86 only.
> >>>
> >>>   tests/boot-serial-test.c | 2 +-
> >>>   tests/pnv-xscom-test.c   | 4 ++--
> >>>   tests/prom-env-test.c    | 2 +-
> >>>   3 files changed, 4 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
> >>> index 11f48b0..c3b2e4e 100644
> >>> --- a/tests/boot-serial-test.c
> >>> +++ b/tests/boot-serial-test.c
> >>> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
> >>>       fd = mkstemp(tmpname);
> >>>       g_assert(fd != -1);
> >>>   
> >>> -    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
> >>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
> >>>                              " -no-shutdown -serial chardev:serial0 %s",
> >>>                              test->machine, tmpname, test->extra);  
> >>
> >> This has already been changed upstream.  
> > 
> > Ouch.  This is the only real smoke test we have for the tcg backend for the
> > host.  While it is still going to test tcg for whatever machines do not run
> > natively on the host, I can't help think we've lost testing.
> > 
> > Can we use accel=tcg:kvm instead?  
> 
> can we use the following in this test main()?
> 
> /* This test is fast fast enough to use to test the host TCG backend,
>   * so use "tcg" as default accel if available. */
> #ifdef CONFIG_TCG
> static const char *accel = "tcg";
> #else
> static const char *accel = "kvm";
> #endif

accel=tcg:kvm should already have the same effect, no?

(But adding a comment may be a good idea.)

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

* Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
  2017-08-15 19:49     ` Thomas Huth
@ 2017-08-16  8:07       ` Cornelia Huck
  0 siblings, 0 replies; 11+ messages in thread
From: Cornelia Huck @ 2017-08-16  8:07 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Richard Henderson, Michael S. Tsirkin, Laurent Vivier,
	Paolo Bonzini, qemu-devel

On Tue, 15 Aug 2017 21:49:16 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 15.08.2017 17:47, Richard Henderson wrote:
> > On 08/14/2017 08:33 AM, Cornelia Huck wrote:  
> >> On Mon, 14 Aug 2017 17:34:15 +0300
> >> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >>  
> >>> Speed up tests on host systems with kvm support.
> >>> In particular, this fixes tests with --disable-tcg.
> >>>
> >>> Cc: Paolo Bonzini <pbonzini@redhat.com>
> >>> Cc: Thomas Huth <thuth@redhat.com>
> >>> Cc: Laurent Vivier <lvivier@redhat.com>
> >>> Suggested-by: Cornelia Huck <cohuck@redhat.com>
> >>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >>> ---
> >>>
> >>> Tested on x86 only.
> >>>
> >>>  tests/boot-serial-test.c | 2 +-
> >>>  tests/pnv-xscom-test.c   | 4 ++--
> >>>  tests/prom-env-test.c    | 2 +-
> >>>  3 files changed, 4 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
> >>> index 11f48b0..c3b2e4e 100644
> >>> --- a/tests/boot-serial-test.c
> >>> +++ b/tests/boot-serial-test.c
> >>> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
> >>>      fd = mkstemp(tmpname);
> >>>      g_assert(fd != -1);
> >>>  
> >>> -    args = g_strdup_printf("-M %s,accel=tcg -chardev file,id=serial0,path=%s"
> >>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev file,id=serial0,path=%s"
> >>>                             " -no-shutdown -serial chardev:serial0 %s",
> >>>                             test->machine, tmpname, test->extra);  
> >>
> >> This has already been changed upstream.  
> > 
> > Ouch.  This is the only real smoke test we have for the tcg backend for the
> > host.  While it is still going to test tcg for whatever machines do not run
> > natively on the host, I can't help think we've lost testing.  
> 
> Ah, well, I didn't think of that when I suggested to use "kvm:tcg"
> here... I rather thought that kvm would be preferable to speed up the
> test. But since the test is already quite fast anyway, it's likely also
> OK to use "tcg:kvm" here. (But we should keep "kvm:tcg" in the pxe-test
> since that is quite slow with TCG, at least on ppc64).

That all means to me that we need more documentation, at least some
comments.

Will there be a -rc4? I can send a patch that reverses the accelerators
and adds a comment today.

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

end of thread, other threads:[~2017-08-16  8:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-14 14:34 [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg Michael S. Tsirkin
2017-08-14 15:33 ` Cornelia Huck
2017-08-14 15:47   ` Thomas Huth
2017-08-14 18:34     ` Cédric Le Goater
2017-08-15 15:47   ` Richard Henderson
2017-08-15 19:28     ` Michael S. Tsirkin
2017-08-15 19:46       ` Richard Henderson
2017-08-15 19:49     ` Thomas Huth
2017-08-16  8:07       ` Cornelia Huck
2017-08-15 20:04     ` Philippe Mathieu-Daudé
2017-08-16  8:04       ` Cornelia Huck

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.