[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 Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 16 Oct 2023 14:35:44 +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=yS7xizA2dbSBOpRHubJVA2Plwu/kvzCbYjhbSqt4PMU=; b=TcLOGMj48HgbFXwjc7FxVpDeEeayi0eoo5WOMTTH9HOkXEkB72BK4Co4SEL+Ys8vS5/QFKXMY6+MF4m2sOfTKrUHy5C8LHuXSJ8vIVFq2nEkWnWLELz7fPsSep6BGe30NG4yFazknTmFPICnFM6+oK6C25MHs9oMQD/DeUNHiug7c5BPsNQmza6O3xSj2zVZPOTPNYhQ4nPF/VxwGTFat60hVS7BS3shycg4zhAcu/zPcMx2D4QYNver5d/KD2IoRvC4TcTfMFiwXfhmQxKtpE0g7KJyHMallxgC3WpgaL8IfCluAp1EmoAXpkUDUfdse6zBmrWIlNVvNJGjlyAdsQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nByIPNJ27kR9BtSw6+6jV9148FL6UE/4w3pQQBghtO5qaEmPUBeE1lXUl+xha8TMSiChE0fBAxYpcxyESLBTB/V15vpZGvODISSM/wY4ww+xlsRo57E2QYbVnywy2APP1JBmack2KRZ1J5l5MctzUzjwPgeupBEKdkoh8yZGxV3k6XrXwd/1QVGNp/NuN0V33pi0APx/dzOqYC0ovTSGVqdlRa5dKZ4DnNefup6oMfZ6C5onPhAsibIIJct7JFBCi0oLgjWZNMPC/j85mJ7hmXWM6lCHoPkbdQSmglcDeW99+0D56VjIf8dP189c9Wrp91r2FlxSAlkgxk7xuhe4bQ==
  • 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 12:36:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.10.2023 15:00, Roger Pau Monne wrote:
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -1580,6 +1580,10 @@ long do_vcpu_op(int cmd, unsigned int vcpuid, 
> XEN_GUEST_HANDLE_PARAM(void) arg)
>      {
>          struct vcpu_register_time_memory_area area;
>  
> +        rc = -ENOSYS;
> +        if ( 0 /* TODO: Dom's XENFEAT_vcpu_time_phys_area setting */ )
> +            break;
> +
>          rc = -EFAULT;
>          if ( copy_from_guest(&area.addr.p, arg, 1) )
>              break;
> --- 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.

> --- a/xen/common/kernel.c
> +++ b/xen/common/kernel.c
> @@ -607,7 +607,11 @@ long do_xen_version(int cmd, 
> XEN_GUEST_HANDLE_PARAM(void) arg)
>          switch ( fi.submap_idx )
>          {
>          case 0:
> -            fi.submap = (1U << XENFEAT_memory_op_vnode_supported);
> +            fi.submap = (1U << XENFEAT_memory_op_vnode_supported) |
> +#ifdef CONFIG_X86
> +                        (1U << XENFEAT_vcpu_time_phys_area) |
> +#endif
> +                        (1U << XENFEAT_runstate_phys_area);

No provisions here for the "disabled for this domain" case?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.