[Xen-devel] [PATCH] xen_disk: fix unmapping of persistent grants

2014-11-12 Thread Roger Pau Monne
This patch fixes two issues with persistent grants and the disk PV backend (Qdisk): - Don't use batch mappings when using persistent grants, doing so prevents unmapping single grants (the whole area has to be unmapped at once). - Unmap persistent grants before switching to the closed state,

[Xen-devel] [PATCH v3 for-xen-4.5] xen_disk: fix unmapping of persistent grants

2014-11-13 Thread Roger Pau Monne
This patch fixes two issues with persistent grants and the disk PV backend (Qdisk): - Keep track of memory regions where persistent grants have been mapped since we need to unmap them as a whole. It is not possible to unmap a single grant if it has been batch-mapped. A new check has also

[Xen-devel] [PATCH v1 for-4.6 1/2] xen: fixes for PVH Dom0 MMIO regions

2014-12-18 Thread Roger Pau Monne
Hello, This series contains a bug-fix for PVH Dom0, that prevents Xen from adding MMIO regions that should not be accesible to Dom0. The second patch also prevents Dom0 from accessing the HPET, which AFAICT is used by Xen. I'm not sure if there's a reason why the HPET MMIO region wasn't added

[Xen-devel] [PATCH v1 for-4.6 1/2] xen/pvh: check permissions when adding MMIO regions

2014-12-18 Thread Roger Pau Monne
Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 would have access to the full MMIO range. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- xen/arch/x86/domain_build.c | 31

[Xen-devel] [PATCH v1 for-4.6 2/2] xen: prevent access to HPET from Dom0

2014-12-18 Thread Roger Pau Monne
Prevent Dom0 from accessing HPET MMIO region by adding it to the list of denied memory regions. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- xen/arch/x86/domain_build.c | 12 1 file changed, 12

[Xen-devel] [PATCH] xen-blkfront: fix accounting of reqs when migrating

2015-02-02 Thread Roger Pau Monne
Current migration code uses blk_put_request in order to finish a request before requeuing it. This function doesn't update the statistics of the queue, which completely screws accounting. Use blk_end_request_all instead which properly updates the statistics of the queue. Signed-off-by: Roger Pau

[Xen-devel] [PATCH v3 4/7] osstest: create a new job called build-arch-freebsd

2015-02-03 Thread Roger Pau Monne
This job is very similar to build-arch but it doesn't enable ovmf because it doesn't compile on FreeBSD yet. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- mfi-common | 14 ++ 1 file changed,

[Xen-devel] [PATCH v3 1/7] osstest: add routine to execute ssh with password

2015-02-03 Thread Roger Pau Monne
This is needed when bootstrapping FreeBSD, since the installer has ssh enabled with the root password set to 'root' by default. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- Changes since RFC: - Place

[Xen-devel] [PATCH v3 5/7] osstest: make ts-xen-build work on FreeBSD

2015-02-03 Thread Roger Pau Monne
This patch contains a new subroutine that guesses the right make command to use (gmake on BSDs, make otherwise). Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- ts-xen-build | 13 - 1 file

[Xen-devel] [PATCH v3 2/7] osstest: add support for installing bare metal FreeBSD

2015-02-03 Thread Roger Pau Monne
This is done using mfsBSD, which can be booted from pxelinux and contains a script to automatically install FreeBSD using ZFS on root. After the install the host is set to boot from the local disk. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc:

[Xen-devel] [PATCH v3 3/7] osstest: prepare FreeBSD host for Xen build

2015-02-03 Thread Roger Pau Monne
Install pkg (the binary package management tool) and the dependencies needed to build Xen. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- Changes since RFC: - Add the tools necessary in order to build the

[Xen-devel] [PATCH v3 7/7] osstest: add a script to install Xen on FreeBSD hosts

2015-02-03 Thread Roger Pau Monne
This scripts takes care of installing the run-time dependencies, unpacking the Xen files and setup the right configuration in order to boot a FreeBSD PVH Dom0. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com

[Xen-devel] [PATCH v2 0/3] xen/pvh: prevent Dom0 from accessing reserved MMIO regions

2015-01-20 Thread Roger Pau Monne
This series aims to prevent PVH Dom0 from accessing MMIO regions of devices that are used by Xen. Thanks for the review, Roger. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH v2 3/3] xen: prevent access to HPET from Dom0

