Re: [Xen-devel] [RFC PATCH 11/24] ARM: vGICv3: handle virtual LPI pending and property tables

2017-01-31 Thread Andre Przywara
Hi Julien, (forgot to hit the Send button yesterday ...) On 02/11/16 17:18, Julien Grall wrote: > Hi Andre, > > On 28/09/16 19:24, Andre Przywara wrote: >> Allow a guest to provide the address and size for the memory regions >> it has reserved for the GICv3 pending and property tables. >>

Re: [Xen-devel] [RFC PATCH 05/24] ARM: GICv3 ITS: introduce ITS command handling

2017-01-31 Thread Andre Przywara
Hi Julien, (forgot to hit the Send button yesterday ...) just going over the review comments again and found some leftovers. I fixed/addressed all comments of yours that I don't explicitly refer to here. ... On 02/11/16 15:05, Julien Grall wrote: > Hi Andre, > > On 28/09/16 19:24, Andre Przywa

Re: [Xen-devel] [RFC v1 5/6] xen/arm: zynqmp: Forward plaform specific firmware calls

2017-01-31 Thread Edgar E. Iglesias
On Mon, Jan 30, 2017 at 06:21:54PM +0100, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Forward platform specific firmware calls from the hardware > domain to firmware. > > Signed-off-by: Edgar E. Iglesias > --- > xen/arch/arm/platforms/xilinx-zynqmp.c | 63 > ++

Re: [Xen-devel] [PATCH RESEND v5 03/24] x86: refactor psr: implement main data structures.

2017-01-31 Thread Jan Beulich
>>> On 30.01.17 at 23:20, wrote: >> --- a/xen/arch/x86/psr.c >> +++ b/xen/arch/x86/psr.c >> @@ -17,12 +17,116 @@ >> #include >> #include >> #include >> +#include >> #include >> >> +/* >> + * Terminology: >> + * - CAT Cache Allocation Technology >> + * - CBM Capacity BitM

