From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cepMG-0006a0-GL for qemu-devel@nongnu.org; Fri, 17 Feb 2017 15:42:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cepMD-0006O1-T0 for qemu-devel@nongnu.org; Fri, 17 Feb 2017 15:42:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35270) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cepMD-0006Nl-Kg for qemu-devel@nongnu.org; Fri, 17 Feb 2017 15:42:21 -0500 References: <88232638f9ff3b17b54987624468678ea14a3037.1487286467.git.ben@skyportsystems.com> <20170217114321.6c8577e1@nial.brq.redhat.com> <4F60B53E-1A5D-4D4C-954F-F1C3ED5B487C@skyportsystems.com> <9B914CBD-40ED-46CF-9420-E7BB13EB6D1B@skyportsystems.com> From: Laszlo Ersek Message-ID: <702669a7-7c67-5f04-db8c-f5aba7d98d11@redhat.com> Date: Fri, 17 Feb 2017 21:42:18 +0100 MIME-Version: 1.0 In-Reply-To: <9B914CBD-40ED-46CF-9420-E7BB13EB6D1B@skyportsystems.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ben Warren Cc: Igor Mammedov , qemu-devel@nongnu.org, mst@redhat.com On 02/17/17 19:34, Ben Warren wrote: >=20 >> On Feb 17, 2017, at 8:03 AM, Laszlo Ersek > > wrote: >> >> On 02/17/17 16:33, Ben Warren wrote: >>> >>>> On Feb 17, 2017, at 2:43 AM, Igor Mammedov >>> >>>> > wrote: >>>> >>>> On Thu, 16 Feb 2017 15:15:36 -0800 >>>> ben@skyportsystems.com >>>> wrot= e: >>>> >>>>> From: Ben Warren >>>> > >>>>> >>>>> This implements the VM Generation ID feature by passing a 128-bit >>>>> GUID to the guest via a fw_cfg blob. >>>>> Any time the GUID changes, an ACPI notify event is sent to the gues= t >>>>> >>>>> The user interface is a simple device with one parameter: >>>>> - guid (string, must be "auto" or in UUID format >>>>> xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) >>>> I've given it some testing with WS2012R2 and v4 patches for Seabios, >>>> >>>> Windows is able to read initial GUID allocation and writeback >>>> seems to work somehow: >>>> >>>> (qemu) info vm-generation-id >>>> c109c09b-0e8b-42d5-9b33-8409c9dcd16c >>>> >>>> vmgenid client in Windows reads it as 2 following 64bit integers: >>>> 42d50e8bc109c09b:6cd1dcc90984339b >>>> >>>> However update path/restore from snapshot doesn't >>>> here is as I've tested it: >>>> >>>> qemu-system-x86_64 -device vmgenid,id=3Dtestvgid,guid=3Dauto -monito= r stdio >>>> (qemu) info vm-generation-id >>>> c109c09b-0e8b-42d5-9b33-8409c9dcd16c >>>> (qemu) stop >>>> (qemu) migrate "exec:gzip -c > STATEFILE.gz" >>>> (qemu) quit >>>> >>>> qemu-system-x86_64 -device vmgenid,id=3Dtestvgid,guid=3Dauto -monito= r stdio >>>> -incoming "exec: gzip -c -d STATEFILE.gz" >>>> (qemu) info vm-generation-id >>>> 28b587fa-991b-4267-80d7-9cf28b746fe9 >>>> >>>> guest >>>> 1. doesn't get GPE notification that it must receive >>>> 2. vmgenid client in Windows reads the same value >>>> 42d50e8bc109c09b:6cd1dcc90984339b >>>> >>> Strange, this was working for me, but with a slightly different test >>> method: >>> >>> * I use virsh save/restore >> >> Awesome, this actually what I should try. All my guests are managed by >> libvirt (with the occasional , for development), and direct >> QEMU monitor commands such as >> >> virsh qemu-monitor-command ovmf.rhel7 --hmp 'info vm-generation-id' >> >> only work for me if they are reasonably non-intrusive. >> >>> * While I do later testing with Windows, during development I use a >>> Linux kernel module I wrote that keeps track of GUID and >>> notifications. I=E2=80=99m happy to share this with you if intere= sted. >> >> Please do. If you have a public git repo somewhere, that would be >> awesome. (Bonus points if the module builds out-of-tree, if the >> kernel-devel package is installed.) >> > Here you go: > https://github.com/ben-skyportsystems/vmgenid-test Ah, thanks -- I apologize, I stopped refreshing my incoming email while I was testing and writing up the results. I'll stash this for later thoug= h. Thanks! Laszlo > I don=E2=80=99t know if something like this would ever be accepted into= the > Linux kernel, but it has been invaluable to me, and I=E2=80=99d like to= see it > somewhere better. >=20 >> NB: while the set-id monitor command was part of the series, I did tes= t >> it to the extent that I checked the SCI ("ACPI interrupt") count in th= e >> guest, in /proc/interrupts. I did see it increase, so minimally the SC= I >> injection was fine. >> >> Thanks! >> Laszlo >> >>> I=E2=80=99ll dig into this morning. >>> >>> =E2=80=94Ben >>> >=20