All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/12] arm: more kconfig configurability and small default configs
@ 2018-07-06 23:12 Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 01/12] arm: remove the ARM HDLCD driver Stefano Stabellini
                   ` (11 more replies)
  0 siblings, 12 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:12 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, xen-devel

Hi all,

This patch series is the first step toward building a small certifiable
Xen hypervisor for ARM boards.

The series makes a few changes to allow disabling more kconfig options:
most of them already exist but cannot be disabled. It also introduces a
reference kconfig for Renesas RCar (due to popular demand, candidate for
certifications), Xilinx MPSoC, and for QEMU aarch64 (not for
certifications, but useful for debugging).

The last three patches clarify and make changes to the security support
status of kconfig options in Xen. We might want to merge them into
previous patches, or move them earlier in the series. I am happy to do
that once we settled on the required wording for SUPPORT.md.

Cheers,

Stefano


Most important changes in v7:
- improved wording of support statements
- remove SCHED_NULL from supported



Stefano Stabellini (12):
      arm: remove the ARM HDLCD driver
      arm: make it possible to disable HAS_GICV3
      arm: rename HAS_GICV3 to GICV3
      Make MEM_ACCESS configurable
      make it possible to enable/disable UART drivers
      arm: make it possible to disable the SMMU driver
      arm: add a tiny kconfig configuration
      arm: add ALL, QEMU, Rcar3 and MPSoC configs
      xen: add per-platform defaults for NR_CPUS
      xen: add cloc target
      xen: specify support for EXPERT and DEBUG Kconfig options
      xen: clarify the security-support status of Kconfig options on ARM

 SUPPORT.md                               |  16 ++
 tools/firmware/xen-dir/shim.config       |   2 +-
 xen/Makefile                             |  12 ++
 xen/arch/Kconfig                         |   3 +
 xen/arch/arm/Kconfig                     |  17 +-
 xen/arch/arm/Makefile                    |   4 +-
 xen/arch/arm/configs/tiny64.conf         |  38 +++++
 xen/arch/arm/platforms/Kconfig           |  55 ++++++
 xen/arch/arm/platforms/Makefile          |   2 +-
 xen/arch/arm/platforms/vexpress.c        |  35 ----
 xen/arch/arm/vgic.c                      |   2 +-
 xen/arch/arm/vgic/vgic.c                 |   2 +-
 xen/arch/x86/Kconfig                     |   2 +-
 xen/common/Kconfig                       |  10 +-
 xen/common/Makefile                      |   2 +-
 xen/common/domctl.c                      |   2 +-
 xen/drivers/char/Kconfig                 |  15 +-
 xen/drivers/passthrough/Kconfig          |  12 ++
 xen/drivers/passthrough/arm/Makefile     |   2 +-
 xen/drivers/video/Kconfig                |   3 -
 xen/drivers/video/Makefile               |   1 -
 xen/drivers/video/arm_hdlcd.c            | 281 -------------------------------
 xen/include/asm-arm/gic.h                |   4 +-
 xen/include/asm-arm/platforms/vexpress.h |   6 -
 xen/include/asm-arm/vgic.h               |   4 +-
 xen/include/xen/mem_access.h             |   4 +-
 xen/include/xsm/dummy.h                  |   2 +-
 xen/include/xsm/xsm.h                    |   4 +-
 xen/xsm/dummy.c                          |   2 +-
 xen/xsm/flask/hooks.c                    |   4 +-
 30 files changed, 186 insertions(+), 362 deletions(-)
 create mode 100644 xen/arch/arm/configs/tiny64.conf
 create mode 100644 xen/arch/arm/platforms/Kconfig
 delete mode 100644 xen/drivers/video/arm_hdlcd.c

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 01/12] arm: remove the ARM HDLCD driver
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 02/12] arm: make it possible to disable HAS_GICV3 Stefano Stabellini
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, xen-devel

The ARM HDLCD driver is unused. The device itself can only be found on
Virtual Express boards that are for early development only. Remove the
driver.

Also remove vexpress_syscfg, now unused, and "select VIDEO" that is not
useful anymore.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
---
Changes in v3:
- remove "select VIDEO"
- remove vexpress_syscfg
Changes in v2:
- patch added
---
 xen/arch/arm/Kconfig                     |   2 -
 xen/arch/arm/platforms/vexpress.c        |  35 ----
 xen/drivers/video/Kconfig                |   3 -
 xen/drivers/video/Makefile               |   1 -
 xen/drivers/video/arm_hdlcd.c            | 281 -------------------------------
 xen/include/asm-arm/platforms/vexpress.h |   6 -
 6 files changed, 328 deletions(-)
 delete mode 100644 xen/drivers/video/arm_hdlcd.c

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 8174c0c..4dc7ef5 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -17,12 +17,10 @@ config ARM_64
 config ARM
 	def_bool y
 	select HAS_ALTERNATIVE
-	select HAS_ARM_HDLCD
 	select HAS_DEVICE_TREE
 	select HAS_MEM_ACCESS
 	select HAS_PASSTHROUGH
 	select HAS_PDX
-	select VIDEO
 
 config ARCH_DEFCONFIG
 	string
diff --git a/xen/arch/arm/platforms/vexpress.c b/xen/arch/arm/platforms/vexpress.c
index 70839d6..b6193f7 100644
--- a/xen/arch/arm/platforms/vexpress.c
+++ b/xen/arch/arm/platforms/vexpress.c
@@ -59,41 +59,6 @@ static inline int vexpress_ctrl_start(uint32_t *syscfg, int write,
     return 0;
 }
 
-int vexpress_syscfg(int write, int function, int device, uint32_t *data)
-{
-    uint32_t *syscfg = (uint32_t *) FIXMAP_ADDR(FIXMAP_MISC);
-    int ret = -1;
-
-    set_fixmap(FIXMAP_MISC, maddr_to_mfn(V2M_SYS_MMIO_BASE),
-               PAGE_HYPERVISOR_NOCACHE);
-
-    if ( syscfg[V2M_SYS_CFGCTRL/4] & V2M_SYS_CFG_START )
-        goto out;
-
-    /* clear the complete bit in the V2M_SYS_CFGSTAT status register */
-    syscfg[V2M_SYS_CFGSTAT/4] = 0;
-
-    if ( write )
-    {
-        /* write data */
-        syscfg[V2M_SYS_CFGDATA/4] = *data;
-
-        if ( vexpress_ctrl_start(syscfg, write, function, device) < 0 )
-            goto out;
-    } else {
-        if ( vexpress_ctrl_start(syscfg, write, function, device) < 0 )
-            goto out;
-        else
-            /* read data */
-            *data = syscfg[V2M_SYS_CFGDATA/4];
-    }
-
-    ret = 0;
-out:
-    clear_fixmap(FIXMAP_MISC);
-    return ret;
-}
-
 /*
  * TODO: Get base address from the device tree
  * See arm,vexpress-reset node
diff --git a/xen/drivers/video/Kconfig b/xen/drivers/video/Kconfig
index 52e8ce6..41ca503 100644
--- a/xen/drivers/video/Kconfig
+++ b/xen/drivers/video/Kconfig
@@ -11,6 +11,3 @@ config VGA
 	  Enable VGA output for the Xen hypervisor.
 
 	  If unsure, say Y.
-
-config HAS_ARM_HDLCD
-	bool
diff --git a/xen/drivers/video/Makefile b/xen/drivers/video/Makefile
index 2bb91d6..2b3fc76 100644
--- a/xen/drivers/video/Makefile
+++ b/xen/drivers/video/Makefile
@@ -4,4 +4,3 @@ obj-$(CONFIG_VIDEO) += font_8x16.o
 obj-$(CONFIG_VIDEO) += font_8x8.o
 obj-$(CONFIG_VIDEO) += lfb.o
 obj-$(CONFIG_VGA) += vesa.o
-obj-$(CONFIG_HAS_ARM_HDLCD) += arm_hdlcd.o
diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c
deleted file mode 100644
index e1174b2..0000000
--- a/xen/drivers/video/arm_hdlcd.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * xen/drivers/video/arm_hdlcd.c
- *
- * Driver for ARM HDLCD Controller
- *
- * Stefano Stabellini <stefano.stabellini@eu.citrix.com>
- * Copyright (c) 2013 Citrix Systems.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <asm/delay.h>
-#include <asm/types.h>
-#include <asm/platforms/vexpress.h>
-#include <xen/device_tree.h>
-#include <xen/libfdt/libfdt.h>
-#include <xen/init.h>
-#include <xen/mm.h>
-#include "font.h"
-#include "lfb.h"
-#include "modelines.h"
-
-#define HDLCD ((volatile uint32_t *) FIXMAP_ADDR(FIXMAP_MISC))
-
-#define HDLCD_INTMASK       (0x18/4)
-#define HDLCD_FBBASE        (0x100/4)
-#define HDLCD_LINELENGTH    (0x104/4)
-#define HDLCD_LINECOUNT     (0x108/4)
-#define HDLCD_LINEPITCH     (0x10C/4)
-#define HDLCD_BUS           (0x110/4)
-#define HDLCD_VSYNC         (0x200/4)
-#define HDLCD_VBACK         (0x204/4)
-#define HDLCD_VDATA         (0x208/4)
-#define HDLCD_VFRONT        (0x20C/4)
-#define HDLCD_HSYNC         (0x210/4)
-#define HDLCD_HBACK         (0x214/4)
-#define HDLCD_HDATA         (0x218/4)
-#define HDLCD_HFRONT        (0x21C/4)
-#define HDLCD_POLARITIES    (0x220/4)
-#define HDLCD_COMMAND       (0x230/4)
-#define HDLCD_PF            (0x240/4)
-#define HDLCD_RED           (0x244/4)
-#define HDLCD_GREEN         (0x248/4)
-#define HDLCD_BLUE          (0x24C/4)
-
-struct color_masks {
-    int red_shift;
-    int red_size;
-    int green_shift;
-    int green_size;
-    int blue_shift;
-    int blue_size;
-};
-
-struct pixel_colors {
-    const char* bpp;
-    struct color_masks colors;
-};
-
-struct pixel_colors __initdata colors[] = {
-    { "16", { 0, 5, 11, 5, 6, 5 } },
-    { "24", { 0, 8, 16, 8, 8, 8 } },
-    { "32", { 0, 8, 16, 8, 8, 8 } },
-};
-
-static void vga_noop_puts(const char *s) {}
-void (*video_puts)(const char *) = vga_noop_puts;
-
-static void hdlcd_flush(void)
-{
-    dsb(sy);
-}
-
-static int __init get_color_masks(const char* bpp, struct color_masks **masks)
-{
-    int i;
-    for ( i = 0; i < ARRAY_SIZE(colors); i++ )
-    {
-        if ( !strncmp(colors[i].bpp, bpp, 2) )
-        {
-            *masks = &colors[i].colors;
-            return 0;
-        }
-    }
-    return -1;
-}
-
-static void __init set_pixclock(uint32_t pixclock)
-{
-    if ( dt_find_compatible_node(NULL, NULL, "arm,vexpress") )
-            vexpress_syscfg(1, V2M_SYS_CFG_OSC_FUNC,
-                            V2M_SYS_CFG_OSC5, &pixclock);
-}
-
-void __init video_init(void)
-{
-    struct lfb_prop lfbp;
-    unsigned char *lfb;
-    paddr_t hdlcd_start, hdlcd_size;
-    paddr_t framebuffer_start, framebuffer_size;
-    const char *mode_string;
-    char _mode_string[16];
-    int bytes_per_pixel = 4;
-    struct color_masks *c = NULL;
-    struct modeline *videomode = NULL;
-    int i;
-    const struct dt_device_node *dev;
-    const __be32 *cells;
-    u32 lenp;
-    int res;
-
-    dev = dt_find_compatible_node(NULL, NULL, "arm,hdlcd");
-
-    if ( !dev )
-    {
-        printk("HDLCD: Cannot find node compatible with \"arm,hdcld\"\n");
-        return;
-    }
-
-    res = dt_device_get_address(dev, 0, &hdlcd_start, &hdlcd_size);
-    if ( !res )
-    {
-        printk("HDLCD: Unable to retrieve MMIO base address\n");
-        return;
-    }
-
-    cells = dt_get_property(dev, "framebuffer", &lenp);
-    if ( !cells )
-    {
-        printk("HDLCD: Unable to retrieve framebuffer property\n");
-        return;
-    }
-
-    framebuffer_start = dt_next_cell(dt_n_addr_cells(dev), &cells);
-    framebuffer_size = dt_next_cell(dt_n_size_cells(dev), &cells);
-
-    if ( !hdlcd_start )
-    {
-        printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n");
-        return;
-    }
-
-    if ( !framebuffer_start )
-    {
-        printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n");
-        return;
-    }
-
-    res = dt_property_read_string(dev, "mode", &mode_string);
-    if ( res )
-    {
-        get_color_masks("32", &c);
-        memcpy(_mode_string, "1280x1024@60", strlen("1280x1024@60") + 1);
-        bytes_per_pixel = 4;
-    }
-    else if ( strlen(mode_string) < strlen("800x600@60") ||
-            strlen(mode_string) > sizeof(_mode_string) - 1 )
-    {
-        printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string);
-        return;
-    } else {
-        char *s = strchr(mode_string, '-');
-        if ( !s )
-        {
-            printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n",
-                         mode_string);
-            get_color_masks("32", &c);
-            memcpy(_mode_string, mode_string, strlen(mode_string) + 1);
-            bytes_per_pixel = 4;
-        } else {
-            if ( strlen(s) < 6 )
-            {
-                printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string);
-                return;
-            }
-            s++;
-            if ( get_color_masks(s, &c) < 0 )
-            {
-                printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s);
-                return;
-            }
-            bytes_per_pixel = simple_strtoll(s, NULL, 10) / 8;
-        }
-        i = s - mode_string - 1;
-        memcpy(_mode_string, mode_string, i);
-        memcpy(_mode_string + i, mode_string + i + 3, 4);
-    }
-
-    for ( i = 0; i < ARRAY_SIZE(videomodes); i++ ) {
-        if ( !strcmp(_mode_string, videomodes[i].mode) )
-        {
-            videomode = &videomodes[i];
-            break;
-        }
-    }
-    if ( !videomode )
-    {
-        printk(KERN_WARNING "HDLCD: unsupported videomode %s\n",
-               _mode_string);
-        return;
-    }
-
-    if ( framebuffer_size < bytes_per_pixel * videomode->xres * videomode->yres )
-    {
-        printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n");
-        return;
-    }
-
-    printk(KERN_INFO "Initializing HDLCD driver\n");
-
-    lfb = ioremap_wc(framebuffer_start, framebuffer_size);
-    if ( !lfb )
-    {
-        printk(KERN_ERR "Couldn't map the framebuffer\n");
-        return;
-    }
-    memset(lfb, 0x00, bytes_per_pixel * videomode->xres * videomode->yres);
-
-    /* uses FIXMAP_MISC */
-    set_pixclock(videomode->pixclock);
-
-    set_fixmap(FIXMAP_MISC, maddr_to_mfn(hdlcd_start), PAGE_HYPERVISOR_NOCACHE);
-    HDLCD[HDLCD_COMMAND] = 0;
-
-    HDLCD[HDLCD_LINELENGTH] = videomode->xres * bytes_per_pixel;
-    HDLCD[HDLCD_LINECOUNT] = videomode->yres - 1;
-    HDLCD[HDLCD_LINEPITCH] = videomode->xres * bytes_per_pixel;
-    HDLCD[HDLCD_PF] = ((bytes_per_pixel - 1) << 3);
-    HDLCD[HDLCD_INTMASK] = 0;
-    HDLCD[HDLCD_FBBASE] = framebuffer_start;
-    HDLCD[HDLCD_BUS] = 0xf00 | (1 << 4);
-    HDLCD[HDLCD_VBACK] = videomode->vback - 1;
-    HDLCD[HDLCD_VSYNC] = videomode->vsync - 1;
-    HDLCD[HDLCD_VDATA] = videomode->yres - 1;
-    HDLCD[HDLCD_VFRONT] = videomode->vfront - 1;
-    HDLCD[HDLCD_HBACK] = videomode->hback - 1;
-    HDLCD[HDLCD_HSYNC] = videomode->hsync - 1;
-    HDLCD[HDLCD_HDATA] = videomode->xres - 1;
-    HDLCD[HDLCD_HFRONT] = videomode->hfront - 1;
-    HDLCD[HDLCD_POLARITIES] = (1 << 2) | (1 << 3);
-    HDLCD[HDLCD_RED] = (c->red_size << 8) | c->red_shift;
-    HDLCD[HDLCD_GREEN] = (c->green_size << 8) | c->green_shift;
-    HDLCD[HDLCD_BLUE] = (c->blue_size << 8) | c->blue_shift;
-    HDLCD[HDLCD_COMMAND] = 1;
-    clear_fixmap(FIXMAP_MISC);
-
-    lfbp.pixel_on = (((1 << c->red_size) - 1) << c->red_shift) |
-        (((1 << c->green_size) - 1) << c->green_shift) |
-        (((1 << c->blue_size) - 1) << c->blue_shift);
-    lfbp.lfb = lfb;
-    lfbp.font = &font_vga_8x16;
-    lfbp.bits_per_pixel = bytes_per_pixel*8;
-    lfbp.bytes_per_line = bytes_per_pixel*videomode->xres;
-    lfbp.width = videomode->xres;
-    lfbp.height = videomode->yres;
-    lfbp.flush = hdlcd_flush;
-    lfbp.text_columns = videomode->xres / 8;
-    lfbp.text_rows = videomode->yres / 16;
-    if ( lfb_init(&lfbp) < 0 )
-            return;
-    video_puts = lfb_scroll_puts;
-}
-
-void __init video_endboot(void) { }
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/include/asm-arm/platforms/vexpress.h b/xen/include/asm-arm/platforms/vexpress.h
index 5cf3aba..8b45d3a 100644
--- a/xen/include/asm-arm/platforms/vexpress.h
+++ b/xen/include/asm-arm/platforms/vexpress.h
@@ -26,12 +26,6 @@
 /* Board-specific: base address of system controller */
 #define SP810_ADDRESS 0x1C020000
 
-#ifndef __ASSEMBLY__
-#include <xen/inttypes.h>
-
-int vexpress_syscfg(int write, int function, int device, uint32_t *data);
-#endif
-
 #endif /* __ASM_ARM_PLATFORMS_VEXPRESS_H */
 /*
  * Local variables:
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 02/12] arm: make it possible to disable HAS_GICV3
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 01/12] arm: remove the ARM HDLCD driver Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 03/12] arm: rename HAS_GICV3 to GICV3 Stefano Stabellini
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, George.Dunlap, andrew.cooper3,
	Ian.Jackson, George.Dunlap, dfaggioli, jbeulich, xen-devel

Today it is a silent option. This patch adds a one line description and
makes it optional.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>
CC: George.Dunlap@eu.citrix.com
CC: Ian.Jackson@eu.citrix.com
CC: jbeulich@suse.com
CC: andrew.cooper3@citrix.com

---
Changes in v3:
- remove any changes to MEM_ACCESS
- update commit message

Changes in v2:
- make HAS_GICv3 depend on ARM_64
- remove modifications to ARM_HDLCD kconfig, it has been removed
---
 xen/arch/arm/Kconfig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 4dc7ef5..fb69a66 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -12,7 +12,6 @@ config ARM_32
 config ARM_64
 	def_bool y
 	depends on 64BIT
-	select HAS_GICV3
 
 config ARM
 	def_bool y
@@ -42,6 +41,13 @@ config ACPI
 
 config HAS_GICV3
 	bool
+	prompt "GICv3 driver"
+	depends on ARM_64
+	default y
+	---help---
+
+	  Driver for the ARM Generic Interrupt Controller v3.
+	  If unsure, say Y
 
 config HAS_ITS
         bool
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 03/12] arm: rename HAS_GICV3 to GICV3
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 01/12] arm: remove the ARM HDLCD driver Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 02/12] arm: make it possible to disable HAS_GICV3 Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 04/12] Make MEM_ACCESS configurable Stefano Stabellini
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, xen-devel

HAS_GICV3 has become selectable by the user. To mark the change, rename
the option from HAS_GICV3 to GICV3.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>

---
Changes in v3:
- no changes

Changes in v2:
- patch added
---
 xen/arch/arm/Kconfig       | 4 ++--
 xen/arch/arm/Makefile      | 4 ++--
 xen/arch/arm/vgic.c        | 2 +-
 xen/arch/arm/vgic/vgic.c   | 2 +-
 xen/include/asm-arm/gic.h  | 4 ++--
 xen/include/asm-arm/vgic.h | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index fb69a66..66adce4 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -39,7 +39,7 @@ config ACPI
 	  Advanced Configuration and Power Interface (ACPI) support for Xen is
 	  an alternative to device tree on ARM64.
 
-config HAS_GICV3
+config GICV3
 	bool
 	prompt "GICv3 driver"
 	depends on ARM_64
@@ -52,7 +52,7 @@ config HAS_GICV3
 config HAS_ITS
         bool
         prompt "GICv3 ITS MSI controller support" if EXPERT = "y"
-        depends on HAS_GICV3 && !NEW_VGIC
+        depends on GICV3 && !NEW_VGIC
 
 config NEW_VGIC
 	bool
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index a9533b1..b9c2fb7 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -17,7 +17,7 @@ obj-y += domctl.o
 obj-$(EARLY_PRINTK) += early_printk.o
 obj-y += gic.o
 obj-y += gic-v2.o
-obj-$(CONFIG_HAS_GICV3) += gic-v3.o
+obj-$(CONFIG_GICV3) += gic-v3.o
 obj-$(CONFIG_HAS_ITS) += gic-v3-its.o
 obj-$(CONFIG_HAS_ITS) += gic-v3-lpi.o
 obj-y += guestcopy.o
@@ -51,7 +51,7 @@ ifneq ($(CONFIG_NEW_VGIC),y)
 obj-y += gic-vgic.o
 obj-y += vgic.o
 obj-y += vgic-v2.o
-obj-$(CONFIG_HAS_GICV3) += vgic-v3.o
+obj-$(CONFIG_GICV3) += vgic-v3.o
 obj-$(CONFIG_HAS_ITS) += vgic-v3-its.o
 endif
 obj-y += vm_event.o
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 3fafdd0..7a2c455 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -98,7 +98,7 @@ int domain_vgic_register(struct domain *d, int *mmio_count)
 {
     switch ( d->arch.vgic.version )
     {
-#ifdef CONFIG_HAS_GICV3
+#ifdef CONFIG_GICV3
     case GIC_V3:
         if ( vgic_v3_init(d, mmio_count) )
            return -ENODEV;
diff --git a/xen/arch/arm/vgic/vgic.c b/xen/arch/arm/vgic/vgic.c
index a35449b..832632a 100644
--- a/xen/arch/arm/vgic/vgic.c
+++ b/xen/arch/arm/vgic/vgic.c
@@ -974,7 +974,7 @@ unsigned int vgic_max_vcpus(const struct domain *d)
     return min_t(unsigned int, MAX_VIRT_CPUS, vgic_vcpu_limit);
 }
 
-#ifdef CONFIG_HAS_GICV3
+#ifdef CONFIG_GICV3
 /* Dummy implementation to allow building without actual vGICv3 support. */
 void vgic_v3_setup_hw(paddr_t dbase,
                       unsigned int nr_rdist_regions,
diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index 58b910f..22fa122 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -166,7 +166,7 @@
 
 #define DT_MATCH_GIC_V3 DT_MATCH_COMPATIBLE("arm,gic-v3")
 
-#ifdef CONFIG_HAS_GICV3
+#ifdef CONFIG_GICV3
 /*
  * GICv3 registers that needs to be saved/restored
  */
@@ -194,7 +194,7 @@ struct gic_v2 {
  */
 union gic_state_data {
     struct gic_v2 v2;
-#ifdef CONFIG_HAS_GICV3
+#ifdef CONFIG_GICV3
     struct gic_v3 v3;
 #endif
 };
diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h
index 2a58ea3..374fdaa 100644
--- a/xen/include/asm-arm/vgic.h
+++ b/xen/include/asm-arm/vgic.h
@@ -156,7 +156,7 @@ struct vgic_dist {
     struct pending_irq *pending_irqs;
     /* Base address for guest GIC */
     paddr_t dbase; /* Distributor base address */
-#ifdef CONFIG_HAS_GICV3
+#ifdef CONFIG_GICV3
     /* GIC V3 addressing */
     /* List of contiguous occupied by the redistributors */
     struct vgic_rdist_region {
@@ -359,7 +359,7 @@ unsigned int vgic_max_vcpus(const struct domain *d);
 void vgic_v2_setup_hw(paddr_t dbase, paddr_t cbase, paddr_t csize,
                       paddr_t vbase, uint32_t aliased_offset);
 
-#ifdef CONFIG_HAS_GICV3
+#ifdef CONFIG_GICV3
 struct rdist_region;
 void vgic_v3_setup_hw(paddr_t dbase,
                       unsigned int nr_rdist_regions,
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 04/12] Make MEM_ACCESS configurable
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (2 preceding siblings ...)
  2018-07-06 23:13 ` [PATCH v7 03/12] arm: rename HAS_GICV3 to GICV3 Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 05/12] make it possible to enable/disable UART drivers Stefano Stabellini
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: tim, sstabellini, andrii_anisov, George.Dunlap, andrew.cooper3,
	ian.jackson, George.Dunlap, dfaggioli, jbeulich, wei.liu2,
	dgdegra, xen-devel

