From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= Subject: Re: [PATCH RFC 1/2] xen/pvh: take the p2m lock when doing logdirty ops from HVM domains Date: Wed, 15 Oct 2014 13:52:47 +0200 Message-ID: <543E600F.5@citrix.com> References: <1413370425-15015-1-git-send-email-roger.pau@citrix.com> <1413370425-15015-2-git-send-email-roger.pau@citrix.com> <543E5B20.1030505@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XeN8N-0007Ac-Gd for xen-devel@lists.xenproject.org; Wed, 15 Oct 2014 11:52:51 +0000 In-Reply-To: <543E5B20.1030505@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , xen-devel@lists.xenproject.org Cc: Tim Deegan , Jan Beulich List-Id: xen-devel@lists.xenproject.org El 15/10/14 a les 13.31, Andrew Cooper ha escrit: > On 15/10/14 11:53, Roger Pau Monne wrote: >> --- >> xen/arch/x86/mm/paging.c | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c >> index 6b788f7..5af6309 100644 >> --- a/xen/arch/x86/mm/paging.c >> +++ b/xen/arch/x86/mm/paging.c >> @@ -412,6 +412,8 @@ static int paging_log_dirty_op(struct domain *d, >> >> if ( !resuming ) >> domain_pause(d); >> + if (has_hvm_container_vcpu(current)) >> + p2m_lock(p2m_get_hostp2m(current->domain)); > > It appears as if there is some indentation issue here. Yes, an extra space. > Also, can you pull current into a struct vcpu *curr on the stack? We only use ->domain from current, would you prefer me to pull current->domain instead? Roger.