Re: [Xen-devel] [PATCH v11 08/23] x86: refactor psr: L3 CAT: set value: implement framework.

2017-06-01 Thread Yi Sun
On 17-06-01 04:45:58, Jan Beulich wrote: > >>> On 01.06.17 at 12:00, wrote: > > On 17-05-30 08:32:59, Jan Beulich wrote: > >> >>> On 03.05.17 at 10:44, wrote: > >> > --- a/xen/arch/x86/psr.c > >> > +++ b/xen/arch/x86/psr.c > >> > @@ -118,11

Re: [Xen-devel] [PATCH v7] ns16550: Add support for UART parameters to be specifed with name-value pairs

2017-06-01 Thread Paratey, Swapnil
Should I submit a v8 with the "CONFIG_HAS_PCI" macro specifications for the case statements? I apologize for not trying the build for ARM beforehand. Yes please. ~Andrew Should the contents of "enum serial_param_type" and "static const struct serial_param_var __initconst sp_vars[]" also be

Re: [Xen-devel] [PATCH 06/15] xen: trace IRQ enabling/disabling

2017-06-01 Thread Dario Faggioli
On Thu, 2017-06-01 at 20:08 +0100, Andrew Cooper wrote: > On 01/06/17 18:34, Dario Faggioli wrote: > > diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c > > index 2a06406..33b903e 100644 > > --- a/xen/common/spinlock.c > > +++ b/xen/common/spinlock.c > > @@ -150,7 +150,9 @@ void

[Xen-devel] [PATCH v2 12/12] xen/scsifront: Remove code that zeroes driver-private command data

2017-06-01 Thread Bart Van Assche
Since the SCSI core zeroes driver-private command data, remove that code from the xen-scsifront driver. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Juergen Gross Cc: xen-de...@lists.xenproject.org Cc:

Re: [Xen-devel] [PATCH 03/15] xen/tools: tracing: several improvements on IRQs tracing

2017-06-01 Thread Dario Faggioli
On Thu, 2017-06-01 at 19:02 +0100, Andrew Cooper wrote: > On 01/06/17 18:33, Dario Faggioli wrote: > > More specifically: > >  - the handling of the TRC_HW_IRQ_HANDLED is fixed, both in > >    xentrace_format and in xenalyze; > >  - simple events for recording when we enter and exit the > >    

Re: [Xen-devel] [PATCH 02/15] xen: tracing: avoid checking tb_init_done multiple times.