Select MEM_ACCESS_ALWAYS_ON on x86 to mark that MEM_ACCESS is not
configurable on x86. Avoid selecting it on ARM.
Rename HAS_MEM_ACCESS to MEM_ACCESS everywhere. Add a prompt and a
description to MEM_ACCESS in xen/common/Kconfig.

The result is that the user-visible option is MEM_ACCESS, and it is
configurable only on ARM (disabled by default). At the moment the
arch-specific mem_access code remains enabled on ARM, even with
MEM_ACCESS=y.

The purpose is to reduce code size. The option doesn't depend on EXPERT
because it would be nice to ecurity-support configurations without
MEM_ACCESS and a non-expert should be able to disable it.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>

CC: dgdegra@tycho.nsa.gov
CC: andrew.cooper3@citrix.com
CC: George.Dunlap@eu.citrix.com
CC: ian.jackson@eu.citrix.com
CC: jbeulich@suse.com
CC: julien.grall@arm.com
CC: konrad.wilk@oracle.com
CC: sstabellini@kernel.org
CC: tim@xen.org
CC: wei.liu2@citrix.com

---
Changes in v5:
- change MEM_ACCESS_ALWAYS_ON to bool
- change default for MEM_ACCESS, default y if MEM_ACCESS_ALWAYS_ON

Changes in v4:
- remove HAS_MEM_ACCESS
- move MEM_ACCESS_ALWAYS_ON to common
- combile default and bool to def_bool

Changes in v3:
- keep HAS_MEM_ACCESS to mark that an arch can do MEM_ACCESS
- introduce MEM_ACCESS_ALWAYS_ON
- the main MEM_ACCESS option is in xen/common/Kconfig

Changes in v2:
- patch added
---
 tools/firmware/xen-dir/shim.config |  2 +-
 xen/arch/arm/Kconfig               |  1 -
 xen/arch/x86/Kconfig               |  2 +-
 xen/common/Kconfig                 | 10 +++++++++-
 xen/common/Makefile                |  2 +-
 xen/common/domctl.c                |  2 +-
 xen/include/xen/mem_access.h       |  4 ++--
 xen/include/xsm/dummy.h            |  2 +-
 xen/include/xsm/xsm.h              |  4 ++--
 xen/xsm/dummy.c                    |  2 +-
 xen/xsm/flask/hooks.c              |  4 ++--
 11 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/tools/firmware/xen-dir/shim.config b/tools/firmware/xen-dir/shim.config
index 4d5630f..21d7075 100644
--- a/tools/firmware/xen-dir/shim.config
+++ b/tools/firmware/xen-dir/shim.config
@@ -29,7 +29,7 @@ CONFIG_COMPAT=y
 CONFIG_CORE_PARKING=y
 CONFIG_HAS_ALTERNATIVE=y
 CONFIG_HAS_EX_TABLE=y
-CONFIG_HAS_MEM_ACCESS=y
+CONFIG_MEM_ACCESS=y
 CONFIG_HAS_MEM_PAGING=y
 CONFIG_HAS_MEM_SHARING=y
 CONFIG_HAS_PDX=y
diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 66adce4..2b87111 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -17,7 +17,6 @@ config ARM
 	def_bool y
 	select HAS_ALTERNATIVE
 	select HAS_DEVICE_TREE
-	select HAS_MEM_ACCESS
 	select HAS_PASSTHROUGH
 	select HAS_PDX
 
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index f64fc56..9a85fe9 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -15,7 +15,7 @@ config X86
 	select HAS_GDBSX
 	select HAS_IOPORTS
 	select HAS_KEXEC
-	select HAS_MEM_ACCESS
+	select MEM_ACCESS_ALWAYS_ON
 	select HAS_MEM_PAGING
 	select HAS_MEM_SHARING
 	select HAS_NS16550
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 9043dce..db6bb2d 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -20,9 +20,17 @@ config HAS_DEVICE_TREE
 config HAS_EX_TABLE
 	bool
 
-config HAS_MEM_ACCESS
+config MEM_ACCESS_ALWAYS_ON
 	bool
 
+config MEM_ACCESS
+	def_bool MEM_ACCESS_ALWAYS_ON
+	prompt "Memory Access and VM events" if !MEM_ACCESS_ALWAYS_ON
+	---help---
+
+	  Framework to configure memory access types for guests and receive
+	  related events in userspace.
+
 config HAS_MEM_PAGING
 	bool
 
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 24d4752..6f2b3fc 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -22,7 +22,7 @@ obj-y += lib.o
 obj-$(CONFIG_NEEDS_LIST_SORT) += list_sort.o
 obj-$(CONFIG_LIVEPATCH) += livepatch.o livepatch_elf.o
 obj-y += lzo.o
-obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o
+obj-$(CONFIG_MEM_ACCESS) += mem_access.o
 obj-y += memory.o
 obj-y += monitor.o
 obj-y += multicall.o
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 9b7bc08..891ad58 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -1085,7 +1085,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
         copyback = 1;
         break;
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
     case XEN_DOMCTL_set_access_required:
         if ( unlikely(current->domain == d) ) /* no domain_pause() */
             ret = -EPERM;
diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h
index 5ab34c1..7e95eab 100644
--- a/xen/include/xen/mem_access.h
+++ b/xen/include/xen/mem_access.h
@@ -78,7 +78,7 @@ long p2m_set_mem_access_multi(struct domain *d,
  */
 int p2m_get_mem_access(struct domain *d, gfn_t gfn, xenmem_access_t *access);
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
 int mem_access_memop(unsigned long cmd,
                      XEN_GUEST_HANDLE_PARAM(xen_mem_access_op_t) arg);
 #else
@@ -88,7 +88,7 @@ int mem_access_memop(unsigned long cmd,
 {
     return -ENOSYS;
 }
-#endif /* CONFIG_HAS_MEM_ACCESS */
+#endif /* CONFIG_MEM_ACCESS */
 
 #endif /* _XEN_MEM_ACCESS_H */
 
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index ff6b2db..b0ac1f6 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -584,7 +584,7 @@ static XSM_INLINE int xsm_vm_event_control(XSM_DEFAULT_ARG struct domain *d, int
     return xsm_default_action(action, current->domain, d);
 }
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
 static XSM_INLINE int xsm_mem_access(XSM_DEFAULT_ARG struct domain *d)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index f0c6fc7..7636bcb 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -143,7 +143,7 @@ struct xsm_operations {
 
     int (*vm_event_control) (struct domain *d, int mode, int op);
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
     int (*mem_access) (struct domain *d);
 #endif
 
@@ -582,7 +582,7 @@ static inline int xsm_vm_event_control (xsm_default_t def, struct domain *d, int
     return xsm_ops->vm_event_control(d, mode, op);
 }
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
 static inline int xsm_mem_access (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->mem_access(d);
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 6e75119..3290d04 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -127,7 +127,7 @@ void __init xsm_fixup_ops (struct xsm_operations *ops)
 
     set_to_dummy_if_null(ops, vm_event_control);
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
     set_to_dummy_if_null(ops, mem_access);
 #endif
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 78bc326..7a3ccfa 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1256,7 +1256,7 @@ static int flask_vm_event_control(struct domain *d, int mode, int op)
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__VM_EVENT);
 }
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
 static int flask_mem_access(struct domain *d)
 {
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_ACCESS);
@@ -1803,7 +1803,7 @@ static struct xsm_operations flask_ops = {
 
     .vm_event_control = flask_vm_event_control,
 
-#ifdef CONFIG_HAS_MEM_ACCESS
+#ifdef CONFIG_MEM_ACCESS
     .mem_access = flask_mem_access,
 #endif
 
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 05/12] make it possible to enable/disable UART drivers
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (3 preceding siblings ...)
  2018-07-06 23:13 ` [PATCH v7 04/12] Make MEM_ACCESS configurable Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 06/12] arm: make it possible to disable the SMMU driver Stefano Stabellini
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, xen-devel

All the UART drivers are silent options. Add one line descriptions so
that can be de/selected via menuconfig.

Add an x86 dependency to HAS_EHCI: EHCI PCI has not been used on ARM. In
fact, it depends on PCI, and moreover we have drivers for several
embedded UARTs for various ARM boards.

NS16550 remains not selectable on x86.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>
---
Changes in v4:
- improve commit message
- remove prompt for HAS_EHCI

Changes in v3:
- NS16550 prompt if ARM

Changes in v2:
- make HAS_EHCI depend on x86
---
 xen/drivers/char/Kconfig | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
index cc78ec3..b1f07f8 100644
--- a/xen/drivers/char/Kconfig
+++ b/xen/drivers/char/Kconfig
@@ -1,11 +1,11 @@
 config HAS_NS16550
-	bool
+	bool "NS16550 UART driver" if ARM
 	default y
 	help
 	  This selects the 16550-series UART support. For most systems, say Y.
 
 config HAS_CADENCE_UART
-	bool
+	bool "Xilinx Cadence UART driver"
 	default y
 	depends on ARM_64
 	help
@@ -13,7 +13,7 @@ config HAS_CADENCE_UART
 	  based board, say Y.
 
 config HAS_MVEBU
-	bool
+	bool "Marvell MVEBU UART driver"
 	default y
 	depends on ARM_64
 	help
@@ -21,7 +21,7 @@ config HAS_MVEBU
 	  based board, say Y.
 
 config HAS_PL011
-	bool
+	bool "ARM PL011 UART driver"
 	default y
 	depends on ARM
 	help
@@ -29,7 +29,7 @@ config HAS_PL011
 	  an Integrator/PP2, Integrator/CP or Versatile platform, say Y.
 
 config HAS_EXYNOS4210
-	bool
+	bool "Samsung Exynos 4210 UART driver"
 	default y
 	depends on ARM_32
 	help
@@ -37,7 +37,7 @@ config HAS_EXYNOS4210
 	  Exynos based board, say Y.
 
 config HAS_OMAP
-	bool
+	bool "Texas Instruments OMAP UART driver"
 	default y
 	depends on ARM_32
 	help
@@ -45,7 +45,7 @@ config HAS_OMAP
 	  Instruments based CPU, say Y.
 
 config HAS_SCIF
-	bool
+	bool "SuperH SCI(F) UART driver"
 	default y
 	depends on ARM
 	help
@@ -54,6 +54,7 @@ config HAS_SCIF
 
 config HAS_EHCI
 	bool
+	depends on X86
 	help
 	  This selects the USB based EHCI debug port to be used as a UART. If
 	  you have an x86 based system with USB, say Y.
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 06/12] arm: make it possible to disable the SMMU driver
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (4 preceding siblings ...)
  2018-07-06 23:13 ` [PATCH v7 05/12] make it possible to enable/disable UART drivers Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-06 23:13 ` [PATCH v7 07/12] arm: add a tiny kconfig configuration Stefano Stabellini
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, jbeulich, xen-devel

Introduce a Kconfig option for the ARM SMMUv1 and SMMUv2 driver.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
CC: jbeulich@suse.com

---
Changes in v3:
- rename SMMUv2 to ARM_SMMU
- improve help message
- use if ARM

Changes in v2:
- rename HAS_SMMUv2 to SMMUv2
- move SMMUv2 to xen/drivers/passthrough/Kconfig
---
 xen/drivers/passthrough/Kconfig      | 12 ++++++++++++
 xen/drivers/passthrough/arm/Makefile |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kconfig
index 8d90b67..a3c0649 100644
--- a/xen/drivers/passthrough/Kconfig
+++ b/xen/drivers/passthrough/Kconfig
@@ -1,3 +1,15 @@
 
 config HAS_PASSTHROUGH
 	bool
+
+if ARM
+config ARM_SMMU
+	bool "ARM SMMUv1 and v2 driver"
+	default y
+	---help---
+	  Support for implementations of the ARM System MMU architecture
+	  versions 1 and 2.
+
+	  Say Y here if your SoC includes an IOMMU device implementing the
+	  ARM SMMU architecture.
+endif
diff --git a/xen/drivers/passthrough/arm/Makefile b/xen/drivers/passthrough/arm/Makefile
index f4cd26e..0156431 100644
--- a/xen/drivers/passthrough/arm/Makefile
+++ b/xen/drivers/passthrough/arm/Makefile
@@ -1,2 +1,2 @@
 obj-y += iommu.o
-obj-y += smmu.o
+obj-$(ARM_SMMU) += smmu.o
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 07/12] arm: add a tiny kconfig configuration
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (5 preceding siblings ...)
  2018-07-06 23:13 ` [PATCH v7 06/12] arm: make it possible to disable the SMMU driver Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-23 11:17   ` Julien Grall
  2018-07-06 23:13 ` [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs Stefano Stabellini
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, xen-devel

Add a tiny kconfig configuration. Enabled only the credit scheduler.
It only carries non-default options (use make menuconfig or make
olddefconfig to produce a complete .config file).

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>

---
Changes in v7:
- remove NULL because it is still experimental
---
 xen/arch/arm/configs/tiny64.conf | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 xen/arch/arm/configs/tiny64.conf

diff --git a/xen/arch/arm/configs/tiny64.conf b/xen/arch/arm/configs/tiny64.conf
new file mode 100644
index 0000000..aecc55c
--- /dev/null
+++ b/xen/arch/arm/configs/tiny64.conf
@@ -0,0 +1,38 @@
+CONFIG_ARM_64=y
+CONFIG_ARM=y
+
+#
+# Architecture Features
+#
+# CONFIG_GICV3 is not set
+# CONFIG_MEM_ACCESS is not set
+# CONFIG_SBSA_VUART_CONSOLE is not set
+
+#
+# Common Features
+#
+# CONFIG_TMEM is not set
+CONFIG_SCHED_CREDIT=y
+# CONFIG_SCHED_CREDIT2 is not set
+# CONFIG_SCHED_RTDS is not set
+# CONFIG_SCHED_ARINC653 is not set
+# CONFIG_SCHED_NULL is not set
+# CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS is not set
+
+#
+# Device Drivers
+#
+# CONFIG_HAS_NS16550 is not set
+# CONFIG_HAS_CADENCE_UART is not set
+# CONFIG_HAS_MVEBU is not set
+# CONFIG_HAS_PL011 is not set
+# CONFIG_HAS_SCIF is not set
+# CONFIG_ARM_SMMU is not set
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_VERBOSE_DEBUG is not set
+# CONFIG_SCRUB_DEBUG is not set
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (6 preceding siblings ...)
  2018-07-06 23:13 ` [PATCH v7 07/12] arm: add a tiny kconfig configuration Stefano Stabellini
@ 2018-07-06 23:13 ` Stefano Stabellini
  2018-07-23 11:24   ` Julien Grall
  2018-07-24 13:27   ` Andrii Anisov
  2018-07-06 23:14 ` [PATCH v7 09/12] xen: add per-platform defaults for NR_CPUS Stefano Stabellini
                   ` (3 subsequent siblings)
  11 siblings, 2 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:13 UTC (permalink / raw)
  To: julien.grall
  Cc: artem_mygaiev, sstabellini, andrii_anisov, andrew.cooper3,
	George.Dunlap, dfaggioli, xen-devel, volodymyr_babchuk

Add a "Platform Support" choice with four kconfig options: QEMU, RCAR3,
MPSOC and ALL. They enable the required options for their hardware
platform. ALL enables all available platforms and it's the default. It
doesn't automatically select any of the related drivers, otherwise they
cannot be disabled. ALL is implemented by selecting hidden options
corresponding to QEMU, MPSOC and RCAR3.

In the case of the MPSOC that has a platform file under
arch/arm/platforms/, build the file if MPSOC.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
CC: artem_mygaiev@epam.com
CC: volodymyr_babchuk@epam.com

---
Changes in v5:
- turn platform support into a choice
- add ALL

Changes in v4:
- fix GICv3/GICV3
- default y to all options
- build xilinx-zynqmp if MPSOC
---
 xen/arch/arm/Kconfig            |  2 ++
 xen/arch/arm/platforms/Kconfig  | 55 +++++++++++++++++++++++++++++++++++++++++
 xen/arch/arm/platforms/Makefile |  2 +-
 3 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 xen/arch/arm/platforms/Kconfig

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 2b87111..75cacfb 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
 config ARM32_HARDEN_BRANCH_PREDICTOR
     def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
 
+source "arch/arm/platforms/Kconfig"
+
 source "common/Kconfig"
 
 source "drivers/Kconfig"
diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
new file mode 100644
index 0000000..07c5930
--- /dev/null
+++ b/xen/arch/arm/platforms/Kconfig
@@ -0,0 +1,55 @@
+choice
+	prompt "Platform Support"
+	default ALL
+	---help---
+	Choose which hardware platform to enable in Xen.
+
+	If unsure, choose ALL.
+
+config ALL
+	bool "All Platforms"
+	select MPSOC_PLATFORM
+	select QEMU_PLATFORM
+	select RCAR3_PLATFORM
+	---help---
+	Enable support for all available hardware platforms. It doesn't
+	automatically select any of the related drivers.
+
+config QEMU
+	bool "QEMU aarch virt machine support"
+	depends on ARM_64
+	select QEMU_PLATFORM
+	select GICV3
+	select HAS_PL011
+	---help---
+	Enable all the required drivers for QEMU aarch64 virt emulated
+	machine.
+
+config RCAR3
+	bool "Renesas RCar3 support"
+	depends on ARM_64
+	select RCAR3_PLATFORM
+	select HAS_SCIF
+	---help---
+	Enable all the required drivers for Renesas RCar3
+
+config MPSOC
+	bool "Xilinx Ultrascale+ MPSoC support"
+	depends on ARM_64
+	select MPSOC_PLATFORM
+	select HAS_CADENCE_UART
+	select ARM_SMMU
+	---help---
+	Enable all the required drivers for Xilinx Ultrascale+ MPSoC
+
+endchoice
+
+config QEMU_PLATFORM
+	bool
+
+config RCAR3_PLATFORM
+	bool
+
+config MPSOC_PLATFORM
+	bool
+
diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
index 80e555c..a79bdb9 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
 obj-y += sunxi.o
 obj-$(CONFIG_ARM_64) += thunderx.o
 obj-$(CONFIG_ARM_64) += xgene-storm.o
-obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
+obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 09/12] xen: add per-platform defaults for NR_CPUS
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (7 preceding siblings ...)
  2018-07-06 23:13 ` [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs Stefano Stabellini
@ 2018-07-06 23:14 ` Stefano Stabellini
  2018-07-23 11:26   ` Julien Grall
  2018-07-06 23:14 ` [PATCH v7 10/12] xen: add cloc target Stefano Stabellini
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:14 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, JBeulich, xen-devel

Add specific per-platform defaults for NR_CPUS. Note that the order of
the defaults matter: they need to go first, otherwise the generic
defaults will be applied.

This is done so that Xen builds customized for a specific hardware
platform can have the right NR_CPUS number.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
CC: JBeulich@suse.com
CC: andrew.cooper3@citrix.com

---

Changes in v6:
- remove useless additional default for ALL
---
 xen/arch/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
index cf0acb7..1954d1c 100644
--- a/xen/arch/Kconfig
+++ b/xen/arch/Kconfig
@@ -3,6 +3,9 @@ config NR_CPUS
 	int "Maximum number of physical CPUs"
 	range 1 4095
 	default "256" if X86
+	default "8" if ARM && RCAR3
+	default "4" if ARM && QEMU
+	default "4" if ARM && MPSOC
 	default "128" if ARM
 	---help---
 	  Specifies the maximum number of physical CPUs which Xen will support.
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 10/12] xen: add cloc target
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (8 preceding siblings ...)
  2018-07-06 23:14 ` [PATCH v7 09/12] xen: add per-platform defaults for NR_CPUS Stefano Stabellini
@ 2018-07-06 23:14 ` Stefano Stabellini
  2018-07-06 23:14 ` [PATCH v7 11/12] xen: specify support for EXPERT and DEBUG Kconfig options Stefano Stabellini
  2018-07-06 23:14 ` [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM Stefano Stabellini
  11 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:14 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, jbeulich, xen-devel

Add a Xen build target to count the lines of code of the source files
built. Uses `cloc' to do the job.

With Xen on ARM taking off in embedded, IoT, and automotive, we are
seeing more and more uses of Xen in constrained environments. Users and
system integrators want the smallest Xen and Dom0 configurations. Some
of these deployments require certifications, where you definitely want
the smallest lines of code count. I provided this patch to give us the
lines of code count for that purpose.

Use the .o.d files to account for all the built source files. Generate a
list for the `cloc' utility and invoke `cloc'.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
CC: jbeulich@suse.com
CC: andrew.cooper3@citrix.com
---
Changes in v4:
- use grep regex to get multiple source files from .d files

Changes in v3:
- remove build as dependecy for the cloc target

Changes in v2:
- change implementation to use .o.d to find built source files
---
 xen/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/Makefile b/xen/Makefile
index 62d479c..338d5a3 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -267,3 +267,15 @@ $(KCONFIG_CONFIG):
 include/config/auto.conf.cmd: ;
 
 -include $(BASEDIR)/include/config/auto.conf.cmd
+
+.PHONY: cloc
+cloc:
+	$(eval tmpfile := $(shell mktemp))
+	$(foreach f, $(shell find $(BASEDIR) -name *.o.d), \
+		$(eval path := $(dir $(f))) \
+		$(eval names := $(shell grep -o "[a-zA-Z0-9_/-]*\.[cS]" $(f))) \
+		$(foreach sf, $(names), \
+			$(shell if test -f $(path)/$(sf) ; then echo $(path)/$(sf) >> $(tmpfile); fi;)))
+	cloc --list-file=$(tmpfile)
+	rm $(tmpfile)
+
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 11/12] xen: specify support for EXPERT and DEBUG Kconfig options
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (9 preceding siblings ...)
  2018-07-06 23:14 ` [PATCH v7 10/12] xen: add cloc target Stefano Stabellini
@ 2018-07-06 23:14 ` Stefano Stabellini
  2018-07-16 12:50   ` Jan Beulich
  2018-07-06 23:14 ` [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM Stefano Stabellini
  11 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:14 UTC (permalink / raw)
  To: julien.grall
  Cc: Tim Deegan, sstabellini, andrii_anisov, George.Dunlap,
	andrew.cooper3, Ian.Jackson, George.Dunlap, dfaggioli, jbeulich,
	Wei Liu, xen-devel

Add a clear statement about them, reflecting the current security
support status of Kconfig options (no changes to current policies).

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
CC: George.Dunlap@eu.citrix.com
CC: Ian.Jackson@eu.citrix.com
CC: jbeulich@suse.com
CC: andrew.cooper3@citrix.com
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
---
Changes in v7:
- talk about EXPERT and DEBUG rather than CONFIG_EXPERT and CONFIG_DEBUG
---
 SUPPORT.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/SUPPORT.md b/SUPPORT.md
index 264b23f..e3e49e2 100644
--- a/SUPPORT.md
+++ b/SUPPORT.md
@@ -16,6 +16,12 @@ for the definitions of the support status levels etc.
 
 # Feature Support
 
+## Kconfig
+
+EXPERT and DEBUG Kconfig options are not security supported. Other
+Kconfig options are supported, if the related features are marked as
+supported in this document.
+
 ## Host Architecture
 
 ### x86-64
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
                   ` (10 preceding siblings ...)
  2018-07-06 23:14 ` [PATCH v7 11/12] xen: specify support for EXPERT and DEBUG Kconfig options Stefano Stabellini
@ 2018-07-06 23:14 ` Stefano Stabellini
  2018-07-23 11:37   ` Julien Grall
  11 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-06 23:14 UTC (permalink / raw)
  To: julien.grall
  Cc: sstabellini, andrii_anisov, George.Dunlap, andrew.cooper3,
	Ian.Jackson, George.Dunlap, dfaggioli, jbeulich, xen-devel

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
CC: George.Dunlap@eu.citrix.com
CC: Ian.Jackson@eu.citrix.com
CC: jbeulich@suse.com
CC: andrew.cooper3@citrix.com
---
 SUPPORT.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/SUPPORT.md b/SUPPORT.md
index e3e49e2..151a63d 100644
--- a/SUPPORT.md
+++ b/SUPPORT.md
@@ -22,6 +22,16 @@ EXPERT and DEBUG Kconfig options are not security supported. Other
 Kconfig options are supported, if the related features are marked as
 supported in this document.
 
+On ARM, a wider range of Kconfig configurations is available to enable
+very small lines of code counts in the hypervisor. Not all possible
+combinations of kconfig options are security supported. Instead, a few
+pre-canned configurations have been added to xen/arch/arm/configs: they
+are security suppored. Configurations derived from the pre-canned files
+by adding non-listed options with their default values, or by enabling
+any of the platform options under "Platform Support" (and their
+dependent options) are security supported, unless stated
+otherwise.
+
 ## Host Architecture
 
 ### x86-64
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 11/12] xen: specify support for EXPERT and DEBUG Kconfig options
  2018-07-06 23:14 ` [PATCH v7 11/12] xen: specify support for EXPERT and DEBUG Kconfig options Stefano Stabellini
@ 2018-07-16 12:50   ` Jan Beulich
  0 siblings, 0 replies; 42+ messages in thread
From: Jan Beulich @ 2018-07-16 12:50 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Tim Deegan, andrii_anisov, George Dunlap, Andrew Cooper,
	Ian Jackson, george.dunlap, xen-devel, Julien Grall, Wei Liu,
	Dario Faggioli

>>> On 07.07.18 at 01:14, <sstabellini@kernel.org> wrote:
> Add a clear statement about them, reflecting the current security
> support status of Kconfig options (no changes to current policies).
> 
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>

Acked-by: Jan Beulich <jbeulich@suse.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 07/12] arm: add a tiny kconfig configuration
  2018-07-06 23:13 ` [PATCH v7 07/12] arm: add a tiny kconfig configuration Stefano Stabellini
@ 2018-07-23 11:17   ` Julien Grall
  0 siblings, 0 replies; 42+ messages in thread
