Virtio support for toolstack on Arm (Was "IOREQ feature (+ virtio-mmio) on Arm")
v5 cover Virtio support for toolstack on Arm (Was "IOREQ feature (+ virtio-mmio) on Arm")
From: Oleksandr Tyshchenko <[email protected]>
Hello all.
The purpose of this patch series is to add missing virtio-mmio bits to Xen toolstack on Arm. The Virtio support for toolstack [1] was postponed as the main target was to upstream IOREQ/DM support on Arm in the first place. Now, we already have IOREQ support in, so we can resume Virtio enabling work. You can find previous discussion at [2].
Patch series [3] was reworked and rebased on recent "staging branch" (972ba1d x86/shadow: streamline shadow_get_page_from_l1e()) and tested on Renesas Salvator-X board + H3 ES3.0 SoC (Arm64) with "updated" virtio-mmio disk backend [4] running in Driver domain and unmodified Linux Guest running on existing virtio-blk driver (frontend). No issues were observed. Guest domain 'reboot/destroy' use-cases work properly.
Any feedback/help would be highly appreciated.
[1]
https://lore.kernel.org/xen-devel/[email protected]/
https://lore.kernel.org/xen-devel/[email protected]/
[2]
https://lists.xenproject.org/archives/html/xen-devel/2021-01/msg02403.html
https://lists.xenproject.org/archives/html/xen-devel/2021-01/msg02536.html
[3] https://github.com/otyshchenko1/xen/commits/libxl_virtio
[4] https://github.com/xen-troops/virtio-disk/commits/ioreq_ml3
Julien Grall (1):
libxl: Introduce basic virtio-mmio support on Arm
Oleksandr Tyshchenko (1):
libxl: Add support for Virtio disk configuration
docs/man/xl-disk-configuration.5.pod.in | 27 + tools/include/libxl.h | 6 + tools/libs/light/libxl_arm.c | 133 ++++- tools/libs/light/libxl_device.c | 38 +- tools/libs/light/libxl_disk.c | 99 +++- tools/libs/light/libxl_types.idl | 4 + tools/libs/light/libxl_types_internal.idl | 1 + tools/libs/light/libxl_utils.c | 2 + tools/libs/util/libxlu_disk_l.c | 881 +++++++++++++++--------------- tools/libs/util/libxlu_disk_l.h | 2 +- tools/libs/util/libxlu_disk_l.l | 1 + tools/xl/xl_block.c | 11 + xen/include/public/arch-arm.h | 7 + 13 files changed, 764 insertions(+), 448 deletions(-)
Signature · 1 line
2.7.4
v5 cover Virtio support for toolstack on Arm (Was "IOREQ feature (+ virtio-mmio) on Arm")
From: Julien Grall <[email protected]>
Date: Wed, 29 Jul 2020 17:36:53 +0300
Subject: [PATCH V5 2/2] libxl: Introduce basic virtio-mmio support on Arm
This patch introduces helpers to allocate Virtio MMIO params (IRQ and memory region) and create specific device node in the Guest device-tree with allocated params. In order to deal with multiple Virtio devices, reserve corresponding ranges. For now, we reserve 1MB for memory regions and 10 SPIs.
As these helpers should be used for every Virtio device attached to the Guest, call them for Virtio disk(s).
Please note, with statically allocated Virtio IRQs there is a risk of a clash with a physical IRQs of passthrough devices. For the first version, it's fine, but we should consider allocating the Virtio IRQs automatically. Thankfully, we know in advance which IRQs will be used for passthrough to be able to choose non-clashed ones.
---
Please note, this is a split/cleanup/hardening of Julien's PoC:
"Add support for Guest IO forwarding to a device emulator"
Changes RFC -> V1:
- was squashed with:
"[RFC PATCH V1 09/12] libxl: Handle virtio-mmio irq in more correct way" "[RFC PATCH V1 11/12] libxl: Insert "dma-coherent" property into virtio-mmio device node" "[RFC PATCH V1 12/12] libxl: Fix duplicate memory node in DT"
- move VirtIO MMIO #define-s to xen/include/public/arch-arm.h
Changes V1 -> V2:
- update the author of a patch
Changes V2 -> V3:
- no changes
Changes V3 -> V4:
- no changes
Changes V4 -> V5:
- split the changes, change the order of the patches
- drop an extra "virtio" configuration option
- update patch description
- use CONTAINER_OF instead of own implementation
- reserve ranges for Virtio MMIO params and put them in correct location
- create helpers to allocate Virtio MMIO params, add corresponding sanity-сhecks
- add comment why MMIO size 0x200 is chosen
- update debug print
- drop Wei's T-b
--- tools/libs/light/libxl_arm.c | 133 +++++++++++++++++++++++++++++++++++++++++- xen/include/public/arch-arm.h | 7 +++ 2 files changed, 138 insertions(+), 2 deletions(-)
tools/libs/light/libxl_arm.c +131 -2
@@ -8,6 +8,56 @@#include <assert.h> #include <xen/device_tree_defs.h> +/* +* There is no clear requirements for the total size of Virtio MMIO region. +* The size of control registers is 0x100 and device-specific configuration +* registers starts at the offset 0x100, however it's size depends on the device +* and the driver. Pick the biggest known size at the moment to cover most +* of the devices (also consider allowing the user to configure the size via +* config file for the one not conforming with the proposed value). +*/ +#define VIRTIO_MMIO_DEV_SIZE xen_mk_ullong(0x200) + +static uint64_t virtio_mmio_base; +static uint32_t virtio_mmio_irq; + +static void init_virtio_mmio_params (void ) +{ + virtio_mmio_base =GUEST_VIRTIO_MMIO_BASE ; + virtio_mmio_irq =GUEST_VIRTIO_MMIO_SPI_FIRST ; +} + +static uint64_t alloc_virtio_mmio_base (libxl__gc *gc) +{ +uint64_t base = virtio_mmio_base; + +/* Make sure we have enough reserved resources */ +if ((virtio_mmio_base +VIRTIO_MMIO_DEV_SIZE > +GUEST_VIRTIO_MMIO_BASE +GUEST_VIRTIO_MMIO_SIZE )) { +LOG (ERROR ,"Ran out of reserved range for Virtio MMIO BASE 0x%" PRIx64"\n" , + virtio_mmio_base); +return 0 ; + } + virtio_mmio_base +=VIRTIO_MMIO_DEV_SIZE ; + +return base; +} + +static uint32_t alloc_virtio_mmio_irq (libxl__gc *gc) +{ +uint32_t irq = virtio_mmio_irq; + +/* Make sure we have enough reserved resources */ +if (virtio_mmio_irq >GUEST_VIRTIO_MMIO_SPI_LAST ) { +LOG (ERROR ,"Ran out of reserved range for Virtio MMIO IRQ %u\n" , + virtio_mmio_irq); +return 0 ; + } + virtio_mmio_irq++; + +return irq; +} +static const char *gicv_to_string (libxl_gic_version gic_version) {switch (gic_version) {
@@ -26,8 +76,8 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc, {uint32_t nr_spis =0 ;unsigned int i; -uint32_t vuart_irq; -bool vuart_enabled = false; +uint32_t vuart_irq, virtio_irq =0 ; +bool vuart_enabled = false, virtio_enabled = false;/* * If pl011 vuart is enabled then increment the nr_spis to allow allocation
@@ -39,6 +89,35 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc, vuart_enabled = true; } +/* +* Virtio MMIO params are non-unique across the whole system and must be +* initialized for every new guest. +*/ +init_virtio_mmio_params (); +for (i =0 ; i < d_config->num_disks; i++) { +libxl_device_disk *disk = &d_config->disks[i]; + +if (disk->virtio) { + disk->base =alloc_virtio_mmio_base (gc); +if (!disk->base) +return ERROR_FAIL ; + + disk->irq =alloc_virtio_mmio_irq (gc); +if (!disk->irq) +return ERROR_FAIL ; + +if (virtio_irq < disk->irq) + virtio_irq = disk->irq; + virtio_enabled = true; + +LOG (DEBUG ,"Allocate Virtio MMIO params for Vdev %s: IRQ %u BASE 0x%" PRIx64, + disk->vdev, disk->irq, disk->base); + } + } + +if (virtio_enabled) + nr_spis += (virtio_irq -32 ) +1 ; +for (i =0 ; i < d_config->b_info.num_irqs; i++) {uint32_t irq = d_config->b_info.irqs[i];uint32_t spi;
@@ -58,6 +137,13 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,return ERROR_FAIL ; } +/* The same check as for vpl011 */ +if (virtio_enabled && + (irq >=GUEST_VIRTIO_MMIO_SPI_FIRST && irq <= virtio_irq)) { +LOG (ERROR ,"Physical IRQ %u conflicting with Virtio MMIO IRQ range\n" , irq); +return ERROR_FAIL ; + } +if (irq <32 )continue ;
@@ -660,6 +746,38 @@ static int make_vpl011_uart_node(libxl__gc *gc, void *fdt,return 0 ; } +static int make_virtio_mmio_node (libxl__gc *gc,void *fdt, +uint64_t base,uint32_t irq) +{ +int res; +gic_interrupt intr; +/* Placeholder for virtio@ + a 64-bit number + \0 */ +char buf[24 ]; + +snprintf (buf,sizeof (buf),"virtio@%" PRIx64, base); + res =fdt_begin_node (fdt, buf); +if (res)return res; + + res =fdt_property_compat (gc, fdt,1 ,"virtio,mmio" ); +if (res)return res; + + res =fdt_property_regs (gc, fdt,GUEST_ROOT_ADDRESS_CELLS ,GUEST_ROOT_SIZE_CELLS , +1 , base,VIRTIO_MMIO_DEV_SIZE ); +if (res)return res; + +set_interrupt (intr, irq,0xf ,DT_IRQ_TYPE_EDGE_RISING ); + res =fdt_property_interrupts (gc, fdt, &intr,1 ); +if (res)return res; + + res =fdt_property (fdt,"dma-coherent" ,NULL ,0 ); +if (res)return res; + + res =fdt_end_node (fdt); +if (res)return res; + +return 0 ; +} +static const struct arch_info *get_arch_info (libxl__gc *gc,const struct xc_dom_image *dom) {
@@ -860,10 +978,14 @@ static int libxl__prepare_dtb(libxl__gc *gc, libxl_domain_build_info *info,int rc, res;size_t fdt_size =0 ;int pfdt_size =0 ; +unsigned int i;const libxl_version_info *vers;const struct arch_info *ainfo; +libxl_domain_config *d_config = +CONTAINER_OF (info, libxl_domain_config, b_info); + vers =libxl_get_version_info (CTX );if (vers ==NULL )return ERROR_FAIL ;
@@ -963,6 +1085,13 @@ next_resize:if (info->tee ==LIBXL_TEE_TYPE_OPTEE )FDT (make_optee_node (gc, fdt) ); +for (i =0 ; i < d_config->num_disks; i++) { +libxl_device_disk *disk = &d_config->disks[i]; + +if (disk->virtio) +FDT (make_virtio_mmio_node (gc, fdt, disk->base, disk->irq) ); + } +if (pfdt)FDT (copy_partial_fdt (gc, fdt, pfdt) );
xen/include/public/arch-arm.h +7 -0
@@ -394,6 +394,10 @@ typedef uint64_t xen_callback_t;/* Physical Address Space */ +/* Virtio MMIO mappings */ +#define GUEST_VIRTIO_MMIO_BASE xen_mk_ullong(0x02000000) +#define GUEST_VIRTIO_MMIO_SIZE xen_mk_ullong(0x00100000) +/* * vGIC mappings: Only one set of mapping is used by the guest. * Therefore they can overlap.
@@ -458,6 +462,9 @@ typedef uint64_t xen_callback_t;#define GUEST_VPL011_SPI 32 +#define GUEST_VIRTIO_MMIO_SPI_FIRST 33 +#define GUEST_VIRTIO_MMIO_SPI_LAST 43 +/* PSCI functions */ #define PSCI_cpu_suspend 0#define PSCI_cpu_off 1
Signature · 1 line
2.7.4
v5 cover Virtio support for toolstack on Arm (Was "IOREQ feature (+ virtio-mmio) on Arm")
In reply to Oleksandr TyshchenkoFrom: Oleksandr Tyshchenko <[email protected]>
Date: Thu, 20 May 2021 20:41:01 +0300
Subject: [PATCH V5 1/2] libxl: Add support for Virtio disk configuration
This patch adds basic support for configuring and assisting virtio-disk backend (emualator) which is intended to run out of Qemu and could be run in any domain.
Although the Virtio block device is quite different from traditional Xen PV block device (vbd) from the toolstack point of view:
- the frontend is virtio-blk which is not a Xenbus driver, so nothing written to Xenstore are fetched by the frontend (the vdev is not passed to the frontend, etc)
- the ring-ref/event-channel are not used for the backend<->frontend communication, the proposed IPC for Virtio is IOREQ/DM
it is still a "block device" and ought to be integrated in existing "disk" handling. So, re-use (and adapt) "disk" parsing/configuration logic to deal with Virtio devices as well.
Besides introducing new disk backend type (LIBXL_DISK_BACKEND_VIRTIO) introduce new device kind (LIBXL__DEVICE_KIND_VIRTIO_DISK) as current one (LIBXL__DEVICE_KIND_VBD) doesn't fit into Virtio disk model.
In order to inform the toolstack that Virtio disk needs to be used extend "disk" configuration by introducing new "virtio" flag. An example of domain configuration:
disk = [ 'backend=DomD, phy:/dev/mmcblk1p3, xvda1, rw, virtio' ]
Please note, this patch is not enough for virtio-disk to work on Xen (Arm), as for every Virtio device (including disk) we need to allocate Virtio MMIO params (IRQ and memory region) and pass them to the backend, also update Guest device-tree with the allocated params. The subsequent patch will add these missing bits. For the current patch, the default "irq" and "base" are just written to the Xenstore.
---
Changes RFC -> V1:
- no changes
Changes V1 -> V2:
- rebase according to the new location of libxl_virtio_disk.c
Changes V2 -> V3:
- no changes
Changes V3 -> V4:
- rebase according to the new argument for DEFINE_DEVICE_TYPE_STRUCT
Changes V4 -> V5:
- split the changes, change the order of the patches
- update patch description
- don't introduce new "vdisk" configuration option with own parsing logic, re-use Xen PV block "disk" parsing/configuration logic for the virtio-disk
- introduce "virtio" flag and document it's usage
- add LIBXL_HAVE_DEVICE_DISK_VIRTIO
- update libxlu_disk_l.[ch]
- drop num_disks variable/MAX_VIRTIO_DISKS
- drop Wei's T-b
--- docs/man/xl-disk-configuration.5.pod.in | 27 + tools/include/libxl.h | 6 + tools/libs/light/libxl_device.c | 38 +- tools/libs/light/libxl_disk.c | 99 +++- tools/libs/light/libxl_types.idl | 4 + tools/libs/light/libxl_types_internal.idl | 1 + tools/libs/light/libxl_utils.c | 2 + tools/libs/util/libxlu_disk_l.c | 881 +++++++++++++++--------------- tools/libs/util/libxlu_disk_l.h | 2 +- tools/libs/util/libxlu_disk_l.l | 1 + tools/xl/xl_block.c | 11 + 11 files changed, 626 insertions(+), 446 deletions(-)
docs/man/xl-disk-configuration.5.pod.in +27 -0
@@ -344,8 +344,35 @@ can be used to disable "hole punching" for file based backends which were intentionally created non-sparse to avoid fragmentation of the file. +=item B<virtio> + +=over 4 + +=item Description + +Enables experimental Virtio support for disk + +=item Supported values + +absent, present + +=item Mandatory + +No + +=item Default value + +absent + =back +Besides forcing toolstack to use specific Xen Virtio backend implementation +(for example, virtio-disk), this also affects the guest's view of the device +and requires virtio-blk driver to be used. +Please note, the virtual device (vdev) is not passed to the guest in that case, +but it still must be specified for the internal purposes. + +=back =head1 COLO Parameters
tools/include/libxl.h +6 -0
@@ -503,6 +503,12 @@#define LIBXL_HAVE_X86_MSR_RELAXED 1/* +* LIBXL_HAVE_DEVICE_DISK_VIRTIO indicates that a 'virtio' field +* (of boolean type) is present in libxl_device_disk. +*/ +#define LIBXL_HAVE_DEVICE_DISK_VIRTIO 1 + +/* * libxl ABI compatibility * * The only guarantee which libxl makes regarding ABI compatibility
tools/libs/light/libxl_device.c +36 -2
@@ -292,6 +292,9 @@ static int disk_try_backend(disk_try_backend_args *a,/* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or * backend on success */ +if (a->disk->virtio && backend !=LIBXL_DISK_BACKEND_VIRTIO ) + goto bad_virtio; +switch (backend) {case LIBXL_DISK_BACKEND_PHY :if (a->disk->format !=LIBXL_DISK_FORMAT_RAW ) {
@@ -329,6 +332,29 @@ static int disk_try_backend(disk_try_backend_args *a,if (a->disk->script) goto bad_script;return backend; +case LIBXL_DISK_BACKEND_VIRTIO : +if (a->disk->format !=LIBXL_DISK_FORMAT_RAW ) + goto bad_format; + +if (a->disk->script) + goto bad_script; + +if (libxl_defbool_val (a->disk->colo_enable)) + goto bad_colo; + +if (a->disk->backend_domid !=LIBXL_TOOLSTACK_DOMID ) { +LOG (DEBUG ,"Disk vdev=%s, is using a storage driver domain, " +"skipping physical device check" , a->disk->vdev); +return backend; + } + +if (libxl__try_phy_backend (a->stab.st_mode)) +return backend; + +LOG (DEBUG ,"Disk vdev=%s, backend virtio unsuitable as phys path not a " +"block device" , a->disk->vdev); +return 0 ; +default :LOG (DEBUG ,"Disk vdev=%s, backend %d unknown" , a->disk->vdev, backend);return 0 ;
@@ -352,6 +378,11 @@ static int disk_try_backend(disk_try_backend_args *a,LOG (DEBUG ,"Disk vdev=%s, backend %s not compatible with colo" , a->disk->vdev,libxl_disk_backend_to_string (backend));return 0 ; + + bad_virtio: +LOG (DEBUG ,"Disk vdev=%s, backend %s not compatible with virtio" , + a->disk->vdev,libxl_disk_backend_to_string (backend)); +return 0 ; } int libxl__backendpath_parse_domid(libxl__gc *gc, const char *be_path,
@@ -392,7 +423,8 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) { }memset (&a.stab,0 ,sizeof (a.stab)); }else if ((disk->backend ==LIBXL_DISK_BACKEND_UNKNOWN || - disk->backend ==LIBXL_DISK_BACKEND_PHY ) && + disk->backend ==LIBXL_DISK_BACKEND_PHY || + disk->backend ==LIBXL_DISK_BACKEND_VIRTIO ) && disk->backend_domid ==LIBXL_TOOLSTACK_DOMID && !disk->script) {if (stat (disk->pdev_path, &a.stab)) {
@@ -408,7 +440,8 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) { ok=disk_try_backend (&a,LIBXL_DISK_BACKEND_PHY ) ?:disk_try_backend (&a,LIBXL_DISK_BACKEND_QDISK ) ?: -disk_try_backend (&a,LIBXL_DISK_BACKEND_TAP ); +disk_try_backend (&a,LIBXL_DISK_BACKEND_TAP ) ?: +disk_try_backend (&a,LIBXL_DISK_BACKEND_VIRTIO );if (ok) LOG(DEBUG, "Disk vdev=%s, using backend %s", disk->vdev,
@@ -441,6 +474,7 @@ char *libxl__device_disk_string_of_backend(libxl_disk_backend backend)case LIBXL_DISK_BACKEND_QDISK :return "qdisk" ;case LIBXL_DISK_BACKEND_TAP :return "phy" ;case LIBXL_DISK_BACKEND_PHY :return "phy" ; +case LIBXL_DISK_BACKEND_VIRTIO :return "virtio_disk" ;default :return NULL ; } }
tools/libs/light/libxl_disk.c +92 -7
162 lines not on this page · raw message
tools/libs/light/libxl_types.idl +4 -0
@@ -130,6 +130,7 @@ libxl_disk_backend = Enumeration("disk_backend", [ (1, "PHY"), (2, "TAP"), (3, "QDISK"), + (4, "VIRTIO"), ]) libxl_nic_type = Enumeration("nic_type", [
@@ -699,6 +700,9 @@ libxl_device_disk = Struct("device_disk", [ ("is_cdrom", integer), ("direct_io_safe", bool), ("discard_enable", libxl_defbool), + ("virtio", bool), + ("irq", uint32), + ("base", uint64), # Note that the COLO configuration settings should be considered unstable. # They may change incompatibly in future versions of Xen. ("colo_enable", libxl_defbool),
tools/libs/light/libxl_types_internal.idl +1 -0
@@ -32,6 +32,7 @@ libxl__device_kind = Enumeration("device_kind", [ (14, "PVCALLS"), (15, "VSND"), (16, "VINPUT"), + (17, "VIRTIO_DISK"), ]) libxl__console_backend = Enumeration("console_backend", [
tools/libs/light/libxl_utils.c +2 -0
@@ -304,6 +304,8 @@ int libxl_string_to_backend(libxl_ctx *ctx, char *s, libxl_disk_backend *backend *backend =LIBXL_DISK_BACKEND_TAP ; }else if (!strcmp (s,"qdisk" )) { *backend =LIBXL_DISK_BACKEND_QDISK ; + }else if (!strcmp (s,"virtio_disk" )) { + *backend =LIBXL_DISK_BACKEND_VIRTIO ; }else if (!strcmp (s,"tap" )) { p =strchr (s,':' );if (!p) {
tools/libs/util/libxlu_disk_l.c +445 -436
1,101 lines not on this page · raw message
tools/libs/util/libxlu_disk_l.h +1 -1
@@ -694,7 +694,7 @@ extern int yylex (yyscan_t yyscanner);#undef yyTABLES_NAME#endif -#line 291 "libxlu_disk_l.l" +#line 292 "libxlu_disk_l.l"#line 699 "libxlu_disk_l.h"#undef xlu__disk_yyIN_HEADER
tools/libs/util/libxlu_disk_l.l +1 -0
@@ -198,6 +198,7 @@ script=[^,]*,? { STRIP(','); SAVESTRING("script", script, FROMEQUALS); } direct-io-safe,? { DPC->disk->direct_io_safe = 1; } discard,? { libxl_defbool_set(&DPC->disk->discard_enable, true); } no-discard,? { libxl_defbool_set(&DPC->disk->discard_enable, false); } +virtio,? { DPC->disk->virtio = 1; } /* Note that the COLO configuration settings should be considered unstable. * They may change incompatibly in future versions of Xen. */ colo,? { libxl_defbool_set(&DPC->disk->colo_enable, true); }
tools/xl/xl_block.c +11 -0
@@ -50,6 +50,11 @@ int main_blockattach(int argc, char **argv)return 0 ; } +if (disk.virtio) { +fprintf (stderr,"block-attach is not supported for Virtio device\n" ); +return 1 ; + } +if (libxl_device_disk_add (ctx, fe_domid, &disk,0 )) {fprintf (stderr,"libxl_device_disk_add failed.\n" );return 1 ;
@@ -119,6 +124,12 @@ int main_blockdetach(int argc, char **argv)fprintf (stderr,"Error: Device %s not connected.\n" , argv[optind+1 ]);return 1 ; } + +if (disk.virtio) { +fprintf (stderr,"block-detach is not supported for Virtio device\n" ); +return 1 ; + } + rc = !force ?libxl_device_disk_safe_remove (ctx, domid, &disk,0 ) :libxl_device_disk_destroy (ctx, domid, &disk,0 );if (rc) {
Signature · 1 line
2.7.4
On 21.05.21 16:16, Oleksandr Tyshchenko wrote:
Hello, all.
I pushed this series in wrong way, so the patches #1 and #2 appeared with the same subject as a cover letter. I have just resent this patch series properly. Please ignore current one. Sorry for the noise.
https://lore.kernel.org/xen-devel/[email protected]/
Quoted 49 lines
From: Oleksandr Tyshchenko <[email protected]>
Hello all.
The purpose of this patch series is to add missing virtio-mmio bits to Xen toolstack on Arm. The Virtio support for toolstack [1] was postponed as the main target was to upstream IOREQ/DM support on Arm in the first place. Now, we already have IOREQ support in, so we can resume Virtio enabling work. You can find previous discussion at [2].
Patch series [3] was reworked and rebased on recent "staging branch" (972ba1d x86/shadow: streamline
shadow_get_page_from_l1e()) and tested on Renesas Salvator-X board + H3 ES3.0 SoC (Arm64) with "updated" virtio-mmio disk backend [4] running in Driver domain and unmodified Linux Guest running on existing virtio-blk driver (frontend). No issues were observed. Guest domain 'reboot/destroy' use-cases work properly.Any feedback/help would be highly appreciated.
[1]
https://lore.kernel.org/xen-devel/[email protected]/
https://lore.kernel.org/xen-devel/[email protected]/
[2]
https://lists.xenproject.org/archives/html/xen-devel/2021-01/msg02403.html
https://lists.xenproject.org/archives/html/xen-devel/2021-01/msg02536.html
[3] https://github.com/otyshchenko1/xen/commits/libxl_virtio
[4] https://github.com/xen-troops/virtio-disk/commits/ioreq_ml3Julien Grall (1):
libxl: Introduce basic virtio-mmio support on ArmOleksandr Tyshchenko (1):
libxl: Add support for Virtio disk configurationdocs/man/xl-disk-configuration.5.pod.in | 27 + tools/include/libxl.h | 6 + tools/libs/light/libxl_arm.c | 133 ++++- tools/libs/light/libxl_device.c | 38 +- tools/libs/light/libxl_disk.c | 99 +++- tools/libs/light/libxl_types.idl | 4 + tools/libs/light/libxl_types_internal.idl | 1 + tools/libs/light/libxl_utils.c | 2 + tools/libs/util/libxlu_disk_l.c | 881 +++++++++++++++--------------- tools/libs/util/libxlu_disk_l.h | 2 +- tools/libs/util/libxlu_disk_l.l | 1 + tools/xl/xl_block.c | 11 + xen/include/public/arch-arm.h | 7 + 13 files changed, 764 insertions(+), 448 deletions(-)
Signature · 3 lines
Regards, Oleksandr Tyshchenko