Re: [Xen-devel] [PATCH RESEND v5 04/24] x86: refactor psr: implement CPU init and free flow.

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 03:44, wrote: > On Thu, Jan 19, 2017 at 02:01:06PM +0800, Yi Sun wrote: >> @@ -127,6 +130,13 @@ struct feat_node { >> struct list_head list; >> }; >> >> +struct cpuid_leaf_regs { >> +unsigned int eax; >> +unsigned int ebx; >> +unsigned int ecx; >> +unsign

Re: [Xen-devel] [PATCH 1/2] x86/vmx: Introduce a bitfield structure for EPT_VIOLATION EXIT_QUALIFICATIONs

2017-01-31 Thread Jan Beulich
>>> On 30.01.17 at 17:54, wrote: > This results in rather more readable code. No functional change. > > All fields currently specified are included, but commented out as no support > for their use is present. I'd rather not see them be commented out: Why should the first user of them have to to

Re: [Xen-devel] [PATCH 2/2] x86/vmx: Drop ept_get_*() helpers

2017-01-31 Thread Jan Beulich
>>> On 30.01.17 at 17:54, wrote: > The ept_get_*() helpers are not used consistently, and are more verbose than > the code they wrap. Drop the wrappers and use the internal union names > consistently. > > While making these adjustments, drop the redundant ept_* prefix from mt, wl > and ad, and r

Re: [Xen-devel] [RFC PATCH 05/24] ARM: GICv3 ITS: introduce ITS command handling

2017-01-31 Thread Julien Grall
Hi Andre, On 31/01/2017 09:10, Andre Przywara wrote: On 02/11/16 15:05, Julien Grall wrote: On 28/09/16 19:24, Andre Przywara wrote: +} + +static uint64_t encode_rdbase(struct host_its *hw_its, int cpu, uint64_t reg) +{ +reg &= ~GENMASK(51, 16); + +if ( hw_its->pta ) +reg |= pe

Re: [Xen-devel] [PATCH] xen/p2m: Remove np2m-specific filter from generic p2m_flush_table

2017-01-31 Thread George Dunlap
On 30/01/17 17:07, Tamas K Lengyel wrote: > Hi George, > yeap, this solves old mem_access settings being triggered when I > recreate altp2m views. Thanks! > > On Mon, Jan 30, 2017 at 8:17 AM, George Dunlap > wrote: >> Commit 71bb7304e7a7a35ea6df4b0cedebc35028e4c159 added flushing of >> nested p2

Re: [Xen-devel] [PATCH 1/2] x86/mm: Plumb a error return through {paging, hap, shadow}_vcpu_init()

2017-01-31 Thread Jan Beulich
>>> On 30.01.17 at 18:26, wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -384,7 +384,8 @@ int vcpu_initialise(struct vcpu *v) > > if ( !is_idle_domain(d) ) > { > -paging_vcpu_init(v); > +if ( (rc = paging_vcpu_init(v)) ) > +return rc

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Jaggi, Manish
Hi Andre, > >From: Xen-devel on behalf of Andre Przywara > >Sent: Tuesday, January 31, 2017 12:01 AM >To: Stefano Stabellini; Julien Grall >Cc: xen-de...@lists.xenproject.org; Vijay Kilari >Subject: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the >ITS on physdev_op hypercal

Re: [Xen-devel] [PATCH 2/2] x86/shadow: Move shadow pagetable fields into struct shadow_vcpu

2017-01-31 Thread Jan Beulich
>>> On 30.01.17 at 18:26, wrote: > @@ -1680,7 +1688,7 @@ static mfn_t emulate_gva_to_mfn(struct vcpu *v, > unsigned long vaddr, > mfn = page_to_mfn(page); > ASSERT(mfn_valid(mfn)); > > -v->arch.paging.last_write_was_pt = !!sh_mfn_is_a_page_table(mfn); > +v->arch.paging.shadow.

Re: [Xen-devel] [RFC PATCH 11/24] ARM: vGICv3: handle virtual LPI pending and property tables

2017-01-31 Thread Julien Grall
On 31/01/2017 09:10, Andre Przywara wrote: Hi Julien, Hi Andre, On 02/11/16 17:18, Julien Grall wrote: On 28/09/16 19:24, Andre Przywara wrote: +return (reg & ~field_mask) | field; +} + +/* We want to avoid outer shareable. */ +static uint64_t vgic_sanitise_shareability(uint64_t field

Re: [Xen-devel] [PATCH 1/2] x86/vmx: Introduce a bitfield structure for EPT_VIOLATION EXIT_QUALIFICATIONs

2017-01-31 Thread Andrew Cooper
On 31/01/17 10:19, Jan Beulich wrote: On 30.01.17 at 17:54, wrote: >> This results in rather more readable code. No functional change. >> >> All fields currently specified are included, but commented out as no support >> for their use is present. > I'd rather not see them be commented out: W

Re: [Xen-devel] [PATCH] xen/p2m: Remove np2m-specific filter from generic p2m_flush_table

2017-01-31 Thread Jan Beulich
>>> On 30.01.17 at 16:17, wrote: > Commit 71bb7304e7a7a35ea6df4b0cedebc35028e4c159 added flushing of > nested p2m tables whenever the host p2m table changed. Unfortunately > in the process, it added a filter to the generic p2m_flush_table() > function so that the p2m would only be flushed if it w

Re: [Xen-devel] [PATCH RESEND v5 04/24] x86: refactor psr: implement CPU init and free flow.

2017-01-31 Thread Andrew Cooper
On 31/01/17 02:44, Konrad Rzeszutek Wilk wrote: > On Thu, Jan 19, 2017 at 02:01:06PM +0800, Yi Sun wrote: >> This patch implements the CPU init and free flow including L3 CAT >> initialization and feature list free. >> >> Signed-off-by: Yi Sun >> --- >> v5: >> - modify commit message beacuse o

Re: [Xen-devel] [PATCH 1/2] x86/vmx: Introduce a bitfield structure for EPT_VIOLATION EXIT_QUALIFICATIONs

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 11:39, wrote: > On 31/01/17 10:19, Jan Beulich wrote: > On 30.01.17 at 17:54, wrote: >>> This results in rather more readable code. No functional change. >>> >>> All fields currently specified are included, but commented out as no support >>> for their use is present. >> I

Re: [Xen-devel] [PATCH] acpi: Switch to dynamic mapping at SYS_STATE_boot

2017-01-31 Thread Jan Beulich
>>> On 30.01.17 at 19:26, wrote: > We can switch ACPI from using fixmap to dynamic mapping as soon as > the system enters SYS_STATE_boot. This will allow us, for example, > to map MADT on systems with large number of processors where the > table might not fit into NUM_FIXMAP_ACPI_PAGES (currently

[Xen-devel] [PATCH v2 08/12] x86emul: use CR definitions in x86-defns.h

2017-01-31 Thread Wei Liu
And remove the duplicates. No functional change. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/x86_emulate/x86_emulate.c | 45 -- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulat

[Xen-devel] [PATCH v2 00/12] fuzz: update x86emul fuzzer

2017-01-31 Thread Wei Liu
The first few patches refactor x86emul code so that more code can be shared between xen and userspace tools. I have run XTF suite (tests subject to availability on the testbox I use, and xsa-195 was skipped because qemu segfault -- a known issue) against this series, no issue is found. Wei. --- C

[Xen-devel] [PATCH v2 01/12] fuzz: don't buffer stdout in afl stubs

2017-01-31 Thread Wei Liu
... to avoid obscuring output. Signed-off-by: Wei Liu --- Cc: Ian Jackson Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap --- tools/fuzz/libelf/afl-libelf-fuzzer.c | 2 ++ tools/fuzz/x86_instruction_emulator/afl-x86-insn-emulator-fuzzer.c | 2 ++ 2 files chan

[Xen-devel] [PATCH v2 02/12] x86: extract macros to x86-defns.h

2017-01-31 Thread Wei Liu
... so that they can be used by userspace x86 instruction emulator test program and fuzzer as well. No functional change. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/include/asm-x86/processor.h | 97 +- xen/include/asm-x86/x86-defn

[Xen-devel] [PATCH v2 03/12] x86: extract vendor numeric id to x86-vendors.h

2017-01-31 Thread Wei Liu
They will be shared between xen and userspace programs. No functional change. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/include/asm-x86/processor.h | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/xen/include/asm-x86/processor.h b/xen/in

[Xen-devel] [PATCH v2 09/12] x86emul: use TRAP definitions in x86-defns.h

2017-01-31 Thread Wei Liu
And remove duplicates. No functional change. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/x86_emulate/x86_emulate.c | 305 +++-- 1 file changed, 142 insertions(+), 163 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.

[Xen-devel] [distros-debian-snapshot test] 68502: tolerable trouble: blocked/broken/fail/pass

2017-01-31 Thread Platform Team regression test user
flight 68502 distros-debian-snapshot real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/68502/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-amd64-weekly-netinst-pygrub 9 debian-di-install fail blocked in 68428 test-

[Xen-devel] [PATCH v2 05/12] x86emul: use eflags definitions in x86-defns.h

2017-01-31 Thread Wei Liu
Basically this patch does 's/EFLG_/X86_EFLAGS_/g' and with indentation fixed up. And remove the duplicates in x86_emualte.c. This in turn requires userspace test harness to include x86-defns.h. Also remove a few duplicates in userspace harness program. No functional change. Signed-off-by: Wei Li

[Xen-devel] [PATCH v2 06/12] x86emul: use msr definitions in msr-index.h

2017-01-31 Thread Wei Liu
Change the names used in code according to numeric values. Remove the now unused macros in x86_emualte.c and fix indentation. This in turns requires including msr-index.h and removing duplicates in userspace x86_emulate.c in userspace harness program. No functional change. Signed-off-by: Wei Liu

[Xen-devel] [PATCH v2 04/12] x86emul/test: use x86-vendors.h

2017-01-31 Thread Wei Liu
No functional change. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper --- tools/tests/x86_emulator/x86_emulate.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/tests/x86_emulator/x86_emulate.h b/tools/tests/x86_emulator/x86_emulate.h index 3a6bad

[Xen-devel] [PATCH v2 07/12] x86: add UMIP CR4 bit

2017-01-31 Thread Wei Liu
It will be used later to remove duplicates in x86emul. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/include/asm-x86/x86-defns.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/include/asm-x86/x86-defns.h b/xen/include/asm-x86/x86-defns.h index 762938f222..a53080

[Xen-devel] [PATCH v2 11/12] fuzz/x86emul: print out minimal input size

2017-01-31 Thread Wei Liu
... so that users can know how big the initial input should be. Signed-off-by: Wei Liu --- Cc: Ian Jackson Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap --- .../fuzz/x86_instruction_emulator/afl-x86-insn-emulator-fuzzer.c | 8 tools/fuzz/x86_instruction_emulator/x86-insn-emul

[Xen-devel] [PATCH v2 12/12] fuzz: update README.afl example

2017-01-31 Thread Wei Liu
Signed-off-by: Wei Liu --- Cc: Ian Jackson Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap --- tools/fuzz/README.afl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/fuzz/README.afl b/tools/fuzz/README.afl index 431b4a8cbf..68e0fa396f 100644 --- a/tools/fuzz/

[Xen-devel] [PATCH v2 10/12] fuzz/x86emul: update fuzzer

2017-01-31 Thread Wei Liu
Provide the fuzzer with more ops, and more sophisticated input structure. Based on a patch originally written by Andrew and George. Signed-off-by: Andrew Cooper Signed-off-by: George Dunlap Signed-off-by: Wei Liu --- Cc: Ian Jackson Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap v2:

[Xen-devel] [PATCH 4/4] x86/vvmx: correctly emulate VMREAD

2017-01-31 Thread Sergey Dyasli
There is an issue with the original __vmread() in nested vmx mode: emulation of a guest's VMREAD with invalid arguments leads to BUG(). Fix this by using __vmread_safe() and reporting any kind of VMfail back to the guest. A new safe versions of get_vvmcs() macro and related functions are introduc

[Xen-devel] [PATCH 2/4] x86/vmx: improve __vmread_safe()

2017-01-31 Thread Sergey Dyasli
The original function doesn't distinguish between Valid and Invalid VMfails. Improved function returns error code depending on the outcome: VMsucceed: 0 VMfailValid: VM Instruction Error Number VMfailInvalid: VMX_INSN_FAIL_INVALID (~0UL) Existing users of __vmread_safe() are up

[Xen-devel] [PATCH 3/4] x86/vvmx: correctly emulate VMWRITE

2017-01-31 Thread Sergey Dyasli
There is an issue with the original __vmwrite() in nested vmx mode: emulation of a guest's VMWRITE with invalid arguments leads to BUG(). Fix this by using __vmwrite_safe() and reporting any kind of VMfail back to the guest. Signed-off-by: Sergey Dyasli --- xen/arch/x86/hvm/vmx/vmcs.c|

[Xen-devel] [PATCH 1/4] x86/vmx: introduce __vmwrite_safe()

2017-01-31 Thread Sergey Dyasli
Any fail during the original __vmwrite() leads to BUG() which can be easily exploited from a guest in the nested vmx mode. The new function returns error code depending on the outcome: VMsucceed: 0 VMfailValid: VM Instruction Error Number VMfailInvalid: a new VMX_INSN_FAIL

[Xen-devel] [PATCH 0/4] x86/vvmx: correctly emulate VMREAD and VMWRITE

2017-01-31 Thread Sergey Dyasli
Currently, emulation of vmread and vmwrite for a guest leads to BUG() in cases when actual VMREAD or VMWRITE ends up in VMfail due to invalid arguments. The goal of this patch series is to prevent the BUG() from happening and report any kind of VMfail back to the guest, just like it would be done

Re: [Xen-devel] [PATCH v2 09/12] x86emul: use TRAP definitions in x86-defns.h

2017-01-31 Thread Andrew Cooper
On 31/01/17 11:08, Wei Liu wrote: > And remove duplicates. > > No functional change. > > Signed-off-by: Wei Liu > --- > Cc: Jan Beulich > Cc: Andrew Cooper > --- > xen/arch/x86/x86_emulate/x86_emulate.c | 305 > +++-- > 1 file changed, 142 insertions(+), 163 deletio

Re: [Xen-devel] [PATCH 1/2] x86/VMX: introduce vmx_find_guest_msr()

2017-01-31 Thread Jan Beulich
>>> On 25.01.17 at 18:26, wrote: > @@ -1283,19 +1284,36 @@ static int construct_vmcs(struct vcpu *v) > return 0; > } > > -int vmx_read_guest_msr(u32 msr, u64 *val) > +static int vmx_msr_entry_key_cmp(const void *key, const void *elt) > { > -struct vcpu *curr = current; > -unsigned

Re: [Xen-devel] [PATCH 1/2] x86/VMX: introduce vmx_find_guest_msr()

2017-01-31 Thread Andrew Cooper
On 31/01/17 11:29, Jan Beulich wrote: On 25.01.17 at 18:26, wrote: >> @@ -1369,6 +1410,9 @@ int vmx_add_msr(u32 msr, int type) >> msr_area_elem->data = 0; >> __vmwrite(VM_EXIT_MSR_STORE_COUNT, *msr_count); >> __vmwrite(VM_ENTRY_MSR_LOAD_COUNT, *msr_count); >> +

Re: [Xen-devel] [PATCH 2/2] x86/VMX: fix vmentry failure with TSX bits in LBR

2017-01-31 Thread Jan Beulich
>>> On 25.01.17 at 18:26, wrote: > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -2241,6 +2241,25 @@ static void pi_notification_interrupt(struct > cpu_user_regs *regs) > raise_softirq(VCPU_KICK_SOFTIRQ); > } > > +static bool __read_mostly vmx_lbr_tsx_fixup_need

Re: [Xen-devel] [PATCH 1/2] x86/VMX: introduce vmx_find_guest_msr()

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:49, wrote: > On 31/01/17 11:29, Jan Beulich wrote: > On 25.01.17 at 18:26, wrote: > >>> @@ -1369,6 +1410,9 @@ int vmx_add_msr(u32 msr, int type) >>> msr_area_elem->data = 0; >>> __vmwrite(VM_EXIT_MSR_STORE_COUNT, *msr_count); >>> __vmwrite(

Re: [Xen-devel] [RFC PATCH 11/24] ARM: vGICv3: handle virtual LPI pending and property tables

2017-01-31 Thread Andre Przywara
Hi, On 31/01/17 10:38, Julien Grall wrote: > > > On 31/01/2017 09:10, Andre Przywara wrote: >> Hi Julien, > > Hi Andre, > >> On 02/11/16 17:18, Julien Grall wrote: >>> On 28/09/16 19:24, Andre Przywara wrote: +return (reg & ~field_mask) | field; +} + +/* We want to avoi

Re: [Xen-devel] [PATCH 1/2] x86/VMX: introduce vmx_find_guest_msr()

2017-01-31 Thread Andrew Cooper
On 31/01/17 11:54, Jan Beulich wrote: On 31.01.17 at 12:49, wrote: >> On 31/01/17 11:29, Jan Beulich wrote: >> On 25.01.17 at 18:26, wrote: >> @@ -1369,6 +1410,9 @@ int vmx_add_msr(u32 msr, int type) msr_area_elem->data = 0; __vmwrite(VM_EXIT_MSR_STOR

Re: [Xen-devel] Bug#853710: xen: ftbfs with GCC-7

2017-01-31 Thread Ian Jackson
Matthias Klose of the Debian Project reports that the Xen package in Debian stretch, which is based on a snapshot of xen.git#stable-4.8, does not build with GCC-7. Matthias Klose writes ("Bug#853710: xen: ftbfs with GCC-7"): > The package fails to build in a test rebuild on at least amd64 with > g

Re: [Xen-devel] [PATCH v13 4/9] x86: add multiboot2 protocol support for EFI platforms

2017-01-31 Thread Jan Beulich
>>> On 25.01.17 at 23:49, wrote: > On Wed, Jan 25, 2017 at 04:20:30PM -0600, Doug Goldstein wrote: >> This is a huge change and would really be helpful to have the diff of >> what's changed to work from. > > Please look below... Thanks for providing this - I'll comment this rather than the full

Re: [Xen-devel] Bug#853710: xen: ftbfs with GCC-7

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 13:09, wrote: > Matthias Klose of the Debian Project reports that the Xen package in > Debian stretch, which is based on a snapshot of xen.git#stable-4.8, > does not build with GCC-7. > > Matthias Klose writes ("Bug#853710: xen: ftbfs with GCC-7"): >> The package fails to build

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Julien Grall
On 31/01/17 10:29, Jaggi, Manish wrote: From: Xen-devel on behalf of Andre Przywara Sent: Tuesday, January 31, 2017 12:01 AM To: Stefano Stabellini; Julien Grall Cc: xen-de...@lists.xenproject.org; Vijay Kilari Subject: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the I

Re: [Xen-devel] [PATCH 1/2] x86/VMX: introduce vmx_find_guest_msr()

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 13:06, wrote: > On 31/01/17 11:54, Jan Beulich wrote: > On 31.01.17 at 12:49, wrote: >>> On 31/01/17 11:29, Jan Beulich wrote: >>> On 25.01.17 at 18:26, wrote: >>> > @@ -1369,6 +1410,9 @@ int vmx_add_msr(u32 msr, int type) > msr_area_elem->data = 0

Re: [Xen-devel] [PATCH v2 01/12] fuzz: don't buffer stdout in afl stubs

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:07, wrote: > ... to avoid obscuring output. > > Signed-off-by: Wei Liu Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 02/12] x86: extract macros to x86-defns.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:07, wrote: > +/* > + * Trap/fault mnemonics. > + */ > +#define TRAP_divide_error 0 > +#define TRAP_debug 1 > +#define TRAP_nmi 2 > +#define TRAP_int3 3 > +#define TRAP_overflow 4 > +#define TRAP_bounds5 > +#defi

Re: [Xen-devel] [PATCH v2 03/12] x86: extract vendor numeric id to x86-vendors.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > They will be shared between xen and userspace programs. Please clarify here that this is not strictly necessary, but rather just a convenience / reduction of overall code size. Otherwise someone looking back in a couple of years may wonder where the hidden depen

Re: [Xen-devel] [PATCH v2 04/12] x86emul/test: use x86-vendors.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > --- a/tools/tests/x86_emulator/x86_emulate.h > +++ b/tools/tests/x86_emulator/x86_emulate.h > @@ -6,6 +6,8 @@ > #include > #include > > +#include "../../../xen/include/asm-x86/x86-vendors.h" I think we'd better avoid includes of this style. May I suggest s

Re: [Xen-devel] [PATCH v2 05/12] x86emul: use eflags definitions in x86-defns.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > @@ -5016,20 +5004,20 @@ x86_emulate( > > /* > * SYSCALL (unlike most instructions) evaluates its singlestep action > - * based on the resulting EFLG_TF, not the starting EFLG_TF. > + * based on the resulting X86_EFLAGS_TF, not

Re: [Xen-devel] [PATCH v2 06/12] x86emul: use msr definitions in msr-index.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > Change the names used in code according to numeric values. Remove the > now unused macros in x86_emualte.c and fix indentation. This in turns > requires including msr-index.h and removing duplicates in userspace > x86_emulate.c in userspace harness program. > >

Re: [Xen-devel] [PATCH v2 07/12] x86: add UMIP CR4 bit

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > It will be used later to remove duplicates in x86emul. > > Signed-off-by: Wei Liu Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Jaggi, Manish
Hi Julien, On 1/31/2017 6:13 PM, Julien Grall wrote: > > > On 31/01/17 10:29, Jaggi, Manish wrote: >>> >>> From: Xen-devel on behalf of Andre >>> Przywara >>> Sent: Tuesday, January 31, 2017 12:01 AM >>> To: Stefano Stabellini; Julien Grall >>> Cc: xen-de...@lists.xenproject.org; Vijay Kilari

Re: [Xen-devel] [PATCH v2 08/12] x86emul: use CR definitions in x86-defns.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > And remove the duplicates. > > No functional change. > > Signed-off-by: Wei Liu Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [XTF RFC PATCH] build: pass -no-pie to LDFLAGS

2017-01-31 Thread Wei Liu
Starting from ee3e265688, $(CC) is used for linking. That means all default $(CC) flags coming from distro takes effect. On Debian Stretch, gcc contains -pie by default, which makes the final object fail to link. We need to explicitly disable pie when linking. Example error message: /usr/bin/ld:

Re: [Xen-devel] [XTF RFC PATCH] build: pass -no-pie to LDFLAGS

2017-01-31 Thread Wei Liu
On Tue, Jan 31, 2017 at 01:22:42PM +, Wei Liu wrote: > Starting from ee3e265688, $(CC) is used for linking. That means all > default $(CC) flags coming from distro takes effect. > > On Debian Stretch, gcc contains -pie by default, which makes the final > object fail to link. We need to explici

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Jaggi, Manish
Hi Julien, On 1/31/2017 6:13 PM, Julien Grall wrote: > > > On 31/01/17 10:29, Jaggi, Manish wrote: >>> >>> From: Xen-devel on behalf of Andre >>> Przywara >>> Sent: Tuesday, January 31, 2017 12:01 AM >>> To: Stefano Stabellini; Julien Grall >>> Cc: xen-de...@lists.xenproject.org; Vijay Kilari

Re: [Xen-devel] [PATCH v2 02/12] x86: extract macros to x86-defns.h

2017-01-31 Thread Wei Liu
On Tue, Jan 31, 2017 at 05:45:59AM -0700, Jan Beulich wrote: > >>> On 31.01.17 at 12:07, wrote: > > +/* > > + * Trap/fault mnemonics. > > + */ > > +#define TRAP_divide_error 0 > > +#define TRAP_debug 1 > > +#define TRAP_nmi 2 > > +#define TRAP_int3 3 > >

Re: [Xen-devel] [PATCH v2 10/12] fuzz/x86emul: update fuzzer

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > @@ -16,26 +17,79 @@ > > #include "x86_emulate.h" > > -static unsigned char data[4096]; > +#include "../../../xen/include/asm-x86/msr-index.h" > + > +#define MSR_INDEX_MAX 16 > + > +#define SEG_NUM x86_seg_none > + > +struct input_struct { > +unsigned lon

Re: [Xen-devel] [early RFC] ARM PCI Passthrough design document

2017-01-31 Thread Julien Grall
On 30/01/17 07:41, Manish Jaggi wrote: Hello Julien, On 01/25/2017 08:55 PM, Julien Grall wrote: Hello Manish, On 25/01/17 04:37, Manish Jaggi wrote: On 01/24/2017 11:13 PM, Julien Grall wrote: On 19/01/17 05:09, Manish Jaggi wrote: I think, PCI passthrough and DOM0 w/ACPI enumerating d

Re: [Xen-devel] [PATCH v2 11/12] fuzz/x86emul: print out minimal input size

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > ... so that users can know how big the initial input should be. > > Signed-off-by: Wei Liu Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 12/12] fuzz: update README.afl example

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 12:08, wrote: > Signed-off-by: Wei Liu Acked-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v1 0/7] Make building xSplice patches easier

2017-01-31 Thread Ross Lagerwall
On 01/31/2017 03:05 AM, Doug Goldstein wrote: On 5/6/16 10:48 AM, Ross Lagerwall wrote: Here is a set of changes to make building xSplice patches easier. Tested to boot on x86. Compile-tested on arm. This is probably too late to make it into 4.7, but hey, if someone wants to put it in I've CC'd

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Julien Grall
On 31/01/17 13:19, Jaggi, Manish wrote: On 1/31/2017 6:13 PM, Julien Grall wrote: On 31/01/17 10:29, Jaggi, Manish wrote: From: Xen-devel on behalf of Andre Przywara Sent: Tuesday, January 31, 2017 12:01 AM To: Stefano Stabellini; Julien Grall Cc: xen-de...@lists.xenproject.org; Vijay Kilari

[Xen-devel] [xen-unstable test] 105080: regressions - FAIL

2017-01-31 Thread osstest service owner
flight 105080 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/105080/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-debianhvm-amd64 9 debian-hvm-install fail REGR. vs. 104681 test-amd64-i

Re: [Xen-devel] Xen 4.9 Development Update

2017-01-31 Thread Oleksandr Andrushchenko
On 01/30/2017 05:33 PM, Julien Grall wrote: This email only tracks big items for xen.git tree. Please reply for items you woulk like to see in 4.9 so that people have an idea what is going on and prioritise accordingly. == PV Drivers == * Xen transport for 9pfs - Stefano Stabellini * PV

Re: [Xen-devel] [XTF RFC PATCH] build: pass -no-pie to LDFLAGS

2017-01-31 Thread Andrew Cooper
On 31/01/17 13:40, Jan Beulich wrote: On 31.01.17 at 14:22, wrote: >> Starting from ee3e265688, $(CC) is used for linking. That means all >> default $(CC) flags coming from distro takes effect. > First of all I think $(CC) containing any flags is wrong - that's what > $(CFLAGS) is for. Or are

Re: [Xen-devel] [XTF RFC PATCH] build: pass -no-pie to LDFLAGS

2017-01-31 Thread Wei Liu
On Tue, Jan 31, 2017 at 06:40:43AM -0700, Jan Beulich wrote: > >>> On 31.01.17 at 14:22, wrote: > > Starting from ee3e265688, $(CC) is used for linking. That means all > > default $(CC) flags coming from distro takes effect. > > First of all I think $(CC) containing any flags is wrong - that's wh

Re: [Xen-devel] [PATCH] xen/p2m: Remove np2m-specific filter from generic p2m_flush_table

2017-01-31 Thread George Dunlap
On 31/01/17 10:44, Jan Beulich wrote: On 30.01.17 at 16:17, wrote: >> Commit 71bb7304e7a7a35ea6df4b0cedebc35028e4c159 added flushing of >> nested p2m tables whenever the host p2m table changed. Unfortunately >> in the process, it added a filter to the generic p2m_flush_table() >> function so

Re: [Xen-devel] [XTF RFC PATCH] build: pass -no-pie to LDFLAGS

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 14:22, wrote: > Starting from ee3e265688, $(CC) is used for linking. That means all > default $(CC) flags coming from distro takes effect. First of all I think $(CC) containing any flags is wrong - that's what $(CFLAGS) is for. Or are you saying the compiler's built in default

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Jaggi, Manish
Hi Julien, On 1/31/2017 7:16 PM, Julien Grall wrote: > On 31/01/17 13:19, Jaggi, Manish wrote: >> On 1/31/2017 6:13 PM, Julien Grall wrote: >>> On 31/01/17 10:29, Jaggi, Manish wrote: > > From: Xen-devel on behalf of Andre > Przywara > Sent: Tuesday, January 31, 2017 12:01 AM >>

Re: [Xen-devel] [PATCH RESEND v5 04/24] x86: refactor psr: implement CPU init and free flow.

2017-01-31 Thread Konrad Rzeszutek Wilk
On Tue, Jan 31, 2017 at 03:14:25AM -0700, Jan Beulich wrote: > >>> On 31.01.17 at 03:44, wrote: > > On Thu, Jan 19, 2017 at 02:01:06PM +0800, Yi Sun wrote: > >> @@ -127,6 +130,13 @@ struct feat_node { > >> struct list_head list; > >> }; > >> > >> +struct cpuid_leaf_regs { > >> +unsigne

Re: [Xen-devel] [PATCH RESEND v5 03/24] x86: refactor psr: implement main data structures.

2017-01-31 Thread Konrad Rzeszutek Wilk
On Tue, Jan 31, 2017 at 03:10:14AM -0700, Jan Beulich wrote: > >>> On 30.01.17 at 23:20, wrote: > >> --- a/xen/arch/x86/psr.c > >> +++ b/xen/arch/x86/psr.c > >> @@ -17,12 +17,116 @@ > >> #include > >> #include > >> #include > >> +#include > >> #include > >> > >> +/* > >> + * Terminology

Re: [Xen-devel] [PATCH v13 4/9] x86: add multiboot2 protocol support for EFI platforms

2017-01-31 Thread Daniel Kiper
On Tue, Jan 31, 2017 at 05:33:12AM -0700, Jan Beulich wrote: > >>> On 25.01.17 at 23:49, wrote: > > On Wed, Jan 25, 2017 at 04:20:30PM -0600, Doug Goldstein wrote: > >> This is a huge change and would really be helpful to have the diff of > >> what's changed to work from. > > > > Please look below

Re: [Xen-devel] [PATCH v2 04/12] x86emul/test: use x86-vendors.h

2017-01-31 Thread Wei Liu
On Tue, Jan 31, 2017 at 05:50:09AM -0700, Jan Beulich wrote: > >>> On 31.01.17 at 12:08, wrote: > > --- a/tools/tests/x86_emulator/x86_emulate.h > > +++ b/tools/tests/x86_emulator/x86_emulate.h > > @@ -6,6 +6,8 @@ > > #include > > #include > > > > +#include "../../../xen/include/asm-x86/x86-

Re: [Xen-devel] [PATCH v2 05/12] x86emul: use eflags definitions in x86-defns.h

2017-01-31 Thread Wei Liu
On Tue, Jan 31, 2017 at 05:56:38AM -0700, Jan Beulich wrote: > >>> On 31.01.17 at 12:08, wrote: > > @@ -5016,20 +5004,20 @@ x86_emulate( > > > > /* > > * SYSCALL (unlike most instructions) evaluates its singlestep > > action > > - * based on the resulting EFLG_TF, not

Re: [Xen-devel] [PATCH RESEND v5 03/24] x86: refactor psr: implement main data structures.

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 15:12, wrote: > On Tue, Jan 31, 2017 at 03:10:14AM -0700, Jan Beulich wrote: >> >>> On 30.01.17 at 23:20, wrote: >> >> --- a/xen/arch/x86/psr.c >> >> +++ b/xen/arch/x86/psr.c >> >> @@ -17,12 +17,116 @@ >> >> #include >> >> #include >> >> #include >> >> +#include >> >> #

Re: [Xen-devel] RFC: Adding a section to the Xen security policy about what constitutes a vulnerability

2017-01-31 Thread George Dunlap
On Wed, Jan 25, 2017 at 8:40 AM, Jan Beulich wrote: On 24.01.17 at 17:33, wrote: >>> On Jan 24, 2017, at 3:08 PM, Jan Beulich wrote: >> On 24.01.17 at 16:01, wrote: > On Jan 24, 2017, at 11:43 AM, Jan Beulich wrote: On 24.01.17 at 12:33, wrote: >> Jan Beulich writes

Re: [Xen-devel] [PATCH v13 4/9] x86: add multiboot2 protocol support for EFI platforms

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 15:23, wrote: > On Tue, Jan 31, 2017 at 05:33:12AM -0700, Jan Beulich wrote: >> >>> On 25.01.17 at 23:49, wrote: >> > On Wed, Jan 25, 2017 at 04:20:30PM -0600, Doug Goldstein wrote: >> > @@ -123,6 +116,15 @@ efi_platform: >> > .Lbad_ldr_nih: .asciz "ERR: EFI ImageHandle is not

Re: [Xen-devel] [PATCH v2 04/12] x86emul/test: use x86-vendors.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 15:36, wrote: > On Tue, Jan 31, 2017 at 05:50:09AM -0700, Jan Beulich wrote: >> >>> On 31.01.17 at 12:08, wrote: >> > --- a/tools/tests/x86_emulator/x86_emulate.h >> > +++ b/tools/tests/x86_emulator/x86_emulate.h >> > @@ -6,6 +6,8 @@ >> > #include >> > #include >> > >> >

Re: [Xen-devel] [PATCH v2 04/12] x86emul/test: use x86-vendors.h

2017-01-31 Thread Wei Liu
On Tue, Jan 31, 2017 at 08:16:00AM -0700, Jan Beulich wrote: > >>> On 31.01.17 at 15:36, wrote: > > On Tue, Jan 31, 2017 at 05:50:09AM -0700, Jan Beulich wrote: > >> >>> On 31.01.17 at 12:08, wrote: > >> > --- a/tools/tests/x86_emulator/x86_emulate.h > >> > +++ b/tools/tests/x86_emulator/x86_emul

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Julien Grall
On 31/01/17 14:08, Jaggi, Manish wrote: Hi Julien, On 1/31/2017 7:16 PM, Julien Grall wrote: On 31/01/17 13:19, Jaggi, Manish wrote: On 1/31/2017 6:13 PM, Julien Grall wrote: On 31/01/17 10:29, Jaggi, Manish wrote: From: Xen-devel on behalf of Andre Przywara Sent: Tuesday, January 31, 2

Re: [Xen-devel] RFC: Adding a section to the Xen security policy about what constitutes a vulnerability

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 16:11, wrote: > OK, I've rewritten the section thus: > > --- > > 4. The security team will only issue an advisory if there is a known > combination of software in which the vulnerability can be exploited. > > In most cases, the software which contains the bug is also the targ

Re: [Xen-devel] [PATCH v2 05/12] x86emul: use eflags definitions in x86-defns.h

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 15:55, wrote: > On Tue, Jan 31, 2017 at 05:56:38AM -0700, Jan Beulich wrote: >> With this taken care of and the #include style matching whatever >> is chosen as the final model in the earlier patch, >> Reviewed-by: Jan Beulich >> However, I'd appreciate if you took the opportun

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

2017-01-31 Thread osstest service owner
flight 105087 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/105087/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-xsm6 xen-boot fail REGR. vs. 59254 test-amd64-amd64-xl

Re: [Xen-devel] [PATCH v2 10/12] fuzz/x86emul: update fuzzer

2017-01-31 Thread Wei Liu
On Tue, Jan 31, 2017 at 06:33:11AM -0700, Jan Beulich wrote: > >>> On 31.01.17 at 12:08, wrote: > > @@ -16,26 +17,79 @@ > > > > #include "x86_emulate.h" > > > > -static unsigned char data[4096]; > > +#include "../../../xen/include/asm-x86/msr-index.h" > > + > > +#define MSR_INDEX_MAX 16 > > +

Re: [Xen-devel] [PATCH] acpi: Switch to dynamic mapping at SYS_STATE_boot

2017-01-31 Thread Boris Ostrovsky
On 01/31/2017 06:01 AM, Jan Beulich wrote: On 30.01.17 at 19:26, wrote: >> We can switch ACPI from using fixmap to dynamic mapping as soon as >> the system enters SYS_STATE_boot. This will allow us, for example, >> to map MADT on systems with large number of processors where the >> table migh

Re: [Xen-devel] [PATCH v2 10/12] fuzz/x86emul: update fuzzer

2017-01-31 Thread Andrew Cooper
On 31/01/17 15:51, Wei Liu wrote: > On Tue, Jan 31, 2017 at 06:33:11AM -0700, Jan Beulich wrote: >>> +static void setup_fpu_exception_handler(void) >>> +{ >>> +/* FIXME - just disable exceptions for now */ >>> +unsigned long a; >>> + >>> +asm volatile ( "fnclex"); >>> +a=0x37f;

Re: [Xen-devel] [PATCH] acpi: Switch to dynamic mapping at SYS_STATE_boot

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 16:52, wrote: > On 01/31/2017 06:01 AM, Jan Beulich wrote: > On 30.01.17 at 19:26, wrote: >>> We can switch ACPI from using fixmap to dynamic mapping as soon as >>> the system enters SYS_STATE_boot. This will allow us, for example, >>> to map MADT on systems with large numb

Re: [Xen-devel] [early RFC] ARM PCI Passthrough design document

2017-01-31 Thread Julien Grall
Hi Roger, On 25/01/17 11:42, Roger Pau Monné wrote: On Tue, Jan 24, 2017 at 05:17:06PM +, Julien Grall wrote: On 06/01/17 15:12, Roger Pau Monné wrote: On Thu, Dec 29, 2016 at 02:04:15PM +, Julien Grall wrote: * Add a device * Remove a device * Assign a device to a guest

Re: [Xen-devel] [PATCH v2 10/12] fuzz/x86emul: update fuzzer

2017-01-31 Thread George Dunlap
On 31/01/17 15:57, Andrew Cooper wrote: > On 31/01/17 15:51, Wei Liu wrote: >> On Tue, Jan 31, 2017 at 06:33:11AM -0700, Jan Beulich wrote: +static void setup_fpu_exception_handler(void) +{ +/* FIXME - just disable exceptions for now */ +unsigned long a; + +

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Jaggi, Manish
On 1/31/2017 8:47 PM, Julien Grall wrote: > > > On 31/01/17 14:08, Jaggi, Manish wrote: >> Hi Julien, >> >> On 1/31/2017 7:16 PM, Julien Grall wrote: >>> On 31/01/17 13:19, Jaggi, Manish wrote: On 1/31/2017 6:13 PM, Julien Grall wrote: > On 31/01/17 10:29, Jaggi, Manish wrote: >>> >>

Re: [Xen-devel] [PATCH v2 10/12] fuzz/x86emul: update fuzzer

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 16:51, wrote: > On Tue, Jan 31, 2017 at 06:33:11AM -0700, Jan Beulich wrote: >> >>> On 31.01.17 at 12:08, wrote: >> > +static int _fuzz_rep_read(const char *why, unsigned long *reps) >> > +{ >> > +int rc; >> > +unsigned long bytes_read = 0; >> > + >> > +rc = data_re

Re: [Xen-devel] [PATCH] acpi: Switch to dynamic mapping at SYS_STATE_boot

2017-01-31 Thread Boris Ostrovsky
On 01/31/2017 10:56 AM, Jan Beulich wrote: On 31.01.17 at 16:52, wrote: >> On 01/31/2017 06:01 AM, Jan Beulich wrote: >> On 30.01.17 at 19:26, wrote: We can switch ACPI from using fixmap to dynamic mapping as soon as the system enters SYS_STATE_boot. This will allow us, for exa

Re: [Xen-devel] [PATCH v2 10/12] fuzz/x86emul: update fuzzer

2017-01-31 Thread Jan Beulich
>>> On 31.01.17 at 16:57, wrote: > On 31/01/17 15:51, Wei Liu wrote: >> On Tue, Jan 31, 2017 at 06:33:11AM -0700, Jan Beulich wrote: +static void setup_fpu_exception_handler(void) +{ +/* FIXME - just disable exceptions for now */ +unsigned long a; + +asm v

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-01-31 Thread Julien Grall
On 31/01/17 16:02, Jaggi, Manish wrote: On 1/31/2017 8:47 PM, Julien Grall wrote: On 31/01/17 14:08, Jaggi, Manish wrote: Hi Julien, On 1/31/2017 7:16 PM, Julien Grall wrote: On 31/01/17 13:19, Jaggi, Manish wrote: On 1/31/2017 6:13 PM, Julien Grall wrote: On 31/01/17 10:29, Jaggi, Ma

  1   2   >