Re: [Xen-devel] Missing "\n" in dump_softtsc() from xen/arch/x86/time.c

2016-12-12 Thread Jan Beulich
>>> On 10.12.16 at 17:43, wrote: > When doing "xl debug-key s; xl dmesg | tail" as instructed for checking > TSC emulation mode on x86, I always see this line unterminated: > > (XEN) dom2(hvm): mode=0,ofs=0x204b1518d4d,khz=2672736,inc=1 > > Apparently, the cause is simple: in xen/arch/x86/time.c

Re: [Xen-devel] [PATCH] X86/VPMU: mask off uncore overflow bit on xeon phi knights landing

2016-12-12 Thread Kang, Luwei
> >>> On 12.12.16 at 07:51, wrote: > > By the way, I think another place may need to do some modify as well. > > > > @@ -868,7 +868,7 @@ static int core2_vpmu_do_interrupt(struct cpu_user_regs > > *regs) > > if ( is_pmc_quirk ) > > handle_pmc_quirk(msr_content); > >

[Xen-devel] [PATCH] x86/time: don't omit newline in dump_softtsc()

2016-12-12 Thread Jan Beulich
Reported-by: Anton Samsonov Signed-off-by: Jan Beulich --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -2145,12 +2145,11 @@ static void dump_softtsc(unsigned char k if ( d->arch.incarnation ) printk(",inc=%"PRIu32, d->arch.incarnation); #if !defined(NDEBUG) || defin

Re: [Xen-devel] [PATCH] X86/VPMU: mask off uncore overflow bit on xeon phi knights landing

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 09:06, wrote: >> >>> On 12.12.16 at 07:51, wrote: >> > By the way, I think another place may need to do some modify as well. >> > >> > @@ -868,7 +868,7 @@ static int core2_vpmu_do_interrupt(struct >> > cpu_user_regs *regs) >> > if ( is_pmc_quirk ) >> > ha

Re: [Xen-devel] [PATCH] Fix errornous negation for isstubdom, which breaks HVM pci-passthrough.

2016-12-12 Thread Cedric Bosdonnat
Nice catch! ACK from me, thought I don't know if it really counts ;) -- Cedric On Sat, 2016-12-10 at 18:59 +0100, Sander Eikelenboom wrote: > Commit 20b75251d9721d9c050a973c02baac396c794ade introduced an errornous > negation which gave the isstubdom bool the opposite semantics, > causing the subs

Re: [Xen-devel] [PATCH] xen/setup: Don't relocate p2m/initrd over existing one

2016-12-12 Thread Juergen Gross
On 09/12/16 16:50, Ross Lagerwall wrote: > When relocating the p2m/initrd, take special care not to relocate it so > that is overlaps with the current location of the p2m/initrd. This is > needed since the full extent of the current location is not marked as a > reserved region in the e820 (and it

Re: [Xen-devel] [PATCH v2] fix potential int overflow in efi/boot

2016-12-12 Thread Jan Beulich
>>> On 09.12.16 at 20:52, wrote: > HorizontalResolution and VerticalResolution are 32bit, while size is > 64bit. As it stands multiplications are evaluated with 32bit arithmetic, > which could overflow. Cast HorizontalResolution to 64bit to avoid that. > > Coverity-ID: 1381858 > > Signed-off-by:

Re: [Xen-devel] [RFC XEN PATCH 01/16] x86_64/mm: explicitly specify the location to place the frame table

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 03:27, wrote: > On 12/09/16 16:35 -0500, Konrad Rzeszutek Wilk wrote: >>On Mon, Oct 10, 2016 at 08:32:20AM +0800, Haozhong Zhang wrote: >>> @@ -1413,7 +1414,7 @@ int memory_add(unsigned long spfn, unsigned long >>> epfn, unsigned int pxm) >>> info.epfn = epfn; >>> inf

Re: [Xen-devel] [RFC XEN PATCH 02/16] x86_64/mm: explicitly specify the location to place the M2P table

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 03:31, wrote: > On 12/09/16 16:38 -0500, Konrad Rzeszutek Wilk wrote: >>On Mon, Oct 10, 2016 at 08:32:21AM +0800, Haozhong Zhang wrote: >>> @@ -1427,7 +1429,7 @@ int memory_add(unsigned long spfn, unsigned long >>> epfn, unsigned int pxm) >>> total_pages += epfn - spfn; >>

Re: [Xen-devel] [PATCH] xen/setup: Don't relocate p2m/initrd over existing one

2016-12-12 Thread Ross Lagerwall
On 12/12/2016 08:19 AM, Juergen Gross wrote: On 09/12/16 16:50, Ross Lagerwall wrote: When relocating the p2m/initrd, take special care not to relocate it so that is overlaps with the current location of the p2m/initrd. This is needed since the full extent of the current location is not marked a

Re: [Xen-devel] [RFC XEN PATCH 03/16] xen/x86: add a hypercall XENPF_pmem_add to report host pmem regions

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 05:16, wrote: > On 12/09/16 17:02 -0500, Konrad Rzeszutek Wilk wrote: >>On Mon, Oct 10, 2016 at 08:32:22AM +0800, Haozhong Zhang wrote: >>> +static int pmem_add_check(unsigned long spfn, unsigned long epfn, >>> + unsigned long rsv_spfn, unsigned long rsv

Re: [Xen-devel] [RFC XEN PATCH 02/16] x86_64/mm: explicitly specify the location to place the M2P table

2016-12-12 Thread Haozhong Zhang
On 12/12/16 01:26 -0700, Jan Beulich wrote: On 12.12.16 at 03:31, wrote: On 12/09/16 16:38 -0500, Konrad Rzeszutek Wilk wrote: On Mon, Oct 10, 2016 at 08:32:21AM +0800, Haozhong Zhang wrote: @@ -1427,7 +1429,7 @@ int memory_add(unsigned long spfn, unsigned long epfn, unsigned int pxm) t

Re: [Xen-devel] [PATCH] xen/setup: Don't relocate p2m/initrd over existing one

2016-12-12 Thread Juergen Gross
On 12/12/16 09:28, Ross Lagerwall wrote: > On 12/12/2016 08:19 AM, Juergen Gross wrote: >> On 09/12/16 16:50, Ross Lagerwall wrote: >>> When relocating the p2m/initrd, take special care not to relocate it so >>> that is overlaps with the current location of the p2m/initrd. This is >>> needed since

Re: [Xen-devel] [PATCH] x86/hvm: don't create a default ioreq server...

2016-12-12 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 12 December 2016 07:54 > To: Paul Durrant > Cc: Andrew Cooper ; xen- > de...@lists.xenproject.org > Subject: Re: [PATCH] x86/hvm: don't create a default ioreq server... > > >>> On 09.12.16 at 18:55, wrote: > > ..

Re: [Xen-devel] [RFC XEN PATCH 03/16] xen/x86: add a hypercall XENPF_pmem_add to report host pmem regions

2016-12-12 Thread Haozhong Zhang
On 12/12/16 01:30 -0700, Jan Beulich wrote: On 12.12.16 at 05:16, wrote: On 12/09/16 17:02 -0500, Konrad Rzeszutek Wilk wrote: On Mon, Oct 10, 2016 at 08:32:22AM +0800, Haozhong Zhang wrote: +static int pmem_add_check(unsigned long spfn, unsigned long epfn, + unsigned

Re: [Xen-devel] [PATCH] Fix errornous negation for isstubdom, which breaks HVM pci-passthrough.

2016-12-12 Thread Wei Liu
On Sat, Dec 10, 2016 at 06:59:08PM +0100, Sander Eikelenboom wrote: > Commit 20b75251d9721d9c050a973c02baac396c794ade introduced an errornous > negation which gave the isstubdom bool the opposite semantics, > causing the subsequent code to take the wrong code path. > > Signed-off-by: Sander Eikele

Re: [Xen-devel] [PATCH] Fix errornous negation for isstubdom, which breaks HVM pci-passthrough.

2016-12-12 Thread Wei Liu
On Mon, Dec 12, 2016 at 09:17:42AM +0100, Cedric Bosdonnat wrote: > Nice catch! > ACK from me, thought I don't know if it really counts ;) > It does. I will add your acked-by while committing. ___ Xen-devel mailing list Xen-devel@lists.xen.org https:/

[Xen-devel] [PATCH v2] x86emul: support LAR/LSL/VERR/VERW

2016-12-12 Thread Jan Beulich
This involves protmode_load_seg() accepting x86_seg_none as input, with the meaning to - suppress any exceptions other than #PF, - not commit any state. Signed-off-by: Jan Beulich --- v2: Extend commit message and add a respective code comment. Add ASSERT()s to ensure/document that only #PF c

[Xen-devel] [PATCH v3 3/7] x86emul/test: factor out emul_test_{read_cr, cpuid}

2016-12-12 Thread Wei Liu
While at it, move xgetbv, all cpu_has_* and cache_line_size macros to x86_emulate.h. Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Ian Jackson Cc: Wei Liu --- tools/tests/x86_emulator/test_x86_emulator.c | 103 +-- tools/tests/x86_emulator/x86_emula

[Xen-devel] [PATCH v3 0/7] Fuzzing targets for oss-fuzz

2016-12-12 Thread Wei Liu
Hi all This series adds two fuzzing targets to run in Google's oss-fuzz infrastructure. There will be some other patches on the oss-fuzz side. Their recommendation is to have all the fuzzing targets committed in our tree so that they can be kept up to date. Please see the patch to add README for

[Xen-devel] [PATCH v3 6/7] tools: hook up fuzz directory

2016-12-12 Thread Wei Liu
This will make all fuzzing targets get build every time tools directory is built. This serves as basic regression test. Signed-off-by: Wei Liu --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu

[Xen-devel] [PATCH v3 1/7] tools/fuzz: introduce libelf target

2016-12-12 Thread Wei Liu
Source code and Makefile to fuzz libelf in Google's oss-fuzz infrastructure. Introduce FUZZ_NO_LIBXC in libelf-private.h. That macro will be set when compiling libelf fuzzer target because libxc is not required in libelf fuzzing. Signed-off-by: Wei Liu --- Cc: Andrew Cooper Cc: George Dunlap C

[Xen-devel] [PATCH v3 4/7] x86emul/test: factor out emul_test_get_fpu

2016-12-12 Thread Wei Liu
Signed-off-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Ian Jackson Cc: Wei Liu --- tools/tests/x86_emulator/test_x86_emulator.c | 27 +-- tools/tests/x86_emulator/x86_emulate.c | 25 + tools/tests/x86_emulator/x86_emulate.h

[Xen-devel] [PATCH v3 2/7] x86emul/test: factor out emul_test_make_stack_executable

2016-12-12 Thread Wei Liu
It will be used by emulator fuzzing target. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- tools/tests/x86_emulator/test_x86_emulator.c | 12 ++-- tools/tests/x86_emulator/x86_emulate.c | 20 tools/tests/x86_emulator/x86_emulate.h | 3 +++ 3 files cha

[Xen-devel] [PATCH v3 7/7] tools/fuzz: add README

2016-12-12 Thread Wei Liu
Signed-off-by: Wei Liu --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- tools/fuzz/README | 39 +++ 1 file changed, 39 insertions(+) create mode 1006

[Xen-devel] [PATCH v3 5/7] tools/fuzz: introduce x86 instruction emulator target

2016-12-12 Thread Wei Liu
Instruction emulator fuzzing code is from code previous written by Andrew and George. Adapted to llvm fuzzer and hook up the build system. Signed-off-by: Andrew Cooper Signed-off-by: George Dunlap Signed-off-by: Wei Liu --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich

[Xen-devel] [PATCH 0/3] x86emul: misc adjustments

2016-12-12 Thread Jan Beulich
These patches are grouped together merely because of contextual dependencies. 1: correct EFLAGS.TF handling 2: conditionally clear BNDn for branches 3: some REX related polishing Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.x

Re: [Xen-devel] Question about porting IPMMU-VMSA Linux driver to XEN

2016-12-12 Thread Oleksandr Tyshchenko
Hi Stefano On Sat, Dec 10, 2016 at 2:45 AM, Stefano Stabellini wrote: > On Thu, 8 Dec 2016, Oleksandr Tyshchenko wrote: >> On Thu, Dec 8, 2016 at 9:39 PM, Julien Grall wrote: >> > >> > >> > On 08/12/16 17:06, Oleksandr Tyshchenko wrote: >> >> >> >> Hi Julien, >> > >> > >> > Hi Oleksandr, >> Hi J

Re: [Xen-devel] [PATCH v3 1/7] tools/fuzz: introduce libelf target

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 10:28, wrote: > Source code and Makefile to fuzz libelf in Google's oss-fuzz > infrastructure. > > Introduce FUZZ_NO_LIBXC in libelf-private.h. That macro will be set when > compiling libelf fuzzer target because libxc is not required in libelf > fuzzing. > > Signed-off-by: We

Re: [Xen-devel] [PATCH v3 3/7] x86emul/test: factor out emul_test_{read_cr, cpuid}

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 10:28, wrote: > While at it, move xgetbv, all cpu_has_* and cache_line_size macros to > x86_emulate.h. > > Signed-off-by: Wei Liu Reviewed-by: Jan Beulich with one further cosmetic request: > --- a/tools/tests/x86_emulator/x86_emulate.c > +++ b/tools/tests/x86_emulator/x86_

Re: [Xen-devel] [PATCH v3 4/7] x86emul/test: factor out emul_test_get_fpu

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 10:28, wrote: > 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] libxl: fix gentypes call in Makefile

2016-12-12 Thread Wei Liu
On Thu, Nov 10, 2016 at 05:46:00PM +0100, Cédric Bosdonnat wrote: > From the make documentation: > > "$* [...] If the target is `dir/a.foo.b' and the target pattern is > `a.%.b' then the stem is `dir/foo'. In a static pattern rule, the > stem is part of the file name that matched the `%' in the ta

Re: [Xen-devel] [PATCH v3 3/7] x86emul/test: factor out emul_test_{read_cr, cpuid}

2016-12-12 Thread Wei Liu
On Mon, Dec 12, 2016 at 02:45:45AM -0700, Jan Beulich wrote: > >>> On 12.12.16 at 10:28, wrote: > > While at it, move xgetbv, all cpu_has_* and cache_line_size macros to > > x86_emulate.h. > > > > Signed-off-by: Wei Liu > > Reviewed-by: Jan Beulich > with one further cosmetic request: > > > -

Re: [Xen-devel] [PATCH v3 5/7] tools/fuzz: introduce x86 instruction emulator target

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 10:28, wrote: > Instruction emulator fuzzing code is from code previous written by > Andrew and George. Adapted to llvm fuzzer and hook up the build system. > > Signed-off-by: Andrew Cooper > Signed-off-by: George Dunlap > Signed-off-by: Wei Liu > --- > Cc: Andrew Cooper >

[Xen-devel] [PATCH 1/3] x86emul: correct EFLAGS.TF handling

2016-12-12 Thread Jan Beulich
For repeated string instructions we should not emulate multiple iterations in one go when a single step trap needs injecting (which needs to happen after every iteration). For all non-branch instructions as well as not taken conditional branches we additionally need to take DebugCtl.BTF into consi

[Xen-devel] [PATCH 2/3 v2] x86emul: conditionally clear BNDn for branches

2016-12-12 Thread Jan Beulich
Considering that we surface MPX to HVM guests, instructions we emulate should also correctly deal with MPX state. While for now BND* instructions don't get emulated, the effect of branches (which we do emulate) without BND prefix should be taken care of. No need to alter XABORT behavior: While not

[Xen-devel] [PATCH 3/3] x86emul: some REX related polishing

2016-12-12 Thread Jan Beulich
While there are a few cases where it seems better to open-code REX_* values, there's one where this clearly is a bad idea. And the SYSEXIT emulation has no need to look at REX at all, it can simply use op_bytes instead. Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++

Re: [Xen-devel] [PATCH] x86/time: don't omit newline in dump_softtsc()

2016-12-12 Thread Andrew Cooper
On 12/12/16 08:08, Jan Beulich wrote: > Reported-by: Anton Samsonov > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 2/2] x86emul: consolidate string insn address increments

2016-12-12 Thread Andrew Cooper
On 12/12/16 07:27, Jan Beulich wrote: On 09.12.16 at 18:11, wrote: >> On 09/12/16 15:22, Jan Beulich wrote: >>> Move the looking at EFLAGS.DF into the macro, rendering all call sites >>> more readable. >>> >>> Signed-off-by: Jan Beulich >> The net change is ok; it is certainly cleaner to rea

[Xen-devel] [xen-4.8-testing test] 103160: tolerable FAIL - PUSHED

2016-12-12 Thread osstest service owner
flight 103160 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/103160/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemut-debianhvm-amd64 14 guest-saverestore.2 fail in 103103 pass in 103160 test-armhf-a

[Xen-devel] [PATCH] x86/emul: Annotate more intentional fallthrough cases

2016-12-12 Thread Andrew Cooper
Some recent change in x86_emulate.c has simplified the callgraph sufficiently for Coverity to notice these, rather than hitting its upper path limit. All are legitimate fallthoughs. Annotate them as such. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/x86_emulate/x86_emulat

[Xen-devel] [PATCH v2] x86/smpboot: Make logical package management more robust

2016-12-12 Thread Thomas Gleixner
The logical package management has several issues: - The APIC ids provided by ACPI are not required to be the same as the initial APIC id which can be retrieved by CPUID. The APIC ids provided by ACPI are those which are written by the BIOS into the APIC. The initial id is set by hardwar

Re: [Xen-devel] [PATCH] Fix errornous negation for isstubdom, which breaks HVM pci-passthrough.

2016-12-12 Thread Sander Eikelenboom
On 12/12/16 10:14, Wei Liu wrote: > On Sat, Dec 10, 2016 at 06:59:08PM +0100, Sander Eikelenboom wrote: >> Commit 20b75251d9721d9c050a973c02baac396c794ade introduced an errornous >> negation which gave the isstubdom bool the opposite semantics, >> causing the subsequent code to take the wrong code

[Xen-devel] [PATCH v4] console: allow log level threshold adjustments

2016-12-12 Thread Jan Beulich
... from serial console so that one doesn't always need to reboot to see more / less messages. Note that upper thresholds are sticky, i.e. while they get adjusted upwards when the lower threshold would otherwise end up above the upper one, they don't get adjusted when reducing the lower one. Full

Re: [Xen-devel] [PATCH] x86/emul: Annotate more intentional fallthrough cases

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 11:05, wrote: > @@ -4314,6 +4315,7 @@ x86_emulate( > > case 0xfe: /* Grp4 */ > generate_exception_if((modrm_reg & 7) >= 2, EXC_UD); > +/* Fallthough. */ With the missing r added, Reviewed-by: Jan Beulich Jan __

Re: [Xen-devel] [PATCH v4] console: allow log level threshold adjustments

2016-12-12 Thread Wei Liu
On Mon, Dec 12, 2016 at 03:16:27AM -0700, Jan Beulich wrote: > ... from serial console so that one doesn't always need to reboot to > see more / less messages. > > Note that upper thresholds are sticky, i.e. while they get adjusted > upwards when the lower threshold would otherwise end up above th

Re: [Xen-devel] [RFC PATCH 6/9] x86/SVM: Add AVIC vmexit handlers

2016-12-12 Thread Suravee Suthikulpanit
Hi Konrad, Thanks for review comments. On 10/14/2016 10:20 PM, Konrad Rzeszutek Wilk wrote: On Mon, Sep 19, 2016 at 12:52:45AM -0500, Suravee Suthikulpanit wrote: AVIC introduces two #vmexit handlers: + * IPIs when the specified Message Type is Fixed + * (also known as fixed d

[Xen-devel] [PATCH] X86/VPMU:clear the overflow status of which counter happened overflow

2016-12-12 Thread Luwei Kang
If a counter happend overflow just clear corresponding bit of IA32_PERF_GLOBAL_OVF_CTRL, rather than clear all the bit of this msr. Signed-off-by: Luwei Kang --- xen/arch/x86/cpu/vpmu_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/

Re: [Xen-devel] [RFC PATCH 21/24] ARM: vITS: handle INVALL command

2016-12-12 Thread Andre Przywara
Hi Stefano, thanks for the prompt and helpful answer! On 10/12/16 00:30, Stefano Stabellini wrote: > On Fri, 9 Dec 2016, Andre Przywara wrote: I've been spending some time thinking about this, and I think we can in fact get away without ever propagating command from domains to the host.

Re: [Xen-devel] [PATCH 2/3] Add Xen colo support for qemu-upstream colo codes

2016-12-12 Thread Wei Liu
On Thu, Dec 01, 2016 at 01:20:18PM +, Wei Liu wrote: > On Wed, Nov 30, 2016 at 05:47:51PM +0800, Zhang Chen wrote: > > Because of qemu codes update, we update Xen colo block codes > > > > Signed-off-by: Zhang Chen > > COLO being an experimental feature means that you can change it at will, >

[Xen-devel] [PATCH 4/5] x86/shadow: Drop all emulation for PV vcpus

2016-12-12 Thread Andrew Cooper
Emulation is only performed for paging_mode_refcount() domains, which in practice means HVM domains only. Drop the PV emulation code. As it always set addr_side and sp_size to BITS_PER_LONG, it can't have worked correctly for PV guests running in a different mode to Xen. Signed-off-by: Andrew Co

[Xen-devel] [PATCH 0/5] x86: Remove vestigal PV Autotranslate pieces

2016-12-12 Thread Andrew Cooper
Autotranslate PV domains haven't been able to be built for two releases of Xen, and noone has noticed. The shadow emulation code for such domains has never functioned correctly for guests running in a mode different to Xen. This isn't as much cleanup as I intended to do, but it turns out that I p

[Xen-devel] [PATCH 2/5] x86/shadow: Tweak some initialisation in sh_page_fault()

2016-12-12 Thread Andrew Cooper
sh_page_fault() is a complicated function. It aids clarity for the reader if constant data is declared as such. Declare struct npfec access and fetch_type_t ft as const, which requires initialising them during declaration. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich

[Xen-devel] [PATCH 1/5] x86/traps: Drop paging_mode_external() handling from the PV pagefault path

2016-12-12 Thread Andrew Cooper
PV guests necessarily can't be external, as Xen must steal address space from them. Pagefaults for HVM guests are handled by {vmx,svm}_vmexit_handler() and don't enter the PV fixup_page_fault() path. This paging_fault() callsite is therefore dead code, so drop it. Clarify the comment at the othe

[Xen-devel] [PATCH 3/5] x86/paging: Enforce PG_external == PG_translate == PG_refcounts

2016-12-12 Thread Andrew Cooper
Setting PG_refcounts but not PG_translate is not useful. While adjusting this, make a few other improvements. * Have paging_enable() unilaterally reject any unknown modes. * Correct the function description. paging_enable() is also used to enable logdirty during runtime. * Drop the or'ing

[Xen-devel] [PATCH 5/5] x86/shadow: Misc minor cleanup

2016-12-12 Thread Andrew Cooper
* Move the #ifdefary inside sh_audit_gw() to avoid needing the else clause. * The walk_t parameter is only ever read, so make it const. * Use mfn_eq() rather than opencoding it. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan CC: George Dunlap --- xen

Re: [Xen-devel] [PATCH v3 4/5] tools/libacpi: update FADT layout to support version 5

2016-12-12 Thread Roger Pau Monne
On Wed, Dec 07, 2016 at 09:04:14AM -0700, Jan Beulich wrote: > >>> On 05.12.16 at 16:04, wrote: > > --- a/tools/firmware/hvmloader/util.c > > +++ b/tools/firmware/hvmloader/util.c > > @@ -949,7 +949,7 @@ void hvmloader_acpi_build_tables(struct acpi_config > > *config, > > config->table_f

Re: [Xen-devel] [PATCH v4] console: allow log level threshold adjustments

2016-12-12 Thread Andrew Cooper
On 12/12/16 10:16, Jan Beulich wrote: > ... from serial console so that one doesn't always need to reboot to > see more / less messages. > > Note that upper thresholds are sticky, i.e. while they get adjusted > upwards when the lower threshold would otherwise end up above the upper > one, they don'

Re: [Xen-devel] [PATCH v3 4/5] tools/libacpi: update FADT layout to support version 5

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 11:45, wrote: > On Wed, Dec 07, 2016 at 09:04:14AM -0700, Jan Beulich wrote: >> >>> On 05.12.16 at 16:04, wrote: >> > --- a/tools/firmware/hvmloader/util.c >> > +++ b/tools/firmware/hvmloader/util.c >> > @@ -949,7 +949,7 @@ void hvmloader_acpi_build_tables(struct acpi_config >

Re: [Xen-devel] [PATCH] X86/VPMU:clear the overflow status of which counter happened overflow

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 11:35, wrote: > If a counter happend overflow just clear corresponding bit of > IA32_PERF_GLOBAL_OVF_CTRL, rather than clear all the bit of this msr. The code change is fine, but the description appears to be wrong: Isn't the change to avoid bits getting wrongly set, rather tha

Re: [Xen-devel] [PATCH 1/5] x86/traps: Drop paging_mode_external() handling from the PV pagefault path

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 11:43, wrote: > --- a/xen/arch/x86/traps.c > +++ b/xen/arch/x86/traps.c > @@ -1799,15 +1799,6 @@ static int fixup_page_fault(unsigned long addr, struct > cpu_user_regs *regs) > if ( in_irq() || !(regs->eflags & X86_EFLAGS_IF) ) > return 0; > > -/* Faults fro

Re: [Xen-devel] [PATCH v3 5/7] tools/fuzz: introduce x86 instruction emulator target

2016-12-12 Thread Wei Liu
On Mon, Dec 12, 2016 at 02:58:39AM -0700, Jan Beulich wrote: > >>> On 12.12.16 at 10:28, wrote: > > Instruction emulator fuzzing code is from code previous written by > > Andrew and George. Adapted to llvm fuzzer and hook up the build system. > > > > Signed-off-by: Andrew Cooper > > Signed-off-b

Re: [Xen-devel] [PATCH 2/5] x86/shadow: Tweak some initialisation in sh_page_fault()

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 11:43, wrote: > sh_page_fault() is a complicated function. It aids clarity for the reader if > constant data is declared as such. > > Declare struct npfec access and fetch_type_t ft as const, which requires > initialising them during declaration. > > No functional change. >

Re: [Xen-devel] [PATCH 1/5] x86/traps: Drop paging_mode_external() handling from the PV pagefault path

2016-12-12 Thread Tim Deegan
At 10:43 + on 12 Dec (1481539421), Andrew Cooper wrote: > PV guests necessarily can't be external, as Xen must steal address space from > them. Pagefaults for HVM guests are handled by {vmx,svm}_vmexit_handler() and > don't enter the PV fixup_page_fault() path. > > This paging_fault() callsit

Re: [Xen-devel] [PATCH v3 5/7] tools/fuzz: introduce x86 instruction emulator target

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 12:19, wrote: > On Mon, Dec 12, 2016 at 02:58:39AM -0700, Jan Beulich wrote: >> >>> On 12.12.16 at 10:28, wrote: >> > +/* Reset all global states */ >> >> DYM "state"? > > I mean "states". There are three states we need to reset. Hmm, to me as a non-native speaker it fee

Re: [Xen-devel] [PATCH 2/5] x86/shadow: Tweak some initialisation in sh_page_fault()

2016-12-12 Thread Tim Deegan
At 10:43 + on 12 Dec (1481539422), Andrew Cooper wrote: > sh_page_fault() is a complicated function. It aids clarity for the reader if > constant data is declared as such. > > Declare struct npfec access and fetch_type_t ft as const, which requires > initialising them during declaration. > >

Re: [Xen-devel] [PATCH] X86/VPMU:clear the overflow status of which counter happened overflow

2016-12-12 Thread Kang, Luwei
> >>> On 12.12.16 at 11:35, wrote: > > If a counter happend overflow just clear corresponding bit of > > IA32_PERF_GLOBAL_OVF_CTRL, rather than clear all the bit of this msr. > > The code change is fine, but the description appears to be wrong: > Isn't the change to avoid bits getting wrongly set

Re: [Xen-devel] [PATCH v3 5/7] tools/fuzz: introduce x86 instruction emulator target

2016-12-12 Thread Wei Liu
On Mon, Dec 12, 2016 at 04:30:30AM -0700, Jan Beulich wrote: > >>> On 12.12.16 at 12:19, wrote: > > On Mon, Dec 12, 2016 at 02:58:39AM -0700, Jan Beulich wrote: > >> >>> On 12.12.16 at 10:28, wrote: > >> > +/* Reset all global states */ > >> > >> DYM "state"? > > > > I mean "states". There

Re: [Xen-devel] [PATCH 3/5] x86/paging: Enforce PG_external == PG_translate == PG_refcounts

2016-12-12 Thread Tim Deegan
At 10:43 + on 12 Dec (1481539423), Andrew Cooper wrote: > Setting PG_refcounts but not PG_translate is not useful. > > While adjusting this, make a few other improvements. > > * Have paging_enable() unilaterally reject any unknown modes. > * Correct the function description. paging_enable(

Re: [Xen-devel] [PATCH v2 1/2] arm/mem_access: adjust check_and_get_page to not rely on current

2016-12-12 Thread Julien Grall
On 12/12/16 07:47, Tamas K Lengyel wrote: On Dec 12, 2016 00:42, "Jan Beulich" mailto:jbeul...@suse.com>> wrote: >>> On 09.12.16 at 20:59, mailto:tamas.leng...@zentific.com>> wrote: > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -1461,7 +1461,8 @@ mfn_t gfn_to_mfn

Re: [Xen-devel] [PATCH 1/5] x86/traps: Drop paging_mode_external() handling from the PV pagefault path

2016-12-12 Thread Andrew Cooper
On 12/12/16 11:27, Tim Deegan wrote: > At 10:43 + on 12 Dec (1481539421), Andrew Cooper wrote: >> PV guests necessarily can't be external, as Xen must steal address space from >> them. Pagefaults for HVM guests are handled by {vmx,svm}_vmexit_handler() >> and >> don't enter the PV fixup_page_

Re: [Xen-devel] [xen-4.5-testing test] 103161: regressions - FAIL

2016-12-12 Thread Ian Jackson
Rosstest service owner writes ("[xen-4.5-testing test] 103161: regressions - FAIL"): > flight 103161 xen-4.5-testing real [real] > http://logs.test-lab.xenproject.org/osstest/logs/103161/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be r

Re: [Xen-devel] [PATCH 4/5] x86/shadow: Drop all emulation for PV vcpus

2016-12-12 Thread Tim Deegan
At 10:43 + on 12 Dec (1481539424), Andrew Cooper wrote: > Emulation is only performed for paging_mode_refcount() domains, which in > practice means HVM domains only. > > Drop the PV emulation code. As it always set addr_side and sp_size to > BITS_PER_LONG, it can't have worked correctly for P

Re: [Xen-devel] [PATCH] tools: bump some library version numbers to 4.9

2016-12-12 Thread Ian Jackson
Wei Liu writes ("[PATCH] tools: bump some library version numbers to 4.9"): > Bump the version number for libxc, lixlu, libxl and libvchan to 4.9. > > Signed-off-by: Wei Liu Acked-by: Ian Jackson And pushed (since to check it was complete, I had to do the git-am part anyway). Thanks, Ian. __

Re: [Xen-devel] [PATCH 5/5] x86/shadow: Misc minor cleanup

2016-12-12 Thread Tim Deegan
At 10:43 + on 12 Dec (1481539425), Andrew Cooper wrote: > * Move the #ifdefary inside sh_audit_gw() to avoid needing the else clause. > * The walk_t parameter is only ever read, so make it const. > * Use mfn_eq() rather than opencoding it. > > No functional change. > > Signed-off-by: Andre

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

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

Re: [Xen-devel] [PATCH 1/5] x86/traps: Drop paging_mode_external() handling from the PV pagefault path

2016-12-12 Thread Tim Deegan
At 11:45 + on 12 Dec (1481543145), Andrew Cooper wrote: > On 12/12/16 11:27, Tim Deegan wrote: > > At 10:43 + on 12 Dec (1481539421), Andrew Cooper wrote: > >> PV guests necessarily can't be external, as Xen must steal address space > >> from > >> them. Pagefaults for HVM guests are handl

Re: [Xen-devel] [PATCH v2] fix potential pa_range_info out of bound access

2016-12-12 Thread Julien Grall
Hi Stefano, On 09/12/16 19:46, Stefano Stabellini wrote: pa_range_info has only 8 elements and is accessed using pa_range as index. pa_range is initialized to 16, potentially causing out of bound access errors. Fix the issue by checking that pa_range is not greater than the size of the array. C

Re: [Xen-devel] [PATCH 3/5] x86/paging: Enforce PG_external == PG_translate == PG_refcounts

2016-12-12 Thread Andrew Cooper
On 12/12/16 11:43, Tim Deegan wrote: > At 10:43 + on 12 Dec (1481539423), Andrew Cooper wrote: >> Setting PG_refcounts but not PG_translate is not useful. >> >> While adjusting this, make a few other improvements. >> >> * Have paging_enable() unilaterally reject any unknown modes. >> * Correc

Re: [Xen-devel] [DOC v2] Xen transport for 9pfs

2016-12-12 Thread Wei Liu
On Mon, Dec 05, 2016 at 05:33:23PM -0800, Stefano Stabellini wrote: [...] > ## Xenstore > > The frontend and the backend connect via xenstore to exchange > information. The toolstack creates front and back nodes with state > [XenbusStateInitialising]. The protocol node name is **9pfs**. > > Multi

Re: [Xen-devel] [OSSTEST PATCH v8 0/3] Have OpenStack tested on top of xen's master and libvirt's master.

2016-12-12 Thread Anthony PERARD
ping? -- Anthony PERARD ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] X86/VPMU:clear the overflow status of which counter happened overflow

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 12:40, wrote: >> >>> On 12.12.16 at 11:35, wrote: >> > If a counter happend overflow just clear corresponding bit of >> > IA32_PERF_GLOBAL_OVF_CTRL, rather than clear all the bit of this msr. >> >> The code change is fine, but the description appears to be wrong: >> Isn't the

Re: [Xen-devel] [edk2] [PATCH RFC 10/14] UefiCpuPkg/BaseXApicX2ApicLib: Fix initialisation on my system and ...

2016-12-12 Thread Anthony PERARD
On Fri, Dec 09, 2016 at 06:48:47AM +, Kinney, Michael D wrote: > Hi Anthony, > > Can you provide more details on why you want to expose internal APIs > in the library class? I think I'm only using WriteLocalApicReg() to change the init counter. Maybe I can just call InitializeApicTimer() agai

Re: [Xen-devel] [edk2] [PATCH RFC 10/14] UefiCpuPkg/BaseXApicX2ApicLib: Fix initialisation on my system and ...

2016-12-12 Thread Anthony PERARD
On Fri, Dec 09, 2016 at 10:43:30AM +, Andrew Cooper wrote: > On 09/12/16 06:48, Kinney, Michael D wrote: > > Hi Anthony, > > > > Can you provide more details on why you want to expose internal APIs > > in the library class? > > > > What is the specific issue? Is the Local APIC in your environm

Re: [Xen-devel] [PATCH 3/5] x86/paging: Enforce PG_external == PG_translate == PG_refcounts

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 12:59, wrote: > On 12/12/16 11:43, Tim Deegan wrote: >> At 10:43 + on 12 Dec (1481539423), Andrew Cooper wrote: >>> Setting PG_refcounts but not PG_translate is not useful. >>> >>> While adjusting this, make a few other improvements. >>> >>> * Have paging_enable() unilatera

Re: [Xen-devel] [PATCH 1/5] x86/traps: Drop paging_mode_external() handling from the PV pagefault path

2016-12-12 Thread Andrew Cooper
On 12/12/16 11:57, Tim Deegan wrote: > At 11:45 + on 12 Dec (1481543145), Andrew Cooper wrote: >> On 12/12/16 11:27, Tim Deegan wrote: >>> At 10:43 + on 12 Dec (1481539421), Andrew Cooper wrote: PV guests necessarily can't be external, as Xen must steal address space from th

Re: [Xen-devel] [PATCH v4 06/15] domctl: Add XEN_DOMCTL_acpi_access

2016-12-12 Thread Boris Ostrovsky
On 12/02/2016 02:48 AM, Jan Beulich wrote: On 01.12.16 at 17:43, wrote: On 12/01/2016 11:06 AM, Jan Beulich wrote: +++ b/xen/include/public/domctl.h @@ -1144,6 +1144,29 @@ struct xen_domctl_psr_cat_op { typedef struct xen_domctl_psr_cat_op xen_domctl_psr_cat_op_t; DEFINE_XEN_GUEST_HANDLE

Re: [Xen-devel] AMD VMMCALL and VM86 mode

2016-12-12 Thread Suravee Suthikulpanit
Hi Andrew/Boris, On 12/12/16 01:37, Andrew Cooper wrote: On 11/12/16 17:33, Boris Ostrovsky wrote: - andrew.coop...@citrix.com wrote: On 09/12/16 19:55, Andrew Cooper wrote: On 09/12/16 19:55, Boris Ostrovsky wrote: On 12/09/2016 02:01 PM, Andrew Cooper wrote: Hello, While working on

Re: [Xen-devel] [PATCH v2 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2016-12-12 Thread Wei Liu
On Tue, Dec 06, 2016 at 01:46:12PM +, Paul Durrant wrote: > ...as a set of hypercalls to be used by a device model. [...] > +Introduction > + > + > +A previous proposal for a 'DMOP' was put forward by Ian Jackson on the 1st > +of August. This proposal seem very promising, however a

Re: [Xen-devel] [PATCH v4 06/15] domctl: Add XEN_DOMCTL_acpi_access

2016-12-12 Thread Julien Grall
Hi Boris, On 29/11/16 15:33, Boris Ostrovsky wrote: This domctl will allow toolstack to read and write some ACPI registers. It will be available to both x86 and ARM but will be implemented first only for x86 Can you explain why we would need this on ARM? Cheers, Signed-off-by: Boris Ostrov

Re: [Xen-devel] [PATCH v2 2/8] dm_op: convert HVMOP_*ioreq_server*

2016-12-12 Thread Wei Liu
On Tue, Dec 06, 2016 at 01:46:13PM +, Paul Durrant wrote: > The definitions of HVM_IOREQSRV_BUFIOREQ_* have to persist as they are > already in use by callers of the libxc interface. > > Suggested-by: Jan Beulich > Signed-off-by: Paul Durrant > -- > Cc: Jan Beulich > Cc: Ian Jackson > Cc:

Re: [Xen-devel] [xen-4.5-testing test] 103161: regressions - FAIL

2016-12-12 Thread Andrew Cooper
On 12/12/16 11:47, Ian Jackson wrote: > Rosstest service owner writes ("[xen-4.5-testing test] 103161: regressions - > FAIL"): >> flight 103161 xen-4.5-testing real [real] >> http://logs.test-lab.xenproject.org/osstest/logs/103161/ >> >> Regressions :-( >> >> Tests which did not succeed and are bl

Re: [Xen-devel] [PATCH v2] libxl: QED disks support

2016-12-12 Thread Wei Liu
On Thu, Dec 08, 2016 at 02:52:50PM +0100, Cédric Bosdonnat wrote: > Qdisk supports qcow and qcow2, extend it to also support qed disk > format. > > Signed-off-by: Cédric Bosdonnat > --- > v2: >* Add qed to the list for possible format values in > xl-disk-configuration.txt >* Add LIBXL_H

Re: [Xen-devel] [MULTIBOOT2 DOC PATCH v3 01/13] multiboot2: Replace u_phys with u32

2016-12-12 Thread Daniel Kiper
On Sat, Dec 10, 2016 at 08:23:15PM +0300, Andrei Borzenkov wrote: > 07.12.2016 01:52, Daniel Kiper пишет: > > u_phys is used just in two places and sometimes it may confuse reader. > > Additionally, GRUB multiboot2 implementation does not use u_phys anywhere. > > So, replace it with basic well defi

Re: [Xen-devel] [PATCH v4 14/14] xen/x86: setup PVHv2 Dom0 ACPI tables

2016-12-12 Thread Jan Beulich
>>> On 30.11.16 at 17:49, wrote: > @@ -567,7 +573,7 @@ static __init void hvm_setup_e820(struct domain *d, > unsigned long nr_pages) > /* > * Craft the e820 memory map for Dom0 based on the hardware e820 map. > */ > -d->arch.e820 = xzalloc_array(struct e820entry, e820.nr_map)

[Xen-devel] [PATCH] xsm: allow relevant permission during migrate and gpu-passthrough.

2016-12-12 Thread Anshul Makkar
During guest migrate allow permission to prevent spurious page faults. Prevents these errors: d73: Non-privileged (73) attempt to map I/O space avc: denied { set_misc_info } for domid=0 target=11 scontext=system_u:system_r:dom0_t tcontext=system_u:system_r:domU_t tclass=domain GPU passt

Re: [Xen-devel] [PATCH v4 06/15] domctl: Add XEN_DOMCTL_acpi_access

2016-12-12 Thread Jan Beulich
>>> On 12.12.16 at 14:08, wrote: > > On 12/02/2016 02:48 AM, Jan Beulich wrote: > On 01.12.16 at 17:43, wrote: >>> On 12/01/2016 11:06 AM, Jan Beulich wrote: > +++ b/xen/include/public/domctl.h > @@ -1144,6 +1144,29 @@ struct xen_domctl_psr_cat_op { > typedef struct xen_do

[Xen-devel] [PATCH v3] libxl: QED disks support

2016-12-12 Thread Cédric Bosdonnat
Qdisk supports qcow and qcow2, extend it to also support qed disk format. Signed-off-by: Cédric Bosdonnat --- v2: * Add qed to the list for possible format values in xl-disk-configuration.txt * Add LIBXL_HAVE_QED v3: * Remove the qed: obsolete prefix support --- docs/misc/xl-disk-con

Re: [Xen-devel] [PATCH] xen/balloon: Only mark a page as managed when it is released

2016-12-12 Thread Juergen Gross
On 09/12/16 18:10, Ross Lagerwall wrote: > Only mark a page as managed when it is released back to the allocator. > This ensures that the managed page count does not get falsely increased > when a VM is running. Correspondingly change it so that pages are > marked as unmanaged after getting them fr

Re: [Xen-devel] [PATCHv6] xenbus: fix deadlock on writes to /proc/xen/xenbus

2016-12-12 Thread Juergen Gross
On 09/12/16 15:41, David Vrabel wrote: > /proc/xen/xenbus does not work correctly. A read blocked waiting for > a xenstore message holds the mutex needed for atomic file position > updates. This blocks any writes on the same file handle, which can > deadlock if the write is needed to unblock the

  1   2   3   >