From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/9] S390x KVM support Date: Thu, 22 Oct 2009 11:08:29 +0200 Message-ID: <4AE0210D.9020409@redhat.com> References: <1255963059-10298-1-git-send-email-agraf@suse.de> <4ADDE7E3.9090601@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Graf , qemu-devel , uli@suse.de, Carsten Otte , hare@suse.de, KVM list To: Carsten Otte Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37643 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612AbZJVJIc (ORCPT ); Thu, 22 Oct 2009 05:08:32 -0400 In-Reply-To: <4ADDE7E3.9090601@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/20/2009 06:40 PM, Carsten Otte wrote: > > This patch moves s390 processor status word into the base kvm_run > struct and keeps it up-to date on all userspace exits. > > +#include > #include > #include > #include Not needed. > @@ -116,6 +117,11 @@ > __u64 cr8; > __u64 apic_base; > > +#ifdef CONFIG_S390 > + /* the processor status word for s390 */ > + __u64 psw_mask; /* psw upper half */ > + __u64 psw_addr; /* psw lower half */ > +#endif Doesn't this break backward compatibility by changing the structure? Best to put it after the union (and as a copy, so userspace that expects the previous location still works). If you're reading it from the kernel, also need a way to tell the kernel which copy to read from. Also advertise with a KVM_CAP. Additionally, CONFIG_ in public headers are frowned upon as non-portable. A workaround is to #define __KVM_S390 in and depend on that. > --- kvm.orig/arch/s390/kvm/kvm-s390.c 2009-10-20 15:01:02.000000000 > +0200 > +++ kvm/arch/s390/kvm/kvm-s390.c 2009-10-20 18:13:45.000000000 +0200 > @@ -421,7 +421,8 @@ > if (atomic_read(&vcpu->arch.sie_block->cpuflags) & CPUSTAT_RUNNING) > rc = -EBUSY; > else > - vcpu->arch.sie_block->gpsw = psw; > + vcpu->run->psw_mask = psw.mask; > + vcpu->run->psw_addr = psw.addr; It's traditional to add braces around multi-line else blocks. I'd also appreciate an explanation of what this is all about. -- error compiling committee.c: too many arguments to function