[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/HVM: drop dead assignments from hvmemul_rep_{movs,stos}()
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 27 Jul 2023 17:25:44 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lVCXWdDKp2ChIZDRQduATGvrRSz+7n/XiqcGDuffOUI=; b=cydJMy9UQLgyHfuHnW8IU0JlXK/h2cJlQEp2kp+WF4ZHSJ4HeY+SOyOjFPZJWcJZyB3pOJitO9ghH8C9sApG8KoMDki83KtwpB1IXzCNksoTMLR6L8Sf436WVU43Qj+yiNZ59AJ78rOfQ92i8iZgjbnrYak+6C4H4PdiqicS/wKdEM1trPFFuU0vmd/+6Mgr4F9J4d2Es2OtzEbKN/6lzn8wOirGSmR1LKoSwgQaCQaa+75B/mDIgkboLXrN1/qcXliRvRDx32Vdb+nZ0r8YmTY6fneVJYxpAIn4zr2QbuAOH4uPMhEJbI155/3INKOoIEA9VhhwmE3v2EW5Q1CYxg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PO1bgjRxfM5V2PY5LNVgOIqRGVIiMLEqJAuoPvb4WQ6xJU0IVxkkoYCn7zLxmemVuiw4MGghFZWkPbKVumnUDCUEVuehV8jCjwq29LbB7ySEKvEj++jr33A9EfNjW/pXPmgzreF1qhsrtLMRIL40MCkAveANOdjRkr+UY/jxM9O03ydWLiPWwS+BEG/iEHod1iIdCfZCFjyoooM2y6I6h5RVVOM/2xOBBQo3bu8jjn0w42+K394JZnGb728TPukH9VHg1Hgef5bX431PbxjROBYQKfaSFGX5G/s52U8Bce0/vCw1rqU1AaWGxOlP5QSJUcFCT79vyLRSwqYdiU0Hgg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Paul Durrant <paul@xxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Delivery-date: Thu, 27 Jul 2023 15:25:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
In the latter case the variable altogether is then unused and hence gets
dropped, eliminating a Misra Rule 5.3 violation. I'm afraid I mistakenly
introduced both assignments in 57a57465daaf ("x86/HVM: use available
linear->phys translations in REP MOVS/STOS handling"), likely as a
result of some re-work on the patch.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -1861,7 +1861,6 @@ static int cf_check hvmemul_rep_movs(
return rc;
}
- bytes = PAGE_SIZE - (daddr & ~PAGE_MASK);
if ( hvio->mmio_access.write_access &&
(hvio->mmio_gla == (daddr & PAGE_MASK)) &&
/* See comment above. */
@@ -1988,7 +1987,7 @@ static int cf_check hvmemul_rep_stos(
container_of(ctxt, struct hvm_emulate_ctxt, ctxt);
struct vcpu *curr = current;
struct hvm_vcpu_io *hvio = &curr->arch.hvm.hvm_io;
- unsigned long addr, bytes;
+ unsigned long addr;
paddr_t gpa;
p2m_type_t p2mt;
bool_t df = !!(ctxt->regs->eflags & X86_EFLAGS_DF);
@@ -1998,7 +1997,6 @@ static int cf_check hvmemul_rep_stos(
if ( rc != X86EMUL_OKAY )
return rc;
- bytes = PAGE_SIZE - (addr & ~PAGE_MASK);
if ( hvio->mmio_access.write_access &&
(hvio->mmio_gla == (addr & PAGE_MASK)) &&
/* See respective comment in MOVS processing. */
|