RE: [PATCH 10/37] xen/x86: use helpers to access/update mem_hotplug

2022-01-25 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年1月25日 0:30 > To: Wei Chen > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 10/37] xen/x86: use helpers to access/update > mem_hotplug > > On 23.09.2021 1

RE: [PATCH 09/37] xen/x86: introduce two helpers to access memory hotplug end

2022-01-25 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年1月25日 0:25 > To: Wei Chen > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 09/37] xen/x86: introduce two helpers to access memory > hotplug end > > On 23

Re: [XEN PATCH v2 2/5] xen: export get_free_port

2022-01-25 Thread Jan Beulich
On 26.01.2022 02:03, Stefano Stabellini wrote: > Are you guys OK with something like this? With proper proof that this isn't going to regress anything else, maybe. But ... > --- a/xen/include/xsm/dummy.h > +++ b/xen/include/xsm/dummy.h > @@ -92,7 +92,9 @@ static always_inline int xsm_default_acti

Re: [XEN PATCH v2 2/5] xen: export get_free_port

2022-01-25 Thread Jan Beulich
On 25.01.2022 23:49, Stefano Stabellini wrote: > On Tue, 25 Jan 2022, Jan Beulich wrote: >> On 25.01.2022 02:10, Stefano Stabellini wrote: >>> @@ -284,7 +285,27 @@ void evtchn_free(struct domain *d, struct evtchn *chn) >>> xsm_evtchn_close_post(chn); >>> } >>> >>> -static int evtchn_alloc_u

[xen-4.13-testing test] 167817: tolerable FAIL - PUSHED

2022-01-25 Thread osstest service owner
flight 167817 xen-4.13-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/167817/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 167215 test-amd64-i386-xl-qemuu-win7-am

Re: [XEN v4] xen/arm64: io: Decode ldr/str post-indexing instructions

2022-01-25 Thread Stefano Stabellini
On Tue, 25 Jan 2022, Julien Grall wrote: > > + > > /* TODO: Handle ARM instruction */ > > gprintk(XENLOG_ERR, "unhandled ARM instruction\n"); > > return 1; > > } > > +#if CONFIG_ARM_64 > > +void post_increment_register(union ldr_str_instr_class *instr) > > instr should not

[PATCH v2] automation: remove python-dev from debian unstable build containers

2022-01-25 Thread Stefano Stabellini
From: Stefano Stabellini Debian unstable doesn't have the legacy python-dev package anymore. Note: only the arm64v8 container has been rebuilt. Signed-off-by: Stefano Stabellini Acked-by: Andrew Cooper --- Changes in v2: - remove python-dev from all debian unstable containers --- automation/b

[xen-4.12-testing test] 167816: tolerable FAIL - PUSHED

2022-01-25 Thread osstest service owner
flight 167816 xen-4.12-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/167816/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qcow219 guest-localmigrate/x10 fail like 167214 test-amd64-i386-xl-qemuu-win7-am

Re: [XEN PATCH v2 2/5] xen: export get_free_port

2022-01-25 Thread Stefano Stabellini
On Tue, 25 Jan 2022, Julien Grall wrote: > On 25/01/2022 22:49, Stefano Stabellini wrote: > > On Tue, 25 Jan 2022, Jan Beulich wrote: > > > On 25.01.2022 02:10, Stefano Stabellini wrote: > > > > On Sun, 23 Jan 2022, Julien Grall wrote: > > > > > > diff --git a/xen/common/event_channel.c b/xen/commo

Re: [XEN PATCH v2 3/5] xen/arm: configure dom0less domain for enabling xenstore after boot

2022-01-25 Thread Stefano Stabellini
On Sun, 23 Jan 2022, Julien Grall wrote: > On 13/01/2022 14:15, Bertrand Marquis wrote: > > Hi Stefano, > > > > + Penny in CC for the question. > > > > > On 13 Jan 2022, at 00:58, Stefano Stabellini > > > wrote: > > > > > > From: Luca Miccio > > > > > > If "xen,enhanced" is enabled, then add

Re: automation: remove python-dev from unstable-arm64v8.dockerfile

2022-01-25 Thread Andrew Cooper
On 26/01/2022 00:31, Stefano Stabellini wrote: > Debian unstable doesn't have the legacy python-dev package anymore. > > Signed-off-by: Stefano Stabellini That's fine, but: $ git grep python-dev -- automation/build/debian/unstable* automation/build/debian/unstable-arm64v8.dockerfile:18:    p

automation: remove python-dev from unstable-arm64v8.dockerfile

2022-01-25 Thread Stefano Stabellini
Debian unstable doesn't have the legacy python-dev package anymore. Signed-off-by: Stefano Stabellini diff --git a/automation/build/debian/unstable-arm64v8.dockerfile b/automation/build/debian/unstable-arm64v8.dockerfile index 4409f596e1..5c73458d9d 100644 --- a/automation/build/debian/unstable

