Re: [Xen-devel] [PATCH v3 1/2] efi: Fix allocation problems if ExitBootServices() fails

2015-06-02 Thread Ian Campbell
On Mon, 2015-06-01 at 14:20 -0700, Roy Franz wrote: On Mon, Jun 1, 2015 at 4:24 AM, Ian Campbell ian.campb...@citrix.com wrote: On Mon, 2015-06-01 at 12:10 +0100, Jan Beulich wrote: On 01.06.15 at 12:17, ross.lagerw...@citrix.com wrote: If calling ExitBootServices() fails, the required

[Xen-devel] [PATCH v4] efi: Avoid calling boot services after ExitBootServices()

2015-06-02 Thread Ross Lagerwall
After the first call to ExitBootServices(), avoid calling any boot services by setting setting efi_bs to NULL and halting in blexit(). Signed-off-by: Ross Lagerwall ross.lagerw...@citrix.com --- * Separated halt into an arch hook. * Applies on top of the first patch from v3. * Tested on x86, not

Re: [Xen-devel] [PATCH v1 COLO Pre 04/12] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-02 Thread Yang Hongyang
On 06/02/2015 05:38 PM, Wen Congyang wrote: On 06/02/2015 05:26 PM, Yang Hongyang wrote: [...] +int libxl__qmp_restore(libxl__gc *gc, int domid, const char *state_file) +{ +libxl__json_object *args = NULL; + +qmp_parameters_add_string(gc, args, filename, state_file); + +return

[Xen-devel] [PATCH RFC v1] Modified RTDS scheduler to use an event-driven model instead of polling.

2015-06-02 Thread Dagaen Golomb
To do this, we create a new list that holds, for each vcpu, the time least into the future that it may need to be rescheduled. The scheduler chooses the lowest time off of this list and waits until the specified time instead of running every 1 ms as it did before. Signed-off-by: Dagaen Golomb

Re: [Xen-devel] Xen/arm: Virtual ITS command queue handling

2015-06-02 Thread Ian Campbell
On Mon, 2015-06-01 at 15:57 -0700, Manish Jaggi wrote: Anyway, the general shape of this plan seems plausible enough. Could you modify the http://xenbits.xen.org/people/ianc/vits/draftC.html(5 vITS to pITS mapping) based on this approach I'm updating things as I go and feed back will be

Re: [Xen-devel] [xen-unstable test] 57712: regressions - trouble: broken/fail/pass

2015-06-02 Thread Andrew Cooper
On 02/06/15 03:27, osstest service user wrote: flight 57712 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/57712/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-cubietruck 15

Re: [Xen-devel] [PATCH] nested EPT: fix the handling of nested EPT.

2015-06-02 Thread Jan Beulich
On 02.06.15 at 19:41, liang.z...@intel.com wrote: @@ -1074,6 +1075,9 @@ void ept_sync_domain(struct p2m_domain *p2m) if ( !paging_mode_hap(d) || !d-vcpu || !d-vcpu[0] ) return; +if ( nestedhvm_enabled(d) ) +p2m_flush_nestedp2m(d); +

Re: [Xen-devel] [PATCH v8 01/13] x86: add socket_cpumask

2015-06-02 Thread Chao Peng
On Tue, Jun 02, 2015 at 07:57:55AM +0100, Jan Beulich wrote: On 02.06.15 at 08:35, chao.p.p...@linux.intel.com wrote: On Fri, May 29, 2015 at 09:52:03AM +0100, Jan Beulich wrote: On 29.05.15 at 10:28, chao.p.p...@linux.intel.com wrote: On Fri, May 29, 2015 at 09:01:53AM +0100, Jan

[Xen-devel] ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk

2015-06-02 Thread Sanjeev Pandita
All, I am pretty new to xen . I am trying to boot DOMU with qemu qcow AARCH64 Ubuntu 15.04 disk on Xen but I am getting the errors which link to /usr/local/lib/xen/bin/qemu-system-i386. Since I am working on aarch64 system the /usr/local/lib/xen/bin/qemu-system-i386 bin might not be present or

Re: [Xen-devel] [PATCH v1 COLO Pre 04/12] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-02 Thread Wen Congyang
On 06/02/2015 05:26 PM, Yang Hongyang wrote: Secondary vm is running in colo mode. So we will do the following things again and again: 1. suspend both primay vm and secondary vm 2. sync the state 3. resume both primary vm and secondary vm We will send qemu's state each time in step2, and

Re: [Xen-devel] ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk

2015-06-02 Thread Stefan Bader
On 02.06.2015 09:40, Sanjeev Pandita wrote: All, I am pretty new to xen . I am trying to boot DOMU with qemu qcow AARCH64 Ubuntu 15.04 disk on Xen but I am getting the errors which link to /usr/local/lib/xen/bin/qemu-system-i386. Since I am working on aarch64 system the

[Xen-devel] [PATCH v1 COLO Pre 08/12] tools/libxl: Update libxl_save_msgs_gen.pl to support return data from xl to xc

2015-06-02 Thread Yang Hongyang
From: Wen Congyang we...@cn.fujitsu.com Currently, all callbacks return an integer value or void. We cannot return some data to xc via callback. Update libxl_save_msgs_gen.pl to support this case. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- tools/libxl/libxl_internal.h | 3 ++

[Xen-devel] [PATCH v1 COLO Pre 10/12] tools/libxl: rename remus device to checkpoint device

2015-06-02 Thread Yang Hongyang
This patch is auto generated by the following commands: 1. git mv tools/libxl/libxl_remus_device.c tools/libxl/libxl_checkpoint_device.c 2. perl -pi -e 's/libxl_remus_device/libxl_checkpoint_device/g' tools/libxl/Makefile 3. perl -pi -e 's/\blibxl__remus_devices/libxl__checkpoint_devices/g'

[Xen-devel] [PATCH v1 COLO Pre 03/12] tools/libxc: export xc_bitops.h

2015-06-02 Thread Yang Hongyang
When we are under COLO, we will send dirty page bitmap info from secondary to primary at every checkpoint. So we need to get/test the dirty page bitmap. We just expose xc_bitops.h for libxl use. NOTE: Need to make clean and rerun configure to get it compiled. Signed-off-by: Yang Hongyang

[Xen-devel] [PATCH v1 COLO Pre 12/12] tools/libxl: don't touch remus in checkpoint_device

2015-06-02 Thread Yang Hongyang
Checkpoint device is an abstract layer to do checkpoint. COLO can also use it to do checkpoint. But there are still some codes in checkpoint device which touch remus: 1. remus_ops: we use remus ops directly in checkpoint device. Store it in checkpoint device state. 2. concrete layer's private

[Xen-devel] [PATCH v1 COLO Pre 04/12] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-02 Thread Yang Hongyang
Secondary vm is running in colo mode. So we will do the following things again and again: 1. suspend both primay vm and secondary vm 2. sync the state 3. resume both primary vm and secondary vm We will send qemu's state each time in step2, and slave's qemu should read it each time before resuming

[Xen-devel] [PATCH v1 COLO Pre 02/12] libxc/restore: zero ioreq page only one time

2015-06-02 Thread Yang Hongyang
ioreq page contains evtchn which will be set when we resume the secondary vm the first time. The hypervisor will check if the evtchn is corrupted, so we cannot zero the ioreq page more than one time. The ioreq-state is always STATE_IOREQ_NONE after the vm is suspended, so it is OK if we only zero

[Xen-devel] [PATCH v1 COLO Pre 11/12] tools/libxl: adjust the indentation

2015-06-02 Thread Yang Hongyang
This is just tidying up after the previous automatic renaming. Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- tools/libxl/libxl_checkpoint_device.c | 21 +++-- tools/libxl/libxl_internal.h | 19 +++

[Xen-devel] [PATCH v1 COLO Pre 06/12] tools/libxl: Update libxl__domain_unpause() to support qemu-xen

2015-06-02 Thread Yang Hongyang
Currently, libxl__domain_unpause() only supports qemu-xen-traditional. Update it to support qemu-xen. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- tools/libxl/libxl.c | 42 +- 1 file changed, 33

[Xen-devel] [PATCH v1 COLO Pre 05/12] tools/libxl: Introduce a new internal API libxl__domain_unpause()

2015-06-02 Thread Yang Hongyang
From: Wen Congyang we...@cn.fujitsu.com The guest is paused after libxl_domain_create_restore(). Secondary vm is running in colo mode. So we need to unpause the guest. The current API libxl_domain_unpause() is not an internal API. Introduce a new API to support it. No functional change.

[Xen-devel] [PATCH v1 COLO Pre 00/12] Prerequisite patches for COLO

2015-06-02 Thread Yang Hongyang
This patchset is Prerequisite for COLO feature. For what COLO is, refer to http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping This patchset is based on: [PATCH v1 0/5] Misc cleanups for libxl http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg02591.html and is taken from

[Xen-devel] [PATCH v1 COLO Pre 07/12] tools/libxl: introduce libxl__domain_common_switch_qemu_logdirty()

2015-06-02 Thread Yang Hongyang
Secondary vm is running in colo mode, we need to send secondary vm's dirty page information to master at checkpoint, so we have to enable qemu logdirty on secondary. libxl__domain_suspend_common_switch_qemu_logdirty() is to enable qemu logdirty. But it uses domain_save_state, and calls

[Xen-devel] [PATCH v1 COLO Pre 01/12] tools/libxc: support to resume uncooperative HVM guests

2015-06-02 Thread Yang Hongyang
From: Wen Congyang we...@cn.fujitsu.com For PVHVM, the hypercall return code is 0, and it can be resumed in a new domain context. we suspend PVHVM and resume it is like this: 1. suspend it via evtchn 2. modifty the return code to 1 3. the guest know that the suspend is cancelled, we will use fast

[Xen-devel] [PATCH v1 COLO Pre 09/12] tools/libxl: Add back channel to allow migration target send data back

2015-06-02 Thread Yang Hongyang
From: Wen Congyang we...@cn.fujitsu.com In colo mode, slave needs to send data to master, but the io_fd only can be written in master, and only can be read in slave. Save recv_fd in domain_suspend_state, and send_fd in domain_create_state. Signed-off-by: Wen Congyang we...@cn.fujitsu.com

Re: [Xen-devel] [PATCH v8 01/13] x86: add socket_cpumask

2015-06-02 Thread Jan Beulich
On 02.06.15 at 08:35, chao.p.p...@linux.intel.com wrote: On Fri, May 29, 2015 at 09:52:03AM +0100, Jan Beulich wrote: On 29.05.15 at 10:28, chao.p.p...@linux.intel.com wrote: On Fri, May 29, 2015 at 09:01:53AM +0100, Jan Beulich wrote: On 29.05.15 at 04:35, chao.p.p...@linux.intel.com

[Xen-devel] [RESEND] nested EPT: fix the handling of nested EPT.

2015-06-02 Thread Liang Li
If the host EPT entry is changed, the nested EPT should be updated. The current code does not do this, and it's wrong. Reported-by: Tim Deegan t...@xen.org Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- xen/arch/x86/mm/p2m-ept.c | 4 1 file

[Xen-devel] [linux-next test] 57731: regressions - trouble: blocked/broken/fail/pass

2015-06-02 Thread osstest service user
flight 57731 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/57731/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-amd64 6 xen-boot fail REGR. vs. 57516

Re: [Xen-devel] [Draft C] Xen on ARM vITS Handling

2015-06-02 Thread Ian Campbell
On Mon, 2015-06-01 at 16:29 +0100, Julien Grall wrote: On 01/06/15 14:12, Ian Campbell wrote: On Fri, 2015-05-29 at 14:40 +0100, Julien Grall wrote: Hi Ian, Hi Ian, NIT: You used my Linaro email which I think is de-activated now :). I keep finding new address books with that

