Re: [Xen-devel] [PATCH v2 1/2] nvmx: implement support for MSR bitmaps

2020-02-03 Thread Tian, Kevin
> From: Roger Pau Monne > Sent: Wednesday, January 29, 2020 10:45 PM > > Current implementation of nested VMX has a half baked handling of MSR > bitmaps for the L1 VMM: it maps the L1 VMM provided MSR bitmap, but > doesn't actually load it into the nested vmcs, and thus the nested > guest vmcs en

Re: [Xen-devel] [PATCH v2 2/2] nvmx: always trap accesses to x2APIC MSRs

2020-02-03 Thread Tian, Kevin
> From: Roger Pau Monne > Sent: Wednesday, January 29, 2020 10:45 PM > > Nested VMX doesn't expose support for > SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE, > SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY or > SECONDARY_EXEC_APIC_REGISTER_VIRT, and hence the x2APIC MSRs should > always be trapped in the nested

Re: [Xen-devel] [PATCH v7 1/3] x86 / vmx: move teardown from domain_destroy()...

2020-02-03 Thread Tian, Kevin
> From: Paul Durrant > Sent: Thursday, January 30, 2020 1:10 AM > > ... to domain_relinquish_resources(). > > The teardown code frees the APICv page. This does not need to be done late > so do it in domain_relinquish_resources() rather than domain_destroy(). > > Signed-off-by: Paul Durrant Re

Re: [Xen-devel] [PATCH v8 4/4] x86 / vmx: use a MEMF_no_refcount domheap page for APIC_DEFAULT_PHYS_BASE

2020-02-03 Thread Tian, Kevin
> From: Paul Durrant > Sent: Thursday, January 30, 2020 10:58 PM > > vmx_alloc_vlapic_mapping() currently contains some very odd looking code > that allocates a MEMF_no_owner domheap page and then shares with the > guest > as if it were a xenheap page. This then requires vmx_free_vlapic_mapping()

[Xen-devel] [ovmf test] 146686: regressions - FAIL

2020-02-03 Thread osstest service owner
flight 146686 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/146686/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 10 debian-hvm-install fail REGR. vs. 145767 test-amd64-amd64-xl-qemuu

[Xen-devel] Xen-unstable: pci-passthrough regression bisected to: x86/smp: use APIC ALLBUT destination shorthand when possible

2020-02-03 Thread Sander Eikelenboom
Hi Roger, Last week I encountered an issue with the PCI-passthrough of a USB controller. In the guest I get: [ 1143.313756] xhci_hcd :00:05.0: xHCI host not responding to stop endpoint command. [ 1143.334825] xhci_hcd :00:05.0: xHCI host controller not responding, assume dead

Re: [Xen-devel] [PATCH v3 4/9] xen: add basic hypervisor filesystem support

