Re: [kvm-unit-tests PATCH 3/3] x86: Support environments without test-devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Jul 15, 2019, at 11:26 AM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> 
> On 15/07/19 20:08, Nadav Amit wrote:
>>> On Jul 15, 2019, at 8:48 AM, Andrew Jones <drjones@xxxxxxxxxx> wrote:
>>> 
>>> On Fri, Jun 28, 2019 at 01:30:19PM -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.
>>> 
>>> Can you provide multiboot a pointer to an initrd (text file) with
>>> environment variables listed instead? Because this works
>>> 
>>> $ cat x86/params.c 
>>> #include <libcflat.h>
>>> int main(void)
>>> {
>>>   printf("nr_cpus=%ld\n", atol(getenv("NR_CPUS")));
>>>   printf("memsize=%ld\n", atol(getenv("MEMSIZE")));
>>>   return 0;
>>> }
>>> 
>>> $ cat params.initrd 
>>> NR_CPUS=2
>>> MEMSIZE=256
>>> 
>>> $ qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel x86/params.flat -initrd params.initrd
>>> enabling apic
>>> enabling apic
>>> nr_cpus=2
>>> memsize=256
>>> 
>>> 
>>> This works because setup_multiboot() looks for an initrd, and then,
>>> if present, it gets interpreted as a list of environment variables
>>> which become the unit tests **envp.
>> 
>> Looks like a nice solution, but Paolo preferred to see if this information
>> can be extracted from e810 and ACPI MADT. Paolo?
> 
> It was mostly a matter of requiring adjustments in the tests.  Andrew's
> solution would be fine!

Ok, but I must be missing something, because the changes I proposed before
did not require any changes to the tests either (when they are run on top
of KVM).

Andrew’s solution would just make it easier to set “fixed” boot-loader
entries, although they would still need a different root and
boot-relative-path on different machines.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux