Re: [PATCH v2 2/4] x86/shadow: sh_update_linear_entries() is a no-op for PV

2020-04-21 Thread Tim Deegan
At 11:11 +0200 on 21 Apr (1587467497), Jan Beulich wrote: > Consolidate the shadow_mode_external() in here: Check this once at the > start of the function. > > Signed-off-by: Jan Beulich > Acked-by: Andrew Cooper > Acked-by: Tim Deegan > --- > v2: Delete stale part of comment. > --- > Tim - I'm

Re: [PATCH] x86/shadow: make sh_remove_write_access() helper HVM only

2020-04-21 Thread Tim Deegan
At 14:05 +0200 on 21 Apr (1587477956), Jan Beulich wrote: > Despite the inline attribute at least some clang versions warn about > trace_shadow_wrmap_bf() being unused in !HVM builds. Include the helper > in the #ifdef region. > > Fixes: 8b8d011ad868 ("x86/shadow: the guess_wrmap() hook is needed

[seabios test] 149712: tolerable FAIL - PUSHED

2020-04-21 Thread osstest service owner
flight 149712 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/149712/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemuu-win7-amd64 17 guest-stop fail like 149211 test-amd64-amd64-xl-qemuu-ws16-amd64 17 g

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

2020-04-21 Thread osstest service owner
flight 149711 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/149711/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 18 guest-localmigrate/x10 fail blocked in 149703 test-amd64-amd64-xl-qemut-win7-amd64

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

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

[linux-5.4 test] 149709: regressions - FAIL

2020-04-21 Thread osstest service owner
flight 149709 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/149709/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ws16-amd64 10 windows-install fail REGR. vs. 149637 Regressions which are

Re: [PATCH] xen/arm: Avoid to open-code the relinquish state machine

2020-04-21 Thread Stefano Stabellini
On Sun, 19 Apr 2020, Julien Grall wrote: > In commit 0dfffe01d5 "x86: Improve the efficiency of > domain_relinquish_resources()", the x86 version of the function has been > reworked to avoid open-coding the state machine and also add more > documentation. > > Bring the Arm version on part with x86

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

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

Re: [PATCH] pvcalls: Document explicitly the padding for all arches

2020-04-21 Thread Stefano Stabellini
On Mon, 20 Apr 2020, Jan Beulich wrote: > On 20.04.2020 15:34, Julien Grall wrote: > > Hi Jan, > > > > On 20/04/2020 09:04, Jan Beulich wrote: > >> On 19.04.2020 12:49, Julien Grall wrote: > >>> --- a/docs/misc/pvcalls.pandoc > >>> +++ b/docs/misc/pvcalls.pandoc > >>> @@ -246,9 +246,7 @@ The forma

[xen-unstable test] 149705: tolerable FAIL - PUSHED

2020-04-21 Thread osstest service owner
flight 149705 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/149705/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 18 guest-localmigrate/x10 fail like 149695 test-amd64-i386-xl-qemut-win7-amd64

[ovmf test] 149708: all pass - PUSHED

2020-04-21 Thread osstest service owner
flight 149708 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/149708/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 6e3c834ae47d1201c4ddcc6a6adc5e44718c7617 baseline version: ovmf c884b23ac40a1b1f56e21

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Dan Carpenter
On Tue, Apr 21, 2020 at 08:59:09PM +0200, Julia Lawall wrote: > > > On Tue, 21 Apr 2020, Dan Carpenter wrote: > > > On Tue, Apr 21, 2020 at 05:29:02PM +0200, Julia Lawall wrote: > > > > > > > > > On Tue, 21 Apr 2020, Dan Carpenter wrote: > > > > > > > Hi Kernel Janitors, > > > > > > > > Here is

[qemu-mainline test] 149706: regressions - FAIL

2020-04-21 Thread osstest service owner
flight 149706 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/149706/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw 7 xen-boot fail REGR. vs. 149681 Regressions which

Re: [PATCH][RESEND] xen/arm: vgic-v3: fix GICD_ISACTIVER range

2020-04-21 Thread Julien Grall
On 21/04/2020 19:49, Stefano Stabellini wrote: + George On Sat, 18 Apr 2020, Julien Grall wrote: Hi, On 18/04/2020 00:12, Stefano Stabellini wrote: On Fri, 17 Apr 2020, Julien Grall wrote: Hi, The title claim this is a resend, but this is actually not the latest version of this patch. Ca

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Julia Lawall
On Tue, 21 Apr 2020, Dan Carpenter wrote: > On Tue, Apr 21, 2020 at 05:29:02PM +0200, Julia Lawall wrote: > > > > > > On Tue, 21 Apr 2020, Dan Carpenter wrote: > > > > > Hi Kernel Janitors, > > > > > > Here is another idea that someone could work on, fixing the > > > IS_ERR_OR_NULL() checks in

Re: [PATCH][RESEND] xen/arm: vgic-v3: fix GICD_ISACTIVER range

2020-04-21 Thread Stefano Stabellini
+ George On Sat, 18 Apr 2020, Julien Grall wrote: > Hi, > > On 18/04/2020 00:12, Stefano Stabellini wrote: > > On Fri, 17 Apr 2020, Julien Grall wrote: > > > Hi, > > > > > > The title claim this is a resend, but this is actually not the latest > > > version of this patch. Can you explain why you

Re: [PATCH] Introduce a description of the Backport and Fixes tags

2020-04-21 Thread Ian Jackson
Stefano Stabellini writes ("[PATCH] Introduce a description of the Backport and Fixes tags"): > Create a new document under docs/process to describe our special tags. > Add a description of the Fixes tag and the new Backport tag. Also > clarify that lines with tags should not be split. > > Signed

Re: [PATCH v2 4/4] x86: adjustments to guest handle treatment

2020-04-21 Thread Julien Grall
Hi, On 21/04/2020 18:30, Roger Pau Monné wrote: On Tue, Apr 21, 2020 at 11:13:23AM +0200, Jan Beulich wrote: First of all avoid excessive conversions. copy_{from,to}_guest(), for example, work fine with all of XEN_GUEST_HANDLE{,_64,_PARAM}(). I'm not sure I understand the difference between t

[PATCH] Introduce a description of the Backport and Fixes tags

2020-04-21 Thread Stefano Stabellini
Create a new document under docs/process to describe our special tags. Add a description of the Fixes tag and the new Backport tag. Also clarify that lines with tags should not be split. Signed-off-by: Stefano Stabellini Acked-by: Wei Liu CC: Ian Jackson CC: jbeul...@suse.com CC: george.dun...@

Re: [PATCH v3] Introduce a description of the Backport and Fixes tags

2020-04-21 Thread Stefano Stabellini
On Mon, 20 Apr 2020, Jan Beulich wrote: > On 18.04.2020 00:24, Stefano Stabellini wrote: > > +Backport Tag > > + > > + > > +A backport tag is an optional tag in the commit message to request a > > +given commit to be backported to the stable trees: > > + > > +Backport: 4.9+ > > + >

Re: [PATCH v3] Introduce a description of the Backport and Fixes tags

2020-04-21 Thread Stefano Stabellini
On Mon, 20 Apr 2020, Jan Beulich wrote: > On 20.04.2020 12:27, Wei Liu wrote: > > On Mon, Apr 20, 2020 at 10:31:28AM +0100, Julien Grall wrote: > >> On 17/04/2020 23:24, Stefano Stabellini wrote: > >>> Create a new document under docs/process to describe our special tags. > >>> Add a description of

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

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

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Dan Carpenter
On Tue, Apr 21, 2020 at 05:29:02PM +0200, Julia Lawall wrote: > > > On Tue, 21 Apr 2020, Dan Carpenter wrote: > > > Hi Kernel Janitors, > > > > Here is another idea that someone could work on, fixing the > > IS_ERR_OR_NULL() checks in the xen driver. > > > > The patch c575b7eeb89f: "drm/xen-fron

[PATCH v16 1/3] mem_sharing: fix sharability check during fork reset

2020-04-21 Thread Tamas K Lengyel
When resetting a VM fork we ought to only remove pages that were allocated for the fork during it's execution and the contents copied over from the parent. This can be determined if the page is sharable as special pages used by the fork for other purposes will not pass this test. Unfortunately duri