2020-02-03 Thread Jürgen Groß
On 31.01.20 16:50, Wei Liu wrote: On Tue, Jan 21, 2020 at 09:43:25AM +0100, Juergen Gross wrote: [...] diff --git a/xen/common/hypfs.c b/xen/common/hypfs.c new file mode 100644 index 00..6762d20dfd --- /dev/null +++ b/xen/common/hypfs.c @@ -0,0 +1,365 @@ +/***

Re: [Xen-devel] [PATCH v3 5/9] libs: add libxenhypfs

2020-02-03 Thread Jürgen Groß
On 31.01.20 16:57, Wei Liu wrote: On Tue, Jan 21, 2020 at 09:43:26AM +0100, Juergen Gross wrote: Add the new library libxenhypfs for access to the hypervisor filesystem. Signed-off-by: Juergen Gross I've only skimmed read it. The code looks sensible. One minor comment. diff --git a/tools/

[Xen-devel] [linux-5.4 test] 146682: regressions - FAIL

2020-02-03 Thread osstest service owner
flight 146682 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/146682/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ovmf-amd64 10 debian-hvm-install fail REGR. vs. 146121 test-amd64-i386-xl

Re: [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion from vmcb.h

2020-02-03 Thread Alexandru Stefan ISAILA
On 31.01.2020 18:42, Jan Beulich wrote: > It's not needed there and introduces a needless, almost global > dependency. Include the file (or in some cases just xen/err.h) where > actually needed, or - in one case - simply forward-declare a struct. In > microcode*.c take the opportunity and also re

Re: [Xen-devel] [PATCH] docs/designs: Add a design document for transparent live migration

2020-02-03 Thread David Woodhouse
On Mon, 2020-01-27 at 16:46 +, Ian Jackson wrote: > I don't like the term `transparent'. It is often abused in other > contexts. It can be clear to whom things are transparent. In a very > real sense existing migration is `transparent' to a domain's network > peers, for example. How about `

[Xen-devel] [qemu-mainline test] 146692: regressions - FAIL

2020-02-03 Thread osstest service owner
flight 146692 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/146692/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 6 xen-buildfail REGR. vs. 144861 build-arm64-xsm

Re: [Xen-devel] [PATCH v3 3/9] docs: add feature document for Xen hypervisor sysfs-like support

2020-02-03 Thread Julien Grall
On 21/01/2020 14:17, Jürgen Groß wrote: On 21.01.20 14:14, Julien Grall wrote: However, I am not sure what are actually the tags? Do you have a concrete example how they can be used? I'll add this one: /cpu-bugs/active-pv/xpti (0|1) [w,X86,PV] + +* w -- Path is writable by the user. Thi

[Xen-devel] [PATCH] docs/xl: fix typo in xl.cfg

2020-02-03 Thread Roger Pau Monne
The name of the option is nographic. Signed-off-by: Roger Pau Monné --- docs/man/xl.cfg.5.pod.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index 245d3f9472..0cad561375 100644 --- a/docs/man/xl.cfg.5.pod.in +++ b/docs/m

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Durrant, Paul
> -Original Message- > From: Wei Liu > Sent: 31 January 2020 17:57 > To: Xen Development List > Cc: Durrant, Paul ; Michael Kelley > ; Wei Liu ; Wei Liu > ; Jan Beulich ; Andrew Cooper > ; Roger Pau Monné > Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page > > (Note to self

[Xen-devel] [PATCH v9 1/4] x86 / vmx: move teardown from domain_destroy()...

2020-02-03 Thread Paul Durrant
... to domain_relinquish_resources(). The teardown code frees the APICv page. This does not need to be done late so do it in domain_relinquish_resources() rather than domain_destroy(). Signed-off-by: Paul Durrant Reviewed-by: Jan Beulich Reviewed-by: Kevin Tian --- Cc: Jun Nakajima Cc: Andrew

[Xen-devel] [PATCH v9 3/4] mm: make pages allocated with MEMF_no_refcount safe to assign

2020-02-03 Thread Paul Durrant
Currently it is unsafe to assign a domheap page allocated with MEMF_no_refcount to a domain because the domain't 'tot_pages' will not be incremented, but will be decrement when the page is freed (since free_domheap_pages() has no way of telling that the increment was skipped). This patch allocates

[Xen-devel] [PATCH v9 2/4] add a domain_tot_pages() helper function

2020-02-03 Thread Paul Durrant
This patch adds a new domain_tot_pages() inline helper function into sched.h, which will be needed by a subsequent patch. No functional change. NOTE: While modifying the comment for 'tot_pages' in sched.h this patch makes some cosmetic fixes to surrounding comments. Suggested-by: Jan Beuli

[Xen-devel] [PATCH v9 0/4] purge free_shared_domheap_page()

2020-02-03 Thread Paul Durrant
Paul Durrant (4): x86 / vmx: move teardown from domain_destroy()... add a domain_tot_pages() helper function mm: make pages allocated with MEMF_no_refcount safe to assign x86 / vmx: use a MEMF_no_refcount domheap page for APIC_DEFAULT_PHYS_BASE xen/arch/arm/arm64/domctl.c | 2 +-

Re: [Xen-devel] [PATCH 2/8] x86/setup: Fix badpage= handling for memory above HYPERVISOR_VIRT_END

2020-02-03 Thread Julien Grall
Hi David, On 01/02/2020 00:32, David Woodhouse wrote: From: David Woodhouse Bad pages are identified by get_platform_badpages() and with badpage= on the command line. The boot allocator currently automatically elides these from the regions passed to it with init_boot_pages(). The xenheap is t

[Xen-devel] [PATCH v9 4/4] x86 / vmx: use a MEMF_no_refcount domheap page for APIC_DEFAULT_PHYS_BASE

2020-02-03 Thread Paul Durrant
vmx_alloc_vlapic_mapping() currently contains some very odd looking code that allocates a MEMF_no_owner domheap page and then shares with the guest as if it were a xenheap page. This then requires vmx_free_vlapic_mapping() to call a special function in the mm code: free_shared_domheap_page(). By u

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Jan Beulich
On 03.02.2020 11:39, Durrant, Paul wrote: >> -Original Message- >> From: Wei Liu >> Sent: 31 January 2020 17:57 >> To: Xen Development List >> Cc: Durrant, Paul ; Michael Kelley >> ; Wei Liu ; Wei Liu >> ; Jan Beulich ; Andrew Cooper >> ; Roger Pau Monné >> Subject: Re: [PATCH v6 05/11]

Re: [Xen-devel] [PATCH 6/8] x86/setup: move vm_init() before end_boot_allocator()

2020-02-03 Thread Xia, Hongyan
On Sat, 2020-02-01 at 00:33 +, David Woodhouse wrote: > From: David Woodhouse > > We would like to be able to use vmap() to map the live update data, > and > we need to do a first pass of the live update data before we prime > the > heap because we need to know which pages need to be preserve

Re: [Xen-devel] [PATCH] docs/misc: xen-command-line: fix parameters in sample serial configuration

2020-02-03 Thread Jan Beulich
On 01.02.2020 02:20, Sarah Newman wrote: > The names of the serial parameters use hyphens, not underscores. > > Signed-off-by: Sarah Newman Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.o

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 03 February 2020 11:06 > To: Durrant, Paul > Cc: Wei Liu ; Xen Development List de...@lists.xenproject.org>; Michael Kelley ; Wei > Liu ; Andrew Cooper ; > Roger Pau Monné > Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page >

[Xen-devel] [PATCH v3] ns16550: Add ACPI support for ARM only

2020-02-03 Thread Wei Xu
Parse the ACPI SPCR table and initialize the 16550 compatible serial port for ARM only. Currently we only support one UART on ARM. Some fields which we do not care yet on ARM are ignored. Signed-off-by: Wei Xu --- Changes in v3: - address the code style comments from Jan - use container_of to do

Re: [Xen-devel] [PATCH v6 10/11] x86: move viridian_page_msr to hyperv-tlfs.h

2020-02-03 Thread Durrant, Paul
> -Original Message- > From: Wei Liu On Behalf Of Wei Liu > Sent: 31 January 2020 17:49 > To: Xen Development List > Cc: Durrant, Paul ; Michael Kelley > ; Wei Liu ; Wei Liu > ; Jan Beulich ; Andrew Cooper > ; Roger Pau Monné > Subject: [PATCH v6 10/11] x86: move viridian_page_msr to hyp

Re: [Xen-devel] [PATCH v6 11/11] x86/hyperv: setup VP assist page

2020-02-03 Thread Durrant, Paul
> -Original Message- > From: Wei Liu On Behalf Of Wei Liu > Sent: 31 January 2020 17:50 > To: Xen Development List > Cc: Durrant, Paul ; Michael Kelley > ; Wei Liu ; Wei Liu > ; Jan Beulich ; Andrew Cooper > ; Roger Pau Monné > Subject: [PATCH v6 11/11] x86/hyperv: setup VP assist page >

Re: [Xen-devel] [XEN PATCH v2 02/12] xen/build: Use obj-y += subdir/ instead of subdir-y

2020-02-03 Thread Anthony PERARD
On Fri, Jan 31, 2020 at 09:35:16AM +0100, Jan Beulich wrote: > Alternatively, to retain this "latching" effect, how about > > subdir-y := $(subdir-y) $(filter %/, $(obj-y)) Sounds good. Thanks, -- Anthony PERARD ___ Xen-devel mailing list Xen-devel@

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Jan Beulich
On 03.02.2020 12:21, Durrant, Paul wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 03 February 2020 11:06 >> To: Durrant, Paul >> Cc: Wei Liu ; Xen Development List > de...@lists.xenproject.org>; Michael Kelley ; Wei >> Liu ; Andrew Cooper ; >> Roger Pau Monné >> Subject: Re:

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 03 February 2020 11:34 > To: Durrant, Paul > Cc: Wei Liu ; Xen Development List de...@lists.xenproject.org>; Michael Kelley ; Wei > Liu ; Andrew Cooper ; > Roger Pau Monné > Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page >

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Jan Beulich
On 03.02.2020 12:37, Durrant, Paul wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 03 February 2020 11:34 >> To: Durrant, Paul >> Cc: Wei Liu ; Xen Development List > de...@lists.xenproject.org>; Michael Kelley ; Wei >> Liu ; Andrew Cooper ; >> Roger Pau Monné >> Subject: Re:

Re: [Xen-devel] [PATCH v9 2/4] add a domain_tot_pages() helper function

2020-02-03 Thread Jan Beulich
On 03.02.2020 11:56, Paul Durrant wrote: > This patch adds a new domain_tot_pages() inline helper function into > sched.h, which will be needed by a subsequent patch. > > No functional change. > > NOTE: While modifying the comment for 'tot_pages' in sched.h this patch > makes some cosmetic

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 03 February 2020 11:39 > To: Durrant, Paul > Cc: Wei Liu ; Xen Development List de...@lists.xenproject.org>; Michael Kelley ; Wei > Liu ; Andrew Cooper ; > Roger Pau Monné > Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page >

Re: [Xen-devel] [XEN PATCH v2 09/12] xen/build: include include/config/auto.conf in main Makefile

2020-02-03 Thread Anthony PERARD
On Thu, Jan 30, 2020 at 02:06:18PM +0100, Jan Beulich wrote: > On 17.01.2020 11:53, Anthony PERARD wrote: > > --- a/xen/Makefile > > +++ b/xen/Makefile > > @@ -49,7 +49,71 @@ default: build > > .PHONY: dist > > dist: install > > > > -build install:: include/config/auto.conf > > + > > +ifndef ro

Re: [Xen-devel] [PATCH v3 1/7] x86/tlb: fix NEED_FLUSH return type

2020-02-03 Thread Jan Beulich
On 28.01.2020 15:17, Wei Liu wrote: > On Mon, Jan 27, 2020 at 07:11:09PM +0100, Roger Pau Monne wrote: >> The returned type wants to be bool instead of int. >> >> No functional change intended. >> >> Signed-off-by: Roger Pau Monné > > Reviewed-by: Wei Liu Acked-by: Jan Beulich _

Re: [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion from vmcb.h

2020-02-03 Thread Durrant, Paul
> -Original Message- > From: Xen-devel On Behalf Of Jan > Beulich > Sent: 31 January 2020 16:42 > To: xen-devel@lists.xenproject.org > Cc: Petre Pircalabu ; Kevin Tian > ; Tamas K Lengyel ; Wei Liu > ; Paul Durrant ; George Dunlap > ; Andrew Cooper ; > Tim Deegan ; Jun Nakajima ; Alexandru

Re: [Xen-devel] [PATCH 1/2] nvmx: fix handling of interrupts

2020-02-03 Thread Roger Pau Monné
On Mon, Feb 03, 2020 at 07:24:04AM +, Tian, Kevin wrote: > > From: Roger Pau Monné > > Sent: Thursday, January 23, 2020 8:32 PM > > > > On Tue, Jan 21, 2020 at 03:34:13AM +, Tian, Kevin wrote: > > > > From: Roger Pau Monné > > > > Sent: Monday, January 20, 2020 6:19 PM > > > > > > > > On

Re: [Xen-devel] [PATCH] docs/xl: fix typo in xl.cfg

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 11:31:12AM +0100, Roger Pau Monne wrote: > The name of the option is nographic. > > Signed-off-by: Roger Pau Monné Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailma

Re: [Xen-devel] [PATCH v3 2/9] xen: split parameter related definitions in own header file

2020-02-03 Thread Jan Beulich
On 21.01.2020 09:43, Juergen Gross wrote: > Move the parameter related definitions from init.h into a new header > file param.h. This will avoid include hell when new dependencies are > added to parameter definitions. > > Signed-off-by: Juergen Gross There was some re-basing necessary here, whic

Re: [Xen-devel] [XEN PATCH v2 10/12] xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS)

2020-02-03 Thread Anthony PERARD
On Thu, Jan 30, 2020 at 02:29:42PM +0100, Jan Beulich wrote: > On 17.01.2020 11:53, Anthony PERARD wrote: > > We would like to calculate CFLAGS once and before calling Rules.mk, > > so the variable CFLAGS needs to have the same value across the whole > > build. Thus we need a new variable where som

[Xen-devel] [PATCH v2 1/4] x86/vvmx: fix virtual interrupt injection when Ack on exit control is used

2020-02-03 Thread Roger Pau Monne
When doing a virtual vmexit (ie: a vmexit handled by the L1 VMM) interrupts shouldn't be injected using the virtual interrupt delivery mechanism unless the Ack on exit vmexit control bit isn't set in the nested vmcs. Gate the call to nvmx_update_apicv helper on whether the nested vmcs has the Ack

[Xen-devel] [PATCH v2 3/4] x86/vvmx: don't enable interrupt window when using virt intr delivery

2020-02-03 Thread Roger Pau Monne
If virtual interrupt delivery is used to inject the interrupt to the guest the interrupt window shouldn't be enabled, as the interrupt is already injected using the GUEST_INTR_STATUS vmcs field. Reported-by: Kevin Tian Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version.

[Xen-devel] [PATCH v2 2/4] x86/vvmx: fix VM_EXIT_ACK_INTR_ON_EXIT handling

2020-02-03 Thread Roger Pau Monne
When VM_EXIT_ACK_INTR_ON_EXIT is set in the vmexit control vmcs register the bit 31 of VM_EXIT_INTR_INFO must be 0, in order to denote that the field doesn't contain any interrupt information. This is not currently acknowledged as the field always get filled with valid interrupt information, regard

[Xen-devel] [PATCH v2 4/4] Revert "tools/libxc: disable x2APIC when using nested virtualization"

2020-02-03 Thread Roger Pau Monne
This reverts commit 7b3c5b70a32303b46d0d051e695f18d72cce5ed0 and re-enables the usage of x2APIC with nested virtualization. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- tools/libxc/xc_cpuid_x86.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c

[Xen-devel] [PATCH v2 0/4] x86/vvmx: fixes to interrupt injection

2020-02-03 Thread Roger Pau Monne
Hello, The following series contain fixes for nested interrupt injection. Thanks, Roger. Roger Pau Monne (4): x86/vvmx: fix virtual interrupt injection when Ack on exit control is used x86/vvmx: fix VM_EXIT_ACK_INTR_ON_EXIT handling x86/vvmx: don't enable interrupt window when using vi

Re: [Xen-devel] [XEN PATCH v2 09/12] xen/build: include include/config/auto.conf in main Makefile

2020-02-03 Thread Jan Beulich
On 03.02.2020 12:45, Anthony PERARD wrote: > On Thu, Jan 30, 2020 at 02:06:18PM +0100, Jan Beulich wrote: >> On 17.01.2020 11:53, Anthony PERARD wrote: >>> --- a/xen/Makefile >>> +++ b/xen/Makefile >>> @@ -49,7 +49,71 @@ default: build >>> .PHONY: dist >>> dist: install >>> >>> -build install::

Re: [Xen-devel] Xen-unstable: pci-passthrough regression bisected to: x86/smp: use APIC ALLBUT destination shorthand when possible

2020-02-03 Thread Roger Pau Monné
On Mon, Feb 03, 2020 at 09:33:51AM +0100, Sander Eikelenboom wrote: > Hi Roger, > > Last week I encountered an issue with the PCI-passthrough of a USB > controller. > In the guest I get: > [ 1143.313756] xhci_hcd :00:05.0: xHCI host not responding to stop > endpoint command. > [ 114

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 11:41:57AM +, Durrant, Paul wrote: > > -Original Message- > > From: Jan Beulich > > Sent: 03 February 2020 11:39 > > To: Durrant, Paul > > Cc: Wei Liu ; Xen Development List > de...@lists.xenproject.org>; Michael Kelley ; Wei > > Liu ; Andrew Cooper ; > > Roge

Re: [Xen-devel] Xen-unstable: pci-passthrough regression bisected to: x86/smp: use APIC ALLBUT destination shorthand when possible

2020-02-03 Thread Sander Eikelenboom
On 03/02/2020 13:23, Roger Pau Monné wrote: > On Mon, Feb 03, 2020 at 09:33:51AM +0100, Sander Eikelenboom wrote: >> Hi Roger, >> >> Last week I encountered an issue with the PCI-passthrough of a USB >> controller. >> In the guest I get: >> [ 1143.313756] xhci_hcd :00:05.0: xHCI host not

Re: [Xen-devel] [XEN PATCH v2 10/12] xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS)

2020-02-03 Thread Jan Beulich
On 03.02.2020 13:17, Anthony PERARD wrote: > On Thu, Jan 30, 2020 at 02:29:42PM +0100, Jan Beulich wrote: >> On 17.01.2020 11:53, Anthony PERARD wrote: >>> We would like to calculate CFLAGS once and before calling Rules.mk, >>> so the variable CFLAGS needs to have the same value across the whole >>

Re: [Xen-devel] Xen-unstable: pci-passthrough regression bisected to: x86/smp: use APIC ALLBUT destination shorthand when possible

2020-02-03 Thread Roger Pau Monné
On Mon, Feb 03, 2020 at 01:30:55PM +0100, Sander Eikelenboom wrote: > On 03/02/2020 13:23, Roger Pau Monné wrote: > > On Mon, Feb 03, 2020 at 09:33:51AM +0100, Sander Eikelenboom wrote: > >> Hi Roger, > >> > >> Last week I encountered an issue with the PCI-passthrough of a USB > >> controller. >

Re: [Xen-devel] Xen-unstable: pci-passthrough regression bisected to: x86/smp: use APIC ALLBUT destination shorthand when possible

2020-02-03 Thread Sander Eikelenboom
On 03/02/2020 13:41, Roger Pau Monné wrote: > On Mon, Feb 03, 2020 at 01:30:55PM +0100, Sander Eikelenboom wrote: >> On 03/02/2020 13:23, Roger Pau Monné wrote: >>> On Mon, Feb 03, 2020 at 09:33:51AM +0100, Sander Eikelenboom wrote: Hi Roger, Last week I encountered an issue with the

Re: [Xen-devel] Xen-unstable: pci-passthrough regression bisected to: x86/smp: use APIC ALLBUT destination shorthand when possible

2020-02-03 Thread Jan Beulich
On 03.02.2020 13:41, Roger Pau Monné wrote: > On Mon, Feb 03, 2020 at 01:30:55PM +0100, Sander Eikelenboom wrote: >> On 03/02/2020 13:23, Roger Pau Monné wrote: >>> On Mon, Feb 03, 2020 at 09:33:51AM +0100, Sander Eikelenboom wrote: Hi Roger, Last week I encountered an issue with the

Re: [Xen-devel] [PATCH v6 01/11] x86/hypervisor: make hypervisor_ap_setup return an error code

2020-02-03 Thread Jan Beulich
On 31.01.2020 18:49, Wei Liu wrote: > We want to be able to handle AP setup error in the upper layer. > > Signed-off-by: Wei Liu > --- > v6: > 1. Change map_vcpuinfo as well And by implication then ... > @@ -257,11 +257,17 @@ static void __init setup(void) > init_evtchn(); > } > > -stat

Re: [Xen-devel] [PATCH v6 03/11] x86: provide executable fixmap facility

2020-02-03 Thread Jan Beulich
On 31.01.2020 18:49, Wei Liu wrote: > --- a/xen/arch/x86/xen.lds.S > +++ b/xen/arch/x86/xen.lds.S > @@ -2,6 +2,8 @@ > /* Modified for i386/x86-64 Xen by Keir Fraser */ > > #include > + > +#include I don't think you need this anymore? If so, with this dropped Reviewed-by: Jan Beulich Otherwi

