From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgBS4-0000GB-4y for qemu-devel@nongnu.org; Thu, 09 Apr 2015 08:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgBS0-0003ut-5h for qemu-devel@nongnu.org; Thu, 09 Apr 2015 08:20:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgBRz-0003uc-Ub for qemu-devel@nongnu.org; Thu, 09 Apr 2015 08:20:52 -0400 From: Paolo Bonzini Date: Thu, 9 Apr 2015 14:20:40 +0200 Message-Id: <1428582043-19080-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: edgar.iglesias@gmail.com, peter.crosthwaite@xilinx.com, lersek@redhat.com, kraxel@redhat.com, peter.maydell@linaro.org This is an example of usage of attributes in a device model. It lets you block flash writes unless the CPU is in secure mode. Enabling it currently requires a -readconfig file: [global] driver = "cfi.pflash01" property = "secure" value = "on" because the driver includes a "."; however, I plan to enable this through the command line for the final version of the patches. In the meanwhile, a review of the approach and of the actual memattrs bit would be great. Paolo Paolo Bonzini (3): pflash_cfi01: change big-endian property to BIT type pflash_cfi01: change to new-style MMIO accessors pflash_cfi01: add secure property hw/block/pflash_cfi01.c | 115 ++++++++++++------------------------------------ 1 file changed, 28 insertions(+), 87 deletions(-) -- 2.3.5