[PATCH v16 3/3] xen/tools: VM forking toolstack side

2020-04-21 Thread Tamas K Lengyel
Add necessary bits to implement "xl fork-vm" commands. The command allows the user to specify how to launch the device model allowing for a late-launch model in which the user can execute the fork without the device model and decide to only later launch it. Signed-off-by: Tamas K Lengyel --- doc

[PATCH v16 0/3] VM forking

2020-04-21 Thread Tamas K Lengyel
The following patches are part of the series that implement VM forking for Intel HVM guests to allow for the fast creation of identical VMs without the assosciated high startup costs of booting or restoring the VM from a savefile. JIRA issue: https://xenproject.atlassian.net/browse/XEN-89 The for

[PATCH v16 2/3] mem_sharing: allow forking domain with IOMMU enabled

2020-04-21 Thread Tamas K Lengyel
The memory sharing subsystem by default doesn't allow a domain to share memory if it has an IOMMU active for obvious security reasons. However, when fuzzing a VM fork, the same security restrictions don't necessarily apply. While it makes no sense to try to create a full fork of a VM that has an IO

Re: [PATCH v2 4/4] x86: adjustments to guest handle treatment

2020-04-21 Thread Roger Pau Monné
On Tue, Apr 21, 2020 at 11:13:23AM +0200, Jan Beulich wrote: > First of all avoid excessive conversions. copy_{from,to}_guest(), for > example, work fine with all of XEN_GUEST_HANDLE{,_64,_PARAM}(). I'm not sure I understand the difference between those two, as they are both placeholders for linea

Re: [PATCH OSSTEST v3 2/2] make-flight: add a core scheduling job

2020-04-21 Thread Roger Pau Monné
On Tue, Apr 21, 2020 at 05:39:54PM +0100, Ian Jackson wrote: > Roger Pau Monne writes ("[PATCH OSSTEST v3 2/2] make-flight: add a core > scheduling job"): > > Run a simple core scheduling tests on a host that has SMT support. > > This is only enabled for Xen >= 4.13. > > Thanks, pushed to pretest

Re: [PATCH v2 1/4] x86/mm: no-one passes a NULL domain to init_xen_l4_slots()

2020-04-21 Thread Roger Pau Monné
On Tue, Apr 21, 2020 at 11:11:03AM +0200, Jan Beulich wrote: > Drop the NULL checks - they've been introduced by commit 8d7b633ada > ("x86/mm: Consolidate all Xen L4 slot writing into > init_xen_l4_slots()") for no apparent reason. > > Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Th

Re: [PATCH OSSTEST v3 2/2] make-flight: add a core scheduling job

2020-04-21 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH OSSTEST v3 2/2] make-flight: add a core scheduling job"): > Run a simple core scheduling tests on a host that has SMT support. > This is only enabled for Xen >= 4.13. Thanks, pushed to pretest. Once it makes it through staging the test will appear, but it will sta

RE: [PATCH 0/3] Cleanup IOREQ server on exit

2020-04-21 Thread Paul Durrant
Ping v2? > -Original Message- > From: Maximilian Heyne > Sent: 07 April 2020 10:16 > To: xen-devel@lists.xenproject.org > Cc: Ian Jackson ; Paul Durrant > Subject: Re: [PATCH 0/3] Cleanup IOREQ server on exit > > Could someone please have a look at this patch? It solves an actual issue:

[XEN PATCH v5 12/16] xen/build: Use if_changed for prelink*.o

2020-04-21 Thread Anthony PERARD
We change the dependencies of prelink-efi.o so that we can use the same command line. The dependency on efi/built_in.o isn't needed because, we already have: efi/*.o: efi/built_in.o to build efi/*.o files that prelink-efi.o needs. Signed-off-by: Anthony PERARD Reviewed-by: Roger Pau Monné Ac

[XEN PATCH v5 08/16] build: Introduce $(cpp_flags)

2020-04-21 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Notes: v5: - new patch xen/Rules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 2e28c572305a..25bcf45612bd 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -123,6 +123,7 @@ $(obj-bin-y): XEN_CFL