Re: [Xen-devel] [PATCH v6 04/11] x86/hypervisor: provide hypervisor_fixup_e820

2020-02-03 Thread Jan Beulich
On 31.01.2020 18:49, Wei Liu wrote: > And implement the hook for Xen guest. > > Signed-off-by: Wei Liu Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Xen-unstable: pci-passthrough regression bisected to: x86/smp: use APIC ALLBUT destination shorthand when possible

2020-02-03 Thread Roger Pau Monné
On Mon, Feb 03, 2020 at 01:44:06PM +0100, Sander Eikelenboom wrote: > On 03/02/2020 13:41, Roger Pau Monné wrote: > > On Mon, Feb 03, 2020 at 01:30:55PM +0100, Sander Eikelenboom wrote: > >> On 03/02/2020 13:23, Roger Pau Monné wrote: > >>> On Mon, Feb 03, 2020 at 09:33:51AM +0100, Sander Eikelenbo

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Jan Beulich
On 31.01.2020 18:49, Wei Liu wrote: > +static void __init setup_hypercall_page(void) > +{ > +union hv_x64_msr_hypercall_contents hypercall_msr; > +union hv_guest_os_id guest_id; > +unsigned long mfn; > + > +BUILD_BUG_ON(HV_HYP_PAGE_SHIFT != PAGE_SHIFT); > + > +rdmsrl(HV_X64_MSR_

Re: [Xen-devel] [PATCH v6 03/11] x86: provide executable fixmap facility

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 02:10:07PM +0100, Jan Beulich wrote: > On 31.01.2020 18:49, Wei Liu wrote: > > --- a/xen/arch/x86/xen.lds.S > > +++ b/xen/arch/x86/xen.lds.S > > @@ -2,6 +2,8 @@ > > /* Modified for i386/x86-64 Xen by Keir Fraser */ > > > > #include > > + > > +#include > > I don't thin

Re: [Xen-devel] [PATCH v6 06/11] x86/hyperv: provide Hyper-V hypercall functions

2020-02-03 Thread Jan Beulich
On 31.01.2020 18:49, Wei Liu wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -375,9 +375,11 @@ void __init arch_init_memory(void) > } > #endif > > -/* Generate a symbol to be used in linker script */ > +/* Generate symbols to be used in linker script */ > asm (

Re: [Xen-devel] [PATCH v6 06/11] x86/hyperv: provide Hyper-V hypercall functions

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 02:26:24PM +0100, Jan Beulich wrote: > On 31.01.2020 18:49, Wei Liu wrote: > > --- a/xen/arch/x86/mm.c > > +++ b/xen/arch/x86/mm.c > > @@ -375,9 +375,11 @@ void __init arch_init_memory(void) > > } > > #endif > > > > -/* Generate a symbol to be used in linker scri