Re: [Xen-devel] [Patch v3 27/36] x86, irq: Use access helper irq_data_get_affinity_mask()

2015-06-02 Thread Thomas Gleixner
On Mon, 1 Jun 2015, Jiang Liu wrote: diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 9b62f690b0ff..dfa3a5f5b3d3 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -494,9 +494,8 @@ static int apic_set_affinity(struct irq_data

[Xen-devel] [xen-4.3-testing test] 57749: regressions - trouble: blocked/broken/fail/pass

2015-06-02 Thread osstest service user
flight 57749 xen-4.3-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/57749/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 3 host-install(3) broken in 57680 REGR. vs. 53768

[Xen-devel] [PATCH v7 1/4] pci: add PCI_SBDF and PCI_SEG macros

2015-06-02 Thread elena . ufimtseva
From: Elena Ufimtseva elena.ufimts...@oracle.com Signed-off-by: Elena Ufimtseva elena.ufimts...@oracle.com --- xen/include/xen/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index 3908146..414106a 100644 --- a/xen/include/xen/pci.h +++

[Xen-devel] [PATCH v7 0/4] iommu: add rmrr Xen command line option

2015-06-02 Thread elena . ufimtseva
From: Elena Ufimtseva elena.ufimts...@oracle.com v7 of rmrr comman line patches. Thank you for comments on v6. Add Xen command line option rmrr to specify RMRR regions for devices that are not defined

[Xen-devel] [PATCH v3] dmar: device scope mem leak fix

2015-06-02 Thread elena . ufimtseva
From: Elena Ufimtseva elena.ufimts...@oracle.com Third attempt to incorporate memory leak fix. Thanks for comment on v2. Release memory allocated for scope.devices when disabling dmar units. Also set device count after memory allocation when device scope parsing. Changes in v3: - make freeing

[Xen-devel] [seabios test] 57755: tolerable FAIL - PUSHED

2015-06-02 Thread osstest service user
flight 57755 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/57755/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm 12 guest-localmigrate fail never pass

Re: [Xen-devel] [PATCHv2] frontswap: allow multiple backends

2015-06-02 Thread Andrew Morton
On Mon, 1 Jun 2015 10:22:24 -0400 Dan Streetman ddstr...@ieee.org wrote: Change frontswap single pointer to a singly linked list of frontswap implementations. Update Xen tmem implementation as register no longer returns anything. Frontswap only keeps track of a single implementation; any

[Xen-devel] [PATCH v7 4/4] iommu: add rmrr Xen command line option for extra rmrrs

2015-06-02 Thread elena . ufimtseva
From: Elena Ufimtseva elena.ufimts...@oracle.com From: Elena Ufimtseva elena.ufimts...@oracle.com On some platforms RMRR regions may be not specified in ACPI and thus will not be mapped 1:1 in dom0. This causes IO Page Faults and prevents dom0 from booting in PVH mode. New Xen command line

[Xen-devel] [PATCH v7 2/4] iommu VT-d: separate rmrr addition function

2015-06-02 Thread elena . ufimtseva
From: Elena Ufimtseva elena.ufimts...@oracle.com In preparation for auxiliary RMRR data provided on Xen command line, make RMRR adding a separate function. Also free memery for rmrr device scope in error path. Signed-off-by: Elena Ufimtseva elena.ufimts...@oracle.com ---

Re: [Xen-devel] RFC: QEMU bumping memory limit and domain restore

2015-06-02 Thread Yang Hongyang
On 06/02/2015 11:49 PM, Ian Campbell wrote: On Tue, 2015-06-02 at 15:08 +0100, Wei Liu wrote: [...] So here is a proof of concept patch to record and honour that value during migration. A new field is added in IDL. Note that we don't provide xl level config option for it and mandate it to be

Re: [Xen-devel] [PATCHv3] frontswap: allow multiple backends

2015-06-02 Thread Andrew Morton
On Tue, 2 Jun 2015 18:08:46 -0400 Dan Streetman ddstr...@ieee.org wrote: Change frontswap single pointer to a singly linked list of frontswap implementations. Update Xen tmem implementation as register no longer returns anything. Frontswap only keeps track of a single implementation; any

Re: [Xen-devel] [PATCHv2] frontswap: allow multiple backends

2015-06-02 Thread Dan Streetman
On Tue, Jun 2, 2015 at 5:06 PM, Andrew Morton a...@linux-foundation.org wrote: On Mon, 1 Jun 2015 10:22:24 -0400 Dan Streetman ddstr...@ieee.org wrote: Change frontswap single pointer to a singly linked list of frontswap implementations. Update Xen tmem implementation as register no longer

[Xen-devel] [PATCHv3] frontswap: allow multiple backends

2015-06-02 Thread Dan Streetman
Change frontswap single pointer to a singly linked list of frontswap implementations. Update Xen tmem implementation as register no longer returns anything. Frontswap only keeps track of a single implementation; any implementation that registers second (or later) will replace the previously

Re: [Xen-devel] [PATCH v1 4/5] tools/libxl: move toolstack code into libxl_toolstack.c

2015-06-02 Thread Yang Hongyang
On 06/03/2015 12:22 AM, Yang Hongyang wrote: On 06/02/2015 10:48 PM, Ian Campbell wrote: On Wed, 2015-05-20 at 18:01 +0800, Yang Hongyang wrote: move toolstack code into libxl_toolstack.c It's not clear to me what toolstack code is here, the whole of libxl and xl is toolstack code. Is

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

2015-06-02 Thread osstest service user
flight 57781 xen-4.2-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/57781/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xend-winxpsp3 16 guest-stop fail REGR. vs. 53018

Re: [Xen-devel] [RFC][v2][PATCH 08/14] tools: extend xc_assign_device() to support rdm reservation policy

2015-06-02 Thread Chen, Tiejun
On 2015/6/3 0:36, Wei Liu wrote: On Fri, May 22, 2015 at 05:35:08PM +0800, Tiejun Chen wrote: This patch passes rdm reservation policy to xc_assign_device() so the policy is checked when assigning devices to a VM. Signed-off-by: Tiejun Chen tiejun.c...@intel.com ---

Re: [Xen-devel] [RFC][v2][PATCH 01/14] tools: introduce some new parameters to set rdm policy

2015-06-02 Thread Chen, Tiejun
+=item Brdm= RDM_RESERVE_STRING Stray space after before and after RDM_RESERVE_STRING. Sure, =item Brdm=RDM_RESERVE_STRING + +(HVM/x86 only) Specifies the information about Reserved Device Memory (RDM), +which is necessary to enable robust device passthrough usage. One example of

Re: [Xen-devel] [Patch v3 27/36] x86, irq: Use access helper irq_data_get_affinity_mask()

2015-06-02 Thread Jiang Liu
On 2015/6/3 3:19, Thomas Gleixner wrote: On Mon, 1 Jun 2015, Jiang Liu wrote: diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 9b62f690b0ff..dfa3a5f5b3d3 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -494,9 +494,8 @@

Re: [Xen-devel] [RFC][v2][PATCH 04/14] tools/libxl: detect and avoid conflicts with RDM

2015-06-02 Thread Chen, Tiejun
On 2015/6/3 0:29, Wei Liu wrote: On Fri, May 22, 2015 at 05:35:04PM +0800, Tiejun Chen wrote: While building a VM, HVM domain builder provides struct hvm_info_table{} to help hvmloader. Currently it includes two fields to construct guest e820 table by hvmloader, low_mem_pgend and

[Xen-devel] [Patch v3 27/36] x86, irq: Use access helper irq_data_get_affinity_mask()

2015-06-02 Thread Jiang Liu
Use access helper irq_data_get_affinity_mask() to hide implementation details of struct irq_desc. Signed-off-by: Jiang Liu jiang@linux.intel.com --- Hi Thomas, This version changes the patch to correctly support bisecting. Thanks! Gerry --- arch/x86/kernel/apic/io_apic.c |2 +-

[Xen-devel] [PATCH v9 12/13] tools: add tools support for Intel CAT

2015-06-02 Thread Chao Peng
This is the xc/xl changes to support Intel Cache Allocation Technology(CAT). 'xl psr-hwinfo' is updated to show CAT info and two new commands for CAT are introduced: - xl psr-cat-cbm-set [-s socket] domain cbm Set cache capacity bitmasks(CBM) for a domain. - xl psr-cat-show domain Show CAT

[Xen-devel] [PATCH v9 02/13] x86: detect and initialize Intel CAT feature

2015-06-02 Thread Chao Peng
Detect Intel Cache Allocation Technology(CAT) feature and store the cpuid information for later use. Currently only L3 cache allocation is supported. The L3 CAT features may vary among sockets so per-socket feature information is stored. The initialization can happen either at boot time or when

[Xen-devel] [PATCH v9 08/13] xsm: add CAT related xsm policies

2015-06-02 Thread Chao Peng
Add xsm policies for Cache Allocation Technology(CAT) related hypercalls to restrict the functions visibility to control domain only. Signed-off-by: Chao Peng chao.p.p...@linux.intel.com Acked-by: Daniel De Graaf dgde...@tycho.nsa.gov --- tools/flask/policy/policy/modules/xen/xen.if | 2 +-

[Xen-devel] [PATCH v9 13/13] docs: add xl-psr.markdown

2015-06-02 Thread Chao Peng
Add document to introduce basic concepts and terms in PSR family technologies and the xl interfaces. Signed-off-by: Chao Peng chao.p.p...@linux.intel.com Acked-by: Ian Campbell ian.campb...@citrix.com --- Changes in v7: * Correct 'xl psr-hwinfo'. Changes in v6: * Address comments from Ian.

[Xen-devel] [PATCH v9 06/13] x86: dynamically get/set CBM for a domain

2015-06-02 Thread Chao Peng
For CAT, COS is maintained in hypervisor only while CBM is exposed to user space directly to allow getting/setting domain's cache capacity. For each specified CBM, hypervisor will either use a existed COS which has the same CBM or allocate a new one if the same CBM is not found. If the allocation

[Xen-devel] [PATCH v9 01/13] x86: add socket_cpumask

2015-06-02 Thread Chao Peng
Maintain socket_cpumask which contains all the HT and core siblings in the same socket. Signed-off-by: Chao Peng chao.p.p...@linux.intel.com --- Changes in v9: * Add comments for set_nr_sockets. * Move set_nr_sockets() invocation from __start_xen() to smp_prepare_cpus(). Changes in v8: * Remove

[Xen-devel] [PATCH v9 03/13] x86: maintain COS to CBM mapping for each socket

2015-06-02 Thread Chao Peng
For each socket, a COS to CBM mapping structure is maintained for each COS. The mapping is indexed by COS and the value is the corresponding CBM. Different VMs may use the same CBM, a reference count is used to indicate if the CBM is available. Signed-off-by: Chao Peng chao.p.p...@linux.intel.com

[Xen-devel] [PATCH v9 04/13] x86: add COS information for each domain

2015-06-02 Thread Chao Peng
In Xen's implementation, the CAT enforcement granularity is per domain. Due to the length of CBM and the number of COS may be socket-different, each domain has COS ID for each socket. The domain get COS=0 by default and at runtime its COS is then allocated dynamically when user specifies a CBM for

[Xen-devel] [PATCH v9 05/13] x86: expose CBM length and COS number information

2015-06-02 Thread Chao Peng
General CAT information such as maximum COS and CBM length are exposed to user space by a SYSCTL hypercall, to help user space to construct the CBM. Signed-off-by: Chao Peng chao.p.p...@linux.intel.com Reviewed-by: Andrew Cooper andrew.coop...@citrix.com --- Changes in v9: * Initialize 'info'

[Xen-devel] [PATCH v9 00/13] enable Cache Allocation Technology (CAT) for VMs

2015-06-02 Thread Chao Peng
Changes in v9: Address comments from Jan, mainly: * Move set_nr_sockets() invocation from __start_xen() to smp_prepare_cpus(). * Add check for cpuid_level. * Add priority for cpu notifier. * Allocate cos_to_cbm with opt_cos_max instead of the actual cos_max from cpuid. * Move CAT initialization

[Xen-devel] [PATCH v9 07/13] x86: add scheduling support for Intel CAT

2015-06-02 Thread Chao Peng
On context switch, write the the domain's Class of Service(COS) to MSR IA32_PQR_ASSOC, to notify hardware to use the new COS. For performance reason, the COS mask for current cpu is also cached in the local per-CPU variable. Signed-off-by: Chao Peng chao.p.p...@linux.intel.com Acked-by: Jan

[Xen-devel] [PATCH v9 11/13] tools/libxl: introduce some socket helpers

2015-06-02 Thread Chao Peng
Add libxl_socket_bitmap_alloc() to allow allocating a socket specific libxl_bitmap (as it is for cpu/node bitmap). Internal function libxl__count_physical_sockets() is introduced together to get the socket count when the size of bitmap is not specified. Signed-off-by: Chao Peng

[Xen-devel] [PATCH v9 10/13] tools/libxl: add command to show PSR hardware info

2015-06-02 Thread Chao Peng
Add dedicated one to show hardware information. [root@vmm-psr]xl psr-hwinfo Cache Monitoring Technology (CMT): Enabled : 1 Total RMID : 63 Supported monitor types: cache-occupancy total-mem-bandwidth local-mem-bandwidth Signed-off-by: Chao Peng chao.p.p...@linux.intel.com

[Xen-devel] [PATCH 1/3] drivers: xen-blkback: delay pending_req allocation to connect_ring

2015-06-02 Thread Bob Liu
This is a pre-patch for multi-page ring feature. In connect_ring, we can know exactly how many pages are used for the shared ring, delay pending_req allocation here so that we won't waste too much memory. Signed-off-by: Bob Liu bob@oracle.com --- drivers/block/xen-blkback/common.h |2 +-

[Xen-devel] [PATCH 2/3] driver: xen-blkfront: move talk_to_blkback to a more suitable place

2015-06-02 Thread Bob Liu
The major responsibility of talk_to_blkback() is allocate and initialize the request ring and write the ring info to xenstore. But this work should be done after backend entered 'XenbusStateInitWait' as defined in the protocol file. See xen/include/public/io/blkif.h in XEN git tree: Front

[Xen-devel] [PATCH 3/3] xen/block: add multi-page ring support

2015-06-02 Thread Bob Liu
Extend xen/block to support multi-page ring, so that more requests can be issued by using more than one pages as the request ring between blkfront and backend. As a result, the performance can get improved significantly. We got some impressive improvements on our highend iscsi storage cluster

Re: [Xen-devel] ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk

2015-06-02 Thread Stefan Bader
On 02.06.2015 12:35, Stefano Stabellini wrote: On Tue, 2 Jun 2015, Stefano Stabellini wrote: On Tue, 2 Jun 2015, Stefan Bader wrote: On 02.06.2015 09:40, Sanjeev Pandita wrote: All, I am pretty new to xen . I am trying to boot DOMU with qemu qcow AARCH64 Ubuntu 15.04 disk on Xen but I am

Re: [Xen-devel] [PATCH v1 COLO Pre 03/12] tools/libxc: export xc_bitops.h

2015-06-02 Thread Andrew Cooper
On 02/06/15 10:26, Yang Hongyang wrote: When we are under COLO, we will send dirty page bitmap info from secondary to primary at every checkpoint. So we need to get/test the dirty page bitmap. We just expose xc_bitops.h for libxl use. NOTE: Need to make clean and rerun configure to get it

Re: [Xen-devel] tcp: refine TSO autosizing causes performance regression on Xen

2015-06-02 Thread Wei Liu
Hi Eric Sorry for coming late to the discussion. On Thu, Apr 16, 2015 at 05:42:16AM -0700, Eric Dumazet wrote: On Thu, 2015-04-16 at 11:01 +0100, George Dunlap wrote: He suggested that after he'd been prodded by 4 more e-mails in which two of us guessed what he was trying to get at.

Re: [Xen-devel] [Draft C] Xen on ARM vITS Handling

2015-06-02 Thread Ian Campbell
On Tue, 2015-06-02 at 11:46 +0100, Julien Grall wrote: Hi Ian, On 01/06/15 14:36, Ian Campbell wrote: On Fri, 2015-05-29 at 15:06 +0100, Julien Grall wrote: Hi Vijay, On 27/05/15 17:44, Vijay Kilari wrote: ## Command Translation Of the existing GICv3 ITS commands, `MAPC`, `MAPD`,

Re: [Xen-devel] [PATCH] libxl: Don't insert PCI device into xenstore for HVM guests

2015-06-02 Thread Malcolm Crossley
On 01/06/15 18:55, Konrad Rzeszutek Wilk wrote: On Mon, Jun 01, 2015 at 05:03:14PM +0100, Malcolm Crossley wrote: On 01/06/15 16:43, Ross Lagerwall wrote: On 06/01/2015 04:26 PM, Konrad Rzeszutek Wilk wrote: On Fri, May 29, 2015 at 08:59:45AM +0100, Ross Lagerwall wrote: When doing

Re: [Xen-devel] ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk

2015-06-02 Thread Stefano Stabellini
On Tue, 2 Jun 2015, Stefan Bader wrote: On 02.06.2015 09:40, Sanjeev Pandita wrote: All, I am pretty new to xen . I am trying to boot DOMU with qemu qcow AARCH64 Ubuntu 15.04 disk on Xen but I am getting the errors which link to /usr/local/lib/xen/bin/qemu-system-i386. Since I am

Re: [Xen-devel] ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk

2015-06-02 Thread Stefano Stabellini
On Tue, 2 Jun 2015, Stefan Bader wrote: On 02.06.2015 12:35, Stefano Stabellini wrote: On Tue, 2 Jun 2015, Stefano Stabellini wrote: On Tue, 2 Jun 2015, Stefan Bader wrote: On 02.06.2015 09:40, Sanjeev Pandita wrote: All, I am pretty new to xen . I am trying to boot DOMU with qemu

Re: [Xen-devel] [Draft C] Xen on ARM vITS Handling

2015-06-02 Thread Julien Grall
Hi Ian, On 01/06/15 14:36, Ian Campbell wrote: On Fri, 2015-05-29 at 15:06 +0100, Julien Grall wrote: Hi Vijay, On 27/05/15 17:44, Vijay Kilari wrote: ## Command Translation Of the existing GICv3 ITS commands, `MAPC`, `MAPD`, `MAPVI`/`MAPI` are potentially time consuming commands as these

Re: [Xen-devel] [PATCH v1 COLO Pre 02/12] libxc/restore: zero ioreq page only one time

2015-06-02 Thread Wen Congyang
On 06/02/2015 06:16 PM, Andrew Cooper wrote: On 02/06/15 10:26, Yang Hongyang wrote: ioreq page contains evtchn which will be set when we resume the secondary vm the first time. The hypervisor will check if the evtchn is corrupted, so we cannot zero the ioreq page more than one time. The

[Xen-devel] [PATCH 0/4] x86/xen Several unassociated fixes

2015-06-02 Thread Andrew Cooper
While investigating a separate issue on Broadwell hardware, we encountered a cascade crash, with 3 indepent issues. For anyone interested, the full backtrace was: (XEN) Xen SMAP violation (XEN) [ Xen-4.5.0-xs101665-d x86_64 debug=y Not tainted ] (XEN) CPU:15 (XEN) RIP:

[Xen-devel] [PATCH 4/4] x86/memcpy: Reduce code size

2015-06-02 Thread Andrew Cooper
'n % BYTES_PER_LONG' is at most 7, and doesn't need a 64bit register mov. Signed-off-by: Andrew Cooper andrew.coop...@citrix.com CC: Jan Beulich jbeul...@suse.com --- Admittedly very trivial, but no need to be wasteful --- xen/arch/x86/string.c |2 +- 1 file changed, 1 insertion(+), 1

[Xen-devel] [PATCH 1/4] x86/apic: Disable the LAPIC later in smp_send_stop()

2015-06-02 Thread Andrew Cooper
__stop_this_cpu() may reset the LAPIC mode back from x2apic to xapic, but will leave x2apic_enabled alone. This may cause disconnect_bsp_APIC() in disable_IO_APIC() to suffer a #GP fault. Disabling the LAPIC can safely be deferred to being the last action. Signed-off-by: Andrew Cooper

[Xen-devel] [PATCH 2/4] xen/crash: Don't use set_fixmap() in the crash path

2015-06-02 Thread Andrew Cooper
Experimentally, this can result in memory allocation, and in particular a failed assertion that interrupts are enabled when performing a TLB flush. (XEN) Assertion 'local_irq_is_enabled()' failed at smp.c:223 snip (XEN) [82d08018a0d3] flush_area_mask+0x7/0x134 (XEN) [82d08011f7c6]

Re: [Xen-devel] [PATCH v1 1/5] libxl/save: Refactor libxl__domain_suspend_state

2015-06-02 Thread Ian Campbell
On Wed, 2015-05-20 at 18:01 +0800, Yang Hongyang wrote: @@ -1762,16 +1762,18 @@ static void libxl__domain_suspend_callback(void *data) { libxl__save_helper_state *shs = data; libxl__egc *egc = shs-egc; -libxl__domain_suspend_state *dss = CONTAINER_OF(shs, *dss, shs); +

Re: [Xen-devel] [PATCH v1 2/5] tools/libxl: move domain suspend codes into a separate file

2015-06-02 Thread Ian Campbell
On Wed, 2015-05-20 at 18:01 +0800, Yang Hongyang wrote: move domain suspend codes into a separate file libxl_dom_suspend.c Just code. Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Acked-by: Ian Campbell ian.campb...@citrix.com ___ Xen-devel

[Xen-devel] Xen Security Advisory 130 (CVE-2015-4105) - Guest triggerable qemu MSI-X pass-through error messages

2015-06-02 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xen Security Advisory CVE-2015-4105 / XSA-130 version 2 Guest triggerable qemu MSI-X pass-through error messages UPDATES IN VERSION 2 Public release. CVE assigned. ISSUE

[Xen-devel] RFC: QEMU bumping memory limit and domain restore

2015-06-02 Thread Wei Liu
Previous discussion at [0]. For the benefit of discussion, we refer to max_memkb inside hypervisor as hv_max_memkb (name subject to improvement). That's the maximum number of memory a domain can use. Libxl doesn't know hv_max_memkb for a domain needs prior to QEMU start-up because of optional

Re: [Xen-devel] ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk

2015-06-02 Thread Stefano Stabellini
On Tue, 2 Jun 2015, Sanjeev Pandita wrote: From: Stefan Bader [mailto:stefan.ba...@canonical.com] Sent: Tuesday, June 02, 2015 1:52 PM To: Sanjeev Pandita; xen-devel@lists.xen.org Cc: ian.campb...@citrix.com; Pranavkumar Sawargaonkar; stefano.stabell...@eu.citrix.com Subject: Re: [Xen-devel]

Re: [Xen-devel] [PATCH] libxl: Don't insert PCI device into xenstore for HVM guests

2015-06-02 Thread Konrad Rzeszutek Wilk
On Tue, Jun 02, 2015 at 11:06:26AM +0100, Malcolm Crossley wrote: On 01/06/15 18:55, Konrad Rzeszutek Wilk wrote: On Mon, Jun 01, 2015 at 05:03:14PM +0100, Malcolm Crossley wrote: On 01/06/15 16:43, Ross Lagerwall wrote: On 06/01/2015 04:26 PM, Konrad Rzeszutek Wilk wrote: On Fri, May 29,

Re: [Xen-devel] [PATCH v1 4/5] tools/libxl: move toolstack code into libxl_toolstack.c

2015-06-02 Thread Ian Campbell
On Wed, 2015-05-20 at 18:01 +0800, Yang Hongyang wrote: move toolstack code into libxl_toolstack.c It's not clear to me what toolstack code is here, the whole of libxl and xl is toolstack code. Is the code being moved stuff to do with adding toolstack state to the save stream? Perhaps

[Xen-devel] Xen Security Advisory 131 (CVE-2015-4106) - Unmediated PCI register access in qemu

2015-06-02 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xen Security Advisory CVE-2015-4106 / XSA-131 version 3 Unmediated PCI register access in qemu UPDATES IN VERSION 3 Public release. CVE assigned. ISSUE DESCRIPTION

[Xen-devel] [PATCH 3/4] x86/debugger: Use copy_to/from_guest() in dbg_rw_guest_mem()

2015-06-02 Thread Andrew Cooper
Using gdbsx on Broadwell systems suffers a SMAP violation because dbg_rw_guest_mem() uses memcpy() with a userspace pointer. The functions dbg_rw_mem() and dbg_rw_guest_mem() have been updated to pass 'void * __user' pointers which indicates their nature clearly. Signed-off-by: Andrew Cooper

[Xen-devel] Xen Security Advisory 129 (CVE-2015-4104) - PCI MSI mask bits inadvertently exposed to guests

2015-06-02 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xen Security Advisory CVE-2015-4104 / XSA-129 version 2 PCI MSI mask bits inadvertently exposed to guests UPDATES IN VERSION 2 Public release. CVE assigned. ISSUE

[Xen-devel] Xen Security Advisory 128 (CVE-2015-4103) - Potential unintended writes to host MSI message data field via qemu

2015-06-02 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xen Security Advisory CVE-2015-4103 / XSA-128 version 2 Potential unintended writes to host MSI message data field via qemu UPDATES IN VERSION 2 Public release. CVE assigned.

Re: [Xen-devel] [PATCH v1 3/5] tools/libxl: move remus codes into libxl_remus.c

2015-06-02 Thread Ian Campbell
On Wed, 2015-05-20 at 18:01 +0800, Yang Hongyang wrote: move remus codes into libxl_remus.c code Apart from dropping some static and adding some prototypes to the header this is purely motion, correct? (I assume this about the last one too). diff --git a/tools/libxl/libxl_internal.h

Re: [Xen-devel] [PATCH v1 COLO Pre 02/12] libxc/restore: zero ioreq page only one time

2015-06-02 Thread Andrew Cooper
On 02/06/15 10:26, Yang Hongyang wrote: ioreq page contains evtchn which will be set when we resume the secondary vm the first time. The hypervisor will check if the evtchn is corrupted, so we cannot zero the ioreq page more than one time. The ioreq-state is always STATE_IOREQ_NONE after the

Re: [Xen-devel] [xen-unstable test] 56759: regressions - FAIL

2015-06-02 Thread Jan Beulich
On 29.05.15 at 18:32, ian.campb...@citrix.com wrote: On Wed, 2015-05-27 at 17:04 +0100, Ian Campbell wrote: Looking at the netback side though it seems like netback_remove is switching to state=Closed _before_ it calls kobject_uevent(..., KOBJ_OFFLINE) and it is this which generates the call

Re: [Xen-devel] ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk

2015-06-02 Thread Stefano Stabellini
On Tue, 2 Jun 2015, Stefano Stabellini wrote: On Tue, 2 Jun 2015, Stefan Bader wrote: On 02.06.2015 09:40, Sanjeev Pandita wrote: All, I am pretty new to xen . I am trying to boot DOMU with qemu qcow AARCH64 Ubuntu 15.04 disk on Xen but I am getting the errors which link to

Re: [Xen-devel] RFC: QEMU bumping memory limit and domain restore

2015-06-02 Thread Wei Liu
I fat-fingered Andrew's email address. Really CC him this time. On Tue, Jun 02, 2015 at 03:05:07PM +0100, Wei Liu wrote: Previous discussion at [0]. For the benefit of discussion, we refer to max_memkb inside hypervisor as hv_max_memkb (name subject to improvement). That's the maximum number

Re: [Xen-devel] [PATCH v2 for Xen 4.6 3/4] libxl: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler

2015-06-02 Thread Chong Li
On Tue, Jun 2, 2015 at 7:53 AM, George Dunlap george.dun...@eu.citrix.com wrote: On 05/26/2015 01:09 AM, Chong Li wrote: Add libxl_vcpu_sched_params_get/set and sched_rtds_vcpu_get/set functions to support per-VCPU settings for RTDS scheduler. Add a new data structure

Re: [Xen-devel] [PATCH v1 2/5] tools/libxl: move domain suspend codes into a separate file

2015-06-02 Thread Ian Campbell
On Wed, 2015-05-20 at 18:01 +0800, Yang Hongyang wrote: diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index f86fc89..b2eeb89 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -3191,6 +3191,12 @@ _hidden void

Re: [Xen-devel] [PATCH v2] x86/HVM: Avoid cache flush operations during hvm_load

2015-06-02 Thread Jan Beulich
On 02.06.15 at 14:47, ross.lagerw...@citrix.com wrote: +void arch_hvm_load_post(struct domain *d) +{ +/* Re-enable cache flushes and flush the cache. */ +this_cpu(memory_type_changed_ignore) = 0; +memory_type_changed(d); +} Does this really need to be done unconditionally? I.e.

Re: [Xen-devel] [PATCHv10 3/4] gnttab: make the grant table lock a read-write lock

2015-06-02 Thread David Vrabel
On 29/05/15 09:31, Jan Beulich wrote: On 28.05.15 at 18:09, dvra...@cantab.net wrote: On 28/05/15 15:55, Jan Beulich wrote: On 26.05.15 at 20:00, david.vra...@citrix.com wrote: @@ -254,23 +254,23 @@ double_gt_lock(struct grant_table *lgt, struct grant_table *rgt) { if ( lgt rgt )

Re: [Xen-devel] [PATCH v2] x86/HVM: Avoid cache flush operations during hvm_load

2015-06-02 Thread Andrew Cooper
On 02/06/15 13:47, Ross Lagerwall wrote: An MTRR record is processed for each vCPU during hvm_load. Each MTRR record sets several mtrrs, each of which flushes the cache on all pCPUs. This can take some time and trip the watchdog for HVM guests with many CPUs. To fix this, introduce a flag

[Xen-devel] [PATCH v2] x86/HVM: Avoid cache flush operations during hvm_load

2015-06-02 Thread Ross Lagerwall
An MTRR record is processed for each vCPU during hvm_load. Each MTRR record sets several mtrrs, each of which flushes the cache on all pCPUs. This can take some time and trip the watchdog for HVM guests with many CPUs. To fix this, introduce a flag which prevents flushing the cache on x86 while

Re: [Xen-devel] [PATCH v2 for Xen 4.6 3/4] libxl: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler

2015-06-02 Thread George Dunlap
On 05/26/2015 01:09 AM, Chong Li wrote: Add libxl_vcpu_sched_params_get/set and sched_rtds_vcpu_get/set functions to support per-VCPU settings for RTDS scheduler. Add a new data structure (libxl_vcpu_sched_params) to help per-VCPU settings. Signed-off-by: Chong Li chong...@wustl.edu

  1   2   >