From: Julien Grall @ 2018-07-23 11:17 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: andrew.cooper3, dfaggioli, andrii_anisov, George.Dunlap, xen-devel

Hi Stefano,

On 07/07/18 00:13, Stefano Stabellini wrote:
> Add a tiny kconfig configuration. Enabled only the credit scheduler.
> It only carries non-default options (use make menuconfig or make
> olddefconfig to produce a complete .config file).
> 
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

> 
> ---
> Changes in v7:
> - remove NULL because it is still experimental
> ---
>   xen/arch/arm/configs/tiny64.conf | 38 ++++++++++++++++++++++++++++++++++++++
>   1 file changed, 38 insertions(+)
>   create mode 100644 xen/arch/arm/configs/tiny64.conf
> 
> diff --git a/xen/arch/arm/configs/tiny64.conf b/xen/arch/arm/configs/tiny64.conf
> new file mode 100644
> index 0000000..aecc55c
> --- /dev/null
> +++ b/xen/arch/arm/configs/tiny64.conf
> @@ -0,0 +1,38 @@
> +CONFIG_ARM_64=y
> +CONFIG_ARM=y
> +
> +#
> +# Architecture Features
> +#
> +# CONFIG_GICV3 is not set
> +# CONFIG_MEM_ACCESS is not set
> +# CONFIG_SBSA_VUART_CONSOLE is not set
> +
> +#
> +# Common Features
> +#
> +# CONFIG_TMEM is not set
> +CONFIG_SCHED_CREDIT=y
> +# CONFIG_SCHED_CREDIT2 is not set
> +# CONFIG_SCHED_RTDS is not set
> +# CONFIG_SCHED_ARINC653 is not set
> +# CONFIG_SCHED_NULL is not set
> +# CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS is not set
> +
> +#
> +# Device Drivers
> +#
> +# CONFIG_HAS_NS16550 is not set
> +# CONFIG_HAS_CADENCE_UART is not set
> +# CONFIG_HAS_MVEBU is not set
> +# CONFIG_HAS_PL011 is not set
> +# CONFIG_HAS_SCIF is not set
> +# CONFIG_ARM_SMMU is not set
> +
> +#
> +# Debugging Options
> +#
> +# CONFIG_DEBUG is not set
> +# CONFIG_FRAME_POINTER is not set
> +# CONFIG_VERBOSE_DEBUG is not set
> +# CONFIG_SCRUB_DEBUG is not set
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-06 23:13 ` [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs Stefano Stabellini
@ 2018-07-23 11:24   ` Julien Grall
  2018-07-24 22:08     ` Stefano Stabellini
  2018-07-24 13:27   ` Andrii Anisov
  1 sibling, 1 reply; 42+ messages in thread
From: Julien Grall @ 2018-07-23 11:24 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: artem_mygaiev, andrii_anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, xen-devel, volodymyr_babchuk

Hi Stefano,

On 07/07/18 00:13, Stefano Stabellini wrote:
> +config QEMU_PLATFORM
> +	bool
> +
> +config RCAR3_PLATFORM
> +	bool

Those 2 options do nothing. So I would prefer if they are removed. With 
that fixed:

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 09/12] xen: add per-platform defaults for NR_CPUS
  2018-07-06 23:14 ` [PATCH v7 09/12] xen: add per-platform defaults for NR_CPUS Stefano Stabellini
@ 2018-07-23 11:26   ` Julien Grall
  0 siblings, 0 replies; 42+ messages in thread
From: Julien Grall @ 2018-07-23 11:26 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: andrii_anisov, andrew.cooper3, George.Dunlap, dfaggioli,
	JBeulich, xen-devel

Hi Stefano,

On 07/07/18 00:14, Stefano Stabellini wrote:
> Add specific per-platform defaults for NR_CPUS. Note that the order of
> the defaults matter: they need to go first, otherwise the generic
> defaults will be applied.
> 
> This is done so that Xen builds customized for a specific hardware
> platform can have the right NR_CPUS number.
> 
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

> CC: JBeulich@suse.com
> CC: andrew.cooper3@citrix.com
> 
> ---
> 
> Changes in v6:
> - remove useless additional default for ALL
> ---
>   xen/arch/Kconfig | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
> index cf0acb7..1954d1c 100644
> --- a/xen/arch/Kconfig
> +++ b/xen/arch/Kconfig
> @@ -3,6 +3,9 @@ config NR_CPUS
>   	int "Maximum number of physical CPUs"
>   	range 1 4095
>   	default "256" if X86
> +	default "8" if ARM && RCAR3
> +	default "4" if ARM && QEMU
> +	default "4" if ARM && MPSOC
>   	default "128" if ARM
>   	---help---
>   	  Specifies the maximum number of physical CPUs which Xen will support.
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-06 23:14 ` [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM Stefano Stabellini
@ 2018-07-23 11:37   ` Julien Grall
  2018-07-24 22:31     ` Stefano Stabellini
  0 siblings, 1 reply; 42+ messages in thread
From: Julien Grall @ 2018-07-23 11:37 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: andrii_anisov, George.Dunlap, andrew.cooper3, Ian.Jackson,
	George.Dunlap, dfaggioli, jbeulich, xen-devel

Hi,

On 07/07/18 00:14, Stefano Stabellini wrote:
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> CC: George.Dunlap@eu.citrix.com
> CC: Ian.Jackson@eu.citrix.com
> CC: jbeulich@suse.com
> CC: andrew.cooper3@citrix.com
> ---
>   SUPPORT.md | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/SUPPORT.md b/SUPPORT.md
> index e3e49e2..151a63d 100644
> --- a/SUPPORT.md
> +++ b/SUPPORT.md
> @@ -22,6 +22,16 @@ EXPERT and DEBUG Kconfig options are not security supported. Other
>   Kconfig options are supported, if the related features are marked as
>   supported in this document.
>   
> +On ARM, a wider range of Kconfig configurations is available to enable
> +very small lines of code counts in the hypervisor. Not all possible
> +combinations of kconfig options are security supported. Instead, a few

NIT: s/kconfig/Kconfig/

> +pre-canned configurations have been added to xen/arch/arm/configs: they
> +are security suppored. Configurations derived from the pre-canned files

s/suppored/supported/

> +by adding non-listed options with their default values, or by enabling
> +any of the platform options under "Platform Support" (and their
> +dependent options) are security supported, unless stated
> +otherwise.

I am not entirely sure to understand the implications the paragraph.

For instance, if I choose arm64_defconfig, memaccess will be enabled by 
default but any use of it is not security supported. What will be the 
state of the security support for that .config?

I also think an Ack from the security team will probably more meaningful 
than mine here. After all they are the one dealing with the security 
issues :).

Cheers,

> +
>   ## Host Architecture
>   
>   ### x86-64
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-06 23:13 ` [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs Stefano Stabellini
  2018-07-23 11:24   ` Julien Grall
@ 2018-07-24 13:27   ` Andrii Anisov
  2018-07-26 22:46     ` Stefano Stabellini
  1 sibling, 1 reply; 42+ messages in thread
From: Andrii Anisov @ 2018-07-24 13:27 UTC (permalink / raw)
  To: Stefano Stabellini, julien.grall
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, dfaggioli,
	xen-devel, volodymyr_babchuk

Hello Stefano,


On 07.07.18 02:13, Stefano Stabellini wrote:
> Add a "Platform Support" choice with four kconfig options: QEMU, RCAR3,
> MPSOC and ALL. They enable the required options for their hardware
> platform. ALL enables all available platforms and it's the default. It
> doesn't automatically select any of the related drivers, otherwise they
> cannot be disabled. ALL is implemented by selecting hidden options
> corresponding to QEMU, MPSOC and RCAR3.
>
> In the case of the MPSOC that has a platform file under
> arch/arm/platforms/, build the file if MPSOC.
>
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> CC: artem_mygaiev@epam.com
> CC: volodymyr_babchuk@epam.com
>
> ---
> Changes in v5:
> - turn platform support into a choice
> - add ALL
>
> Changes in v4:
> - fix GICv3/GICV3
> - default y to all options
> - build xilinx-zynqmp if MPSOC
> ---
>   xen/arch/arm/Kconfig            |  2 ++
>   xen/arch/arm/platforms/Kconfig  | 55 +++++++++++++++++++++++++++++++++++++++++
>   xen/arch/arm/platforms/Makefile |  2 +-
>   3 files changed, 58 insertions(+), 1 deletion(-)
>   create mode 100644 xen/arch/arm/platforms/Kconfig
>
> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> index 2b87111..75cacfb 100644
> --- a/xen/arch/arm/Kconfig
> +++ b/xen/arch/arm/Kconfig
> @@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
>   config ARM32_HARDEN_BRANCH_PREDICTOR
>       def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
>   
> +source "arch/arm/platforms/Kconfig"
> +
>   source "common/Kconfig"
>   
>   source "drivers/Kconfig"
> diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
> new file mode 100644
> index 0000000..07c5930
> --- /dev/null
> +++ b/xen/arch/arm/platforms/Kconfig
> @@ -0,0 +1,55 @@
> +choice
> +	prompt "Platform Support"
> +	default ALL
> +	---help---
> +	Choose which hardware platform to enable in Xen.
> +
> +	If unsure, choose ALL.
> +
> +config ALL
I would suggest to separate it into ALL_ARM32 and ALL_ARM64. Then, in a 
makefile use them for platforms instead of raw ARM32 and ARM64. This 
would make such change really useful: disabling ALL_x will drop all odd 
platform code.

> +	bool "All Platforms"
> +	select MPSOC_PLATFORM
> +	select QEMU_PLATFORM
> +	select RCAR3_PLATFORM
> +	---help---
> +	Enable support for all available hardware platforms. It doesn't
> +	automatically select any of the related drivers.
> +
> +config QEMU
> +	bool "QEMU aarch virt machine support"
> +	depends on ARM_64
> +	select QEMU_PLATFORM
> +	select GICV3
> +	select HAS_PL011
> +	---help---
> +	Enable all the required drivers for QEMU aarch64 virt emulated
> +	machine.
> +
> +config RCAR3
> +	bool "Renesas RCar3 support"
> +	depends on ARM_64
> +	select RCAR3_PLATFORM
> +	select HAS_SCIF
> +	---help---
> +	Enable all the required drivers for Renesas RCar3
> +
> +config MPSOC
> +	bool "Xilinx Ultrascale+ MPSoC support"
> +	depends on ARM_64
> +	select MPSOC_PLATFORM
> +	select HAS_CADENCE_UART
> +	select ARM_SMMU
> +	---help---
> +	Enable all the required drivers for Xilinx Ultrascale+ MPSoC
> +
> +endchoice
> +
> +config QEMU_PLATFORM
> +	bool
> +
> +config RCAR3_PLATFORM
> +	bool
> +
> +config MPSOC_PLATFORM
Shouldn't MPSOC_PLATFORM be dependent on ARM64?

> +	bool
> +
> diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
> index 80e555c..a79bdb9 100644
> --- a/xen/arch/arm/platforms/Makefile
> +++ b/xen/arch/arm/platforms/Makefile
> @@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
>   obj-y += sunxi.o
>   obj-$(CONFIG_ARM_64) += thunderx.o
>   obj-$(CONFIG_ARM_64) += xgene-storm.o
> -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
> +obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o
-- 

*Andrii Anisov*



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-23 11:24   ` Julien Grall
@ 2018-07-24 22:08     ` Stefano Stabellini
  0 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-24 22:08 UTC (permalink / raw)
  To: Julien Grall
  Cc: artem_mygaiev, Stefano Stabellini, andrii_anisov, andrew.cooper3,
	George.Dunlap, dfaggioli, xen-devel, volodymyr_babchuk

On Mon, 23 Jul 2018, Julien Grall wrote:
> Hi Stefano,
> 
> On 07/07/18 00:13, Stefano Stabellini wrote:
> > +config QEMU_PLATFORM
> > +	bool
> > +
> > +config RCAR3_PLATFORM
> > +	bool
> 
> Those 2 options do nothing. So I would prefer if they are removed. With that
> fixed:
> 
> Acked-by: Julien Grall <julien.grall@arm.com>

Sure, I'll do that. We'll add them when we/if we'll actually need them.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-23 11:37   ` Julien Grall
@ 2018-07-24 22:31     ` Stefano Stabellini
  2018-07-25  8:46       ` Julien Grall
  0 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-24 22:31 UTC (permalink / raw)
  To: Julien Grall
  Cc: Stefano Stabellini, andrii_anisov, George.Dunlap, andrew.cooper3,
	Ian.Jackson, George.Dunlap, dfaggioli, jbeulich, xen-devel

On Mon, 23 Jul 2018, Julien Grall wrote:
> Hi,
> 
> On 07/07/18 00:14, Stefano Stabellini wrote:
> > Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> > CC: George.Dunlap@eu.citrix.com
> > CC: Ian.Jackson@eu.citrix.com
> > CC: jbeulich@suse.com
> > CC: andrew.cooper3@citrix.com
> > ---
> >   SUPPORT.md | 10 ++++++++++
> >   1 file changed, 10 insertions(+)
> > 
> > diff --git a/SUPPORT.md b/SUPPORT.md
> > index e3e49e2..151a63d 100644
> > --- a/SUPPORT.md
> > +++ b/SUPPORT.md
> > @@ -22,6 +22,16 @@ EXPERT and DEBUG Kconfig options are not security
> > supported. Other
> >   Kconfig options are supported, if the related features are marked as
> >   supported in this document.
> >   +On ARM, a wider range of Kconfig configurations is available to enable
> > +very small lines of code counts in the hypervisor. Not all possible
> > +combinations of kconfig options are security supported. Instead, a few
> 
> NIT: s/kconfig/Kconfig/
> 
> > +pre-canned configurations have been added to xen/arch/arm/configs: they
> > +are security suppored. Configurations derived from the pre-canned files
> 
> s/suppored/supported/

I'll fix


> > +by adding non-listed options with their default values, or by enabling
> > +any of the platform options under "Platform Support" (and their
> > +dependent options) are security supported, unless stated
> > +otherwise.
> 
> I am not entirely sure to understand the implications the paragraph.

It is meant to say:

1) xen/arch/arm/configs config files are security supported
2) default values of any kconfig options are security supported
3) if an option is marked as not security supported in SUPPORT.md, then
   it is not security supported, no matter the default value
