Re: [xen-unstable test] 175154: regressions - FAIL

2022-12-13 Thread Jan Beulich
On 13.12.2022 02:11, osstest service owner wrote: > flight 175154 xen-unstable real [real] > http://logs.test-lab.xenproject.org/osstest/logs/175154/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > test-amd64-i386-livepatch 8

[linux-linus test] 175157: regressions - FAIL

2022-12-13 Thread osstest service owner
flight 175157 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175157/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 8 xen-boot fail REGR. vs. 173462 test-amd64-amd64-li

Re: [PATCH v3 01/18] xen/arm64: flushtlb: Reduce scope of barrier for local TLB flush

2022-12-13 Thread Michal Orzel
Hi Julien, On 12/12/2022 10:55, Julien Grall wrote: > > > From: Julien Grall > > Per D5-4929 in ARM DDI 0487H.a: > "A DSB NSH is sufficient to ensure completion of TLB maintenance > instructions that apply to a single PE. A DSB ISH is sufficient to > ensure completion of TLB maintenance inst

[xen-unstable test] 175159: regressions - trouble: broken/fail/pass

2022-12-13 Thread osstest service owner
flight 175159 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175159/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-coresched-amd64-xl broken test-amd64-i386-livepatch 8 xen-boot

Re: [PATCH v3 02/18] xen/arm64: flushtlb: Implement the TLBI repeat workaround for TLB flush by VA

2022-12-13 Thread Michal Orzel
Hi Julien, On 12/12/2022 10:55, Julien Grall wrote: > > > From: Julien Grall > > Looking at the Neoverse N1 errata document, it is not clear to me > why the TLBI repeat workaround is not applied for TLB flush by VA. > > The TBL flush by VA helpers are used in flush_xen_tlb_range_va_local() >

Re: [PATCH 11/20] tools/xenstore: move changed domain handling

2022-12-13 Thread Julien Grall
Hi Juergen, On 13/12/2022 06:53, Juergen Gross wrote: On 01.12.22 22:58, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote:   static bool check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) @@ -492,8 +504,12 @@ static struct domain *find_or_alloc_existing_dom

Re: [PATCH 15/20] tools/xenstore: make domain_is_unprivileged() an inline function

2022-12-13 Thread Julien Grall
Hi, On 13/12/2022 07:57, Juergen Gross wrote: On 01.12.22 23:05, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: clang is complaining about a NULL dereference for constructs like:    domain_is_unprivileged(conn) ? conn->in : NULL I have just build xenstored with c

Re: [PATCH v3 01/18] xen/arm64: flushtlb: Reduce scope of barrier for local TLB flush

2022-12-13 Thread Julien Grall
On 13/12/2022 09:11, Michal Orzel wrote: Hi Julien, Hi Michal, On 12/12/2022 10:55, Julien Grall wrote: From: Julien Grall Per D5-4929 in ARM DDI 0487H.a: "A DSB NSH is sufficient to ensure completion of TLB maintenance instructions that apply to a single PE. A DSB ISH is sufficient

Re: [PATCH v9 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid

2022-12-13 Thread Jan Beulich
On 18.11.2022 11:45, Wei Chen wrote: > VIRTUAL_BUG_ON is an empty macro used in phys_to_nid. This > results in two lines of error-checking code in phys_to_nid > that is not actually working and causing two compilation > errors: > 1. error: "MAX_NUMNODES" undeclared (first use in this function). >

Re: [PATCH v3 01/18] xen/arm64: flushtlb: Reduce scope of barrier for local TLB flush

2022-12-13 Thread Michal Orzel
Hi Julien, On 13/12/2022 10:45, Julien Grall wrote: > > > On 13/12/2022 09:11, Michal Orzel wrote: >> Hi Julien, > > Hi Michal, > >> On 12/12/2022 10:55, Julien Grall wrote: >>> >>> >>> From: Julien Grall >>> >>> Per D5-4929 in ARM DDI 0487H.a: >>> "A DSB NSH is sufficient to ensure completio

Re: [PATCH 11/20] tools/xenstore: move changed domain handling

2022-12-13 Thread Juergen Gross
On 13.12.22 10:35, Julien Grall wrote: Hi Juergen, On 13/12/2022 06:53, Juergen Gross wrote: On 01.12.22 22:58, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote:   static bool check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) @@ -492,8 +504,12 @@ static st

[libvirt test] 175162: tolerable all pass - PUSHED

2022-12-13 Thread osstest service owner
flight 175162 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/175162/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 175137 test-armhf-armhf-libvirt-qcow2 15 saveres

[PATCH V9 0/3] toolstack support for generic virtio devices on Arm

2022-12-13 Thread Viresh Kumar
Hello, This patchset adds toolstack support for I2C, GPIO and generic virtio devices. This is inspired from the work done by Oleksandr for the Disk device. This is developed as part of Linaro's Project Stratos, where we are working towards Hypervisor agnostic Rust based backends [1]. This is bas