[Xen-devel] [qemu-mainline test] 146696: regressions - FAIL

2020-02-03 Thread osstest service owner
flight 146696 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/146696/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 6 xen-buildfail REGR. vs. 144861 build-arm64-xsm

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 02:21:14PM +0100, Jan Beulich wrote: > On 31.01.2020 18:49, Wei Liu wrote: > > +static void __init setup_hypercall_page(void) > > +{ > > +union hv_x64_msr_hypercall_contents hypercall_msr; > > +union hv_guest_os_id guest_id; > > +unsigned long mfn; > > + > > +

Re: [Xen-devel] [PATCH v3 1/9] xen: add a generic way to include binary files as variables

2020-02-03 Thread Jan Beulich
On 21.01.2020 09:43, Juergen Gross wrote: > --- /dev/null > +++ b/xen/tools/binfile > @@ -0,0 +1,29 @@ > +#!/bin/sh > +# usage: binfile [-i] > +# -i add to .init.rodata (default: .rodata) section > + > +[ "$1" = "-i" ] && { > +shift > +section=".init" > +} > + > +target=$1 > +binsour

Re: [Xen-devel] [PATCH v6 06/11] x86/hyperv: provide Hyper-V hypercall functions

2020-02-03 Thread Jan Beulich
On 03.02.2020 14:31, Wei Liu wrote: > On Mon, Feb 03, 2020 at 02:26:24PM +0100, Jan Beulich wrote: >> On 31.01.2020 18:49, Wei Liu wrote: >>> --- a/xen/arch/x86/mm.c >>> +++ b/xen/arch/x86/mm.c >>> @@ -375,9 +375,11 @@ void __init arch_init_memory(void) >>> } >>> #endif >>> >>> -/* Gene