[xen-4.16-testing test] 167814: regressions - FAIL

2022-01-25 Thread osstest service owner
flight 167814 xen-4.16-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/167814/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 167620 build-amd64-xs

[xen-4.14-testing bisection] complete build-amd64

2022-01-25 Thread osstest service owner
branch xen-4.14-testing xenbranch xen-4.14-testing job build-amd64 testid xen-build Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: seabios git://xenbits.xen.org/osstest/seabios.git Tre

Re: [XEN PATCH v2 2/5] xen: export get_free_port

2022-01-25 Thread Julien Grall
Hi Stefano, On 25/01/2022 22:49, Stefano Stabellini wrote: On Tue, 25 Jan 2022, Jan Beulich wrote: On 25.01.2022 02:10, Stefano Stabellini wrote: On Sun, 23 Jan 2022, Julien Grall wrote: diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index da88ad141a..5b0bcaaad4 100644 -

Re: [XEN v4] xen/arm64: io: Decode ldr/str post-indexing instructions

2022-01-25 Thread Julien Grall
Hi, On 25/01/2022 21:18, Ayan Kumar Halder wrote: At the moment, Xen is only handling data abort with valid syndrome (i.e. ISV=0). Unfortunately, this doesn't cover all the instructions a domain could use to access MMIO regions. For instance, a baremetal OS can use any of the following instruct

Re: [XEN PATCH v2 2/5] xen: export get_free_port

2022-01-25 Thread Stefano Stabellini
On Tue, 25 Jan 2022, Jan Beulich wrote: > On 25.01.2022 02:10, Stefano Stabellini wrote: > > On Sun, 23 Jan 2022, Julien Grall wrote: > >>> diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c > >>> index da88ad141a..5b0bcaaad4 100644 > >>> --- a/xen/common/event_channel.c > >>> +++

Re: [XEN v4] xen/arm64: io: Decode ldr/str post-indexing instructions

2022-01-25 Thread Stefano Stabellini
On Tue, 25 Jan 2022, Ayan Kumar Halder wrote: > At the moment, Xen is only handling data abort with valid syndrome (i.e. > ISV=0). Unfortunately, this doesn't cover all the instructions a domain > could use to access MMIO regions. > > For instance, a baremetal OS can use any of the following instr

[xen-4.15-testing test] 167813: regressions - FAIL

2022-01-25 Thread osstest service owner
flight 167813 xen-4.15-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/167813/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 167628 build-amd64

Re: [XEN v3] xen/arm64: io: Decode ldr/str post-indexing instructions

2022-01-25 Thread Ayan Kumar Halder
Hi Stefano/Andre/All, Thanks for the feedback. On 22/01/2022 01:04, Stefano Stabellini wrote: On Thu, 20 Jan 2022, Ayan Kumar Halder wrote: At the moment, Xen is only handling data abort with valid syndrome (i.e. ISV=0). Unfortunately, this doesn't cover all the instructions a domain could use

Re: [RFC v1 3/5] xen/arm: introduce SCMI-SMC mediator driver

2022-01-25 Thread Stefano Stabellini
On Tue, 25 Jan 2022, Oleksii Moisieiev wrote: > On Mon, Jan 24, 2022 at 02:14:43PM -0800, Stefano Stabellini wrote: > > On Mon, 24 Jan 2022, Julien Grall wrote: > > > On 24/01/2022 19:06, Stefano Stabellini wrote: > > > > It looks like XEN_DOMCTL_host_node_by_path and > > > > XEN_DOMCTL_find_host_c

[XEN v4] xen/arm64: io: Decode ldr/str post-indexing instructions

2022-01-25 Thread Ayan Kumar Halder
At the moment, Xen is only handling data abort with valid syndrome (i.e. ISV=0). Unfortunately, this doesn't cover all the instructions a domain could use to access MMIO regions. For instance, a baremetal OS can use any of the following instructions, where x1 contains the address of the MMIO regio

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

2022-01-25 Thread osstest service owner
flight 167819 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/167819/ 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] libxl: force netback to wait for hotplug execution before connecting

2022-01-25 Thread Wei Liu
On Mon, Jan 24, 2022 at 05:02:48PM +0100, Roger Pau Monne wrote: > By writing an empty "hotplug-status" xenstore node in the backend path > libxl can force Linux netback to wait for hotplug script execution > before proceeding to the 'connected' state. > > This is required so that netback doesn't

[xen-4.14-testing test] 167812: regressions - FAIL

2022-01-25 Thread osstest service owner
flight 167812 xen-4.14-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/167812/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 167629 build-amd64-xs

Re: [PATCH] libxl: force netback to wait for hotplug execution before connecting

