From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [Patch v2 6/9] iommu/amd: Add functions copy_command_buffer/copy_event_buffer Date: Fri, 27 Nov 2015 12:24:46 +0100 Message-ID: <20151127112446.GE24300@8bytes.org> References: <1446811851-20623-1-git-send-email-bhe@redhat.com> <1446811851-20623-7-git-send-email-bhe@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1446811851-20623-7-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Baoquan He Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Fri, Nov 06, 2015 at 08:10:48PM +0800, Baoquan He wrote: > > +static void copy_command_buffer(void) > + > +static void copy_event_buffer(void) > +{ There is no need to copy any of these buffers. For the command buffer you just need to safely reinialize the hardware to use your newly allocated buffer. Same for the event buffer. But here it makes sense to actually check the old event buffer for content and print out the errors the old kernel didn't get a chance to handle before the crash. Joerg