Re: [Xen-devel] [PATCH v6 06/11] x86/hyperv: provide Hyper-V hypercall functions

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 02:48:42PM +0100, Jan Beulich wrote: > On 03.02.2020 14:31, Wei Liu wrote: > > On Mon, Feb 03, 2020 at 02:26:24PM +0100, Jan Beulich wrote: > >> On 31.01.2020 18:49, Wei Liu wrote: > >>> --- a/xen/arch/x86/mm.c > >>> +++ b/xen/arch/x86/mm.c > >>> @@ -375,9 +375,11 @@ void __

Re: [Xen-devel] [XEN PATCH v2 12/12] xen/build: have the root Makefile generates the CFLAGS

2020-02-03 Thread Anthony PERARD
On Thu, Jan 30, 2020 at 03:33:15PM +0100, Jan Beulich wrote: > On 17.01.2020 11:53, Anthony PERARD wrote: > > 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

Re: [Xen-devel] [PATCH v6 01/11] x86/hypervisor: make hypervisor_ap_setup return an error code

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 01:56:48PM +0100, Jan Beulich wrote: > On 31.01.2020 18:49, Wei Liu wrote: > > We want to be able to handle AP setup error in the upper layer. > > > > Signed-off-by: Wei Liu > > --- > > v6: > > 1. Change map_vcpuinfo as well > > And by implication then ... > > > @@ -257,