[XEN PATCH v5 11/16] xen/build: factorise generation of the linker scripts

2020-04-21 Thread Anthony PERARD
In Arm and X86 makefile, generating the linker script is the same, so we can simply have both call the same macro. We need to add *.lds files into extra-y so that Rules.mk can find the .*.cmd dependency file and load it. Change made to the command line: - Use of $(CPP) instead of $(CC) -E - Remov

[XEN PATCH v5 02/16] xen/build: include include/config/auto.conf in main Makefile

2020-04-21 Thread Anthony PERARD
We are going to generate the CFLAGS early from "xen/Makefile" instead of in "Rules.mk", but we need to include "config/auto.conf", so include it in "Makefile". Before including "config/auto.conf" we check which make target a user is calling, as some targets don't need "auto.conf". For targets that

[XEN PATCH v5 05/16] build: Introduce documentation for xen Makefiles

2020-04-21 Thread Anthony PERARD
This start explainning the variables that can be used in the many Makefiles in xen/. Most of the document copies and modifies text from Linux v5.4 document linux.git/Documentation/kbuild/makefiles.rst. Modification are mostly to avoid mentioning kbuild. Thus I've added the SPDX tag which was only

[XEN PATCH v5 10/16] xen/build: Use if_changed_rules with %.o:%.c targets

2020-04-21 Thread Anthony PERARD
Use $(dot-target) to have the target name prefix with a dot. Now, when the CC command has run, it is recorded in .*.cmd file, then if_changed_rules will compare it on subsequent runs. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Rules.mk | 26 +- 1 fil

[XEN PATCH v5 13/16] xen,symbols: rework file symbols selection

2020-04-21 Thread Anthony PERARD
We want to use the same rune to build mm/*/guest_*.o as the one use to build every other *.o object. The consequence it that file symbols that the program ./symbols prefer changes with CONFIG_ENFORCE_UNIQUE_SYMBOLS=y. For example, when building arch/x86/mm/guest_walk_2.o from guest_walk.c, this wo

[XEN PATCH v5 01/16] build,xsm: Fix multiple call

2020-04-21 Thread Anthony PERARD
Both script mkflask.sh and mkaccess_vector.sh generates multiple files. Exploits the 'multi-target pattern rule' trick to call each scripts only once. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v5: - Use simpler $(subst ) instead of $(patsubst ) - moved the pa

[XEN PATCH v5 04/16] xen/build: have the root Makefile generates the CFLAGS

2020-04-21 Thread Anthony PERARD
Instead of generating the CFLAGS in Rules.mk everytime we enter a new subdirectory, we are going to generate most of them a single time, and export the result in the environment so that Rules.mk can use it. The only flags left to be generated are the ones that depend on the targets, but the variab

[XEN PATCH v5 07/16] xen/build: Start using if_changed

2020-04-21 Thread Anthony PERARD
This patch start to use if_changed introduced in a previous commit. Whenever if_changed is called, the target must have FORCE as dependency so that if_changed can check if the command line to be run has changed, so the macro $(real-prereqs) must be used to discover the dependencies without "FORCE"

[XEN PATCH v5 14/16] build: use if_changed to build mm/*/guest_%.o

2020-04-21 Thread Anthony PERARD
Use if_changed for building all guest_%.o objects, and make use of command that already exist. The current command only runs `CC`, but the runes to build every other object in Xen also runs `objcopy` (when CONFIG_ENFORCE_UNIQUE_SYMBOLS=y) which modify the file symbol. But with patch "xen,symbols:

[XEN PATCH v5 16/16] build,include: rework compat-build-header.py

2020-04-21 Thread Anthony PERARD
Replace a mix of shell script and python script by all python script. No change to the final generated headers. Signed-off-by: Anthony PERARD --- Notes: v5: - Removed -P from CPP when generating compat/%.i -> keep removing linemarkers and keep de-duplicating empty lines. So

[XEN PATCH v5 06/16] xen/build: introduce if_changed and if_changed_rule

2020-04-21 Thread Anthony PERARD
The if_changed macro from Linux, in addition to check if any files needs an update, check if the command line has changed since the last invocation. The latter will force a rebuild if any options to the executable have changed. if_changed_rule checks dependencies like if_changed, but execute rule_