2022-01-25 Thread Julien Grall
Hi Roger, On 25/01/2022 16:09, Roger Pau Monné wrote: On Tue, Jan 25, 2022 at 03:32:16PM +, Julien Grall wrote: Hi, On 24/01/2022 16:02, Roger Pau Monne wrote: By writing an empty "hotplug-status" xenstore node in the backend path libxl can force Linux netback to wait for hotplug script e

Re: [XEN PATCH v2 2/5] xen: export get_free_port

2022-01-25 Thread Julien Grall
Hi Jan, On 25/01/2022 08:22, Jan Beulich wrote: On 25.01.2022 02:10, Stefano Stabellini wrote: On Sun, 23 Jan 2022, Julien Grall wrote: diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index da88ad141a..5b0bcaaad4 100644 --- a/xen/common/event_channel.c +++ b/xen/common/eve

Re: [XEN v3] xen/arm64: io: Decode ldr/str post-indexing instructions

2022-01-25 Thread Andre Przywara
On Mon, 24 Jan 2022 17:58:55 + Julien Grall wrote: Hi Julien, > Hi Andre, > > On 24/01/2022 14:36, Andre Przywara wrote: > > On Mon, 24 Jan 2022 12:07:42 + > >> Also, if an instruction is being modified by the guest (after it has > >> been loaded in the I cache), and if the guest does

Re: [XEN PATCH v9 30/30] build: adding out-of-tree support to the xen build

2022-01-25 Thread Daniel P. Smith
On 1/25/22 06:01, Anthony PERARD wrote: > This implement out-of-tree support, there's two ways to create an > out-of-tree build tree (after that, `make` in that new directory > works): > make O=build > mkdir build; cd build; make -f ../Makefile > also works with an absolute path for both. >

Re: [XEN PATCH v9 26/30] build: replace $(BASEDIR) and use $(srctree)

2022-01-25 Thread Daniel P. Smith
On 1/25/22 06:00, Anthony PERARD wrote: > $(srctree) is a better description for the source directory than > $(BASEDIR) that has been used for both source and build directory > (which where the same). > > This adds $(srctree) to a few path where make's VPATH=$(srctree) won't > apply. And replace $

Re: [XEN PATCH v9 20/30] build: rework "clean" to clean from the root dir

2022-01-25 Thread Daniel P. Smith
On 1/25/22 06:00, Anthony PERARD wrote: > This will allow "clean" to work from an out-of-tree build when > it will be available. > > Some of the file been removed in current "clean" target aren't added > to $(clean-files) because they are already listed in $(extra-) or > $(extra-y). > > Also star

Re: [XEN PATCH v9 19/30] build: clean-up "clean" rules of duplication

2022-01-25 Thread Daniel P. Smith
On 1/25/22 06:00, Anthony PERARD wrote: > All those files to be removed are already done in the main Makefile, > either by the "find" command or directly (for $(TARGET).efi). > > Signed-off-by: Anthony PERARD > Acked-by: Jan Beulich > Acked-by: Julien Grall > --- > xen/Makefile

Re: [PATCH] libxl: force netback to wait for hotplug execution before connecting

2022-01-25 Thread Roger Pau Monné
On Tue, Jan 25, 2022 at 03:32:16PM +, Julien Grall wrote: > Hi, > > On 24/01/2022 16:02, Roger Pau Monne wrote: > > By writing an empty "hotplug-status" xenstore node in the backend path > > libxl can force Linux netback to wait for hotplug script execution > > before proceeding to the 'connec

Re: [XEN PATCH v9 09/30] build: build everything from the root dir, use obj=$subdir

2022-01-25 Thread Daniel P. Smith
On 1/25/22 06:00, Anthony PERARD wrote: > A subdirectory is now built by setting "$(obj)" instead of changing > directory. "$(obj)" should always be set when using "Rules.mk" and > thus a shortcut "$(build)" is introduced and should be used. > > A new variable "$(need-builtin)" is introduce. It is

Re: [XEN PATCH v9 05/30] build: prepare to always invoke $(MAKE) from xen/, use $(obj)

2022-01-25 Thread Daniel P. Smith
On 1/25/22 06:00, Anthony PERARD wrote: > In a future patch, when building a subdirectory, we will set > "obj=$subdir" rather than change directory. > > Before that, we add "$(obj)" and "$(src)" in as many places as > possible where we will need to know which subdirectory is been built. > "$(obj)"

Re: [PATCH] x86emul: recognize CLDEMOTE

2022-01-25 Thread Durrant, Paul
On 25/01/2022 15:08, Jan Beulich wrote: On 25.01.2022 15:22, Jan Beulich wrote: We claim to support the insn, but so far the emulator has been handling it as a NOP. Signed-off-by: Jan Beulich I'm sorry, I should have Cc-ed Paul here as well. Acked-by: Paul Durrant Jan --- While handl

Re: [PATCH] libxl: force netback to wait for hotplug execution before connecting

