RE: where are xs APIs defined

2022-09-19 Thread SHARMA, JYOTIRMOY
[AMD Official Use Only - General] Hello, Thanks for the help. I use Visual Studio Code and somehow it is not able to find. Regards, Jyotirmoy -Original Message- From: Juergen Gross Sent: Tuesday, September 20, 2022 11:19 AM To: SHARMA, JYOTIRMOY ; xen-devel@lists.xenproject.org Cc: M

Re: where are xs APIs defined

2022-09-19 Thread Juergen Gross
On 19.09.22 20:13, SHARMA, JYOTIRMOY wrote: [AMD Official Use Only - General] Hello, I am looking for the source code where Xenstore access APIs like xs_open(), xs_read() are defined. Have a look at tools/libs/store/ Ever thought of using something like cscope? Even "git grep" would have h

Re: [PATCH 5/9] exec/address-spaces: Wrap address space singletons into functions

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 01:17, Bernhard Beschow wrote: In the next steps, these singletons will be resolved by turning them into attributes of the system bus. The system bus is already accessible via the global current_machine variable which will be made use of later in the wrapper functions. All changes hav

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 07:15, Philippe Mathieu-Daudé wrote: On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ... Si

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ... Signed-off-by: Bernhard Beschow --- include/exec

Re: [PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 01:17, Bernhard Beschow wrote: These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futher proliferation of the use of get_system_memory() and get_s

Re: [PATCH 6/9] target/loongarch/cpu: Remove unneeded include directive

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 01:17, Bernhard Beschow wrote: The cpu is used in both user and system emulation context while sysbus.h is system-only. Remove it since it's not needed anyway. Furthermore, it would cause a compile error in the next commit. Signed-off-by: Bernhard Beschow --- target/loongarch/cpu.h

Re: [PATCH 3/9] hw/core/sysbus: Resolve main_system_bus singleton

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 01:17, Bernhard Beschow wrote: In QEMU, a machine and the main_system_bus always go togehter. Usually the bus is part of the machine which suggsts to host it there. "together", "suggests" Since tere is already a current_machine singleton, all code that accesses the main_system_bus

Re: [PATCH 2/9] exec/hwaddr.h: Add missing include

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 01:17, Bernhard Beschow wrote: The next commit would not compile w/o the include directive. Signed-off-by: Bernhard Beschow --- include/exec/hwaddr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h index 8f16d179a8..616255317c 1006

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Philippe Mathieu-Daudé
On 20/9/22 01:17, Bernhard Beschow wrote: SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is regist

RE: [PATCH v7 00/11] Add Xue - console over USB 3 Debug Capability

2022-09-19 Thread Henry Wang
Hi Jan, > -Original Message- > From: Jan Beulich > > Marek Marczykowski-Górecki (11): > > drivers/char: allow using both dbgp=xhci and dbgp=ehci > > IOMMU: add common API for device reserved memory > > IOMMU/AMD: wire common device reserved memory API > > drivers/char: mark DMA bu

Re: Layer 3 (point-to-point) netfront and netback drivers

2022-09-19 Thread Demi Marie Obenour
On Mon, Sep 19, 2022 at 04:21:27PM -0700, Elliott Mitchell wrote: > On Mon, Sep 19, 2022 at 05:41:05PM -0400, Demi Marie Obenour wrote: > > On Mon, Sep 19, 2022 at 01:46:59PM -0700, Elliott Mitchell wrote: > > > On Sun, Sep 18, 2022 at 08:41:25AM -0400, Demi Marie Obenour wrote: > > > > How difficu

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Alistair Francis
On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: > > SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to > inherit from TYPE_MACHINE. This is an inconsistency which can cause > undefined behavior such as memory corruption. > > Change SiFiveEState to inherit from Machine

[PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Bernhard Beschow
The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. Signed-off-by: Bernhard Beschow --- include/exec/address-spaces.h | 30 ++ softmmu/physmem.c | 28 ---

Re: Layer 3 (point-to-point) netfront and netback drivers

2022-09-19 Thread Elliott Mitchell
On Mon, Sep 19, 2022 at 05:41:05PM -0400, Demi Marie Obenour wrote: > On Mon, Sep 19, 2022 at 01:46:59PM -0700, Elliott Mitchell wrote: > > On Sun, Sep 18, 2022 at 08:41:25AM -0400, Demi Marie Obenour wrote: > > > How difficult would it be to provide layer 3 (point-to-point) versions > > > of the e

[PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-19 Thread Bernhard Beschow
These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futher proliferation of the use of get_system_memory() and get_system_io() which are "temprary interfaces" "

[PATCH 7/9] hw/sysbus: Introduce dedicated struct SysBusState for TYPE_SYSTEM_BUS

2022-09-19 Thread Bernhard Beschow
With this out of the way, in the next step, SysBusState gains attributes for its memory and address recouces. Signed-off-by: Bernhard Beschow --- hw/core/sysbus.c | 4 ++-- include/hw/boards.h | 3 ++- include/hw/misc/macio/macio.h | 2 +- include/hw/sysbus.h | 8

[PATCH 5/9] exec/address-spaces: Wrap address space singletons into functions

2022-09-19 Thread Bernhard Beschow
In the next steps, these singletons will be resolved by turning them into attributes of the system bus. The system bus is already accessible via the global current_machine variable which will be made use of later in the wrapper functions. All changes have been performed with search-and-replace: *

[PATCH 6/9] target/loongarch/cpu: Remove unneeded include directive

2022-09-19 Thread Bernhard Beschow
The cpu is used in both user and system emulation context while sysbus.h is system-only. Remove it since it's not needed anyway. Furthermore, it would cause a compile error in the next commit. Signed-off-by: Bernhard Beschow --- target/loongarch/cpu.h | 1 - 1 file changed, 1 deletion(-) diff -

[PATCH 4/9] hw/ppc/spapr: Fix code style problems reported by checkpatch

2022-09-19 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- include/hw/ppc/spapr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 530d739b1d..04a95669ab 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -848,7 +848,8 @@ sta

[PATCH 3/9] hw/core/sysbus: Resolve main_system_bus singleton

2022-09-19 Thread Bernhard Beschow
In QEMU, a machine and the main_system_bus always go togehter. Usually the bus is part of the machine which suggsts to host it there. Since tere is already a current_machine singleton, all code that accesses the main_system_bus can be changed (behind the scenes) to go through current_machine. This

[PATCH 2/9] exec/hwaddr.h: Add missing include

2022-09-19 Thread Bernhard Beschow
The next commit would not compile w/o the include directive. Signed-off-by: Bernhard Beschow --- include/exec/hwaddr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h index 8f16d179a8..616255317c 100644 --- a/include/exec/hwaddr.h +++ b/include/e

[PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Bernhard Beschow
SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is registered as a machine. Signed-off-by: Bernhard

[PATCH 0/9] Deprecate sysbus_get_default() and get_system_memory() et. al

2022-09-19 Thread Bernhard Beschow
In address-spaces.h it can be read that get_system_memory() and get_system_io() are temporary interfaces which "should only be used temporarily until a proper bus interface is available". This statement certainly extends to the address_space_memory and address_space_io singletons. This series attem

Re: [PATCH 06/12] xen/common: add cache coloring allocator for domains

2022-09-19 Thread Stefano Stabellini
On Mon, 19 Sep 2022, Jan Beulich wrote: > On 16.09.2022 18:05, Carlo Nonato wrote: > > On Thu, Sep 15, 2022 at 3:13 PM Jan Beulich wrote: > >> On 26.08.2022 14:51, Carlo Nonato wrote: > >>> --- a/xen/arch/arm/Kconfig > >>> +++ b/xen/arch/arm/Kconfig > >>> @@ -147,6 +147,18 @@ config MAX_CACHE_COLO

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Boris Ostrovsky
On 9/19/22 10:56 AM, Jan Beulich wrote: On 19.09.2022 16:11, Tamas K Lengyel wrote: On Mon, Sep 19, 2022 at 9:58 AM Jan Beulich wrote: On 19.09.2022 15:24, Tamas K Lengyel wrote: On Mon, Sep 19, 2022 at 9:21 AM Jan Beulich wrote: On 19.09.2022 14:25, Tamas K Lengyel wrote: On Mon, Sep

Re: Layer 3 (point-to-point) netfront and netback drivers

2022-09-19 Thread Demi Marie Obenour
On Mon, Sep 19, 2022 at 01:46:59PM -0700, Elliott Mitchell wrote: > On Sun, Sep 18, 2022 at 08:41:25AM -0400, Demi Marie Obenour wrote: > > How difficult would it be to provide layer 3 (point-to-point) versions > > of the existing netfront and netback drivers? Ideally, these would > > share almost

Re: Layer 3 (point-to-point) netfront and netback drivers

2022-09-19 Thread Elliott Mitchell
On Sun, Sep 18, 2022 at 08:41:25AM -0400, Demi Marie Obenour wrote: > How difficult would it be to provide layer 3 (point-to-point) versions > of the existing netfront and netback drivers? Ideally, these would > share almost all of the code with the existing drivers, with the only > difference bei

[PATCH v3] Support ESRT in Xen dom0

2022-09-19 Thread Demi Marie Obenour
fwupd requires access to the EFI System Resource Table (ESRT) to discover which firmware can be updated by the OS. Currently, Linux does not expose the ESRT when running as a Xen dom0. Therefore, it is not possible to use fwupd in a Xen dom0, which is a serious problem for e.g. Qubes OS. Before

Re: [PATCH v3 05/10] x86/mtrr: split generic_set_all()

2022-09-19 Thread Borislav Petkov
On Thu, Sep 08, 2022 at 10:49:09AM +0200, Juergen Gross wrote: > Split generic_set_all() into multiple parts, while moving the main > function body into cacheinfo.c. > > This prepares the support of PAT without needing MTRR support by "Prepare PAT support without ... " > moving the main function

Re: [PATCH v3 03/10] x86/mtrr: replace use_intel() with a local flag

2022-09-19 Thread Borislav Petkov
On Mon, Sep 12, 2022 at 11:10:29AM +0200, Juergen Gross wrote: > In the end this variable doesn't specify which caching types are available, > but the ways to select/control the caching types. > > So what about "memory_caching_select" or "memory_caching_control" instead? _control sounds like the

[for-4.17 v2] xen/arm: domain_build: Always print the static shared memory region

2022-09-19 Thread Michal Orzel
At the moment, the information about allocating static shared memory region is only printed during the debug build. This information can also be helpful for the end user (which may not be the same as the person building the package), so switch to printk(). Also drop XENLOG_INFO to be consistent wit

where are xs APIs defined

2022-09-19 Thread SHARMA, JYOTIRMOY
[AMD Official Use Only - General] Hello, I am looking for the source code where Xenstore access APIs like xs_open(), xs_read() are defined. Please help. Regards, Jyotirmoy

Re: [PATCH 1/2] acpi: Make TPM version configurable.

2022-09-19 Thread Jason Andryuk
On Thu, Sep 15, 2022 at 4:41 PM Jennifer Herbert wrote: > > This patch makes the TPM version, for which the ACPI libary probes, > configurable. > If acpi_config.tpm_verison is set to 1, it indicates that 1.2 (TCPA) should > be probed. > I have also added to hvmloader an option to allow setting t

[PATCH] xen: credit2: respect credit2_runqueue=all when arranging runqueues

2022-09-19 Thread Marek Marczykowski-Górecki
Documentation for credit2_runqueue=all says it should create one queue for all pCPUs on the host. But since introduction sched_credit2_max_cpus_runqueue, it actually created separate runqueue per socket, even if the CPUs count is below sched_credit2_max_cpus_runqueue. Adjust the condition to skip

[PATCH] xen: credit2: respect credit2_runqueue=all when arranging runqueues

2022-09-19 Thread Marek Marczykowski-Górecki
Documentation for credit2_runqueue=all says it should create one queue for all pCPUs on the host. But since introduction sched_credit2_max_cpus_runqueue, it actually created separate runqueue per socket, even if the CPUs count is below sched_credit2_max_cpus_runqueue. Adjust the condition to skip

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Jan Beulich
On 19.09.2022 16:11, Tamas K Lengyel wrote: > On Mon, Sep 19, 2022 at 9:58 AM Jan Beulich wrote: > >> On 19.09.2022 15:24, Tamas K Lengyel wrote: >>> On Mon, Sep 19, 2022 at 9:21 AM Jan Beulich wrote: On 19.09.2022 14:25, Tamas K Lengyel wrote: > On Mon, Sep 19, 2022 at 5:28 AM Jan

Re: [XEN PATCH v3] build: Fix x86 out-of-tree build without EFI

2022-09-19 Thread Anthony PERARD
On Mon, Sep 19, 2022 at 01:02:52PM +0200, Jan Beulich wrote: > On 19.09.2022 12:28, Anthony PERARD wrote: > > Acked-by: Jan Beulich > with a remark and one more adjustment: > > > --- > > > > Notes: > > v3: > > - back to using common-stub.c > > As said in person, I'm a little puzzled by

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Tamas K Lengyel
On Mon, Sep 19, 2022 at 9:58 AM Jan Beulich wrote: > On 19.09.2022 15:24, Tamas K Lengyel wrote: > > On Mon, Sep 19, 2022 at 9:21 AM Jan Beulich wrote: > >> > >> On 19.09.2022 14:25, Tamas K Lengyel wrote: > >>> On Mon, Sep 19, 2022 at 5:28 AM Jan Beulich wrote: > > On 16.09.2022 23:3

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Jan Beulich
On 19.09.2022 15:24, Tamas K Lengyel wrote: > On Mon, Sep 19, 2022 at 9:21 AM Jan Beulich wrote: >> >> On 19.09.2022 14:25, Tamas K Lengyel wrote: >>> On Mon, Sep 19, 2022 at 5:28 AM Jan Beulich wrote: On 16.09.2022 23:35, Boris Ostrovsky wrote: > > On 9/16/22 8:52 AM, Jan Beuli

[PATCH v3 2/2] xen/gnttab: reduce size of struct active_grant_entry

2022-09-19 Thread Juergen Gross
The size of struct active_grant_entry for 64-bit builds is 40 or 48 bytes today (with or without NDEBUG). It can easily be reduced by 8 bytes by replacing the trans_domain pointer with the domid of the related domain. trans_domain is only ever used for transitive grants, which doesn't have any kno

[PATCH v3 1/2] xen: add knownalive_domain_from_domid() helper

2022-09-19 Thread Juergen Gross
Add a helper knownalive_domain_from_domid() returning the struct domain pointer for a domain give by its domid and which is known not being able to be released (its reference count isn't incremented and no rcu_lock_domain() is called for it). In order to simplify coding add an internal helper for

[PATCH v3 0/2] xen/gnttab: reduce size of struct active_grant_entry

2022-09-19 Thread Juergen Gross
While looking at the grant table code I thought it should be possible to have a smaller struct active_grant_entry. This approach should only hit transitive grants with some negative performance effect, "normal" grants should be not affected. Juergen Gross (2): xen: add knownalive_domain_from_dom

Re: [PATCH v7 00/11] Add Xue - console over USB 3 Debug Capability

2022-09-19 Thread Marek Marczykowski-Górecki
On Mon, Sep 19, 2022 at 03:33:55PM +0200, Jan Beulich wrote: > On 17.09.2022 04:51, Marek Marczykowski-Górecki wrote: > > This is integration of https://github.com/connojd/xue into mainline Xen. > > This patch series includes several patches that I made in the process, some > > are > > very loosel

Re: [PATCH v7 00/11] Add Xue - console over USB 3 Debug Capability

2022-09-19 Thread Jan Beulich
On 17.09.2022 04:51, Marek Marczykowski-Górecki wrote: > This is integration of https://github.com/connojd/xue into mainline Xen. > This patch series includes several patches that I made in the process, some > are > very loosely related. > > The driver developed by Connor supports console via USB

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Tamas K Lengyel
On Mon, Sep 19, 2022 at 9:21 AM Jan Beulich wrote: > > On 19.09.2022 14:25, Tamas K Lengyel wrote: > > On Mon, Sep 19, 2022 at 5:28 AM Jan Beulich wrote: > >> > >> On 16.09.2022 23:35, Boris Ostrovsky wrote: > >>> > >>> On 9/16/22 8:52 AM, Jan Beulich wrote: > On 15.09.2022 16:01, Tamas K Le

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Jan Beulich
On 19.09.2022 14:25, Tamas K Lengyel wrote: > On Mon, Sep 19, 2022 at 5:28 AM Jan Beulich wrote: >> >> On 16.09.2022 23:35, Boris Ostrovsky wrote: >>> >>> On 9/16/22 8:52 AM, Jan Beulich wrote: On 15.09.2022 16:01, Tamas K Lengyel wrote: > While experimenting with the vPMU subsystem an AS

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Tamas K Lengyel
On Mon, Sep 19, 2022 at 5:28 AM Jan Beulich wrote: > > On 16.09.2022 23:35, Boris Ostrovsky wrote: > > > > On 9/16/22 8:52 AM, Jan Beulich wrote: > >> On 15.09.2022 16:01, Tamas K Lengyel wrote: > >>> While experimenting with the vPMU subsystem an ASSERT failure was > >>> observed in vmx_find_msr

Re: [XEN PATCH v3] build: Fix x86 out-of-tree build without EFI

2022-09-19 Thread Jan Beulich
On 19.09.2022 12:28, Anthony PERARD wrote: > We can't have a source file with the same name that exist in both the > common code and in the arch specific code for efi/. This can lead to > confusion in make and it can pick up the wrong source file. This issue > lead to a failure to build a pv-shim f

Re: [PATCH 2/2] xen/gntdev: Accommodate VMA splitting

2022-09-19 Thread Juergen Gross
On 12.09.22 06:00, M. Vefa Bicakci wrote: Prior to this commit, the gntdev driver code did not handle the following scenario correctly: * User process sets up a gntdev mapping composed of two grant mappings (i.e., two pages shared by another Xen domain). * User process munmap()s one of the pa

Re: [PATCH 2/2] acpi: Add TPM2 interface definition.

2022-09-19 Thread Jan Beulich
On 15.09.2022 22:40, Jennifer Herbert wrote: > --- a/tools/firmware/hvmloader/config.h > +++ b/tools/firmware/hvmloader/config.h > @@ -56,6 +56,7 @@ extern uint8_t ioapic_version; > #define PCI_ISA_IRQ_MASK0x0c20U /* ISA IRQs 5,10,11 are PCI connected */ > > #define ACPI_TIS_HDR_ADDRESS 0xF

[XEN PATCH v3] build: Fix x86 out-of-tree build without EFI

2022-09-19 Thread Anthony PERARD
We can't have a source file with the same name that exist in both the common code and in the arch specific code for efi/. This can lead to confusion in make and it can pick up the wrong source file. This issue lead to a failure to build a pv-shim for x86 out-of-tree, as this is one example of an x8

Re: [PATCH 1/2] acpi: Make TPM version configurable.

2022-09-19 Thread Jan Beulich
On 15.09.2022 22:40, Jennifer Herbert wrote: First of all - please follow patch submission guidelines and send patches To: the list only, with maintainers Cc:-ed. > --- a/tools/firmware/hvmloader/util.c > +++ b/tools/firmware/hvmloader/util.c > @@ -994,13 +994,22 @@ void hvmloader_acpi_build_tabl

Re: [PATCH 1/2] xen/gntdev: Prevent leaking grants

2022-09-19 Thread Juergen Gross
On 12.09.22 06:00, M. Vefa Bicakci wrote: Prior to this commit, if a grant mapping operation failed partially, some of the entries in the map_ops array would be invalid, whereas all of the entries in the kmap_ops array would be valid. This in turn would cause the following logic in gntdev_map_gra

Re: [PATCH] x86/vpmu: fix race-condition in vpmu_load

2022-09-19 Thread Jan Beulich
On 16.09.2022 23:35, Boris Ostrovsky wrote: > > On 9/16/22 8:52 AM, Jan Beulich wrote: >> On 15.09.2022 16:01, Tamas K Lengyel wrote: >>> While experimenting with the vPMU subsystem an ASSERT failure was >>> observed in vmx_find_msr because the vcpu_runnable state was true. >>> >>> The root cause

Re: [PATCH 0/7] Fix MISRA C 2012 Rule 20.7 violations

2022-09-19 Thread Jan Beulich
On 18.09.2022 15:02, Roberto Bagnara wrote: > On 03/09/22 02:52, Stefano Stabellini wrote: >> The question is on the interpretation of Rule 20.7. Are parenthesis >> required by Rule 20.7 in the following cases: >> >> - macro parameters used as function arguments > > [...] > > - macro parameter us

Re: [BUG] problems with NICs pass through to OpenBSD guest

2022-09-19 Thread Roger Pau Monné
On Fri, Sep 16, 2022 at 05:08:59PM +0200, Adam Szewczyk wrote: > Sorry, I always forgot that default answer is "answer" to not "answer to > all". > > My xl dmesg after calling those debug-keys is: Trimming the trace: > (XEN) MSI information: > (XEN) MSI125 vec=72 lowest edge assert log

[PATCH v6 9/9] xen/arm: ffa: support sharing memory

2022-09-19 Thread Jens Wiklander
Adds support for a guest to share memory with an SP using FFA_MEM_SHARE, FFA_MEM_RECLAIM and FFA_MEM_FRAG_TX. Small memory regions can be shared using FFA_MEM_SHARE, but larger memory regions may need to be transmitted in fragments with FFA_MEM_FRAG_TX. A memory region that doesn't need to be share

[PATCH v6 8/9] xen/arm: move regpair_to_uint64() and uint64_to_regpair() to regs.h

2022-09-19 Thread Jens Wiklander
Moves the two helper functions regpair_to_uint64() and uint64_to_regpair() from xen/arch/arm/tee/optee.c to the common arm specific regs.h. This enables reuse of these functions in the FF-A mediator in a subsequent patch. Reviewed-by: Michal Orzel Signed-off-by: Jens Wiklander --- xen/arch/arm/

[PATCH v6 7/9] xen/arm: ffa: support guest FFA_PARTITION_INFO_GET

2022-09-19 Thread Jens Wiklander
Adds support in the mediator to handle FFA_PARTITION_INFO_GET requests from a guest. The requests are forwarded to the SPMC and the response is translated according to the FF-A version in use by the guest. Using FFA_PARTITION_INFO_GET changes the owner of the RX buffer to the caller (the guest in

[PATCH v6 6/9] xen/arm: ffa: support mapping guest RX/TX buffers

2022-09-19 Thread Jens Wiklander
Adds support in the mediator to map and unmap the RX and TX buffers provided by the guest using the two FF-A functions FFA_RXTX_MAP and FFA_RXTX_UNMAP. These buffer are later used to to transmit data that cannot be passed in registers only. Signed-off-by: Jens Wiklander --- xen/arch/arm/ffa.c |

[PATCH v6 3/9] xen/arm: ffa: add direct request support

2022-09-19 Thread Jens Wiklander
Adds support for sending a FF-A direct request. [1] https://developer.arm.com/documentation/den0077/latest Signed-off-by: Jens Wiklander --- xen/arch/arm/ffa.c | 125 - 1 file changed, 124 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/ffa.c b

[PATCH v6 5/9] xen/arm: ffa: send guest events to Secure Partitions

2022-09-19 Thread Jens Wiklander
The FF-A specification defines framework messages sent as direct requests when certain events occurs. For instance when a VM (guest) is created or destroyed. Only SPs which have subscribed to these events will receive them. An SP can subscribe to these messages in its partition properties. The par

[PATCH v6 0/9] Xen FF-A mediator

2022-09-19 Thread Jens Wiklander
Hi, This patch sets add a FF-A [1] mediator modeled after the TEE mediator already present in Xen. The FF-A mediator implements the subset of the FF-A 1.1 specification needed to communicate with OP-TEE using FF-A as transport mechanism instead of SMC/HVC as with the TEE mediator. It allows a simi

[PATCH v6 4/9] xen/arm: ffa: map SPMC rx/tx buffers

2022-09-19 Thread Jens Wiklander
When initializing the FF-A mediator map the RX and TX buffers shared with the SPMC. These buffer are later used to to transmit data that cannot be passed in registers only. Signed-off-by: Jens Wiklander --- xen/arch/arm/ffa.c | 57 +- 1 file changed,

[PATCH v6 2/9] xen/arm: add a primitive FF-A mediator

2022-09-19 Thread Jens Wiklander
Adds a FF-A version 1.1 [1] mediator to communicate with a Secure Partition in secure world. This commit brings in only the parts needed to negotiate FF-A version number with guest and SPMC. A guest configuration variable "ffa_enabled" is used to indicate if a guest is trusted to use FF-A. This

[PATCH v6 1/9] xen/arm: smccc: add support for SMCCCv1.2 extended input/output registers

2022-09-19 Thread Jens Wiklander
SMCCC v1.2 [1] AArch64 allows x0-x17 to be used as both parameter registers and result registers for the SMC and HVC instructions. Arm Firmware Framework for Armv8-A specification makes use of x0-x7 as parameter and result registers. Let us add new interface to support this extended set of input/

Re: [PATCH] MAINTAINERS: change my email

2022-09-19 Thread Stewart Hildebrand
On 9/16/22 02:08, Jan Beulich wrote: On 15.09.2022 21:30, Stewart Hildebrand wrote: I am departing DornerWorks. I will still be working with Xen in my next role, and I still have an interest in maintaining the ARINC 653 scheduler, so change to my personal email address. Also change status to Mai

Re: [PATCH v7 11/11] drivers/char: add console=ehci as an alias for console=dbgp

2022-09-19 Thread Jan Beulich
On 17.09.2022 04:51, Marek Marczykowski-Górecki wrote: > Make it consistent with console=xhci. > > Suggested-by: Jan Beulich > Signed-off-by: Marek Marczykowski-Górecki Acked-by: Jan Beulich

Re: [PATCH v2] MAINTAINERS: ARINC 653 scheduler maintainer updates

2022-09-19 Thread Jan Beulich
On 19.09.2022 04:10, Stewart Hildebrand wrote: > From: Stewart Hildebrand > > Add Nathan Studer as co-maintainer. > > I am departing DornerWorks. I will still be working with Xen in my next > role, and I still have an interest in co-maintaining the ARINC 653 > scheduler, so change to my personal

[xen-unstable test] 173258: tolerable FAIL

2022-09-19 Thread osstest service owner
flight 173258 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/173258/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-libvirt 12 debian-install fail in 173254 pass in 173258 test-armhf-armhf-xl-vhd 12 d

Re: [PATCH 12/12] xen/arm: add cache coloring support for Xen

2022-09-19 Thread Jan Beulich
On 16.09.2022 18:07, Carlo Nonato wrote: > On Thu, Sep 15, 2022 at 3:25 PM Jan Beulich wrote: >> On 26.08.2022 14:51, Carlo Nonato wrote: >>> @@ -218,6 +221,28 @@ void *__vmap(const mfn_t *mfn, unsigned int >>> granularity, >>> return va; >>> } >>> >>> +#ifdef CONFIG_CACHE_COLORING >>> +voi