kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH 3/3] x86: Support environments without test-devices
Date: Tue, 2 Jul 2019 10:45:41 -0700	[thread overview]
Message-ID: <39BF29A2-D14B-4AC7-AE19-66EA8C136D98@gmail.com> (raw)
In-Reply-To: <73f56921-cb61-92fa-018a-5673e721dbef@redhat.com>

> On Jul 2, 2019, at 10:24 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> On 02/07/19 18:43, Nadav Amit wrote:
>>>> Remember that the output goes to the serial port.
>>> 
>>> RAM size can use the multiboot info (see lib/x86/setup.c).
>> 
>> The multiboot info, as provided by the boot-loader is not good enough as far
>> as I remember. The info just defines where to kernel can be loaded, but does
>> not say how big the memory is. For that, e820 decoding is needed, which I
>> was too lazy to do.
> 
> The multiboot info has both e801 memory size and e820 memory map info.
> e801 is basically the first contiguous chunk of memory below 4GB, it
> should be enough for kvm-unit-tests.

It is not enough for some of the access/ept_access tests, and 1GB page
allocation can fail on certain configurations. But anyhow I didn’t solve
this problem (IIRC the allocator only allocates from addresses that are
below 4GB). So, I can do that (using e801).

>>> For the # of CPUs I'm not sure what you're supposed to do on bare metal
>>> though. :)
>> 
>> I know you are not “serious”, but I’ll use this opportunity for a small
>> clarification. You do need to provide the real number of CPUs as otherwise
>> things will fail. I do not use cpuid, as my machine, for example has two
>> sockets. Decoding the ACPI tables is the right way, but I was too lazy to
>> implement it.
> 
> What about the mptables, too?

If you mean to reuse mptable.c from [1] or [2] - I can give it a shot. I am
not about to write my own parser.

[1] https://github.com/kernelslacker/x86info/blob/master/mptable.c
[2] https://people.freebsd.org/~fsmp/SMP/mptable/mptable.c

  reply	other threads:[~2019-07-02 17:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 20:30 [kvm-unit-tests PATCH 0/3] x86: Running tests on bare-metal Nadav Amit
2019-06-28 20:30 ` [kvm-unit-tests PATCH 1/3] libcflat: use stdbool Nadav Amit
2019-07-02 16:08   ` Paolo Bonzini
2019-06-28 20:30 ` [kvm-unit-tests PATCH 2/3] x86/vmx: Use plus for positive filters Nadav Amit
2019-06-28 20:30 ` [kvm-unit-tests PATCH 3/3] x86: Support environments without test-devices Nadav Amit
2019-07-02 16:08   ` Paolo Bonzini
2019-07-02 16:43     ` Nadav Amit
2019-07-02 17:24       ` Paolo Bonzini
2019-07-02 17:45         ` Nadav Amit [this message]
2019-07-02 18:28           ` Paolo Bonzini
2019-07-02 23:39             ` Nadav Amit
2019-07-02 23:56               ` Nadav Amit
2019-07-03  5:39               ` Paolo Bonzini
2019-07-03  6:09                 ` Nadav Amit
2019-07-15 15:48   ` Andrew Jones
2019-07-15 18:08     ` Nadav Amit
2019-07-15 18:26       ` Paolo Bonzini
2019-07-15 18:43         ` Nadav Amit
2019-07-15 18:54           ` Paolo Bonzini
2019-07-21 16:40             ` Nadav Amit
2019-07-21 16:51               ` 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=39BF29A2-D14B-4AC7-AE19-66EA8C136D98@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=kvm@vger.kernel.org \
    --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).