public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v4 0/3] A couple of small fixes
@ 2015-07-22 17:49 Alex Bennée
  2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 1/3] README: add some CONTRIBUTING notes Alex Bennée
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alex Bennée @ 2015-07-22 17:49 UTC (permalink / raw)
  To: kvm; +Cc: drjones, Alex Bennée

One minor fix for quote usage and added a final r-b tag from Drew.

Please apply

Alex Bennée (3):
  README: add some CONTRIBUTING notes
  configure: emit HOST=$host to config.mak
  arm/run: introduce usingkvm var and use it

 README    | 26 ++++++++++++++++++++++++++
 arm/run   | 18 ++++++++++++++++--
 configure |  2 ++
 3 files changed, 44 insertions(+), 2 deletions(-)

-- 
2.4.5


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

* [kvm-unit-tests PATCH v4 1/3] README: add some CONTRIBUTING notes
  2015-07-22 17:49 [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
@ 2015-07-22 17:49 ` Alex Bennée
  2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 2/3] configure: emit HOST=$host to config.mak Alex Bennée
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2015-07-22 17:49 UTC (permalink / raw)
  To: kvm; +Cc: drjones, Alex Bennée

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>

---
v2
  - mention consistency
v3
  - add r-b tag
---
 README | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/README b/README
index e9869d1..9389a26 100644
--- a/README
+++ b/README
@@ -25,3 +25,29 @@ Directory structure:
 ./<ARCH>:	the sources of the tests and the created objects/images
 
 See <ARCH>/README for architecture specific documentation.
+
+CONTRIBUTING:
+=============
+
+Style
+-----
+
+Currently there is a mix of indentation styles so any changes to
+existing files should be consistent with the existing style. For new
+files:
+
+  - C: please use standard linux-with-tabs
+  - Shell: use TABs for indentation
+
+Patches
+-------
+
+Patches are welcome at the KVM mailing list <kvm@vger.kernel.org>.
+
+Please prefix messages with: [kvm-unit-tests PATCH]
+
+You can add the following to .git/config to do this automatically for you:
+
+[format]
+	subjectprefix = kvm-unit-tests PATCH
+
-- 
2.4.5


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

* [kvm-unit-tests PATCH v4 2/3] configure: emit HOST=$host to config.mak
  2015-07-22 17:49 [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
  2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 1/3] README: add some CONTRIBUTING notes Alex Bennée
@ 2015-07-22 17:49 ` Alex Bennée
  2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 3/3] arm/run: introduce usingkvm var and use it Alex Bennée
  2015-07-28  5:42 ` [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
  3 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2015-07-22 17:49 UTC (permalink / raw)
  To: kvm; +Cc: drjones, Alex Bennée

This is useful information for the run scripts to know, especially if
they want to drop to using TCG.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>

---
v3
  - add r-b tag
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index b2ad32a..078b70c 100755
--- a/configure
+++ b/configure
@@ -7,6 +7,7 @@ ld=ld
 objcopy=objcopy
 ar=ar
 arch=`uname -m | sed -e s/i.86/i386/ | sed -e 's/arm.*/arm/'`
+host=$arch
 cross_prefix=
 
 usage() {
@@ -122,6 +123,7 @@ ln -s $asm lib/asm
 cat <<EOF > config.mak
 PREFIX=$prefix
 KERNELDIR=$(readlink -f $kerneldir)
+HOST=$host
 ARCH=$arch
 ARCH_NAME=$arch_name
 PROCESSOR=$processor
-- 
2.4.5


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

* [kvm-unit-tests PATCH v4 3/3] arm/run: introduce usingkvm var and use it
  2015-07-22 17:49 [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
  2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 1/3] README: add some CONTRIBUTING notes Alex Bennée
  2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 2/3] configure: emit HOST=$host to config.mak Alex Bennée
@ 2015-07-22 17:49 ` Alex Bennée
  2015-07-28  5:42 ` [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
  3 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2015-07-22 17:49 UTC (permalink / raw)
  To: kvm; +Cc: drjones, Alex Bennée

This makes the script a little cleaner by only checking for KVM support
in one place. If KVM isn't available we can fall back to TCG emulation
and echo the fact to the screen rather than let QEMU complain.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>

---
v2
  - rm redundant M= statement
v3
  - make usingkvm use "yes"
  - merge patches 3/4 into one
v4
  - use single quotes consistently
  - add r-b tag
---
 arm/run | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/arm/run b/arm/run
index 6b42a2e..6b3d558 100755
--- a/arm/run
+++ b/arm/run
@@ -8,6 +8,15 @@ fi
 source config.mak
 processor="$PROCESSOR"
 
+# Default to using KVM if available and on the right ARM host
+if [ -c /dev/kvm ]; then
+	if [ "$HOST" = "arm" ] && [ "$ARCH" = "arm" ]; then
+		usingkvm=yes
+	elif [ "$HOST" = "aarch64" ]; then
+		usingkvm=yes
+	fi
+fi
+
 qemu="${QEMU:-qemu-system-$ARCH_NAME}"
 qpath=$(which $qemu 2>/dev/null)
 
@@ -22,6 +31,12 @@ if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
 fi
 
 M='-machine virt'
+if [ "$usingkvm" = "yes" ]; then
+	M+=',accel=kvm'
+else
+	echo "Running with TCG"
+	M+=',accel=tcg'
+fi
 
 if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then
 	echo "$qpath doesn't support virtio-console for chr-testdev. Exiting."
@@ -34,12 +49,11 @@ if $qemu $M -chardev testdev,id=id -initrd . 2>&1 \
 	exit 2
 fi
 
-M='-machine virt,accel=kvm:tcg'
 chr_testdev='-device virtio-serial-device'
 chr_testdev+=' -device virtconsole,chardev=ctd -chardev testdev,id=ctd'
 
 # arm64 must use '-cpu host' with kvm
-if [ "$(arch)" = "aarch64" ] && [ "$ARCH" = "arm64" ] && [ -c /dev/kvm ]; then
+if [ "$usingkvm" = "yes" ] && [ "$ARCH" = "arm64" ]; then
 	processor="host"
 fi
 
-- 
2.4.5


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

* Re: [kvm-unit-tests PATCH v4 0/3] A couple of small fixes
  2015-07-22 17:49 [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
                   ` (2 preceding siblings ...)
  2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 3/3] arm/run: introduce usingkvm var and use it Alex Bennée
