[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] domain: expose newly introduced hypercalls as XENFEAT
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 16 Oct 2023 15:58:22 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q3JH9WksVCDGaqBLkvgh4IIwhsnATv3HsHCPEtxwWUM=; b=S29jCwuVBvmqeqVxbAq6cJDhCiqvGOXww3cRrHR/waaN/6ozgoSt8TlwFiUCuxlDUAXqiddTUJ1HIQfVgP5H+VSqZgyu0qp9HFC02LlQ2AH3tFpdYnYEbZLu/9R610Am3y4dSuxTpbU2C6DXT28z4e3hp3r5lab99Lnji+KrOK+a6Kgq8UvJFgcrD+Di3A+xh2pX7DOM97y0xgJflm4ACg6Z7g2ePI12K2gc1fGe463qzZ6kO5RTDAmOB8lqqh7QmaZQ2knM52mC9ponGa5Bl95MDZk7hfZxlgl+JuxxqJxGfCR692vyYM2zS/LpVpelIZh/FrpKBy7/rt6ErClyUA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=irwq8HTo/t0lJU6IEu0JtKWVXnqf2+aoOtldKP5M/rYEBvKC8qfx1NJ5ExsWZkqsovqTvZbBIegtCwj3um970Xcne7Y32Vd0iMlR+Qbdn+/rmV00dizutM/kWlT0JEDSwI7TWSMSZ2T7nvatcDwvlP+ZoAr0ijced4gAxKK4VdLQikmpcDjJBNnVJdnQK8sjUyg+GyaeSv2GtKRlqzxxhvMt2RidIjisFqXIBS12uY8FksQReTz6ryP8RRbOqtW9/HGMssQBDHcHVQSiArdZOgl2HE2FCcoHqDZtisxVW52MsjAJmKtrH92f3WNdUDVlminu8bB4PBT8y91PHisRFg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Henry Wang <Henry.Wang@xxxxxxx>, Community Manager <community.manager@xxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 16 Oct 2023 13:58:33 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16.10.2023 15:00, Roger Pau Monné wrote:
> On Mon, Oct 16, 2023 at 02:35:44PM +0200, Jan Beulich wrote:
>> On 06.10.2023 15:00, Roger Pau Monne wrote:
>>> --- a/xen/common/domain.c
>>> +++ b/xen/common/domain.c
>>> @@ -1998,6 +1998,10 @@ long common_vcpu_op(int cmd, struct vcpu *v,
>>> XEN_GUEST_HANDLE_PARAM(void) arg)
>>> {
>>> struct vcpu_register_runstate_memory_area area;
>>>
>>> + rc = -ENOSYS;
>>> + if ( 0 /* TODO: Dom's XENFEAT_runstate_phys_area setting */ )
>>> + break;
>>> +
>>> rc = -EFAULT;
>>> if ( copy_from_guest(&area.addr.p, arg, 1) )
>>> break;
>>
>> ENOSYS is not correct here. EPERM, EACCES, or EOPNOTSUPP would all be more
>> correct.
>
> I don't think so, common_vcpu_op() default case does return -ENOSYS,
> and the point of this path is to mimic the behavior of an hypervisor
> that doesn't have the hypercalls implemented, hence -ENOSYS is the
> correct behavior.
Besides that other ENOSYS being wrong too, I question such "mimic-ing".
Imo error codes should be the best representation of the real reason,
not be arbitrarily "made up".
Jan
|