From: "Jan Beulich" Subject: Re: [PATCH] x86/AMD: Apply workaround for AMD F16h Erratum792 Date: Thu, 06 Feb 2014 10:15:51 +0000 Message-ID: <52F36EE70200007800119B13@nat28.tlf.novell.com> References: <1391633972-4433-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <52F2A512.30304@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52F2A512.30304@citrix.com> Content-Disposition: inline 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 Cc: keir@xen.org, Aravind Gopalakrishnan , suravee.suthikulpanit@amd.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 05.02.14 at 21:54, Andrew Cooper wrote: > On 05/02/2014 20:59, Aravind Gopalakrishnan wrote: >> + if (smp_processor_id() == 0) { >> + pci_val = pci_conf_read32(0, 0, 0x18, 0x3, 0x58); >> + if (pci_val & 0x1f) { >> + pci_val &= ~(0x1f); > > 0x1f is by default an int, so you use a u suffix to make it u32 to use > as a mask. This seems pretty pointless a request - conversion from signed to unsigned types is well defined, even more so when the converted value is representable by both. Jan