4) everything else is not security supported
 
Should I try to clarify it? I guess I should make clear that a .config
with an unsupported option is unsupported as a whole. I can add:

 "A configuration with one or more unsupported options, is not
 unsupported."


> For instance, if I choose arm64_defconfig, memaccess will be enabled by
> default but any use of it is not security supported. What will be the state of
> the security support for that .config?

Yes, memaccess will default to enable. However, SUPPORT.md says it is
not security supported, hence, the result is that the .config is not
security supported, according to (3).

There is a catch though. In the specific case of memaccess, SUPPORT.md
only states the following:

### Virtual Machine Introspection

    Status, x86: Supported, not security supported

Which doesn't say anything about ARM. It would be a good idea to do the
same that x86 is doing (Supported, not security supported)?


> I also think an Ack from the security team will probably more meaningful than
> mine here. After all they are the one dealing with the security issues :).

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-24 22:31     ` Stefano Stabellini
@ 2018-07-25  8:46       ` Julien Grall
  2018-07-25  8:59         ` Andrew Cooper
  2018-07-25  9:11         ` Jan Beulich
  0 siblings, 2 replies; 42+ messages in thread
From: Julien Grall @ 2018-07-25  8:46 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: andrii_anisov, George.Dunlap, andrew.cooper3, Ian.Jackson,
	George.Dunlap, dfaggioli, jbeulich, xen-devel



On 24/07/18 23:31, Stefano Stabellini wrote:
> On Mon, 23 Jul 2018, Julien Grall wrote:
>> Hi,
>>
>> On 07/07/18 00:14, Stefano Stabellini wrote:
>>> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
>>> CC: George.Dunlap@eu.citrix.com
>>> CC: Ian.Jackson@eu.citrix.com
>>> CC: jbeulich@suse.com
>>> CC: andrew.cooper3@citrix.com
>>> ---
>>>    SUPPORT.md | 10 ++++++++++
>>>    1 file changed, 10 insertions(+)
>>>
>>> diff --git a/SUPPORT.md b/SUPPORT.md
>>> index e3e49e2..151a63d 100644
>>> --- a/SUPPORT.md
>>> +++ b/SUPPORT.md
>>> @@ -22,6 +22,16 @@ EXPERT and DEBUG Kconfig options are not security
>>> supported. Other
>>>    Kconfig options are supported, if the related features are marked as
>>>    supported in this document.
>>>    +On ARM, a wider range of Kconfig configurations is available to enable
>>> +very small lines of code counts in the hypervisor. Not all possible
>>> +combinations of kconfig options are security supported. Instead, a few
>>
>> NIT: s/kconfig/Kconfig/
>>
>>> +pre-canned configurations have been added to xen/arch/arm/configs: they
>>> +are security suppored. Configurations derived from the pre-canned files
>>
>> s/suppored/supported/
> 
> I'll fix
> 
> 
>>> +by adding non-listed options with their default values, or by enabling
>>> +any of the platform options under "Platform Support" (and their
>>> +dependent options) are security supported, unless stated
>>> +otherwise.
>>
>> I am not entirely sure to understand the implications the paragraph.
> 
> It is meant to say:
> 
> 1) xen/arch/arm/configs config files are security supported
> 2) default values of any kconfig options are security supported
> 3) if an option is marked as not security supported in SUPPORT.md, then
>     it is not security supported, no matter the default value
> 4) everything else is not security supported
>   
> Should I try to clarify it? I guess I should make clear that a .config
> with an unsupported option is unsupported as a whole. I can add:
> 
>   "A configuration with one or more unsupported options, is not
>   unsupported."
> 
> 
>> For instance, if I choose arm64_defconfig, memaccess will be enabled by
>> default but any use of it is not security supported. What will be the state of
>> the security support for that .config?
> 
> Yes, memaccess will default to enable. However, SUPPORT.md says it is
> not security supported, hence, the result is that the .config is not
> security supported, according to (3).

We really don't want that. That arm64_defconfig is the default config 
for Xen. Anyone using it will not be security supported.

Distros will likely use the default config as it enables everything. If 
I were a package maintainer, I would expect at minimum to security 
support the .config. This does not mean that using a specific feature 
will be supported.

> 
> There is a catch though. In the specific case of memaccess, SUPPORT.md
> only states the following:
> 
> ### Virtual Machine Introspection
> 
>      Status, x86: Supported, not security supported
> 
> Which doesn't say anything about ARM. It would be a good idea to do the
> same that x86 is doing (Supported, not security supported)?

Memaccess has never been considered to be supported on Arm, yet it is 
enabled by default as on x86. However, most of the code in that context 
is gated by "memaccess_enabled". So what is not security supported is 
the use of memaccess.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-25  8:46       ` Julien Grall
@ 2018-07-25  8:59         ` Andrew Cooper
  2018-07-25  9:50           ` Julien Grall
  2018-07-25  9:11         ` Jan Beulich
  1 sibling, 1 reply; 42+ messages in thread
From: Andrew Cooper @ 2018-07-25  8:59 UTC (permalink / raw)
  To: Julien Grall, Stefano Stabellini
  Cc: andrii_anisov, George.Dunlap, Ian.Jackson, George.Dunlap,
	dfaggioli, jbeulich, xen-devel

On 25/07/2018 09:46, Julien Grall wrote:
>
>
> On 24/07/18 23:31, Stefano Stabellini wrote:
>> On Mon, 23 Jul 2018, Julien Grall wrote:
>>> Hi,
>>>
>>> On 07/07/18 00:14, Stefano Stabellini wrote:
>>>> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
>>>> CC: George.Dunlap@eu.citrix.com
>>>> CC: Ian.Jackson@eu.citrix.com
>>>> CC: jbeulich@suse.com
>>>> CC: andrew.cooper3@citrix.com
>>>> ---
>>>>    SUPPORT.md | 10 ++++++++++
>>>>    1 file changed, 10 insertions(+)
>>>>
>>>> diff --git a/SUPPORT.md b/SUPPORT.md
>>>> index e3e49e2..151a63d 100644
>>>> --- a/SUPPORT.md
>>>> +++ b/SUPPORT.md
>>>> @@ -22,6 +22,16 @@ EXPERT and DEBUG Kconfig options are not security
>>>> supported. Other
>>>>    Kconfig options are supported, if the related features are
>>>> marked as
>>>>    supported in this document.
>>>>    +On ARM, a wider range of Kconfig configurations is available to
>>>> enable
>>>> +very small lines of code counts in the hypervisor. Not all possible
>>>> +combinations of kconfig options are security supported. Instead, a
>>>> few
>>>
>>> NIT: s/kconfig/Kconfig/
>>>
>>>> +pre-canned configurations have been added to xen/arch/arm/configs:
>>>> they
>>>> +are security suppored. Configurations derived from the pre-canned
>>>> files
>>>
>>> s/suppored/supported/
>>
>> I'll fix
>>
>>
>>>> +by adding non-listed options with their default values, or by
>>>> enabling
>>>> +any of the platform options under "Platform Support" (and their
>>>> +dependent options) are security supported, unless stated
>>>> +otherwise.
>>>
>>> I am not entirely sure to understand the implications the paragraph.
>>
>> It is meant to say:
>>
>> 1) xen/arch/arm/configs config files are security supported
>> 2) default values of any kconfig options are security supported
>> 3) if an option is marked as not security supported in SUPPORT.md, then
>>     it is not security supported, no matter the default value
>> 4) everything else is not security supported
>>   Should I try to clarify it? I guess I should make clear that a .config
>> with an unsupported option is unsupported as a whole. I can add:
>>
>>   "A configuration with one or more unsupported options, is not
>>   unsupported."
>>
>>
>>> For instance, if I choose arm64_defconfig, memaccess will be enabled by
>>> default but any use of it is not security supported. What will be
>>> the state of
>>> the security support for that .config?
>>
>> Yes, memaccess will default to enable. However, SUPPORT.md says it is
>> not security supported, hence, the result is that the .config is not
>> security supported, according to (3).
>
> We really don't want that. That arm64_defconfig is the default config
> for Xen. Anyone using it will not be security supported.
>
> Distros will likely use the default config as it enables everything.
> If I were a package maintainer, I would expect at minimum to security
> support the .config. This does not mean that using a specific feature
> will be supported.

Anything you can select in menuconfig without passing
XEN_CONFIG_EXPERT=y is security supported.  Anything hidden behind
XEN_CONFIG_EXPERT is security supported in its default configuration.

>
>>
>> There is a catch though. In the specific case of memaccess, SUPPORT.md
>> only states the following:
>>
>> ### Virtual Machine Introspection
>>
>>      Status, x86: Supported, not security supported
>>
>> Which doesn't say anything about ARM. It would be a good idea to do the
>> same that x86 is doing (Supported, not security supported)?
>
> Memaccess has never been considered to be supported on Arm, yet it is
> enabled by default as on x86. However, most of the code in that
> context is gated by "memaccess_enabled". So what is not security
> supported is the use of memaccess.

memaccess on x86 long predates any kind of Kconfig.

At some point, we're going to have to start saying that anything not
stated in Support.md is unsupported, but in practice, given the state of
the document, most things are actually "anything which isn't mentioned
needs a decision and a patch making to the file".

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-25  8:46       ` Julien Grall
  2018-07-25  8:59         ` Andrew Cooper
@ 2018-07-25  9:11         ` Jan Beulich
  1 sibling, 0 replies; 42+ messages in thread
From: Jan Beulich @ 2018-07-25  9:11 UTC (permalink / raw)
  To: Julien Grall, Stefano Stabellini
  Cc: andrii_anisov, George Dunlap, Andrew Cooper, Ian Jackson,
	george.dunlap, xen-devel, Dario Faggioli

>>> On 25.07.18 at 10:46, <julien.grall@arm.com> wrote:
> On 24/07/18 23:31, Stefano Stabellini wrote:
>> Yes, memaccess will default to enable. However, SUPPORT.md says it is
>> not security supported, hence, the result is that the .config is not
>> security supported, according to (3).
> 
> We really don't want that. That arm64_defconfig is the default config 
> for Xen. Anyone using it will not be security supported.
> 
> Distros will likely use the default config as it enables everything. If 
> I were a package maintainer, I would expect at minimum to security 
> support the .config. This does not mean that using a specific feature 
> will be supported.

Exactly - what the .config enables should not matter as long as the
enabled feature is not in use.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-25  8:59         ` Andrew Cooper
@ 2018-07-25  9:50           ` Julien Grall
  2018-07-25 11:09             ` George Dunlap
  0 siblings, 1 reply; 42+ messages in thread
From: Julien Grall @ 2018-07-25  9:50 UTC (permalink / raw)
  To: Andrew Cooper, Stefano Stabellini
  Cc: andrii_anisov, George.Dunlap, Ian.Jackson, George.Dunlap,
	dfaggioli, jbeulich, xen-devel



On 25/07/18 09:59, Andrew Cooper wrote:
> On 25/07/2018 09:46, Julien Grall wrote:
>>
>>
>> On 24/07/18 23:31, Stefano Stabellini wrote:
>>> On Mon, 23 Jul 2018, Julien Grall wrote:
>>>> Hi,
>>>>
>>>> On 07/07/18 00:14, Stefano Stabellini wrote:
>>>>> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
>>>>> CC: George.Dunlap@eu.citrix.com
>>>>> CC: Ian.Jackson@eu.citrix.com
>>>>> CC: jbeulich@suse.com
>>>>> CC: andrew.cooper3@citrix.com
>>>>> ---
>>>>>     SUPPORT.md | 10 ++++++++++
>>>>>     1 file changed, 10 insertions(+)
>>>>>
>>>>> diff --git a/SUPPORT.md b/SUPPORT.md
>>>>> index e3e49e2..151a63d 100644
>>>>> --- a/SUPPORT.md
>>>>> +++ b/SUPPORT.md
>>>>> @@ -22,6 +22,16 @@ EXPERT and DEBUG Kconfig options are not security
>>>>> supported. Other
>>>>>     Kconfig options are supported, if the related features are
>>>>> marked as
>>>>>     supported in this document.
>>>>>     +On ARM, a wider range of Kconfig configurations is available to
>>>>> enable
>>>>> +very small lines of code counts in the hypervisor. Not all possible
>>>>> +combinations of kconfig options are security supported. Instead, a
>>>>> few
>>>>
>>>> NIT: s/kconfig/Kconfig/
>>>>
>>>>> +pre-canned configurations have been added to xen/arch/arm/configs:
>>>>> they
>>>>> +are security suppored. Configurations derived from the pre-canned
>>>>> files
>>>>
>>>> s/suppored/supported/
>>>
>>> I'll fix
>>>
>>>
>>>>> +by adding non-listed options with their default values, or by
>>>>> enabling
>>>>> +any of the platform options under "Platform Support" (and their
>>>>> +dependent options) are security supported, unless stated
>>>>> +otherwise.
>>>>
>>>> I am not entirely sure to understand the implications the paragraph.
>>>
>>> It is meant to say:
>>>
>>> 1) xen/arch/arm/configs config files are security supported
>>> 2) default values of any kconfig options are security supported
>>> 3) if an option is marked as not security supported in SUPPORT.md, then
>>>      it is not security supported, no matter the default value
>>> 4) everything else is not security supported
>>>    Should I try to clarify it? I guess I should make clear that a .config
>>> with an unsupported option is unsupported as a whole. I can add:
>>>
>>>    "A configuration with one or more unsupported options, is not
>>>    unsupported."
>>>
>>>
>>>> For instance, if I choose arm64_defconfig, memaccess will be enabled by
>>>> default but any use of it is not security supported. What will be
>>>> the state of
>>>> the security support for that .config?
>>>
>>> Yes, memaccess will default to enable. However, SUPPORT.md says it is
>>> not security supported, hence, the result is that the .config is not
>>> security supported, according to (3).
>>
>> We really don't want that. That arm64_defconfig is the default config
>> for Xen. Anyone using it will not be security supported.
>>
>> Distros will likely use the default config as it enables everything.
>> If I were a package maintainer, I would expect at minimum to security
>> support the .config. This does not mean that using a specific feature
>> will be supported.
> 
> Anything you can select in menuconfig without passing
> XEN_CONFIG_EXPERT=y is security supported.  Anything hidden behind
> XEN_CONFIG_EXPERT is security supported in its default configuration.

Could you clarify what you mean by security supported here? For 
instance, "livepatch" is selectable on Arm with XEN_CONFIG_EXPERT=y but 
it is marked as "experimental" in SUPPORT.MD.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-25  9:50           ` Julien Grall
@ 2018-07-25 11:09             ` George Dunlap
  2018-07-26  0:40               ` Stefano Stabellini
  0 siblings, 1 reply; 42+ messages in thread
From: George Dunlap @ 2018-07-25 11:09 UTC (permalink / raw)
  To: Julien Grall
  Cc: Stefano Stabellini, Andrii Anisov, Andrew Cooper, Ian Jackson,
	Dario Faggioli, Jan Beulich, Xen-devel

On Wed, Jul 25, 2018 at 10:50 AM, Julien Grall <julien.grall@arm.com> wrote:
>> Anything you can select in menuconfig without passing
>> XEN_CONFIG_EXPERT=y is security supported.  Anything hidden behind
>> XEN_CONFIG_EXPERT is security supported in its default configuration.
>
>
> Could you clarify what you mean by security supported here? For instance,
> "livepatch" is selectable on Arm with XEN_CONFIG_EXPERT=y but it is marked
> as "experimental" in SUPPORT.MD.

I think Andy means something like, "supported when no admin action is
taken to activate it".  Livepatch doesn't just happen by itself; you
have to take an action to trigger the behavior, so it's not supported.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM
  2018-07-25 11:09             ` George Dunlap