2015-01-20 Thread Roger Pau Monne
Prevent Dom0 from accessing HPET MMIO region by adding the HPET mfn to the list of read-only memory regions. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- Changes since v1: - Instead of completely blocking

[Xen-devel] [PATCH v2 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-20 Thread Roger Pau Monne
Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 would have access to the full MMIO range. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- Changes since v1: - Use the newly

[Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-22 Thread Roger Pau Monne
Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 would have access to the full MMIO range. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- Changes since v2: - Fix coding style.

[Xen-devel] [PATCH v3 1/3] xen: allow set_mmio_p2m_entry to specify access type

2015-01-22 Thread Roger Pau Monne
Preparatory change that allows setting the access type to set_mmio_p2m_entry. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com Cc: Jun Nakajima jun.nakaj...@intel.com Cc: Eddie Dong eddie.d...@intel.com Cc: Kevin

[Xen-devel] [PATCH v3 0/3] xen/pvh: prevent Dom0 from accessing reserved MMIO regions

2015-01-22 Thread Roger Pau Monne
This series aims to prevent PVH Dom0 from accessing MMIO regions of devices that are used by Xen. I know there are concerns with the way we build a PVH Dom0 right now, but addressing those requires a major rework of how construct_dom0 works. IMHO I don't think this should block this series,

[Xen-devel] [PATCH v3 3/3] xen: prevent access to HPET from Dom0

2015-01-22 Thread Roger Pau Monne
Prevent Dom0 from accessing HPET MMIO region by adding the HPET mfn to the list of forbiden memory regions (if ACPI_HPET_PAGE_PROTECT4 flag is set) or to the list of read-only regions. Also provide an option that prevents adding the HPET to the read-only memory regions called ro-hpet, in case

[Xen-devel] [PATCH v4 03/11] osstest: store a path runvar for built_stash_file

2015-02-18 Thread Roger Pau Monne
This mimics the behaviour of built_stash. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- Osstest/TestSupport.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Osstest/TestSupport.pm

[Xen-devel] [PATCH v4 01/11] osstest: allow to disable the usage of a know_host file

2015-02-18 Thread Roger Pau Monne
This is only used by target_cmd_root and target_putfile_root and will be needed for mfsBSD which generates new keys on each boot. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- Osstest/TestSupport.pm | 25

[Xen-devel] [PATCH v4 07/11] osstest: add freebsd installer update script

2015-02-18 Thread Roger Pau Monne
This script allows moving a FreeBSD build (as produced by ts-freebsd-create-mfsbsd) so it's usable by other test/build jobs. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- mg-freebsd-installer-update | 59

[Xen-devel] [PATCH v4 09/11] osstest: make ts-xen-build work on FreeBSD

2015-02-18 Thread Roger Pau Monne
This patch contains a new subroutine that guesses the right make command to use (gmake on BSDs, make otherwise). Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- ts-xen-build | 13 - 1 file

[Xen-devel] [PATCH v4 04/11] osstest: add support for installing bare metal FreeBSD

2015-02-18 Thread Roger Pau Monne
This is done using mfsBSD, which can be booted from pxelinux and contains a script to automatically install FreeBSD using ZFS on root. After the install the host is set to boot from the local disk. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc:

[Xen-devel] [PATCH v4 02/11] osstest: add routine to execute ssh with password

2015-02-18 Thread Roger Pau Monne
This is needed when bootstrapping FreeBSD, since the installer has ssh enabled with the root password set to 'root' by default. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- Changes since RFC: - Place

[Xen-devel] [PATCH v4 00/11] osstest: add a FreeBSD host

2015-02-18 Thread Roger Pau Monne
Hello, The following series enables setting up a FreeBSD PVH Dom0 host. Although this is marked as v4 it should clearly have the RFC tag. The flow is based on the following diagram: http://xenbits.xen.org/people/royger/osstest_freebsd.jpg Patch 7 introduces a new management script,

[Xen-devel] [PATCH v4 06/11] osstest: fix ts-build-check to work with freebsd_buildjob

2015-02-18 Thread Roger Pau Monne
The output of the FreeBSD buildjob generates several files that are stashed independently, so check each of them individually. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com --- ts-build-check | 20

[Xen-devel] [PATCH v4 05/11] osstest: add script for building custom mfsBSD images

2015-02-18 Thread Roger Pau Monne
In order to test FreeBSD HEAD we need to build a mfsBSD installer and sets based on the version that we want to test. This patch adds support for building such mfsBSD image and sets. In order to build the images sources from two different repositories are needed. The first ones of course are the

[Xen-devel] [PATCH v4 10/11] osstest: add a script to install Xen on FreeBSD hosts

2015-02-18 Thread Roger Pau Monne
This scripts takes care of installing the run-time dependencies, unpacking the Xen files and setup the right configuration in order to boot a FreeBSD PVH Dom0. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com

[Xen-devel] [PATCH v4 11/11] osstest: add FreeBSD build recipe

2015-02-18 Thread Roger Pau Monne
This patch introduces two new buildjobs: build-arch-freebsd-xen: sets up a FreeBSD host and builds Xen. build-arch-freebsd-freebsd: sets up a FreeBSD host and builds FreeBSD sets and a mfsBSD installer image. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson

[Xen-devel] [PATCH v4 0/3] xen/pvh: prevent Dom0 from accessing reserved MMIO regions

2015-01-23 Thread Roger Pau Monne
This series aims to prevent PVH Dom0 from accessing MMIO regions of devices that are used by Xen. I know there are concerns with the way we build a PVH Dom0 right now, but addressing those requires a major rework of how construct_dom0 works. IMHO I don't think this should block this series,

[Xen-devel] [PATCH v4 3/3] xen: prevent access to HPET from Dom0

2015-01-23 Thread Roger Pau Monne
Prevent Dom0 from accessing HPET MMIO region by adding the HPET mfn to the list of forbiden memory regions (if ACPI_HPET_PAGE_PROTECT4 or ACPI_HPET_PAGE_PROTECT64 flag is set) or to the list of read-only regions. Also provide an option that prevents adding the HPET to the read-only memory regions

[Xen-devel] [PATCH v4 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-23 Thread Roger Pau Monne
Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 would have access to the full MMIO range. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- Changes since v3: - Set execute access for

[Xen-devel] [PATCH v4 1/3] xen: allow set_mmio_p2m_entry to specify access type

2015-01-23 Thread Roger Pau Monne
Preparatory change that allows setting the access type to set_mmio_p2m_entry. Signed-off-by: Roger Pau Monné roger@citrix.com Acked-by: Tim Deegan t...@xen.org Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com Cc: Jun Nakajima jun.nakaj...@intel.com Cc: Eddie Dong

[Xen-devel] [PATCH] osstest: update FreeBSD guests to 10.1

2015-03-26 Thread Roger Pau Monne
Update FreeBSD guests in OSSTest to FreeBSD 10.1. The following images should be placed in the osstest images folder: ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/amd64/Latest/FreeBSD-10.1-RELEASE-amd64.qcow2.xz

[Xen-devel] [PATCH] xen/iommu: fix usage of shared EPT/IOMMU page tables on PVH guests

2015-02-27 Thread Roger Pau Monne
iommu_share_p2m_table should not prevent PVH guests from using a shared page table. Change the condition to has_hvm_container_domain instead of is_hvm_domain. This allows both PVH and HVM guests to use it. Remove the asserts in iommu_set_pgd and amd_iommu_share_p2m, iommu_share_p2m_table and

[Xen-devel] [PATCH RFC v2 0/3] xen/pvh: enable migration on PVH Dom0

2015-04-02 Thread Roger Pau Monne
This series enables migration of guests (either PV or HVM) from a PVH Dom0. Since the last round a new patch has been added (2/3) in order to fix shadow_track_dirty_vram when called from a hvm guest. Patch 3/3 has also been reworked according to Tim's comments in order to map the dirty_bitmap

[Xen-devel] [PATCH RFC v2 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-04-02 Thread Roger Pau Monne
When the caller of paging_log_dirty_op is a hvm guest Xen would choke when trying to copy the dirty bitmap to the guest because the paging lock is already held. Fix this by independently mapping each page of the guest bitmap as needed without the paging lock held. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH RFC v2 2/3] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests

2015-04-02 Thread Roger Pau Monne
Modify shadow_track_dirty_vram to use a local buffer and then flush to the guest without the paging_lock held. This is modeled after hap_track_dirty_vram. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Tim Deegan t...@xen.org Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper

[Xen-devel] [PATCH RFC v2 1/3] xen/pvh: enable mmu_update hypercall

2015-04-02 Thread Roger Pau Monne
This is needed for performing save/restore of PV guests. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Tim Deegan t...@xen.org Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- xen/arch/x86/hvm/hvm.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Xen-devel] [PATCH] osstest: fix FreeBSD guest disk size

2015-04-14 Thread Roger Pau Monne
New 10.1 images are larger than the previous 10.0 images, so change the size of the LVM volume to accommodate them. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com --- ts-freebsd-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Xen-devel] [PATCH v2] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-04-28 Thread Roger Pau Monne
Since a PVH hardware domain has access to the physical hardware create a custom more permissive IO bitmap. The permissions set on the bitmap are populated based on the contents of the ioports rangeset. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc:

[Xen-devel] [PATCH v3] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-04-29 Thread Roger Pau Monne
Since a PVH hardware domain has access to the physical hardware create a custom more permissive IO bitmap. The permissions set on the bitmap are populated based on the contents of the ioports rangeset. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc:

[Xen-devel] [PATCH v4] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-04-30 Thread Roger Pau Monne
Since a PVH hardware domain has access to the physical hardware create a custom more permissive IO bitmap. The permissions set on the bitmap are populated based on the contents of the ioports rangeset. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc:

[Xen-devel] [PATCH] xen/pvh: trap access to IO port range 0xcf8-0xcfb

2015-05-08 Thread Roger Pau Monne
This is needed so Xen can properly trap 4 byte accesses to 0xcf8 in order to keep consistency with accesses to 0xcfc. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- xen/arch/x86/setup.c | 8 +++- 1 file

[Xen-devel] [PATCH v5 0/3] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-05-07 Thread Roger Pau Monne
This version include splitting changes into separate patches, specially those that also affect PV guests. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH v5 3/3] xen: block access to IO port 0xcf9

