From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH v9 08/13] Add IOREQ_TYPE_VMWARE_PORT Date: Tue, 17 Feb 2015 21:44:03 -0500 Message-ID: <54E3FC73.9010500@terremark.com> References: <1424127915-27004-1-git-send-email-dslutz@verizon.com> <1424127915-27004-9-git-send-email-dslutz@verizon.com> <9AAE0902D5BC7E449B7C8E4E778ABCD025804F38@AMSPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD025804F38@AMSPEX01CL01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant , Don Slutz , "xen-devel@lists.xen.org" Cc: Kevin Tian , "Keir (Xen.org)" , Ian Campbell , "Tim (Xen.org)" , Eddie Dong , George Dunlap , Jan Beulich , Stefano Stabellini , Aravind Gopalakrishnan , Jun Nakajima , Andrew Cooper , Ian Jackson , Boris Ostrovsky , Suravee Suthikulpanit List-Id: xen-devel@lists.xenproject.org On 02/17/15 05:08, Paul Durrant wrote: >> -----Original Message----- >> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel- >> bounces@lists.xen.org] On Behalf Of Don Slutz >> Sent: 16 February 2015 23:05 >> -static void hvm_unmap_ioreq_page(struct hvm_ioreq_server *s, bool_t >> buf) >> +static void hvm_unmap_ioreq_page(struct hvm_ioreq_server *s, int buf) >> { >> - struct hvm_ioreq_page *iorp = buf ? &s->bufioreq : &s->ioreq; >> + struct hvm_ioreq_page *iorp = NULL; >> + >> + switch ( buf ) >> + { >> + case 0: >> + iorp = &s->ioreq; >> + break; >> + case 1: >> + iorp = &s->bufioreq; >> + break; >> + case 2: >> + iorp = &s->vmport_ioreq; >> + break; > > Now that buf is no longer a bool, could we have #defined values for the types rather than magic numbers? > Sure. >> + } >> + ASSERT(iorp); >> >> destroy_ring_for_helper(&iorp->va, iorp->page); >> } ... >> + case HVMOP_IO_RANGE_VMWARE_PORT: >> + type_name = "VMware port"; >> + limit = 1; >> + break; >> + case HVMOP_IO_RANGE_TIMEOFFSET: >> + type_name = "timeoffset"; >> + limit = 1; >> + break; >> + case HVMOP_IO_RANGE_INVALIDATE: >> + type_name = "invalidate"; >> + limit = 1; >> + break; >> + default: >> + break; > > Thanks for adding the extra types for timeoffset and > invalidate, although I don't think the invalidate type is > needed. This ioreq is actually broadcast, so there is no > selection required. > Ok, will drop the invalidate one. -Don Slutz > Paul