@ 2018-07-26  0:40               ` Stefano Stabellini
  0 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-26  0:40 UTC (permalink / raw)
  To: George Dunlap
  Cc: Stefano Stabellini, Andrii Anisov, Andrew Cooper, Ian Jackson,
	Dario Faggioli, Julien Grall, Jan Beulich, Xen-devel

On Wed, 25 Jul 2018, George Dunlap wrote:
> On Wed, Jul 25, 2018 at 10:50 AM, Julien Grall <julien.grall@arm.com> wrote:
> >> Anything you can select in menuconfig without passing
> >> XEN_CONFIG_EXPERT=y is security supported.  Anything hidden behind
> >> XEN_CONFIG_EXPERT is security supported in its default configuration.
> >
> >
> > Could you clarify what you mean by security supported here? For instance,
> > "livepatch" is selectable on Arm with XEN_CONFIG_EXPERT=y but it is marked
> > as "experimental" in SUPPORT.MD.
> 
> I think Andy means something like, "supported when no admin action is
> taken to activate it".  Livepatch doesn't just happen by itself; you
> have to take an action to trigger the behavior, so it's not supported.

I am OK following the same model on ARM too. Do we all agree?

If so, I can just remove this patch from the series, because the
previous patch already clarifies the role of EXPERT.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-24 13:27   ` Andrii Anisov
@ 2018-07-26 22:46     ` Stefano Stabellini
  2018-07-27 10:30       ` Andrii Anisov
  0 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-26 22:46 UTC (permalink / raw)
  To: Andrii Anisov
  Cc: artem_mygaiev, Stefano Stabellini, andrew.cooper3, George.Dunlap,
	dfaggioli, julien.grall, xen-devel, volodymyr_babchuk

On Tue, 24 Jul 2018, Andrii Anisov wrote:
> On 07.07.18 02:13, Stefano Stabellini wrote:
> > Add a "Platform Support" choice with four kconfig options: QEMU, RCAR3,
> > MPSOC and ALL. They enable the required options for their hardware
> > platform. ALL enables all available platforms and it's the default. It
> > doesn't automatically select any of the related drivers, otherwise they
> > cannot be disabled. ALL is implemented by selecting hidden options
> > corresponding to QEMU, MPSOC and RCAR3.
> > 
> > In the case of the MPSOC that has a platform file under
> > arch/arm/platforms/, build the file if MPSOC.
> > 
> > Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> > CC: artem_mygaiev@epam.com
> > CC: volodymyr_babchuk@epam.com
> > 
> > ---
> > Changes in v5:
> > - turn platform support into a choice
> > - add ALL
> > 
> > Changes in v4:
> > - fix GICv3/GICV3
> > - default y to all options
> > - build xilinx-zynqmp if MPSOC
> > ---
> >   xen/arch/arm/Kconfig            |  2 ++
> >   xen/arch/arm/platforms/Kconfig  | 55
> > +++++++++++++++++++++++++++++++++++++++++
> >   xen/arch/arm/platforms/Makefile |  2 +-
> >   3 files changed, 58 insertions(+), 1 deletion(-)
> >   create mode 100644 xen/arch/arm/platforms/Kconfig
> > 
> > diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> > index 2b87111..75cacfb 100644
> > --- a/xen/arch/arm/Kconfig
> > +++ b/xen/arch/arm/Kconfig
> > @@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
> >   config ARM32_HARDEN_BRANCH_PREDICTOR
> >       def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
> >   +source "arch/arm/platforms/Kconfig"
> > +
> >   source "common/Kconfig"
> >     source "drivers/Kconfig"
> > diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
> > new file mode 100644
> > index 0000000..07c5930
> > --- /dev/null
> > +++ b/xen/arch/arm/platforms/Kconfig
> > @@ -0,0 +1,55 @@
> > +choice
> > +	prompt "Platform Support"
> > +	default ALL
> > +	---help---
> > +	Choose which hardware platform to enable in Xen.
> > +
> > +	If unsure, choose ALL.
> > +
> > +config ALL
> I would suggest to separate it into ALL_ARM32 and ALL_ARM64. Then, in a
> makefile use them for platforms instead of raw ARM32 and ARM64. This would
> make such change really useful: disabling ALL_x will drop all odd platform
> code.

Hi Andrii,

I don't understand the suggestion: ARM32 platforms cannot be enabled on
ARM64 and vice versa. So basically it is as if you always get only
ALL_ARM32 or ALL_ARM64 depending on your target architecture.

Am I missing something?


> > +	bool "All Platforms"
> > +	select MPSOC_PLATFORM
> > +	select QEMU_PLATFORM
> > +	select RCAR3_PLATFORM
> > +	---help---
> > +	Enable support for all available hardware platforms. It doesn't
> > +	automatically select any of the related drivers.
> > +
> > +config QEMU
> > +	bool "QEMU aarch virt machine support"
> > +	depends on ARM_64
> > +	select QEMU_PLATFORM
> > +	select GICV3
> > +	select HAS_PL011
> > +	---help---
> > +	Enable all the required drivers for QEMU aarch64 virt emulated
> > +	machine.
> > +
> > +config RCAR3
> > +	bool "Renesas RCar3 support"
> > +	depends on ARM_64
> > +	select RCAR3_PLATFORM
> > +	select HAS_SCIF
> > +	---help---
> > +	Enable all the required drivers for Renesas RCar3
> > +
> > +config MPSOC
> > +	bool "Xilinx Ultrascale+ MPSoC support"
> > +	depends on ARM_64
> > +	select MPSOC_PLATFORM
> > +	select HAS_CADENCE_UART
> > +	select ARM_SMMU
> > +	---help---
> > +	Enable all the required drivers for Xilinx Ultrascale+ MPSoC
> > +
> > +endchoice
> > +
> > +config QEMU_PLATFORM
> > +	bool
> > +
> > +config RCAR3_PLATFORM
> > +	bool
> > +
> > +config MPSOC_PLATFORM
> Shouldn't MPSOC_PLATFORM be dependent on ARM64?

Yes, and it is, see "config MPSOC" few lines above.


> > +	bool
> > +
> > diff --git a/xen/arch/arm/platforms/Makefile
> > b/xen/arch/arm/platforms/Makefile
> > index 80e555c..a79bdb9 100644
> > --- a/xen/arch/arm/platforms/Makefile
> > +++ b/xen/arch/arm/platforms/Makefile
> > @@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
> >   obj-y += sunxi.o
> >   obj-$(CONFIG_ARM_64) += thunderx.o
> >   obj-$(CONFIG_ARM_64) += xgene-storm.o
> > -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
> > +obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-26 22:46     ` Stefano Stabellini
@ 2018-07-27 10:30       ` Andrii Anisov
  2018-07-27 11:20         ` Julien Grall
                           ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Andrii Anisov @ 2018-07-27 10:30 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, xen-devel,
	julien.grall, dfaggioli, volodymyr_babchuk

Hello Stefano,


On 27.07.18 01:46, Stefano Stabellini wrote:
> On Tue, 24 Jul 2018, Andrii Anisov wrote:
>> On 07.07.18 02:13, Stefano Stabellini wrote:
>>> Add a "Platform Support" choice with four kconfig options: QEMU, RCAR3,
>>> MPSOC and ALL. They enable the required options for their hardware
>>> platform. ALL enables all available platforms and it's the default. It
>>> doesn't automatically select any of the related drivers, otherwise they
>>> cannot be disabled. ALL is implemented by selecting hidden options
>>> corresponding to QEMU, MPSOC and RCAR3.
>>>
>>> In the case of the MPSOC that has a platform file under
>>> arch/arm/platforms/, build the file if MPSOC.
>>>
>>> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
>>> CC: artem_mygaiev@epam.com
>>> CC: volodymyr_babchuk@epam.com
>>>
>>> ---
>>> Changes in v5:
>>> - turn platform support into a choice
>>> - add ALL
>>>
>>> Changes in v4:
>>> - fix GICv3/GICV3
>>> - default y to all options
>>> - build xilinx-zynqmp if MPSOC
>>> ---
>>>    xen/arch/arm/Kconfig            |  2 ++
>>>    xen/arch/arm/platforms/Kconfig  | 55
>>> +++++++++++++++++++++++++++++++++++++++++
>>>    xen/arch/arm/platforms/Makefile |  2 +-
>>>    3 files changed, 58 insertions(+), 1 deletion(-)
>>>    create mode 100644 xen/arch/arm/platforms/Kconfig
>>>
>>> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
>>> index 2b87111..75cacfb 100644
>>> --- a/xen/arch/arm/Kconfig
>>> +++ b/xen/arch/arm/Kconfig
>>> @@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
>>>    config ARM32_HARDEN_BRANCH_PREDICTOR
>>>        def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
>>>    +source "arch/arm/platforms/Kconfig"
>>> +
>>>    source "common/Kconfig"
>>>      source "drivers/Kconfig"
>>> diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
>>> new file mode 100644
>>> index 0000000..07c5930
>>> --- /dev/null
>>> +++ b/xen/arch/arm/platforms/Kconfig
>>> @@ -0,0 +1,55 @@
>>> +choice
>>> +	prompt "Platform Support"
>>> +	default ALL
>>> +	---help---
>>> +	Choose which hardware platform to enable in Xen.
>>> +
>>> +	If unsure, choose ALL.
>>> +
>>> +config ALL
>> I would suggest to separate it into ALL_ARM32 and ALL_ARM64. Then, in a
>> makefile use them for platforms instead of raw ARM32 and ARM64. This would
>> make such change really useful: disabling ALL_x will drop all odd platform
>> code.
> Hi Andrii,
>
> I don't understand the suggestion: ARM32 platforms cannot be enabled on
> ARM64 and vice versa.
Indeed.

>   So basically it is as if you always get only
> ALL_ARM32 or ALL_ARM64 depending on your target architecture.
>
> Am I missing something?
With this patch, deselecting "config ALL" does not remove all platform 
code from the build. It is because build of the most of that code 
depends directly on ARMxx.
In order to get a possibility to drop unneeded platform code, the 
platform code should be dependent on "config ALL". But here you do not 
want to mix 32bit and 64bit platforms, so you would need "config ALL_32" 
and "config ALL_64".
For sure, written above is meaningful only for the case if someone needs 
the possibility to drop odd platform code from the build.
>>> +	bool "All Platforms"
>>> +	select MPSOC_PLATFORM
>>> +	select QEMU_PLATFORM
>>> +	select RCAR3_PLATFORM
>>> +	---help---
>>> +	Enable support for all available hardware platforms. It doesn't
>>> +	automatically select any of the related drivers.
>>> +
>>> +config QEMU
>>> +	bool "QEMU aarch virt machine support"
>>> +	depends on ARM_64
>>> +	select QEMU_PLATFORM
>>> +	select GICV3
>>> +	select HAS_PL011
>>> +	---help---
>>> +	Enable all the required drivers for QEMU aarch64 virt emulated
>>> +	machine.
>>> +
>>> +config RCAR3
>>> +	bool "Renesas RCar3 support"
>>> +	depends on ARM_64
>>> +	select RCAR3_PLATFORM
>>> +	select HAS_SCIF
>>> +	---help---
>>> +	Enable all the required drivers for Renesas RCar3
>>> +
>>> +config MPSOC
>>> +	bool "Xilinx Ultrascale+ MPSoC support"
>>> +	depends on ARM_64
>>> +	select MPSOC_PLATFORM
>>> +	select HAS_CADENCE_UART
>>> +	select ARM_SMMU
>>> +	---help---
>>> +	Enable all the required drivers for Xilinx Ultrascale+ MPSoC
>>> +
>>> +endchoice
>>> +
>>> +config QEMU_PLATFORM
>>> +	bool
>>> +
>>> +config RCAR3_PLATFORM
>>> +	bool
>>> +
>>> +config MPSOC_PLATFORM
>> Shouldn't MPSOC_PLATFORM be dependent on ARM64?
> Yes, and it is, see "config MPSOC" few lines above.
Few lines above, only "config MPSOC" is dependent on ARM64. But 
MPSOC_PLATFORM is selected by "config ALL" at the beginning of the 
patch. And it will be selected for ARM32 as well.

>>> +	bool
>>> +
>>> diff --git a/xen/arch/arm/platforms/Makefile
>>> b/xen/arch/arm/platforms/Makefile
>>> index 80e555c..a79bdb9 100644
>>> --- a/xen/arch/arm/platforms/Makefile
>>> +++ b/xen/arch/arm/platforms/Makefile
>>> @@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
>>>    obj-y += sunxi.o
>>>    obj-$(CONFIG_ARM_64) += thunderx.o
>>>    obj-$(CONFIG_ARM_64) += xgene-storm.o
>>> -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
>>> +obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o

-- 

*Andrii Anisov*



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 10:30       ` Andrii Anisov
@ 2018-07-27 11:20         ` Julien Grall
  2018-07-27 11:21         ` Andrii Anisov
  2018-07-27 17:11         ` Stefano Stabellini
  2 siblings, 0 replies; 42+ messages in thread
From: Julien Grall @ 2018-07-27 11:20 UTC (permalink / raw)
  To: Andrii Anisov, Stefano Stabellini
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, xen-devel,
	dfaggioli, volodymyr_babchuk

Hi,

On 27/07/18 11:30, Andrii Anisov wrote:
> On 27.07.18 01:46, Stefano Stabellini wrote:
>>> On 07.07.18 02:13, Stefano Stabellini wrote:
>>> Shouldn't MPSOC_PLATFORM be dependent on ARM64?
>> Yes, and it is, see "config MPSOC" few lines above.
> Few lines above, only "config MPSOC" is dependent on ARM64. But 
> MPSOC_PLATFORM is selected by "config ALL" at the beginning of the 
> patch. And it will be selected for ARM32 as well.

You don't really need to select the platform in ALL. Instead you could 
do something like:

config ALL_64
	default (ALL && ARM_64)

config ALL_32
	default (ALL && ARM_32)

config MPSOC_PLATFORM
    	bool
	default (ALL_64 || MPSOC)

> 
>>>> +    bool
>>>> +
>>>> diff --git a/xen/arch/arm/platforms/Makefile
>>>> b/xen/arch/arm/platforms/Makefile
>>>> index 80e555c..a79bdb9 100644
>>>> --- a/xen/arch/arm/platforms/Makefile
>>>> +++ b/xen/arch/arm/platforms/Makefile
>>>> @@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
>>>>    obj-y += sunxi.o
>>>>    obj-$(CONFIG_ARM_64) += thunderx.o
>>>>    obj-$(CONFIG_ARM_64) += xgene-storm.o
>>>> -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
>>>> +obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 10:30       ` Andrii Anisov
  2018-07-27 11:20         ` Julien Grall
@ 2018-07-27 11:21         ` Andrii Anisov
  2018-07-27 11:27           ` Julien Grall
  2018-07-27 17:11         ` Stefano Stabellini
  2 siblings, 1 reply; 42+ messages in thread
From: Andrii Anisov @ 2018-07-27 11:21 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, xen-devel,
	julien.grall, dfaggioli, volodymyr_babchuk

I would suggest something like:

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 06ba4a4..794f06e 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -218,6 +218,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
  config ARM32_HARDEN_BRANCH_PREDICTOR
      def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR

+source "arch/arm/platforms/Kconfig"
+
  source "common/Kconfig"

  source "drivers/Kconfig"
diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
new file mode 100644
index 0000000..badf17b
--- /dev/null
+++ b/xen/arch/arm/platforms/Kconfig
@@ -0,0 +1,72 @@
+choice
+    prompt "Platform Support"
+    depends on ARM_32
+    default ALL_32
+    ---help---
+    Choose which hardware platform to enable in Xen.
+
+    If unsure, choose ALL.
+
+config ALL_32
+    bool "All Platforms"
+    ---help---
+    Enable support for all available hardware platforms. It doesn't
+    automatically select any of the related drivers.
+
+config NONE_32
+    bool "No Platform support"
+    ---help---
+    Remove all platform code.
+
+endchoice
+
+choice
+    prompt "Platform Support"
+    depends on ARM_64
+    default ALL_64
+    ---help---
+    Choose which hardware platform to enable in Xen.
+
+    If unsure, choose ALL.
+
+config ALL_64
+    bool "All Platforms"
+    select MPSOC_PLATFORM
+    ---help---
+    Enable support for all available hardware platforms. It doesn't
+    automatically select any of the related drivers.
+
+config QEMU
+    bool "QEMU aarch virt machine support"
+    depends on ARM_64
+    select GICV3
+    select HAS_PL011
+    ---help---
+    Enable all the required drivers for QEMU aarch64 virt emulated
+    machine.
+
+config RCAR3
+    bool "Renesas RCar3 support"
+    depends on ARM_64
+    select HAS_SCIF
+    ---help---
+    Enable all the required drivers for Renesas RCar3
+
+config MPSOC
+    bool "Xilinx Ultrascale+ MPSoC support"
+    depends on ARM_64
+    select MPSOC_PLATFORM
+    select HAS_CADENCE_UART
+    select ARM_SMMU
+    ---help---
+    Enable all the required drivers for Xilinx Ultrascale+ MPSoC
+
+config NONE_64
+    bool "No Platform support"
+    ---help---
+    Remove all platform code.
+
+endchoice
+
+config MPSOC_PLATFORM
+    bool
diff --git a/xen/arch/arm/platforms/Makefile 
b/xen/arch/arm/platforms/Makefile
index 80e555c..c8e763e 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -1,11 +1,14 @@
-obj-y += vexpress.o
-obj-$(CONFIG_ARM_32) += brcm.o
-obj-$(CONFIG_ARM_32) += exynos5.o
-obj-$(CONFIG_ARM_32) += midway.o
-obj-$(CONFIG_ARM_32) += omap5.o
-obj-$(CONFIG_ARM_32) += rcar2.o
-obj-$(CONFIG_ARM_64) += seattle.o
-obj-y += sunxi.o
-obj-$(CONFIG_ARM_64) += thunderx.o
-obj-$(CONFIG_ARM_64) += xgene-storm.o
-obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
+obj-$(CONFIG_ALL_32) += vexpress.o
+obj-$(CONFIG_ALL_32) += sunxi.o
+obj-$(CONFIG_ALL_32) += brcm.o
+obj-$(CONFIG_ALL_32) += exynos5.o
+obj-$(CONFIG_ALL_32) += midway.o
+obj-$(CONFIG_ALL_32) += omap5.o
+obj-$(CONFIG_ALL_32) += rcar2.o
+
+obj-$(CONFIG_ALL_64) += vexpress.o
+obj-$(CONFIG_ALL_64) += sunxi.o
+obj-$(CONFIG_ALL_64) += seattle.o
+obj-$(CONFIG_ALL_64) += thunderx.o
+obj-$(CONFIG_ALL_64) += xgene-storm.o
+obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o


-- 

*Andrii Anisov*


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 11:21         ` Andrii Anisov
@ 2018-07-27 11:27           ` Julien Grall
  2018-07-27 11:34             ` Andrii Anisov
  0 siblings, 1 reply; 42+ messages in thread
From: Julien Grall @ 2018-07-27 11:27 UTC (permalink / raw)
  To: Andrii Anisov, Stefano Stabellini
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, xen-devel,
	dfaggioli, volodymyr_babchuk

Hi,

On 27/07/18 12:21, Andrii Anisov wrote:
> I would suggest something like:
> 
> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> index 06ba4a4..794f06e 100644
> --- a/xen/arch/arm/Kconfig
> +++ b/xen/arch/arm/Kconfig
> @@ -218,6 +218,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
>   config ARM32_HARDEN_BRANCH_PREDICTOR
>       def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
> 
> +source "arch/arm/platforms/Kconfig"
> +

There are no need for duplication. You can instead do something like:

config ALL_64
     default (ALL && ARM_64)

config ALL_32
     default (ALL && ARM_32)

config MPSOC_PLATFORM
     bool
     default (ALL_64 || MPSOC)

Cheers,

>   source "common/Kconfig"
> 
>   source "drivers/Kconfig"
> diff --git a/xen/arch/arm/platforms/Kconfig 
> b/xen/arch/arm/platforms/Kconfig
> new file mode 100644
> index 0000000..badf17b
> --- /dev/null
> +++ b/xen/arch/arm/platforms/Kconfig
> @@ -0,0 +1,72 @@
> +choice
> +    prompt "Platform Support"
> +    depends on ARM_32
> +    default ALL_32
> +    ---help---
> +    Choose which hardware platform to enable in Xen.
> +
> +    If unsure, choose ALL.
> +
> +config ALL_32
> +    bool "All Platforms"
> +    ---help---
> +    Enable support for all available hardware platforms. It doesn't
> +    automatically select any of the related drivers.
> +
> +config NONE_32
> +    bool "No Platform support"
> +    ---help---
> +    Remove all platform code. > +
> +endchoice
> +
> +choice
> +    prompt "Platform Support"
> +    depends on ARM_64
> +    default ALL_64
> +    ---help---
> +    Choose which hardware platform to enable in Xen.
> +
> +    If unsure, choose ALL.
> +
> +config ALL_64
> +    bool "All Platforms"
> +    select MPSOC_PLATFORM
> +    ---help---
> +    Enable support for all available hardware platforms. It doesn't
> +    automatically select any of the related drivers.
> +
> +config QEMU
> +    bool "QEMU aarch virt machine support"
> +    depends on ARM_64
> +    select GICV3
> +    select HAS_PL011
> +    ---help---
> +    Enable all the required drivers for QEMU aarch64 virt emulated
> +    machine.
> +
> +config RCAR3
> +    bool "Renesas RCar3 support"
> +    depends on ARM_64
> +    select HAS_SCIF
> +    ---help---
> +    Enable all the required drivers for Renesas RCar3
> +
> +config MPSOC
> +    bool "Xilinx Ultrascale+ MPSoC support"
> +    depends on ARM_64
> +    select MPSOC_PLATFORM
> +    select HAS_CADENCE_UART
> +    select ARM_SMMU
> +    ---help---
> +    Enable all the required drivers for Xilinx Ultrascale+ MPSoC
> +
> +config NONE_64
> +    bool "No Platform support"
> +    ---help---
> +    Remove all platform code.
> +
> +endchoice
> +
> +config MPSOC_PLATFORM
> +    bool
> diff --git a/xen/arch/arm/platforms/Makefile 
> b/xen/arch/arm/platforms/Makefile
> index 80e555c..c8e763e 100644
> --- a/xen/arch/arm/platforms/Makefile
> +++ b/xen/arch/arm/platforms/Makefile
> @@ -1,11 +1,14 @@
> -obj-y += vexpress.o
> -obj-$(CONFIG_ARM_32) += brcm.o
> -obj-$(CONFIG_ARM_32) += exynos5.o
> -obj-$(CONFIG_ARM_32) += midway.o
> -obj-$(CONFIG_ARM_32) += omap5.o
> -obj-$(CONFIG_ARM_32) += rcar2.o
> -obj-$(CONFIG_ARM_64) += seattle.o
> -obj-y += sunxi.o
> -obj-$(CONFIG_ARM_64) += thunderx.o
> -obj-$(CONFIG_ARM_64) += xgene-storm.o
> -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
> +obj-$(CONFIG_ALL_32) += vexpress.o
> +obj-$(CONFIG_ALL_32) += sunxi.o
> +obj-$(CONFIG_ALL_32) += brcm.o
> +obj-$(CONFIG_ALL_32) += exynos5.o
> +obj-$(CONFIG_ALL_32) += midway.o
> +obj-$(CONFIG_ALL_32) += omap5.o
> +obj-$(CONFIG_ALL_32) += rcar2.o
> +
> +obj-$(CONFIG_ALL_64) += vexpress.o
> +obj-$(CONFIG_ALL_64) += sunxi.o
> +obj-$(CONFIG_ALL_64) += seattle.o
> +obj-$(CONFIG_ALL_64) += thunderx.o
> +obj-$(CONFIG_ALL_64) += xgene-storm.o
> +obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o
> 
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 11:27           ` Julien Grall
@ 2018-07-27 11:34             ` Andrii Anisov
  2018-07-27 11:39               ` Julien Grall
  0 siblings, 1 reply; 42+ messages in thread
From: Andrii Anisov @ 2018-07-27 11:34 UTC (permalink / raw)
  To: Julien Grall, Stefano Stabellini
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, xen-devel,
	dfaggioli, volodymyr_babchuk

Hello Julien,


On 27.07.18 14:27, Julien Grall wrote:
> There are no need for duplication. You can instead do something like:
>
> config ALL_64
>     default (ALL && ARM_64)
>
> config ALL_32
>     default (ALL && ARM_32)
>
> config MPSOC_PLATFORM
>     bool
>     default (ALL_64 || MPSOC)
Yep, but then "config ALL" should not select MPSOC_PLATFORM by itself.


-- 

*Andrii Anisov*


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 11:34             ` Andrii Anisov
@ 2018-07-27 11:39               ` Julien Grall
  0 siblings, 0 replies; 42+ messages in thread
From: Julien Grall @ 2018-07-27 11:39 UTC (permalink / raw)
  To: Andrii Anisov, Stefano Stabellini
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, xen-devel,
	dfaggioli, volodymyr_babchuk



On 27/07/18 12:34, Andrii Anisov wrote:
> Hello Julien,
> 
> 
> On 27.07.18 14:27, Julien Grall wrote:
>> There are no need for duplication. You can instead do something like:
>>
>> config ALL_64
>>     default (ALL && ARM_64)
>>
>> config ALL_32
>>     default (ALL && ARM_32)
>>
>> config MPSOC_PLATFORM
>>     bool
>>     default (ALL_64 || MPSOC)
> Yep, but then "config ALL" should not select MPSOC_PLATFORM by itself.

I know... See my answer on your reply.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 10:30       ` Andrii Anisov
  2018-07-27 11:20         ` Julien Grall
  2018-07-27 11:21         ` Andrii Anisov
@ 2018-07-27 17:11         ` Stefano Stabellini
  2018-07-27 18:23           ` Andrii Anisov
  2 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-27 17:11 UTC (permalink / raw)
  To: Andrii Anisov
  Cc: artem_mygaiev, Stefano Stabellini, andrew.cooper3, George.Dunlap,
	xen-devel, julien.grall, dfaggioli, volodymyr_babchuk

On Fri, 27 Jul 2018, Andrii Anisov wrote:
> On 27.07.18 01:46, Stefano Stabellini wrote:
> > On Tue, 24 Jul 2018, Andrii Anisov wrote:
> > > On 07.07.18 02:13, Stefano Stabellini wrote:
> > > > Add a "Platform Support" choice with four kconfig options: QEMU, RCAR3,
> > > > MPSOC and ALL. They enable the required options for their hardware
> > > > platform. ALL enables all available platforms and it's the default. It
> > > > doesn't automatically select any of the related drivers, otherwise they
> > > > cannot be disabled. ALL is implemented by selecting hidden options
> > > > corresponding to QEMU, MPSOC and RCAR3.
> > > > 
> > > > In the case of the MPSOC that has a platform file under
> > > > arch/arm/platforms/, build the file if MPSOC.
> > > > 
> > > > Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> > > > CC: artem_mygaiev@epam.com
> > > > CC: volodymyr_babchuk@epam.com
> > > > 
> > > > ---
> > > > Changes in v5:
> > > > - turn platform support into a choice
> > > > - add ALL
> > > > 
> > > > Changes in v4:
> > > > - fix GICv3/GICV3
> > > > - default y to all options
> > > > - build xilinx-zynqmp if MPSOC
> > > > ---
> > > >    xen/arch/arm/Kconfig            |  2 ++
> > > >    xen/arch/arm/platforms/Kconfig  | 55
> > > > +++++++++++++++++++++++++++++++++++++++++
> > > >    xen/arch/arm/platforms/Makefile |  2 +-
> > > >    3 files changed, 58 insertions(+), 1 deletion(-)
> > > >    create mode 100644 xen/arch/arm/platforms/Kconfig
> > > > 
> > > > diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> > > > index 2b87111..75cacfb 100644
> > > > --- a/xen/arch/arm/Kconfig
> > > > +++ b/xen/arch/arm/Kconfig
> > > > @@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
> > > >    config ARM32_HARDEN_BRANCH_PREDICTOR
> > > >        def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
> > > >    +source "arch/arm/platforms/Kconfig"
> > > > +
> > > >    source "common/Kconfig"
> > > >      source "drivers/Kconfig"
> > > > diff --git a/xen/arch/arm/platforms/Kconfig
> > > > b/xen/arch/arm/platforms/Kconfig
> > > > new file mode 100644
> > > > index 0000000..07c5930
> > > > --- /dev/null
> > > > +++ b/xen/arch/arm/platforms/Kconfig
> > > > @@ -0,0 +1,55 @@
> > > > +choice
> > > > +	prompt "Platform Support"
> > > > +	default ALL
> > > > +	---help---
> > > > +	Choose which hardware platform to enable in Xen.
> > > > +
> > > > +	If unsure, choose ALL.
> > > > +
> > > > +config ALL
> > > I would suggest to separate it into ALL_ARM32 and ALL_ARM64. Then, in a
> > > makefile use them for platforms instead of raw ARM32 and ARM64. This would
> > > make such change really useful: disabling ALL_x will drop all odd platform
> > > code.
> > Hi Andrii,
> > 
> > I don't understand the suggestion: ARM32 platforms cannot be enabled on
> > ARM64 and vice versa.
> Indeed.
> 
> >   So basically it is as if you always get only
> > ALL_ARM32 or ALL_ARM64 depending on your target architecture.
> > 
> > Am I missing something?
> With this patch, deselecting "config ALL" does not remove all platform code
> from the build.

Yes, it does.

Let's say that you chose ALL at the menu choice. MPSOC_PLATFORM gets
selected, that trigger the build of the MPSOC platform file.

If you do "make menuconfig" again and select RCAR3 instead,
MPSOC_PLATFORM is removed from the .config. Next time you type "make"
the MPSOC platform files will not be built.

Sorry if I am still misunderstanding your suggestion.


> It is because build of the most of that code depends directly
> on ARMxx.
> In order to get a possibility to drop unneeded platform code, the platform
> code should be dependent on "config ALL". But here you do not want to mix
> 32bit and 64bit platforms, so you would need "config ALL_32" and "config
> ALL_64".
> For sure, written above is meaningful only for the case if someone needs the
> possibility to drop odd platform code from the build.
>
> > > > +	bool "All Platforms"
> > > > +	select MPSOC_PLATFORM
> > > > +	select QEMU_PLATFORM
> > > > +	select RCAR3_PLATFORM
> > > > +	---help---
> > > > +	Enable support for all available hardware platforms. It doesn't
> > > > +	automatically select any of the related drivers.
> > > > +
> > > > +config QEMU
> > > > +	bool "QEMU aarch virt machine support"
> > > > +	depends on ARM_64
> > > > +	select QEMU_PLATFORM
> > > > +	select GICV3
> > > > +	select HAS_PL011
> > > > +	---help---
> > > > +	Enable all the required drivers for QEMU aarch64 virt emulated
> > > > +	machine.
> > > > +
> > > > +config RCAR3
> > > > +	bool "Renesas RCar3 support"
> > > > +	depends on ARM_64
> > > > +	select RCAR3_PLATFORM
> > > > +	select HAS_SCIF
> > > > +	---help---
> > > > +	Enable all the required drivers for Renesas RCar3
> > > > +
> > > > +config MPSOC
> > > > +	bool "Xilinx Ultrascale+ MPSoC support"
> > > > +	depends on ARM_64
> > > > +	select MPSOC_PLATFORM
> > > > +	select HAS_CADENCE_UART
> > > > +	select ARM_SMMU
> > > > +	---help---
> > > > +	Enable all the required drivers for Xilinx Ultrascale+ MPSoC
> > > > +
> > > > +endchoice
> > > > +
> > > > +config QEMU_PLATFORM
> > > > +	bool
> > > > +
> > > > +config RCAR3_PLATFORM
> > > > +	bool
> > > > +
> > > > +config MPSOC_PLATFORM
> > > Shouldn't MPSOC_PLATFORM be dependent on ARM64?
> > Yes, and it is, see "config MPSOC" few lines above.
> Few lines above, only "config MPSOC" is dependent on ARM64. But MPSOC_PLATFORM
> is selected by "config ALL" at the beginning of the patch. And it will be
> selected for ARM32 as well.
> 
> > > > +	bool
> > > > +
> > > > diff --git a/xen/arch/arm/platforms/Makefile
> > > > b/xen/arch/arm/platforms/Makefile
> > > > index 80e555c..a79bdb9 100644
> > > > --- a/xen/arch/arm/platforms/Makefile
> > > > +++ b/xen/arch/arm/platforms/Makefile
> > > > @@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
> > > >    obj-y += sunxi.o
> > > >    obj-$(CONFIG_ARM_64) += thunderx.o
> > > >    obj-$(CONFIG_ARM_64) += xgene-storm.o
> > > > -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
> > > > +obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o
> 
> -- 
> 
> *Andrii Anisov*
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 17:11         ` Stefano Stabellini
@ 2018-07-27 18:23           ` Andrii Anisov
  2018-07-27 21:35             ` Stefano Stabellini
  0 siblings, 1 reply; 42+ messages in thread
