From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.128.65; helo=mail-wm1-f65.google.com; envelope-from=philmd@redhat.com; receiver=edk2-devel@lists.01.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AFD0F21193587 for ; Mon, 26 Nov 2018 13:43:25 -0800 (PST) Received: by mail-wm1-f65.google.com with SMTP id s11so20175092wmh.1 for ; Mon, 26 Nov 2018 13:43:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UPRO6hVkrq27ZoLMSVUYvi2hZFjkG7ho7d04d9K4se4=; b=rE7Eq9V+R1//pNW83RgmoQrArkajs4K+t4kkIzCouh93RrcA/UtDUVe776jrMa6udt n2Z/vvzH5r8HhQa3KAwg1WeZQtFwWk/dm3ggaWgjPkBtG/+5dAsBqUywtkMUp0Qaj4AI a6t2TlhBG0tsHOPmgC4q21tAOkQ88kkWpVEtXauicqeeZc9BWUOZHYBHeECAH71R+Wr7 op3yUPApcKfsokXuOV2ezLZ73ZUjp0e6wOm+piTzEbU/q0AndBdv6/NbJ7Gx9MS2Nh4k Bkb3WDvs4sXVhlMlxEvVvH+V3SrybKm4hHBqLEHFOjoONoWRM65BXU1qtYAiqv1hDlgN I/DQ== X-Gm-Message-State: AA+aEWZRLvAvyoT8BakFp9NV22fzKsU6Xa0gG4sNUz6kLImWznfa9Lya yLeuuRaagDl7ttu+KTUG66+YR69fkRA= X-Google-Smtp-Source: AFSGD/VKVk862ISkmU8bu4+FUtYManI0oZ8Lfdu47I7PZR2JIlCb65fj6HFmn/G9S8/Yv17MXU+xPA== X-Received: by 2002:a1c:35c5:: with SMTP id c188mr13584766wma.134.1543268604502; Mon, 26 Nov 2018 13:43:24 -0800 (PST) Received: from ?IPv6:2a01:e35:8a1f:dc10:bc9e:f614:2d6b:7cc9? ([2a01:e35:8a1f:dc10:bc9e:f614:2d6b:7cc9]) by smtp.gmail.com with ESMTPSA id y185sm962546wmg.34.2018.11.26.13.43.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 13:43:23 -0800 (PST) To: Laszlo Ersek , edk2-devel@lists.01.org Cc: Anthony Perard , Ard Biesheuvel , Drew Jones , Igor Mammedov , Jordan Justen , Julien Grall References: <20181125100152.25675-1-lersek@redhat.com> <20181125100152.25675-2-lersek@redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <8dcb0e57-cfde-8eea-938d-753320d0c031@redhat.com> Date: Mon, 26 Nov 2018 22:43:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181125100152.25675-2-lersek@redhat.com> Subject: Re: [PATCH 1/4] OvmfPkg: introduce ACPI Test Support data structure and GUID X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 21:43:27 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Laszlo, On 25/11/18 11:01, Laszlo Ersek wrote: > QEMU's test suite includes a set of cases called "BIOS tables test". Among > other things, it locates the RSD PTR ACPI table in guest RAM, and then > (chasing pointers to other ACPI tables) performs various sanity checks on > the QEMU-generated and firmware-installed tables. > > Currently this set of test cases doesn't work with UEFI guests, because > the ACPI spec's definition for locating the RSD PTR in UEFI guests is a > lot harder to implement from the hypervisor side -- just with raw guest > memory access -- than it is when scraping the memory of BIOS guests. > > Introduce a signature GUID, and a small, MB-aligned structure, identified > by the GUID. The hypervisor should loop over all MB-aligned pages in guest > RAM until one matches the signature GUID at offset 0, at which point the > hypervisor can fetch the RSDP address field(s) from the structure. > > QEMU's test logic currently spins on a pre-determined guest address, until > that address assumes a magic value. The method described in this patch is > conceptually the same ("busy loop until match is found"), except there is > no hard-coded address. This plays a lot more nicely with UEFI guest > firmware (we'll be able to use the normal page allocation UEFI service). > Given the size of EFI_GUID (16 bytes -- 128 bits), mismatches should be > astronomically unlikely. In addition, given the typical guest RAM size for > such tests (128 MB), there are 128 locations to check in one iteration of > the "outer" loop, which shouldn't introduce an intolerable delay after the > guest stores the RSDP address(es), and then the GUID. I applied/build your series, but keep failing trying to test it with QEMU :/ I modified a bit tests/bios-tables-test.c to use the OVMF.fd build for the Q35 machine tests, but still pass the "OnRootBridgesConnected: root bridges have been connected, installing ACPI tables". Do you have a QEMU companion patch for this series? > > The GUID that the hypervisor should search for is > > AB87A6B1-2034-BDA0-71BD-375007757785 > > Expressed as a byte array: > > { > 0xb1, 0xa6, 0x87, 0xab, > 0x34, 0x20, > 0xa0, 0xbd, > 0x71, 0xbd, 0x37, 0x50, 0x07, 0x75, 0x77, 0x85 > }