From patchwork Tue May 4 13:06:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuya Yoshikawa X-Patchwork-Id: 96763 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o44D6S0P004539 for ; Tue, 4 May 2010 13:06:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758766Ab0EDNGZ (ORCPT ); Tue, 4 May 2010 09:06:25 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:44809 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751791Ab0EDNGX (ORCPT ); Tue, 4 May 2010 09:06:23 -0400 Received: by pvg12 with SMTP id 12so108858pvg.19 for ; Tue, 04 May 2010 06:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=AOQtmymlm9xDlXeTOJiA6dRBpV04DTK1+Eg/Ma6oOf8=; b=Gj7V/VcMvuza8hdshk0uD1J70z4/zuBjBFkgGYTAcUgDIMa6plGanh+dLssWTxoDRN UYDKNM/06xLFewQ1rS/qbScETty4Qy80vO77KAfI2C38j2KY8YwkuocqySqLUQMMohNp FVbEqNeBDAaIKq1EoHHl+0l6NTbHE9KUpqKGc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=kXsLq/YU5Yp7iyNGcnoYjbOuD4eefQBv6MQ6xUVNsRst7vI025U+mjjOaZlqNZBjf3 RzUeQB+2eYcixBZWTetQHqErWaWMSO5epKDvXwG8jLp6W/4ez1LwL4cQl9U+e0bKOXBZ 5HYZqAbtMgTAv6ncDhN2o3oD3jFGJ4OZBqq1o= Received: by 10.141.13.5 with SMTP id q5mr4517766rvi.280.1272978382677; Tue, 04 May 2010 06:06:22 -0700 (PDT) Received: from stein (v079161.dynamic.ppp.asahi-net.or.jp [124.155.79.161]) by mx.google.com with ESMTPS id l29sm1911625rvb.16.2010.05.04.06.06.19 (version=SSLv3 cipher=RC4-MD5); Tue, 04 May 2010 06:06:22 -0700 (PDT) Date: Tue, 4 May 2010 22:06:20 +0900 From: Takuya Yoshikawa To: Takuya Yoshikawa Cc: avi@redhat.com, mtosatti@redhat.com, agraf@suse.de, yoshikawa.takuya@oss.ntt.co.jp, fernando@oss.ntt.co.jp, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-ia64@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@ozlabs.org, arnd@arndb.de, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH 9/12] KVM: introduce a wrapper function of set_bit_user_non_atomic() Message-Id: <20100504220620.97e90535.takuya.yoshikawa@gmail.com> In-Reply-To: <20100504215645.6448af8f.takuya.yoshikawa@gmail.com> References: <20100504215645.6448af8f.takuya.yoshikawa@gmail.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.0; i486-pc-linux-gnu) Mime-Version: 1.0 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.3 (demeter.kernel.org [140.211.167.41]); Tue, 04 May 2010 13:06:28 +0000 (UTC) diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index a362e67..938041b 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h @@ -589,6 +589,11 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu); int kvm_pal_emul(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run); void kvm_sal_emul(struct kvm_vcpu *vcpu); +static inline int kvm_set_bit_user(int nr, void __user *addr) +{ + return 0; +} + #endif /* __ASSEMBLY__*/ #endif diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 0c9ad86..9463524 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -26,6 +26,7 @@ #include #include #include +#include #define KVM_MAX_VCPUS 1 #define KVM_MEMORY_SLOTS 32 @@ -287,4 +288,9 @@ struct kvm_vcpu_arch { #endif }; +static inline int kvm_set_bit_user(int nr, void __user *addr) +{ + return set_bit_user_non_atomic(nr, addr); +} + #endif /* __POWERPC_KVM_HOST_H__ */ diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 27605b6..36710ee 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -238,4 +238,10 @@ struct kvm_arch{ }; extern int sie64a(struct kvm_s390_sie_block *, unsigned long *); + +static inline int kvm_set_bit_user(int nr, void __user *addr) +{ + return 0; +} + #endif diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 3f0007b..9e22df9 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -795,4 +795,9 @@ void kvm_set_shared_msr(unsigned index, u64 val, u64 mask); bool kvm_is_linear_rip(struct kvm_vcpu *vcpu, unsigned long linear_rip); +static inline int kvm_set_bit_user(int nr, void __user *addr) +{ + return set_bit_user_non_atomic(nr, addr); +} + #endif /* _ASM_X86_KVM_HOST_H */