[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 2/5] xen/vpci: move xen_domctl_createdomain vPCI flag to common
- To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 14 Nov 2023 10:11:05 +0100
- 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=sZe+pBlpqM/1HxUXGZOVGlnMmOyvfFXOv6FF9BVVD0E=; b=NVmgQy9dPQwfMlPiz/9XCdh1Zu0GME51jWksPOWJ+JwyobOpqrAeRzPbOkj0BS2DRMcQK3efagj5YShRSNMhTTw84KIitL68IQHC5Jx1VLZqy6Bp6O5bakFoxlQIMqr1bXAqcn7WtvqsB5jJ9CfXEhrF76DYRNgrRH+ACI0xt3rpAhd+hkMCF7YuoTSU7ysHPVjjqf0mlx8qV5AbXS0fNUbKbUaPHFzUx2b6Eim1wwex/xa/kgo21iRMqNSMi2fROs2ivjwxzfUo5MFXuATH76TifMBNYfjdvxwY9ZInI7iisxNfXWJgXFsfHtw+9spVerEkHpd8nqwz2g1uxIYFpA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AoynVOKWSRt/5cvxWZqTYVswfXNhHU6Q2IVR9uAHIvinLJzkZco6HRNaleOs2vd5NdVVX65ux3sjv5GlYzS5X7cY4zYZwLZuKhEfC3GFNcbXLSHsJkyIyJQ+jSJLgCBUP8jnvesDWruerKkNSwQlLFMsN2w48TWtoLeUDmn7hwuBQKOnWCdzN0hCBj/TFRkIcPFxSQfSAO4XKxUD9moLnqFsSiGLt61lnPzJkxU0cHzoFFC1zxENmCF9vH7Su8d6EdofvmPh3yBNsaVHpaw+DCZ1bqHjtNwZv/WD+YnukGJfctGw+oleZr1kjH5WQ7DjO2z6qhJvGoLCgsMVbwR23Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 14 Nov 2023 09:11:14 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 13.11.2023 23:21, Stewart Hildebrand wrote:
> @@ -709,10 +710,17 @@ int arch_sanitise_domain_config(struct
> xen_domctl_createdomain *config)
> return -EINVAL;
> }
>
> + if ( vpci && !hvm )
> + {
> + dprintk(XENLOG_INFO, "vPCI requested for non-HVM guest\n");
> + return -EINVAL;
> + }
> +
> return 0;
> }
As said on the v5 thread, I think my comment was misguided (I'm sorry)
and this wants keeping in common code as you had it.
> --- a/xen/include/public/arch-x86/xen.h
> +++ b/xen/include/public/arch-x86/xen.h
> @@ -283,15 +283,16 @@ struct xen_arch_domainconfig {
> #define XEN_X86_EMU_PIT (1U<<_XEN_X86_EMU_PIT)
> #define _XEN_X86_EMU_USE_PIRQ 9
> #define XEN_X86_EMU_USE_PIRQ (1U<<_XEN_X86_EMU_USE_PIRQ)
> -#define _XEN_X86_EMU_VPCI 10
> -#define XEN_X86_EMU_VPCI (1U<<_XEN_X86_EMU_VPCI)
> +/*
> + * Note: bit 10 was previously used for a XEN_X86_EMU_VPCI flag. This bit
> should
> + * not be re-used without careful consideration.
> + */
I think a multi-line comment is drawing overly much attention to this.
How about "Note: Bit 10 was previously used for XEN_X86_EMU_VPCI. Re-use
with care." which I think fits in a single line comment.
Jan
|