2015-05-07 Thread Roger Pau Monne
This port is used by PM1a and should not be accessed directly by Dom0. This also premits trapping 2 and 4 byte accesses to 0xcf8, which need to be handled by the hypervisor. Also, since admin_io_okay is now a wrapper around ioports_access_permitted remove it. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v3] xen/pvh: trap access to sensitive IO ports

2015-05-08 Thread Roger Pau Monne
This is needed so Xen can properly trap 4 byte accesses to 0xcf8 in order to keep consistency with accesses to 0xcfc. The same treatment is needed for RTC ports. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com ---

[Xen-devel] [PATCH v5 1/4] xen: introduce a helper to allocate non-contiguous memory

2015-05-08 Thread Roger Pau Monne
The allocator uses independent calls to alloc_domheap_pages in order to get the desired amount of memory and then maps all the independent physical addresses into a contiguous virtual address space. Signed-off-by: Roger Pau Monné roger@citrix.com Tested-by: Julien Grall

[Xen-devel] [PATCH v5 0/4] xen/pvh: enable migration on PVH Dom0

2015-05-08 Thread Roger Pau Monne
Changes in this version include the removal of the red-black tree in order to keep track of vmalloced regions, to unmap them a VA - PA lookup is done. Also this version introduces vzalloc. Thanks, Roger. ___ Xen-devel mailing list

