From patchwork Wed Oct 21 15:03:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 55111 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9LF4PWq020996 for ; Wed, 21 Oct 2009 15:04:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753994AbZJUPDt (ORCPT ); Wed, 21 Oct 2009 11:03:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753993AbZJUPDt (ORCPT ); Wed, 21 Oct 2009 11:03:49 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53839 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753978AbZJUPDj (ORCPT ); Wed, 21 Oct 2009 11:03:39 -0400 Received: from relay2.suse.de (relay-ext.suse.de [195.135.221.8]) by mx2.suse.de (Postfix) with ESMTP id DC0448B013; Wed, 21 Oct 2009 17:03:39 +0200 (CEST) From: Alexander Graf To: kvm@vger.kernel.org Cc: Avi Kivity , kvm-ppc , Hollis Blanchard , Arnd Bergmann , Benjamin Herrenschmidt , Kevin Wolf , bphilips@suse.de, Marcelo Tosatti Subject: [PATCH 26/27] Use Little Endian for Dirty Bitmap Date: Wed, 21 Oct 2009 17:03:32 +0200 Message-Id: <1256137413-15256-27-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1256137413-15256-26-git-send-email-agraf@suse.de> References: <1256137413-15256-1-git-send-email-agraf@suse.de> <1256137413-15256-2-git-send-email-agraf@suse.de> <1256137413-15256-3-git-send-email-agraf@suse.de> <1256137413-15256-4-git-send-email-agraf@suse.de> <1256137413-15256-5-git-send-email-agraf@suse.de> <1256137413-15256-6-git-send-email-agraf@suse.de> <1256137413-15256-7-git-send-email-agraf@suse.de> <1256137413-15256-8-git-send-email-agraf@suse.de> <1256137413-15256-9-git-send-email-agraf@suse.de> <1256137413-15256-10-git-send-email-agraf@suse.de> <1256137413-15256-11-git-send-email-agraf@suse.de> <1256137413-15256-12-git-send-email-agraf@suse.de> <1256137413-15256-13-git-send-email-agraf@suse.de> <1256137413-15256-14-git-send-email-agraf@suse.de> <1256137413-15256-15-git-send-email-agraf@suse.de> <1256137413-15256-16-git-send-email-agraf@suse.de> <1256137413-15256-17-git-send-email-agraf@suse.de> <1256137413-15256-18-git-send-email-agraf@suse.de> <1256137413-15256-19-git-send-email-agraf@suse.de> <1256137413-15256-20-git-send-email-agraf@suse.de> <1256137413-15256-21-git-send-email-agraf@suse.de> <1256137413-15256-22-git-send-email-agraf@suse.de> <1256137413-15256-23-git-send-email-agraf@suse.de> <1256137413-15256-24-git-send-email-agraf@suse.de> <1256137413-15256-25-git-send-email-agraf@suse.de> <1256137413-15256-26-git-send-email-agraf@suse.de> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 54a272f..c565e5b 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -49,6 +49,7 @@ #include #include #include +#include #ifdef KVM_COALESCED_MMIO_PAGE_OFFSET #include "coalesced_mmio.h" @@ -1071,8 +1072,8 @@ void mark_page_dirty(struct kvm *kvm, gfn_t gfn) unsigned long rel_gfn = gfn - memslot->base_gfn; /* avoid RMW */ - if (!test_bit(rel_gfn, memslot->dirty_bitmap)) - set_bit(rel_gfn, memslot->dirty_bitmap); + if (!generic_test_le_bit(rel_gfn, memslot->dirty_bitmap)) + generic___set_le_bit(rel_gfn, memslot->dirty_bitmap); } }