[XEN PATCH v5 00/16] xen: Build system improvements

2020-04-21 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-v5 v5: - few changes detailed in patch notes. - 1 new patch v4: - some patch already applied. - Have added patches from "xen/arm: Configure early printk via Kconfig" se

[XEN PATCH v5 09/16] xen/build: use if_changed on built_in.o

2020-04-21 Thread Anthony PERARD
In the case where $(obj-y) is empty, we also replace $(c_flags) by $(XEN_CFLAGS) to avoid generating an .%.d dependency file. This avoid make trying to include %.h file in the ld command if $(obj-y) isn't empty anymore on a second run. Signed-off-by: Anthony PERARD --- Notes: v4: - Have

[XEN PATCH v5 15/16] build,include: rework compat-build-source.py

2020-04-21 Thread Anthony PERARD
Improvement are: - give the path to xlat.lst as argument - include `grep -v` in compat-build-source.py script, we don't need to write this in several scripted language. No changes in final compat/%.h headers. Signed-off-by: Anthony PERARD --- Notes: v5: - removed "have 'xlat.lst' path

[XEN PATCH v5 03/16] xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS)

2020-04-21 Thread Anthony PERARD
In a later patch ("xen/build: have the root Makefile generates the CFLAGS), we want to generate the CFLAGS in xen/Makefile, then export it and have Rules.mk use a CFLAGS from the environment variables. That changes the flavor of the CFLAGS and flags intended for one target (like -D__OBJECT_FILE__ a

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Julia Lawall
On Tue, 21 Apr 2020, Dan Carpenter wrote: > Hi Kernel Janitors, > > Here is another idea that someone could work on, fixing the > IS_ERR_OR_NULL() checks in the xen driver. > > The patch c575b7eeb89f: "drm/xen-front: Add support for Xen PV > display frontend" from Apr 3, 2018, leads to the foll

[PATCH v3 2/2] x86: validate VM assist value in arch_set_info_guest()

2020-04-21 Thread Jan Beulich
While I can't spot anything that would go wrong, just like the respective hypercall only permits applicable bits to be set, we should also do so when loading guest context. Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- I'd like to note that Arm lacks a field

[PATCH v3 1/2] x86/HVM: expose VM assist hypercall

2020-04-21 Thread Jan Beulich
In preparation for the addition of VMASST_TYPE_runstate_update_flag commit 72c538cca957 ("arm: add support for vm_assist hypercall") enabled the hypercall for Arm. I consider it not logical that it then isn't also exposed to x86 HVM guests (with the same single feature permitted to be enabled as Ar

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

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

[PATCH v3 0/2] x86: VM assist hypercall adjustments

2020-04-21 Thread Jan Beulich
1: HVM: expose VM assist hypercall 2: validate VM assist value in arch_set_info_guest() Jan

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-21 Thread Jan Beulich
On 21.04.2020 15:51, Roger Pau Monné wrote: > On Tue, Apr 21, 2020 at 02:59:10PM +0200, Jan Beulich wrote: >> On 21.04.2020 12:43, Roger Pau Monné wrote: >>> On Tue, Apr 21, 2020 at 12:21:12PM +0200, Jan Beulich wrote: On 16.04.2020 15:59, Roger Pau Monne wrote: > Introduce a specific flag

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-21 Thread Roger Pau Monné
On Tue, Apr 21, 2020 at 02:59:10PM +0200, Jan Beulich wrote: > On 21.04.2020 12:43, Roger Pau Monné wrote: > > On Tue, Apr 21, 2020 at 12:21:12PM +0200, Jan Beulich wrote: > >> On 16.04.2020 15:59, Roger Pau Monne wrote: > >>> Introduce a specific flag to request a HVM guest linear TLB flush, > >>>

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-21 Thread Jan Beulich
On 21.04.2020 12:43, Roger Pau Monné wrote: > On Tue, Apr 21, 2020 at 12:21:12PM +0200, Jan Beulich wrote: >> On 16.04.2020 15:59, Roger Pau Monne wrote: >>> Introduce a specific flag to request a HVM guest linear TLB flush, >>> which is an ASID/VPID tickle that forces a guest linear to guest >>> p

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Oleksandr Andrushchenko
On 4/21/20 14:51, Dan Carpenter wrote: > It turns out there aren't that many of these in xen. > > $ grep IS_ERR_OR_NULL drivers/gpu/drm/xen/ -Rn > drivers/gpu/drm/xen/xen_drm_front_kms.c:63: if (IS_ERR_OR_NULL(fb)) > drivers/gpu/drm/xen/xen_drm_front_gem.c:86: if (IS_ERR_OR_NULL(xen_obj)) >

Re: [PATCH v2 1/2] x86/HVM: expose VM assist hypercall

2020-04-21 Thread Andrew Cooper
On 21/04/2020 13:35, Julien Grall wrote: --- a/xen/include/asm-x86/domain.h +++ b/xen/include/asm-x86/domain.h @@ -700,6 +700,20 @@ static inline void pv_inject_sw_interrup   pv_inject_event(&event); } +#define PV_VM_ASSIST_VALID  ((1UL << VMASST_TYPE_4gb_segm

