From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcDVv-0000hK-2a for qemu-devel@nongnu.org; Tue, 23 Aug 2016 11:21:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcDVt-0000X6-1c for qemu-devel@nongnu.org; Tue, 23 Aug 2016 11:21:18 -0400 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]:34376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcDVs-0000Wz-SO for qemu-devel@nongnu.org; Tue, 23 Aug 2016 11:21:16 -0400 Received: by mail-it0-x241.google.com with SMTP id e63so8368275ith.1 for ; Tue, 23 Aug 2016 08:21:16 -0700 (PDT) MIME-Version: 1.0 Sender: namhyung@gmail.com In-Reply-To: <1471947901-3951-1-git-send-email-agnel.joel@gmail.com> References: <20160820080744.10344-1-namhyung@kernel.org> <1471947901-3951-1-git-send-email-agnel.joel@gmail.com> From: Namhyung Kim Date: Wed, 24 Aug 2016 00:20:55 +0900 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v3) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Joel Fernandes Cc: "linux-kernel@vger.kernel.org" , qemu-devel , Kees Cook Hi Joel, On Tue, Aug 23, 2016 at 7:25 PM, Joel Fernandes wrote: > From: Namhyung Kim > >> Hello, >> >> This is another iteration of the virtio-pstore work. In this patchset >> I addressed most of feedbacks from previous version and drooped the >> support for PSTORE_TYPE_CONSOLE for simplicity. It'll be added once the basic > > Hi Namhyung, > > This looks like a useful pstore backend. Great work. Thanks! > > BTW, Have you considered using -mem-path in Qemu for this purpose? > I was thinking about using this, and then somehow have kernel reserve > a part of physical memory for the pstore. Then after the crash, or > whenever you want to read the contents of the pstore on the host, you > could just extract that part of the mem-path file. I wasn't aware of the -mem-path option and it seems that the existing ramoops pstore backend can take care of it. > > Any thoughts on what you think about it? In your approach though, you > wouldn't need a backing mem-path file which is the size of the guest > RAM (which could be as big as the mem-path file). I wonder if the > mem-path file can be created sparse, and/or Qemu has support to > configure a certain part of guest RAM as file-backed memory and the > rest of it from Anonymous memory (not backed by mem-path) so that > the size of the mem-path file can be kept at a minimum. The pstore (ramoops) requires the region of the memory is preserved across reboot. Is it possible when -mem-path is used? I think it's better to use a separate region/file for pstore rather than being a part of guest RAM or as you said, it'd be great if qemu supported such a hybrid mem-path. Also my approach can handle streams of data bigger than the pstore buffer size. Although we can extract the contents of mem-path file periodically, it might be hard for externel process to know the right time to extract and there's a possibility of information loss IMHO. Thanks, Namhyung