From patchwork Tue Jul 14 11:09:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Imbrenda X-Patchwork-Id: 11662315 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 592CB618 for ; Tue, 14 Jul 2020 11:09:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 487E922205 for ; Tue, 14 Jul 2020 11:09:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726431AbgGNLJ2 (ORCPT ); Tue, 14 Jul 2020 07:09:28 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:2432 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbgGNLJ2 (ORCPT ); Tue, 14 Jul 2020 07:09:28 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06EB2LPI158994; Tue, 14 Jul 2020 07:09:27 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3279k454tv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jul 2020 07:09:27 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06EB2TKJ161223; Tue, 14 Jul 2020 07:09:26 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 3279k454sr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jul 2020 07:09:26 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06EB4ZCH008919; Tue, 14 Jul 2020 11:09:23 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 327527u8p6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jul 2020 11:09:23 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06EB9L1549545344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jul 2020 11:09:21 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A3B4A405C; Tue, 14 Jul 2020 11:09:21 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1DB1A405B; Tue, 14 Jul 2020 11:09:20 +0000 (GMT) Received: from ibm-vm.ibmuc.com (unknown [9.145.7.230]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 14 Jul 2020 11:09:20 +0000 (GMT) From: Claudio Imbrenda To: kvm@vger.kernel.org, pbonzini@redhat.com Cc: frankja@linux.ibm.com, thuth@redhat.com, david@redhat.com, drjones@redhat.com, jmattson@google.com, sean.j.christopherson@intel.com Subject: [kvm-unit-tests PATCH v1 1/2] x86/cstart: Fix compilation issue in 32 bit mode Date: Tue, 14 Jul 2020 13:09:18 +0200 Message-Id: <20200714110919.50724-2-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200714110919.50724-1-imbrenda@linux.ibm.com> References: <20200714110919.50724-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-14_02:2020-07-14,2020-07-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 malwarescore=0 phishscore=0 adultscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007140081 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Fix a typo in x86/cstart.S so that 32bit code can be compiled again on x86. Fixes: d86ef58519645 ("cstart: do not assume CR4 starts as zero") Signed-off-by: Claudio Imbrenda --- x86/cstart.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x86/cstart.S b/x86/cstart.S index e63e4e2..c0efc5f 100644 --- a/x86/cstart.S +++ b/x86/cstart.S @@ -125,7 +125,7 @@ start: jmpl $8, $start32 prepare_32: - mov %(1 << 4), %eax // pse + mov $(1 << 4), %eax // pse mov %eax, %cr4 mov $pt, %eax From patchwork Tue Jul 14 11:09:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Imbrenda X-Patchwork-Id: 11662317 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D1AA13B4 for ; Tue, 14 Jul 2020 11:09:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CFBB221FC for ; Tue, 14 Jul 2020 11:09:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbgGNLJi (ORCPT ); Tue, 14 Jul 2020 07:09:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47108 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbgGNLJi (ORCPT ); Tue, 14 Jul 2020 07:09:38 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06EB3coS115686; Tue, 14 Jul 2020 07:09:35 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 327u1hg229-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jul 2020 07:09:33 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06EB43xY117778; Tue, 14 Jul 2020 07:09:29 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 327u1hg1yn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jul 2020 07:09:29 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06EB7KYE004504; Tue, 14 Jul 2020 11:09:24 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 3274pgu62b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jul 2020 11:09:24 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06EB9MLF66191718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jul 2020 11:09:22 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 13D51A405F; Tue, 14 Jul 2020 11:09:22 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8101BA4062; Tue, 14 Jul 2020 11:09:21 +0000 (GMT) Received: from ibm-vm.ibmuc.com (unknown [9.145.7.230]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 14 Jul 2020 11:09:21 +0000 (GMT) From: Claudio Imbrenda To: kvm@vger.kernel.org, pbonzini@redhat.com Cc: frankja@linux.ibm.com, thuth@redhat.com, david@redhat.com, drjones@redhat.com, jmattson@google.com, sean.j.christopherson@intel.com Subject: [kvm-unit-tests PATCH v1 2/2] lib/alloc_page: Fix compilation issue on 32bit archs Date: Tue, 14 Jul 2020 13:09:19 +0200 Message-Id: <20200714110919.50724-3-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200714110919.50724-1-imbrenda@linux.ibm.com> References: <20200714110919.50724-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-14_02:2020-07-14,2020-07-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 spamscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=926 suspectscore=2 phishscore=0 bulkscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007140085 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The assert in lib/alloc_page is hardcoded to long, and size_t is just an int on 32 bit architectures. Adding a cast makes the compiler happy. Fixes: 73f4b202beb39 ("lib/alloc_page: change some parameter types") Signed-off-by: Claudio Imbrenda --- lib/alloc_page.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/alloc_page.c b/lib/alloc_page.c index fa3c527..617b003 100644 --- a/lib/alloc_page.c +++ b/lib/alloc_page.c @@ -29,11 +29,12 @@ void free_pages(void *mem, size_t size) assert_msg((unsigned long) mem % PAGE_SIZE == 0, "mem not page aligned: %p", mem); - assert_msg(size % PAGE_SIZE == 0, "size not page aligned: %#lx", size); + assert_msg(size % PAGE_SIZE == 0, "size not page aligned: %#lx", + (unsigned long)size); assert_msg(size == 0 || (uintptr_t)mem == -size || (uintptr_t)mem + size > (uintptr_t)mem, - "mem + size overflow: %p + %#lx", mem, size); + "mem + size overflow: %p + %#lx", mem, (unsigned long)size); if (size == 0) { freelist = NULL;