From nobody Mon Nov 25 01:25:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719500118; cv=none; d=zohomail.com; s=zohoarc; b=DUvZHFOVYRIEKDs/8vBBvKyw9S9WC1fRVfDpYPmXV5HYjiboSb9Sy4RX/RAFwT83/HcGvU/zp3e3LOFdY/pPcOaT6t7w1FPQOrBl8CnPdB4TBAVz/9+kMkOQiVzkd3TLv+J6unT+E667CcRVHTmRwh2e236zm4Jf4UqMqxxQLRg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719500118; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ndsw8fOyaChmgjQGUrWjnxxCLs4JQPIUld82Y9cUCkQ=; b=TWRBz9CQmNamNgVVfAD2yitRxs9fQSj+rQmlEGoBs86qeZYGIirZ2J4xXgfeeQuY4vPoOXwtRPttBEHBif+8sRo4JeqrSuhAs5HAaCOzVg0HHq+7hkyrR5mOIDgfqC/lf5HuuwiwdL9vVF2RhPmYtMaoWmoBbcrju8wXIcq1sQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719500118401805.3830434422824; Thu, 27 Jun 2024 07:55:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMqW0-0007vX-8o; Thu, 27 Jun 2024 10:54:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMqVw-0007uf-R3 for qemu-devel@nongnu.org; Thu, 27 Jun 2024 10:54:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMqVu-0007IY-Jm for qemu-devel@nongnu.org; Thu, 27 Jun 2024 10:54:20 -0400 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-257-Haj_ZnLkNAiv8JWxVQAnuQ-1; Thu, 27 Jun 2024 10:54:16 -0400 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a7253454b3fso269614666b.1 for ; Thu, 27 Jun 2024 07:54:15 -0700 (PDT) Received: from avogadro.local ([151.48.235.205]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a729d77987bsm66000866b.122.2024.06.27.07.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 07:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719500057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ndsw8fOyaChmgjQGUrWjnxxCLs4JQPIUld82Y9cUCkQ=; b=HyOOzcHJPvx0tPL+ccqPgQGJJ6ohH2oKBYjQYYpb9t712Ws8AJDnf1KhFcx8VGu3qfdwtM 7Tw6zhEouMDhzbWfaHqAlGhROXLLSS/mozkpbOCt5m8ar8sXXar4DMiL2n2zUXPQfr9TrF hPi+2O7lHbxvLnp5rGtNTu4TmRb+Np8= X-MC-Unique: Haj_ZnLkNAiv8JWxVQAnuQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719500054; x=1720104854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ndsw8fOyaChmgjQGUrWjnxxCLs4JQPIUld82Y9cUCkQ=; b=AAkKKcYYb7gb0cwwItv+k+5lSom7quVqE6fTNwwMtY+DPKBlH/ZLOnb1vzEmGYKR/2 RBH+E/MrX+ld6zVia/CgAielZKsqDH//Va+E40CybQhcp+jKJ4JStu3p58cNRmfsmSkp Lq51G3kt9zU3L+WI4RNi+vcgy1GySPb8pdwoxpmYAuRSC6wMhT7pVRmAaBg5W8Rvm+CG WgRwBeyi0VxKizdQX7pAc6p5Uf2iXLlYlJ8RXy1ib830I6QcvINeZ5ehAiJeKBDnb7aM X7N+C49FKsWpgeXEhltRX9WcuDKHHJUd9QMWIcN89WvcJIg2WNGrOYF6JeMQ2Qvh0sed j9Yg== X-Gm-Message-State: AOJu0Yz3OiZS1olB+dWUePfroIafnQjF2uJMn4gYIPVwBCyj7Li2gswt zo3WC/1O+RXZ5cFEEBUqP/W0bz2hQXdJljN3ZsL8UnFtaBiavqqmMt891WTLicHlgZ0aWj8+rjA QEOglH93FwlIRFhtKyIpewA3pYYiDzcddq3F8nRZiyLEK0heMNG+LOEoAXvn+ox/zdtdZ9/tuzH 4cLoD3s8pRE4HQ79F5Yn2JDJyKqPefNW9vsuw6 X-Received: by 2002:a17:906:ae92:b0:a72:6416:5ccc with SMTP id a640c23a62f3a-a7264165fb5mr603267466b.58.1719500054270; Thu, 27 Jun 2024 07:54:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAG2ibHYkrlelUzyugOBvvt8aeJvYofzbd5oiSk/9XTkw4qPz3/Wc3lWlVgW1Gls49VkYBOA== X-Received: by 2002:a17:906:ae92:b0:a72:6416:5ccc with SMTP id a640c23a62f3a-a7264165fb5mr603266166b.58.1719500053941; Thu, 27 Jun 2024 07:54:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: berrange@redhat.com, alex.bennee@linaro.org Subject: [PATCH 5/5] target/i386: SEV: fix format strings for 32-bit hosts Date: Thu, 27 Jun 2024 16:53:57 +0200 Message-ID: <20240627145357.1038664-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240627145357.1038664-1-pbonzini@redhat.com> References: <20240627145357.1038664-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.212, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719500119600100005 Content-Type: text/plain; charset="utf-8" Use PRIx64 for uint64_t and %zu for size_t/gsize. Signed-off-by: Paolo Bonzini --- target/i386/sev.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 28d6bd3adfa..77ff908ab17 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -886,7 +886,7 @@ sev_snp_launch_update(SevSnpGuestState *sev_snp_guest, =20 if (!data->hva || !data->len) { error_report("SNP_LAUNCH_UPDATE called with invalid address" - "/ length: %p / %lx", + "/ length: %p / %" PRIx64, data->hva, data->len); return 1; } @@ -934,8 +934,8 @@ sev_snp_launch_update(SevSnpGuestState *sev_snp_guest, =20 out: if (!ret && update.gfn_start << TARGET_PAGE_BITS !=3D data->gpa + data= ->len) { - error_report("SEV-SNP: expected update of GPA range %lx-%lx," - "got GPA range %lx-%llx", + error_report("SEV-SNP: expected update of GPA range %" PRIx64 "-%"= PRIx64 "," + "got GPA range %" PRIx64 "-%llx", data->gpa, data->gpa + data->len, data->gpa, update.gfn_start << TARGET_PAGE_BITS); ret =3D -EIO; @@ -2148,7 +2148,7 @@ sev_snp_guest_set_guest_visible_workarounds(Object *o= bj, const char *value, } =20 if (len !=3D sizeof(start->gosvw)) { - error_setg(errp, "parameter length of %lu exceeds max of %lu", + error_setg(errp, "parameter length of %zu exceeds max of %zu", len, sizeof(start->gosvw)); return; } @@ -2185,7 +2185,7 @@ sev_snp_guest_set_id_block(Object *obj, const char *v= alue, Error **errp) } =20 if (len !=3D KVM_SEV_SNP_ID_BLOCK_SIZE) { - error_setg(errp, "parameter length of %lu not equal to %u", + error_setg(errp, "parameter length of %zu not equal to %u", len, KVM_SEV_SNP_ID_BLOCK_SIZE); return; } @@ -2223,7 +2223,7 @@ sev_snp_guest_set_id_auth(Object *obj, const char *va= lue, Error **errp) } =20 if (len > KVM_SEV_SNP_ID_AUTH_SIZE) { - error_setg(errp, "parameter length:ID_AUTH %lu exceeds max of %u", + error_setg(errp, "parameter length:ID_AUTH %zu exceeds max of %u", len, KVM_SEV_SNP_ID_AUTH_SIZE); return; } @@ -2291,7 +2291,7 @@ sev_snp_guest_set_host_data(Object *obj, const char *= value, Error **errp) } =20 if (len !=3D sizeof(finish->host_data)) { - error_setg(errp, "parameter length of %lu not equal to %lu", + error_setg(errp, "parameter length of %zu not equal to %zu", len, sizeof(finish->host_data)); return; } --=20 2.45.2