[Xen-devel] [PATCH v5 3/4] xen/hap: make hap_track_dirty_vram use non-contiguous memory for temporary map

2015-05-08 Thread Roger Pau Monne
Just like it's done for shadow_track_dirty_vram allocate the temporary buffer using non-contiguous memory. Signed-off-by: Roger Pau Monné roger@citrix.com Reviewed-by: Tim Deegan t...@xen.org Cc: Tim Deegan t...@xen.org Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper

[Xen-devel] [PATCH v5 2/4] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests

2015-05-08 Thread Roger Pau Monne
Modify shadow_track_dirty_vram to use a local buffer and then flush to the guest without the paging_lock held. This is modeled after hap_track_dirty_vram. Signed-off-by: Roger Pau Monné roger@citrix.com Reviewed-by: Tim Deegan t...@xen.org Cc: Tim Deegan t...@xen.org Cc: Jan Beulich

[Xen-devel] [PATCH v5 4/4] xen: rework paging_log_dirty_op to work with hvm guests

2015-05-08 Thread Roger Pau Monne
When the caller of paging_log_dirty_op is a hvm guest Xen would choke when trying to copy the dirty bitmap to the guest because the paging lock is already held. Fix this by independently mapping each page of the guest bitmap as needed without the paging lock held. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v6 0/4] xen/pvh: enable migration on PVH Dom0

2015-05-11 Thread Roger Pau Monne
Changes in this version include fixes for vfree and restoring the previous map in shadow_track_dirty_vram if the copy to guest fails. Thanks, Roger. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH v6 3/4] xen/hap: make hap_track_dirty_vram use non-contiguous memory for temporary map

2015-05-11 Thread Roger Pau Monne
Just like it's done for shadow_track_dirty_vram allocate the temporary buffer using non-contiguous memory. Signed-off-by: Roger Pau Monné roger@citrix.com Reviewed-by: Tim Deegan t...@xen.org Cc: Tim Deegan t...@xen.org Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper

[Xen-devel] [PATCH v6 4/4] xen: rework paging_log_dirty_op to work with hvm guests

2015-05-11 Thread Roger Pau Monne
When the caller of paging_log_dirty_op is a hvm guest Xen would choke when trying to copy the dirty bitmap to the guest because the paging lock is already held. Fix this by independently mapping each page of the guest bitmap as needed without the paging lock held. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v6 2/4] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests

2015-05-11 Thread Roger Pau Monne
Modify shadow_track_dirty_vram to use a local buffer and then flush to the guest without the paging_lock held. This is modeled after hap_track_dirty_vram. Signed-off-by: Roger Pau Monné roger@citrix.com Reviewed-by: Tim Deegan t...@xen.org Cc: Tim Deegan t...@xen.org Cc: Jan Beulich

[Xen-devel] [PATCH v6 2/2] xen/pvh: trap access to sensitive IO ports

2015-05-11 Thread Roger Pau Monne
This is needed so Xen can properly trap 4 byte accesses to 0xcf8 in order to keep consistency with accesses to 0xcfc. The access to RTC ports also needs to be trapped in order to keep consistency, this includes RTC_PORT(0) and RTC_PORT(1) (0x70 and 0x71 respectively). Signed-off-by: Roger Pau

[Xen-devel] [PATCH v6 1/2] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-05-11 Thread Roger Pau Monne
Since a PVH hardware domain has access to the physical hardware create a custom more permissive IO bitmap. The permissions set on the bitmap are populated based on the contents of the ioports rangeset. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc:

[Xen-devel] [PATCH v6 0/3] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-05-11 Thread Roger Pau Monne
Changes in this version include a build fix for XSM and trapping 0xcf8 and the RTC ports for PVH instead of adding them to ioports_deny_access. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH v4 4/4] xen: rework paging_log_dirty_op to work with hvm guests

2015-05-07 Thread Roger Pau Monne
When the caller of paging_log_dirty_op is a hvm guest Xen would choke when trying to copy the dirty bitmap to the guest because the paging lock is already held. Fix this by independently mapping each page of the guest bitmap as needed without the paging lock held. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v4 1/4] xen: introduce a helper to allocate non-contiguous memory

2015-05-07 Thread Roger Pau Monne
The allocator uses independent calls to alloc_heap_pages in order to get the desired amount of memory and then maps all the independent physical addresses into a contiguous virtual address space. In order to keep track of this regions a red-black tree is used. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v4 3/4] xen/hap: make hap_track_dirty_vram use non-contiguous memory for temporary map

2015-05-07 Thread Roger Pau Monne
Just like it's done for shadow_track_dirty_vram allocate the temporary buffer using non-contiguous memory. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Tim Deegan t...@xen.org Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- xen/arch/x86/mm/hap/hap.c |

[Xen-devel] [PATCH v4 0/4] xen/pvh: enable migration on PVH Dom0

2015-05-07 Thread Roger Pau Monne
Changes in this iteration include the addition of a non-contiguous allocator that's used in shadow_track_dirty_vram and hap_track_dirty_vram in order to allocate the temporary dirty bitmap. Thanks, Roger. ___ Xen-devel mailing list

