diff mbox

Delivery Status Notification (Delay)

Message ID 191512359.57256.1492185561453.JavaMail.root@smtp3.opayq.com (mailing list archive)
State New, archived
Headers show

Commit Message

f4da1594@opayq.com April 14, 2017, 3:29 p.m. UTC
** Delivery incomplete **

There was a temporary problem delivering your message to curtiskwong9@gmail.com. Gmail will retry for 22 more hours. You'll be notified if the delivery fails permanently.


;
        Wed, 12 Apr 2017 06:38:51 -0700 (PDT)
Return-Path: <FWD-737QHYSMHVAYQAUCAOIQBDAAGAQLMA2YAMHECCJDLIBAYAWYAKIAZAQHS=
MCCWMBLIA4UANQUEIGCIMBKMAZUZ4AAEAACA=3D=3D=3D@opayq.com>
Received: from [23.21.143.60] (smtp4.opayq.com. [23.21.143.60])
        by mx.google.com with ESMTPS id l14si12477201qtb.91.2017.04.12.06.3=
8.51
        for <curtiskwong9@gmail.com>
        (version=3DTLS1_2 cipher=3DAES128-SHA bits=3D128/128);
        Wed, 12 Apr 2017 06:38:51 -0700 (PDT)
Received-SPF: pass (google.com: domain of fwd-737qhysmhvayqaucaoiqbdaagaqlm=
a2yamheccjdlibayawyakiazaqhsmccwmblia4uanqueigcimbkmazuz4aaeaaca=3D=3D=3D@o=
payq.com designates 23.21.143.60 as permitted sender) client-ip=3D23.21.143=
.60;
Authentication-Results: mx.google.com;
       dkim=3Dpass header.i=3D@opayq.com;
       spf=3Dpass (google.com: domain of fwd-737qhysmhvayqaucaoiqbdaagaqlma=
2yamheccjdlibayawyakiazaqhsmccwmblia4uanqueigcimbkmazuz4aaeaaca=3D=3D=3D@op=
ayq.com designates 23.21.143.60 as permitted sender) smtp.mailfrom=3DFWD-73=
7QHYSMHVAYQAUCAOIQBDAAGAQLMA2YAMHECCJDLIBAYAWYAKIAZAQHSMCCWMBLIA4UANQUEIGCI=
MBKMAZUZ4AAEAACA=3D=3D=3D@opayq.com
DKIM-Signature: v=3D1; d=3Dopayq.com; t=3D1492004316; b=3DKxQftiD8em4TVUQHP=
G1ZRlvz2H0EuLe6d783DlaK6s3suQlO/GBD2um7O6dKjFY9ET/kU83G1Q+C38t1cHqkNe6uDgqx=
O29uxF0ycn0/4UtrNhBHT564zl9YJSHbUyYWPJ4aCg9KA98UP6EAC1qXQVD2TINQGF0w7zuaPJE=
xZRA=3D; s=3Dabine; c=3Drelaxed/relaxed; a=3Drsa-sha256; bh=3D2YJMUTn2N6BG7=
GQoavJHyvfCaq5zxI9dktVCLv5g9uc=3D; h=3DDate:From:Reply-To:Subject:To:List-U=
nsubscribe;
MIME-Version: 1.0
Content-Type: text/plain; charset=3D"utf-8"
Content-Transfer-Encoding: 7bit
X-GetAbine-Processed: 1
From: "lists.xen.org [Masked]" <FWD-737QHYSMHVAYQAUCAOIQBDAAGAQLMA2YAMHECCJ=
DLIBAYAWYAKIAZAQHSMCCWMBLIA4UANQUEIGCIMBKMAZUZ4AAEAACA=3D=3D=3D@opayq.com>
Sender: "lists.xen.org [Masked]" <FWD-737QHYSMHVAYQAUCAOIQBDAAGAQLMA2YAMHEC=
CJDLIBAYAWYAKIAZAQHSMCCWMBLIA4UANQUEIGCIMBKMAZUZ4AAEAACA=3D=3D=3D@opayq.com=
>
Reply-To:=20
	FWD-737QHYSMHVAYQAUCAOIQBDAAGAQLMA2YAMHECCJDLIBAYAWYAKIAZAQHSMCCWMBLIA4UAN=
