[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 16 Oct 2023 16:01:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=v+CVXwtRqiCPO4MyecTKnwC418XSZbeKsyN2GfsgXRA=; b=G8WLdrd8PQ/neLnXzEXqtQOByAO7hvuGt+EVD60o/bGuAoTX4y3DK84ctlM/9f6MdJKuHoD4T7fFHTUPZxAsJXf8XwxDddkBtcMm4EWciHBwWgAN7X8ERx2Opj4EzoKr7/vOk8eU2gStlETvW8R1ZK5jQJtlHflww65PAx6Q5kVAj9ib3joGaiVbZaMYv+uXzS36nJKA6xapXzVAMaURx0jTjaGCn27hs3aTjd7B407rV4UxBiCdY1XLQyfd9ZPXs1ZWXgzTfjNigclBbuJZtWPOkwT9ZVpWwlTMWixyjvY4Q81xp+zQZYVYPbCf3RtLzBDY5W3eKqln1v4xxNi3rQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BzeOWSCFyFVg8vVJU3lLRqOWFpC9AaB1YTbnM5lATjBOwpEs7o8nUAj1bIuKj0AYrBBv2UlFsenETLuH9mjluUKeo4ra7mP89pouTZRo0cfhxuGJl6E2BoLUS7pYqxMBpk9LjhU/qBqfgQizEfFhC5rl/baFwHdefUZ4vbA856pEkO882FFzp3GiIYtsBFR5szL6Kb5A7mzYrKwEES3n9Eug63tTa3Mf5HwicsBfozMc1BvCt3814REgjWyNl9Vt8Gv+9/nZ9hQcXX4KaZRklvgWkWjZi5FpmvGJyhJpelzCMB7GBtpN5prw7uW3HYNy5CxSfJk9Pe2hRXP86TnOdQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.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 14:01:33 +0000
  • Ironport-data: A9a23:6jFsMqA8LVzNjxVW/67iw5YqxClBgxIJ4kV8jS/XYbTApDsi0mQCy DMdCj2PO/bZYGP1eNF+PYzioxwOvMDWz4BrQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48D8kk/nOH+KgYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbCRMsMpvlDs15K6p4WtB4ARnDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIwq8ZYWjhez f8hNx8AbBWRm+uW4u20Y7w57igjBJGD0II3nFhFlGucIdN4BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI9OxuvTm7IA9ZidABNPLPfdOHX4NNl1uwr WPa5WXpRBodMbRzzBLcqC/x2bCXwXKTtIQ6H7Gy7+Zrw36v12ETLxtGCFL8g8WohRvrMz5YA wlOksY0loAw/kG2Stj2XzWjvWWJ+BUbXrJ4M+A88hDL9aPS7C6QHG1CRTlEAPQts8ozWDory k7PmtrvDDNiqpWFRHSF7LCWoDiufy8PIgcqZzIATAYDy8nupsc0lB2nZs14DKe/g9nxGDfx6 zOHti4zg/MUl8Fj/7q/1UDKhXSrvJehZh444EDbU3yo6it9ZZW5fMq45F7D9/FCIY2FCF6bs xA5d9O26ekPCdSBkXKLSeBURrWxva/bYXvbnEJlGIQn+3K14Xm/cItM4TZ4YkB0LsIDfjyva 0jW0e9M2KJu0LKRRfcfS+qM5w4ClvSI+QjNPhwMUudzXw==
  • Ironport-hdrordr: A9a23:/Z2lGqgE5CyWhKZOL28h3wBRwnBQXioji2hC6mlwRA09TyX5ra 2TdZUgpHjJYVMqMk3I9uruBEDtex3hHNtOkOos1NSZLW3bUQmTTL2KhLGKq1Hd8m/Fh4xgPM 9bGJSWY+eAaGSS4/ya3OG5eexQvOVu8sqT9JjjJ6EGd3AVV0lihT0JezpyCidNNW977QJSLu vn2iJAzQDQAEg/X4CAKVQuefPMnNHPnIKOW296O/Z2gDP+9Q9B8dTBYmOl4is=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 16, 2023 at 03:58:22PM +0200, Jan Beulich wrote:
> 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".

The point is for the guest to not take any action that it won't take
on an hypervisor that doesn't have the hypercalls implemented, and the
only way to be sure about that is to return the same exact error code.

Thanks, Roger.



 


Rackspace

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