[Xen-devel] [PATCH v5 1/3] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-05-07 Thread Roger Pau Monne
Since a PVH hardware domain has access to the physical hardware create a custom more permissive IO bitmap. The permissions set on the bitmap are populated based on the contents of the ioports rangeset. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc:

[Xen-devel] [PATCH v5 2/3] xen: add the RTC io space to the blocked access list

2015-05-07 Thread Roger Pau Monne
Previously this was done ad-hoc in admin_io_okay. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- xen/arch/x86/domain_build.c | 3 +++ xen/arch/x86/traps.c| 4 2 files changed, 3 insertions(+), 4

[Xen-devel] [PATCH v2] xen/pvh: trap access to IO port 0xcf8

2015-05-08 Thread Roger Pau Monne
This is needed so Xen can properly trap 4 byte accesses to 0xcf8 in order to keep consistency with accesses to 0xcfc. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper andrew.coop...@citrix.com --- Changes since v1: - Only trap on accesses to

[Xen-devel] [PATCH v7 2/4] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests

2015-05-14 Thread Roger Pau Monne
Modify shadow_track_dirty_vram to use a local buffer and then flush to the guest without the paging_lock held. This is modeled after hap_track_dirty_vram. Signed-off-by: Roger Pau Monné roger@citrix.com Reviewed-by: Tim Deegan t...@xen.org Cc: Tim Deegan t...@xen.org Cc: Jan Beulich

[Xen-devel] [PATCH v7 1/4] xen: introduce a helper to allocate non-contiguous memory

2015-05-14 Thread Roger Pau Monne
The allocator uses independent calls to alloc_domheap_pages in order to get the desired amount of memory and then maps all the independent physical addresses into a contiguous virtual address space. Signed-off-by: Roger Pau Monné roger@citrix.com Tested-by: Julien Grall

[Xen-devel] [PATCH v7 0/4] xen/pvh: enable migration on PVH Dom0

2015-05-14 Thread Roger Pau Monne
Changes in this revision include using clear_page instead of memset in vzalloc and minor fixes to paging_log_dirty_op in order to make the page unmapping/mapping more similar to the preempt case. Thanks, Roger. ___ Xen-devel mailing list

[Xen-devel] [PATCH v7 3/4] xen/hap: make hap_track_dirty_vram use non-contiguous memory for temporary map

2015-05-14 Thread Roger Pau Monne
Just like it's done for shadow_track_dirty_vram allocate the temporary buffer using non-contiguous memory. Signed-off-by: Roger Pau Monné roger@citrix.com Reviewed-by: Tim Deegan t...@xen.org Cc: Tim Deegan t...@xen.org Cc: Jan Beulich jbeul...@suse.com Cc: Andrew Cooper

[Xen-devel] [PATCH v2 0/2] osstest: update FreeBSD guests and cleanup

2015-04-09 Thread Roger Pau Monne
The first patch in this series updates FreeBSD guests in OSSTest to use raw images instead of qcow2 (which are no longer provided by upstream). The second patch is a cleanup for ts-freebsd-install which should not change functionality. ___ Xen-devel

[Xen-devel] [PATCH v2 2/2] osstest: clean ts-freebsd-install script

2015-04-09 Thread Roger Pau Monne
Remove some unused variables from ts-freebsd-install script. Also make the third parameter of target_put_guest_image optional and fix both callers of this function. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com --- Osstest/TestSupport.pm | 4 ++--

[Xen-devel] [PATCH v2 1/2] osstest: update FreeBSD guests to 10.1

2015-04-09 Thread Roger Pau Monne
Update FreeBSD guests in OSSTest to FreeBSD 10.1. The following images should be placed in the osstest images folder: ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/amd64/Latest/FreeBSD-10.1-RELEASE-amd64.raw.xz

[Xen-devel] [PATCH RFC] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-04-08 Thread Roger Pau Monne
Since a PVH hardware domain has access to the physical hardware create a custom more permissive IO bitmap. The permissions set on the bitmap are populated based on the contents of the ioports rangeset. Also add the IO ports of the serial console used by Xen to the list of not accessible IO ports.