2022-01-25 Thread Julien Grall
Hi, On 24/01/2022 16:02, Roger Pau Monne wrote: By writing an empty "hotplug-status" xenstore node in the backend path libxl can force Linux netback to wait for hotplug script execution before proceeding to the 'connected' state. I was actually chasing the same issue today :). This is requi

Re: [PATCH] x86emul: recognize CLDEMOTE

2022-01-25 Thread Jan Beulich
On 25.01.2022 16:09, Andrew Cooper wrote: > On 25/01/2022 14:22, Jan Beulich wrote: >> We claim to support the insn, but so far the emulator has been handling >> it as a NOP. >> >> Signed-off-by: Jan Beulich > > Treating CLDEMOTE as a NOP is going to be more efficient than actually > setting up t

Re: [PATCH 1/3] xen/vioapic: add support for the extended destination ID field

2022-01-25 Thread Roger Pau Monné
On Mon, Jan 24, 2022 at 02:20:47PM +0100, Jan Beulich wrote: > On 20.01.2022 16:23, Roger Pau Monne wrote: > > Such field uses bits 55:48, but for the purposes the register will be > > used use bits 55:49 instead. Bit 48 is used to signal an RTE entry is > > in remappable format which is not suppor

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

2022-01-25 Thread osstest service owner
flight 167811 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/167811/ 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] x86emul: recognize CLDEMOTE

2022-01-25 Thread Andrew Cooper
On 25/01/2022 14:22, Jan Beulich wrote: > We claim to support the insn, but so far the emulator has been handling > it as a NOP. > > Signed-off-by: Jan Beulich Treating CLDEMOTE as a NOP is going to be more efficient than actually setting up the mapping to execute a real CLDEMOTE instruction on t

Re: [PATCH] x86emul: recognize CLDEMOTE

2022-01-25 Thread Jan Beulich
On 25.01.2022 15:22, Jan Beulich wrote: > We claim to support the insn, but so far the emulator has been handling > it as a NOP. > > Signed-off-by: Jan Beulich I'm sorry, I should have Cc-ed Paul here as well. Jan > --- > While handling x86emul_cldemote separately in hvmemul_cache_op() means >

Re: [PATCH] x86emul: recognize CLDEMOTE

2022-01-25 Thread Jan Beulich
On 25.01.2022 15:35, Roger Pau Monné wrote: > On Tue, Jan 25, 2022 at 03:22:25PM +0100, Jan Beulich wrote: >> We claim to support the insn, but so far the emulator has been handling >> it as a NOP. > > While not ideal, the SDM mentions that "The CLDEMOTE instruction may > be ignored by hardware in

Re: [PATCH v7 03/11] libx86: introduce helper to fetch msr entry

2022-01-25 Thread Jan Beulich
On 25.01.2022 15:49, Roger Pau Monne wrote: > Use such helper in order to replace the code in > x86_msr_copy_from_buffer. Note the introduced helper should not be > directly called and instead x86_msr_get_entry should be used that will > properly deal with const and non-const inputs. > > Note this

Re: [PATCH v7 01/11] libx86: introduce helper to fetch cpuid leaf

2022-01-25 Thread Jan Beulich
On 25.01.2022 15:49, Roger Pau Monne wrote: > Introduce a helper based on the current Xen guest_cpuid code in order > to fetch a cpuid leaf from a policy. The newly introduced function in > cpuid.c should not be directly called and instead the provided > x86_cpuid_get_leaf macro should be used that

[PATCH v7 11/11] x86/CPUID: shrink max_{,sub}leaf fields according to actual leaf contents

