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

Re: [Xen-devel] [PATCH 03/20] xen/public: Rename xen_domctl_createdomain.config to arch



Hi,

On 03/19/2018 07:13 PM, Andrew Cooper wrote:
This is a tools only hypercall so fine to change.  Altering the name avoids
having confusing code such as config->config all over the hypervisor and
toolstack.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

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

Cheers,

---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
---
  tools/libxc/xc_domain.c     |  4 ++--
  xen/arch/arm/domain.c       | 10 +++++-----
  xen/arch/arm/setup.c        |  4 ++--
  xen/arch/x86/domain.c       |  2 +-
  xen/arch/x86/setup.c        |  2 +-
  xen/include/public/domctl.h |  2 +-
  6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index ea3df1e..f122ea6 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -57,12 +57,12 @@ int xc_domain_create(xc_interface *xch, uint32_t ssidref,
      domctl.u.createdomain.flags   = flags;
      memcpy(domctl.u.createdomain.handle, handle, sizeof(xen_domain_handle_t));
      /* xc_domain_configure_t is an alias of arch_domainconfig_t */
-    memcpy(&domctl.u.createdomain.config, config, sizeof(*config));
+    memcpy(&domctl.u.createdomain.arch, config, sizeof(*config));
      if ( (err = do_domctl(xch, &domctl)) != 0 )
          return err;
*pdomid = (uint16_t)domctl.domain;
-    memcpy(config, &domctl.u.createdomain.config, sizeof(*config));
+    memcpy(config, &domctl.u.createdomain.arch, sizeof(*config));
return 0;
  }
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 7193531..0931ce6 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -601,18 +601,18 @@ int arch_domain_create(struct domain *d,
      clear_page(d->shared_info);
      share_xen_page_with_guest(virt_to_page(d->shared_info), d, SHARE_rw);
- switch ( config->config.gic_version )
+    switch ( config->arch.gic_version )
      {
      case XEN_DOMCTL_CONFIG_GIC_NATIVE:
          switch ( gic_hw_version () )
          {
          case GIC_V2:
-            config->config.gic_version = XEN_DOMCTL_CONFIG_GIC_V2;
+            config->arch.gic_version = XEN_DOMCTL_CONFIG_GIC_V2;
              d->arch.vgic.version = GIC_V2;
              break;
case GIC_V3:
-            config->config.gic_version = XEN_DOMCTL_CONFIG_GIC_V3;
+            config->arch.gic_version = XEN_DOMCTL_CONFIG_GIC_V3;
              d->arch.vgic.version = GIC_V3;
              break;
@@ -640,10 +640,10 @@ int arch_domain_create(struct domain *d,
      if ( (rc = domain_io_init(d, count + MAX_IO_HANDLER)) != 0 )
          goto fail;
- if ( (rc = domain_vgic_init(d, config->config.nr_spis)) != 0 )
+    if ( (rc = domain_vgic_init(d, config->arch.nr_spis)) != 0 )
          goto fail;
- if ( (rc = domain_vtimer_init(d, &config->config)) != 0 )
+    if ( (rc = domain_vtimer_init(d, &config->arch)) != 0 )
          goto fail;
update_domain_wallclock_time(d);
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index b17797d..e6f8e23 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -840,8 +840,8 @@ void __init start_xen(unsigned long boot_phys_offset,
/* Create initial domain 0. */
      /* The vGIC for DOM0 is exactly emulating the hardware GIC */
-    dom0_cfg.config.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
-    dom0_cfg.config.nr_spis = gic_number_lines() - 32;
+    dom0_cfg.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
+    dom0_cfg.arch.nr_spis = gic_number_lines() - 32;
dom0 = domain_create(0, &dom0_cfg);
      if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 4cac890..c4c34b4 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -480,7 +480,7 @@ int arch_domain_create(struct domain *d,
d->arch.s3_integrity = config->flags & XEN_DOMCTL_CDF_s3_integrity; - emflags = config->config.emulation_flags;
+    emflags = config->arch.emulation_flags;
if ( is_hardware_domain(d) && is_pv_domain(d) )
          emflags |= XEN_X86_EMU_PIT;
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 3f6ecf4..fa77bae 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1638,7 +1638,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
                             ((hvm_funcs.hap_supported && !opt_dom0_shadow) ?
                              XEN_DOMCTL_CDF_hap : 0));
- dom0_cfg.config.emulation_flags |=
+        dom0_cfg.arch.emulation_flags |=
              XEN_X86_EMU_LAPIC | XEN_X86_EMU_IOAPIC;
      }
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index ec7a860..0535da8 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -65,7 +65,7 @@ struct xen_domctl_createdomain {
  #define _XEN_DOMCTL_CDF_xs_domain     4
  #define XEN_DOMCTL_CDF_xs_domain      (1U<<_XEN_DOMCTL_CDF_xs_domain)
      uint32_t flags;
-    struct xen_arch_domainconfig config;
+    struct xen_arch_domainconfig arch;
  };
/* XEN_DOMCTL_getdomaininfo */


--
Julien Grall

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

 


Rackspace

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