Re: [Xen-devel] [PATCH v3 2/6] x86/msr: add VMX MSRs into struct msr_domain_policy

2017-10-18 Thread Sergey Dyasli
On Mon, 2017-10-16 at 15:01 +0100, Andrew Cooper wrote: > On 16/10/17 08:42, Sergey Dyasli wrote: > > + > > +secondary_available = > > +dp->vmx_procbased_ctls.u.allowed_1.activate_secondary_controls; > > + > > +switch (msr) > > +{ > > +case MSR_IA32_VMX_BASIC ... MSR_IA32_VM

[Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Roger Pau Monne
clang 5.0 changed the layout of the type_mismatch_data structure and introduced __ubsan_handle_type_mismatch_v1 and __ubsan_handle_pointer_overflow. This commit adds support for the new structure layout, adds the missing handlers and the new types for type_check_kinds. Signed-off-by: Roger Pau Mo

[Xen-devel] [PATCH v4 2/7] x86/msr: add VMX MSRs into struct msr_domain_policy

2017-10-18 Thread Sergey Dyasli
New definitions provide a convenient way of accessing contents of VMX MSRs. They are separated into 5 logical blocks: 1. vmx: [VMX_BASIC, VMX_VMCS_ENUM] 2. VMX_PROCBASED_CTLS2 3. VMX_EPT_VPID_CAP 4. vmx_true_ctls: [VMX_TRUE_PINBASED_CTLS, VMX_TRUE_ENTRY_CTLS] 5. VMX_VMFUNC Eve

[Xen-devel] [PATCH v4 3/7] x86/msr: read VMX MSRs values into Raw policy

2017-10-18 Thread Sergey Dyasli
Add calculate_raw_vmx_policy() which fills Raw policy with H/W values of VMX MSRs. Host policy will contain a copy of these values. Signed-off-by: Sergey Dyasli --- xen/arch/x86/msr.c | 33 + 1 file changed, 33 insertions(+) diff --git a/xen/arch/x86/msr.c b/xen/

[Xen-devel] [PATCH v4 0/7] VMX MSRs policy for Nested Virt: part 1

2017-10-18 Thread Sergey Dyasli
The end goal of having VMX MSRs policy is to be able to manage L1 VMX features. This patch series is the first part of this work. There is no functional change to what L1 sees in VMX MSRs at this point. But each domain will have a policy object which allows to sensibly query what VMX features the d

[Xen-devel] [PATCH v4 1/7] x86/msr: add Raw and Host domain policies

2017-10-18 Thread Sergey Dyasli
Raw policy contains the actual values from H/W MSRs. PLATFORM_INFO msr needs to be read again because probe_intel_cpuid_faulting() records the presence of X86_FEATURE_CPUID_FAULTING but not the presence of msr itself (if cpuid faulting is not available). Host policy might have certain features dis

[Xen-devel] [PATCH v4 4/7] x86/msr: add VMX MSRs into HVM_max domain policy

2017-10-18 Thread Sergey Dyasli
Currently, when nested virt is enabled, the set of L1 VMX features is fixed and calculated by nvmx_msr_read_intercept() as an intersection between the full set of Xen's supported L1 VMX features, the set of actual H/W features and, for MSR_IA32_VMX_EPT_VPID_CAP, the set of features that Xen uses.

[Xen-devel] [PATCH v4 5/7] x86/cpuid: update signature of hvm_cr4_guest_valid_bits()

2017-10-18 Thread Sergey Dyasli
With the new cpuid infrastructure there is a domain-wide struct cpuid policy and there is no need to pass a separate struct vcpu * into hvm_cr4_guest_valid_bits() anymore. Make the function accept struct domain * instead and update callers. Signed-off-by: Sergey Dyasli --- xen/arch/x86/hvm/domai

[Xen-devel] [PATCH v4 6/7] x86/msr: update domain policy on CPUID policy changes

2017-10-18 Thread Sergey Dyasli
Availability of some MSRs depends on certain CPUID bits. Add function recalculate_domain_msr_policy() which updates availability of per-domain MSRs based on current domain's CPUID policy. This function is called when CPUID policy is changed from a toolstack. Add recalculate_domain_vmx_msr_policy()

[Xen-devel] [PATCH v4 7/7] x86/msr: handle VMX MSRs with guest_rd/wrmsr()

2017-10-18 Thread Sergey Dyasli
Now that each domain has a correct view of VMX MSRs in it's per-domain MSR policy, it's possible to handle guest's RD/WRMSR with the new handlers. Do it and remove the old nvmx_msr_read_intercept() and associated bits. There is no functional change to what a guest sees in VMX MSRs. Signed-off-by:

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-18 Thread Roger Pau Monné
On Tue, Oct 17, 2017 at 08:16:47PM +0800, Haozhong Zhang wrote: > On 10/17/17 13:45 +0200, Paolo Bonzini wrote: > > On 14/10/2017 00:46, Stefano Stabellini wrote: > > > On Fri, 13 Oct 2017, Jan Beulich wrote: > > > On 13.10.17 at 13:13, wrote: > > >>> To Jan, Andrew, Stefano and Anthony, > > >

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-18 Thread Paolo Bonzini
On 18/10/2017 10:32, Roger Pau Monné wrote: >> I'll have a try to check how much the differences would affect. If it >> would not take too much work, I'd like to adapt Xen NVDIMM enabling >> patches to the all QEMU built ACPI. Otherwise, I'll fall back to Paolo >> and MST's suggestions. > I don't a

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-18 Thread Roger Pau Monné
On Wed, Oct 18, 2017 at 10:46:57AM +0200, Paolo Bonzini wrote: > On 18/10/2017 10:32, Roger Pau Monné wrote: > >> I'll have a try to check how much the differences would affect. If it > >> would not take too much work, I'd like to adapt Xen NVDIMM enabling > >> patches to the all QEMU built ACPI. O

Re: [Xen-devel] [PATCH] tools: libxendevicemodel: Restore symbol versions for 1.0

2017-10-18 Thread Ross Lagerwall
On 10/17/2017 06:05 PM, Ian Jackson wrote: In 1462f9ea8f4219d520a530787b80c986e050aa98 "tools: libxendevicemodel: Provide xendevicemodel_shutdown" we added a new version 1.1 to the symbol map and simply abolished the old one. That is quite wrong. Instead, we should have left the 1.0 map alone a

Re: [Xen-devel] [PATCH] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread George Dunlap
On 10/17/2017 07:05 PM, Andrew Cooper wrote: > On 17/10/17 18:10, George Dunlap wrote: >> Allowing pagetables to point to other pagetables of the same level >> (often called 'linear pagetables') has been included in Xen since its >> inception; but recently it has been the source of a number of subt

Re: [Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 09:45, wrote: > +void __ubsan_handle_pointer_overflow(struct pointer_overflow_data *data, > + unsigned long base, unsigned long result) > +{ > + unsigned long flags; > + > + if (suppress_report(&data->location)) > + return; > + > +

Re: [Xen-devel] [PATCH] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread Jan Beulich
>>> On 17.10.17 at 19:10, wrote: > --- a/docs/misc/xen-command-line.markdown > +++ b/docs/misc/xen-command-line.markdown > @@ -1422,6 +1422,22 @@ The following resources are available: > CDP, one COS will corespond two CBMs other than one with CAT, due to the > sum of CBMs is fixed, that

Re: [Xen-devel] [PATCH for-next] x86/VT-x: Don't rewrite HOST_TR_SELECTOR on every context switch

2017-10-18 Thread Jan Beulich
>>> On 17.10.17 at 19:16, wrote: > TSS_ENTRY is a compile time constant, so HOST_TR_SELECTOR can be set up during > VMCS construction and left alone thereafter, rather than rewriting it on every > context switch. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich

Re: [Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Roger Pau Monné
On Wed, Oct 18, 2017 at 03:23:20AM -0600, Jan Beulich wrote: > >>> On 18.10.17 at 09:45, wrote: > > +void __ubsan_handle_pointer_overflow(struct pointer_overflow_data *data, > > + unsigned long base, unsigned long result) > > +{ > > + unsigned long flags; > > + > > +

[Xen-devel] [linux-linus test] 114658: regressions - FAIL

2017-10-18 Thread osstest service owner
flight 114658 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/114658/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win7-amd64 15 guest-saverestore.2 fail REGR. vs. 114643 test-amd64-i386-

Re: [Xen-devel] [PATCH v2 1/2] x86/boot: fix early error display

2017-10-18 Thread Jan Beulich
>>> On 17.10.17 at 23:41, wrote: > From: David Esler > > In 9180f5365524 a change was made to the send_chr function to take in > C-strings and print out a character at a time until a NULL was > encountered. However there is no code to increment the current character > position resulting in an en

Re: [Xen-devel] [PATCH v2 2/2] x86/boot: rename send_chr to print_err

2017-10-18 Thread Jan Beulich
>>> On 17.10.17 at 23:41, wrote: > From: David Esler > > The send_chr function sends an entire C-string and not one character and > doesn't necessarily just send it over the serial UART anymore so rename > it to print_err so that its closer in name to what it does. > > Reviewed-by: Doug Goldste

Re: [Xen-devel] [PATCH] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread George Dunlap
On 10/18/2017 10:39 AM, Jan Beulich wrote: On 17.10.17 at 19:10, wrote: >> --- a/docs/misc/xen-command-line.markdown >> +++ b/docs/misc/xen-command-line.markdown >> @@ -1422,6 +1422,22 @@ The following resources are available: >> CDP, one COS will corespond two CBMs other than one with C

Re: [Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 11:42, wrote: > On Wed, Oct 18, 2017 at 03:23:20AM -0600, Jan Beulich wrote: >> >>> On 18.10.17 at 09:45, wrote: >> > +void __ubsan_handle_pointer_overflow(struct pointer_overflow_data *data, >> > + unsigned long base, unsigned long result) >> > +{ >> >

Re: [Xen-devel] [PATCH] tools: libxendevicemodel: Restore symbol versions for 1.0

2017-10-18 Thread Ian Jackson
Andrew Cooper writes ("Re: [Xen-devel] [PATCH] tools: libxendevicemodel: Restore symbol versions for 1.0"): > CC'ing Julien for a release ack, as this is a blocker (due to regressing > the xendevicemodel ABI from Xen 4.9) Julien told me that straightforward bugfixes, which this is (indeed, as the

Re: [Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Roger Pau Monné
On Wed, Oct 18, 2017 at 03:53:37AM -0600, Jan Beulich wrote: > >>> On 18.10.17 at 11:42, wrote: > > On Wed, Oct 18, 2017 at 03:23:20AM -0600, Jan Beulich wrote: > >> >>> On 18.10.17 at 09:45, wrote: > >> > +void __ubsan_handle_pointer_overflow(struct pointer_overflow_data *data, > >> > +

Re: [Xen-devel] [PATCH] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 11:52, wrote: > On 10/18/2017 10:39 AM, Jan Beulich wrote: > On 17.10.17 at 19:10, wrote: >>> --- a/xen/arch/x86/Kconfig >>> +++ b/xen/arch/x86/Kconfig >>> @@ -97,6 +97,27 @@ config TBOOT >>> Technology (TXT) >>> >>> If unsure, say Y. >>> + >>> +config PV_LINE

Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Jan Beulich
>>> On 17.10.17 at 18:46, wrote: > --- a/tools/console/daemon/io.c > +++ b/tools/console/daemon/io.c > @@ -658,12 +658,12 @@ static void console_unmap_interface(struct console *con) > { > if (con->interface == NULL) > return; > - if (xgt_handle && con->ring_ref == -1) > +

Re: [Xen-devel] [PATCH 26/27 v12] arm/xen: vpl011: Fix the slow early console SBSA UART output

2017-10-18 Thread Bhupinder Thakur
Hi Andre, On 17 October 2017 at 15:21, Andre Przywara wrote: > Hi Bhupinder, > > first thing: As the bulk of the series has been merged now, please > restart your patch and version numbering, so a (potential) next post > should be prefixed [PATCH v3 1/2]. And please have a cover letter giving > a

Re: [Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Wei Liu
On Wed, Oct 18, 2017 at 08:45:32AM +0100, Roger Pau Monne wrote: > clang 5.0 changed the layout of the type_mismatch_data structure and > introduced __ubsan_handle_type_mismatch_v1 and > __ubsan_handle_pointer_overflow. > > This commit adds support for the new structure layout, adds the > missing

Re: [Xen-devel] [PATCH] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread George Dunlap
On 10/18/2017 10:39 AM, Jan Beulich wrote: On 17.10.17 at 19:10, wrote: >> --- a/docs/misc/xen-command-line.markdown >> +++ b/docs/misc/xen-command-line.markdown >> @@ -1422,6 +1422,22 @@ The following resources are available: >> CDP, one COS will corespond two CBMs other than one with C

Re: [Xen-devel] [PATCH 27/27 v12] arm/xen: vpl011: Correct the logic for asserting/de-asserting SBSA UART TX interrupt

2017-10-18 Thread Andre Przywara
Hi, On 13/10/17 11:40, Bhupinder Thakur wrote: > This patch fixes the issue observed when pl011 patches were tested on > the junos hardware by Andre/Julien. It was observed that when large > output is generated such as on running 'find /', output was getting > truncated intermittently due to OUT r

Re: [Xen-devel] [PATCH 26/27 v12] arm/xen: vpl011: Fix the slow early console SBSA UART output

2017-10-18 Thread Andre Przywara
Hi, On 18/10/17 11:17, Bhupinder Thakur wrote: > Hi Andre, > > On 17 October 2017 at 15:21, Andre Przywara wrote: >> Hi Bhupinder, >> >> first thing: As the bulk of the series has been merged now, please >> restart your patch and version numbering, so a (potential) next post >> should be prefixe

Re: [Xen-devel] [PATCH for-4.10] string: fix memmove when size is 0

2017-10-18 Thread Roger Pau Monné
On Tue, Oct 17, 2017 at 07:00:25AM -0600, Jan Beulich wrote: > >>> On 17.10.17 at 14:52, wrote: > > On Tue, Oct 17, 2017 at 01:41:35PM +0100, Andrew Cooper wrote: > >> There are many passed values which could trigger this warning. Does > >> > >> diff --git a/xen/arch/x86/string.c b/xen/arch/x86/

Re: [Xen-devel] [PATCH 27/27 v12] arm/xen: vpl011: Correct the logic for asserting/de-asserting SBSA UART TX interrupt

2017-10-18 Thread Bhupinder Thakur
On 18 October 2017 at 15:56, Andre Przywara wrote: > Hi, > > On 13/10/17 11:40, Bhupinder Thakur wrote: >> This patch fixes the issue observed when pl011 patches were tested on >> the junos hardware by Andre/Julien. It was observed that when large >> output is generated such as on running 'find /'

[Xen-devel] [xen-unstable-coverity test] 114680: all pass - PUSHED

2017-10-18 Thread osstest service owner
flight 114680 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/114680/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen c4efa25058d3f45bf725d6ebe6429db9adf94b62 baseline version: xen 46aa

[Xen-devel] [PATCH v2 for-4.10] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread George Dunlap
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception; but recently it has been the source of a number of subtle reference-counting bugs. It is not used by Linux or MiniOS; but it used used by NetBSD and N

Re: [Xen-devel] [PATCH v2 1/2] x86/boot: fix early error display

2017-10-18 Thread Daniel Kiper
On Tue, Oct 17, 2017 at 04:41:37PM -0500, Doug Goldstein wrote: > From: David Esler > > In 9180f5365524 a change was made to the send_chr function to take in > C-strings and print out a character at a time until a NULL was > encountered. However there is no code to increment the current character

[Xen-devel] [xen-4.8-testing test] 114661: regressions - FAIL

2017-10-18 Thread osstest service owner
flight 114661 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114661/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-4 48 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 114538 test-amd64-i386

Re: [Xen-devel] [PATCH v2 2/2] x86/boot: rename send_chr to print_err

2017-10-18 Thread Daniel Kiper
On Tue, Oct 17, 2017 at 04:41:38PM -0500, Doug Goldstein wrote: > From: David Esler > > The send_chr function sends an entire C-string and not one character and > doesn't necessarily just send it over the serial UART anymore so rename > it to print_err so that its closer in name to what it does. >

Re: [Xen-devel] [PATCH v2 for-4.10] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread Wei Liu
On Wed, Oct 18, 2017 at 11:51:59AM +0100, George Dunlap wrote: > Allowing pagetables to point to other pagetables of the same level > (often called 'linear pagetables') has been included in Xen since its > inception; but recently it has been the source of a number of subtle > reference-counting bug

Re: [Xen-devel] [PATCH 3/3] x86/mm: Consolidate all Xen L4 slot writing into init_xen_l4_slots()

2017-10-18 Thread George Dunlap
On 10/12/2017 02:54 PM, Andrew Cooper wrote: > There are currently three functions which write L4 pagetables for Xen, but > they all behave subtly differently. sh_install_xen_entries_in_l4() in > particular is catering for two different usecases, which makes the safety of > the linear mappings har

Re: [Xen-devel] [PATCH 2/3] x86/mm: Consolidate all Xen L2 slot writing into init_xen_pae_l2_slots()

2017-10-18 Thread George Dunlap
On 10/12/2017 02:54 PM, Andrew Cooper wrote: > Having all of this logic together makes it easier to follow Xen's virtual > setup across the whole system. > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: George Dunlap > --- > CC: Jan Beulich > CC: Tim Deegan > CC: Geor

[Xen-devel] [PATCH v7 for-next 06/12] pci: split code to size BARs from pci_add_device

2017-10-18 Thread Roger Pau Monne
So that it can be called from outside in order to get the size of regular PCI BARs. This will be required in order to map the BARs from PCI devices into PVH Dom0 p2m. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich --- Changes since v6: - Remove the vf and addr local variables. - Change the

[Xen-devel] [PATCH v7 for-next 07/12] pci: add support to size ROM BARs to pci_size_mem_bar

2017-10-18 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Cc: Jan Beulich --- Changes since v6: - Remove the rom local variable. Changes since v5: - Use the flags field. - Introduce a mask local variable. - Simplify return. Changes since v4: - New in this version. --- xen/drivers/passt

[Xen-devel] [PATCH v7 for-next 02/12] pci: introduce a type to store a SBDF

2017-10-18 Thread Roger Pau Monne
That provides direct access to all the members that constitute a SBDF. The only function switched to use it is hvm_pci_decode_addr, because it makes following patches simpler. Suggested-by: Andrew Cooper Signed-off-by: Roger Pau Monné Reviewed-by: Paul Durrant --- Cc: Paul Durrant Cc: Jan Beul

[Xen-devel] [PATCH v7 for-next 04/12] x86/mmcfg: add handlers for the PVH Dom0 MMCFG areas

2017-10-18 Thread Roger Pau Monne
Introduce a set of handlers for the accesses to the MMCFG areas. Those areas are setup based on the contents of the hardware MMCFG tables, and the list of handled MMCFG areas is stored inside of the hvm_domain struct. The read/writes are forwarded to the generic vpci handlers once the address is d

[Xen-devel] [PATCH v7 for-next 03/12] vpci: introduce basic handlers to trap accesses to the PCI config space

2017-10-18 Thread Roger Pau Monne
This functionality is going to reside in vpci.c (and the corresponding vpci.h header), and should be arch-agnostic. The handlers introduced in this patch setup the basic functionality required in order to trap accesses to the PCI config space, and allow decoding the address and finding the correspo

[Xen-devel] [PATCH v7 for-next 01/12] x86/pio: allow internal PIO handlers to return RETRY

2017-10-18 Thread Roger Pau Monne
Fix handle_pio so internal PIO handlers can return X86EMUL_RETRY and it is properly handled by not advancing the IP. Signed-off-by: Roger Pau Monné --- Cc: Paul Durrant Cc: Jan Beulich Cc: Andrew Cooper --- Note this is not an issue currently because no internal handlers return RETRY. --- xen

[Xen-devel] [PATCH v7 for-next 12/12] vpci/msix: add MSI-X handlers

2017-10-18 Thread Roger Pau Monne
Add handlers for accesses to the MSI-X message control field on the PCI configuration space, and traps for accesses to the memory region that contains the MSI-X table and PBA. This traps detect attempts from the guest to configure MSI-X interrupts and properly sets them up. Note that accesses to t

[Xen-devel] [PATCH v7 for-next 05/12] x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0

2017-10-18 Thread Roger Pau Monne
So that MMCFG regions not present in the MCFG ACPI table can be added at run time by the hardware domain. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v6: - Do not return EEXIST if the same exact region is already tracked by Xen. Changes since v5:

[Xen-devel] [PATCH v7 for-next 10/12] vpci/msi: add MSI handlers

2017-10-18 Thread Roger Pau Monne
Add handlers for the MSI control, address, data and mask fields in order to detect accesses to them and setup the interrupts as requested by the guest. Note that the pending register is not trapped, and the guest can freely read/write to it. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc

[Xen-devel] [PATCH v7 for-next 09/12] vpci/bars: add handlers to map the BARs

2017-10-18 Thread Roger Pau Monne
Introduce a set of handlers that trap accesses to the PCI BARs and the command register, in order to snoop BAR sizing and BAR relocation. The command handler is used to detect changes to bit 2 (response to memory space accesses), and maps/unmaps the BARs of the device into the guest p2m. A rangese

[Xen-devel] [PATCH v7 for-next 11/12] vpci: add a priority parameter to the vPCI register initializer

2017-10-18 Thread Roger Pau Monne
This is needed for MSI-X, since MSI-X will need to be initialized before parsing the BARs, so that the header BAR handlers are aware of the MSI-X related holes and make sure they are not mapped in order for the trap handlers to work properly. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulic

[Xen-devel] [PATCH v7 for-next 08/12] xen: introduce rangeset_consume_ranges

2017-10-18 Thread Roger Pau Monne
This function allows to iterate over a rangeset while removing the processed regions. This will be used in order to split processing of large memory areas when mapping them into the guest p2m. Signed-off-by: Roger Pau Monné --- Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzes

[Xen-devel] [PATCH v7 for-next 00/12] vpci: PCI config space emulation

2017-10-18 Thread Roger Pau Monne
Hello, The following series contain an implementation of handlers for the PCI configuration space inside of Xen. This allows Xen to detect accesses to the PCI configuration space and react accordingly. Why is this needed? IMHO, there are two main points of doing all this emulation inside of Xen,

Re: [Xen-devel] libxc: Fix the data type of mfn parameter passed to xc_map_foreign_range()

2017-10-18 Thread Wei Liu
I appear to receive this series out of order. This one appears in my inbox later then "xenconsole: Change the type of ring_ref to xen_pfn_t in console_create_ring", which at a glance depends on this one. Please resend this series with proper numbering. On Tue, Oct 17, 2017 at 10:16:32PM +0530, B

Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Wei Liu
On Wed, Oct 18, 2017 at 04:02:45AM -0600, Jan Beulich wrote: > >>> On 17.10.17 at 18:46, wrote: > > --- a/tools/console/daemon/io.c > > +++ b/tools/console/daemon/io.c > > @@ -658,12 +658,12 @@ static void console_unmap_interface(struct console > > *con) > > { > > if (con->interface == NULL)

Re: [Xen-devel] [OSSTEST PATCH] MaxUmask: enforce a maximum umask value

2017-10-18 Thread Roger Pau Monné
On Tue, Oct 17, 2017 at 12:10:38PM +0100, Ian Jackson wrote: > On some operating systems, the default umask is not 002 as it should > be (for the sensible setup with personal groups). > > If a user with an 022 or 077 umask invokes osstest in Executive mode, > they end up creating directories in $c

[Xen-devel] Xen Security Advisory 235 (CVE-2017-15596) - add-to-physmap error paths fail to release lock on ARM

2017-10-18 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-15596 / XSA-235 version 2 add-to-physmap error paths fail to release lock on ARM UPDATES IN VERSION 2 CVE assigned. ISSUE DESCRIPTION ==

[Xen-devel] Xen Security Advisory 243 (CVE-2017-15592) - x86: Incorrect handling of self-linear shadow mappings with translated guests

2017-10-18 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-15592 / XSA-243 version 4 x86: Incorrect handling of self-linear shadow mappings with translated guests UPDATES IN VERSION 4 CVE assigned. ISSUE DESCRI

[Xen-devel] Xen Security Advisory 244 (CVE-2017-15594) - x86: Incorrect handling of IST settings during CPU hotplug

2017-10-18 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-15594 / XSA-244 version 3 x86: Incorrect handling of IST settings during CPU hotplug UPDATES IN VERSION 3 CVE assigned. ISSUE DESCRIPTION

[Xen-devel] Xen Security Advisory 237 (CVE-2017-15590) - multiple MSI mapping issues on x86

2017-10-18 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-15590 / XSA-237 version 3 multiple MSI mapping issues on x86 UPDATES IN VERSION 3 CVE assigned. ISSUE DESCRIPTION = M

[Xen-devel] Xen Security Advisory 242 (CVE-2017-15593) - page type reference leak on x86

2017-10-18 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-15593 / XSA-242 version 3 page type reference leak on x86 UPDATES IN VERSION 3 CVE assigned. ISSUE DESCRIPTION = Th

[Xen-devel] Xen Security Advisory 241 (CVE-2017-15588) - Stale TLB entry due to page type release race

2017-10-18 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-15588 / XSA-241 version 4 Stale TLB entry due to page type release race UPDATES IN VERSION 4 CVE assigned. ISSUE DESCRIPTION ==

[Xen-devel] Xen Security Advisory 239 (CVE-2017-15589) - hypervisor stack leak in x86 I/O intercept code

2017-10-18 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-15589 / XSA-239 version 3 hypervisor stack leak in x86 I/O intercept code UPDATES IN VERSION 3 CVE assigned. ISSUE DESCRIPTION =

[Xen-devel] [xen-unstable-smoke test] 114683: tolerable all pass - PUSHED

2017-10-18 Thread osstest service owner
flight 114683 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114683/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

[Xen-devel] [qemu-mainline bisection] complete build-i386

2017-10-18 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-i386 testid xen-build Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://git.qemu.org/qemu.git Tree: xen git://xenbits.xen.org/xen.git *** Found and reproduced problem changeset *** Bug is in tree: qemuu git://git.q

Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Julien Grall
Hi Wei, On 10/18/2017 12:53 PM, Wei Liu wrote: On Wed, Oct 18, 2017 at 04:02:45AM -0600, Jan Beulich wrote: On 17.10.17 at 18:46, wrote: --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -37,6 +37,8 @@ #error "Unsupported architecture" #endif +#define INVALID_XEN_PFN (~(

Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 15:05, wrote: > On 10/18/2017 12:53 PM, Wei Liu wrote: >> On Wed, Oct 18, 2017 at 04:02:45AM -0600, Jan Beulich wrote: >> On 17.10.17 at 18:46, wrote: --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -37,6 +37,8 @@ #error "Unsupported a

Re: [Xen-devel] [PATCH for-4.10] string: fix memmove when size is 0

2017-10-18 Thread Julien Grall
Hi Roger, On 10/18/2017 11:44 AM, Roger Pau Monné wrote: On Tue, Oct 17, 2017 at 07:00:25AM -0600, Jan Beulich wrote: On 17.10.17 at 14:52, wrote: On Tue, Oct 17, 2017 at 01:41:35PM +0100, Andrew Cooper wrote: There are many passed values which could trigger this warning. Does diff --git a

Re: [Xen-devel] [PATCH for-4.10] string: fix memmove when size is 0

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 12:44, wrote: > On Tue, Oct 17, 2017 at 07:00:25AM -0600, Jan Beulich wrote: >> >>> On 17.10.17 at 14:52, wrote: >> > On Tue, Oct 17, 2017 at 01:41:35PM +0100, Andrew Cooper wrote: >> >> There are many passed values which could trigger this warning. Does >> >> >> >> diff --gi

Re: [Xen-devel] [PATCH] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 12:22, wrote: > On 10/18/2017 10:39 AM, Jan Beulich wrote: > On 17.10.17 at 19:10, wrote: >>> @@ -2330,8 +2360,8 @@ static int _put_page_type(struct page_info *page, >>> bool preemptible, >>> * necessary anymore for a dying domain. >>> *

Re: [Xen-devel] [PATCH V3 1/29] Xen/doc: Add Xen virtual IOMMU doc

2017-10-18 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:42PM -0400, Lan Tianyu wrote: > This patch is to add Xen virtual IOMMU doc to introduce motivation, > framework, vIOMMU hypercall and xl configuration. > > Signed-off-by: Lan Tianyu > --- > docs/misc/viommu.txt | 136 > ++

Re: [Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Julien Grall
Hi Roger, On 10/18/2017 08:45 AM, Roger Pau Monne wrote: clang 5.0 changed the layout of the type_mismatch_data structure and introduced __ubsan_handle_type_mismatch_v1 and __ubsan_handle_pointer_overflow. This commit adds support for the new structure layout, adds the missing handlers and the

Re: [Xen-devel] [PATCH] arm: configure interrupts to be in non-secure group1

2017-10-18 Thread Julien Grall
Hi, On 10/17/2017 10:32 PM, Stefano Stabellini wrote: Xen uses non-secure group1 interrupts, however it doesn't configure the GICv3 accordingly. Xen needs to set GICD_IGROUPR for SPIs and GICR_IGROUPR0 for local interrupt to "1" to specify that interrupts belong to group1. This is particularly i

Re: [Xen-devel] [PATCH v2 for-4.10] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 12:51, wrote: > --- a/xen/arch/x86/Kconfig > +++ b/xen/arch/x86/Kconfig > @@ -37,6 +37,26 @@ source "arch/Kconfig" > config PV > def_bool y > > +config PV_LINEAR_PT > + bool "Support for PV linear pagetables" > + depends on PV > + default y > + -

[Xen-devel] [PATCH RFC] ARM: vPL011: use receive timeout interrupt

2017-10-18 Thread Andre Przywara
Instead of asserting the receive interrupt (RXI) on the first character in the FIFO, lets (ab)use the receive timeout interrupt (RTI) for that purpose. That seems to be closer to the spec and what hardware does. Improve the readability of vpl011_data_avail() on the way. Signed-off-by: Andre Przywa

[Xen-devel] [PATCH v2 for-4.10 1/2] tools/libs/evtchn: Add support for restricting a handle

2017-10-18 Thread Ross Lagerwall
Implement support for restricting evtchn handles to a particular domain on Linux by calling the IOCTL_EVTCHN_RESTRICT_DOMID ioctl (support added in Linux v4.8). Signed-off-by: Ross Lagerwall Acked-by: Ian Jackson Release-acked-by: Julien Grall --- No change since v1. tools/include/xen-sys/Lin

[Xen-devel] [PATCH v2 for-4.10 2/2] xentoolcore_restrict_all: Implement for libxenevtchn

2017-10-18 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- Changed in v2: * Keep warning about DoS and resource exhaustion being a possibility. (Note that v1 of this patch was incorrectly titled v2.) tools/Rules.mk| 2 +- tools/libs/evtchn/Makefile| 4 ++-- tools/libs/evtch

[Xen-devel] [PATCH] gcov: support gcc 7.x

2017-10-18 Thread Jan Beulich
Taking Linux commit 0538421343 ("gcov: support GCC 7.1") as reference, enable gcc 7 support requiring __gcov_exit() and having 9 counters. Signed-off-by: Jan Beulich --- Considering that gcc 7 has been out for a while, I think we shouldn't ship 4.10 with not even building gcov when using that com

Re: [Xen-devel] [PATCH] gcov: support gcc 7.x

2017-10-18 Thread Andrew Cooper
On 18/10/17 14:45, Jan Beulich wrote: > Taking Linux commit 0538421343 ("gcov: support GCC 7.1") as reference, > enable gcc 7 support requiring __gcov_exit() and having 9 counters. > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Like the UBSAN stuff, I think this is reasonable for inclus

[Xen-devel] [xen-4.7-testing test] 114662: regressions - FAIL

2017-10-18 Thread osstest service owner
flight 114662 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114662/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-4 48 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 114483 Tests which did

Re: [Xen-devel] [PATCH v2 for-4.10] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread George Dunlap
On 10/18/2017 02:41 PM, Jan Beulich wrote: On 18.10.17 at 12:51, wrote: >> --- a/xen/arch/x86/Kconfig >> +++ b/xen/arch/x86/Kconfig >> @@ -37,6 +37,26 @@ source "arch/Kconfig" >> config PV >> def_bool y >> >> +config PV_LINEAR_PT >> + bool "Support for PV linear pagetables" >> +

Re: [Xen-devel] [PATCH] gcov: support gcc 7.x

2017-10-18 Thread Wei Liu
On Wed, Oct 18, 2017 at 07:45:53AM -0600, Jan Beulich wrote: > Taking Linux commit 0538421343 ("gcov: support GCC 7.1") as reference, > enable gcc 7 support requiring __gcov_exit() and having 9 counters. > > Signed-off-by: Jan Beulich Acked-by: Wei Liu > --- > Considering that gcc 7 has been o

Re: [Xen-devel] [PATCH v2 for-4.10] x86/mm: Make PV linear pagetables optional

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 15:49, wrote: > On 10/18/2017 02:41 PM, Jan Beulich wrote: > On 18.10.17 at 12:51, wrote: >>> @@ -2334,6 +2368,9 @@ static int _put_page_type(struct page_info *page, >>> bool preemptible, >>> ASSERT(ptpg->linear_pt_count > 0); >>> ptpg = N

[Xen-devel] [PATCH v1 2/5] xen: Provide XEN_DMOP_add_to_physmap

2017-10-18 Thread Ross Lagerwall
Provide XEN_DMOP_add_to_physmap, a limited version of XENMEM_add_to_physmap to allow a deprivileged QEMU to move VRAM when a guest programs its BAR. It is equivalent to XENMEM_add_to_physmap with space == XENMAPSPACE_gmfn. Signed-off-by: Ross Lagerwall --- xen/arch/x86/hvm/dm.c | 17 +++

[Xen-devel] [PATCH v1 3/5] xen: Provide XEN_DMOP_pin_memory_cacheattr

2017-10-18 Thread Ross Lagerwall
Provide XEN_DMOP_pin_memory_cacheattr to allow a deprivileged QEMU to pin the caching type of RAM after moving the VRAM. It is equivalent to XEN_DOMCTL_pin_memory_cacheattr. Signed-off-by: Ross Lagerwall --- xen/arch/x86/hvm/dm.c | 12 xen/include/public/hvm/dm_op.h | 14 ++

[Xen-devel] [PATCH v1 5/5] tools: libxendevicemodel: Provide xendevicemodel_pin_memory_cacheattr

2017-10-18 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- tools/libs/devicemodel/core.c | 19 +++ tools/libs/devicemodel/include/xendevicemodel.h | 14 ++ tools/libs/devicemodel/libxendevicemodel.map| 1 + 3 files changed, 34 insertions(+) diff --git a/tools/libs/devic

[Xen-devel] [PATCH v1 4/5] tools: libxendevicemodel: Provide xendevicemodel_add_to_physmap

2017-10-18 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- tools/libs/devicemodel/Makefile | 2 +- tools/libs/devicemodel/core.c | 17 + tools/libs/devicemodel/include/xendevicemodel.h | 13 + tools/libs/devicemodel/libxendevicemodel.map| 5 + 4 file

[Xen-devel] [PATCH v1 1/5] xen/mm: Make xenmem_add_to_physmap global

2017-10-18 Thread Ross Lagerwall
Make it global in preparation to be called by a new dmop. Signed-off-by: Ross Lagerwall --- xen/common/memory.c | 5 ++--- xen/include/xen/mm.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index ad987e0..c4f05c7 100644 --- a/x

[Xen-devel] [PATCH v1 0/5] Add dmops to allow use of VGA with restricted QEMU

2017-10-18 Thread Ross Lagerwall
The recently added support for restricting QEMU prevents use of the VGA console. This series addresses that by adding a couple of new dmops. A corresponding patch for QEMU is needed to make use of the new dmops. Ross Lagerwall (5): xen/mm: Make xenmem_add_to_physmap public xen: Provide XEN_DMO

Re: [Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-10-18 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:43PM -0400, Lan Tianyu wrote: > This patch is to introduce an abstract layer for arch vIOMMU implementation > to deal with requests from dom0. Arch vIOMMU code needs to provide callback > to do create and destroy operation. > > Signed-off-by: Lan Tianyu > --- > docs

Re: [Xen-devel] [PATCH v8 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-18 Thread Jan Beulich
>>> On 16.10.17 at 05:04, wrote: > v7: > - add single trailing underscore for internal variabled in macro. > (suggested by Jan Beulich) > - add parentheses for input parameters of marcro. > (suggested by Jan Beulich) > - adjust the postion of macro. > (suggested by Ja

Re: [Xen-devel] [PATCH V3 3/29] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-10-18 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:44PM -0400, Lan Tianyu wrote: > This patch is to introduce create, destroy and query capabilities > command for vIOMMU. vIOMMU layer will deal with requests and call > arch vIOMMU ops. > > Signed-off-by: Lan Tianyu > --- > xen/common/domctl.c | 6 ++ >

Re: [Xen-devel] [PATCH] libxc: don't fail domain creation when unpacking initrd fails

2017-10-18 Thread Jan Beulich
>>> On 16.10.17 at 18:43, wrote: > Jan Beulich writes ("Re: [PATCH] libxc: don't fail domain creation when > unpacking initrd fails"): >> On 16.10.17 at 17:45, wrote: >> > Is there no way to tell that a kernel supports gzipped initrds by >> > looking at the kernel ? >> >> Well, Linux kernels ha

Re: [Xen-devel] [PATCH V3 4/29] tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structures

2017-10-18 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:45PM -0400, Lan Tianyu wrote: > From: Chao Gao > > Add dmar table structure according Chapter 8 "BIOS Considerations" of > VTd spec Rev. 2.4. > > VTd > spec:http://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/vt-directed-io-spec.pdf >

Re: [Xen-devel] [PATCH v8 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-18 Thread Wei Liu
On Wed, Oct 18, 2017 at 08:14:20AM -0600, Jan Beulich wrote: > >>> On 16.10.17 at 05:04, wrote: > > v7: > > - add single trailing underscore for internal variabled in macro. > > (suggested by Jan Beulich) > > - add parentheses for input parameters of marcro. > > (suggested by J

[Xen-devel] [xen-unstable-smoke test] 114696: tolerable all pass - PUSHED

2017-10-18 Thread osstest service owner
flight 114696 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114696/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-10-18 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:46PM -0400, Lan Tianyu wrote: > From: Chao Gao > > The BIOS reports the remapping hardware units in a platform to system software > through the DMA Remapping Reporting (DMAR) ACPI table. > New fields are introduces for DMAR table. These new fields are set by

  1   2   >