2022-01-25 Thread Roger Pau Monne
From: Jan Beulich Zapping leaf data for out of range leaves is just one half of it: To avoid guests (bogusly or worse) inferring information from mere leaf presence, also shrink maximum indicators such that the respective trailing entry is not all blank (unless of course it's the initial subleaf

[PATCH v7 10/11] libs/guest: (re)move xc_cpu_policy_apply_cpuid

2022-01-25 Thread Roger Pau Monne
Move the logic from xc_cpu_policy_apply_cpuid into libxl, now that the xc_cpu_policy_* helpers allow modifying a cpu policy. By moving such parsing into libxl directly we can get rid of xc_xend_cpuid, as libxl will now implement it's own private type for storing CPUID information, which currently m

[PATCH v7 08/11] libs/guest: apply a featureset into a cpu policy

2022-01-25 Thread Roger Pau Monne
Pull out the code from xc_cpuid_apply_policy that applies a featureset to a cpu policy and place it on it's own standalone function that's part of the public interface. No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- tools/include/xenguest.h|

[PATCH v7 09/11] libs/{light,guest}: implement xc_cpuid_apply_policy in libxl

2022-01-25 Thread Roger Pau Monne
With the addition of the xc_cpu_policy_* now libxl can have better control over the cpu policy, this allows removing the xc_cpuid_apply_policy function and instead coding the required bits by libxl in libxl__cpuid_legacy directly. Remove xc_cpuid_apply_policy. Signed-off-by: Roger Pau Monné Revi

[PATCH v7 07/11] libs/guest: rework xc_cpuid_xend_policy

2022-01-25 Thread Roger Pau Monne
Rename xc_cpuid_xend_policy to xc_cpu_policy_apply_cpuid and make it public. Modify the function internally to use the new xc_cpu_policy_* set of functions. Also don't apply the passed policy to a domain directly, and instead modify the provided xc_cpu_policy_t. The caller will be responsible of ap

[PATCH v7 06/11] libs/guest: introduce helper set cpu topology in cpu policy

2022-01-25 Thread Roger Pau Monne
This logic is pulled out from xc_cpuid_apply_policy and placed into a separate helper. Note the legacy part of the introduced function, as long term Xen will require a proper topology setter function capable of expressing a more diverse set of topologies. No functional change intended. Signed-off

[PATCH v7 05/11] libs/guest: make a cpu policy compatible with older Xen versions

2022-01-25 Thread Roger Pau Monne
Older Xen versions used to expose some CPUID bits which are no longer exposed by default. In order to keep a compatible behavior with guests migrated from versions of Xen that don't encode the CPUID data on the migration stream introduce a function that sets the same bits as older Xen versions. Th

[PATCH v7 04/11] libs/guest: allow fetching a specific MSR entry from a cpu policy

2022-01-25 Thread Roger Pau Monne
Introduce an interface that returns a specific MSR entry from a cpu policy in xen_msr_entry_t format. This is useful to callers can peek data from the opaque xc_cpu_policy_t type. No caller of the interface introduced on this patch. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- C

[PATCH v7 03/11] libx86: introduce helper to fetch msr entry

2022-01-25 Thread Roger Pau Monne
Use such helper in order to replace the code in x86_msr_copy_from_buffer. Note the introduced helper should not be directly called and instead x86_msr_get_entry should be used that will properly deal with const and non-const inputs. Note this requires making the raw fields uint64_t so that it can

[PATCH v7 02/11] libs/guest: allow fetching a specific CPUID leaf from a cpu policy

2022-01-25 Thread Roger Pau Monne
Introduce an interface that returns a specific leaf/subleaf from a cpu policy in xen_cpuid_leaf_t format. This is useful to callers can peek data from the opaque xc_cpu_policy_t type. No caller of the interface introduced on this patch. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich -

[PATCH v7 00/11] libs/guest: new CPUID/MSR interface

2022-01-25 Thread Roger Pau Monne
Hello, The following series introduces a new CPUID/MSR interface for the xenguest library. Such interface handles both CPUID and MSRs using the same opaque object, and provides some helpers for the user to peek or modify such data without exposing the backing type. This is useful for future develo

[PATCH v7 01/11] libx86: introduce helper to fetch cpuid leaf

2022-01-25 Thread Roger Pau Monne
Introduce a helper based on the current Xen guest_cpuid code in order to fetch a cpuid leaf from a policy. The newly introduced function in cpuid.c should not be directly called and instead the provided x86_cpuid_get_leaf macro should be used that will properly deal with const and non-const inputs.

Re: [PATCH] x86emul: recognize CLDEMOTE

2022-01-25 Thread Roger Pau Monné
On Tue, Jan 25, 2022 at 03:22:25PM +0100, Jan Beulich wrote: > We claim to support the insn, but so far the emulator has been handling > it as a NOP. While not ideal, the SDM mentions that "The CLDEMOTE instruction may be ignored by hardware in certain cases and is not a guarantee.". > Signed-off

Re: [RFC v1 3/5] xen/arm: introduce SCMI-SMC mediator driver

2022-01-25 Thread Oleksii Moisieiev
On Mon, Jan 24, 2022 at 02:14:43PM -0800, Stefano Stabellini wrote: > On Mon, 24 Jan 2022, Julien Grall wrote: > > On 24/01/2022 19:06, Stefano Stabellini wrote: > > > It looks like XEN_DOMCTL_host_node_by_path and > > > XEN_DOMCTL_find_host_compatible_node would also solve the problem but I > > >

[PATCH] x86emul: recognize CLDEMOTE

2022-01-25 Thread Jan Beulich
We claim to support the insn, but so far the emulator has been handling it as a NOP. Signed-off-by: Jan Beulich --- While handling x86emul_cldemote separately in hvmemul_cache_op() means to carry some redundant code, folding it with CLFLUSH{,OPT} / CLWB didn't seem very attractive either. --- a/

[linux-linus test] 167810: tolerable FAIL - PUSHED

2022-01-25 Thread osstest service owner
flight 167810 linux-linus real [real] flight 167815 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/167810/ http://logs.test-lab.xenproject.org/osstest/logs/167815/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-

Re: [PATCH] libxl: force netback to wait for hotplug execution before connecting

2022-01-25 Thread Durrant, Paul
On 24/01/2022 16:02, Roger Pau Monne wrote: By writing an empty "hotplug-status" xenstore node in the backend path libxl can force Linux netback to wait for hotplug script execution before proceeding to the 'connected' state. This is required so that netback doesn't skip state 2 (InitWait) and t

Re: [PATCH v2] xen-mapcache: Avoid entry->lock overflow

2022-01-25 Thread Durrant, Paul
On 24/01/2022 10:44, Ross Lagerwall wrote: In some cases, a particular mapcache entry may be mapped 256 times causing the lock field to wrap to 0. For example, this may happen when using emulated NVME and the guest submits a large scatter-gather write. At this point, the entry map be remapped cau

Re: [PATCH RFC v2 4/5] x86/mwait-idle: enable interrupts before C1 on Xeons

2022-01-25 Thread Roger Pau Monné
On Mon, Jan 24, 2022 at 03:44:53PM +0100, Jan Beulich wrote: > On 20.01.2022 16:52, Roger Pau Monné wrote: > > On Thu, Jan 20, 2022 at 03:04:39PM +0100, Jan Beulich wrote: > >> From: Artem Bityutskiy > >> Unlike Linux we want to disable IRQs again after MWAITing, as > >> subsequently invoked funct

Re: [PATCH] x86/time: minor adjustments to init_pit()

2022-01-25 Thread Roger Pau Monné
On Thu, Jan 20, 2022 at 04:17:37PM +, Andrew Cooper wrote: > On 17/01/2022 10:36, Jan Beulich wrote: > > For one, "using_pit" shouldn't be set ahead of the function's last > > (for now: only) error path. Otherwise "clocksource=pit" on the command > > line can lead to misbehavior when actually t

Xen Security Advisory 395 v2 (CVE-2022-23035) - Insufficient cleanup of passed-through device IRQs

2022-01-25 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-23035 / XSA-395 version 2 Insufficient cleanup of passed-through device IRQs UPDATES IN VERSION 2 Adjust patch subject. Public release. ISSU

Xen Security Advisory 394 v3 (CVE-2022-23034) - A PV guest could DoS Xen while unmapping a grant

2022-01-25 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-23034 / XSA-394 version 3 A PV guest could DoS Xen while unmapping a grant UPDATES IN VERSION 3 Public release. ISSUE DESCRIPTION ==

Xen Security Advisory 393 v2 (CVE-2022-23033) - arm: guest_physmap_remove_page not removing the p2m mappings

2022-01-25 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-23033 / XSA-393 version 2 arm: guest_physmap_remove_page not removing the p2m mappings UPDATES IN VERSION 2 Public release. ISSUE DESCRIPTION

Re: [XEN PATCH v9 30/30] build: adding out-of-tree support to the xen build

2022-01-25 Thread Anthony PERARD
On Tue, Jan 25, 2022 at 11:01:03AM +, Anthony PERARD wrote: > This implement out-of-tree support, there's two ways to create an > out-of-tree build tree (after that, `make` in that new directory > works): > make O=build > mkdir build; cd build; make -f ../Makefile > also works with an a

[XEN PATCH v9 19/30] build: clean-up "clean" rules of duplication

2022-01-25 Thread Anthony PERARD
All those files to be removed are already done in the main Makefile, either by the "find" command or directly (for $(TARGET).efi). Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Acked-by: Julien Grall --- xen/Makefile| 2 +- xen/arch/arm/Makefile | 1 - xen/arch/x86/

[XEN PATCH v9 21/30] build: use main rune to build host binary x86's mkelf32 and mkreloc

2022-01-25 Thread Anthony PERARD
Also, remove the HOSTCFLAGS "-g" from "mkreloc" command line. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - acked - remove the cflags "-g" from "mkreloc" xen/arch/x86/Makefile | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/

[XEN PATCH v9 25/30] build: replace $(BASEDIR) by $(objtree)

2022-01-25 Thread Anthony PERARD
We need to differentiate between source files and generated/built files. We will be replacing $(BASEDIR) by $(objtree) for files that are generated. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v9: - acked v8: - rebased xen/Rules.mk| 2 +

[XEN PATCH v9 20/30] build: rework "clean" to clean from the root dir

2022-01-25 Thread Anthony PERARD
This will allow "clean" to work from an out-of-tree build when it will be available. Some of the file been removed in current "clean" target aren't added to $(clean-files) because they are already listed in $(extra-) or $(extra-y). Also start to clean files listed in $(targets). This allows to cl

[XEN PATCH v9 27/30] build: rework "headers*.chk" prerequisite in include/

2022-01-25 Thread Anthony PERARD
Listing public headers when out-of-tree build are involved becomes more annoying where every path to every headers needs to start with "$(srctree)/$(src)", or $(wildcard ) will not work. This means more repetition. ( "$(srcdir)" is a shortcut for "$(srctree)/$(src)" ) This patch attempt to reduce

[XEN PATCH v9 29/30] build: shuffle main Makefile

2022-01-25 Thread Anthony PERARD
Reorganize a bit the Makefile ahead of patch "build: adding out-of-tree support to the xen build" We are going to want to calculate all the $(*srctree) and $(*objtree) once, when we can calculate them. This can happen within the "$(root-make-done)" guard, in an out-of-tree build scenario, so move

[XEN PATCH v9 14/30] build: remove KBUILD_ specific from Makefile.host

2022-01-25 Thread Anthony PERARD
This will allow $(HOSTCFLAGS) to actually be used when building programmes for the build-host. The other variable don't exist in our build system. Also remove $(KBUILD_EXTMOD) since it should always be empty. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/scripts/Makefile.host |

[XEN PATCH v9 13/30] xen/tools/kconfig: fix build with -Wdeclaration-after-statement

2022-01-25 Thread Anthony PERARD
We are going to start building kconfig with HOSTCFLAGS from Config.mk, it has the flag "-Wdeclaration-after-statement". Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v9: - reviewed xen/tools/kconfig/confdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[XEN PATCH v9 12/30] build: hook kconfig into xen build system

2022-01-25 Thread Anthony PERARD
Now that xen's build system is very close to Linux's ones, we can hook "Makefile.host" into Xen's build system, and we can build Kconfig with that. "tools/kconfig/Makefile" now needs a workaround to not rebuild "$(XEN_ROOT)/.config", as `make` tries the rules "%.config" which fails with: tools

[XEN PATCH v9 09/30] build: build everything from the root dir, use obj=$subdir

2022-01-25 Thread Anthony PERARD
A subdirectory is now built by setting "$(obj)" instead of changing directory. "$(obj)" should always be set when using "Rules.mk" and thus a shortcut "$(build)" is introduced and should be used. A new variable "$(need-builtin)" is introduce. It is to be used whenever a "built_in.o" is wanted from

[XEN PATCH v9 23/30] build,x86: remove the need for build32.mk

2022-01-25 Thread Anthony PERARD
Rework "arch/x86/boot/Makefile" to allow it to build both file "cmdline.S" and "reloc.S" without "build32.mk". These will now use the main rules for "%.o: %.c", and thus generate a dependency file. (We will not need to track the dependency manually anymore.) But for that, we need to override the

[XEN PATCH v9 24/30] build: grab common EFI source files in arch specific dir

2022-01-25 Thread Anthony PERARD
Rather than preparing the efi source file, we will make the symbolic link as needed from the build location. The `ln` command is run every time to allow to update the link in case the source tree change location. This patch also introduce "efi-common.mk" which allow to reuse the common make instr

[XEN PATCH v9 18/30] build: generate x86's asm-macros.h with filechk

2022-01-25 Thread Anthony PERARD
When we will build out-of-tree, make is going to try to generate "asm-macros.h" before the directories "arch/x86/include/asm" exist, thus we would need to call `mkdir` explicitly. We will use "filechk" for that as it does everything that the current recipe does and does call `mkdir`. Also, they ar

[XEN PATCH v9 15/30] build: handle always-y and hostprogs-always-y

2022-01-25 Thread Anthony PERARD
This will be used for xen/tools/. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/Rules.mk | 10 +- xen/scripts/Makefile.clean | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 13c1943da97e..5f2368805b36

[XEN PATCH v9 11/30] build: rename __LINKER__ to LINKER_SCRIPT

2022-01-25 Thread Anthony PERARD
For two reasons: this macro is used to generate a "linker script" and is not by the linker, and name starting with an underscore '_' are supposed to be reserved, so better avoid them when not needed. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Acked-by: Julien Grall --- xen/Rules.mk

[XEN PATCH v9 10/30] build: introduce if_changed_deps

2022-01-25 Thread Anthony PERARD
This macro does compare command line like if_changed, but it also rewrite the dependencies generated by $(CC) in order to depend on a CONFIG_* as generated by kconfig instead of depending on autoconf.h. This allow to make a change in kconfig options and only rebuild the object that uses that CONFIG

[XEN PATCH v9 26/30] build: replace $(BASEDIR) and use $(srctree)

2022-01-25 Thread Anthony PERARD
$(srctree) is a better description for the source directory than $(BASEDIR) that has been used for both source and build directory (which where the same). This adds $(srctree) to a few path where make's VPATH=$(srctree) won't apply. And replace $(BASEDIR) by $(srctree). Introduce "$(srcdir)" as a

[XEN PATCH v9 30/30] build: adding out-of-tree support to the xen build

2022-01-25 Thread Anthony PERARD
This implement out-of-tree support, there's two ways to create an out-of-tree build tree (after that, `make` in that new directory works): make O=build mkdir build; cd build; make -f ../Makefile also works with an absolute path for both. This implementation only works if the source tree is

[XEN PATCH v9 28/30] build: specify source tree in include/ for prerequisite

2022-01-25 Thread Anthony PERARD
When doing an out-of-tree build, and thus setting VPATH, GNU Make 3.81 on Ubuntu Trusty complains about Circular dependency of include/Makefile and include/xlat.lst and drop them. The build fails later due to headers malformed. This might be due to bug #13529 "Incorrect circular dependancy"

[XEN PATCH v9 22/30] build: rework coverage and ubsan CFLAGS handling

2022-01-25 Thread Anthony PERARD
When assigning a value a target-specific variable, that also affect prerequisite of the target. This is mostly fine, but there is one case where we will not want the COV_FLAGS added to the CFLAGS. In arch/x86/boot, we have "head.o" with "cmdline.S" as prerequisite and ultimately "cmdline.o", we do

[XEN PATCH v9 17/30] build: add headers path to CFLAGS once for all archs

2022-01-25 Thread Anthony PERARD
This just remove duplication. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Acked-by: Julien Grall --- xen/Makefile | 3 +++ xen/arch/arm/arch.mk | 3 --- xen/arch/riscv/arch.mk | 2 -- xen/arch/x86/arch.mk | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) diff -

