From patchwork Thu Jun 9 15:57:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 866032 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p59Fw2rf011085 for ; Thu, 9 Jun 2011 15:58:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754282Ab1FIP5u (ORCPT ); Thu, 9 Jun 2011 11:57:50 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:43170 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754141Ab1FIP5s (ORCPT ); Thu, 9 Jun 2011 11:57:48 -0400 Received: by pzk9 with SMTP id 9so806206pzk.19 for ; Thu, 09 Jun 2011 08:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=wHOOW4E5Fhg5Uk+d51RC5egcWe0VOutxj3G2tp6E0Os=; b=xV+mUNN8oDle/OSTrJ1kY18qxSpnXpEJ+7pX0t0g/GlFA+wDHxYBX+KRu0g8KaK3cV wR6HLQIfr9PEWWGErOuEAUm2A8F5DJte0pgV+7QUAxT//7HKMwzjEn4/g95jXFnT2KZ9 Q++aOOn+UXwmdEcaAQHzzOGGgfaQXRiwmESr4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=NUdUwJtn0cT5g3fVRnZPLsfpSZs6/D+48Bz3d2k44S7L5VLnoVWSjTCBY6BigIO1fr 1WjMHrHtj7wFIQQuirkS9X8hk4kO1Ptqrr0XWqXjL/xeFplwzTOUHoR5ITDwThjfSX/c wiJbkLEFItXOEOhx2YBH2dLc3tgcd9aWH3O7Q= Received: by 10.68.41.67 with SMTP id d3mr428956pbl.103.1307635067980; Thu, 09 Jun 2011 08:57:47 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-184-88.ip51.fastwebnet.it [93.34.184.88]) by mx.google.com with ESMTPS id b8sm1503546pbj.78.2011.06.09.08.57.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Jun 2011 08:57:46 -0700 (PDT) Message-ID: <4DF0ED75.3040500@redhat.com> Date: Thu, 09 Jun 2011 17:57:41 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 MIME-Version: 1.0 To: Avi Kivity CC: Alexander Graf , KVM list , kvm-ppc@vger.kernel.org Subject: Re: [PATCH] KVM: Add compat ioctl for KVM_SET_SIGNAL_MASK References: <1307493937-7797-1-git-send-email-agraf@suse.de> <4DF0BB84.7090405@redhat.com> In-Reply-To: <4DF0BB84.7090405@redhat.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 09 Jun 2011 15:58:02 +0000 (UTC) On 06/09/2011 02:24 PM, Avi Kivity wrote: > On 06/08/2011 03:45 AM, Alexander Graf wrote: >> KVM has an ioctl to define which signal mask should be used while running >> inside VCPU_RUN. At least for big endian systems, this mask is different >> on 32-bit and 64-bit systems (though the size is identical). >> >> Add a compat wrapper that converts the mask to whatever the kernel >> accepts, >> allowing 32-bit kvm user space to set signal masks. >> >> This patch fixes qemu with --enable-io-thread on ppc64 hosts when running >> 32-bit user land. > > Applied, thanks. And here's the matching documentation change. Kunz-kunz, Alex. :) -------------------------- 8< ----------------------------- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 9 Jun 2011 17:48:50 +0200 Subject: [PATCH] KVM: fix documentation for KVM_SET_SIGNAL_MASK The signal mask passed to KVM_SET_SIGNAL_MASK needs to be ABI-compatible with sigprocmask, so that functions operating on sigset_t can be used with it. Referring to the signal mask as an array of bytes is incorrect on big endian systems, fix it. Signed-off-by: Paolo Bonzini --- Documentation/kvm/api.txt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 9bef4e4..ec15972 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt @@ -464,8 +464,8 @@ signal mask. /* for KVM_SET_SIGNAL_MASK */ struct kvm_signal_mask { - __u32 len; - __u8 sigset[0]; + __u32 len; + unsigned long sigset[0]; }; 4.22 KVM_GET_FPU