[Xen-devel] [PATCH v7 1/2] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-05-20 Thread Roger Pau Monne
Since a PVH hardware domain has access to the physical hardware create a custom more permissive IO bitmap. The permissions set on the bitmap are populated based on the contents of the ioports rangeset. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Jan Beulich jbeul...@suse.com Cc:

[Xen-devel] [PATCH v7 2/2] xen/pvh: trap access to sensitive IO ports

2015-05-20 Thread Roger Pau Monne
This is needed so Xen can properly trap 4 byte accesses to 0xcf8 in order to keep consistency with accesses to 0xcfc. The access to RTC ports also needs to be trapped in order to keep consistency, this includes RTC_PORT(0) and RTC_PORT(1) (0x70 and 0x71 respectively). Signed-off-by: Roger Pau

[Xen-devel] [PATCH v7 0/2] xen/pvh: use a custom IO bitmap for PVH hardware domains

2015-05-20 Thread Roger Pau Monne
The only change in this version is to allow the io bitmap of Dom0 to be exchanged if a late hardware domain is used. Thanks, Roger. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH RFC v1 11/13] xen/libxl: allow creating HVM guests without a device model

2015-06-22 Thread Roger Pau Monne
Intorduce a new device model version (NONE) that can be used to specify that no device model should be used. Propagate this to Xen by creating a new XEN_DOMCTL_CDF_noemu flag that disables some of the emulation done inside of Xen. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian

[Xen-devel] [PATCH RFC v1 12/13] xen: allow 64bit HVM guests to use XENMEM_memory_map

2015-06-22 Thread Roger Pau Monne
Enable this hypercall for 64bit HVM guests in order to fetch the e820 memory map in the absence of an emulated BIOS. The memory map is populated and notified to Xen in arch_setup_meminit_hvm. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano

[Xen-devel] [PATCH RFC v1 13/13] xenconsole: try to attach to PV console if HVM fails

2015-06-22 Thread Roger Pau Monne
HVM guests have always used the emulated serial console by default, but if the emulated serial pty cannot be fetched from xenstore try to use the PV console instead. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini

[Xen-devel] [PATCH RFC v1 10/13] lib{xc/xl}: allow the creation of HVM domains with a kernel

2015-06-22 Thread Roger Pau Monne
Replace the firmware loaded into HVM guests with an OS kernel. Since the HVM builder now uses the PV xc_dom_* set of functions this kernel will be parsed and loaded inside the guest like on PV, but the container is a pure HVM guest. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian

[Xen-devel] [PATCH RFC v1 09/13] elfnotes: intorduce a new PHYS_ENTRY elfnote

2015-06-22 Thread Roger Pau Monne
This new elfnote contains the 32bit entry point into the kernel. Xen will use this entry point in order to launch the guest kernel in 32bit protected mode with paging disabled. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini

[Xen-devel] [PATCH RFC v1 00/13] Introduce HMV without dm and new boot ABI

2015-06-22 Thread Roger Pau Monne
Before reading any further, keep in mind this is a VERY inital RFC prototype series. Many things are not finished, and those that are done make heavy use of duck tape in order to keep things into place. Now that you are warned, this series is split in the following order: - Patches from 1 to

[Xen-devel] [PATCH RFC v1 08/13] libxc: remove dead x86 HVM code

2015-06-22 Thread Roger Pau Monne
Remove xc_hvm_build_x86.c since xc_hvm_build is not longer used in order to create HVM guests. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com Cc: Wei Liu

[Xen-devel] [PATCH RFC v1 01/13] libxc: split x86 HVM setup_guest into smaller logical functions

2015-06-22 Thread Roger Pau Monne
This is just a preparatory change to clean up the code in setup_guest. Should not introduce any functional changes. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: Ian Campbell

[Xen-devel] [PATCH RFC v1 04/13] libxc: allow arch_setup_meminit to populate HVM domain memory

2015-06-22 Thread Roger Pau Monne
Introduce a new arch_setup_meminit_hvm that's going to be used to populate HVM domain memory. Rename arch_setup_meminit to arch_setup_meminit_hvm_pv and introduce a stub arch_setup_meminit that will call the right meminit function depending on the contains type. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH RFC v1 05/13] libxc: introduce a domain loader for HVM guest firmware