QUEIGCIMBKMAZUZ4AAEAACA=3D=3D=3D@opayq.com
To: f4da1594@opayq.com
X-GetAbine-Sender: xen-changelog-bounces@lists.xen.org
X-GetAbine-Disposable: f4da1594@opayq.com
X-GetAbine-Host-Address: 23.21.143.60
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrALMWRWlGSWpSXmKPExsWS0XRdVfe1+rs
 Ig//bRS0mbDNwYPTY3reLPYAxijUzLym/IoE1Y9fZHraCBUYVyx49YG1gfKbaxcjFISTwhVGi
 feNZZgjnPKPE+XevmLoYOTjYBMQk5u5V6GLk5BARUJWYtWI5M4gtJKAu0fS7gQ3EFhZwlrg/a
 x2YzStgJnF8yz4WEJsFqP7r7UOsExg5FjAyrGJUL04tKkst0jXUSyrKTM8oyU3MzNE1NDDWy0
 0tLk5MT81JTCrWS87P3cQI9AkDEOxgXP7R6RCjJAeTkijvZYW3EUJ8SfkplRmJxRnxRaU5qcW
 HGGU4OJQkeN3U3kUICRalpqdWpGXmAIMDJi3BwaMkwpsCkuYtLkjMLc5Mh0idYlSUEue1BEkI
 gCQySvPg2mABeYlRVkqYlxHoECGegtSi3MwSVPlXjOIcjErCvOYgU3gy80rgpr8CWswEtHjt3
 rcgi0sSEVJSDYzbth56t4qly7XSQcDxzd3NXQwfkhu+HE66NdXQU/t5xcm5jeY+zzS8llgEHI
 hIz9drd0sKy7P1arJ69abi6Cap3tv3EkXlqp5FudfHm3cecavbYx1x/u3eqT52C5g1uRmagpZ
 vE3uxv9XTNnClRKDh9eNCYv8Vt943WjH366unH9WVVjNdX6PEUpyRaKjFXFScCABR8WXzQwIA
 AA=3D=3D
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1492002794!95474747!1
X-Originating-IP: [104.130.215.37]
X-SpamReason: No, hits=3D0.0 required=3D7.0 tests=3D
X-StarScan-Received:=20
X-StarScan-Version: 9.4.12; banners=3D-,-,-
X-VirusChecked: Checked
Message-Id: <E1cyI5B-0001iR-Un@xenbits.xenproject.org>
Date: Wed, 12 Apr 2017 13:13:13 +0000
Subject: [Xen-changelog] [xen master] x86/svm: Introduce
	svm_emul_swint_injection()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xen.org>
List-Unsubscribe: <https://lists.xen.org/cgi-bin/mailman/options/xen-change=
log>,=20
 <mailto:xen-changelog-request@lists.xen.org?subject=3Dunsubscribe>
List-Unsubscribe: <mailto:unsubscribe-1188110264-f4da1594@opayq.com>, <http=
s://emails.abine.com/disableDisposable?fwd=3DFWD-737QHYSMHVAYQAUCAOIQBDAAGA=
QLMA2YAMHECCJDLIBAYAWYAKIAZAQHSMCCWMBLIA4UANQUEIGCIMBKMAZUZ4AAEAACA=3D=3D=
=3D@opayq.com>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=3Dhelp>
List-Subscribe: <https://lists.xen.org/cgi-bin/mailman/listinfo/xen-changel=
og>,=20
 <mailto:xen-changelog-request@lists.xen.org?subject=3Dsubscribe>


