From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBQjx-0008EI-D6 for qemu-devel@nongnu.org; Thu, 06 Feb 2014 10:19:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBQjn-0004ut-RF for qemu-devel@nongnu.org; Thu, 06 Feb 2014 10:19:45 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:53506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBQjn-0004um-IA for qemu-devel@nongnu.org; Thu, 06 Feb 2014 10:19:35 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Feb 2014 15:19:33 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 24AE517D8059 for ; Thu, 6 Feb 2014 15:19:54 +0000 (GMT) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s16FJIKm11010104 for ; Thu, 6 Feb 2014 15:19:18 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s16FJT88000725 for ; Thu, 6 Feb 2014 08:19:29 -0700 Message-ID: <52F3A801.2030405@de.ibm.com> Date: Thu, 06 Feb 2014 16:19:29 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <1390405693-15696-1-git-send-email-jjherne@us.ibm.com> In-Reply-To: <1390405693-15696-1-git-send-email-jjherne@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] s390: Storage key global access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jason J. Herne" , afaerber@suse.de, agraf@suse.de, qemu-devel@nongnu.org On 22/01/14 16:48, Jason J. Herne wrote: > From: "Jason J. Herne" > > Introduces global access to storage key data so we can set it for each cpu in > the S390 cpu initialization routine. > > Signed-off-by: Jason J. Herne > --- > hw/s390x/s390-virtio-ccw.c | 3 +-- > hw/s390x/s390-virtio.c | 6 +++--- > hw/s390x/s390-virtio.h | 2 +- > target-s390x/cpu.h | 3 +++ > 4 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index 733d988..62319b9 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -80,7 +80,6 @@ static void ccw_init(QEMUMachineInitArgs *args) > MemoryRegion *sysmem = get_system_memory(); > MemoryRegion *ram = g_new(MemoryRegion, 1); > int shift = 0; > - uint8_t *storage_keys; > int ret; > VirtualCssBus *css_bus; > > @@ -112,7 +111,7 @@ static void ccw_init(QEMUMachineInitArgs *args) > storage_keys = g_malloc0(my_ram_size / TARGET_PAGE_SIZE); > > /* init CPUs */ > - s390_init_cpus(args->cpu_model, storage_keys); > + s390_init_cpus(args->cpu_model); > > if (kvm_enabled()) { > kvm_s390_enable_css_support(s390_cpu_addr2state(0)); > diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c > index 7adf92a..804483f 100644 > --- a/hw/s390x/s390-virtio.c > +++ b/hw/s390x/s390-virtio.c > @@ -53,6 +53,7 @@ > > static VirtIOS390Bus *s390_bus; > static S390CPU **ipi_states; > +uint8_t *storage_keys; This would add another global variable. I am find with this right now but somewhen in the future we might want to take care of storage keys in regard to migration as well. Could we add a container-device/memory? We could make it a child of the machine then? Dont know if that will work out with migration, though. Christian