From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0tey-0006vy-19 for qemu-devel@nongnu.org; Thu, 22 Oct 2009 05:08:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0tet-0006vE-65 for qemu-devel@nongnu.org; Thu, 22 Oct 2009 05:08:39 -0400 Received: from [199.232.76.173] (port=41507 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0tet-0006vB-1D for qemu-devel@nongnu.org; Thu, 22 Oct 2009 05:08:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22331) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0tes-0006Xu-IZ for qemu-devel@nongnu.org; Thu, 22 Oct 2009 05:08:34 -0400 Message-ID: <4AE0210D.9020409@redhat.com> Date: Thu, 22 Oct 2009 11:08:29 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1255963059-10298-1-git-send-email-agraf@suse.de> <4ADDE7E3.9090601@de.ibm.com> In-Reply-To: <4ADDE7E3.9090601@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/9] S390x KVM support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Carsten Otte Cc: Carsten Otte , KVM list , Alexander Graf , qemu-devel , hare@suse.de 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