-------------------------Blur-------------------------
This email is forwarded from a MASKED EMAIL you created using Blur.  (https=
://dnt.abine.com/#help/faq/faq-whataremaskedemails).
IF THIS IS SPAM, CLICK HERE TO BLOCK:
https://dnt.abine.com/#/block_email/f4da1594@opayq.com/FWD-737QHYSMHVAYQAUC=
AOIQBDAAGAQLMA2YAMHECCJDLIBAYAWYAKIAZAQHSMCCWMBLIA4UANQUEIGCIMBKMAZUZ4AAEAA=
CA=3D=3D=3D@opayq.com

Want to shop safely and privately online? Go Premium: https://dnt.abine.com=
/?pk_campaign=3DmaskHeader#premium
-------------------------by Abine-------------------------


commit 897d59a426f19f4099cd34feb0a8da9122810364
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Mar 30 17:27:07 2017 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Apr 6 18:12:59 2017 +0100

    x86/svm: Introduce svm_emul_swint_injection()
   =20
    Software events require emulation in some cases on AMD hardware.  Intro=
duce
    svm_emul_swint_injection() to perform this emulation if necessary in
    svm_inject_event(), which will cope with any sources of event, rather t=
han
    just those coming from x86_emulate().
   =20
    This logic mirrors inject_swint() in the x86 instruction emulator.
   =20
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/svm/svm.c | 133 +++++++++++++++++++++++++++++++++++++++++=
++++
 1 file changed, 133 insertions(+)
diff mbox

Patch

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 4d7e49f..1ffe5c3 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1183,6 +1183,121 @@  static void svm_vcpu_destroy(struct vcpu *v)
     passive_domain_destroy(v);
 }
=20
+/*
+ * Emulate enough of interrupt injection to cover the DPL check (omitted b=
y
+ * hardware), and to work out whether it is safe to move %rip fowards for
+ * architectural trap vs fault semantics in the exception frame (which
+ * hardware won't cope with).
+ *
+ * The event parameter will be modified to a fault if necessary.
+ */
+static void svm_emul_swint_injection(struct x86_event *event)
+{
+    struct vcpu *curr =3D current;
+    const struct vmcb_struct *vmcb =3D curr->arch.hvm_svm.vmcb;
+    const struct cpu_user_regs *regs =3D guest_cpu_user_regs();
+    unsigned int trap =3D event->vector, type =3D event->type;
+    unsigned int fault =3D TRAP_gp_fault, ec =3D 0;
+    pagefault_info_t pfinfo;
+    struct segment_register cs, idtr;
+    unsigned int idte_size, idte_offset;
+    unsigned long idte_linear_addr;
+    struct { uint32_t a, b, c, d; } idte =3D {};
+    bool lm =3D vmcb_get_efer(vmcb) & EFER_LMA;
+    int rc;
+
+    if ( !(vmcb_get_cr0(vmcb) & X86_CR0_PE) )
+        goto raise_exception; /* TODO: support real-mode injection? */
+
+    idte_size   =3D lm ? 16 : 8;
+    idte_offset =3D trap * idte_size;
+
+    /* ICEBP sets the External Event bit despite being an instruction. */
+    ec =3D (trap << 3) | X86_XEC_IDT |
+        (type =3D=3D X86_EVENTTYPE_PRI_SW_EXCEPTION ? X86_XEC_EXT : 0);
+
+    /*
+     * TODO: This does not cover the v8086 mode with CR4.VME case
+     * correctly, but falls on the safe side from the point of view of a
+     * 32bit OS.  Someone with many TUITs can see about reading the TSS
+     * Software Interrupt Redirection bitmap.
+     */
+    if ( (regs->eflags & X86_EFLAGS_VM) &&
+         MASK_EXTR(regs->eflags, X86_EFLAGS_IOPL) !=3D 3 )
+        goto raise_exception;
+
+    /*
+     * Read all 8/16 bytes so the idtr limit check is applied properly to
+     * this entry, even though we don't look at all the words read.
+     */
+    hvm_get_segment_register(curr, x86_seg_cs, &cs);
+    hvm_get_segment_register(curr, x86_seg_idtr, &idtr);
+    if ( !hvm_virtual_to_linear_addr(x86_seg_idtr, &idtr, idte_offset,
+                                     idte_size, hvm_access_read,
+                                     &cs, &idte_linear_addr) )
+        goto raise_exception;
+
+   =20
----- Message truncated -----