[PATCH V9 1/3] libxl: Add support for generic virtio device

2022-12-13 Thread Viresh Kumar
This patch adds basic support for configuring and assisting generic Virtio backends, which could run in any domain. An example of domain configuration for mmio based Virtio I2C device is: virtio = ["type=virtio,device22,transport=mmio"] To make this work on Arm, allocate Virtio MMIO params (IRQ a

[PATCH V9 3/3] docs: Add documentation for generic virtio devices

2022-12-13 Thread Viresh Kumar
This patch updates xl.cfg man page with details of generic Virtio device related information. Reviewed-by: Anthony PERARD Signed-off-by: Viresh Kumar --- docs/man/xl.cfg.5.pod.in | 33 + 1 file changed, 33 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/do

[PATCH V9 2/3] xl: Add support to parse generic virtio device

2022-12-13 Thread Viresh Kumar
This patch adds basic support for parsing generic Virtio backend. An example of domain configuration for mmio based Virtio I2C device is: virtio = ["type=virtio,device22,transport=mmio"] Signed-off-by: Viresh Kumar --- tools/xl/xl_parse.c | 81 + 1 fi

Re: [PATCH 11/20] tools/xenstore: move changed domain handling

2022-12-13 Thread Julien Grall
On 13/12/2022 09:54, Juergen Gross wrote: On 13.12.22 10:35, Julien Grall wrote: Hi Juergen, On 13/12/2022 06:53, Juergen Gross wrote: On 01.12.22 22:58, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote:   static bool check_indexes(XENSTORE_RING_IDX cons, XENSTORE

Re: [PATCH V9 2/3] xl: Add support to parse generic virtio device

2022-12-13 Thread Anthony PERARD
On Tue, Dec 13, 2022 at 03:38:47PM +0530, Viresh Kumar wrote: > This patch adds basic support for parsing generic Virtio backend. > > An example of domain configuration for mmio based Virtio I2C device is: > virtio = ["type=virtio,device22,transport=mmio"] > > Signed-off-by: Viresh Kumar Review

RE: [PATCH v9 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid

2022-12-13 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年12月13日 17:47 > To: Wei Chen > Cc: nd ; Andrew Cooper ; George > Dunlap ; Julien Grall ; Stefano > Stabellini ; Wei Liu ; Jiamei Xie > ; xen-devel@lists.xenproject.org; Roger Pau Monné > > Subject: Re: [PATCH v9 3/6] xen/x86:

Re: [PATCH v3 03/18] xen/arm32: flushtlb: Reduce scope of barrier for local TLB flush

2022-12-13 Thread Michal Orzel
Hi Julien, On 12/12/2022 10:55, Julien Grall wrote: > > > From: Julien Grall > > Per G5-9224 in ARM DDI 0487I.a: > > "A DSB NSH is sufficient to ensure completion of TLB maintenance > instructions that apply to a single PE. A DSB ISH is sufficient to > ensure completion of TLB maintenance i

Re: [PATCH v3 05/18] xen/arm: Clean-up the memory layout

2022-12-13 Thread Michal Orzel
Hi Julien, On 12/12/2022 10:55, Julien Grall wrote: > > > From: Julien Grall > > In a follow-up patch, the base address for the common mappings will > vary between arm32 and arm64. To avoid any duplication, define > every mapping in the common region from the previous one. > > Take the opport

Re: [PATCH v3 05/18] xen/arm: Clean-up the memory layout

2022-12-13 Thread Michal Orzel
On 13/12/2022 11:57, Michal Orzel wrote: > > > Hi Julien, > > On 12/12/2022 10:55, Julien Grall wrote: >> >> >> From: Julien Grall >> >> In a follow-up patch, the base address for the common mappings will >> vary between arm32 and arm64. To avoid any duplication, define >> every mapping in t

Re: [PATCH v3 06/18] xen/arm32: head: Replace "ldr rX, =" with "mov_w rX, "

2022-12-13 Thread Michal Orzel
Hi Julien, On 12/12/2022 10:55, Julien Grall wrote: > > > From: Julien Grall > > "ldr rX, =" is used to load a value from the literal pool. This > implies a memory access. > > This can be avoided by using the macro mov_w which encode the value in > the immediate of two instructions. > > So r

Re: [PATCH V9 1/3] libxl: Add support for generic virtio device

2022-12-13 Thread Jan Beulich
On 13.12.2022 11:08, Viresh Kumar wrote: > This patch adds basic support for configuring and assisting generic > Virtio backends, which could run in any domain. > > An example of domain configuration for mmio based Virtio I2C device is: > virtio = ["type=virtio,device22,transport=mmio"] > > To ma

Re: [PATCH v3 04/18] xen/arm: flushtlb: Reduce scope of barrier for the TLB range flush

2022-12-13 Thread Michal Orzel
Hi Julien, On 12/12/2022 10:55, Julien Grall wrote: > > > From: Julien Grall > > At the moment, flush_xen_tlb_range_va{,_local}() are using system > wide memory barrier. This is quite expensive and unnecessary. > > For the local version, a non-shareable barrier is sufficient. > For the SMP ve

Re: [PATCH v9 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid

2022-12-13 Thread Jan Beulich
On 13.12.2022 11:40, Wei Chen wrote: > Hi Jan, > >> -Original Message- >> From: Jan Beulich >> Sent: 2022年12月13日 17:47 >> To: Wei Chen >> Cc: nd ; Andrew Cooper ; George >> Dunlap ; Julien Grall ; Stefano >> Stabellini ; Wei Liu ; Jiamei Xie >> ; xen-devel@lists.xenproject.org; Roger Pau

Re: [PATCH V9 3/3] docs: Add documentation for generic virtio devices

2022-12-13 Thread Oleksandr Tyshchenko
On 13.12.22 12:08, Viresh Kumar wrote: Hello Viresh This patch updates xl.cfg man page with details of generic Virtio device related information. Reviewed-by: Anthony PERARD Signed-off-by: Viresh Kumar Now it looks perfect, thanks Reviewed-by: Oleksandr Tyshchenko --- docs/man/x

Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-13 Thread David Vrabel
On 12/12/2022 17:04, Jan Beulich wrote: On 10.11.2022 17:59, David Vrabel wrote: --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -237,7 +237,10 @@ struct arch_msix { int table_refcnt[MAX_MSIX_TABLE_PAGES]; int table_idx[MAX_MSIX_TABLE_PAGES]; sp

[PATCH 0/2] NUMA: phys_to_nid() related adjustments

2022-12-13 Thread Jan Beulich
First of all we need to deal with fallout from converting the function's previously dead checks to ASSERT(). An approach with a weakness is proposed on patch 1; see the RFC remark there. Plus phys_to_nid() has been somewhat inefficient with respect to all of its present callers. 1: x86/mm: avoid p

[PATCH 1/2] x86/mm: avoid phys_to_nid() calls for invalid addresses

2022-12-13 Thread Jan Beulich
With phys_to_nid() now actively checking that a valid node ID is on record, the two uses in paging_init() can actually trigger at least the 2nd of the assertions there. They're used to calculate allocation flags, but the calculated flags wouldn't be used when dealing with an invalid (unpopulated) a

[PATCH 2/2] NUMA: replace phys_to_nid()

2022-12-13 Thread Jan Beulich
All callers convert frame numbers (perhaps in turn derived from struct page_info pointers) to an address, just for the function to convert it back to a frame number (as the first step of paddr_to_pdx()). Replace the function by mfn_to_nid() plus a page_to_nid() wrapper macro. Replace call sites by

Re: [PATCH 4/5] multiboot2: parse console= option when setting GOP mode

2022-12-13 Thread Daniel Kiper
Sorry for late reply... On Mon, Dec 05, 2022 at 04:10:28PM +0100, Jan Beulich wrote: > On 23.11.2022 16:45, Roger Pau Monne wrote: > > Only set the GOP mode if vga is selected in the console option, > > otherwise just fetch the information from the current mode in order to > > make it available to

Re: [PATCH V9 1/3] libxl: Add support for generic virtio device

2022-12-13 Thread Oleksandr Tyshchenko
On 13.12.22 12:08, Viresh Kumar wrote: Hello Viresh This patch adds basic support for configuring and assisting generic Virtio backends, which could run in any domain. An example of domain configuration for mmio based Virtio I2C device is: virtio = ["type=virtio,device22,transport=mmio"] T

Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-13 Thread Jan Beulich
On 13.12.2022 12:34, David Vrabel wrote: > On 12/12/2022 17:04, Jan Beulich wrote: >> On 10.11.2022 17:59, David Vrabel wrote: >>> >>> --- a/xen/arch/x86/include/asm/msi.h >>> +++ b/xen/arch/x86/include/asm/msi.h >>> @@ -237,7 +237,10 @@ struct arch_msix { >>> int table_refcnt[MAX_MSIX_TABLE_

Re: [PATCH v3 1/3] x86/vmx: implement VMExit based guest Bus Lock detection

2022-12-13 Thread Roger Pau Monné
On Tue, Jul 19, 2022 at 07:26:08AM +, Tian, Kevin wrote: > > From: Roger Pau Monne > > Sent: Friday, July 1, 2022 9:17 PM > > > > @@ -4065,6 +4065,11 @@ void vmx_vmexit_handler(struct cpu_user_regs > > *regs) > > > > if ( unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) ) > >

Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-13 Thread David Vrabel
On 13/12/2022 11:50, Jan Beulich wrote: On 13.12.2022 12:34, David Vrabel wrote: On 12/12/2022 17:04, Jan Beulich wrote: On 10.11.2022 17:59, David Vrabel wrote: --- a/xen/arch/x86/include/asm/msi.h +++ b/xen/arch/x86/include/asm/msi.h @@ -237,7 +237,10 @@ struct arch_msix { int tab

Re: [PATCH 2/2] NUMA: replace phys_to_nid()

2022-12-13 Thread Julien Grall
Hi Jan, On 13/12/2022 11:38, Jan Beulich wrote: All callers convert frame numbers (perhaps in turn derived from struct page_info pointers) to an address, just for the function to convert it back to a frame number (as the first step of paddr_to_pdx()). Replace the function by mfn_to_nid() plus a

Re: [PATCH 2/2] NUMA: replace phys_to_nid()

2022-12-13 Thread Jan Beulich
On 13.12.2022 13:06, Julien Grall wrote: > On 13/12/2022 11:38, Jan Beulich wrote: >> All callers convert frame numbers (perhaps in turn derived from struct >> page_info pointers) to an address, just for the function to convert it >> back to a frame number (as the first step of paddr_to_pdx()). Rep

Re: [PATCH 2/2] NUMA: replace phys_to_nid()

2022-12-13 Thread Julien Grall
Hi Jan, On 13/12/2022 12:46, Jan Beulich wrote: On 13.12.2022 13:06, Julien Grall wrote: On 13/12/2022 11:38, Jan Beulich wrote: All callers convert frame numbers (perhaps in turn derived from struct page_info pointers) to an address, just for the function to convert it back to a frame number

Re: [PATCH 2/2] NUMA: replace phys_to_nid()

2022-12-13 Thread Jan Beulich
On 13.12.2022 14:48, Julien Grall wrote: > On 13/12/2022 12:46, Jan Beulich wrote: >> On 13.12.2022 13:06, Julien Grall wrote: >>> On 13/12/2022 11:38, Jan Beulich wrote: All callers convert frame numbers (perhaps in turn derived from struct page_info pointers) to an address, just for the

Re: [PATCH] Relocate the ESRT when booting via multiboot2

2022-12-13 Thread Jan Beulich
On 09.12.2022 01:52, Demi Marie Obenour wrote: > This was missed in the initial patchset. > > Signed-off-by: Demi Marie Obenour This doesn't apply to current staging, apparently because you didn't put it on top of your own "Use EfiACPIReclaimMemory for ESRT". Jan

Re: [PATCH v3 2/3] x86/vmx: introduce helper to set VMX_INTR_SHADOW_NMI

2022-12-13 Thread Roger Pau Monné
On Tue, Jul 19, 2022 at 07:33:47AM +, Tian, Kevin wrote: > > From: Roger Pau Monne > > Sent: Friday, July 1, 2022 9:17 PM > > > > @@ -225,6 +225,9 @@ static inline void pi_clear_sn(struct pi_desc *pi_desc) > > > > /* > > * Interruption-information format > > + * > > + * Note INTR_INFO_NMI

Re: [PATCH 1/3] xen/arm: Add memory overlap check for bootinfo.reserved_mem

2022-12-13 Thread Julien Grall
Hi Stefano, On 12/12/2022 21:29, Stefano Stabellini wrote: Personally, I think trying to share the code between the two types is a bit odd. The logic is the same today, but I envision to merge reserved_mem, mem and acpi in a single array (it would look like the E820) as this would make easier

Re: [PATCH] xen/arm: smmuv3: remove unused function

2022-12-13 Thread Stewart Hildebrand
On 12/12/22 11:24, Rahul Singh wrote: > Hi Julien, > >> On 12 Dec 2022, at 4:07 pm, Julien Grall wrote: >> >> Hi Stewart, >> >> On 12/12/2022 16:00, Stewart Hildebrand wrote: >>> When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the >>> following build error: >>> drivers/passthroug

[PATCH v2] xen: make remove callback of xen driver void returned

2022-12-13 Thread Dawei Li
Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for xen bus based drivers. Acked-by: Juergen Gross Signe

[PATCH v2 00/19] tools/xenstore: do some cleanup and fixes

2022-12-13 Thread Juergen Gross
This is a first run of post-XSA patches which piled up during the development phase of all the recent Xenstore related XSA patches. At least the first 5 patches are completely independent from each other. After those the dependencies are starting to be more complex. This is a mixture of small fix

[PATCH v2 01/19] tools/xenstore: let talloc_free() preserve errno

2022-12-13 Thread Juergen Gross
Today talloc_free() is not guaranteed to preserve errno, especially in case a custom destructor is being used. Change that by renaming talloc_free() to _talloc_free() in talloc.c and adding a wrapper to talloc.c. This allows to remove some errno saving outside of talloc.c. Signed-off-by: Juergen

[PATCH v2 03/19] tools/xenstore: preserve errno across corrupt()

2022-12-13 Thread Juergen Gross
Let corrupt() preserve errno in order to be able to simplify error handling in future. This is rather easy as the errno value when entering corrupt() is saved already. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/xenstored_core.c | 2 ++ 1 file changed, 2 insertion

[PATCH v2 02/19] tools/xenstore: let tdb_logger() preserve errno

2022-12-13 Thread Juergen Gross
tdb_logger() is called by TDB for logging errors. As errno is checked often after doing the logging, tdb_logger() should preserve errno. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/xenstored_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/xensto

[PATCH v2 04/19] tools/xenstore: remove all watches when a domain has stopped

2022-12-13 Thread Juergen Gross
When a domain has been released by Xen tools, remove all its registered watches. This avoids sending watch events to the dead domain when all the nodes related to it are being removed by the Xen tools. Signed-off-by: Juergen Gross --- V2: - move call to do_release() (Julien Grall) --- tools/xens

[PATCH v2 05/19] tools/xenstore: enhance hashtable implementation

2022-12-13 Thread Juergen Gross
Today it is possible to set a flag when calling hashtable_destroy() in order to specify whether the data associated with the hashtable entries should be freed or not. The keys of the entries will always be freed. Change that by replacing the flag of hashtable_destroy() by two flags for create_hash

[PATCH v2 09/19] tools/xenstore: move changed domain handling

2022-12-13 Thread Juergen Gross
Move all code related to struct changed_domain from xenstored_transaction.c to xenstored_domain.c. This will be needed later in order to simplify the accounting data updates in cases of errors during a request. Split the code to have a more generic base framework. Signed-off-by: Juergen Gross -

[PATCH v2 13/19] tools/xenstore: make domain_is_unprivileged() an inline function

2022-12-13 Thread Juergen Gross
clang 14 is complaining about a NULL dereference for constructs like: domain_is_unprivileged(conn) ? conn->in : NULL as it can't know that domain_is_unprivileged(conn) will return false if conn is NULL. Fix that by making domain_is_unprivileged() an inline function (and related to that domid_i

[PATCH v2 11/19] tools/xenstore: don't allow creating too many nodes in a transaction

2022-12-13 Thread Juergen Gross
The accounting for the number of nodes of a domain in an active transaction is not working correctly, as it allows to create arbitrary number of nodes. The transaction will finally fail due to exceeding the number of nodes quota, but before closing the transaction an unprivileged guest could cause

[PATCH v2 08/19] tools/xenstore: replace watch->relative_path with a prefix length

2022-12-13 Thread Juergen Gross
Instead of storing a pointer to the path which is prepended to relative paths in struct watch, just use the length of the prepended path. It should be noted that the now removed special case of the relative path being "" in get_watch_path() can't happen at all. Signed-off-by: Juergen Gross --- V

[PATCH v2 16/19] tools/xenstore: make log macro globally available

2022-12-13 Thread Juergen Gross
Move the definition of the log() macro to xenstored_core.h in order to make it usable from other source files, too. While at it preserve errno from being modified. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/xenstored_core.c | 14 -- tools/xenstore/xen

[PATCH v2 06/19] tools/xenstore: add hashlist for finding struct domain by domid

2022-12-13 Thread Juergen Gross
Today finding a struct domain by its domain id requires to scan the list of domains until finding the correct domid. Add a hashlist for being able to speed this up. This allows to remove the linking of struct domain in a list. Note that the list of changed domains per transaction is kept as a list

[PATCH v2 15/19] tools/xenstore: switch hashtable to use the talloc framework

2022-12-13 Thread Juergen Gross
Instead of using malloc() and friends, let the hashtable implementation use the talloc framework. This is more consistent with the rest of xenstored and it allows to track memory usage via "xenstore-control memreport". Signed-off-by: Juergen Gross --- tools/xenstore/hashtable.c| 86

[PATCH v2 14/19] tools/xenstore: let chk_domain_generation() return a bool

2022-12-13 Thread Juergen Gross
Instead of returning 0 or 1 let chk_domain_generation() return a boolean value. Simplify the only caller by removing the ret variable. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/xenstored_domain.c | 18 -- 1 file changed, 8 insertions(+), 10 delet

[PATCH v2 12/19] tools/xenstore: replace literal domid 0 with dom0_domid

2022-12-13 Thread Juergen Gross
There are some places left where dom0 is associated with domid 0. Use dom0_domid instead. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/xenstored_core.c | 5 +++-- tools/xenstore/xenstored_domain.c | 8 2 files changed, 7 insertions(+), 6 deletions(-) di

[PATCH v2 17/19] tools/xenstore: introduce trace classes

2022-12-13 Thread Juergen Gross
Make the xenstored internal trace configurable by adding classes which can be switched on and off independently from each other. Define the following classes: - obj: Creation and deletion of interesting "objects" (watch, transaction, connection) - io: incoming requests and outgoing responses -

[PATCH v2 10/19] tools/xenstore: change per-domain node accounting interface

2022-12-13 Thread Juergen Gross
Rework the interface and the internals of the per-domain node accounting: - rename the functions to domain_nbentry_*() in order to better match the related counter name - switch from node pointer to domid as interface, as all nodes have the owner filled in - use a common internal function fo

[PATCH v2 18/19] tools/xenstore: let check_store() check the accounting data

2022-12-13 Thread Juergen Gross
Today check_store() is only testing the correctness of the node tree. Add verification of the accounting data (number of nodes) and correct the data if it is wrong. Do the initial check_store() call only after Xenstore entries of a live update have been read. Signed-off-by: Juergen Gross ---

[PATCH v2 07/19] tools/xenstore: introduce dummy nodes for special watch paths

2022-12-13 Thread Juergen Gross
Instead of special casing the permission handling and watch event firing for the special watch paths "@introduceDomain" and "@releaseDomain", use static dummy nodes added to the data base when starting Xenstore. The node accounting needs to reflect that change by adding the special nodes in the do

[PATCH v2 19/19] tools/xenstore: make output of "xenstore-control help" more pretty

2022-12-13 Thread Juergen Gross
Using a tab for separating the command from the options in the output of "xenstore-control help" results in a rather ugly list. Use a fixed size for the command instead. Signed-off-by: Juergen Gross --- V2: - new patch --- tools/xenstore/xenstored_control.c | 2 +- 1 file changed, 1 insertion(+

[PATCH v4 0/3] x86/vmx: implement Bus Lock and VM Notify

2022-12-13 Thread Roger Pau Monne
Hello, Following series implements support for bus lock and notify VM exit. Patches are not really dependent, but I've developed them together by virtue of both features being in Intel Instructions Set Extensions PR Chapter 9. Thanks, Roger. Roger Pau Monne (3): x86/vmx: implement VMExit base

[PATCH v4 2/3] x86/vmx: introduce helper to set VMX_INTR_SHADOW_NMI

2022-12-13 Thread Roger Pau Monne
Introduce a small helper to OR VMX_INTR_SHADOW_NMI in GUEST_INTERRUPTIBILITY_INFO in order to help dealing with the NMI unblocked by IRET case. Replace the existing usage in handling EXIT_REASON_EXCEPTION_NMI and also add such handling to EPT violations and page-modification log-full events. Repo

[PATCH v4 1/3] x86/vmx: implement VMExit based guest Bus Lock detection

2022-12-13 Thread Roger Pau Monne
Add support for enabling guest Bus Lock Detection on Intel systems. Such detection works by triggering a vmexit, which ought to be enough of a pause to prevent a guest from abusing of the Bus Lock. Add an extra Xen perf counter to track the number of Bus Locks detected. This is done because Bus Lo

[PATCH v4 3/3] x86/vmx: implement Notify VM Exit

2022-12-13 Thread Roger Pau Monne
Under certain conditions guests can get the CPU stuck in an unbounded loop without the possibility of an interrupt window to occur on instruction boundary. This was the case with the scenarios described in XSA-156. Make use of the Notify VM Exit mechanism, that will trigger a VM Exit if no interr

Re: [RFC PATCH v2 1/2] xen/memory : Add a stats_table resource type

2022-12-13 Thread Jan Beulich
On 07.10.2022 14:39, Matias Ezequiel Vara Larsen wrote: > This commit proposes a new mechanism to query the RUNSTATE_running counter for > a given vcpu from a dom0 userspace application. This commit proposes to expose > that counter by using the acquire_resource interface. The current mechanism > r

[ovmf test] 175172: all pass - PUSHED

2022-12-13 Thread osstest service owner
flight 175172 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/175172/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 11ce7a2de7549306a853cc3fe3abe6ef8f874b40 baseline version: ovmf 5890a18409a0e67a491c6

[linux-linus test] 175166: regressions - FAIL

2022-12-13 Thread osstest service owner
flight 175166 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175166/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict 8 xen-boot fail REGR. vs. 173462 test-amd64

[xen-unstable bisection] complete test-xtf-amd64-amd64-4

2022-12-13 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-xtf-amd64-amd64-4 testid xen-boot Tree: linux git://xenbits.xen.org/linux-pvops.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://xenbits.xen.org/q

Re: [PATCH] arch: change variable types to match those of what is assigned to them

2022-12-13 Thread Russell King (Oracle)
On Tue, Dec 13, 2022 at 12:03:51PM -0500, Seija K. wrote: > There are many places where "int len = strlen(foo);" is written, just > for len to be passed as a parameter of size_t. This causes truncation > and then expansion back from int to size_t. Not to mention this is > poor logic and needless tr

Re: [PATCH] arch: change variable types to match those of what is assigned to them

2022-12-13 Thread Randy Dunlap
Hi, Please look at https://lore.kernel.org/lkml/caa42ikx2f2lsaq9c5rxnctphob6n+l35winc5wk1k2eysaj...@mail.gmail.com/T/#u and see if that matches what you thought you sent as a patch. The gmail web interface is notorious for dropping tabs in emails. On 12/13/22 09:35, Seija K. wrote: > There

Re: [PATCH] arch: change variable types to match those of what is assigned to them

2022-12-13 Thread Russell King (Oracle)
On Tue, Dec 13, 2022 at 12:35:35PM -0500, Seija K. wrote: > There are many places where "int len = strlen(foo);" is written, just > for len to be passed as a parameter of size_t. This causes truncation > and then expansion back from int to size_t. Not to mention this is > poor logic and needless tr

[xen-unstable test] 175168: regressions - FAIL

2022-12-13 Thread osstest service owner
flight 175168 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175168/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-livepatch 8 xen-boot fail REGR. vs. 175144 test-xtf-amd64-amd

[PATCH v2] xen/arm: smmuv3: mark arm_smmu_disable_pasid __maybe_unused

2022-12-13 Thread Stewart Hildebrand
When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the following build error: drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function 'arm_smmu_disable_pasid' [-Werror,-Wunused-function] static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { }

[xen-unstable-smoke test] 175173: tolerable all pass - PUSHED

2022-12-13 Thread osstest service owner
flight 175173 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175173/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [PATCH v3 09/18] xen/arm32: head: Remove restriction where to load Xen

2022-12-13 Thread Julien Grall
On 12/12/2022 09:55, Julien Grall wrote: /* * Map the UART in the fixmap (when earlyprintk is used) and hook the * fixmap table in the page tables. diff --git a/xen/arch/arm/domain_page.c b/xen/arch/arm/domain_page.c index b7c02c919064..907fb93d4df0 100644 --- a/xen/arch/arm/domain_page.c

Re: [PATCH v3 12/18] xen/arm64: Rework the memory layout

2022-12-13 Thread Julien Grall
Hi Stefano, On 13/12/2022 01:22, Stefano Stabellini wrote: On Mon, 12 Dec 2022, Julien Grall wrote: From: Julien Grall Xen is currently not fully compliant with the Arm Arm because it will switch the TTBR with the MMU on. In order to be compliant, we need to disable the MMU before switching

[ovmf test] 175176: all pass - PUSHED

2022-12-13 Thread osstest service owner
flight 175176 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/175176/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 1fd8d08970a9ee7d350c7dd42bffb0cb96426041 baseline version: ovmf 11ce7a2de7549306a853c

Re: [PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-13 Thread Krister Johansen
On Tue, Dec 13, 2022 at 08:23:29AM +0100, Jan Beulich wrote: > On 12.12.2022 23:05, Krister Johansen wrote: > > On Mon, Dec 12, 2022 at 05:46:29PM +0100, Jan Beulich wrote: > >> On 12.12.2022 17:05, Krister Johansen wrote: > >>> Both the Intel SDM[4] and the Xen tsc documentation explain that marki

Re: [PATCH v3 18/18] xen/arm64: mm: Rework switch_ttbr()

2022-12-13 Thread Julien Grall
Hi Stefano, On 13/12/2022 02:00, Stefano Stabellini wrote: On Mon, 12 Dec 2022, Julien Grall wrote: From: Julien Grall At the moment, switch_ttbr() is switching the TTBR whilst the MMU is still on. Switching TTBR is like replacing existing mappings with new ones. So we need to follow the bre

[RFC 0/4] Adding Virtual Memory Fuses to Xen

2022-12-13 Thread Smith, Jackson
Hi Xen Developers, My team at Riverside Research is currently spending IRAD funding to prototype next-generation secure hypervisor design ideas on Xen. In particular, we are prototyping the idea of Virtual Memory Fuses for Software Enclaves, as described in this paper: https://www.nspw.org/papers/

[RFC 1/4] Add VMF Hypercall

2022-12-13 Thread Smith, Jackson
This commit introduces a new vmf_op hypercall. If desired, could be merged into an exisiting hypercall. Also, introduce a VMF Kconfig option and xen/vmf.h, defining the arch specific functions that must be implmented to support vmf. --- tools/include/xenctrl.h | 2 + tools/libs/

[RFC 2/4] Add VMF tool

2022-12-13 Thread Smith, Jackson
VMF tool for calling vmf_op hypercall. Eventually should be merged into xl and related libraries. --- tools/Makefile | 1 + tools/vmf/Makefile | 32 +++ tools/vmf/vmf.c| 65 ++ 3 files changed, 98 insertions(+) c

[RFC 3/4] Add xen superpage splitting support to arm

2022-12-13 Thread Smith, Jackson
Updates xen_pt_update_entry function from xen/arch/arm/mm.c to automatically split superpages as needed. --- xen/arch/arm/mm.c | 91 +++ 1 file changed, 78 insertions(+), 13 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 6

[RFC 4/4] Implement VMF for arm64

2022-12-13 Thread Smith, Jackson
Implements the functions from xen/vmf.h for arm64. Introduces an xen/arch/arm/mm-walk.c helper file for walking an entire page table structure. --- xen/arch/arm/Makefile | 1 + xen/arch/arm/include/asm/mm-walk.h | 53 ++ xen/arch/arm/include/asm/mm.h | 11 +++ xen/arc

Re: [RFC 0/4] Adding Virtual Memory Fuses to Xen

2022-12-13 Thread Julien Grall
On 13/12/2022 19:48, Smith, Jackson wrote: Hi Xen Developers, Hi Jackson, Thanks for sharing the prototype with the community. Some questions/remarks below. My team at Riverside Research is currently spending IRAD funding to prototype next-generation secure hypervisor design ideas on Xe

Re: [RFC 3/4] Add xen superpage splitting support to arm

2022-12-13 Thread Julien Grall
Hi, On 13/12/2022 19:54, Smith, Jackson wrote: Updates xen_pt_update_entry function from xen/arch/arm/mm.c to automatically split superpages as needed. Your signed-off-by is missing. --- xen/arch/arm/mm.c | 91 +++ 1 file changed, 78 inse

Re: [XEN v5 07/11] xen/Arm: GICv3: Define ICH_LR_EL2 on AArch32

2022-12-13 Thread Julien Grall
Hi Ayan, On 05/12/2022 13:26, Ayan Kumar Halder wrote: Refer "Arm IHI 0069H ID020922", 12.4.6, Interrupt Controller List Registers AArch64 System register ICH_LR_EL2 bits [31:0] are architecturally mapped to AArch32 System register ICH_LR[31:0]. AArch64 System register ICH_LR_EL2 bits [63:32] a

Re: [XEN v5 08/11] xen/Arm: GICv3: Define ICH_AP0R and ICH_AP1R for AArch32

2022-12-13 Thread Julien Grall
Hi Ayan, On 05/12/2022 13:26, Ayan Kumar Halder wrote: Adapt save_aprn_regs()/restore_aprn_regs() for AArch32. For which we have defined the following registers:- 1. Interrupt Controller Hyp Active Priorities Group0 Registers 0-3 2. Interrupt Controller Hyp Active Priorities Group1 Registers 0-

Re: [XEN v5 09/11] xen/Arm: GICv3: Define remaining GIC registers for AArch32

2022-12-13 Thread Julien Grall
Hi, On 05/12/2022 13:26, Ayan Kumar Halder wrote: Define missing assembly aliases for GIC registers on arm32, taking the ones defined already for arm64 as a base. Aliases are defined according to the GIC Architecture Specification ARM IHI 0069H. Defined the following registers:- 1. Interrupt Co

Re: [XEN v5 10/11] xen/Arm: GICv3: Define macros to read/write 64 bit

2022-12-13 Thread Julien Grall
Hi, On 05/12/2022 13:26, Ayan Kumar Halder wrote: On AArch32, ldrd/strd instructions are not atomic when used to access MMIO. Furthermore, ldrd/strd instructions are not decoded by Arm when running as a guest to access emulated MMIO region. Thus, we have defined readq_relaxed_non_atomic()/writeq

Re: [XEN v5 11/11] xen/Arm: GICv3: Enable GICv3 for AArch32

2022-12-13 Thread Julien Grall
Hi, On 05/12/2022 13:26, Ayan Kumar Halder wrote: One can now use GICv3 on AArch32 systems. However, ITS is not supported. The reason being currently we are trying to validate GICv3 on an AArch32_v8R system. Refer ARM DDI 0568A.c ID110520, B1.3.1, "A Generic Interrupt Controller (GIC) implemente

Re: [PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-13 Thread Boris Ostrovsky
On 12/12/22 5:09 PM, Krister Johansen wrote: On Mon, Dec 12, 2022 at 01:48:24PM -0500, Boris Ostrovsky wrote: On 12/12/22 11:05 AM, Krister Johansen wrote: diff --git a/arch/x86/include/asm/xen/cpuid.h b/arch/x86/include/asm/xen/cpuid.h index 6daa9b0c8d11..d9d7432481e9 100644 --- a/arch/x86/i

Re: [PATCH 2/2] NUMA: replace phys_to_nid()

2022-12-13 Thread Julien Grall
Hi Jan, On 13/12/2022 14:08, Jan Beulich wrote: On 13.12.2022 14:48, Julien Grall wrote: On 13/12/2022 12:46, Jan Beulich wrote: On 13.12.2022 13:06, Julien Grall wrote: On 13/12/2022 11:38, Jan Beulich wrote: All callers convert frame numbers (perhaps in turn derived from struct page_info p

Re: [PATCH] xen/arm: Reduce redundant clear root pages when teardown p2m

2022-12-13 Thread Julien Grall
On 12/12/2022 11:27, Henry Wang wrote: Hi Julien, Hi, -Original Message- From: Julien Grall Subject: Re: [PATCH] xen/arm: Reduce redundant clear root pages when teardown p2m Hi Henry, PROGRESS(p2m): +/* + * We are about to free the intermediate page-tables,

Re: [PATCH RFC 03/10] domain: GADDR based shared guest area registration alternative - teardown

2022-12-13 Thread Julien Grall
Hi Jan, On 19/10/2022 08:40, Jan Beulich wrote: In preparation of the introduction of new vCPU operations allowing to register the respective areas (one of the two is x86-specific) by guest-physical address, add the necessary domain cleanup hooks. Signed-off-by: Jan Beulich --- RFC: Zapping th

  1   2   >