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

Re: [PATCH v1 2/6] xen/arm: Reserve resources for virtio-pci


  • To: Julien Grall <julien@xxxxxxx>
  • From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxx>
  • Date: Tue, 24 Sep 2024 19:11:41 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=BlPrTEz8wHFhdYjr41B8e88hFngiwqnen+WM8gyV6ck=; b=XKAw/v84pj2Bdzg4nIPVZ18iVJeTAwrbtk8kVzYcgCaxW89WZAK4zCbX0snxoq2/MJYR/UUW+/frrCXjEK/yYaOLIc8SDAFkhAt53tUIDDQFIQ2GsX95LGIQshakdyyeM/R+M4zSekawkvPZ3LJu+zAXke16gApUYzkxJZb0TNq+vhgyV5LJ7IlnpEOYHnjp3KfMZN+gy/6yHGcAgAuOZi5yftSdye7Zu1nTWZaMX6Cs8xkx/+tGOepmVdZXNh8cayuS3JkqHpGYUqDNmC0rj/MgoF1v1CShJJqYzwAbysn3oxcP2/Ltl+MOZJ14DHuIKR9rf154Rai/ve89YI7hcA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oVlT0SEGx4Lw2r0K1SzHE5jRP2q6KinZUrYGNOKK+OuJ0TyEhwUlO6SD6bXAiMg14iDjvfYhacj7C0R0OcsfrnZFW6FmDD1PGemgojc4/I2xBrWRRBJ8WMlOb3aNqge1VFufDH843Z2lLkPMYRDnNBxZuw93e4X1ZADw5A3EMRx61vfiRpgn9hezxctXWU6N09iw8XWkGp4aTsBQHD7j93Y2lpXSF5TawcTZUc+cYK2JrYP2LG1ZRJKKd/qV/gkkypB/+V/hFRabFqURfHQy5MwWcigBJKkiOJo8pRMzkwkwoNa8moaTwfNDKN36OuL1p+4T2MXSAM0/C0LUDTYHKA==
  • Cc: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <bertrand.marquis@xxxxxxx>, <michal.orzel@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 24 Sep 2024 17:11:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Sep 24, 2024 at 05:35:20PM +0100, Julien Grall wrote:
> Hi Edgar,
> 
> On 24/09/2024 17:23, Edgar E. Iglesias wrote:
> > From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxx>
> > 
> > Reserve memory ranges and interrupt lines for an externally
> > emulated PCI controller (e.g by QEMU) dedicated to hosting
> > Virtio devices and potentially other emulated devices.
> > 
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxx>
> > ---
> >   xen/include/public/arch-arm.h | 17 +++++++++++++++++
> >   1 file changed, 17 insertions(+)
> > 
> > diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
> > index e19f0251a6..654b827715 100644
> > --- a/xen/include/public/arch-arm.h
> > +++ b/xen/include/public/arch-arm.h
> > @@ -494,6 +494,20 @@ typedef uint64_t xen_callback_t;
> >   #define GUEST_RAM1_BASE   xen_mk_ullong(0x0200000000) /* 952GB of RAM @ 
> > 8GB */
> >   #define GUEST_RAM1_SIZE   xen_mk_ullong(0xee00000000)
> > +/* Virtio PCI - Ordered by decreasing size to keep things aligned */
> > +#define GUEST_VIRTIO_PCI_PREFETCH_MEM_TYPE  xen_mk_ullong(0x43000000)
> > +#define GUEST_VIRTIO_PCI_PREFETCH_MEM_BASE  xen_mk_ullong(0x0f000000000)
> > +#define GUEST_VIRTIO_PCI_PREFETCH_MEM_SIZE  xen_mk_ullong(0x100000000)
> > +
> > +#define GUEST_VIRTIO_PCI_ECAM_BASE      
> > (GUEST_VIRTIO_PCI_PREFETCH_MEM_BASE + \
> > +                                         
> > GUEST_VIRTIO_PCI_PREFETCH_MEM_SIZE)
> > +#define GUEST_VIRTIO_PCI_ECAM_SIZE      xen_mk_ullong(0x10000000)
> > +
> > +#define GUEST_VIRTIO_PCI_MEM_TYPE         xen_mk_ullong(0x02000000)
> > +#define GUEST_VIRTIO_PCI_MEM_BASE         (GUEST_VIRTIO_PCI_ECAM_BASE + \
> > +                                           GUEST_VIRTIO_PCI_ECAM_SIZE)
> > +#define GUEST_VIRTIO_PCI_MEM_SIZE         xen_mk_ullong(0x00002000000)
> 
> Why is this specific to virtio PCI? However, I am not entirely convinced we
> should have a second PCI hostbridge exposed to the guest for a few reasons:
>   1. This require to reserve yet another range in the address space (could
> be solved with a more dynamic layout)
>   2. From your instructions, the guest needs to explicitly do a PCI rescan.
> 
> So rather than having a second hostbridge, have you considered to extend the
> existing hostbridge (implemented in Xen) to support a mix of physical PCI
> device and virtual one?
>

Thanks Julien,

It's briefly come up in a couple of discussions but I haven't looked
carefully at it. It is a good idea and it's probably worth prototyping
to see what the gaps are in hypercall interfaces, QEMU support etc.

Cheers,
Edgar




 


Rackspace

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