@ 2015-07-28  5:42 ` Alex Bennée
  2015-07-28  8:01   ` Andrew Jones
  3 siblings, 1 reply; 6+ messages in thread
From: Alex Bennée @ 2015-07-28  5:42 UTC (permalink / raw)
  To: kvm; +Cc: drjones


Alex Bennée <alex.bennee@linaro.org> writes:

> One minor fix for quote usage and added a final r-b tag from Drew.
>
> Please apply

Ping. Do I need to get anyone in particular to commit this. I notice we
don't list any particular maintainers with commit rights.

>
> Alex Bennée (3):
>   README: add some CONTRIBUTING notes
>   configure: emit HOST=$host to config.mak
>   arm/run: introduce usingkvm var and use it
>
>  README    | 26 ++++++++++++++++++++++++++
>  arm/run   | 18 ++++++++++++++++--
>  configure |  2 ++
>  3 files changed, 44 insertions(+), 2 deletions(-)

-- 
Alex Bennée

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

* Re: [kvm-unit-tests PATCH v4 0/3] A couple of small fixes
  2015-07-28  5:42 ` [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
@ 2015-07-28  8:01   ` Andrew Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Jones @ 2015-07-28  8:01 UTC (permalink / raw)
  To: Alex Bennée; +Cc: kvm

On Tue, Jul 28, 2015 at 06:42:29AM +0100, Alex Bennée wrote:
> 
> Alex Bennée <alex.bennee@linaro.org> writes:
> 
> > One minor fix for quote usage and added a final r-b tag from Drew.
> >
> > Please apply
> 
> Ping. Do I need to get anyone in particular to commit this. I notice we
> don't list any particular maintainers with commit rights.

Paolo and Marcelo are the maintainers. We could probably mention that
in the README. They're both pretty swamped right now, and kvm-unit-tests
slips easily in the priority queue. Also, for arm patches I usually CC
Christoffer too, but he's also quite busy, so I haven't gotten an r-b
from him in a while. For this series, which are framework-only changes,
then I think my r-b should be sufficient anyway though.

Thanks,
drew

> 
> >
> > Alex Bennée (3):
> >   README: add some CONTRIBUTING notes
> >   configure: emit HOST=$host to config.mak
> >   arm/run: introduce usingkvm var and use it
> >
> >  README    | 26 ++++++++++++++++++++++++++
> >  arm/run   | 18 ++++++++++++++++--
> >  configure |  2 ++
> >  3 files changed, 44 insertions(+), 2 deletions(-)
> 
> -- 
> Alex Bennée
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-07-28  8:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 17:49 [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 1/3] README: add some CONTRIBUTING notes Alex Bennée
2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 2/3] configure: emit HOST=$host to config.mak Alex Bennée
2015-07-22 17:49 ` [kvm-unit-tests PATCH v4 3/3] arm/run: introduce usingkvm var and use it Alex Bennée
2015-07-28  5:42 ` [kvm-unit-tests PATCH v4 0/3] A couple of small fixes Alex Bennée
2015-07-28  8:01   ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox