Message ID | 20200310165332.140774-5-liran.alon@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=AREk=43=nongnu.org=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A3A614B7 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 10 Mar 2020 16:55:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FF51222C3 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 10 Mar 2020 16:55:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="I/jfGyPo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FF51222C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1jBiAf-0005Kl-8O for patchwork-qemu-devel@patchwork.kernel.org; Tue, 10 Mar 2020 12:55:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49296) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <liran.alon@oracle.com>) id 1jBi6V-0006Py-Ar for qemu-devel@nongnu.org; Tue, 10 Mar 2020 12:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <liran.alon@oracle.com>) id 1jBi6U-0005gR-63 for qemu-devel@nongnu.org; Tue, 10 Mar 2020 12:51:39 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:48098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <liran.alon@oracle.com>) id 1jBi6T-0005ce-Ty for qemu-devel@nongnu.org; Tue, 10 Mar 2020 12:51:38 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02AGdL8a104000; Tue, 10 Mar 2020 16:51:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=U32aodggjpFbRI9pQdgcDhChVONF+RTDX2KHaPvvSBU=; b=I/jfGyPos0ezCP3qj5dWTo8LcbVXuPc6zC8oD4fp/jOpvt2gvmf6LcpptYjsSih7VM36 BxqPjV9JsiQramPNaPRbhgTqE65amCeqxuPvVB9r1uSs2ZRnn+DpUlWyOpYnC/uzDZDb 0m4qQn+noqVbUYFbPrfVFYYM+QAcnVtTNgG4GncVW93R7I1b29EaRmxI4l3JGyKn3H9Z 57wdRvJQDg2tZrvjn81nT+cTMT4kI1U8l7f/6Cx9ULyTTnxuWEC6WPgG3PXze1QcIS0z Z94wouySSU+H6sNw/Ixp2e5Ilf1uAVJEiMc4zYFUzbcTpGxw7GNhm9yrX77WTnNolZE7 MQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2yp7hm35pu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Mar 2020 16:51:36 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02AGcOfS053104; Tue, 10 Mar 2020 16:51:35 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2yp8nu24su-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Mar 2020 16:51:35 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 02AGpYfm001913; Tue, 10 Mar 2020 16:51:34 GMT Received: from spark.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Mar 2020 09:51:34 -0700 From: Liran Alon <liran.alon@oracle.com> To: qemu-devel@nongnu.org Subject: [PATCH v2 04/16] hw/i386/vmport: Set EAX to -1 on failed and unsupported commands Date: Tue, 10 Mar 2020 18:53:20 +0200 Message-Id: <20200310165332.140774-5-liran.alon@oracle.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200310165332.140774-1-liran.alon@oracle.com> References: <20200310165332.140774-1-liran.alon@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9556 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 phishscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=1 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003100103 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9556 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 impostorscore=0 mlxlogscore=999 suspectscore=1 phishscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003100103 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: ehabkost@redhat.com, mst@redhat.com, Liran Alon <liran.alon@oracle.com>, nikita.leshchenko@oracle.com, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> |
Series |
: hw/i386/vmport: Bug fixes and improvements
|
expand
|
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 736d78263889..8115852720c8 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -75,17 +75,23 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr addr, eax = env->regs[R_EAX]; if (eax != VMPORT_MAGIC) { - goto out; + goto err; } command = env->regs[R_ECX]; trace_vmport_command(command); if (command >= VMPORT_ENTRIES || !s->func[command]) { qemu_log_mask(LOG_UNIMP, "vmport: unknown command %x\n", command); - goto out; + goto err; } eax = s->func[command](s->opaque[command], addr); + goto out; + +err: + if (s->version > 1) { + eax = UINT32_MAX; + } out: /*