From: Igor Mammedov <imammedo@redhat.com> To: Wei Xu <xuwei5@hisilicon.com> Cc: x00249684 <xuwei5@huawei.com>, qemu-devel@nongnu.org, shameerali.kolothum.thodi@huawei.com, linuxarm@huawei.com, Andrew Jones <drjones@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, mst@redhat.com Subject: Re: [Qemu-devel] [PATCH v3 11/13] tests: acpi: add simple arm/virt testcase Date: Thu, 2 May 2019 16:24:20 +0200 [thread overview] Message-ID: <20190502162420.6c8280c8@Igors-MacBook-Pro> (raw) In-Reply-To: <b87a2b31-0389-2df0-42a6-a1593d437fcd@hisilicon.com> On Fri, 26 Apr 2019 17:28:10 +0100 Wei Xu <xuwei5@hisilicon.com> wrote: > Hi Igor, > > On 4/26/2019 12:54 PM, Igor Mammedov wrote: > > On Fri, 26 Apr 2019 00:51:56 +0800 > > x00249684 <xuwei5@huawei.com> wrote: > > > >> Hi Igor, > >> > >> +static void test_acpi_virt_tcg(void) > >> +{ > >> + test_data data = { > >> + .machine = "virt", > >> + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", > >> + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", > >> + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", > >> + .ram_start = 0x40000000ULL, > >> + .scan_len = 128ULL * 1024 * 1024, > >> + }; > >> + > >> + test_acpi_one("-cpu cortex-a57 ", &data); > >> > >> Replaced the cortex-a57 with host and succesfully tested on the hisilicon arm64 > >> D05 board. Otherwise it failed with "kvm_init_vcpu failed: Invalid argument". > >> Is it possilbe to set the cpu type like numa-test.c? > > > > I think it works with numa-test because it uses TCG only but in case of bios-tables-test > > it uses accel="kvm:tcg" to leverage KVM capabilities whenever possible to speed up test. > > > > Now back to our ARM test case, uefi requirement is to use 64bit CPU (hence it was cortex-a57) > > however unlike x86 it obviously breaks since KVM accelerator on ARM host is used > > and it doesn't work with anything other than 'host' cpu model. > > > > I think we still want to use KVM whenever possible, but problem lies in that > > user (testcase) doesn't have an idea if KVM accelerator is available and host is 64 CPU. > > > > to sum up we need to support 2 modes: > > 1. host is 64 ARM, use kvm with -cpu host > > 2. all other cases use tcg with -cpu cortex-a57 > > > > I can hack to probe if /dev/kvm is accessible and host is 64 bit and use #1 > > otherwise fallback to #2 > > or as quick fix do only #2 initially and think about a better solution to #1 > > Thanks! > Fine to me. > > > > > Is there any other suggestions/opinions how to approach issue/proceed. > > To check the host cpu architecture is ARM or not, maybe we can check the value > of "CPU implementer" is 0x41 or not from the /proc/cpuinfo. it turned out it's more complicated. we also should pick a correct GIC depending on host's CPU and that changes ACPI tables, so it will worn on some hosts and fail on other. I'll add a patch to enable test case to pick accelerator and force TCG for ARM tests for now. > > Best Regards, > Wei > > > > > PS: > > we probably would like to reuse this not only for acpi tests but also for other > > arm/virt test cases that involve running guest code. > > > >> Thanks! > >> > >> Best Regards, > >> Wei > > > > > > . > > >
WARNING: multiple messages have this Message-ID (diff)
From: Igor Mammedov <imammedo@redhat.com> To: Wei Xu <xuwei5@hisilicon.com> Cc: Peter Maydell <peter.maydell@linaro.org>, Andrew Jones <drjones@redhat.com>, mst@redhat.com, linuxarm@huawei.com, shameerali.kolothum.thodi@huawei.com, qemu-devel@nongnu.org, x00249684 <xuwei5@huawei.com> Subject: Re: [Qemu-devel] [PATCH v3 11/13] tests: acpi: add simple arm/virt testcase Date: Thu, 2 May 2019 16:24:20 +0200 [thread overview] Message-ID: <20190502162420.6c8280c8@Igors-MacBook-Pro> (raw) Message-ID: <20190502142420.pXFK3gQ_6qkAWpuNWnOQ1XPm7KUAYYZRWdy5PJCi05A@z> (raw) In-Reply-To: <b87a2b31-0389-2df0-42a6-a1593d437fcd@hisilicon.com> On Fri, 26 Apr 2019 17:28:10 +0100 Wei Xu <xuwei5@hisilicon.com> wrote: > Hi Igor, > > On 4/26/2019 12:54 PM, Igor Mammedov wrote: > > On Fri, 26 Apr 2019 00:51:56 +0800 > > x00249684 <xuwei5@huawei.com> wrote: > > > >> Hi Igor, > >> > >> +static void test_acpi_virt_tcg(void) > >> +{ > >> + test_data data = { > >> + .machine = "virt", > >> + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", > >> + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", > >> + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", > >> + .ram_start = 0x40000000ULL, > >> + .scan_len = 128ULL * 1024 * 1024, > >> + }; > >> + > >> + test_acpi_one("-cpu cortex-a57 ", &data); > >> > >> Replaced the cortex-a57 with host and succesfully tested on the hisilicon arm64 > >> D05 board. Otherwise it failed with "kvm_init_vcpu failed: Invalid argument". > >> Is it possilbe to set the cpu type like numa-test.c? > > > > I think it works with numa-test because it uses TCG only but in case of bios-tables-test > > it uses accel="kvm:tcg" to leverage KVM capabilities whenever possible to speed up test. > > > > Now back to our ARM test case, uefi requirement is to use 64bit CPU (hence it was cortex-a57) > > however unlike x86 it obviously breaks since KVM accelerator on ARM host is used > > and it doesn't work with anything other than 'host' cpu model. > > > > I think we still want to use KVM whenever possible, but problem lies in that > > user (testcase) doesn't have an idea if KVM accelerator is available and host is 64 CPU. > > > > to sum up we need to support 2 modes: > > 1. host is 64 ARM, use kvm with -cpu host > > 2. all other cases use tcg with -cpu cortex-a57 > > > > I can hack to probe if /dev/kvm is accessible and host is 64 bit and use #1 > > otherwise fallback to #2 > > or as quick fix do only #2 initially and think about a better solution to #1 > > Thanks! > Fine to me. > > > > > Is there any other suggestions/opinions how to approach issue/proceed. > > To check the host cpu architecture is ARM or not, maybe we can check the value > of "CPU implementer" is 0x41 or not from the /proc/cpuinfo. it turned out it's more complicated. we also should pick a correct GIC depending on host's CPU and that changes ACPI tables, so it will worn on some hosts and fail on other. I'll add a patch to enable test case to pick accelerator and force TCG for ARM tests for now. > > Best Regards, > Wei > > > > > PS: > > we probably would like to reuse this not only for acpi tests but also for other > > arm/virt test cases that involve running guest code. > > > >> Thanks! > >> > >> Best Regards, > >> Wei > > > > > > . > > >
next prev parent reply other threads:[~2019-05-02 14:24 UTC|newest] Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-25 5:34 [Qemu-devel] [PATCH v3 00/13] tests: acpi: add UEFI (ARM) testing support Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 01/13] tests: acpi: make RSDT test routine handle XSDT Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 7:22 ` Wei Yang 2019-04-25 7:22 ` Wei Yang 2019-04-25 8:07 ` Igor Mammedov 2019-04-25 8:07 ` Igor Mammedov 2019-04-25 8:23 ` Wei Yang 2019-04-25 8:23 ` Wei Yang 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 02/13] tests: acpi: rename acpi_parse_rsdp_table() into acpi_fetch_rsdp_table() Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 7:24 ` Wei Yang 2019-04-25 7:24 ` Wei Yang 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 03/13] tests: acpi: make pointer to RSDP 64bit Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 7:31 ` Wei Yang 2019-04-25 7:31 ` Wei Yang 2019-04-25 10:38 ` Igor Mammedov 2019-04-25 10:38 ` Igor Mammedov 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 04/13] tests: acpi: fetch X_DSDT if pointer to DSDT is 0 Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 7:44 ` Wei Yang 2019-04-25 7:44 ` Wei Yang 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 05/13] tests: acpi: skip FACS table if board uses hw reduced ACPI profile Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 7:48 ` Wei Yang 2019-04-25 7:48 ` Wei Yang 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 06/13] tests: acpi: move boot_sector_init() into x86 tests branch Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 07/13] tests: acpi: add acpi_find_rsdp_address_uefi() helper Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 8:00 ` Wei Yang 2019-04-25 8:00 ` Wei Yang 2019-04-25 10:56 ` Igor Mammedov 2019-04-25 10:56 ` Igor Mammedov 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 08/13] tests: acpi: add a way to start tests with UEFI firmware Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 8:08 ` Wei Yang 2019-04-25 8:08 ` Wei Yang 2019-04-25 11:19 ` Igor Mammedov 2019-04-25 11:19 ` Igor Mammedov 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 09/13] tests: acpi: ignore SMBIOS tests when UEFI firmware is used Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 12:37 ` Philippe Mathieu-Daudé 2019-04-25 12:37 ` Philippe Mathieu-Daudé 2019-04-25 13:28 ` Igor Mammedov 2019-04-25 13:28 ` Igor Mammedov 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 10/13] tests: add expected ACPI tables for arm/virt board Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 12:40 ` Philippe Mathieu-Daudé 2019-04-25 12:40 ` Philippe Mathieu-Daudé 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 11/13] tests: acpi: add simple arm/virt testcase Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 12:41 ` Philippe Mathieu-Daudé 2019-04-25 12:41 ` Philippe Mathieu-Daudé 2019-04-25 13:31 ` Igor Mammedov 2019-04-25 13:31 ` Igor Mammedov 2019-04-25 16:51 ` x00249684 2019-04-25 16:51 ` x00249684 2019-04-26 11:54 ` Igor Mammedov 2019-04-26 11:54 ` Igor Mammedov 2019-04-26 16:28 ` Wei Xu 2019-04-26 16:28 ` Wei Xu 2019-05-02 14:24 ` Igor Mammedov [this message] 2019-05-02 14:24 ` Igor Mammedov 2019-05-02 14:30 ` Wei Xu 2019-05-02 14:30 ` Wei Xu 2019-04-26 17:11 ` Laszlo Ersek 2019-04-26 17:11 ` Laszlo Ersek 2019-05-02 14:27 ` Igor Mammedov 2019-05-02 14:27 ` Igor Mammedov 2019-05-02 14:42 ` Laszlo Ersek 2019-05-02 14:42 ` Laszlo Ersek 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 12/13] tests: acpi: refactor rebuild-expected-aml.sh to dump ACPI tables for a specified list of targets Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 8:20 ` Wei Yang 2019-04-25 8:20 ` Wei Yang 2019-04-25 11:32 ` Igor Mammedov 2019-04-25 11:32 ` Igor Mammedov 2019-04-25 11:46 ` Igor Mammedov 2019-04-25 11:46 ` Igor Mammedov 2019-04-25 5:34 ` [Qemu-devel] [PATCH v3 13/13] tests: acpi: print error unable to dump ACPI table during rebuild Igor Mammedov 2019-04-25 5:34 ` Igor Mammedov 2019-04-25 8:22 ` Wei Yang 2019-04-25 8:22 ` Wei Yang 2019-04-25 11:26 ` Philippe Mathieu-Daudé 2019-04-25 11:26 ` Philippe Mathieu-Daudé
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=20190502162420.6c8280c8@Igors-MacBook-Pro \ --to=imammedo@redhat.com \ --cc=drjones@redhat.com \ --cc=linuxarm@huawei.com \ --cc=mst@redhat.com \ --cc=peter.maydell@linaro.org \ --cc=qemu-devel@nongnu.org \ --cc=shameerali.kolothum.thodi@huawei.com \ --cc=xuwei5@hisilicon.com \ --cc=xuwei5@huawei.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: linkBe 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).