[XEN PATCH v9 16/30] build: start building the tools with the main makefiles

2022-01-25 Thread Anthony PERARD
This will make out-of-tree build easier. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - add some $(Q) xen/Makefile | 8 xen/tools/Makefile | 17 ++--- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/xen/Makefile b/xen/M

[XEN PATCH v9 08/30] build: fix enforce unique symbols for recent clang version

2022-01-25 Thread Anthony PERARD
clang 6.0 and newer behave like gcc in regards for the FILE symbol, so only the filename rather than the full path to the source file. clang 3.8.1-24 (in our debian:stretch container) and 3.5.0-10 (in our debian:jessie container) do store the full path to the source file in the FILE symbol. Also,

[XEN PATCH v9 06/30] build: rework test/livepatch/Makefile

2022-01-25 Thread Anthony PERARD
This rework the livepatch/Makefile to make it less repetitive and make use of the facilities. All the targets to be built are now listed in $(extra-y) which will allow Rules.mk to build them without the need of a local target in a future patch. There are some changes/fixes in this patch: - when "x

[XEN PATCH v9 07/30] build: rework cloc recipe

2022-01-25 Thread Anthony PERARD
We are going to make other modifications to the cloc recipe, so this patch prepare make those modification easier. We replace the Makefile meta programming by just a shell script which should be easier to read and is actually faster to execute. Instead of looking for files in "$(BASEDIR)", we use