Re: [Xen-devel] [PATCH 5/8] xen/vmap: allow vmap() to be called during early boot

2020-02-03 Thread Julien Grall
Hi David, On 01/02/2020 00:33, David Woodhouse wrote: From: David Woodhouse I am a bit concerned with this change, particularly the consequence this have for the page-tables. There is an assumption that intermediate page-tables allocated via the boot allocator will never be freed. On x86,

Re: [Xen-devel] [PATCH v3 1/9] xen: add a generic way to include binary files as variables

2020-02-03 Thread Jürgen Groß
On 03.02.20 14:39, Jan Beulich wrote: On 21.01.2020 09:43, Juergen Gross wrote: --- /dev/null +++ b/xen/tools/binfile @@ -0,0 +1,29 @@ +#!/bin/sh +# usage: binfile [-i] +# -i add to .init.rodata (default: .rodata) section + +[ "$1" = "-i" ] && { +shift +section=".init" +} + +targe

Re: [Xen-devel] [PATCH 6/8] x86/setup: move vm_init() before end_boot_allocator()

2020-02-03 Thread David Woodhouse
On Mon, 2020-02-03 at 11:10 +, Xia, Hongyan wrote: > Is there any problem to move vm_init() even earlier than this, like > right after init_frametable()? ACPI and NUMA functions need a couple of > things permanently mapped. You want it sooner than that, don't you? The code calls acpi_boot_tab

[Xen-devel] [ovmf test] 146694: regressions - FAIL

2020-02-03 Thread osstest service owner
flight 146694 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/146694/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 10 debian-hvm-install fail REGR. vs. 145767 test-amd64-amd64-xl-qemuu

Re: [Xen-devel] [XEN PATCH v2 11/12] xen/build: introduce ccflags-y and CFLAGS_$@

2020-02-03 Thread Anthony PERARD
On Thu, Jan 30, 2020 at 02:39:43PM +0100, Jan Beulich wrote: > On 17.01.2020 11:53, Anthony PERARD wrote: > I have to admit that I'm also a little puzzled by the naming, no > matter that it's taken from Linux. It doesn't really seem to fit > CFLAGS/AFLAGS and c_flags/a_flags. So I've look into the

Re: [Xen-devel] [PATCH v6 11/11] x86/hyperv: setup VP assist page

2020-02-03 Thread Roger Pau Monné
On Fri, Jan 31, 2020 at 05:49:30PM +, Wei Liu wrote: > VP assist page is rather important as we need to toggle some bits in it > for efficient nested virtualisation. > > Signed-off-by: Wei Liu Reviewed-by: Roger Pau Monné Thanks, Roger. ___ Xen-

