Re: [Xen-devel] [v7][RFC][PATCH 06/13] hvmloader/ram: check if guest memory is out of reserved device memory maps

2014-11-16 Thread Chen, Tiejun
On 2014/11/12 16:55, Jan Beulich wrote: On 12.11.14 at 04:05, wrote: I don't see any feedback to this point, so I think you still prefer we should do all check in the callback function. As a draft this looks reasonable, but there are various bugs to be dealt with along with cosmetic issues (I

Re: [Xen-devel] [PATCH v3 07/15] libxl: disallow attaching the same device more than once

2014-11-16 Thread Li, Liang Z
> Originally the code allowed users to attach the same device more than > once. It just stupidly overwrites xenstore entries. This is bogus as > frontend will be very confused. > > Introduce a helper function to check if the device to be written to > xenstore already exists. A new error code is als

Re: [Xen-devel] [v7][RFC][PATCH 06/13] hvmloader/ram: check if guest memory is out of reserved device memory maps

2014-11-16 Thread Chen, Tiejun
On 2014/11/14 16:21, Jan Beulich wrote: On 14.11.14 at 03:21, wrote: Even if eventually we'll reorder that sequence, this just change that approach to get BDF. Are you fine to this subsequent change? You again pass a struct domain pointer to the IOMMU-specific function. I already told you not

Re: [Xen-devel] dom0 kenrel crashes for openstack + libvirt + libxl

2014-11-16 Thread Xing Lin
Hi, The wiki page is ready. I am not sure whether I am using the correct format or not. Please let me know if any changes are need. Thanks, http://wiki.xenproject.org/wiki/Xen_via_libvirt_for_OpenStack_juno -Xing On Fri, Nov 14, 2014 at 2:01 AM, Ian Campbell wrote: > On Thu, 2014-11-13 at 22:

Re: [Xen-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-16 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 10:47:56AM +0800, Chen, Tiejun wrote: > On 2014/11/5 22:09, Michael S. Tsirkin wrote: > >On Wed, Nov 05, 2014 at 03:22:59PM +0800, Tiejun Chen wrote: > >>Currently IGD drivers always need to access PCH by 1f.0, and > >>PCH vendor/device id is used to identify the card. > >>

[Xen-devel] [PATCH] libxc: Expose the pdpe1gb cpuid flag to guest

2014-11-16 Thread Liang Li
If hardware support the pdpe1gb flag, expose it to guest by default. Users don't have to use a 'cpuid= ' option in config file to turn it on. Signed-off-by: Liang Li --- tools/libxc/xc_cpuid_x86.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_

[Xen-devel] [qemu-upstream-unstable test] 31603: tolerable FAIL - PUSHED

2014-11-16 Thread xen . org
flight 31603 qemu-upstream-unstable real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/31603/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl 9 guest-start fail pass in 31574 test-amd64-amd64-pair

Re: [Xen-devel] [PATCH V6 00/18] x86: Full support of PAT

2014-11-16 Thread Jürgen Groß
On 11/16/2014 02:08 PM, Ingo Molnar wrote: * Juergen Gross wrote: arch/x86/include/asm/cacheflush.h | 38 --- FYI, this series breaks the UML build: In file included from /home/mingo/tip/include/linux/highmem.h:11:0, from /home/mingo/tip/include/linux/pagema

[Xen-devel] support for sharing huge pages with grant table?

2014-11-16 Thread Tim Wood
Hi, I am curious if Xen currently supports sharing hugepages between domains (specifically ones originally allocated in Dom-0 and shared with a guest r/w). I've seen some references to huge pages in the archives of this list, but not in relation to the grant mechanism. Also, can someone confirm t

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

2014-11-16 Thread xen . org
flight 31618 qemu-mainline real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/31618/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 9 guest-start fail REGR. vs. 30603 test-amd64-i386-pai

[Xen-devel] [PATCH V2] Decouple SnadyBridge quirk form VTd timeout

2014-11-16 Thread Don Dugger
Currently the quirk code for SandyBridge uses the VTd timeout value when writing to an IGD register. This is the wrong timeout to use and, at 1000 msec, is much too large. Change this behavior by adding a new boot paramter, snb_igd_timeout, that can specify the timeout to be used when accessing t

Re: [Xen-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-16 Thread Chen, Tiejun
On 2014/11/5 22:09, Michael S. Tsirkin wrote: On Wed, Nov 05, 2014 at 03:22:59PM +0800, Tiejun Chen wrote: Currently IGD drivers always need to access PCH by 1f.0, and PCH vendor/device id is used to identify the card. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 28 +++

Re: [Xen-devel] [Patch v2 2/3] correct xc_domain_save()'s return value

2014-11-16 Thread Wen Congyang
On 11/14/2014 10:57 PM, Ian Jackson wrote: > Wen Congyang writes ("[Patch v2 2/3] correct xc_domain_save()'s return > value"): >> If suspend_and_state() fails, the errno may be 0. But we assume >> that the errno is not 0. So remove assert(). > > Thanks for spotting this. > > I think this is goin

[Xen-devel] [xen-4.2-testing test] 31592: regressions - FAIL

2014-11-16 Thread xen . org
flight 31592 xen-4.2-testing real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/31592/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-pair 18 guest-migrate/dst_host/src_host fail in 31451 REGR. vs. 30594 Tests whi

[Xen-devel] [rumpuserxen bisection] complete test-amd64-i386-rumpuserxen-i386

2014-11-16 Thread xen . org
branch xen-unstable xen branch xen-unstable job test-amd64-i386-rumpuserxen-i386 test rumpuserxen-demo-xenstorels/xenstorels Tree: linux git://xenbits.xen.org/linux-pvops.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu git://xenbits.xen.org/staging/qemu-xen-unst

[Xen-devel] [rumpuserxen test] 31609: regressions - FAIL

2014-11-16 Thread xen . org
flight 31609 rumpuserxen real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/31609/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-rumpuserxen-i386 11 rumpuserxen-demo-xenstorels/xenstorels fail REGR. vs. 31437 tes

[Xen-devel] [PATCH v15 16/21] x86/VPMU: Add support for PMU register handling on PV guests

2014-11-16 Thread Boris Ostrovsky
Intercept accesses to PMU MSRs and process them in VPMU module. Dump VPMU state for all domains (HVM and PV) when requested. Signed-off-by: Boris Ostrovsky Acked-by: Jan Beulich Acked-by: Kevin Tian Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/domain.c | 3

[Xen-devel] [PATCH v15 20/21] x86/VPMU: NMI-based VPMU support

2014-11-16 Thread Boris Ostrovsky
Add support for using NMIs as PMU interrupts to allow profiling hypervisor when interrupts are disabled. Most of processing is still performed by vpmu_do_interrupt(). However, since certain operations are not NMI-safe we defer them to a softint that vpmu_do_interrupt() will schedule: * For PV gue

[Xen-devel] [PATCH v15 00/21] x86/PMU: Xen PMU PV(H) support

2014-11-16 Thread Boris Ostrovsky
Version 15 of PV(H) PMU patches. Changes in v15: * Rewrote vpmu_force_context_switch() to use continue_hypercall_on_cpu() * Added vpmu_init initcall that will call vendor-specific init routines * Added a lock to vpmu_struct to serialize pmu_init()/pmu_finish() * Use SS instead of CS for DPL (inst

[Xen-devel] [PATCH v15 01/21] common/symbols: Export hypervisor symbols to privileged guest

2014-11-16 Thread Boris Ostrovsky
Export Xen's symbols as {} triplet via new XENPF_get_symbol hypercall Signed-off-by: Boris Ostrovsky Acked-by: Daniel De Graaf Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/platform_hypercall.c | 28 +++ xen/common/sym

[Xen-devel] [PATCH v15 05/21] intel/VPMU: Clean up Intel VPMU code

2014-11-16 Thread Boris Ostrovsky
Remove struct pmumsr and core2_pmu_enable. Replace static MSR structures with fields in core2_vpmu_context. Call core2_get_pmc_count() once, during initialization. Properly clean up when core2_vpmu_alloc_resource() fails. Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Dietmar

[Xen-devel] [PATCH v15 19/21] x86/VPMU: Add privileged PMU mode

2014-11-16 Thread Boris Ostrovsky
Add support for privileged PMU mode (XENPMU_MODE_ALL) which allows privileged domain (dom0) profile both itself (and the hypervisor) and the guests. While this mode is on profiling in guests is disabled. Signed-off-by: Boris Ostrovsky Acked-by: Jan Beulich Reviewed-by: Konrad Rzeszutek Wilk Rev

[Xen-devel] [PATCH v15 17/21] x86/VPMU: Handle PMU interrupts for PV guests

2014-11-16 Thread Boris Ostrovsky
Add support for handling PMU interrupts for PV guests. VPMU for the interrupted VCPU is unloaded until the guest issues XENPMU_flush hypercall. This allows the guest to access PMU MSR values that are stored in VPMU context which is shared between hypervisor and domain, thus avoiding traps to hyper

[Xen-devel] [PATCH v15 12/21] x86/VPMU: Initialize VPMUs with __initcall

2014-11-16 Thread Boris Ostrovsky
Move some VPMU initilization operations into __initcalls to avoid performing same tests and calculations for each vcpu. Signed-off-by: Boris Ostrovsky Tested-by: Dietmar Hahn --- xen/arch/x86/hvm/svm/vpmu.c | 115 +--- xen/arch/x86/hvm/vmx/vpmu_core2.c | 154 ++

[Xen-devel] [PATCH v15 07/21] x86/VPMU: Handle APIC_LVTPC accesses

2014-11-16 Thread Boris Ostrovsky
Don't have the hypervisor update APIC_LVTPC when _it_ thinks the vector should be updated. Instead, handle guest's APIC_LVTPC accesses and write what the guest explicitly wanted. Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch

[Xen-devel] [PATCH v15 14/21] x86/VPMU: Save VPMU state for PV guests during context switch

2014-11-16 Thread Boris Ostrovsky
Save VPMU state during context switch for both HVM and PV(H) guests. A subsequent patch ("x86/VPMU: NMI-based VPMU support") will make it possible for vpmu_switch_to() to call vmx_vmcs_try_enter()->vcpu_pause() which needs is_running to be correctly set/cleared. To prepare for that, call context_

[Xen-devel] [PATCH v15 21/21] x86/VPMU: Move VPMU files up from hvm/ directory

2014-11-16 Thread Boris Ostrovsky
Since PMU is now not HVM specific we can move VPMU-related files up from arch/x86/hvm/ directory. Specifically: arch/x86/hvm/vpmu.c -> arch/x86/cpu/vpmu.c arch/x86/hvm/svm/vpmu.c -> arch/x86/cpu/vpmu_amd.c arch/x86/hvm/vmx/vpmu_core2.c -> arch/x86/cpu/vpmu_intel.c include/asm-x86/h

[Xen-devel] [PATCH v15 03/21] x86/VPMU: Set MSR bitmaps only for HVM/PVH guests

2014-11-16 Thread Boris Ostrovsky
In preparation for making VPMU code shared with PV make sure that we we update MSR bitmaps only for HVM/PVH guests Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/hvm/svm/vpmu.c |

[Xen-devel] [PATCH v15 08/21] intel/VPMU: MSR_CORE_PERF_GLOBAL_CTRL should be initialized to zero

2014-11-16 Thread Boris Ostrovsky
MSR_CORE_PERF_GLOBAL_CTRL register should be set zero initially. It is up to the guest to set it so that counters are enabled. Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/hvm/vmx/vpmu_core2.c | 11 +-- 1 file c

[Xen-devel] [PATCH v15 10/21] x86/VPMU: Make vpmu not HVM-specific

2014-11-16 Thread Boris Ostrovsky
vpmu structure will be used for both HVM and PV guests. Move it from hvm_vcpu to arch_vcpu. Signed-off-by: Boris Ostrovsky Acked-by: Jan Beulich Reviewed-by: Kevin Tian Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/include/asm-x86/domain.h | 2 ++ xen/include/asm-x86/hvm/vcpu.h

[Xen-devel] [PATCH v15 15/21] x86/VPMU: When handling MSR accesses, leave fault injection to callers

2014-11-16 Thread Boris Ostrovsky
With this patch return value of 1 of vpmu_do_msr() will now indicate whether an error was encountered during MSR processing (instead of stating that the access was to a VPMU register). As part of this patch we also check for validity of certain MSR accesses right when we determine which register i

[Xen-devel] [PATCH v15 13/21] x86/VPMU: Initialize PMU for PV(H) guests

2014-11-16 Thread Boris Ostrovsky
Code for initializing/tearing down PMU for PV guests Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- tools/flask/policy/policy/modules/xen/xen.te | 4 ++ xen/arch/x86/domain.c

[Xen-devel] [PATCH v15 09/21] x86/VPMU: Add public xenpmu.h

2014-11-16 Thread Boris Ostrovsky
Add pmu.h header files, move various macros and structures that will be shared between hypervisor and PV guests to it. Move MSR banks out of architectural PMU structures to allow for larger sizes in the future. The banks are allocated immediately after the context and PMU structures store offsets

[Xen-devel] [PATCH v15 02/21] x86/VPMU: Manage VPMU_CONTEXT_SAVE flag in vpmu_save_force()

2014-11-16 Thread Boris Ostrovsky
There is a possibility that we set VPMU_CONTEXT_SAVE on VPMU context in vpmu_load() and never clear it (because vpmu_save_force() will see VPMU_CONTEXT_LOADED bit clear, which is possible on AMD processors) The problem is that amd_vpmu_save() assumes that if VPMU_CONTEXT_SAVE is set then (1) we ne

[Xen-devel] [PATCH v15 11/21] x86/VPMU: Interface for setting PMU mode and flags

2014-11-16 Thread Boris Ostrovsky
Add runtime interface for setting PMU mode and flags. Three main modes are provided: * XENPMU_MODE_OFF: PMU is not virtualized * XENPMU_MODE_SELF: Guests can access PMU MSRs and receive PMU interrupts. * XENPMU_MODE_HV: Same as XENPMU_MODE_SELF for non-proviledged guests, dom0 can profile itself

[Xen-devel] [PATCH v15 06/21] vmx: Merge MSR management routines

2014-11-16 Thread Boris Ostrovsky
vmx_add_host_load_msr() and vmx_add_guest_msr() share fair amount of code. Merge them to simplify code maintenance. Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/hvm/vmx/vmcs.c

[Xen-devel] [PATCH v15 04/21] x86/VPMU: Make vpmu macros a bit more efficient

2014-11-16 Thread Boris Ostrovsky
Introduce vpmu_are_all_set that allows testing multiple bits at once. Convert macros into inlines for better compiler checking. Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/hvm/vmx/v

[Xen-devel] [PATCH v15 18/21] x86/VPMU: Merge vpmu_rdmsr and vpmu_wrmsr

2014-11-16 Thread Boris Ostrovsky
The two routines share most of their logic. Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/hvm/vpmu.c| 69 +- xen/include/asm-x86/hvm/vpm

[Xen-devel] [linux-3.10 test] 31606: regressions - trouble: broken/fail/pass

2014-11-16 Thread xen . org
flight 31606 linux-3.10 real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/31606/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-rhel6hvm-intel 7 redhat-install fail REGR. vs. 26303 test-amd64-i386-qemut-

Re: [Xen-devel] [PATCH 2/4] Fix build when Xen is not enabled

2014-11-16 Thread Christoffer Dall
On Mon, Nov 10, 2014 at 02:09:59PM +, Ian Campbell wrote: > If Xen isn't enabled then XEN_IMAGE ends up as "no.o", which obviously doesn't > exist. Handle the dependency explicitly. > > Signed-off-by: Ian Campbell > --- > Makefile.am |5 - > 1 file changed, 4 insertions(+), 1 deletio

Re: [Xen-devel] [PATCH 1/4] xen: Correction to module@1 (dom0 kernel) DT node.

2014-11-16 Thread Christoffer Dall
Hi Ian, On Mon, Nov 10, 2014 at 02:09:58PM +, Ian Campbell wrote: > - Include bootargs (kernel command line) property. Why? The logic I was going for was to reduce duplicate code/entries in the DT, and if I read docs/misc/arm/device-tree/booting.txt, the fact that we have xen,xen-bootargs bu

Re: [Xen-devel] [PATCH] pc: piix4_pm: init legacy PCI hotplug when running on Xen

2014-11-16 Thread Li, Liang Z
> > > Konrad, > > > this is another bug fix for QEMU: pci hotplug doesn't work when > > > xen_platform_pci=0 without this. > > > > Yes. > > > > > >I think we should have it in 4.5. What do yo think? > > > > Do you believe we should first get an Tested-by from the Intel QA folks? > Liang at Intel

Re: [Xen-devel] [PATCH V6 00/18] x86: Full support of PAT

2014-11-16 Thread Ingo Molnar
* Juergen Gross wrote: > arch/x86/include/asm/cacheflush.h | 38 --- FYI, this series breaks the UML build: In file included from /home/mingo/tip/include/linux/highmem.h:11:0, from /home/mingo/tip/include/linux/pagemap.h:10, from /home/mingo/tip/i

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

2014-11-16 Thread xen . org
flight 31599 qemu-mainline real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/31599/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 9 guest-start fail REGR. vs. 30603 test-amd64-i386-pai

Re: [Xen-devel] vtpmmgr bug: fails to start if locality!=0

2014-11-16 Thread Emil Condrea
It seems that tpm_tis_request_locality did not manage to wait enough for locality change. I suspect that if timeout_a does not have correct value it will not wait enough in that loop and it will exit too soon. Can you do this test again replacing timeout_a value from tpm_tis_request_locality =>(sto