[XEN PATCH v9 05/30] build: prepare to always invoke $(MAKE) from xen/, use $(obj)

2022-01-25 Thread Anthony PERARD
In a future patch, when building a subdirectory, we will set "obj=$subdir" rather than change directory. Before that, we add "$(obj)" and "$(src)" in as many places as possible where we will need to know which subdirectory is been built. "$(obj)" is for files been generated during the build, and "

[XEN PATCH v9 04/30] build: set ALL_OBJS in main Makefile; move prelink.o to main Makefile

2022-01-25 Thread Anthony PERARD
This is to avoid arch/$arch/Makefile having to recurse into parents directories. This avoid duplication of the logic to build prelink.o between arches. In order to do that, we cut the $(TARGET) target in the main Makefile in two, there is a "prepare" phase/target runned before starting to build "

[XEN PATCH v9 02/30] build: avoid re-executing the main Makefile by introducing build.mk

2022-01-25 Thread Anthony PERARD
Currently, the xen/Makefile is re-parsed several times: once to start the build process, and several more time with Rules.mk including it. This makes it difficult to work with a Makefile used for several purpose, and it actually slow down the build process. So this patch introduce "build.mk" which

[XEN PATCH v9 00/30] xen: Build system improvements, now with out-of-tree build!

2022-01-25 Thread Anthony PERARD
Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.build-system-xen-v9 v9: One new patch (patch 3). Otherwise, detailed change logs in patches. Removed the rfc part about doing out-of-tree build without setting VPATH (wh

[XEN PATCH v9 03/30] build: fix exported variable name CFLAGS_stack_boundary

2022-01-25 Thread Anthony PERARD
Exporting a variable with a dash doesn't work reliably, they may be striped from the environment when calling a sub-make or sub-shell. CFLAGS-stack-boundary start to be removed from env in patch "build: set ALL_OBJS in main Makefile; move prelink.o to main Makefile" when running `make "ALL_OBJS=..

[XEN PATCH v9 01/30] build: set XEN_BUILD_EFI earlier

2022-01-25 Thread Anthony PERARD
We are going to need the variable XEN_BUILD_EFI earlier. But a side effect of calculating the value of $(XEN_BUILD_EFI) is to also to generate "efi/check.o" which is used for further checks. Thus the whole chain that check for EFI support is moved to "arch.mk". Some other changes are made to avoi

  1   2   >