From: Andrii Anisov @ 2018-07-27 18:23 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: artem_mygaiev, andrew.cooper3, George.Dunlap, dfaggioli,
	julien.grall, xen-devel, volodymyr_babchuk

Hello Stefano,


On 27.07.18 20:11, Stefano Stabellini wrote:
> Yes, it does.
>
> Let's say that you chose ALL at the menu choice. MPSOC_PLATFORM gets
> selected, that trigger the build of the MPSOC platform file.
>
> If you do "make menuconfig" again and select RCAR3 instead,
> MPSOC_PLATFORM is removed from the .config. Next time you type "make"
> the MPSOC platform files will not be built.
But vexpress, sunxi, other listed in arch/arm/platforms/Makefile and 
dependent on ARM32 or ARM64 will be built anyway.


-- 

*Andrii Anisov*



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 18:23           ` Andrii Anisov
@ 2018-07-27 21:35             ` Stefano Stabellini
  2018-07-27 22:09               ` Julien Grall
  2018-07-30 16:11               ` Andrii Anisov
  0 siblings, 2 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-27 21:35 UTC (permalink / raw)
  To: Andrii Anisov
  Cc: artem_mygaiev, Stefano Stabellini, andrew.cooper3, George.Dunlap,
	dfaggioli, julien.grall, xen-devel, volodymyr_babchuk

On Fri, 27 Jul 2018, Andrii Anisov wrote:
> Hello Stefano,
> 
> On 27.07.18 20:11, Stefano Stabellini wrote:
> > Yes, it does.
> > 
> > Let's say that you chose ALL at the menu choice. MPSOC_PLATFORM gets
> > selected, that trigger the build of the MPSOC platform file.
> > 
> > If you do "make menuconfig" again and select RCAR3 instead,
> > MPSOC_PLATFORM is removed from the .config. Next time you type "make"
> > the MPSOC platform files will not be built.
> But vexpress, sunxi, other listed in arch/arm/platforms/Makefile and dependent
> on ARM32 or ARM64 will be built anyway.

Ah, yes, I understand what you mean now.

That is not a problem with this patch or with the approach taken here.
It is just a matter of adding more options like RCAR3 and MPSOC. It is
just that I haven't done it yet. Given that this patch series has been
out for a while now and has all the required acks, I would prefer to
commit it as is (with the small change requested by Julien) and make
changes for vexpress, sunxi, and others in follow-up patches.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 21:35             ` Stefano Stabellini
@ 2018-07-27 22:09               ` Julien Grall
  2018-07-27 23:30                 ` Stefano Stabellini
  2018-07-30 16:11               ` Andrii Anisov
  1 sibling, 1 reply; 42+ messages in thread
From: Julien Grall @ 2018-07-27 22:09 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: artem_mygaiev, Andrii Anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, julien.grall, xen-devel, volodymyr_babchuk


[-- Attachment #1.1: Type: text/plain, Size: 1583 bytes --]

Hi Stefano,

Sorry for the top posting.

I think Andrii made a good point. With your new code MPSOC will get built
on Arm 32 bit as well.

This was not the case before this patch.

So I would like at least that to be fixed before any commit.

Cheers,

On Fri, 27 Jul 2018, 22:38 Stefano Stabellini, <sstabellini@kernel.org>
wrote:

> On Fri, 27 Jul 2018, Andrii Anisov wrote:
> > Hello Stefano,
> >
> > On 27.07.18 20:11, Stefano Stabellini wrote:
> > > Yes, it does.
> > >
> > > Let's say that you chose ALL at the menu choice. MPSOC_PLATFORM gets
> > > selected, that trigger the build of the MPSOC platform file.
> > >
> > > If you do "make menuconfig" again and select RCAR3 instead,
> > > MPSOC_PLATFORM is removed from the .config. Next time you type "make"
> > > the MPSOC platform files will not be built.
> > But vexpress, sunxi, other listed in arch/arm/platforms/Makefile and
> dependent
> > on ARM32 or ARM64 will be built anyway.
>
> Ah, yes, I understand what you mean now.
>
> That is not a problem with this patch or with the approach taken here.
> It is just a matter of adding more options like RCAR3 and MPSOC. It is
> just that I haven't done it yet. Given that this patch series has been
> out for a while now and has all the required acks, I would prefer to
> commit it as is (with the small change requested by Julien) and make
> changes for vexpress, sunxi, and others in follow-up patches.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel

[-- Attachment #1.2: Type: text/html, Size: 2415 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 22:09               ` Julien Grall
@ 2018-07-27 23:30                 ` Stefano Stabellini
  2018-07-30 10:34                   ` Julien Grall
  0 siblings, 1 reply; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-27 23:30 UTC (permalink / raw)
  To: Julien Grall
  Cc: artem_mygaiev, Stefano Stabellini, Andrii Anisov, andrew.cooper3,
	George.Dunlap, dfaggioli, julien.grall, xen-devel,
	volodymyr_babchuk

On Fri, 27 Jul 2018, Julien Grall wrote:
> Hi Stefano,
> Sorry for the top posting.
> 
> I think Andrii made a good point. With your new code MPSOC will get built on Arm 32 bit as well.
> 
> This was not the case before this patch.
> 
> So I would like at least that to be fixed before any commit.

OK, this is a problem. I'll fix it.

Looking into it I think there is a way to solve it that doesn't require
duplication, and not even the introduction of ALL_32 and ALL_64: we just
need to add "if ARM_64" for the ARM64 platforms and "if ARM_32" for the
ARM32 platforms.

So today we would have (the "if ARM_64" is new compared to this patch):

  config ALL
      bool "All Platforms"
      select MPSOC_PLATFORM if ARM_64

In the furure, assuming that we had EXYNOS5 and OMAP5 options, it would become:

  config ALL
      bool "All Platforms"
      select MPSOC_PLATFORM if ARM_64
      select EXYNOS5 if ARM_32
      select OMAP5 if ARM_32

What do you think?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 23:30                 ` Stefano Stabellini
@ 2018-07-30 10:34                   ` Julien Grall
  2018-07-30 17:39                     ` Stefano Stabellini
  0 siblings, 1 reply; 42+ messages in thread
From: Julien Grall @ 2018-07-30 10:34 UTC (permalink / raw)
  To: Stefano Stabellini, Julien Grall
  Cc: artem_mygaiev, Andrii Anisov, andrew.cooper3, George.Dunlap,
	dfaggioli, xen-devel, volodymyr_babchuk

Hi Stefano,

On 28/07/18 00:30, Stefano Stabellini wrote:
> On Fri, 27 Jul 2018, Julien Grall wrote:
>> Hi Stefano,
>> Sorry for the top posting.
>>
>> I think Andrii made a good point. With your new code MPSOC will get built on Arm 32 bit as well.
>>
>> This was not the case before this patch.
>>
>> So I would like at least that to be fixed before any commit.
> 
> OK, this is a problem. I'll fix it.
> 
> Looking into it I think there is a way to solve it that doesn't require
> duplication, and not even the introduction of ALL_32 and ALL_64: we just
> need to add "if ARM_64" for the ARM64 platforms and "if ARM_32" for the
> ARM32 platforms.
> 
> So today we would have (the "if ARM_64" is new compared to this patch):
> 
>    config ALL
>        bool "All Platforms"
>        select MPSOC_PLATFORM if ARM_64
> 
> In the furure, assuming that we had EXYNOS5 and OMAP5 options, it would become:
> 
>    config ALL
>        bool "All Platforms"
>        select MPSOC_PLATFORM if ARM_64
>        select EXYNOS5 if ARM_32
>        select OMAP5 if ARM_32
> 
> What do you think?

I think I would prefer the suggestion I made on Andrii's answer:

choice
    config ALL_PLAT
       bool "All Platforms"
       "...."
endchoice

config ALL_PLAT_64
     default (ALL && ARM_64)

config ALL_PLAT_32
     default (ALL_PLAT && ARM_32)

config MPSOC_PLATFORM
     bool
     default (ALL_PLAT_64 || MPSOC)

This would avoid a long list in "ALL_PLATFORMS".

Also, I just noticed that 'ALL' will become CONFIG_ALL. This is slightly 
too vague as a name. It would be better to include "PLAT" in it.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-27 21:35             ` Stefano Stabellini
  2018-07-27 22:09               ` Julien Grall
@ 2018-07-30 16:11               ` Andrii Anisov
  1 sibling, 0 replies; 42+ messages in thread
From: Andrii Anisov @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Artem Mygaiev, andrew.cooper3, George.Dunlap, xen-devel,
	julien.grall, dfaggioli, Volodymyr Babchuk


Hello Stefano,

> Ah, yes, I understand what you mean now.

My point was to get the feature of minimal platform support right away. You are interested in Xilinx, so you make a minimal configuration for MPSOC. And stack the rest into an *optional* all platforms support. So maintainers of other platforms can show their interest with appropriate patches for minimal configuration supporting their targets.

> Given that this patch series has been
> out for a while now and has all the required acks, I would prefer to
> commit it as is (with the small change requested by Julien) and make
> changes for vexpress, sunxi, and others in follow-up patches.

So let it be.

*ANDRII ANISOV*

    
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs
  2018-07-30 10:34                   ` Julien Grall
@ 2018-07-30 17:39                     ` Stefano Stabellini
  0 siblings, 0 replies; 42+ messages in thread
From: Stefano Stabellini @ 2018-07-30 17:39 UTC (permalink / raw)
  To: Julien Grall
  Cc: artem_mygaiev, Stefano Stabellini, Andrii Anisov, andrew.cooper3,
	George.Dunlap, dfaggioli, Julien Grall, xen-devel,
	volodymyr_babchuk

On Mon, 30 Jul 2018, Julien Grall wrote:
> Hi Stefano,
> 
> On 28/07/18 00:30, Stefano Stabellini wrote:
> > On Fri, 27 Jul 2018, Julien Grall wrote:
> > > Hi Stefano,
> > > Sorry for the top posting.
> > > 
> > > I think Andrii made a good point. With your new code MPSOC will get built
> > > on Arm 32 bit as well.
> > > 
> > > This was not the case before this patch.
> > > 
> > > So I would like at least that to be fixed before any commit.
> > 
> > OK, this is a problem. I'll fix it.
> > 
> > Looking into it I think there is a way to solve it that doesn't require
> > duplication, and not even the introduction of ALL_32 and ALL_64: we just
> > need to add "if ARM_64" for the ARM64 platforms and "if ARM_32" for the
> > ARM32 platforms.
> > 
> > So today we would have (the "if ARM_64" is new compared to this patch):
> > 
> >    config ALL
> >        bool "All Platforms"
> >        select MPSOC_PLATFORM if ARM_64
> > 
> > In the furure, assuming that we had EXYNOS5 and OMAP5 options, it would
> > become:
> > 
> >    config ALL
> >        bool "All Platforms"
> >        select MPSOC_PLATFORM if ARM_64
> >        select EXYNOS5 if ARM_32
> >        select OMAP5 if ARM_32
> > 
> > What do you think?
> 
> I think I would prefer the suggestion I made on Andrii's answer:
> 
> choice
>    config ALL_PLAT
>       bool "All Platforms"
>       "...."
> endchoice
> 
> config ALL_PLAT_64
>     default (ALL && ARM_64)
> 
> config ALL_PLAT_32
>     default (ALL_PLAT && ARM_32)
> 
> config MPSOC_PLATFORM
>     bool
>     default (ALL_PLAT_64 || MPSOC)
> 
> This would avoid a long list in "ALL_PLATFORMS".
> 
> Also, I just noticed that 'ALL' will become CONFIG_ALL. This is slightly too
> vague as a name. It would be better to include "PLAT" in it.

I verified that this also works as expected. I'll make the changes and
resend the series.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2018-07-30 17:39 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 23:12 [PATCH v7 00/12] arm: more kconfig configurability and small default configs Stefano Stabellini
2018-07-06 23:13 ` [PATCH v7 01/12] arm: remove the ARM HDLCD driver Stefano Stabellini
2018-07-06 23:13 ` [PATCH v7 02/12] arm: make it possible to disable HAS_GICV3 Stefano Stabellini
2018-07-06 23:13 ` [PATCH v7 03/12] arm: rename HAS_GICV3 to GICV3 Stefano Stabellini
2018-07-06 23:13 ` [PATCH v7 04/12] Make MEM_ACCESS configurable Stefano Stabellini
2018-07-06 23:13 ` [PATCH v7 05/12] make it possible to enable/disable UART drivers Stefano Stabellini
2018-07-06 23:13 ` [PATCH v7 06/12] arm: make it possible to disable the SMMU driver Stefano Stabellini
2018-07-06 23:13 ` [PATCH v7 07/12] arm: add a tiny kconfig configuration Stefano Stabellini
2018-07-23 11:17   ` Julien Grall
2018-07-06 23:13 ` [PATCH v7 08/12] arm: add ALL, QEMU, Rcar3 and MPSoC configs Stefano Stabellini
2018-07-23 11:24   ` Julien Grall
2018-07-24 22:08     ` Stefano Stabellini
2018-07-24 13:27   ` Andrii Anisov
2018-07-26 22:46     ` Stefano Stabellini
2018-07-27 10:30       ` Andrii Anisov
2018-07-27 11:20         ` Julien Grall
2018-07-27 11:21         ` Andrii Anisov
2018-07-27 11:27           ` Julien Grall
2018-07-27 11:34             ` Andrii Anisov
2018-07-27 11:39               ` Julien Grall
2018-07-27 17:11         ` Stefano Stabellini
2018-07-27 18:23           ` Andrii Anisov
2018-07-27 21:35             ` Stefano Stabellini
2018-07-27 22:09               ` Julien Grall
2018-07-27 23:30                 ` Stefano Stabellini
2018-07-30 10:34                   ` Julien Grall
2018-07-30 17:39                     ` Stefano Stabellini
2018-07-30 16:11               ` Andrii Anisov
2018-07-06 23:14 ` [PATCH v7 09/12] xen: add per-platform defaults for NR_CPUS Stefano Stabellini
2018-07-23 11:26   ` Julien Grall
2018-07-06 23:14 ` [PATCH v7 10/12] xen: add cloc target Stefano Stabellini
2018-07-06 23:14 ` [PATCH v7 11/12] xen: specify support for EXPERT and DEBUG Kconfig options Stefano Stabellini
2018-07-16 12:50   ` Jan Beulich
2018-07-06 23:14 ` [PATCH v7 12/12] xen: clarify the security-support status of Kconfig options on ARM Stefano Stabellini
2018-07-23 11:37   ` Julien Grall
2018-07-24 22:31     ` Stefano Stabellini
2018-07-25  8:46       ` Julien Grall
2018-07-25  8:59         ` Andrew Cooper
2018-07-25  9:50           ` Julien Grall
2018-07-25 11:09             ` George Dunlap
2018-07-26  0:40               ` Stefano Stabellini
2018-07-25  9:11         ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.