Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-04 Thread Yu, Zhang
On 12/2/2014 7:40 PM, Tim Deegan wrote: At 15:38 +0800 on 02 Dec (1417531126), Yu, Zhang wrote: On 12/1/2014 8:13 PM, Tim Deegan wrote: At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: During this bit of archaeology I realised that either

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-04 Thread Tim Deegan
Hi, At 17:01 +0800 on 04 Dec (1417708878), Yu, Zhang wrote: I just noticed that in __hvm_copy()/__hvm_clear(), the grant types are handled before the p2m_ram_ro - will return HVMCOPY_unhandleable. So if p2m_is_discard_write() is supposed to replace the handling of p2m_ram_ro, handling of

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-02 Thread Jan Beulich
On 02.12.14 at 08:48, yu.c.zh...@linux.intel.com wrote: On 12/1/2014 8:31 PM, Jan Beulich wrote: On 01.12.14 at 13:13, t...@xen.org wrote: At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: At 09:32 + on 01 Dec (1417422746), Jan Beulich

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-02 Thread Tim Deegan
At 12:31 + on 01 Dec (1417433464), Jan Beulich wrote: On 01.12.14 at 13:13, t...@xen.org wrote: At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: At 09:32 + on 01 Dec (1417422746), Jan Beulich wrote: On 01.12.14 at 09:49,

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-02 Thread Jan Beulich
On 02.12.14 at 11:37, t...@xen.org wrote: At 12:31 + on 01 Dec (1417433464), Jan Beulich wrote: On 01.12.14 at 13:13, t...@xen.org wrote: At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: At 09:32 + on 01 Dec (1417422746), Jan

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-02 Thread Tim Deegan
At 15:38 +0800 on 02 Dec (1417531126), Yu, Zhang wrote: On 12/1/2014 8:13 PM, Tim Deegan wrote: At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: During this bit of archaeology I realised that either this new type should _not_ be made part

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-02 Thread Jan Beulich
On 02.12.14 at 12:40, t...@xen.org wrote: At 15:38 +0800 on 02 Dec (1417531126), Yu, Zhang wrote: 2 p2m_grant_map_ro is also supposed to be discarded? Will handling of this type of pages goes into __hvm_copy()/__hvm_clear(), or should? I think so, yes. At the moment we inject #GP when the

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-02 Thread Yu, Zhang
On 12/2/2014 7:40 PM, Tim Deegan wrote: At 15:38 +0800 on 02 Dec (1417531126), Yu, Zhang wrote: On 12/1/2014 8:13 PM, Tim Deegan wrote: At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: During this bit of archaeology I realised that either

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-01 Thread Yu, Zhang
On 11/28/2014 5:57 PM, Jan Beulich wrote: On 28.11.14 at 08:59, yu.c.zh...@linux.intel.com wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2838,7 +2838,8 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla, * to the mmio handler. */ if (

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-01 Thread Jan Beulich
On 01.12.14 at 09:49, yu.c.zh...@linux.intel.com wrote: On 11/28/2014 5:57 PM, Jan Beulich wrote: On 28.11.14 at 08:59, yu.c.zh...@linux.intel.com wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2838,7 +2838,8 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-01 Thread Tim Deegan
At 09:32 + on 01 Dec (1417422746), Jan Beulich wrote: On 01.12.14 at 09:49, yu.c.zh...@linux.intel.com wrote: On 11/28/2014 5:57 PM, Jan Beulich wrote: On 28.11.14 at 08:59, yu.c.zh...@linux.intel.com wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2838,7

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-01 Thread Jan Beulich
On 01.12.14 at 11:30, t...@xen.org wrote: At 09:32 + on 01 Dec (1417422746), Jan Beulich wrote: On 01.12.14 at 09:49, yu.c.zh...@linux.intel.com wrote: To my understanding, pages with p2m_ram_ro are not supposed to be modified by guest. So in __hvm_copy(), when p2m type of a page is

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-01 Thread Tim Deegan
At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: At 09:32 + on 01 Dec (1417422746), Jan Beulich wrote: On 01.12.14 at 09:49, yu.c.zh...@linux.intel.com wrote: To my understanding, pages with p2m_ram_ro are not supposed to be

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-12-01 Thread Jan Beulich
On 01.12.14 at 13:13, t...@xen.org wrote: At 11:17 + on 01 Dec (1417429027), Jan Beulich wrote: On 01.12.14 at 11:30, t...@xen.org wrote: At 09:32 + on 01 Dec (1417422746), Jan Beulich wrote: On 01.12.14 at 09:49, yu.c.zh...@linux.intel.com wrote: To my understanding, pages

Re: [Xen-devel] [PATCH v4] x86: add p2m_mmio_write_dm

2014-11-28 Thread Jan Beulich
On 28.11.14 at 08:59, yu.c.zh...@linux.intel.com wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2838,7 +2838,8 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla, * to the mmio handler. */ if ( (p2mt == p2m_mmio_dm) || -