From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH 1/2] Xen: enabling emulated MSI injection Date: Thu, 26 May 2011 11:30:14 +0800 Message-ID: References: <625BA99ED14B2D499DC4E29D8138F1505C9BFA3DDD@shsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C9BFA3DDD@shsmsx502.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, May 26, 2011 at 11:21 AM, Tian, Kevin wrote: >> From: Wei Liu >> Sent: Thursday, May 26, 2011 11:09 AM >> >> commit 176dc2a26b4b9dd0fe30fab3b168722766218245 >> Author: Wei Liu >> Date: =C2=A0 Thu May 26 10:23:01 2011 +0800 >> >> =C2=A0 =C2=A0 x86: Add a new operation in HVMOP to inject emulated MSI. >> >> =C2=A0 =C2=A0 The original vmsi_deliver is renamed to vmsi_deliver_irq. = New > > in your patch you mean vmsi_deliver_pirq which is inconsistent. > >> =C2=A0 =C2=A0 vmsi_deliver is dedicated to the actually delivering. >> >> =C2=A0 =C2=A0 Signed-off-by: Wei Liu >> >> --- a/xen/include/public/hvm/hvm_op.h >> +++ b/xen/include/public/hvm/hvm_op.h >> @@ -82,11 +82,24 @@ typedef enum { >> =C2=A0 =C2=A0 =C2=A0HVMMEM_mmio_dm, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0/* Reads and write go to the device >> model */ >> =C2=A0} hvmmem_type_t; >> >> +/* MSI injection for emulated devices */ >> +#define HVMOP_inj_msi =C2=A0 =C2=A0 =C2=A0 =C2=A0 6 >> +struct xen_hvm_inj_msi { >> + =C2=A0 =C2=A0/* Domain to be injected */ >> + =C2=A0 =C2=A0domid_t =C2=A0 domid; >> + =C2=A0 =C2=A0/* Address (0xfeeXXXXX) */ >> + =C2=A0 =C2=A0uint64_t =C2=A0addr; >> + =C2=A0 =C2=A0/* Data -- lower 32 bits */ >> + =C2=A0 =C2=A0uint32_t =C2=A0data; >> +}; >> +typedef struct xen_hvm_inj_msi xen_hvm_inj_msi_t; >> +DEFINE_XEN_GUEST_HANDLE(xen_hvm_inj_msi_t); >> + >> =C2=A0/* Following tools-only interfaces may change in future. */ >> =C2=A0#if defined(__XEN__) || defined(__XEN_TOOLS__) >> >> =C2=A0/* Track dirty VRAM. */ >> -#define HVMOP_track_dirty_vram =C2=A0 =C2=A06 >> +#define HVMOP_track_dirty_vram =C2=A0 =C2=A07 >> =C2=A0struct xen_hvm_track_dirty_vram { >> =C2=A0 =C2=A0 =C2=A0/* Domain to be tracked. */ >> =C2=A0 =C2=A0 =C2=A0domid_t =C2=A0domid; > > This breaks backward API compatibility. > > Thanks > Kevin > Stefano suggests this rename. The only function that invokes vmsi_deliver() is hvm_pci_msi_assert(), IIRC. That has been taken care of. --=20 Best regards Wei Liu Twitter: @iliuw Site: http://liuw.name