kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v3] x86: Support environments without test-devices
Date: Tue, 23 Jul 2019 10:15:07 +0200	[thread overview]
Message-ID: <20190723081507.vkostd7cjzxcomes@kamzik.brq.redhat.com> (raw)
In-Reply-To: <20190722225540.43572-1-nadav.amit@gmail.com>

On Mon, Jul 22, 2019 at 03:55:40PM -0700, Nadav Amit wrote:
> Enable to run the tests when test-device is not present (e.g.,
> bare-metal). Users can provide the number of CPUs and ram size through
> kernel parameters.
> 
> On Ubuntu that uses grub, for example, the tests can be run by copying a
> test to the boot directory (/boot) and adding a menu-entry to grub
> (e.g., by editing /etc/grub.d/40_custom):
> 
>   menuentry 'idt_test' {
> 	set root='[ROOT]'
> 	multiboot [BOOT_RELATIVE]/[TEST].flat [PARAMETERS]
> 	module params.initrd
>   }
> 
> Replace:
>   * [ROOT] with `grub-probe --target=bios_hints /boot`
>   * [BOOT_RELATIVE] with `grub-mkrelpath /boot`
>   * [TEST] with the test executed
>   * [PARAMETERS] with the test parameters
> 
> params.initrd, which would be located on the boot directory should
> describe the machine and tell the test infrastructure that a test
> device is not present and boot-loader was used (the bootloader and qemu
> deliver test . For example for a 4 core machines with 4GB of
> memory:
> 
>   NR_CPUS=4
>   MEMSIZE=4096
>   TEST_DEVICE=0
>   BOOTLOADER=1
> 
> Since we do not really use E820, using more than 4GB is likely to fail
> due to holes.
> 
> Finally, do not forget to run update-grub. Remember that the output goes
> to the serial port.
> 
> Cc: Andrew Jones <drjones@redhat.com>
> Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
> 
> ---
> 
> v2->v3:
>  * Adding argument to argv when bootloader is used [Andrew]
>  * Avoid unnecessary check of test-device availability [Andrew]
> 
> v1->v2:
>  * Using initrd to hold configuration override [Andrew]
>  * Adapting vmx, tscdeadline_latency not to ignore the first argument
>    on native
> ---
>  lib/argv.c      | 13 +++++++++----
>  lib/argv.h      |  1 +
>  lib/x86/fwcfg.c | 28 ++++++++++++++++++++++++++++
>  lib/x86/fwcfg.h | 10 ++++++++++
>  lib/x86/setup.c |  5 +++++
>  x86/apic.c      |  4 +++-
>  x86/cstart64.S  |  8 ++++++--
>  x86/eventinj.c  | 17 ++++++++++++++---
>  x86/vmx_tests.c |  5 +++++
>  9 files changed, 81 insertions(+), 10 deletions(-)
> 

Reviewed-by: Andrew Jones <drjones@redhat.com>

  reply	other threads:[~2019-07-23  8:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 22:55 [kvm-unit-tests PATCH v3] x86: Support environments without test-devices Nadav Amit
2019-07-23  8:15 ` Andrew Jones [this message]
2019-08-05 17:33   ` Nadav Amit
2019-08-21  7:39 ` Paolo Bonzini

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=20190723081507.vkostd7cjzxcomes@kamzik.brq.redhat.com \
    --to=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=nadav.amit@gmail.com \
    --cc=pbonzini@redhat.com \
    /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).