From nobody Mon Apr 29 01:34:49 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1558703815; cv=none; d=zoho.com; s=zohoarc; b=BvIQGh0DhU38FK3shgcQmuS++T7ODZu25iG8IV58z1xETOskYm527wIxWwME+U30BW0oPfKuLpQcyIRSWUvfUPI31K3rHkVweJxU+9UfHXH9GhFrO9j3B+ux0wrtZkfPVdXidFMFvV0kFK1rWUttWgFXVZfrFo6iID44Q8iF4KA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558703815; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=bXmRVzm3zKvYGJ0EEs38rSM4zMP/NC3XD/67Ui0j56M=; b=Gp1X/88KyPjQoYJsnNG9Y+0zCOyTT5+J4Vr1a+KPyULFFTevmzXkO5gWfqsrbNqT24tb98NDVxgaoPVtX8JkKQG6XmPbirJx7c1R0HyHnnjJiDsZmTauZzx8ewAU87SOhz3YBgHkLLAyrWMYp33lPPEsS6PrYbK6ZUxiyreH2js= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1558703815357334.07141649139203; Fri, 24 May 2019 06:16:55 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hUA2i-0006Wl-FY; Fri, 24 May 2019 13:15:28 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hUA2h-0006Wg-H5 for xen-devel@lists.xenproject.org; Fri, 24 May 2019 13:15:27 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id fe4064ca-7e25-11e9-8980-bc764e045a96; Fri, 24 May 2019 13:15:26 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0304FAD76; Fri, 24 May 2019 13:15:24 +0000 (UTC) X-Inumbo-ID: fe4064ca-7e25-11e9-8980-bc764e045a96 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Fri, 24 May 2019 15:15:22 +0200 Message-Id: <20190524131522.29170-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] xen/vm_event: fix rc check for uninitialized ring X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Tamas K Lengyel , Wei Liu , Razvan Cojocaru , George Dunlap , Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" vm_event_claim_slot() returns -EOPNOTSUPP for an uninitialized ring since commit 15e4dd5e866b43bbc ("common/vm_event: Initialize vm_event lists on domain creation"), but the callers test for -ENOSYS. Correct the callers. Signed-off-by: Juergen Gross Acked-by: Razvan Cojocaru --- xen/arch/x86/mm/p2m.c | 2 +- xen/common/monitor.c | 2 +- xen/common/vm_event.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 57c5eeda91..8a9a1153a8 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1705,7 +1705,7 @@ void p2m_mem_paging_populate(struct domain *d, unsign= ed long gfn_l) =20 /* We're paging. There should be a ring */ int rc =3D vm_event_claim_slot(d, d->vm_event_paging); - if ( rc =3D=3D -ENOSYS ) + if ( rc =3D=3D -EOPNOTSUPP ) { gdprintk(XENLOG_ERR, "Domain %hu paging gfn %lx yet no ring " "in place\n", d->domain_id, gfn_l); diff --git a/xen/common/monitor.c b/xen/common/monitor.c index cb5f37fdb2..d5c9ff1cbf 100644 --- a/xen/common/monitor.c +++ b/xen/common/monitor.c @@ -98,7 +98,7 @@ int monitor_traps(struct vcpu *v, bool sync, vm_event_req= uest_t *req) { case 0: break; - case -ENOSYS: + case -EOPNOTSUPP: /* * If there was no ring to handle the event, then * simply continue executing normally. diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c index 6e68be47bc..7b4ebced16 100644 --- a/xen/common/vm_event.c +++ b/xen/common/vm_event.c @@ -513,7 +513,7 @@ bool vm_event_check_ring(struct vm_event_domain *ved) * this function will always return 0 for a guest. For a non-guest, we ch= eck * for space and return -EBUSY if the ring is not available. * - * Return codes: -ENOSYS: the ring is not yet configured + * Return codes: -EOPNOTSUPP: the ring is not yet configured * -EBUSY: the ring is busy * 0: a spot has been reserved * --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel