From mboxrd@z Thu Jan 1 00:00:00 1970 From: Corneliu ZUZU Subject: Re: [PATCH v3 2/2] xen/vm-events: Move parts of monitor_domctl code to common-side. Date: Mon, 15 Feb 2016 14:42:54 +0200 Message-ID: <56C1C7CE.6000000@bitdefender.com> References: <1455518118-414-1-git-send-email-czuzu@bitdefender.com> <1455518254-507-1-git-send-email-czuzu@bitdefender.com> <56C1C79002000078000D20B8@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini , Jan Beulich Cc: Tamas K Lengyel , Keir Fraser , Ian Campbell , Razvan Cojocaru , Andrew Cooper , xen-devel@lists.xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 2/15/2016 2:25 PM, Stefano Stabellini wrote: > On Mon, 15 Feb 2016, Jan Beulich wrote: >>>>> On 15.02.16 at 07:37, wrote: >>> default: >>> - return -EOPNOTSUPP; >>> + /* >>> + * Should not be reached unless arch_monitor_get_capabilities() is not >>> + * properly implemented. In that case, since reaching this point does >>> + * not really break anything, don't crash the hypervisor, issue a >>> + * warning instead of BUG(). >>> + */ >>> + printk(XENLOG_WARNING >>> + "WARNING, BUG: arch_monitor_get_capabilities() not implemented" >>> + "properly.\n"); >>> >>> - }; >>> + return -EOPNOTSUPP; >>> + } >> I disagree with the issuing of a message here. At the very least this >> should be a dprintk(). Perhaps an ASSERT_UNREACHABLE() would be >> the way to go? What's worse though is that I can't see the checking >> which would make true the "should not be reached" statement above >> (not that you must not rely on the caller of the hypercall to be well >> behaved). > ASSERT_UNREACHABLE() is appropriate here > Noted. Corneliu.