Re: [Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests

2020-02-03 Thread Anthony PERARD
On Thu, Jan 30, 2020 at 12:37:17PM +0100, Jan Beulich wrote: > On 21.01.2020 14:59, Anthony PERARD wrote: > > The top-level makefile make uses of internal implementation detail of > > the xen build system. Avoid that by creating a new target > > "install-tests" in xen/Makefile, and by fixing the to

Re: [Xen-devel] [PATCH 8/8] x86/setup: lift dom0 creation out into create_dom0() function

2020-02-03 Thread Julien Grall
On 01/02/2020 00:33, David Woodhouse wrote: if ( xen_cpuidle ) xen_processor_pmbits |= XEN_PROCESSOR_PM_CX; +printk("%sNX (Execute Disable) protection %sactive\n", + cpu_has_nx ? XENLOG_INFO : XENLOG_WARNING "Warning: ", + cpu_has_nx ? "" : "not "); +

Re: [Xen-devel] [PATCH v6 04/11] x86/hypervisor: provide hypervisor_fixup_e820

2020-02-03 Thread Roger Pau Monné
On Fri, Jan 31, 2020 at 05:49:23PM +, Wei Liu wrote: > And implement the hook for Xen guest. > > Signed-off-by: Wei Liu > --- > xen/arch/x86/e820.c| 4 ++-- > xen/arch/x86/guest/hypervisor.c| 6 ++ > xen/arch/x86/guest/xen/xen.c | 7 +++ > xen/in

Re: [Xen-devel] [XEN PATCH v2.1 15/12] squash! xen/build: have the root Makefile generates the CFLAGS

2020-02-03 Thread Anthony PERARD
On Thu, Jan 30, 2020 at 02:32:13PM +0100, Jan Beulich wrote: > On 21.01.2020 14:59, Anthony PERARD wrote: > > The XEN_BUILD_EFI tests in arch/x86/Makefile was filtering out > > CFLAGS-y, but according to dd40177c1bc8 ("x86-64/EFI: add CFLAGS to > > check compile"), it was done to filter out -MF. XE

Re: [Xen-devel] [PATCH v6 04/11] x86/hypervisor: provide hypervisor_fixup_e820

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 03:32:01PM +0100, Roger Pau Monné wrote: [...] > > > > #else > > > > @@ -46,6 +51,7 @@ static inline const char *hypervisor_probe(void) { return > > NULL; } > > static inline void hypervisor_setup(void) { ASSERT_UNREACHABLE(); } > > static inline int hypervisor_ap_se

[Xen-devel] [PATCH 0/4] AMD/IOMMU: Cleanup

2020-02-03 Thread Andrew Cooper
Various bits of cleanup without any major functional change. The eventual plan is to purge the {get,set}_field_{from,in}_u32() helpers, which are responsible for very hard to follow code, and poor code generation. Andrew Cooper (4): AMD/IOMMU: Move headers to be local AMD/IOMMU: Delete iommu_

[Xen-devel] [PATCH 1/4] AMD/IOMMU: Move headers to be local

2020-02-03 Thread Andrew Cooper
We currently have amd-iommu-defs.h, amd-iommu-proto.h and amd-iommu.h, and no references outside of the AMD IOMMU driver. Keep iommu-defs.h as is, but merge amd-iommu.h and amd-iommu-proto.h to just iommu.h, and move them both into drivers/passthrough/amd/. (While merging, drop the bogus #pragma

[Xen-devel] [PATCH 3/4] AMD/IOMMU: Treat guest head/tail pointers as byte offsets

2020-02-03 Thread Andrew Cooper
The MMIO registers as already byte offsets. By masking out the reserved bits suitably in guest_iommu_mmio_write64(), we can use the values directly, instead of masking/shifting on every use. Store the buffer size, rather than the number of entries, to keep the same units for comparison purposes.

[Xen-devel] [PATCH 2/4] AMD/IOMMU: Delete iommu_{get, set, clear}_bit() helpers

2020-02-03 Thread Andrew Cooper
These are obfuscations around simple bit operations, and the compiler really can do a better job when it can see them normally: add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-181 (-181) Function old new delta guest_iommu_add_ppr_log

[Xen-devel] [PATCH 4/4] AMD/IOMMU: Treat head/tail pointers as byte offsets

2020-02-03 Thread Andrew Cooper
The MMIO registers as already byte offsets. Using them in this form removes the need to shift their values for use. It is also inefficient to store both entries and alloc_size (which differ by a fixed entry_size). Rename alloc_size to size, and drop entries entirely, which simplifies the allocat

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Roger Pau Monné
On Fri, Jan 31, 2020 at 05:49:24PM +, Wei Liu wrote: > Hyper-V uses a technique called overlay page for its hypercall page. It > will insert a backing page to the guest when the hypercall functionality > is enabled. That means we can use a page that is not backed by real > memory for hypercall

Re: [Xen-devel] [PATCH 8/8] x86/setup: lift dom0 creation out into create_dom0() function

2020-02-03 Thread David Woodhouse
On Mon, 2020-02-03 at 14:28 +, Julien Grall wrote: > The placement of printk shouldn't matter but the change feels a bit > out-of-context. Would you mind to explain it in the commit message? I didn't really intend to move the printk up; what I intended to do was move the setting of 'initrd' d

Re: [Xen-devel] [PATCH v4 2/7] x86/HVM: rename a variable in __hvm_copy()

2020-02-03 Thread Andrew Cooper
On 31/01/2020 16:42, Jan Beulich wrote: > This is to reflect its actual purpose. Also use in a 2nd place. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/

Re: [Xen-devel] [PATCH v4 3/7] x86/HVM: introduce "curr" into hvmemul_rep_{mov, sto}s()

2020-02-03 Thread Andrew Cooper
On 31/01/2020 16:43, Jan Beulich wrote: > There are a number of uses of "current" already, and more may appear > down the road. Latch into a local variable. > > At this occasion also drop stray casts from code getting touched anyway. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 04:01:54PM +0100, Roger Pau Monné wrote: > On Fri, Jan 31, 2020 at 05:49:24PM +, Wei Liu wrote: > > Hyper-V uses a technique called overlay page for its hypercall page. It > > will insert a backing page to the guest when the hypercall functionality > > is enabled. That m

Re: [Xen-devel] [PATCH v3 4/9] xen: add basic hypervisor filesystem support

2020-02-03 Thread Jan Beulich
On 21.01.2020 09:43, Juergen Gross wrote: > --- > xen/arch/arm/traps.c | 1 + > xen/arch/x86/hvm/hypercall.c | 1 + > xen/arch/x86/hypercall.c | 1 + > xen/arch/x86/pv/hypercall.c | 1 + > xen/common/Makefile | 1 + > xen/common/hypfs.c | 365 > ++

[Xen-devel] [xen-unstable bisection] complete test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm

2020-02-03 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm testid debian-hvm-install 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

Re: [Xen-devel] [PATCH v3 1/9] xen: add a generic way to include binary files as variables

2020-02-03 Thread Jan Beulich
On 03.02.2020 15:02, Jürgen Groß wrote: > On 03.02.20 14:39, Jan Beulich wrote: >> On 21.01.2020 09:43, Juergen Gross wrote: >>> --- /dev/null >>> +++ b/xen/tools/binfile >>> @@ -0,0 +1,29 @@ >>> +#!/bin/sh >>> +# usage: binfile [-i] >>> +# -i add to .init.rodata (default: .rodata) section >

Re: [Xen-devel] [XEN PATCH v2 11/12] xen/build: introduce ccflags-y and CFLAGS_$@

2020-02-03 Thread Jan Beulich
On 03.02.2020 15:23, Anthony PERARD wrote: > On Thu, Jan 30, 2020 at 02:39:43PM +0100, Jan Beulich wrote: >> On 17.01.2020 11:53, Anthony PERARD wrote: >> I have to admit that I'm also a little puzzled by the naming, no >> matter that it's taken from Linux. It doesn't really seem to fit >> CFLAGS/A

Re: [Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests

2020-02-03 Thread Jan Beulich
On 03.02.2020 15:29, Anthony PERARD wrote: > On Thu, Jan 30, 2020 at 12:37:17PM +0100, Jan Beulich wrote: >> On 21.01.2020 14:59, Anthony PERARD wrote: >>> The top-level makefile make uses of internal implementation detail of >>> the xen build system. Avoid that by creating a new target >>> "instal

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Roger Pau Monné
On Mon, Feb 03, 2020 at 03:07:24PM +, Wei Liu wrote: > On Mon, Feb 03, 2020 at 04:01:54PM +0100, Roger Pau Monné wrote: > > On Fri, Jan 31, 2020 at 05:49:24PM +, Wei Liu wrote: > > > Hyper-V uses a technique called overlay page for its hypercall page. It > > > will insert a backing page to

Re: [Xen-devel] [XEN PATCH v2 12/12] xen/build: have the root Makefile generates the CFLAGS

2020-02-03 Thread Jan Beulich
On 03.02.2020 14:57, Anthony PERARD wrote: > On Thu, Jan 30, 2020 at 03:33:15PM +0100, Jan Beulich wrote: >> On 17.01.2020 11:53, Anthony PERARD wrote: >>> +ifneq ($(CONFIG_CC_IS_CLANG),y) >>> +# Clang doesn't understand this command line argument, and doesn't appear >>> to >>> +# have an suitable

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Jan Beulich
On 03.02.2020 16:21, Roger Pau Monné wrote: > On Mon, Feb 03, 2020 at 03:07:24PM +, Wei Liu wrote: >> On Mon, Feb 03, 2020 at 04:01:54PM +0100, Roger Pau Monné wrote: >>> On Fri, Jan 31, 2020 at 05:49:24PM +, Wei Liu wrote: Hyper-V uses a technique called overlay page for its hypercall

Re: [Xen-devel] [PATCH 2/5] MdePkg: Allow PcdFSBClock to by Dynamic

2020-02-03 Thread Anthony PERARD
On Mon, Feb 03, 2020 at 01:34:55AM +, Gao, Liming wrote: > Anthony: > This change is OK to me. But if this PCD is configured as Dynamic, its > value will be got from PCD service. This operation will take some time and > cause the inaccurate time delay. Have you measured its impact? No, I h

Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page

2020-02-03 Thread Wei Liu
On Mon, Feb 03, 2020 at 04:32:52PM +0100, Jan Beulich wrote: > On 03.02.2020 16:21, Roger Pau Monné wrote: > > On Mon, Feb 03, 2020 at 03:07:24PM +, Wei Liu wrote: > >> On Mon, Feb 03, 2020 at 04:01:54PM +0100, Roger Pau Monné wrote: > >>> On Fri, Jan 31, 2020 at 05:49:24PM +, Wei Liu wrote

  1   2   >