2015-06-22 Thread Roger Pau Monne
Introduce a very simple (and dummy) domain loader to be used to load the firmware (hvmloader) into HVM guests. Since hmvloader is just a 32bit elf executable the loader is fairly simple. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano

[Xen-devel] [PATCH RFC v1 02/13] libxc: unify xc_dom_p2m_{host/guest}

2015-06-22 Thread Roger Pau Monne
Unify both functions into xc_dom_p2m. Should not introduce any functional change. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com Cc: Wei Liu

[Xen-devel] [PATCH RFC v1 07/13] libxl: switch HVM domain building to use xc_dom_* helpers

2015-06-22 Thread Roger Pau Monne
Now that we have all the code in place HVM domain building in libxl can be switched to use the xc_dom_* family of functions, just like they are used in order to build PV guests. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini

[Xen-devel] [PATCH RFC v1 03/13] libxc: introduce the notion of a container type

2015-06-22 Thread Roger Pau Monne
Introduce the notion of a container type into xc_dom_image. This will be needed by later changes that will also use xc_dom_image in order to build HVM guests. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini

[Xen-devel] [PATCH RFC v1 06/13] libxc: introduce a xc_dom_arch for hvm-3.0-x86_32 guests

2015-06-22 Thread Roger Pau Monne
This xc_dom_arch will be used in order to build HVM domains. The code is based on the existing xc_hvm_populate_params function. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: Ian Campbell

[Xen-devel] [PATCH] libxl: locally attach disks with hotplug scripts for bootloader execution

2015-06-25 Thread Roger Pau Monne
Or else bootloader execution fails. Tested using an iSCSI disk. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Hildebrand, Nils nils.hildebr...@bva.bund.de Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian Campbell ian.campb...@citrix.com Cc: Wei Liu wei.l...@citrix.com Cc:

[Xen-devel] [PATCH 2/2] configure: check for argp

2015-06-19 Thread Roger Pau Monne
argp is only present in the GNU C library, so add a specific check for it in configure. Also check if -largp is needed for linking against it. Please run autoconf after applying. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: George Dunlap george.dun...@eu.citrix.com Cc: Ian Jackson

[Xen-devel] [PATCH 1/2] xen{trace/analyze}: don't use 64bit versions of libc functions

2015-06-19 Thread Roger Pau Monne
This is not needed, neither encouraged. Configure already checks _FILE_OFFSET_BITS and appends it when needed, so that the right functions are used. Also remove the usage of loff_t and O_LARGEFILE for the same reason. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: George Dunlap

[Xen-devel] [PATCH 0/2] xen{trace/analyze}: fix build on FreeBSD

2015-06-19 Thread Roger Pau Monne
Fix the build of xentrace/xenalyze on FreeBSD, and possibly other libcs not having argp. Also fix the usage of fstat64 and O_LARGEFILE. Roger. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH v3] x86/pvh: disable posted interrupts

2015-05-27 Thread Roger Pau Monne
Enabling posted interrupts requires the virtual interrupt delivery feature, which is disabled for PVH guests, so make sure posted interrupts are also disabled or else vmlaunch will fail. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-and-Tested-by: Lars Eggert l...@netapp.com

[Xen-devel] [PATCH] osstest: reduce FreeBSD install timeouts

2015-05-29 Thread Roger Pau Monne
Only the first block is expected to take longer (because it decompresses the image and writes it to a LVM volume), the remaining commands should execute much faster, so reduce the timeout. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Ian

[Xen-devel] [PATCH v2 01/22] libxc: split x86 HVM setup_guest into smaller logical functions

2015-07-01 Thread Roger Pau Monne
This is just a preparatory change to clean up the code in setup_guest. Should not introduce any functional changes. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: Ian Campbell

[Xen-devel] [PATCH v2 00/22] Introduce HVM without dm and new boot ABI

2015-07-01 Thread Roger Pau Monne
This series is split in the following order: - Patches from 1 to 10 switch HVM domain contruction to use the xc_dom_* family of functions, like they are used to build PV domains. - Patches from 11 to 22 introduce the creation of HVM domains without a device model, which is replaced by

  1   2   3   4   5   6   7   8   9   10   >