On 2017-04-24 20:23, Ralf Ramsauer wrote:
> From now on, the entry point of a cell is no longer fixed to 0x0 on ARM.
> 
> Default behaviour does not change, as non-defined entry settings in cell
> configs default to zero.
> 
> Signed-off-by: Ralf Ramsauer <[email protected]>
> ---
>  hypervisor/arch/arm-common/control.c       | 2 +-
>  hypervisor/include/jailhouse/cell-config.h | 4 +++-
>  tools/jailhouse-cell-linux                 | 2 +-
>  tools/jailhouse-hardware-check             | 2 +-
>  4 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/hypervisor/arch/arm-common/control.c 
> b/hypervisor/arch/arm-common/control.c
> index 55d202a0..987e06d9 100644
> --- a/hypervisor/arch/arm-common/control.c
> +++ b/hypervisor/arch/arm-common/control.c
> @@ -200,7 +200,7 @@ void arch_cell_reset(struct cell *cell)
>        * All CPUs but the first are initially suspended.
>        * The first CPU starts at address 0.
>        */
> -     per_cpu(first)->cpu_on_entry = 0;
> +     per_cpu(first)->cpu_on_entry = cell->config->entry;

Comment above becomes outdated by this line.

>       for_each_cpu_except(cpu, cell->cpu_set, first)
>               per_cpu(cpu)->cpu_on_entry = PSCI_INVALID_ADDRESS;
>  
> diff --git a/hypervisor/include/jailhouse/cell-config.h 
> b/hypervisor/include/jailhouse/cell-config.h
> index 62c8b4c7..833c385f 100644
> --- a/hypervisor/include/jailhouse/cell-config.h
> +++ b/hypervisor/include/jailhouse/cell-config.h
> @@ -40,7 +40,7 @@
>  #define _JAILHOUSE_CELL_CONFIG_H
>  
>  /* Incremented on any layout or semantic change of system or cell config. */
> -#define JAILHOUSE_CONFIG_REVISION    4
> +#define JAILHOUSE_CONFIG_REVISION    5
>  
>  #define JAILHOUSE_CELL_NAME_MAXLEN   31
>  
> @@ -72,6 +72,8 @@ struct jailhouse_cell_desc {
>       __u32 num_pci_caps;
>  
>       __u32 vpci_irq_base;
> +
> +     __u64 entry;

Let's call this cpu_reset_address or so. "entry" doesn't tell enough.

>  } __attribute__((packed));
>  
>  #define JAILHOUSE_MEM_READ           0x0001
> diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux
> index dea6c3ef..70f670b1 100755
> --- a/tools/jailhouse-cell-linux
> +++ b/tools/jailhouse-cell-linux
> @@ -512,7 +512,7 @@ class MemoryRegion:
>  
>  class Config:
>      _HEADER_FORMAT = '6sH32s4xIIIIIIIII'
> -    _HEADER_REVISION = 4
> +    _HEADER_REVISION = 5

I suppose you need to adjust the _HEADER_FORMAT as well...

>  
>      def __init__(self, config_file):
>          self.data = config_file.read()
> diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check
> index fb820120..413b90d1 100755
> --- a/tools/jailhouse-hardware-check
> +++ b/tools/jailhouse-hardware-check
> @@ -113,7 +113,7 @@ class Sysconfig:
>      X86_MAX_IOMMU_UNITS = 8
>      X86_IOMMU_SIZE = 20
>  
> -    HEADER_REVISION = 4
> +    HEADER_REVISION = 5
>      HEADER_FORMAT = '6sH'
>  
>      def __init__(self, path):
> 

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to