2017-06-01 Thread Dario Faggioli
On Thu, 2017-06-01 at 18:53 +0100, Andrew Cooper wrote: > On 01/06/17 18:33, Dario Faggioli wrote: > > diff --git a/xen/common/trace.c b/xen/common/trace.c > > index 4fedc26..f29cd4c 100644 > > --- a/xen/common/trace.c > > +++ b/xen/common/trace.c > > @@ -691,7 +691,8 @@ void __trace_var(u32

Re: [Xen-devel] [PATCH v7] ns16550: Add support for UART parameters to be specifed with name-value pairs

2017-06-01 Thread Andrew Cooper
On 01/06/2017 23:50, Paratey, Swapnil wrote: > >>> So you may have noticed that I did commit this, but then I had to >>> revert it again, as it breaks the build on ARM. Didn't you need the >>> change specifically for ARM? If so, how come you didn't build test >>> it there? >> >> I would be

Re: [Xen-devel] [PATCH v7] ns16550: Add support for UART parameters to be specifed with name-value pairs

2017-06-01 Thread Paratey, Swapnil
So you may have noticed that I did commit this, but then I had to revert it again, as it breaks the build on ARM. Didn't you need the change specifically for ARM? If so, how come you didn't build test it there? I would be surprised if this change is necessary for ARM as we don't support

Re: [Xen-devel] [PATCH v4 3/4] x86/pt: enable binding of GSIs to a PVH Dom0

2017-06-01 Thread Boris Ostrovsky
> @@ -696,7 +777,7 @@ int hvm_do_IRQ_dpci(struct domain *d, struct pirq *pirq) > struct hvm_irq_dpci *dpci = domain_get_irq_dpci(d); > struct hvm_pirq_dpci *pirq_dpci = pirq_dpci(pirq); > > -if ( !iommu_enabled || !dpci || !pirq_dpci || > +if ( !iommu_enabled ||

Re: [Xen-devel] [PATCH v2 05/18] xen/pvcalls: connect to a frontend

2017-06-01 Thread Stefano Stabellini
On Fri, 26 May 2017, Boris Ostrovsky wrote: > On 05/19/2017 07:22 PM, Stefano Stabellini wrote: > > Introduce a per-frontend data structure named pvcalls_back_priv. It > > contains pointers to the command ring, its event channel, a list of > > active sockets and a tree of passive sockets (passing

Re: [Xen-devel] [PATCH] xen/privcmd: Support correctly 64KB page granularity when mapping memory

2017-06-01 Thread Julien Grall
On 01/06/2017 21:41, Boris Ostrovsky wrote: On 06/01/2017 11:38 AM, Julien Grall wrote: Hi Boris, On 01/06/17 16:16, Boris Ostrovsky wrote: On 06/01/2017 10:01 AM, Julien Grall wrote: Hi Boris, On 01/06/17 14:33, Boris Ostrovsky wrote: On 06/01/2017 08:50 AM, Julien Grall wrote: Hi

Re: [Xen-devel] [PATCH v2 01/18] xen: introduce the pvcalls interface header

2017-06-01 Thread Stefano Stabellini
On Thu, 25 May 2017, Boris Ostrovsky wrote: > On 05/19/2017 07:22 PM, Stefano Stabellini wrote: > > Introduce the C header file which defines the PV Calls interface. It is > > imported from xen/include/public/io/pvcalls.h. > > > > Signed-off-by: Stefano Stabellini > > CC:

Re: [Xen-devel] [PATCH v2 04/18] xen/pvcalls: xenbus state handling

2017-06-01 Thread Stefano Stabellini
On Thu, 25 May 2017, Boris Ostrovsky wrote: > On 05/19/2017 07:22 PM, Stefano Stabellini wrote: > > Introduce the code to handle xenbus state changes. > > > > Implement the probe function for the pvcalls backend. Write the > > supported versions, max-page-order and function-calls nodes to

Re: [Xen-devel] [PATCH] xen/privcmd: Support correctly 64KB page granularity when mapping memory

2017-06-01 Thread Boris Ostrovsky
On 06/01/2017 11:38 AM, Julien Grall wrote: > Hi Boris, > > On 01/06/17 16:16, Boris Ostrovsky wrote: >> On 06/01/2017 10:01 AM, Julien Grall wrote: >>> Hi Boris, >>> >>> On 01/06/17 14:33, Boris Ostrovsky wrote: On 06/01/2017 08:50 AM, Julien Grall wrote: > Hi Boris, > > On

Re: [Xen-devel] [PATCH 06/15] xen: trace IRQ enabling/disabling

2017-06-01 Thread Andrew Cooper
On 01/06/17 18:34, Dario Faggioli wrote: > Trace when interrupts are disabled and (re)enabled. > Basically, we replace the IRQ disabling and enabling > functions with helpers that does the same, but also > output the proper trace record. > > For putting in the record something that will let > us

Re: [Xen-devel] [PATCH 05/15] xen: make it possible to disable tracing in Kconfig.

2017-06-01 Thread Andrew Cooper
On 01/06/17 18:34, Dario Faggioli wrote: > And compile it out of the hypervisor entirely. > > Code and other sections' sizes change as follows. > > Output of `size`: > vanilla patched-Y patched-N > text 192900719290071902783 > data 337784 337784 337688 > bss 1310464

[Xen-devel] [qemu-mainline baseline-only test] 71466: regressions - trouble: blocked/broken/fail/pass

2017-06-01 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71466 qemu-mainline real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71466/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win7-amd64 15

Re: [Xen-devel] Notes on stubdoms and latency on ARM

2017-06-01 Thread Stefano Stabellini
On Thu, 1 Jun 2017, George Dunlap wrote: > > On May 31, 2017, at 6:45 PM, Stefano Stabellini > > wrote: > > > > On Wed, 31 May 2017, George Dunlap wrote: > >> On 30/05/17 18:29, Stefano Stabellini wrote: > >>> On Fri, 26 May 2017, Volodymyr Babchuk wrote: > >>> The

[Xen-devel] [xen-unstable-smoke test] 109929: tolerable trouble: broken/pass - PUSHED

2017-06-01 Thread osstest service owner
flight 109929 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/109929/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-libvirt 12

Re: [Xen-devel] [PATCH v10 17/32] ARM: vITS: add command handling stub and MMIO emulation

2017-06-01 Thread Julien Grall
Hi Andre, On 26/05/17 18:35, Andre Przywara wrote: Emulate the memory mapped ITS registers and provide a stub to introduce the ITS command handling framework (but without actually emulating any commands at this time). This fixes a misnomer in our virtual ITS structure, where the spec is

Re: [Xen-devel] [PATCH 03/15] xen/tools: tracing: several improvements on IRQs tracing

2017-06-01 Thread Andrew Cooper
On 01/06/17 18:33, Dario Faggioli wrote: > More specifically: > - the handling of the TRC_HW_IRQ_HANDLED is fixed, both in >xentrace_format and in xenalyze; > - simple events for recording when we enter and exit the >do_IRQ function, as well as when we deal with a guest >IRQ, are

Re: [Xen-devel] [PATCH RFC for-4.9 0/2] x86/pagewalk: Further bugfixes to pagetable walking

2017-06-01 Thread Julien Grall
On 01/06/17 18:57, Andrew Cooper wrote: On 01/06/17 18:55, Julien Grall wrote: Hi Andrew, On 26/05/17 18:03, Andrew Cooper wrote: These bugfixes finally allow my comprehensive XTF test (following several bugfixes, and the added feature of the 0-level pagetable tests) to complete successfully

Re: [Xen-devel] [PATCH RFC for-4.9 0/2] x86/pagewalk: Further bugfixes to pagetable walking

2017-06-01 Thread Andrew Cooper
On 01/06/17 18:55, Julien Grall wrote: > Hi Andrew, > > On 26/05/17 18:03, Andrew Cooper wrote: >> These bugfixes finally allow my comprehensive XTF test (following >> several >> bugfixes, and the added feature of the 0-level pagetable tests) to >> complete >> successfully on a Skylake Server

Re: [Xen-devel] Commit moratorium for branching Xen 4.9

2017-06-01 Thread Julien Grall
Hi, On 26/05/17 07:02, Jan Beulich wrote: On 25.05.17 at 20:00, wrote: On 05/25/2017 01:46 PM, Julien Grall wrote: On 25/05/17 18:08, Boris Ostrovsky wrote: Is this: https://lists.xenproject.org/archives/html/xen-devel/2017-05/msg02340.html being deferred to

Re: [Xen-devel] [PATCH 02/15] xen: tracing: avoid checking tb_init_done multiple times.

2017-06-01 Thread Andrew Cooper
On 01/06/17 18:33, Dario Faggioli wrote: > In fact, when calling __trace_var() directly, we can > assume that tb_init_done has been checked to be true, > and the if is hence redundant. > > While there, also: > - still in __trace_var(), move the check that the event >is actually being traced

Re: [Xen-devel] [PATCH RFC for-4.9 0/2] x86/pagewalk: Further bugfixes to pagetable walking

2017-06-01 Thread Julien Grall
Hi Andrew, On 26/05/17 18:03, Andrew Cooper wrote: These bugfixes finally allow my comprehensive XTF test (following several bugfixes, and the added feature of the 0-level pagetable tests) to complete successfully on a Skylake Server system, with PKU. I know this is getting very tight to the

Re: [Xen-devel] [PATCH for-4.9] x86/mm: Placate DEADCODE Coverity warning

2017-06-01 Thread Andrew Cooper
On 01/06/17 18:25, Julien Grall wrote: > CC Ian + Wei for the testing > > On 01/06/17 12:21, Jan Beulich wrote: > On 01.06.17 at 13:18, wrote: >>> Hi Jan, >>> >>> On 01/06/17 12:15, Jan Beulich wrote: >>> On 01.06.17 at 13:09, wrote: > Hi

Re: [Xen-devel] [PATCH] x86: partially undo "fix build with gcc 7"

2017-06-01 Thread Julien Grall
Hi, On 01/06/17 12:14, Jan Beulich wrote: On 01.06.17 at 13:06, wrote: On 31/05/17 08:51, Jan Beulich wrote: While f32400e90c ("x86: fix build with gcc 7")'s change to compat_array_access_ok() is necessary, I had blindly and needlessly also added it to

[Xen-devel] [PATCH 14/15] xen: trace timers

2017-06-01 Thread Dario Faggioli
Making it possible generate events showing the activity and the behavior of timers. Gate this with its specific Kconfig option (under CONFIG_TRACING), and keep it in disabled state by default. --- Cc: George Dunlap Cc: Andrew Cooper Cc:

[Xen-devel] [PATCH 13/15] tools: tracing: handle tasklets events in xentrace and xenalyze

2017-06-01 Thread Dario Faggioli
Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu --- tools/xentrace/formats|7 +++ tools/xentrace/xenalyze.c | 92

[Xen-devel] [PATCH 15/15] tools: tracing: handle timers events in xentrace and xenalyze

2017-06-01 Thread Dario Faggioli
Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu --- tools/xentrace/formats| 10 +++ tools/xentrace/xenalyze.c | 141

[Xen-devel] [PATCH 12/15] xen: trace tasklets

2017-06-01 Thread Dario Faggioli
Making it possible generate events showing the activity and the behavior of tasklets. Gate this with its specific Kconfig option (under CONFIG_TRACING), and keep it in disabled state by default. --- Cc: George Dunlap Cc: Andrew Cooper Cc:

[Xen-devel] [PATCH 09/15] tools: tracing: handle RCU events in xentrace and xenalyze

2017-06-01 Thread Dario Faggioli
Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu --- tools/xentrace/analyze.h |1 tools/xentrace/formats|9 tools/xentrace/xenalyze.c |

[Xen-devel] [PATCH 11/15] tools: tracing: handle RCU events in xentrace and xenalyze

2017-06-01 Thread Dario Faggioli
Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu --- tools/xentrace/formats|5 +++ tools/xentrace/xenalyze.c | 82

[Xen-devel] [PATCH 07/15] tools: tracing: handle IRQs on/off events in xentrace and xenalyze

2017-06-01 Thread Dario Faggioli
so the trace will show properly decoded info, rather than just a bunch of hex codes. Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Andrew Cooper Cc: Ian Jackson Cc: Wei Liu

[Xen-devel] [PATCH 10/15] xen: trace softirqs

2017-06-01 Thread Dario Faggioli
Making it possible generate events showing the activity and the behavior of the softirq subsystem. Gate this with its specific Kconfig option (under CONFIG_TRACING), and keep it in disabled state by default. --- Cc: George Dunlap Cc: Andrew Cooper

[Xen-devel] [PATCH 08/15] xen: trace RCU behavior

2017-06-01 Thread Dario Faggioli
Making it possible generate events showing the activity and the behavior of the RCU subsystem. Gate this with its specific Kconfig option (under CONFIG_TRACING), and keep it in disabled state by default. --- Cc: George Dunlap Cc: Andrew Cooper

[Xen-devel] [PATCH 05/15] xen: make it possible to disable tracing in Kconfig.

2017-06-01 Thread Dario Faggioli
And compile it out of the hypervisor entirely. Code and other sections' sizes change as follows. Output of `size`: vanilla patched-Y patched-N text 192900719290071902783 data 337784 337784 337688 bss 131046413104641310336 Output of `size -A`:

[Xen-devel] [PATCH 06/15] xen: trace IRQ enabling/disabling

2017-06-01 Thread Dario Faggioli
Trace when interrupts are disabled and (re)enabled. Basically, we replace the IRQ disabling and enabling functions with helpers that does the same, but also output the proper trace record. For putting in the record something that will let us identify _where_ in the code (i.e., in what function)

[Xen-devel] [PATCH 04/15] tools: xenalyze: fix dumping of PM_IDLE events.

2017-06-01 Thread Dario Faggioli
In fact, not all the information present in the trace record were used and printed. Signed-off-by: Dario Faggioli --- George Dunlap Ian Jackson Wei Liu --- tools/xentrace/xenalyze.c | 24

[Xen-devel] [PATCH 03/15] xen/tools: tracing: several improvements on IRQs tracing

2017-06-01 Thread Dario Faggioli
More specifically: - the handling of the TRC_HW_IRQ_HANDLED is fixed, both in xentrace_format and in xenalyze; - simple events for recording when we enter and exit the do_IRQ function, as well as when we deal with a guest IRQ, are added; - tracing of IRQs handled with direct vectors is

[Xen-devel] [PATCH 02/15] xen: tracing: avoid checking tb_init_done multiple times.

2017-06-01 Thread Dario Faggioli
In fact, when calling __trace_var() directly, we can assume that tb_init_done has been checked to be true, and the if is hence redundant. While there, also: - still in __trace_var(), move the check that the event is actually being traced up a little bit (to bail as soon as possible, if it

[Xen-devel] [PATCH 00/15] xen/tools: add tracing to various Xen subsystems

2017-06-01 Thread Dario Faggioli
Hello, While chasing and dealing with bugs, over this last period, I've found myself augmenting Xen with quite a few new tracing capabilities, especially focusing on: - IRQ being disabled and (re)enabled (in addition to the already existing tracing of IRQ related activity that we have); -

[Xen-devel] [PATCH 01/15] xen: in do_softirq() sample smp_processor_id() once and for all.

2017-06-01 Thread Dario Faggioli
In fact, right now, we read it at every iteration of the loop. The reason it's done like this is how context switch was handled on IA64 (see commit ae9bfcdc, "[XEN] Various softirq cleanups" [1]). However: 1) we don't have IA64 any longer, and all the achitectures that we do support, are ok

Re: [Xen-devel] [PATCH for-4.9] x86/mm: Placate DEADCODE Coverity warning

2017-06-01 Thread Julien Grall
CC Ian + Wei for the testing On 01/06/17 12:21, Jan Beulich wrote: On 01.06.17 at 13:18, wrote: Hi Jan, On 01/06/17 12:15, Jan Beulich wrote: On 01.06.17 at 13:09, wrote: Hi Andrew, On 31/05/17 14:23, Andrew Cooper wrote: On 31/05/17 09:52,

[Xen-devel] Check for irqs_disabled in evtchn_fifo_unmask

2017-06-01 Thread Anoob Soman
Hi, Can someone explain, why evtchn_fifo_unmask() requires irqs_disabled(). What happens, if irqs are not disabled ? Thanks, Anoob. ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] xen/public: Correct the HYPERVISOR_dm_op() documentation to match reality

2017-06-01 Thread Julien Grall
Hi, On 01/06/17 14:11, Wei Liu wrote: On Thu, Jun 01, 2017 at 02:10:50PM +0100, Andrew Cooper wrote: The number of buffers is ahead of the buffer list in the argument list. Signed-off-by: Andrew Cooper Acked-by: Wei Liu In general I am

[Xen-devel] [PATCH] VT-d PI: disable VT-d PI when APICv is disabled

2017-06-01 Thread Chao Gao
From the context calling pi_desc_init(), we can conclude the current implementation of VT-d PI depends on CPU-side PI. If we disable APICv but enable VT-d PI explicitly in xen boot command line, we would get an assertion failure. This patch disables VT-d PI when APICv is disabled and adds some

Re: [Xen-devel] [PATCH] xen/privcmd: Support correctly 64KB page granularity when mapping memory

2017-06-01 Thread Julien Grall
Hi Boris, On 01/06/17 16:16, Boris Ostrovsky wrote: On 06/01/2017 10:01 AM, Julien Grall wrote: Hi Boris, On 01/06/17 14:33, Boris Ostrovsky wrote: On 06/01/2017 08:50 AM, Julien Grall wrote: Hi Boris, On 31/05/17 14:54, Boris Ostrovsky wrote: On 05/31/2017 09:03 AM, Julien Grall wrote:

Re: [Xen-devel] [PATCH v4 2/4] x86/physdev: factor out the code to allocate and map a pirq

2017-06-01 Thread Roger Pau Monne
On Thu, Jun 01, 2017 at 03:40:07PM +0100, Andrew Cooper wrote: > On 01/06/17 12:49, Roger Pau Monne wrote: > > Move the code to allocate and map a domain pirq (either GSI or MSI) > > into the x86 irq code base, so that it can be used outside of the > > physdev ops. > > > > This change shouldn't

[Xen-devel] [RFC PATCH v2 2/8] arm/mem_access: Add defines holding the width of 32/64bit regs

2017-06-01 Thread Sergej Proskurin
This commit adds two defines holding the register width of 32 bit and 64 bit registers. These defines simplify using the associated constants in the following commits. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall

[Xen-devel] [PATCH 8/8] arm/mem_access: Walk the guest's pt in software

2017-06-01 Thread Sergej Proskurin
In this commit, we make use of the gpt walk functionality introduced in the previous commits. If mem_access is active, hardware-based gva to ipa translation might fail, as gva_to_ipa uses the guest's translation tables, access to which might be restricted by the active VTTBR. To side-step

[Xen-devel] [RFC PATCH v2 7/8] arm/mem_access: Add short-descriptor based gpt

2017-06-01 Thread Sergej Proskurin
This commit adds functionality to walk the guest's page tables using the short-descriptor translation table format for both ARMv7 and ARMv8. The implementation is based on ARM DDI 0487A-g G4-4189 and ARM DDI 0406C-b B3-1506. Signed-off-by: Sergej Proskurin --- Cc:

[Xen-devel] [PATCH 5/8] arm/mem_access: Add software guest-page-table walk

2017-06-01 Thread Sergej Proskurin
The function p2m_mem_access_check_and_get_page in mem_access.c translates a gva to an ipa by means of the hardware functionality of the ARM architecture. This is implemented in the function gva_to_ipa. If mem_access is active, hardware-based gva to ipa translation might fail, as gva_to_ipa uses

[Xen-devel] [PATCH 1/8] arm/mem_access: Add (TCR_|TTBCR_)* defines

2017-06-01 Thread Sergej Proskurin
This commit adds (TCR_|TTBCR_)* defines to simplify access to the respective register contents. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Define TCR_SZ_MASK in a way so that it can

[Xen-devel] [PATCH 6/8] arm/mem_access: Add long-descriptor based gpt

2017-06-01 Thread Sergej Proskurin
This commit adds functionality to walk the guest's page tables using the long-descriptor translation table format for both ARMv7 and ARMv8. Similar to the hardware architecture, the implementation supports different page granularities (4K, 16K, and 64K). The implementation is based on ARM DDI

[Xen-devel] [RFC PATCH v2 5/8] arm/mem_access: Add software guest-page-table walk

2017-06-01 Thread Sergej Proskurin
The function p2m_mem_access_check_and_get_page in mem_access.c translates a gva to an ipa by means of the hardware functionality of the ARM architecture. This is implemented in the function gva_to_ipa. If mem_access is active, hardware-based gva to ipa translation might fail, as gva_to_ipa uses

[Xen-devel] [RFC PATCH v2 0/8] arm/mem_access: Walk guest page tables in SW if mem_access is active

2017-06-01 Thread Sergej Proskurin
Hi all, The function p2m_mem_access_check_and_get_page is called from the function get_page_from_gva if mem_access is active and the hardware-aided translation of the given guest virtual address (gva) into machine address fails. That is, if the stage-2 translation tables constrain access to the

[Xen-devel] [PATCH 7/8] arm/mem_access: Add short-descriptor based gpt

2017-06-01 Thread Sergej Proskurin
This commit adds functionality to walk the guest's page tables using the short-descriptor translation table format for both ARMv7 and ARMv8. The implementation is based on ARM DDI 0487A-g G4-4189 and ARM DDI 0406C-b B3-1506. Signed-off-by: Sergej Proskurin --- Cc:

[Xen-devel] [RFC PATCH v2 8/8] arm/mem_access: Walk the guest's pt in software

2017-06-01 Thread Sergej Proskurin
In this commit, we make use of the gpt walk functionality introduced in the previous commits. If mem_access is active, hardware-based gva to ipa translation might fail, as gva_to_ipa uses the guest's translation tables, access to which might be restricted by the active VTTBR. To side-step

[Xen-devel] [PATCH 2/8] arm/mem_access: Add defines holding the width of 32/64bit regs

2017-06-01 Thread Sergej Proskurin
This commit adds two defines holding the register width of 32 bit and 64 bit registers. These defines simplify using the associated constants in the following commits. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall

[Xen-devel] [RFC PATCH v2 1/8] arm/mem_access: Add (TCR_|TTBCR_)* defines

2017-06-01 Thread Sergej Proskurin
This commit adds (TCR_|TTBCR_)* defines to simplify access to the respective register contents. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Define TCR_SZ_MASK in a way so that it can

[Xen-devel] [RFC PATCH v2 3/8] arm/mem_access: Add defines supporting PTs with varying page sizes

2017-06-01 Thread Sergej Proskurin
The ARMv8 architecture supports pages with different (4K, 16K, and 64K) sizes. To enable guest page table walks for various configurations, this commit extends the defines and helpers of the current implementation. Signed-off-by: Sergej Proskurin --- Cc: Stefano

[Xen-devel] [PATCH 4/8] arm/mem_access: Add short-descriptor pte typedefs

2017-06-01 Thread Sergej Proskurin
The current implementation does not provide appropriate types for short-descriptor translation table entries. As such, this commit adds new types, which simplify managing the respective translation table entries. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini

[Xen-devel] [PATCH 3/8] arm/mem_access: Add defines supporting PTs with varying page sizes

2017-06-01 Thread Sergej Proskurin
The ARMv8 architecture supports pages with different (4K, 16K, and 64K) sizes. To enable guest page table walks for various configurations, this commit extends the defines and helpers of the current implementation. Signed-off-by: Sergej Proskurin --- Cc: Stefano

[Xen-devel] [RFC PATCH v2 4/8] arm/mem_access: Add short-descriptor pte typedefs

2017-06-01 Thread Sergej Proskurin
The current implementation does not provide appropriate types for short-descriptor translation table entries. As such, this commit adds new types, which simplify managing the respective translation table entries. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini

[Xen-devel] [RFC PATCH v2 6/8] arm/mem_access: Add long-descriptor based gpt

2017-06-01 Thread Sergej Proskurin
This commit adds functionality to walk the guest's page tables using the long-descriptor translation table format for both ARMv7 and ARMv8. Similar to the hardware architecture, the implementation supports different page granularities (4K, 16K, and 64K). The implementation is based on ARM DDI

Re: [Xen-devel] [PATCH] xen/privcmd: Support correctly 64KB page granularity when mapping memory

2017-06-01 Thread Boris Ostrovsky
On 06/01/2017 10:01 AM, Julien Grall wrote: > Hi Boris, > > On 01/06/17 14:33, Boris Ostrovsky wrote: >> On 06/01/2017 08:50 AM, Julien Grall wrote: >>> Hi Boris, >>> >>> On 31/05/17 14:54, Boris Ostrovsky wrote: On 05/31/2017 09:03 AM, Julien Grall wrote: > Commit 5995a68 "xen/privcmd:

Re: [Xen-devel] Notes on stubdoms and latency on ARM

2017-06-01 Thread George Dunlap
On 01/06/17 13:40, Dario Faggioli wrote: > On Thu, 2017-06-01 at 12:52 +0200, George Dunlap wrote: >>> On May 31, 2017, at 6:45 PM, Stefano Stabellini >> .org> wrote: >>> >>> I don't think we should provide that. If the user wants a stable >>> interface, she can use domains. I

Re: [Xen-devel] [PATCH v4 1/4] x86/pt: remove hvm_domid field from bind struct

2017-06-01 Thread Roger Pau Monne
On Thu, Jun 01, 2017 at 07:17:16AM -0600, Jan Beulich wrote: > >>> On 01.06.17 at 13:49, wrote: > > --- a/xen/include/public/domctl.h > > +++ b/xen/include/public/domctl.h > > @@ -559,7 +559,6 @@ typedef enum pt_irq_type_e { > > struct xen_domctl_bind_pt_irq { > >

Re: [Xen-devel] [PATCH v4 2/4] x86/physdev: factor out the code to allocate and map a pirq

2017-06-01 Thread Andrew Cooper
On 01/06/17 12:49, Roger Pau Monne wrote: > Move the code to allocate and map a domain pirq (either GSI or MSI) > into the x86 irq code base, so that it can be used outside of the > physdev ops. > > This change shouldn't affect the functionality of the already existing > physdev ops. > >

Re: [Xen-devel] [PATCH] x86/HAP: don't open code clear_domain_page()

2017-06-01 Thread George Dunlap
On 01/06/17 13:27, Jan Beulich wrote: > Also drop a stray initializer. > > Signed-off-by: Jan Beulich Acked-by: George Dunlap > > --- a/xen/arch/x86/mm/hap/hap.c > +++ b/xen/arch/x86/mm/hap/hap.c > @@ -248,8 +248,7 @@ static void

Re: [Xen-devel] [PATCH v4 2/4] x86/physdev: factor out the code to allocate and map a pirq

2017-06-01 Thread Jan Beulich
>>> On 01.06.17 at 13:49, wrote: > Move the code to allocate and map a domain pirq (either GSI or MSI) > into the x86 irq code base, so that it can be used outside of the > physdev ops. > > This change shouldn't affect the functionality of the already existing > physdev

Re: [Xen-devel] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog+0x217/0x220

2017-06-01 Thread Steven Haigh
On Thursday, 1 June 2017 11:56:28 PM AEST Boris Ostrovsky wrote: > On 05/31/2017 10:25 PM, Steven Haigh wrote: > > On 2017-05-31 00:37, Steven Haigh wrote: > >> On 31/05/17 00:18, Boris Ostrovsky wrote: > >>> On 05/30/2017 06:27 AM, Steven Haigh wrote: > Just wanted to give this a nudge to

Re: [Xen-devel] [PATCH] xen/privcmd: Support correctly 64KB page granularity when mapping memory

2017-06-01 Thread Julien Grall
Hi Boris, On 01/06/17 14:33, Boris Ostrovsky wrote: On 06/01/2017 08:50 AM, Julien Grall wrote: Hi Boris, On 31/05/17 14:54, Boris Ostrovsky wrote: On 05/31/2017 09:03 AM, Julien Grall wrote: Commit 5995a68 "xen/privcmd: Add support for Linux 64KB page granularity" did not go far enough to

Re: [Xen-devel] [PATCH v2] vlapic: fix two flaws in emulating MSR_IA32_APICBASE

2017-06-01 Thread Jan Beulich
>>> On 31.05.17 at 14:41, wrote: > According to SDM Chapter ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER (APIC) > -> Extended XAPIC (x2APIC) -> x2APIC State Transitions, The existing code to > handle guest's writing MSR_IA32_APICBASE has two flaws: > 1. Transition from x2APIC

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-01 Thread Julien Grall
Hi Bhupinder, On 01/06/17 14:34, Bhupinder Thakur wrote: On 26 May 2017 at 19:12, Bhupinder Thakur wrote: + +switch ( vpl011_reg ) +{ +case DR: As mentioned above, you could do: { uint8_t ch; } +vpl011_read_data(v->domain,

Re: [Xen-devel] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog+0x217/0x220

2017-06-01 Thread Boris Ostrovsky
On 05/31/2017 10:25 PM, Steven Haigh wrote: > On 2017-05-31 00:37, Steven Haigh wrote: >> On 31/05/17 00:18, Boris Ostrovsky wrote: >>> On 05/30/2017 06:27 AM, Steven Haigh wrote: Just wanted to give this a nudge to try and get some suggestions on where to go / what to do about this.

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-01 Thread Bhupinder Thakur
Hi Julien, On 26 May 2017 at 19:12, Bhupinder Thakur wrote: >>> + >>> +switch ( vpl011_reg ) >>> +{ >>> +case DR: >> >> >> As mentioned above, you could do: >> >> { >> uint8_t ch; >> >> } >> >>> +vpl011_read_data(v->domain, ); >>> +

Re: [Xen-devel] [PATCH] xen/privcmd: Support correctly 64KB page granularity when mapping memory

2017-06-01 Thread Boris Ostrovsky
On 06/01/2017 08:50 AM, Julien Grall wrote: > Hi Boris, > > On 31/05/17 14:54, Boris Ostrovsky wrote: >> On 05/31/2017 09:03 AM, Julien Grall wrote: >>> Commit 5995a68 "xen/privcmd: Add support for Linux 64KB page >>> granularity" did >>> not go far enough to support 64KB in mmap_batch_fn. >>> >>>

Re: [Xen-devel] [PATCH] x86/hpet: Improve handling of timer_deadline

2017-06-01 Thread Jan Beulich
>>> On 31.05.17 at 16:14, wrote: > Update hpet_broadcast_{enter,exit}() to use this_cpu() rather than per_cpu() > for clarity, I'm afraid this makes things worse in other respects (see below). > @@ -697,8 +696,9 @@ void hpet_broadcast_enter(void) > { > unsigned

Re: [Xen-devel] [PATCH] x86/HAP: don't open code clear_domain_page()

2017-06-01 Thread Andrew Cooper
On 01/06/17 13:27, Jan Beulich wrote: > Also drop a stray initializer. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org

Re: [Xen-devel] [PATCH v4 1/4] x86/pt: remove hvm_domid field from bind struct

2017-06-01 Thread Jan Beulich
>>> On 01.06.17 at 13:49, wrote: > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -559,7 +559,6 @@ typedef enum pt_irq_type_e { > struct xen_domctl_bind_pt_irq { > uint32_t machine_irq; > pt_irq_type_t irq_type; > -uint32_t

Re: [Xen-devel] [PATCH] xen/public: Correct the HYPERVISOR_dm_op() documentation to match reality

2017-06-01 Thread Wei Liu
On Thu, Jun 01, 2017 at 02:10:50PM +0100, Andrew Cooper wrote: > The number of buffers is ahead of the buffer list in the argument list. > > Signed-off-by: Andrew Cooper Acked-by: Wei Liu ___ Xen-devel

[Xen-devel] [PATCH] xen/public: Correct the HYPERVISOR_dm_op() documentation to match reality

2017-06-01 Thread Andrew Cooper
The number of buffers is ahead of the buffer list in the argument list. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Konrad Rzeszutek Wilk

[Xen-devel] [ovmf baseline-only test] 71465: tolerable FAIL

2017-06-01 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71465 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71465/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): build-amd64-libvirt 5 libvirt-build

[Xen-devel] [qemu-mainline test] 109898: tolerable FAIL - PUSHED

2017-06-01 Thread osstest service owner
flight 109898 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/109898/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds15 guest-start/debian.repeat fail REGR. vs. 109701 Tests which did not

Re: [Xen-devel] [PATCH 4/4] SVM: clean up svm_vmcb_isvalid()

2017-06-01 Thread Jan Beulich
>>> On 31.05.17 at 14:14, wrote: > On 31/05/17 08:23, Jan Beulich wrote: >> -if ((vmcb->_cr3 & 0x7) != 0) { >> -PRINTF("CR3: MBZ bits are set (%#"PRIx64")\n", vmcb->_cr3); >> -} >> -if ((vmcb->_efer & EFER_LMA) && (vmcb->_cr3 & 0xfe) != 0) { >> -

Re: [Xen-devel] [PATCH] xen/privcmd: Support correctly 64KB page granularity when mapping memory

2017-06-01 Thread Julien Grall
Hi Boris, On 31/05/17 14:54, Boris Ostrovsky wrote: On 05/31/2017 09:03 AM, Julien Grall wrote: Commit 5995a68 "xen/privcmd: Add support for Linux 64KB page granularity" did not go far enough to support 64KB in mmap_batch_fn. The variable 'nr' is the number of 4KB chunk to map. However, when

Re: [Xen-devel] Notes on stubdoms and latency on ARM

2017-06-01 Thread Dario Faggioli
On Thu, 2017-06-01 at 12:52 +0200, George Dunlap wrote: > > On May 31, 2017, at 6:45 PM, Stefano Stabellini > .org> wrote: > > > > I don't think we should provide that. If the user wants a stable > > interface, she can use domains. I suggested that the code for the > > EL0 >

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-01 Thread Julien Grall
On 01/06/17 11:33, Bhupinder Thakur wrote: Hi Julien, Hi Bhupinder, On 22 May 2017 at 19:54, Julien Grall wrote: +static const struct mmio_handler_ops vpl011_mmio_handler = { +.read = vpl011_mmio_read, +.write = vpl011_mmio_write, +}; + +int

[Xen-devel] [PATCH] x86/HAP: don't open code clear_domain_page()

2017-06-01 Thread Jan Beulich
Also drop a stray initializer. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -248,8 +248,7 @@ static void hap_clean_dirty_bitmap(struc // static struct page_info

[Xen-devel] [PATCH] x86/HVM: correct notion of new CPL in task switch emulation

2017-06-01 Thread Jan Beulich
Commit aac1df3d03 ("x86/HVM: introduce hvm_get_cpl() and respective hook") went too far in one aspect: When emulating a task switch we really shouldn't be looking at what hvm_get_cpl() returns, as we're switching all segment registers. However, instead of reverting the relevant parts of that

Re: [Xen-devel] [PATCH 2/2] x86/pagewalk: Fix pagewalk's handling of instruction fetches

2017-06-01 Thread Jan Beulich
>>> On 01.06.17 at 13:22, wrote: > On 01/06/17 11:51, Jan Beulich wrote: >> While this perhaps is a worthwhile addition, my original request >> really was to make more visible around the place where it matters >> that the NX bit is part of the reserved ones when NX is

Re: [Xen-devel] [PATCH v4 1/4] x86/pt: remove hvm_domid field from bind struct

2017-06-01 Thread Wei Liu
On Thu, Jun 01, 2017 at 12:49:11PM +0100, Roger Pau Monne wrote: > This filed is unused and serves no purpose. > > Signed-off-by: Roger Pau Monné > Reported by: Jan Beulich Missing dash. Acked-by: Wei Liu

[Xen-devel] [PATCH v4 2/4] x86/physdev: factor out the code to allocate and map a pirq

2017-06-01 Thread Roger Pau Monne
Move the code to allocate and map a domain pirq (either GSI or MSI) into the x86 irq code base, so that it can be used outside of the physdev ops. This change shouldn't affect the functionality of the already existing physdev ops. Signed-off-by: Roger Pau Monné --- Cc: Jan

[Xen-devel] [PATCH v4 0/4] x86/dpci: bind legacy PCI interrupts to PVHv2 Dom0

2017-06-01 Thread Roger Pau Monne
Hello, The following patches allow binding bare-metal GSIs into a PVHv2 Dom0, by snooping on the vIO APICs writes made by Dom0. First patch is a cleanup of an unused field from the bind structure, patches 2 and 3 introduce the necessary code to bind GSIs into a PVH Dom0, and patch 4 snoops on

[Xen-devel] [PATCH v4 4/4] x86/vioapic: bind interrupts to PVH Dom0

2017-06-01 Thread Roger Pau Monne
Add the glue in order to bind the PVH Dom0 GSI from bare metal. This is done when Dom0 unmasks the vIO APIC pins, by fetching the current pin settings and setting up the PIRQ, which will then be bound to Dom0. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich

[Xen-devel] [PATCH v4 1/4] x86/pt: remove hvm_domid field from bind struct

2017-06-01 Thread Roger Pau Monne
This filed is unused and serves no purpose. Signed-off-by: Roger Pau Monné Reported by: Jan Beulich --- Cc: Ian Jackson Cc: Wei Liu Cc: Jan Beulich --- Changes since v3: - New in this

[Xen-devel] [PATCH v4 3/4] x86/pt: enable binding of GSIs to a PVH Dom0

2017-06-01 Thread Roger Pau Monne
Achieve this by expanding pt_irq_create_bind in order to support mapping interrupts of type PT_IRQ_TYPE_PCI to a PVH Dom0. GSIs bound to Dom0 are always identity bound, which means the all the fields inside of the u.pci sub-struct are ignored, and only the machine_irq is actually used in order to

  1   2   >