Re: [PATCH v2 1/2] x86/HVM: expose VM assist hypercall

2020-04-21 Thread Andrew Cooper
On 21/04/2020 06:54, Jan Beulich wrote: > On 20.04.2020 19:53, Julien Grall wrote: >>> --- a/xen/common/domain.c >>> +++ b/xen/common/domain.c >>> @@ -1517,20 +1517,23 @@ long do_vcpu_op(int cmd, unsigned int vc >>>   return rc; >>>   } >>>   -#ifdef VM_ASSIST_VALID >>> -long vm_assist(struct d

Re: [PATCH v2 1/2] x86/HVM: expose VM assist hypercall

2020-04-21 Thread Julien Grall
On 21/04/2020 06:54, Jan Beulich wrote: On 20.04.2020 19:53, Julien Grall wrote: --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1517,20 +1517,23 @@ long do_vcpu_op(int cmd, unsigned int vc   return rc;   }   -#ifdef VM_ASSIST_VALID -long vm_assist(struct domain *p, unsigned in

Re: [PATCH] x86/shadow: make sh_remove_write_access() helper HVM only

2020-04-21 Thread Andrew Cooper
On 21/04/2020 13:05, Jan Beulich wrote: > Despite the inline attribute at least some clang versions warn about > trace_shadow_wrmap_bf() being unused in !HVM builds. Include the helper > in the #ifdef region. > > Fixes: 8b8d011ad868 ("x86/shadow: the guess_wrmap() hook is needed for HVM > only") >

[PATCH] x86/shadow: make sh_remove_write_access() helper HVM only

2020-04-21 Thread Jan Beulich
Despite the inline attribute at least some clang versions warn about trace_shadow_wrmap_bf() being unused in !HVM builds. Include the helper in the #ifdef region. Fixes: 8b8d011ad868 ("x86/shadow: the guess_wrmap() hook is needed for HVM only") Reported-by: Andrew Cooper Signed-off-by: Jan Beuli

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Dan Carpenter
It turns out there aren't that many of these in xen. $ grep IS_ERR_OR_NULL drivers/gpu/drm/xen/ -Rn drivers/gpu/drm/xen/xen_drm_front_kms.c:63: if (IS_ERR_OR_NULL(fb)) drivers/gpu/drm/xen/xen_drm_front_gem.c:86: if (IS_ERR_OR_NULL(xen_obj)) drivers/gpu/drm/xen/xen_drm_front_gem.c:120:i

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Oleksandr Andrushchenko
On 4/21/20 13:45, Dan Carpenter wrote: > Hi Kernel Janitors, Hi > > Here is another idea that someone could work on, fixing the > IS_ERR_OR_NULL() checks in the xen driver. > > The patch c575b7eeb89f: "drm/xen-front: Add support for Xen PV > display frontend" from Apr 3, 2018, leads to the followin

[bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Dan Carpenter
Hi Kernel Janitors, Here is another idea that someone could work on, fixing the IS_ERR_OR_NULL() checks in the xen driver. The patch c575b7eeb89f: "drm/xen-front: Add support for Xen PV display frontend" from Apr 3, 2018, leads to the following static checker warning: drivers/gpu/drm/xen

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-21 Thread Roger Pau Monné
On Tue, Apr 21, 2020 at 12:21:12PM +0200, Jan Beulich wrote: > On 16.04.2020 15:59, Roger Pau Monne wrote: > > Introduce a specific flag to request a HVM guest linear TLB flush, > > which is an ASID/VPID tickle that forces a guest linear to guest > > physical TLB flush for all HVM guests. > > > >

Re: [PATCH] x86: Enumeration for Control-flow Enforcement Technology

2020-04-21 Thread Andrew Cooper
On 21/04/2020 08:11, Jan Beulich wrote: > On 20.04.2020 21:08, Andrew Cooper wrote: >> --- a/xen/include/public/arch-x86/cpufeatureset.h >> +++ b/xen/include/public/arch-x86/cpufeatureset.h >> @@ -229,6 +229,7 @@ XEN_CPUFEATURE(UMIP, 6*32+ 2) /*S User Mode >> Instruction Prevention */ >>

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-21 Thread Jan Beulich
On 16.04.2020 15:59, Roger Pau Monne wrote: > Introduce a specific flag to request a HVM guest linear TLB flush, > which is an ASID/VPID tickle that forces a guest linear to guest > physical TLB flush for all HVM guests. > > This was previously unconditionally done in each pre_flush call, but > th

Re: [PATCH] x86: Enumeration for Control-flow Enforcement Technology

2020-04-21 Thread Wei Liu
On Mon, Apr 20, 2020 at 08:08:29PM +0100, Andrew Cooper wrote: > The CET spec has been published and guest kernels are starting to get support. > Introduce the CPUID and MSRs, and fully block the MSRs from guest use. > > Signed-off-by: Andrew Cooper Acked-by: Wei Liu

Re: [PATCH 1/1] x86/vtd: Mask DMAR faults for IGD devices

2020-04-21 Thread Jan Beulich
On 17.04.2020 15:36, Brendan Kerrigan wrote: > The Intel graphics device records DMAR faults regardless > of the Fault Process Disable bit being set. I can't seem to be able to find a place where we would set FPD. Why do we need the workaround then, or what am I missing? > When this fault > occur

Re: [PATCH v15 2/3] mem_sharing: allow forking domain with IOMMU enabled

2020-04-21 Thread Jan Beulich
On 17.04.2020 19:06, Tamas K Lengyel wrote: > @@ -2063,9 +2065,10 @@ int > mem_sharing_memop(XEN_GUEST_HANDLE_PARAM(xen_mem_sharing_op_t) arg) > case XENMEM_sharing_op_fork: > { > struct domain *pd; > +bool allow_iommu; > > rc = -EINVAL; > -if ( mso.u.

[PATCH v2 4/4] x86: adjustments to guest handle treatment

2020-04-21 Thread Jan Beulich
First of all avoid excessive conversions. copy_{from,to}_guest(), for example, work fine with all of XEN_GUEST_HANDLE{,_64,_PARAM}(). Further - do_physdev_op_compat() didn't use the param form for its parameter, - {hap,shadow}_track_dirty_vram() wrongly used the param form, - compat processor Px l

[PATCH v2 3/4] x86/mm: monitor table is HVM-only

2020-04-21 Thread Jan Beulich
Move the per-vCPU field to the HVM sub-structure. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Acked-by: Tim Deegan --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -545,7 +545,7 @@ void write_ptbase(struct vcpu *v) * Should be called after CR3 is updated. * * Uses values found i

[PATCH v2 2/4] x86/shadow: sh_update_linear_entries() is a no-op for PV

2020-04-21 Thread Jan Beulich
Consolidate the shadow_mode_external() in here: Check this once at the start of the function. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Acked-by: Tim Deegan --- v2: Delete stale part of comment. --- Tim - I'm re-posting as I wasn't entirely sure whether you meant to drop the entire PV

[PATCH v2 1/4] x86/mm: no-one passes a NULL domain to init_xen_l4_slots()

2020-04-21 Thread Jan Beulich
Drop the NULL checks - they've been introduced by commit 8d7b633ada ("x86/mm: Consolidate all Xen L4 slot writing into init_xen_l4_slots()") for no apparent reason. Signed-off-by: Jan Beulich --- v2: Adjust comment ahead of the function. --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1653,7

[PATCH v2 0/4] x86: mm (mainly shadow) adjustments

2020-04-21 Thread Jan Beulich
(Not so) large (anymore) parts of this series are to further isolate pieces which are needed for HVM only, and hence would better not be built with HVM=n. But there are also a few other items which I've noticed along the road, including the new in v2 4th patch. 1: mm: no-one passes a NULL domain t

[PATCH v4 03/13] numa: Teach ram block notifiers about resizeable ram blocks

2020-04-21 Thread David Hildenbrand
Ram block notifiers are currently not aware of resizes. Especially to handle resizes during migration, but also to implement actually resizeable ram blocks (make everything between used_length and max_length inaccessible), we want to teach ram block notifiers about resizeable ram. Introduce the ba

Re: [PATCH 3/3] x86/pv: Don't use IST for NMI/#MC/#DB in !CONFIG_PV builds

2020-04-21 Thread Jan Beulich
On 20.04.2020 16:59, Andrew Cooper wrote: > --- a/xen/include/asm-x86/processor.h > +++ b/xen/include/asm-x86/processor.h > @@ -441,12 +441,18 @@ struct tss_page { > }; > DECLARE_PER_CPU(struct tss_page, tss_page); > > +/* > + * Interrupt Stack Tables. Used to force a stack switch on a CPL0=>0

Re: [PATCH 2/3] x86/boot: Don't enable EFER.SCE for !CONFIG_PV builds

2020-04-21 Thread Jan Beulich
On 20.04.2020 16:59, Andrew Cooper wrote: > --- a/xen/arch/x86/efi/efi-boot.h > +++ b/xen/arch/x86/efi/efi-boot.h > @@ -238,7 +238,8 @@ static void __init noreturn efi_arch_post_exit_boot(void) > /* Set system registers and transfer control. */ > asm volatile("pushq $0\n\tpopfq"); >

Re: [PATCH 1/3] x86/S3: Use percpu_traps_init() rather than opencoding SYSCALL/SYSENTER restoration

2020-04-21 Thread Jan Beulich
On 20.04.2020 16:59, Andrew Cooper wrote: > @@ -46,24 +36,13 @@ void restore_rest_processor_state(void) > /* Restore full CR4 (inc MCE) now that the IDT is in place. */ > write_cr4(mmu_cr4_features); > > -/* Recover syscall MSRs */ > -wrmsrl(MSR_LSTAR, saved_lstar); > -wrmsr

Re: [PATCH] x86: Enumeration for Control-flow Enforcement Technology

2020-04-21 Thread Jan Beulich
On 20.04.2020 21:08, Andrew Cooper wrote: > --- a/xen/include/public/arch-x86/cpufeatureset.h > +++ b/xen/include/public/arch-x86/cpufeatureset.h > @@ -229,6 +229,7 @@ XEN_CPUFEATURE(UMIP, 6*32+ 2) /*S User Mode > Instruction Prevention */ > XEN_CPUFEATURE(PKU, 6*32+ 3) /*H P

Re: [PATCH v15 2/3] mem_sharing: allow forking domain with IOMMU enabled

2020-04-21 Thread Roger Pau Monné
On Mon, Apr 20, 2020 at 08:19:12AM -0600, Tamas K Lengyel wrote: > On Mon, Apr 20, 2020 at 1:57 AM Roger Pau Monné wrote: > > > > On Fri, Apr 17, 2020 at 10:06:32AM -0700, Tamas K Lengyel wrote: > > > diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h > > > index d36d64b8dc..1d

Re: [PATCH v2] sched: print information about scheduling granularity

2020-04-21 Thread Sergey Dyasli
On 20/04/2020 14:45, Jürgen Groß wrote: > On 20.04.20 15:06, Sergey Dyasli wrote: >> Currently it might be not obvious which scheduling mode (e.g. core- >> scheduling) is being used by the scheduler. Alleviate this by printing >> additional information about the selected granularity per-cpupool. >>