[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 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 09:52:02 +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=6oL4MjhIFJtwdvKlPXsM2OsDrtIScYZA6tXGeEbxWq0=; b=OL1dIdHTGnw8AM9Y12gyiM7pnp/Qax2T4QlVzNNAa1ccRSHrmJLEm/lZtMRQoH4sJ7ztHYOF6vJdG7n8QlDvZwwMgb9pvD74w+hS42FJTNHx172vkYSNGa6nfAngcW3XYsckqqIzwb2im2hW+9Q3AhR9ioZV2dyKXNQ++tdGQPL2btGZMYKSuzpvFDcaalTl3bscyRP4/rDcgAqQsHRyu7UtXNKv5UMx2i1L6NJxBugGwwLeQoGYgtFRTQHwAtqltVXWjQm1nG5JGiOegjGS9sTmbWd2C/+QPUDGHqClWxm5f5bIiG405IOOzlu6xFwnkgCkUE/I48zmD1rNqeOEYw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dm7u4sH2oxBudxaUy31nODwOEuigwlGG393Ks9vXqRqnhrHEJzbHqRO3gC5Q4d5zoeEjr8RD130LOh5Qn/nA5GljWFLa/kNo9mZqooXbqDCBL8zXsuEUMgwIn04dU7zSSD84xifb81qD4+YidAV6z6v0qhibCsKQ1pxhqvT7tueTtefn4ecb3BNNY+vLmERr+bdv2XBelidp0QvIFrL13BAQnt2HJPv3v3ILFYY4idTKKlcA8ChV/5ZLG2+4v81umguYpsRQHGykCeURq/WRvixgrp5iZ1xqZ/KcYG7fXy5ZiN3ogD+wiv75OynwzJk0pBugl8Tz99Mitkm9EVN/mQ==
  • 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>, 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 08:52:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.11.2023 20:05, Stewart Hildebrand wrote:
> On 11/13/23 08:26, Jan Beulich wrote:
>> On 02.11.2023 20:59, Stewart Hildebrand wrote:
>>> @@ -575,6 +577,18 @@ static int 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;
>>> +    }
>>> +
>>> +    if ( vpci && !IS_ENABLED(CONFIG_HAS_VPCI) )
>>> +    {
>>> +        dprintk(XENLOG_INFO, "vPCI requested but not enabled\n");
>>> +        return -EINVAL;
>>> +    }
>>
>> Maybe flip the order of these checks? But I'm uncertain about the first
>> one anyway: Isn't this something that needs deciding per-arch?
> 
> In v4, the equivalent of the ( vpci && !hvm ) check was indeed in 
> xen/arch/x86/domain.c:emulation_flags_ok(), but it seemed there was a 
> suggestion that it be moved to common code... See discussion at [1]. How 
> about putting it back into xen/arch/x86/domain.c, in 
> arch_sanitise_domain_config(), not emulation_flags_ok()?

Actually no, I take back that part of the comment. I think I mistakenly
considered PVH as "non-HVM" (as the log message has it).

Jan

> [1] https://lists.xenproject.org/archives/html/xen-devel/2023-10/msg02345.html




 


Rackspace

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