Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-17 Thread Jan Beulich
>>> On 17.12.15 at 14:55, wrote: > On 12/17/2015 04:46 AM, Jan Beulich wrote: > On 16.12.15 at 20:34, wrote: >>> On 12/16/2015 04:04 AM, Jan Beulich wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -3116,6 +3116,21 @@ int hvm_hap_nested_page_fault(paddr_t

Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-17 Thread Boris Ostrovsky
On 12/17/2015 04:46 AM, Jan Beulich wrote: On 16.12.15 at 20:34, wrote: On 12/16/2015 04:04 AM, Jan Beulich wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3116,6 +3116,21 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla, goto out_put_gfn;

Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-17 Thread Jan Beulich
>>> On 16.12.15 at 20:34, wrote: > On 12/16/2015 04:04 AM, Jan Beulich wrote: >> >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -3116,6 +3116,21 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned >>> long gla, >>> goto out_put_gfn; >>> } >>> >>> +

Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-16 Thread Boris Ostrovsky
On 12/16/2015 04:04 AM, Jan Beulich wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3116,6 +3116,21 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla, goto out_put_gfn; } +if ( (p2mt == p2m_mmio_direct) && is_hardware_domain(currd) )

Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-16 Thread Jan Beulich
>>> On 16.12.15 at 15:04, wrote: > On 12/16/2015 04:04 AM, Jan Beulich wrote: > On 15.12.15 at 22:02, wrote: >>> --- a/xen/arch/x86/hvm/emulate.c >>> +++ b/xen/arch/x86/hvm/emulate.c >>> @@ -1778,6 +1778,28 @@ int hvm_emulate_one_no_write( >>> return _hvm_emulate_one(hvmemul_ctxt, &hvm_

Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-16 Thread Boris Ostrovsky
On 12/16/2015 04:04 AM, Jan Beulich wrote: On 15.12.15 at 22:02, wrote: --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -1778,6 +1778,28 @@ int hvm_emulate_one_no_write( return _hvm_emulate_one(hvmemul_ctxt, &hvm_emulate_ops_no_write); } +static const struct x8

Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-16 Thread Jan Beulich
>>> On 15.12.15 at 22:02, wrote: > --- a/xen/arch/x86/hvm/emulate.c > +++ b/xen/arch/x86/hvm/emulate.c > @@ -1778,6 +1778,28 @@ int hvm_emulate_one_no_write( > return _hvm_emulate_one(hvmemul_ctxt, &hvm_emulate_ops_no_write); > } > > +static const struct x86_emulate_ops hvm_emulate_ops_mmi

[Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-15 Thread Boris Ostrovsky
Commit 9256f66c1606 ("x86/PCI: intercept all PV Dom0 MMCFG writes") added intercepts for writes to RO MMCFG space from PV dom0. Similar functionality is needed by dom0s in HVM containers (such as PVH and, in the future, HVMlite). Signed-off-by: Boris Ostrovsky --- xen/arch/x86/hvm/emulate.c