[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: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Fri, 15 Dec 2023 09:36:49 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=3YGWxqzJeuJrALw4MTaFhrvF/9TdLY1BHDeRC9/lVaU=; b=Ef8IYBaPjkJMDlPkH3STqCtZjdH+VYtl2qbajI0tw+PC2D/u0lhuFMGtYrmneSW8lcgznYFqCHNihAiYXlkVWIk3jMRJTLMEhnd50GZpsBzGNf+AjyEe2swV4ydRr+KncNbal8zZbXGgTRtufdHhB6IxA1sqck+lH7KXCuhd6GMDCIkzVvxG6UastPs7Y/fE0aj5VIbv3xLAQf8HoECnQxTeL8tQ0JAzkMWAHOzMUQOtmvyQixJaoh0vj1pnIEB5uCJPOovPQCx3ZffxsXQpKnwaoRKvNNgVCyFHxhRgQEywNJcSHAKpvX+eMdEBy0zmKE3M3Usqg0AQJOcy3IgseA==
  • 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=3YGWxqzJeuJrALw4MTaFhrvF/9TdLY1BHDeRC9/lVaU=; b=TCOvaf3R+Bu0q8IOIXguBohNJaOxyNvJ6smGB8vVhuxqwhOA7bu+E8EQM8GIhhfy7hOIF8k7kuhMWz72gzyvVRiemqMeeHUDmDEfj36QpH8y9kGzA5Uml5DrPSpGZ92WyWmAlwb/SSbHyuWZ0Oy7NzMaRsu7F14wh347ub13UexWXBbg6D9PyYJAPQGHhQ1GwfLwP2gotBiLX7EJJ84ow49degE2+WM85mZkxe11huKD5uK1d2uvWuNGzkNSQrPNszD2DtIIbb1RrDYyygwV0a6CdLXhktxyIFNR3TVjLEvGwX10HnmSLYCk9ckqlkd6KHf6pQbISsiUIMkYmrd47g==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=fbtg14kSgTWsDuJfBrw/wXxI9KXYXcB7V/uTr6NvklInzYmDNwSiumr1BMYprq9R7d91prWMBec6DVgw8b0lKDaPlI2eWd7alah8r6Br2lf9M312J6qG+X2qXRKRGvTxjaatn7MwqNzQIXEvsbvH5EyTQeAdjCRHmCycxY4JY6cS4IyUvDtE4uOxeIzGmSepMuJu7T2XSaSqxGciT5x66g8TjuYoSH2sczf5mxnLceeHy9iV6SaVaOb84aEBa8YhC5KYthQQGAxTCAsWlbz7+wFCaLFv4G8AgjKLVh7X54vx8Bkxy1yJiWBjHik7t3z0Tp8hOjCbRrG8Yqn+f/4JdQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fKJZJeN1R4RDQM9m9K6ABOkVZODYQDyTLUkN5ZJdAMkWbGM3N02MDnaHWd9FvbGzFlTpOx/QOGnmOz/BIQR9Zt8z1tTGYHPqF4tWe4+JyxisGpm9Bbu7Gb/07FBD4ZwkuTA2B5YcaqDELCPnIm3LXzI/VH2hsFkq1Q23euaKgSBurY2C5WN2f0O6zVNzKm0sQwthaGsdKU3E5IlWkaqng69hPGQjmPu1krfzIgiWixvoVwVGFfIC60EmMAJQycn92Xk9DDmQeyeVw/kt0G5r+dOujsMP6xexD7357xZ1B+MxzOHkR2bT+kC7vB1ZsyohDs3e3tnWgkkMoyVqIFgDTA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, 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>, Christian Lindig <christian.lindig@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 15 Dec 2023 09:38:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaFn/ghOWRrQCqzUOzpwxJJh+Sd7B5h/6AgBhgEgCAGF9AgA==
  • Thread-topic: [PATCH v6 2/5] xen/vpci: move xen_domctl_createdomain vPCI flag to common

Hi Stewart,

> On 29 Nov 2023, at 9:25 pm, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx> 
> wrote:
> 
> On 11/14/23 04:11, Jan Beulich wrote:
>> 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.
> 
> I'll move it back to xen/common/domain.c. No worries.

I tested this patch and observed build failure when compiling the "x86_64” arch 
with
"CONFIG_HVM=n“ option.

x86_64-linux-gnu-ld    -melf_x86_64  -T arch/x86/xen.lds -N prelink.o 
--build-id=sha1 \
    ./common/symbols-dummy.o -o ./.xen-syms.0 
x86_64-linux-gnu-ld: prelink.o: in function `arch_iommu_hwdom_init’:
(.init.text+0x2192b): undefined reference to `vpci_is_mmcfg_address’
(.init.text+0x2192b): relocation truncated to fit: R_X86_64_PLT32 against 
undefined symbol `vpci_is_mmcfg_address'
x86_64-linux-gnu-ld: (.init.text+0x21947): undefined reference to 
`vpci_is_mmcfg_address'
(.init.text+0x21947): relocation truncated to fit: R_X86_64_PLT32 against 
undefined symbol `vpci_is_mmcfg_address'
x86_64-linux-gnu-ld: prelink.o: in function `do_physdev_op’: 
(.text.do_physdev_op+0x6db): undefined reference to 
`register_vpci_mmcfg_handler'
(.text.do_physdev_op+0x6db): relocation truncated to fit: R_X86_64_PLT32 
against undefined symbol `register_vpci_mmcfg_handler'
x86_64-linux-gnu-ld: ./.xen-syms.0: hidden symbol `vpci_is_mmcfg_address' isn't 
defined
x86_64-linux-gnu-ld: final link failed: bad value                


Regards,
Rahul


> 
>> 
>>> --- 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.
> 
> Sounds good.
> 
>> 
>> Jan



 


Rackspace

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