From xen-changelog-bounces@lists.xenproject.org Sun Aug 02 10:44:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 02 Aug 2020 10:44:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2BTJ-0003oj-7Q; Sun, 02 Aug 2020 10:44:05 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=5z07=BM=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2BTH-0003oX-GP
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:03 +0000
X-Inumbo-ID: 1441a942-d4ad-11ea-ae32-12813bfff9fa
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 1441a942-d4ad-11ea-ae32-12813bfff9fa;
 Sun, 02 Aug 2020 10:44:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=PiffM37i/+93CAemv42v+/O7TvWNSXX3HO+FfAAEG5I=; b=ItqiMNlfCMhZgVPH6DzgQHnF3q
 RDo9YXt0C6lO1pj0xV84lDoYYuNMvYeY1VTxXPGKOv/W5GGfOyerrtPE3SOAwfolf+JiPiCAVajpY
 iW83sEl1ijuczq5qKj7KmjsvqPfumAtp2Sly0K1Kaq6HLLXw1zaLgBUJ5pO/mnh87fHM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTG-0008MW-4L
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTG-0002Q2-24
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] tools/configure: drop BASH configure variable
Message-Id: <E1k2BTG-0002Q2-24@xenbits.xenproject.org>
Date: Sun, 02 Aug 2020 10:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a85f67b2658ed8032586b3a3e7cd78814d20aa4b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Jun 26 17:46:38 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Jul 31 15:18:41 2020 +0100

    tools/configure: drop BASH configure variable
    
    This is a weird variable to have in the first place.  The only user of it is
    XSM's CONFIG_SHELL, which opencodes a fallback to sh.  The scripts are shebang
    sh, which is already necessary to support non-Linux build environments.
    
    Make the mkflask.sh and mkaccess_vector.sh scripts executable, drop the
    CONFIG_SHELL, and drop the $BASH variable to prevent further use.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 config/Tools.mk.in                      | 1 -
 tools/configure                         | 5 +----
 tools/configure.ac                      | 1 -
 xen/xsm/flask/Makefile                  | 8 ++------
 xen/xsm/flask/policy/mkaccess_vector.sh | 0
 xen/xsm/flask/policy/mkflask.sh         | 0
 6 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 23df47af8d..48bd9ab731 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -12,7 +12,6 @@ PYTHON              := @PYTHON@
 PYTHON_PATH         := @PYTHONPATH@
 PY_NOOPT_CFLAGS     := @PY_NOOPT_CFLAGS@
 PERL                := @PERL@
-BASH                := @BASH@
 XGETTTEXT           := @XGETTEXT@
 AS86                := @AS86@
 LD86                := @LD86@
diff --git a/tools/configure b/tools/configure
index dd9fb8fb6a..edcdcf4f73 100755
--- a/tools/configure
+++ b/tools/configure
@@ -662,6 +662,7 @@ GREP
 CPP
 pyconfig
 PYTHONPATH
+BASH
 CHECKPOLICY
 XENSTORED
 GO
@@ -686,7 +687,6 @@ SET_MAKE
 AWK
 IASL
 XGETTEXT
-BASH
 FLEX
 BISON
 PERL
@@ -843,7 +843,6 @@ PYTHON
 PERL
 BISON
 FLEX
-BASH
 XGETTEXT
 AS86
 LD86
@@ -1589,7 +1588,6 @@ Some influential environment variables:
   PERL        Path to Perl parser
   BISON       Path to Bison parser generator
   FLEX        Path to Flex lexical analyser generator
-  BASH        Path to bash shell
   XGETTEXT    Path to xgetttext tool
   AS86        Path to as86 tool
   LD86        Path to ld86 tool
@@ -4718,7 +4716,6 @@ LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"
 
 
 
-
 # Checks for programs.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
diff --git a/tools/configure.ac b/tools/configure.ac
index 9d126b7a14..6614a4f130 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -297,7 +297,6 @@ AC_ARG_VAR([PYTHON], [Path to the Python parser])
 AC_ARG_VAR([PERL], [Path to Perl parser])
 AC_ARG_VAR([BISON], [Path to Bison parser generator])
 AC_ARG_VAR([FLEX], [Path to Flex lexical analyser generator])
-AC_ARG_VAR([BASH], [Path to bash shell])
 AC_ARG_VAR([XGETTEXT], [Path to xgetttext tool])
 AC_ARG_VAR([AS86], [Path to as86 tool])
 AC_ARG_VAR([LD86], [Path to ld86 tool])
diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index 07f36d075d..50bec20a1e 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -8,10 +8,6 @@ CFLAGS-y += -I./include
 
 AWK = awk
 
-CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
-          else if [ -x /bin/bash ]; then echo /bin/bash; \
-          else echo sh; fi ; fi)
-
 FLASK_H_DEPEND = policy/security_classes policy/initial_sids
 AV_H_DEPEND = policy/access_vectors
 
@@ -24,14 +20,14 @@ extra-y += $(ALL_H_FILES)
 
 mkflask := policy/mkflask.sh
 quiet_cmd_mkflask = MKFLASK $@
-cmd_mkflask = $(CONFIG_SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND)
+cmd_mkflask = $(SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND)
 
 $(subst include/,%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE
 	$(call if_changed,mkflask)
 
 mkaccess := policy/mkaccess_vector.sh
 quiet_cmd_mkaccess = MKACCESS VECTOR $@
-cmd_mkaccess = $(CONFIG_SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND)
+cmd_mkaccess = $(SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND)
 
 $(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE
 	$(call if_changed,mkaccess)
diff --git a/xen/xsm/flask/policy/mkaccess_vector.sh b/xen/xsm/flask/policy/mkaccess_vector.sh
old mode 100644
new mode 100755
diff --git a/xen/xsm/flask/policy/mkflask.sh b/xen/xsm/flask/policy/mkflask.sh
old mode 100644
new mode 100755
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 02 10:44:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 02 Aug 2020 10:44:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2BTS-0003ph-8w; Sun, 02 Aug 2020 10:44:14 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=5z07=BM=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2BTR-0003pb-Dk
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:13 +0000
X-Inumbo-ID: 1a45159a-d4ad-11ea-8fe4-bc764e2007e4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 1a45159a-d4ad-11ea-8fe4-bc764e2007e4;
 Sun, 02 Aug 2020 10:44:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=l9/iRtVbKxyEPywHOjOv9YXeeFLHonR0CS4zC704XNk=; b=r2NinHM+bWDyP2ZIJAM5QQqUHP
 lJfNhBL4A1bfVWPsc0VCPJeI+nugCB4oLzkDqC6TUH7tEklIbIKVGYhxuIowP8CI5ypedHvS9ktjb
 MkV3jeek0mALSYpzgIzEdQbX9RmTrU42X7ZZY2iWhTZgXSrKynx7SqingwfvaJXHAo8A=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTQ-0008MZ-7c
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTQ-0002Qu-6e
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/PV: drop a few misleading paging_mode_refcounts()
 checks
Message-Id: <E1k2BTQ-0002Qu-6e@xenbits.xenproject.org>
Date: Sun, 02 Aug 2020 10:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit cb79dc100fae7295009118ae10efe7822d5be2af
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jul 31 17:40:13 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jul 31 17:40:13 2020 +0200

    x86/PV: drop a few misleading paging_mode_refcounts() checks
    
    The filling and cleaning up of v->arch.guest_table in new_guest_cr3()
    was apparently inconsistent so far: There was a type ref acquired
    unconditionally for the new top level page table, but the dropping of
    the old type ref was conditional upon !paging_mode_refcounts(). Mirror
    this also to arch_set_info_guest().
    
    Also move new_guest_cr3()'s #ifdef to around the function - both callers
    now get built only when CONFIG_PV, i.e. no need to retain a stub.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/domain.c |  7 ++-----
 xen/arch/x86/mm.c     | 38 ++++++++++++++++----------------------
 2 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index fee6c3931a..f8084dc9e3 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1122,8 +1122,6 @@ int arch_set_info_guest(
 
     if ( !cr3_page )
         rc = -EINVAL;
-    else if ( paging_mode_refcounts(d) )
-        /* nothing */;
     else if ( cr3_page == v->arch.old_guest_table )
     {
         v->arch.old_guest_table = NULL;
@@ -1144,8 +1142,7 @@ int arch_set_info_guest(
         case -ERESTART:
             break;
         case 0:
-            if ( !compat && !VM_ASSIST(d, m2p_strict) &&
-                 !paging_mode_refcounts(d) )
+            if ( !compat && !VM_ASSIST(d, m2p_strict) )
                 fill_ro_mpt(cr3_mfn);
             break;
         default:
@@ -1166,7 +1163,7 @@ int arch_set_info_guest(
 
             if ( !cr3_page )
                 rc = -EINVAL;
-            else if ( !paging_mode_refcounts(d) )
+            else
             {
                 rc = get_page_type_preemptible(cr3_page, PGT_root_page_table);
                 switch ( rc )
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 82bc676553..638f6bf580 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -3149,9 +3149,9 @@ int vcpu_destroy_pagetables(struct vcpu *v)
     return rc;
 }
 
+#ifdef CONFIG_PV
 int new_guest_cr3(mfn_t mfn)
 {
-#ifdef CONFIG_PV
     struct vcpu *curr = current;
     struct domain *d = curr->domain;
     int rc;
@@ -3220,7 +3220,7 @@ int new_guest_cr3(mfn_t mfn)
 
     pv_destroy_ldt(curr); /* Unconditional TLB flush later. */
 
-    if ( !VM_ASSIST(d, m2p_strict) && !paging_mode_refcounts(d) )
+    if ( !VM_ASSIST(d, m2p_strict) )
         fill_ro_mpt(mfn);
     curr->arch.guest_table = pagetable_from_mfn(mfn);
     update_cr3(curr);
@@ -3231,30 +3231,24 @@ int new_guest_cr3(mfn_t mfn)
     {
         struct page_info *page = mfn_to_page(old_base_mfn);
 
-        if ( paging_mode_refcounts(d) )
-            put_page(page);
-        else
-            switch ( rc = put_page_and_type_preemptible(page) )
-            {
-            case -EINTR:
-            case -ERESTART:
-                curr->arch.old_guest_ptpg = NULL;
-                curr->arch.old_guest_table = page;
-                curr->arch.old_guest_table_partial = (rc == -ERESTART);
-                rc = -ERESTART;
-                break;
-            default:
-                BUG_ON(rc);
-                break;
-            }
+        switch ( rc = put_page_and_type_preemptible(page) )
+        {
+        case -EINTR:
+        case -ERESTART:
+            curr->arch.old_guest_ptpg = NULL;
+            curr->arch.old_guest_table = page;
+            curr->arch.old_guest_table_partial = (rc == -ERESTART);
+            rc = -ERESTART;
+            break;
+        default:
+            BUG_ON(rc);
+            break;
+        }
     }
 
     return rc;
-#else
-    ASSERT_UNREACHABLE();
-    return -EINVAL;
-#endif
 }
+#endif
 
 #ifdef CONFIG_PV
 static int vcpumask_to_pcpumask(
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 02 10:44:24 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 02 Aug 2020 10:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2BTc-0003rI-AN; Sun, 02 Aug 2020 10:44:24 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=5z07=BM=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2BTa-0003r1-Vf
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:23 +0000
X-Inumbo-ID: 204b3fd2-d4ad-11ea-ae32-12813bfff9fa
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 204b3fd2-d4ad-11ea-ae32-12813bfff9fa;
 Sun, 02 Aug 2020 10:44:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=pFWe6+mOpfJIwp1UVZq6pC35VWFIsJA2Gjbxx5Rp8vY=; b=CPLZCrA6cJZaUV1+/8HNrfCI+7
 F5PqH17Xgf8eGHz1DeaIZ+LByh4uomQyuUP8ertS7AbtAmSoiU9BxSkDMoCJwB/a/vZRou/qbVHcj
 CN6YVRlx0g0uJQH/uMUkA16EW581LFxE4VgiaJ6n31NJiJEJ7BDnmjWNOOgO+tw+Dzy4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTa-0008NE-B3
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTa-0002Rm-9W
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] tools/xen-cpuid: show enqcmd
Message-Id: <E1k2BTa-0002Rm-9W@xenbits.xenproject.org>
Date: Sun, 02 Aug 2020 10:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 132ece59bfae2864f8888e489563bf09cd92fa44
Author:     Olaf Hering <olaf@aepfle.de>
AuthorDate: Fri Jul 31 17:41:27 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jul 31 17:41:27 2020 +0200

    tools/xen-cpuid: show enqcmd
    
    Translate <29> into a feature string.
    
    Signed-off-by: Olaf Hering <olaf@aepfle.de>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 tools/misc/xen-cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c
index ac3548dcfe..2446941a47 100644
--- a/tools/misc/xen-cpuid.c
+++ b/tools/misc/xen-cpuid.c
@@ -133,7 +133,7 @@ static const char *const str_7c0[32] =
     [22] = "rdpid",
     /* 24 */                   [25] = "cldemote",
     /* 26 */                   [27] = "movdiri",
-    [28] = "movdir64b",
+    [28] = "movdir64b",        [29] = "enqcmd",
     [30] = "sgx-lc",
 };
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 02 10:44:34 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 02 Aug 2020 10:44:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2BTm-0003ss-Bq; Sun, 02 Aug 2020 10:44:34 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=5z07=BM=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2BTl-0003sd-B1
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:33 +0000
X-Inumbo-ID: 264e6aa8-d4ad-11ea-8fe4-bc764e2007e4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 264e6aa8-d4ad-11ea-8fe4-bc764e2007e4;
 Sun, 02 Aug 2020 10:44:32 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=6tMJ5qpPJkv8m5UTepZQ0tjKjwSHvaCtK9uhE2IGhOc=; b=tVJ5Rf396n7EpzrqF/KdlrcwU9
 dexB+78H/7AhPo/0IwzkpuXByouoSa2EO6Ns0lGwrC2DOLh28fdcy/Px/bWsgflkywJGeBhCXJ3Jx
 GwDvCJi/uqjDGq8NPkkttOHAMKDG0FkMtRqPk4MqEJ5upZuLtUzu7ti9zV7BfvnRjCqs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTk-0008NL-FL
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTk-0002ST-Di
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:32 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: replace UB shifts
Message-Id: <E1k2BTk-0002ST-Di@xenbits.xenproject.org>
Date: Sun, 02 Aug 2020 10:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b6a907f8c83d37886d0523f1aeff61b98e133498
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Jul 31 17:41:58 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jul 31 17:41:58 2020 +0200

    x86emul: replace UB shifts
    
    Displacement values can be negative, hence we shouldn't left-shift them.
    Or else we get
    
    (XEN) UBSAN: Undefined behaviour in x86_emulate/x86_emulate.c:3482:55
    (XEN) left shift of negative value -2
    
    While auditing shifts, I noticed a pair of missing parentheses, which
    also get added right here.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 44474a268b..b8a4a1ca82 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3370,7 +3370,7 @@ x86_decode(
         {
             generate_exception_if(d & vSIB, EXC_UD);
             modrm_rm |= ((rex_prefix & 1) << 3) |
-                        (evex_encoded() && !evex.x) << 4;
+                        ((evex_encoded() && !evex.x) << 4);
             ea.type = OP_REG;
         }
         else if ( ad_bytes == 2 )
@@ -3417,7 +3417,7 @@ x86_decode(
                     ea.mem.off = insn_fetch_type(int16_t);
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int16_t);
@@ -3479,7 +3479,7 @@ x86_decode(
                 pc_rel = mode_64bit();
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int32_t);
@@ -10028,7 +10028,8 @@ x86_emulate(
                 continue;
 
             rc = ops->write(ea.mem.seg,
-                            truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                            truncate_ea(ea.mem.off +
+                                        idx * (1 << state->sib_scale)),
                             (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -10146,7 +10147,7 @@ x86_emulate(
                   ? ops->write
                   : ops->read)(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                NULL, 0, ctxt);
             if ( rc == X86EMUL_EXCEPTION )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 02 10:44:44 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 02 Aug 2020 10:44:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2BTw-0003uW-DQ; Sun, 02 Aug 2020 10:44:44 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=5z07=BM=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2BTv-0003uO-AJ
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:43 +0000
X-Inumbo-ID: 2c5a11a4-d4ad-11ea-ae32-12813bfff9fa
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 2c5a11a4-d4ad-11ea-ae32-12813bfff9fa;
 Sun, 02 Aug 2020 10:44:42 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=81ts+b177J2W2LhERNZNgtrwH7Ts/nO7JpUjMVgbZkU=; b=IT0WBmUnx/NtRhYr1rzTNNrwVR
 8y9WmwfwN/ZiO7u+JVXRi4R+GzVUVig/Mq2LNgskQY+x+H5aUdLDqs4mWDL17r+fSnnCHfPYkM7Q6
 KDn0ySWOVVeJbOP0fripSNR8ZlXH+nbjLPVYFLJpfDXUJtIBfyxp3J5xAVX4JDqLVPOY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTu-0008NV-IR
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BTu-0002T6-HO
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:42 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/hvm: set 'ipat' in EPT for special pages
Message-Id: <E1k2BTu-0002T6-HO@xenbits.xenproject.org>
Date: Sun, 02 Aug 2020 10:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ca24b2ffdbd9a25b2d313a547ccbe97baf3e5a8d
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Jul 31 17:42:47 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jul 31 17:42:47 2020 +0200

    x86/hvm: set 'ipat' in EPT for special pages
    
    All non-MMIO ranges (i.e those not mapping real device MMIO regions) that
    map valid MFNs are normally marked MTRR_TYPE_WRBACK and 'ipat' is set. Hence
    when PV drivers running in a guest populate the BAR space of the Xen Platform
    PCI Device with pages such as the Shared Info page or Grant Table pages,
    accesses to these pages will be cachable.
    
    However, should IOMMU mappings be enabled be enabled for the guest then these
    accesses become uncachable. This has a substantial negative effect on I/O
    throughput of PV devices. Arguably PV drivers should bot be using BAR space to
    host the Shared Info and Grant Table pages but it is currently commonplace for
    them to do this and so this problem needs mitigation. Hence this patch makes
    sure the 'ipat' bit is set for any special page regardless of where in GFN
    space it is mapped.
    
    NOTE: Clearly this mitigation only applies to Intel EPT. It is not obvious
          that there is any similar mitigation possible for AMD NPT. Downstreams
          such as Citrix XenServer have been carrying a patch similar to this for
          several releases though.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/mtrr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 511c3be1c8..2bd64e8025 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -794,6 +794,7 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
 {
     int gmtrr_mtype, hmtrr_mtype;
     struct vcpu *v = current;
+    unsigned long i;
 
     *ipat = 0;
 
@@ -836,6 +837,17 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
+    for ( i = 0; i < (1ul << order); i++ )
+    {
+        if ( is_special_page(mfn_to_page(mfn_add(mfn, i))) )
+        {
+            if ( order )
+                return -1;
+            *ipat = 1;
+            return MTRR_TYPE_WRBACK;
+        }
+    }
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 02 10:44:54 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 02 Aug 2020 10:44:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2BU6-0003wD-Ez; Sun, 02 Aug 2020 10:44:54 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=5z07=BM=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2BU5-0003vw-8f
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:53 +0000
X-Inumbo-ID: 3255de58-d4ad-11ea-ae32-12813bfff9fa
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3255de58-d4ad-11ea-ae32-12813bfff9fa;
 Sun, 02 Aug 2020 10:44:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=1uniYIvKu4xAQMZl95Fldu8DdKxcp2uky6/7KzhY7H0=; b=TwGx7sxwl44LiwFpiQQTfRz36n
 sjVBIi37Bx2iLuSrxO/ij9K/s5aALLWivjH2LB2SaQJtUbOzAU23CKXCXkwImN42wdund8B+YLu9U
 GoJQRa0XuH2prUJ2u1Ek2cwghGpIDUcmrOgXQliRxoPc+h/n2mx1qB6I+bwl1cgbUETw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BU4-0008Nf-LF
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2BU4-0002Tm-KU
 for xen-changelog@lists.xenproject.org; Sun, 02 Aug 2020 10:44:52 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/hvm: simplify 'mmio_direct' check in
 epte_get_entry_emt()
Message-Id: <E1k2BU4-0002Tm-KU@xenbits.xenproject.org>
Date: Sun, 02 Aug 2020 10:44:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 81fd0d3ca4b2cd309403c6e8da662c325dd35750
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Jul 31 17:43:31 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Jul 31 17:43:31 2020 +0200

    x86/hvm: simplify 'mmio_direct' check in epte_get_entry_emt()
    
    Re-factor the code to take advantage of the fact that the APIC access page is
    a 'special' page. The VMX code is left alone and hence the APIC access page is
    still inserted into the P2M with type p2m_mmio_direct. This is left alone as it
    is not obvious there is another suitable type to use, and the necessary
    re-ordering in epte_get_entry_emt() is straightforward.
    
    Suggested-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/mtrr.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 2bd64e8025..fb051d59c3 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -815,23 +815,13 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return -1;
     }
 
-    if ( direct_mmio )
-    {
-        if ( (mfn_x(mfn) ^ mfn_x(d->arch.hvm.vmx.apic_access_mfn)) >> order )
-            return MTRR_TYPE_UNCACHABLE;
-        if ( order )
-            return -1;
-        *ipat = 1;
-        return MTRR_TYPE_WRBACK;
-    }
-
     if ( !mfn_valid(mfn) )
     {
         *ipat = 1;
         return MTRR_TYPE_UNCACHABLE;
     }
 
-    if ( !is_iommu_enabled(d) && !cache_flush_permitted(d) )
+    if ( !direct_mmio && !is_iommu_enabled(d) && !cache_flush_permitted(d) )
     {
         *ipat = 1;
         return MTRR_TYPE_WRBACK;
@@ -848,6 +838,9 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         }
     }
 
+    if ( direct_mmio )
+        return MTRR_TYPE_UNCACHABLE;
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Aug 03 14:33:12 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 03 Aug 2020 14:33:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2bWV-0003Bp-Hp; Mon, 03 Aug 2020 14:33:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9Tpr=BN=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2bWU-0003Bk-M2
 for xen-changelog@lists.xenproject.org; Mon, 03 Aug 2020 14:33:06 +0000
X-Inumbo-ID: 3db56298-d596-11ea-af38-12813bfff9fa
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3db56298-d596-11ea-af38-12813bfff9fa;
 Mon, 03 Aug 2020 14:33:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=rzoyPjIs6uw/k2izI81gVwLzeSoQbkNVQ7tz9RLrQ1k=; b=IcjvrIncQ1KHl8UuZ+9DyaEpU9
 AB0p0FilWNGJJs7hjkqbau7JlIo/FaqKjH9xWd4rmRtxn5iE9vxnIPFR3LgaXhd+y4CNDkaz5N0zH
 Q9QBG0rWe+WRRLxlQM8maHPOXdmkZ6Z7iVjxp9OMepENxphxfvFx/HPq+/3xsd3pjVtE=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2bWS-0003Ke-Ef
 for xen-changelog@lists.xenproject.org; Mon, 03 Aug 2020 14:33:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2bWS-00012d-Ba
 for xen-changelog@lists.xenproject.org; Mon, 03 Aug 2020 14:33:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: avoid assembler warning about .type not taking
 effect in test harness
Message-Id: <E1k2bWS-00012d-Ba@xenbits.xenproject.org>
Date: Mon, 03 Aug 2020 14:33:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9909532113692020c1b50eb974cac47d4ea10e69
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 3 16:27:22 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 3 16:27:22 2020 +0200

    x86emul: avoid assembler warning about .type not taking effect in test harness
    
    gcc re-orders top level blocks by default when optimizing. This
    re-ordering results in all our .type directives to get emitted to the
    assembly file first, followed by gcc's. The assembler warns about
    attempts to change the type of a symbol when it was already set (and
    when there's no intervening setting to "notype").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index 48b3e6dce1..7b07c31bbd 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -295,4 +295,9 @@ x86-emulate.o cpuid.o test_x86_emulator.o evex-disp8.o predicates.o wrappers.o:
 x86-emulate.o: x86_emulate/x86_emulate.c
 x86-emulate.o: HOSTCFLAGS += -D__XEN_TOOLS__
 
+# In order for our custom .type assembler directives to reliably land after
+# gcc's, we need to keep it from re-ordering top-level constructs.
+$(call cc-option-add,HOSTCFLAGS-toplevel,HOSTCC,-fno-toplevel-reorder)
+test_x86_emulator.o: HOSTCFLAGS += $(HOSTCFLAGS-toplevel)
+
 test_x86_emulator.o: $(addsuffix .h,$(TESTCASES)) $(addsuffix -opmask.h,$(OPMASK))
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 04 14:55:11 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 04 Aug 2020 14:55:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2yLK-0007jQ-Aq; Tue, 04 Aug 2020 14:55:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WQRI=BO=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2yLJ-0007iq-Pe
 for xen-changelog@lists.xenproject.org; Tue, 04 Aug 2020 14:55:05 +0000
X-Inumbo-ID: 6fe79273-4858-4ea8-9e8f-f343ec1262b1
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 6fe79273-4858-4ea8-9e8f-f343ec1262b1;
 Tue, 04 Aug 2020 14:55:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=xraMd9FbE4XsQCNh+XntKWK6oWHIwkg4Xf+gAXpCq7c=; b=0Z/MqW593S91GKQjMoo008zz3t
 QjHiB8ehE926zge8cKYQLES3nzaV3zu/J54BEX9W0BRpXjK7znTvLl7s0qJUx0M7AXSL0SI3oZPzt
 L+woNiplaS1OGBJnY4iJpcMfcq0dYpnj1p3ffmkgH9Bn799pJEmzQkkhVFYItq1ga+Eg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2yLI-0001My-BV
 for xen-changelog@lists.xenproject.org; Tue, 04 Aug 2020 14:55:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2yLI-0008Qx-9S
 for xen-changelog@lists.xenproject.org; Tue, 04 Aug 2020 14:55:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] libxl: avoid golang building without CONFIG_GOLANG=y
Message-Id: <E1k2yLI-0008Qx-9S@xenbits.xenproject.org>
Date: Tue, 04 Aug 2020 14:55:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit fe49938f21c26f0ce630c69af055f927dd0ed75f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 3 10:06:32 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Tue Aug 4 14:46:55 2020 +0000

    libxl: avoid golang building without CONFIG_GOLANG=y
    
    While this doesn't address the real problem I've run into (attempting to
    update r/o source files), not recursing into tools/golang/xenlight/ is
    enough to fix the build for me for the moment. I don't currently see why
    60db5da62ac0 ("libxl: Generate golang bindings in libxl Makefile") found
    it necessary to invoke this build step unconditionally.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/libxl/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 38cd43abae..4fc4e1e944 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -282,7 +282,9 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_
 # about races with tools/golang/xenlight/Makefile:all
 .PHONY: idl-external
 idl-external:
+ifeq ($(CONFIG_GOLANG),y)
 	$(MAKE) -C $(XEN_ROOT)/tools/golang/xenlight idl-gen
+endif
 
 LIBXL_IDLGEN_FILES = _libxl_types.h _libxl_types_json.h _libxl_types_private.h _libxl_types.c \
 	_libxl_types_internal.h _libxl_types_internal_json.h _libxl_types_internal_private.h _libxl_types_internal.c
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 04 16:00:10 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 04 Aug 2020 16:00:10 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k2zMF-0006Ps-Tg; Tue, 04 Aug 2020 16:00:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WQRI=BO=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k2zMF-0006Pn-5L
 for xen-changelog@lists.xenproject.org; Tue, 04 Aug 2020 16:00:07 +0000
X-Inumbo-ID: 2f8d0ada-79c8-49cb-80ad-d27ebd6db933
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 2f8d0ada-79c8-49cb-80ad-d27ebd6db933;
 Tue, 04 Aug 2020 16:00:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=WwW+6uerCdO94r5r8QEIutAidnjD5wgvxHZdvA2JWZs=; b=E+EyJ47SQtCl1xajWR1dM+GN/d
 gFbqnRniAWWSQd7IgfhBEhzh5G+WFsDPavssPctCAv4BqsLbZ92Aja+DAB+kLK98qgGWUFPD1U2Jh
 EjildRANf0fvUw+/GmR88mlVuoW4aj+wqMExl2OMVc6hm5McFgPgX0YutasNurgvPmMQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2zMD-0003Lm-0X
 for xen-changelog@lists.xenproject.org; Tue, 04 Aug 2020 16:00:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k2zMC-0004mS-VQ
 for xen-changelog@lists.xenproject.org; Tue, 04 Aug 2020 16:00:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] Revert "libxl: avoid golang building without
 CONFIG_GOLANG=y"
Message-Id: <E1k2zMC-0004mS-VQ@xenbits.xenproject.org>
Date: Tue, 04 Aug 2020 16:00:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c9f9a7258dc07735e2da2b6d0b51a0218c76a51f
Author:     Wei Liu <wl@xen.org>
AuthorDate: Tue Aug 4 15:53:48 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Tue Aug 4 15:58:07 2020 +0000

    Revert "libxl: avoid golang building without CONFIG_GOLANG=y"
    
    This reverts commit fe49938f21c26f0ce630c69af055f927dd0ed75f.
    
    We have an on-going discussion regarding this patch.
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 tools/libxl/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 4fc4e1e944..38cd43abae 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -282,9 +282,7 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_
 # about races with tools/golang/xenlight/Makefile:all
 .PHONY: idl-external
 idl-external:
-ifeq ($(CONFIG_GOLANG),y)
 	$(MAKE) -C $(XEN_ROOT)/tools/golang/xenlight idl-gen
-endif
 
 LIBXL_IDLGEN_FILES = _libxl_types.h _libxl_types_json.h _libxl_types_private.h _libxl_types.c \
 	_libxl_types_internal.h _libxl_types_internal_json.h _libxl_types_internal_private.h _libxl_types_internal.c
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:33:11 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:33:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3ErE-0005LS-0z; Wed, 05 Aug 2020 08:33:08 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3ErC-0005LN-C8
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:06 +0000
X-Inumbo-ID: 2c021379-7ec9-47e0-9373-2af7c695dd36
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 2c021379-7ec9-47e0-9373-2af7c695dd36;
 Wed, 05 Aug 2020 08:33:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=cOj8Zm88whxlxv8mXPYKpeOUEML7lTyFtmNH64736E0=; b=gurBeUkug5lwzDkTN6pnDA/B8T
 ff6JAyq+XJ7wkyKUerfhmvJ+aKuJ3s9xPxNsxFdqEM2LNSSrGvdYJWMkBdceXgn6jG4XAV0TPjD2j
 N+OuiVGTmXzO0lSy7cAHjJeM18064uFpeR4SH3MrKk3TfMvIaGQ5Qzb8Wh5vwnNWyxdY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3ErB-0007QE-6A
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3ErB-0005eQ-4n
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: replace further UB shifts
Message-Id: <E1k3ErB-0005eQ-4n@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:33:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 21de9680eb594a7038d4d4ed78e53ac90a8c5a6e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:19:29 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:19:29 2020 +0200

    x86emul: replace further UB shifts
    
    I have no explanation how I managed to overlook these while putting
    together what is now b6a907f8c83d ("x86emul: replace UB shifts").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index b8a4a1ca82..10b20cf23b 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -9735,7 +9735,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
@@ -9857,7 +9857,8 @@ x86_emulate(
                 continue;
 
             rc = ops->read(ea.mem.seg,
-                           truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                           truncate_ea(ea.mem.off +
+                                       idx * (1 << state->sib_scale)),
                            (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:33:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:33:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3ErN-0005Lx-2S; Wed, 05 Aug 2020 08:33:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3ErM-0005Lr-9u
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:16 +0000
X-Inumbo-ID: 5f7d33a8-f97e-4fc5-a529-dc9c4d230c31
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5f7d33a8-f97e-4fc5-a529-dc9c4d230c31;
 Wed, 05 Aug 2020 08:33:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=t9y+3wpo5lg19cj4xHPsJf7NWI59jCDdlEwDvJnAiSQ=; b=KyijIJ3sC8EbRZTK3Civ3XS6oT
 CrijP4Zt+W1fTb9+s+L1LllukSOuwzp74p34tzbVUuSLDpS2m3YXZ8pjaOYakPNRdtIt0zSgPKhKD
 PuXSTzPLHZ9Bgl2GpufCDPTRCGroH16kAy5XJosLND3/ABw5hdw1dSezGqT9a+lXlXr4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3ErL-0007Qy-A4
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3ErL-0005fJ-8R
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: further FPU env testing relaxation for
 AMD-like CPUs
Message-Id: <E1k3ErL-0005fJ-8R@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:33:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 48660560d1b64763551be5746f980eec700ba46c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:20:59 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:20:59 2020 +0200

    x86emul: further FPU env testing relaxation for AMD-like CPUs
    
    See the code comment that's being extended. Additionally a few more
    zap_fpsel() invocations are needed - whenever we stored state after
    there potentially having been a context switch behind our backs.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/test_x86_emulator.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tools/tests/x86_emulator/test_x86_emulator.c b/tools/tests/x86_emulator/test_x86_emulator.c
index 4b01fa8b8d..b9663214e2 100644
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -752,6 +752,13 @@ static struct x86_emulate_ops emulops = {
  * 64-bit OSes may not (be able to) properly restore the two selectors in
  * the FPU environment. Zap them so that memcmp() on two saved images will
  * work regardless of whether a context switch occurred in the middle.
+ *
+ * Additionally on AMD-like CPUs FDP/FIP/FOP may get lost across context
+ * switches, when there's no unmasked pending FP exception: With
+ * CPUID.80000008.EBX[2] clear, the fields don't get written/read by
+ * {F,}XSAVE / {F,}XRSTOR (which OSes often compensate for by invoking an
+ * insn forcing the fields to gain a deterministic value), whereas with said
+ * bit set, zeroes will get written (and hence later restored).
  */
 static void zap_fpsel(unsigned int *env, bool is_32bit)
 {
@@ -765,6 +772,21 @@ static void zap_fpsel(unsigned int *env, bool is_32bit)
         env[2] &= ~0xffff;
         env[3] &= ~0xffff;
     }
+
+    if ( cp.x86_vendor != X86_VENDOR_AMD && cp.x86_vendor != X86_VENDOR_HYGON )
+        return;
+
+    if ( is_32bit )
+    {
+        env[3] = 0;
+        env[4] = 0;
+        env[5] = 0;
+    }
+    else
+    {
+        env[1] &= 0xffff;
+        env[2] = 0;
+    }
 }
 
 static void zap_xfpsel(unsigned int *env)
@@ -2460,6 +2482,7 @@ int main(int argc, char **argv)
         regs.edx = (unsigned long)res;
         rc = x86_emulate(&ctxt, &emulops);
         asm volatile ( "fnstenv %0" : "=m" (res[9]) :: "memory" );
+        zap_fpsel(&res[9], true);
         if ( (rc != X86EMUL_OKAY) ||
              memcmp(res + 2, res + 9, 28) ||
              (regs.eip != (unsigned long)&instr[3]) )
@@ -2487,6 +2510,7 @@ int main(int argc, char **argv)
         res[23] = 0xaa55aa55;
         res[24] = 0xaa55aa55;
         rc = x86_emulate(&ctxt, &emulops);
+        zap_fpsel(&res[0], false);
         if ( (rc != X86EMUL_OKAY) ||
              memcmp(res, res + 25, 94) ||
              (res[23] >> 16) != 0xaa55 ||
@@ -2514,6 +2538,7 @@ int main(int argc, char **argv)
         regs.edx = (unsigned long)res;
         rc = x86_emulate(&ctxt, &emulops);
         asm volatile ( "fnsave %0" : "=m" (res[27]) :: "memory" );
+        zap_fpsel(&res[27], true);
         if ( (rc != X86EMUL_OKAY) ||
              memcmp(res, res + 27, 108) ||
              (regs.eip != (unsigned long)&instr[2]) )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:33:28 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:33:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3ErY-0005N9-3z; Wed, 05 Aug 2020 08:33:28 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3ErW-0005Mw-I7
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:26 +0000
X-Inumbo-ID: 3b6da66c-d886-43d1-b5b9-182bb8c79c55
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3b6da66c-d886-43d1-b5b9-182bb8c79c55;
 Wed, 05 Aug 2020 08:33:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=dw0QWq6rWrZ4hXwyN+3qpTByb4JVmcySN8SlxnUGQi4=; b=Tw62NXhfGaQcasWaCyI/tAZMmr
 9ks7OEgf2XOemc6zogwfahA003Y0XTl7g2GjFSCnVA0d84nJrbGBN8eUHi5L2RZfkps3R6KVsXOHE
 H0Hatn6MwAwfCHrg69b02XlZ8EnElld0gOKqnIbdhUFq6NpLn6+zmcs16IlVul7xi/Fg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3ErV-0007R8-Di
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3ErV-0005g3-CJ
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: comment update after "drop high compat r/o M2P
 table address range"
Message-Id: <E1k3ErV-0005g3-CJ@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:33:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 2e98d0b1d09e99e3d1287cb13f42b604ebc3c29a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:21:22 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:21:22 2020 +0200

    x86: comment update after "drop high compat r/o M2P table address range"
    
    Commit 5af040ef8b57 clearly should also have updated the comment, not
    just the #define-s.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/include/asm-x86/config.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 2ba234383d..665e9cc31d 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -144,18 +144,16 @@ extern unsigned char boot_edid_info[128];
  *  0xffff82d000000000 - 0xffff82d03fffffff [1GB,   2^30 bytes, PML4:261]
  *    Compatibility machine-to-phys translation table.
  *  0xffff82d040000000 - 0xffff82d07fffffff [1GB,   2^30 bytes, PML4:261]
- *    High read-only compatibility machine-to-phys translation table.
- *  0xffff82d080000000 - 0xffff82d0bfffffff [1GB,   2^30 bytes, PML4:261]
  *    Xen text, static data, bss.
 #ifndef CONFIG_BIGMEM
- *  0xffff82d0c0000000 - 0xffff82dfffffffff [61GB,              PML4:261]
+ *  0xffff82d080000000 - 0xffff82dfffffffff [62GB,              PML4:261]
  *    Reserved for future use.
  *  0xffff82e000000000 - 0xffff82ffffffffff [128GB, 2^37 bytes, PML4:261]
  *    Page-frame information array.
  *  0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271]
  *    1:1 direct mapping of all physical memory.
 #else
- *  0xffff82d0c0000000 - 0xffff82ffffffffff [189GB,             PML4:261]
+ *  0xffff82d080000000 - 0xffff82ffffffffff [190GB,             PML4:261]
  *    Reserved for future use.
  *  0xffff830000000000 - 0xffff847fffffffff [1.5TB, 3*2^39 bytes, PML4:262-264]
  *    Page-frame information array.
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:33:38 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:33:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3Eri-0005Ou-5X; Wed, 05 Aug 2020 08:33:38 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3Erg-0005Of-Iz
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:36 +0000
X-Inumbo-ID: 21829ecb-f3c2-42e7-9736-64fbe38d7cfd
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 21829ecb-f3c2-42e7-9736-64fbe38d7cfd;
 Wed, 05 Aug 2020 08:33:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=VnYk9LTLrGI0xKmbqiIIPhh+QLgVkR9SuNrg8Vfr9oA=; b=OFfFq6lcL82yFwcYMMVxNabv9n
 HLEXQlgRvJkVr5YczLDQtLlS63+lACFale5MwrlMuPGa4sWgH0RdYB3HuqDeLfKYWr7exQMTZWMST
 2wEAE1LmBkCKFJB6BWW+9ipeVFhXEhHfe920COqEJdCUEwJrsByn3Snu6d25lLoxFp+I=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Erf-0007RG-H5
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Erf-0005go-Fo
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: adjustments to mem access / write logic testing
Message-Id: <E1k3Erf-0005go-Fo@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:33:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit df8fb11d8880cb0f4f1bbcff1700d0a80e0f6983
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:26:11 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:26:11 2020 +0200

    x86emul: adjustments to mem access / write logic testing
    
    The combination of specifying a ModR/M byte with the upper two bits set
    and the modrm field set to T is pointless - the same test will be
    executed twice, i.e. overall things will be slower for no extra gain. I
    can only assume this was a copy-and-paste-without-enough-editing mistake
    of mine.
    
    Furthermore adjust the base type of a few bit fields to shrink table
    size, as subsequently quite a few new entries will get added to the
    tables using this type.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 80 +++++++++++++++++------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 80491ef3ed..156bbf1502 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -21,8 +21,8 @@ static const struct {
     uint8_t opc[8];
     uint8_t len[2]; /* 32- and 64-bit mode */
     bool modrm:1; /* Should register form (also) be tested? */
-    unsigned int mem:2;
-    unsigned int pfx:2;
+    uint8_t mem:2;
+    uint8_t pfx:2;
 #define REG(opc, more...) \
     { { (opc) | 0 }, more }, /* %?ax */ \
     { { (opc) | 1 }, more }, /* %?cx */ \
@@ -334,53 +334,53 @@ static const struct {
     /*{ 0x01, 0x28 }, { 2, 2 }, F, W, pfx_f3 }, rstorssp */
     { { 0x01, 0x30 }, { 2, 2 }, T, R }, /* lmsw */
     { { 0x01, 0x38 }, { 2, 2 }, F, N }, /* invlpg */
-    { { 0x01, 0xc0 }, { 2, 2 }, T, N }, /* enclv */
-    { { 0x01, 0xc1 }, { 2, 2 }, T, N }, /* vmcall */
+    { { 0x01, 0xc0 }, { 2, 2 }, F, N }, /* enclv */
+    { { 0x01, 0xc1 }, { 2, 2 }, F, N }, /* vmcall */
     /*{ 0x01, 0xc2 }, { 2, 2 }, F, R }, vmlaunch */
     /*{ 0x01, 0xc3 }, { 2, 2 }, F, R }, vmresume */
-    { { 0x01, 0xc4 }, { 2, 2 }, T, N }, /* vmxoff */
-    { { 0x01, 0xc5 }, { 2, 2 }, T, N }, /* pconfig */
-    { { 0x01, 0xc8 }, { 2, 2 }, T, N }, /* monitor */
-    { { 0x01, 0xc9 }, { 2, 2 }, T, N }, /* mwait */
-    { { 0x01, 0xca }, { 2, 2 }, T, N }, /* clac */
-    { { 0x01, 0xcb }, { 2, 2 }, T, N }, /* stac */
-    { { 0x01, 0xcf }, { 2, 2 }, T, N }, /* encls */
-    { { 0x01, 0xd0 }, { 2, 2 }, T, N }, /* xgetbv */
-    { { 0x01, 0xd1 }, { 2, 2 }, T, N }, /* xsetbv */
-    { { 0x01, 0xd4 }, { 2, 2 }, T, N }, /* vmfunc */
-    { { 0x01, 0xd5 }, { 2, 2 }, T, N }, /* xend */
-    { { 0x01, 0xd6 }, { 2, 2 }, T, N }, /* xtest */
-    { { 0x01, 0xd7 }, { 2, 2 }, T, N }, /* enclu */
+    { { 0x01, 0xc4 }, { 2, 2 }, F, N }, /* vmxoff */
+    { { 0x01, 0xc5 }, { 2, 2 }, F, N }, /* pconfig */
+    { { 0x01, 0xc8 }, { 2, 2 }, F, N }, /* monitor */
+    { { 0x01, 0xc9 }, { 2, 2 }, F, N }, /* mwait */
+    { { 0x01, 0xca }, { 2, 2 }, F, N }, /* clac */
+    { { 0x01, 0xcb }, { 2, 2 }, F, N }, /* stac */
+    { { 0x01, 0xcf }, { 2, 2 }, F, N }, /* encls */
+    { { 0x01, 0xd0 }, { 2, 2 }, F, N }, /* xgetbv */
+    { { 0x01, 0xd1 }, { 2, 2 }, F, N }, /* xsetbv */
+    { { 0x01, 0xd4 }, { 2, 2 }, F, N }, /* vmfunc */
+    { { 0x01, 0xd5 }, { 2, 2 }, F, N }, /* xend */
+    { { 0x01, 0xd6 }, { 2, 2 }, F, N }, /* xtest */
+    { { 0x01, 0xd7 }, { 2, 2 }, F, N }, /* enclu */
     /*{ 0x01, 0xd8 }, { 2, 2 }, F, R }, vmrun */
-    { { 0x01, 0xd9 }, { 2, 2 }, T, N }, /* vmcall */
-    { { 0x01, 0xd9 }, { 2, 2 }, T, N, pfx_f3 }, /* vmgexit */
-    { { 0x01, 0xd9 }, { 2, 2 }, T, N, pfx_f2 }, /* vmgexit */
+    { { 0x01, 0xd9 }, { 2, 2 }, F, N }, /* vmcall */
+    { { 0x01, 0xd9 }, { 2, 2 }, F, N, pfx_f3 }, /* vmgexit */
+    { { 0x01, 0xd9 }, { 2, 2 }, F, N, pfx_f2 }, /* vmgexit */
     /*{ 0x01, 0xda }, { 2, 2 }, F, R }, vmload */
     /*{ 0x01, 0xdb }, { 2, 2 }, F, W }, vmsave */
-    { { 0x01, 0xdc }, { 2, 2 }, T, N }, /* stgi */
-    { { 0x01, 0xdd }, { 2, 2 }, T, N }, /* clgi */
+    { { 0x01, 0xdc }, { 2, 2 }, F, N }, /* stgi */
+    { { 0x01, 0xdd }, { 2, 2 }, F, N }, /* clgi */
     /*{ 0x01, 0xde }, { 2, 2 }, F, R }, skinit */
-    { { 0x01, 0xdf }, { 2, 2 }, T, N }, /* invlpga */
-    { { 0x01, 0xe8 }, { 2, 2 }, T, N }, /* serialize */
+    { { 0x01, 0xdf }, { 2, 2 }, F, N }, /* invlpga */
+    { { 0x01, 0xe8 }, { 2, 2 }, F, N }, /* serialize */
     /*{ 0x01, 0xe8 }, { 2, 2 }, F, W, pfx_f3 }, setssbsy */
-    { { 0x01, 0xe8 }, { 2, 2 }, T, N, pfx_f2 }, /* xsusldtrk */
-    { { 0x01, 0xe9 }, { 2, 2 }, T, N, pfx_f2 }, /* xresldtrk */
+    { { 0x01, 0xe8 }, { 2, 2 }, F, N, pfx_f2 }, /* xsusldtrk */
+    { { 0x01, 0xe9 }, { 2, 2 }, F, N, pfx_f2 }, /* xresldtrk */
     /*{ 0x01, 0xea }, { 2, 2 }, F, W, pfx_f3 }, saveprevssp */
-    { { 0x01, 0xee }, { 2, 2 }, T, N }, /* rdpkru */
-    { { 0x01, 0xef }, { 2, 2 }, T, N }, /* wrpkru */
-    { { 0x01, 0xf8 }, { 0, 2 }, T, N }, /* swapgs */
-    { { 0x01, 0xf9 }, { 2, 2 }, T, N }, /* rdtscp */
-    { { 0x01, 0xfa }, { 2, 2 }, T, N }, /* monitorx */
-    { { 0x01, 0xfa }, { 2, 2 }, T, N, pfx_f3 }, /* mcommit */
-    { { 0x01, 0xfb }, { 2, 2 }, T, N }, /* mwaitx */
+    { { 0x01, 0xee }, { 2, 2 }, F, N }, /* rdpkru */
+    { { 0x01, 0xef }, { 2, 2 }, F, N }, /* wrpkru */
+    { { 0x01, 0xf8 }, { 0, 2 }, F, N }, /* swapgs */
+    { { 0x01, 0xf9 }, { 2, 2 }, F, N }, /* rdtscp */
+    { { 0x01, 0xfa }, { 2, 2 }, F, N }, /* monitorx */
+    { { 0x01, 0xfa }, { 2, 2 }, F, N, pfx_f3 }, /* mcommit */
+    { { 0x01, 0xfb }, { 2, 2 }, F, N }, /* mwaitx */
     { { 0x01, 0xfc }, { 2, 2 }, F, W }, /* clzero */
-    { { 0x01, 0xfd }, { 2, 2 }, T, N }, /* rdpru */
-    { { 0x01, 0xfe }, { 2, 2 }, T, N }, /* invlpgb */
-    { { 0x01, 0xfe }, { 0, 2 }, T, N, pfx_f3 }, /* rmpadjust */
-    { { 0x01, 0xfe }, { 0, 2 }, T, N, pfx_f2 }, /* rmpupdate */
-    { { 0x01, 0xff }, { 2, 2 }, T, N }, /* tlbsync */
-    { { 0x01, 0xff }, { 0, 2 }, T, N, pfx_f3 }, /* psmash */
-    { { 0x01, 0xff }, { 0, 2 }, T, N, pfx_f2 }, /* pvalidate */
+    { { 0x01, 0xfd }, { 2, 2 }, F, N }, /* rdpru */
+    { { 0x01, 0xfe }, { 2, 2 }, F, N }, /* invlpgb */
+    { { 0x01, 0xfe }, { 0, 2 }, F, N, pfx_f3 }, /* rmpadjust */
+    { { 0x01, 0xfe }, { 0, 2 }, F, N, pfx_f2 }, /* rmpupdate */
+    { { 0x01, 0xff }, { 2, 2 }, F, N }, /* tlbsync */
+    { { 0x01, 0xff }, { 0, 2 }, F, N, pfx_f3 }, /* psmash */
+    { { 0x01, 0xff }, { 0, 2 }, F, N, pfx_f2 }, /* pvalidate */
     { { 0x02 }, { 2, 2 }, T, R }, /* lar */
     { { 0x03 }, { 2, 2 }, T, R }, /* lsl */
     { { 0x05 }, { 1, 1 }, F, N }, /* syscall */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:33:48 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:33:48 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3Ers-0005QD-8L; Wed, 05 Aug 2020 08:33:48 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3Erq-0005Py-Np
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:46 +0000
X-Inumbo-ID: 68ce1289-fbc0-4843-b229-be4b324489bf
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 68ce1289-fbc0-4843-b229-be4b324489bf;
 Wed, 05 Aug 2020 08:33:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=QJS7Mq/oNXFdZrw9r47XvR3O/zTwiAKlxYpPkfgh8iU=; b=cY1Gffs1xiuNJZD9SBGLNTGY0W
 grDb/kuexMSVzze71yUC6kTSlOUAphFEupExFEZhIWqFG56S18WuvTd7X+pTCGAILcn1Ge4zLrX2n
 3LScrNMSw9ivexb+Hq+eFCTf84gNPtPW5XYTxxWwjIQ0qejr8IlMvKVixulDA41gdApU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Erp-0007RU-KA
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Erp-0005hd-JM
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:45 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: extend decoding / mem access testing to FPU
 insns
Message-Id: <E1k3Erp-0005hd-JM@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:33:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 37b7b1571bedbbe93392a1f51da501d88985071c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:26:59 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:26:59 2020 +0200

    x86emul: extend decoding / mem access testing to FPU insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 142 ++++++++++++++++++++++++++++++++++
 1 file changed, 142 insertions(+)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 156bbf1502..af06a1d282 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -517,6 +517,138 @@ static const struct {
 };
 #undef CND
 #undef REG
+static const struct {
+    uint8_t opc[2];
+    bool modrm:1; /* Should register form (also) be tested? */
+    uint8_t mem:2;
+} fpu[] = {
+    { { 0xd8, 0x00 }, T, R }, /* fadd */
+    { { 0xd8, 0x08 }, T, R }, /* fmul */
+    { { 0xd8, 0x10 }, T, R }, /* fcom */
+    { { 0xd8, 0x18 }, T, R }, /* fcomp */
+    { { 0xd8, 0x20 }, T, R }, /* fsub */
+    { { 0xd8, 0x28 }, T, R }, /* fsubr */
+    { { 0xd8, 0x30 }, T, R }, /* fdiv */
+    { { 0xd8, 0x38 }, T, R }, /* fdivr */
+    { { 0xd9, 0x00 }, T, R }, /* fld */
+    { { 0xd9, 0x10 }, F, W }, /* fst */
+    { { 0xd9, 0x18 }, T, W }, /* fstp */
+    { { 0xd9, 0x20 }, F, R }, /* fldenv */
+    { { 0xd9, 0x28 }, F, R }, /* fldcw */
+    { { 0xd9, 0x30 }, F, W }, /* fnstenv */
+    { { 0xd9, 0x38 }, F, W }, /* fnstcw */
+    { { 0xd9, 0xc8 }, F, N }, /* fxch */
+    { { 0xd9, 0xd0 }, F, N }, /* fnop */
+    { { 0xd9, 0xe0 }, F, N }, /* fchs */
+    { { 0xd9, 0xe1 }, F, N }, /* fabs */
+    { { 0xd9, 0xe4 }, F, N }, /* ftst */
+    { { 0xd9, 0xe5 }, F, N }, /* fxam */
+    { { 0xd9, 0xe6 }, F, N }, /* ftstp */
+    { { 0xd9, 0xe8 }, F, N }, /* fld1 */
+    { { 0xd9, 0xe9 }, F, N }, /* fldl2t */
+    { { 0xd9, 0xea }, F, N }, /* fldl2e */
+    { { 0xd9, 0xeb }, F, N }, /* fldpi */
+    { { 0xd9, 0xec }, F, N }, /* fldlg2 */
+    { { 0xd9, 0xed }, F, N }, /* fldln2 */
+    { { 0xd9, 0xee }, F, N }, /* fldz */
+    { { 0xd9, 0xf0 }, F, N }, /* f2xm1 */
+    { { 0xd9, 0xf1 }, F, N }, /* fyl2x */
+    { { 0xd9, 0xf2 }, F, N }, /* fptan */
+    { { 0xd9, 0xf3 }, F, N }, /* fpatan */
+    { { 0xd9, 0xf4 }, F, N }, /* fxtract */
+    { { 0xd9, 0xf5 }, F, N }, /* fprem1 */
+    { { 0xd9, 0xf6 }, F, N }, /* fdecstp */
+    { { 0xd9, 0xf7 }, F, N }, /* fincstp */
+    { { 0xd9, 0xf8 }, F, N }, /* fprem */
+    { { 0xd9, 0xf9 }, F, N }, /* fyl2xp1 */
+    { { 0xd9, 0xfa }, F, N }, /* fsqrt */
+    { { 0xd9, 0xfb }, F, N }, /* fsincos */
+    { { 0xd9, 0xfc }, F, N }, /* frndint */
+    { { 0xd9, 0xfd }, F, N }, /* fscale */
+    { { 0xd9, 0xfe }, F, N }, /* fsin */
+    { { 0xd9, 0xff }, F, N }, /* fcos */
+    { { 0xda, 0x00 }, F, R }, /* fiadd */
+    { { 0xda, 0x08 }, F, R }, /* fimul */
+    { { 0xda, 0x10 }, F, R }, /* ficom */
+    { { 0xda, 0x18 }, F, R }, /* ficomp */
+    { { 0xda, 0x20 }, F, R }, /* fisub */
+    { { 0xda, 0x28 }, F, R }, /* fisubr */
+    { { 0xda, 0x30 }, F, R }, /* fidiv */
+    { { 0xda, 0x38 }, F, R }, /* fidivr */
+    { { 0xda, 0xc0 }, F, N }, /* fcmovb */
+    { { 0xda, 0xc8 }, F, N }, /* fcmove */
+    { { 0xda, 0xd0 }, F, N }, /* fcmovbe */
+    { { 0xda, 0xd8 }, F, N }, /* fcmovu */
+    { { 0xda, 0xe9 }, F, N }, /* fucompp */
+    { { 0xdb, 0x00 }, F, R }, /* fild */
+    { { 0xdb, 0x08 }, F, W }, /* fisttp */
+    { { 0xdb, 0x10 }, F, W }, /* fist */
+    { { 0xdb, 0x18 }, F, W }, /* fistp */
+    { { 0xdb, 0x28 }, F, R }, /* fld */
+    { { 0xdb, 0x38 }, F, W }, /* fstp */
+    { { 0xdb, 0xc0 }, F, N }, /* fcmovnb */
+    { { 0xdb, 0xc8 }, F, N }, /* fcmovne */
+    { { 0xdb, 0xd0 }, F, N }, /* fcmovnbe */
+    { { 0xdb, 0xd8 }, F, N }, /* fcmovnu */
+    { { 0xdb, 0xe0 }, F, N }, /* fneni */
+    { { 0xdb, 0xe1 }, F, N }, /* fndisi */
+    { { 0xdb, 0xe2 }, F, N }, /* fnclex */
+    { { 0xdb, 0xe3 }, F, N }, /* fninit */
+    { { 0xdb, 0xe4 }, F, N }, /* fsetpm */
+    { { 0xdb, 0xe5 }, F, N }, /* frstpm */
+    { { 0xdb, 0xe8 }, F, N }, /* fucomi */
+    { { 0xdb, 0xf0 }, F, N }, /* fcomi */
+    { { 0xdc, 0x00 }, T, R }, /* fadd */
+    { { 0xdc, 0x08 }, T, R }, /* fmul */
+    { { 0xdc, 0x10 }, T, R }, /* fcom */
+    { { 0xdc, 0x18 }, T, R }, /* fcomp */
+    { { 0xdc, 0x20 }, T, R }, /* fsub */
+    { { 0xdc, 0x28 }, T, R }, /* fsubr */
+    { { 0xdc, 0x30 }, T, R }, /* fdiv */
+    { { 0xdc, 0x38 }, T, R }, /* fdivr */
+    { { 0xdd, 0x00 }, F, R }, /* fld */
+    { { 0xdd, 0x08 }, F, W }, /* fisttp */
+    { { 0xdd, 0x10 }, T, W }, /* fst */
+    { { 0xdd, 0x18 }, T, W }, /* fstp */
+    { { 0xdd, 0x20 }, F, R }, /* frstor */
+    { { 0xdd, 0x30 }, F, W }, /* fnsave */
+    { { 0xdd, 0x38 }, F, W }, /* fnstsw */
+    { { 0xdd, 0xc0 }, F, N }, /* ffree */
+    { { 0xdd, 0xc8 }, F, N }, /* fxch */
+    { { 0xdd, 0xe0 }, F, N }, /* fucom */
+    { { 0xdd, 0xe8 }, F, N }, /* fucomp */
+    { { 0xde, 0x00 }, F, R }, /* fiadd */
+    { { 0xde, 0x08 }, F, R }, /* fimul */
+    { { 0xde, 0x10 }, F, R }, /* ficom */
+    { { 0xde, 0x18 }, F, R }, /* ficomp */
+    { { 0xde, 0x20 }, F, R }, /* fisub */
+    { { 0xde, 0x28 }, F, R }, /* fisubr */
+    { { 0xde, 0x30 }, F, R }, /* fidiv */
+    { { 0xde, 0x38 }, F, R }, /* fidivr */
+    { { 0xde, 0xc0 }, F, N }, /* faddp */
+    { { 0xde, 0xc8 }, F, N }, /* fmulp */
+    { { 0xde, 0xd0 }, F, N }, /* fcomp */
+    { { 0xde, 0xd9 }, F, N }, /* fcompp */
+    { { 0xde, 0xe0 }, F, N }, /* fsubrp */
+    { { 0xde, 0xe8 }, F, N }, /* fsubp */
+    { { 0xde, 0xf0 }, F, N }, /* fdivrp */
+    { { 0xde, 0xf8 }, F, N }, /* fdivp */
+    { { 0xdf, 0x00 }, F, R }, /* fild */
+    { { 0xdf, 0x08 }, F, W }, /* fisttp */
+    { { 0xdf, 0x10 }, F, W }, /* fist */
+    { { 0xdf, 0x18 }, F, W }, /* fistp */
+    { { 0xdf, 0x20 }, F, R }, /* fbld */
+    { { 0xdf, 0x28 }, F, R }, /* fild */
+    { { 0xdf, 0x30 }, F, W }, /* fbstp */
+    { { 0xdf, 0x38 }, F, W }, /* fistp */
+    { { 0xdf, 0xc0 }, F, N }, /* ffreep */
+    { { 0xdf, 0xc8 }, F, N }, /* fxch */
+    { { 0xdf, 0xd0 }, F, N }, /* fstp */
+    { { 0xdf, 0xd8 }, F, N }, /* fstp */
+    { { 0xdf, 0xe0 }, F, N }, /* fnstsw */
+    { { 0xdf, 0xe8 }, F, N }, /* fucomip */
+    { { 0xdf, 0xf0 }, F, N }, /* fcomip */
+};
 #undef F
 #undef N
 #undef R
@@ -667,6 +799,16 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
                     legacy_0f38[t].mem, ctxt, fetch);
         }
 
+        memset(instr + ARRAY_SIZE(fpu[t].opc), 0xcc, 13);
+
+        for ( t = 0; t < ARRAY_SIZE(fpu); ++t )
+        {
+            memcpy(instr, fpu[t].opc, ARRAY_SIZE(fpu[t].opc));
+
+            do_test(instr, ARRAY_SIZE(fpu[t].opc), fpu[t].modrm, fpu[t].mem,
+                    ctxt, fetch);
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:33:59 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:33:59 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3Es3-0005RV-Hm; Wed, 05 Aug 2020 08:33:59 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3Es2-0005RK-An
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:58 +0000
X-Inumbo-ID: 0d0ca2b1-4890-467b-ba78-6d6b161c6273
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 0d0ca2b1-4890-467b-ba78-6d6b161c6273;
 Wed, 05 Aug 2020 08:33:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=7ZH+D1le/wVnraSm4rvezJTsBeAY67ILmhiIpskmuYw=; b=033nyLEkD0b5GT+QeUnOMp3eo+
 wzH+u3u5HN3NaSuYVT/YF/06uBNBP1pg1ulj89jh9zcobi6cmHCYWY4z+XshdPIaqFGSF16JKrZ5u
 76MBpJk6WPOKER+r8PS77AhBM7aAv+ajEQc82oWKlmDIwGaQZ1a9hpIOZ15xDAtCR++M=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Erz-0007Ri-N8
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:55 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Erz-0005iT-MP
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:33:55 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: extend decoding / mem access testing to MMX /
 SSE insns
Message-Id: <E1k3Erz-0005iT-MP@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:33:55 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d9dad3584b63f7a4d1a33ee3a4b637b4b0d36856
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:27:11 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:27:11 2020 +0200

    x86emul: extend decoding / mem access testing to MMX / SSE insns
    
    IOW just legacy encoded ones. For 3dNow! just one example is used, as
    they're all similar in nature both encoding- and operand-wise.
    
    Rename pfx_none to pfx_no, so it can be used to improve readability /
    column alignment.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 404 +++++++++++++++++++++++++++++++++-
 1 file changed, 403 insertions(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index af06a1d282..7897df94c2 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -3,7 +3,7 @@
 #include <stdio.h>
 
 enum mem_access { mem_none, mem_read, mem_write };
-enum pfx { pfx_none, pfx_66, pfx_f3, pfx_f2 };
+enum pfx { pfx_no, pfx_66, pfx_f3, pfx_f2 };
 static const uint8_t prefixes[] = { 0x66, 0xf3, 0xf2 };
 
 #define F false
@@ -393,6 +393,30 @@ static const struct {
     { { 0x0d, 0x00 }, { 2, 2 }, F, N }, /* prefetch */
     { { 0x0d, 0x08 }, { 2, 2 }, F, N }, /* prefetchw */
     { { 0x0e }, { 1, 1 }, F, N }, /* femms */
+    { { 0x0f, 0x00, 0x9e }, { 3, 3 }, T, R }, /* pfadd */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_no }, /* movups */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_66 }, /* movupd */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_f3 }, /* movss */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_f2 }, /* movsd */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_no }, /* movups */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_66 }, /* movupd */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_f3 }, /* movss */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_f2 }, /* movsd */
+    { { 0x12 }, { 2, 2 }, T, R, pfx_no }, /* movlps / movhlps */
+    { { 0x12 }, { 2, 2 }, F, R, pfx_66 }, /* movlpd */
+    { { 0x12 }, { 2, 2 }, T, R, pfx_f3 }, /* movsldup */
+    { { 0x12 }, { 2, 2 }, T, R, pfx_f2 }, /* movddup */
+    { { 0x13 }, { 2, 2 }, F, W, pfx_no }, /* movlps */
+    { { 0x13 }, { 2, 2 }, F, W, pfx_66 }, /* movlpd */
+    { { 0x14 }, { 2, 2 }, T, R, pfx_no }, /* unpcklps */
+    { { 0x14 }, { 2, 2 }, T, R, pfx_66 }, /* unpcklpd */
+    { { 0x15 }, { 2, 2 }, T, R, pfx_no }, /* unpckhps */
+    { { 0x15 }, { 2, 2 }, T, R, pfx_66 }, /* unpckhpd */
+    { { 0x16 }, { 2, 2 }, T, R, pfx_no }, /* movhps / movlhps */
+    { { 0x16 }, { 2, 2 }, F, R, pfx_66 }, /* movhpd */
+    { { 0x16 }, { 2, 2 }, T, R, pfx_f3 }, /* movshdup */
+    { { 0x17 }, { 2, 2 }, F, W, pfx_no }, /* movhps */
+    { { 0x17 }, { 2, 2 }, F, W, pfx_66 }, /* movhpd */
     { { 0x18, 0x00 }, { 2, 2 }, F, N }, /* prefetchnta */
     { { 0x18, 0x08 }, { 2, 2 }, F, N }, /* prefetch0 */
     { { 0x18, 0x10 }, { 2, 2 }, F, N }, /* prefetch1 */
@@ -414,6 +438,30 @@ static const struct {
     { { 0x21 }, { 2, 2 }, T, N }, /* mov */
     { { 0x22 }, { 2, 2 }, T, N }, /* mov */
     { { 0x23 }, { 2, 2 }, T, N }, /* mov */
+    { { 0x28 }, { 2, 2 }, T, R, pfx_no }, /* movaps */
+    { { 0x28 }, { 2, 2 }, T, R, pfx_66 }, /* movapd */
+    { { 0x29 }, { 2, 2 }, T, W, pfx_no }, /* movaps */
+    { { 0x29 }, { 2, 2 }, T, W, pfx_66 }, /* movapd */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_no }, /* cvtpi2ps */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_66 }, /* cvtpi2pd */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_f3 }, /* cvtsi2ss */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_f2 }, /* cvtsi2sd */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_no }, /* movntps */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_66 }, /* movntpd */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_f3 }, /* movntss */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_f2 }, /* movntsd */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_no }, /* cvttps2pi */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_66 }, /* cvttpd2pi */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_f3 }, /* cvttss2si */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_f2 }, /* cvttsd2si */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_no }, /* cvtps2pi */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_66 }, /* cvtpd2pi */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_f3 }, /* cvtss2si */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_f2 }, /* cvtsd2si */
+    { { 0x2e }, { 2, 2 }, T, R, pfx_no }, /* ucomiss */
+    { { 0x2e }, { 2, 2 }, T, R, pfx_66 }, /* ucomisd */
+    { { 0x2f }, { 2, 2 }, T, R, pfx_no }, /* comiss */
+    { { 0x2f }, { 2, 2 }, T, R, pfx_66 }, /* comisd */
     { { 0x30 }, { 1, 1 }, F, N }, /* wrmsr */
     { { 0x31 }, { 1, 1 }, F, N }, /* rdtsc */
     { { 0x32 }, { 1, 1 }, F, N }, /* rdmsr */
@@ -421,8 +469,131 @@ static const struct {
     { { 0x34 }, { 1, 1 }, F, N }, /* sysenter */
     { { 0x35 }, { 1, 1 }, F, N }, /* sysexit */
     CND(0x40,   { 2, 2 }, T, R ), /* cmov<cc> */
+    { { 0x50, 0xc0 }, { 2, 2 }, F, N, pfx_no }, /* movmskps */
+    { { 0x50, 0xc0 }, { 2, 2 }, F, N, pfx_66 }, /* movmskpd */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_no }, /* sqrtps */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_66 }, /* sqrtpd */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_f3 }, /* sqrtss */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_f2 }, /* sqrtsd */
+    { { 0x52 }, { 2, 2 }, T, R, pfx_no }, /* rsqrtps */
+    { { 0x52 }, { 2, 2 }, T, R, pfx_f3 }, /* rsqrtss */
+    { { 0x53 }, { 2, 2 }, T, R, pfx_no }, /* rcpps */
+    { { 0x53 }, { 2, 2 }, T, R, pfx_f3 }, /* rcpss */
+    { { 0x54 }, { 2, 2 }, T, R, pfx_no }, /* andps */
+    { { 0x54 }, { 2, 2 }, T, R, pfx_66 }, /* andpd */
+    { { 0x55 }, { 2, 2 }, T, R, pfx_no }, /* andnps */
+    { { 0x55 }, { 2, 2 }, T, R, pfx_66 }, /* andnpd */
+    { { 0x56 }, { 2, 2 }, T, R, pfx_no }, /* orps */
+    { { 0x56 }, { 2, 2 }, T, R, pfx_66 }, /* orpd */
+    { { 0x57 }, { 2, 2 }, T, R, pfx_no }, /* xorps */
+    { { 0x57 }, { 2, 2 }, T, R, pfx_66 }, /* xorpd */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_no }, /* addps */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_66 }, /* addpd */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_f3 }, /* addss */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_f2 }, /* addsd */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_no }, /* mulps */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_66 }, /* mulpd */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_f3 }, /* mulss */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_f2 }, /* mulsd */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_no }, /* cvtps2pd */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_66 }, /* cvtpd2ps */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_f3 }, /* cvtss2sd */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_f2 }, /* cvtsd2ss */
+    { { 0x5b }, { 2, 2 }, T, R, pfx_no }, /* cvtdq2ps */
+    { { 0x5b }, { 2, 2 }, T, R, pfx_66 }, /* cvtps2dq */
+    { { 0x5b }, { 2, 2 }, T, R, pfx_f3 }, /* cvttps2dq */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_no }, /* subps */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_66 }, /* subpd */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_f3 }, /* subss */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_f2 }, /* subsd */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_no }, /* minps */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_66 }, /* minpd */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_f3 }, /* minss */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_f2 }, /* minsd */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_no }, /* divps */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_66 }, /* divpd */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_f3 }, /* divss */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_f2 }, /* divsd */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_no }, /* maxps */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_66 }, /* maxpd */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_f3 }, /* maxss */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_f2 }, /* maxsd */
+    { { 0x60 }, { 2, 2 }, T, R, pfx_no }, /* punpcklbw */
+    { { 0x60 }, { 2, 2 }, T, R, pfx_66 }, /* punpcklbw */
+    { { 0x61 }, { 2, 2 }, T, R, pfx_no }, /* punpcklwd */
+    { { 0x61 }, { 2, 2 }, T, R, pfx_66 }, /* punpcklwd */
+    { { 0x62 }, { 2, 2 }, T, R, pfx_no }, /* punpckldq */
+    { { 0x62 }, { 2, 2 }, T, R, pfx_66 }, /* punpckldq */
+    { { 0x63 }, { 2, 2 }, T, R, pfx_no }, /* packsswb */
+    { { 0x63 }, { 2, 2 }, T, R, pfx_66 }, /* packsswb */
+    { { 0x64 }, { 2, 2 }, T, R, pfx_no }, /* pcmpgtb */
+    { { 0x64 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtb */
+    { { 0x65 }, { 2, 2 }, T, R, pfx_no }, /* pcmpgtw */
+    { { 0x65 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtw */
+    { { 0x66 }, { 2, 2 }, T, R, pfx_no }, /* pcmpgtd */
+    { { 0x66 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtd */
+    { { 0x67 }, { 2, 2 }, T, R, pfx_no }, /* packuswb */
+    { { 0x67 }, { 2, 2 }, T, R, pfx_66 }, /* packuswb */
+    { { 0x68 }, { 2, 2 }, T, R, pfx_no }, /* punpckhbw */
+    { { 0x68 }, { 2, 2 }, T, R, pfx_66 }, /* punpckhbw */
+    { { 0x69 }, { 2, 2 }, T, R, pfx_no }, /* punpckhwd */
+    { { 0x69 }, { 2, 2 }, T, R, pfx_66 }, /* punpckhwd */
+    { { 0x6a }, { 2, 2 }, T, R, pfx_no }, /* punpckhdq */
+    { { 0x6a }, { 2, 2 }, T, R, pfx_66 }, /* punpckhdq */
+    { { 0x6b }, { 2, 2 }, T, R, pfx_no }, /* packssdw */
+    { { 0x6b }, { 2, 2 }, T, R, pfx_66 }, /* packssdw */
+    { { 0x6c }, { 2, 2 }, T, R, pfx_66 }, /* punpcklqdq */
+    { { 0x6d }, { 2, 2 }, T, R, pfx_66 }, /* punpckhqdq */
+    { { 0x6e }, { 2, 2 }, T, R, pfx_no }, /* movd */
+    { { 0x6e }, { 2, 2 }, T, R, pfx_66 }, /* movd */
+    { { 0x6f }, { 2, 2 }, T, R, pfx_no }, /* movq */
+    { { 0x6f }, { 2, 2 }, T, R, pfx_66 }, /* movdqa */
+    { { 0x6f }, { 2, 2 }, T, R, pfx_f3 }, /* movdqu */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_no }, /* pshufw */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_66 }, /* pshufd */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_f3 }, /* pshuflw */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_f2 }, /* pshufhw */
+    { { 0x71, 0xd0 }, { 3, 3 }, F, N, pfx_no }, /* psrlw */
+    { { 0x71, 0xd0 }, { 3, 3 }, F, N, pfx_66 }, /* psrlw */
+    { { 0x71, 0xe0 }, { 3, 3 }, F, N, pfx_no }, /* psraw */
+    { { 0x71, 0xe0 }, { 3, 3 }, F, N, pfx_66 }, /* psraw */
+    { { 0x71, 0xf0 }, { 3, 3 }, F, N, pfx_no }, /* psllw */
+    { { 0x71, 0xf0 }, { 3, 3 }, F, N, pfx_66 }, /* psllw */
+    { { 0x72, 0xd0 }, { 3, 3 }, F, N, pfx_no }, /* psrld */
+    { { 0x72, 0xd0 }, { 3, 3 }, F, N, pfx_66 }, /* psrld */
+    { { 0x72, 0xe0 }, { 3, 3 }, F, N, pfx_no }, /* psrad */
+    { { 0x72, 0xe0 }, { 3, 3 }, F, N, pfx_66 }, /* psrad */
+    { { 0x72, 0xf0 }, { 3, 3 }, F, N, pfx_no }, /* pslld */
+    { { 0x72, 0xf0 }, { 3, 3 }, F, N, pfx_66 }, /* pslld */
+    { { 0x73, 0xd0 }, { 3, 3 }, F, N, pfx_no }, /* psrlq */
+    { { 0x73, 0xd0 }, { 3, 3 }, F, N, pfx_66 }, /* psrlq */
+    { { 0x73, 0xd8 }, { 3, 3 }, F, N, pfx_66 }, /* psrldq */
+    { { 0x73, 0xf0 }, { 3, 3 }, F, N, pfx_no }, /* psllq */
+    { { 0x73, 0xf0 }, { 3, 3 }, F, N, pfx_66 }, /* psllq */
+    { { 0x73, 0xf8 }, { 3, 3 }, F, N, pfx_66 }, /* pslldq */
+    { { 0x74 }, { 2, 2 }, T, R, pfx_no }, /* pcmpeqb */
+    { { 0x74 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqb */
+    { { 0x75 }, { 2, 2 }, T, R, pfx_no }, /* pcmpeqw */
+    { { 0x75 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqw */
+    { { 0x76 }, { 2, 2 }, T, R, pfx_no }, /* pcmpeqd */
+    { { 0x76 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqd */
+    { { 0x77 }, { 1, 1 }, F, N }, /* emms */
     /*{ 0x78 }, { 2, 2 }, T, W }, vmread */
+    { { 0x78, 0xc0 }, { 4, 4 }, F, N, pfx_66 }, /* extrq */
+    { { 0x78, 0xc0 }, { 4, 4 }, F, N, pfx_f2 }, /* insertq */
     { { 0x79 }, { 2, 2 }, T, R }, /* vmwrite */
+    { { 0x79, 0xc0 }, { 2, 2 }, F, N, pfx_66 }, /* extrq */
+    { { 0x79, 0xc0 }, { 2, 2 }, F, N, pfx_f2 }, /* insertq */
+    { { 0x7c }, { 2, 2 }, T, R, pfx_66 }, /* haddpd */
+    { { 0x7c }, { 2, 2 }, T, R, pfx_f2 }, /* haddps */
+    { { 0x7d }, { 2, 2 }, T, R, pfx_66 }, /* hsubpd */
+    { { 0x7d }, { 2, 2 }, T, R, pfx_f2 }, /* hsubps */
+    { { 0x7e }, { 2, 2 }, T, W, pfx_no }, /* movd */
+    { { 0x7e }, { 2, 2 }, T, W, pfx_66 }, /* movd */
+    { { 0x7e }, { 2, 2 }, T, R, pfx_f3 }, /* movq */
+    { { 0x7f }, { 2, 2 }, T, W, pfx_no }, /* movq */
+    { { 0x7f }, { 2, 2 }, T, W, pfx_66 }, /* movdqa */
+    { { 0x7f }, { 2, 2 }, T, W, pfx_f3 }, /* movdqu */
     CND(0x80,   { 5, 5 }, F, N ), /* j<cc> */
     CND(0x90,   { 2, 2 }, T, W ), /* set<cc> */
     { { 0xa0 }, { 1, 1 }, F, W }, /* push %fs */
@@ -484,7 +655,17 @@ static const struct {
     { { 0xbf }, { 2, 2 }, F, R }, /* movsx */
     { { 0xc0 }, { 2, 2 }, F, W }, /* xadd */
     { { 0xc1 }, { 2, 2 }, F, W }, /* xadd */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_no }, /* cmpps */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_66 }, /* cmppd */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_f3 }, /* cmpss */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_f2 }, /* cmpsd */
     { { 0xc3 }, { 2, 2 }, F, W }, /* movnti */
+    { { 0xc4 }, { 3, 3 }, T, R, pfx_no }, /* pinsrw */
+    { { 0xc4 }, { 3, 3 }, T, R, pfx_66 }, /* pinsrw */
+    { { 0xc5, 0xc0 }, { 3, 3 }, F, N, pfx_no }, /* pextrw */
+    { { 0xc5, 0xc0 }, { 3, 3 }, F, N, pfx_66 }, /* pextrw */
+    { { 0xc6 }, { 3, 3 }, T, R, pfx_no }, /* shufps */
+    { { 0xc6 }, { 3, 3 }, T, R, pfx_66 }, /* shufpd */
     { { 0xc7, 0x08 }, { 2, 2 }, F, W }, /* cmpxchg8b */
     { { 0xc7, 0x18 }, { 2, 2 }, F, R }, /* xrstors */
     { { 0xc7, 0x20 }, { 2, 2 }, F, W }, /* xsavec */
@@ -497,11 +678,179 @@ static const struct {
     { { 0xc7, 0xf8 }, { 2, 2 }, F, N }, /* rdseed */
     { { 0xc7, 0xf8 }, { 2, 2 }, F, N, pfx_f3 }, /* rdpid */
     REG(0xc8,   { 1, 1 }, F, N ), /* bswap */
+    { { 0xd0 }, { 2, 2 }, T, R, pfx_66 }, /* addsubpd */
+    { { 0xd0 }, { 2, 2 }, T, R, pfx_f2 }, /* addsubps */
+    { { 0xd1 }, { 2, 2 }, T, R, pfx_no }, /* psrlw */
+    { { 0xd1 }, { 2, 2 }, T, R, pfx_66 }, /* psrlw */
+    { { 0xd2 }, { 2, 2 }, T, R, pfx_no }, /* psrld */
+    { { 0xd2 }, { 2, 2 }, T, R, pfx_66 }, /* psrld */
+    { { 0xd3 }, { 2, 2 }, T, R, pfx_no }, /* psrlq */
+    { { 0xd3 }, { 2, 2 }, T, R, pfx_66 }, /* psrlq */
+    { { 0xd4 }, { 2, 2 }, T, R, pfx_no }, /* paddq */
+    { { 0xd4 }, { 2, 2 }, T, R, pfx_66 }, /* paddq */
+    { { 0xd5 }, { 2, 2 }, T, R, pfx_no }, /* pmullw */
+    { { 0xd5 }, { 2, 2 }, T, R, pfx_66 }, /* pmullw */
+    { { 0xd6 }, { 2, 2 }, T, W, pfx_66 }, /* movq */
+    { { 0xd6, 0xc0 }, { 2, 2 }, F, N, pfx_f3 }, /* movq2dq */
+    { { 0xd6, 0xc0 }, { 2, 2 }, F, N, pfx_f2 }, /* movdq2q */
+    { { 0xd7, 0xc0 }, { 2, 2 }, F, N, pfx_no }, /* pmovmskb */
+    { { 0xd7, 0xc0 }, { 2, 2 }, F, N, pfx_66 }, /* pmovmskb */
+    { { 0xd8 }, { 2, 2 }, T, R, pfx_no }, /* psubusb */
+    { { 0xd8 }, { 2, 2 }, T, R, pfx_66 }, /* psubusb */
+    { { 0xd9 }, { 2, 2 }, T, R, pfx_no }, /* psubusw */
+    { { 0xd9 }, { 2, 2 }, T, R, pfx_66 }, /* psubusw */
+    { { 0xda }, { 2, 2 }, T, R, pfx_no }, /* pminub */
+    { { 0xda }, { 2, 2 }, T, R, pfx_66 }, /* pminub */
+    { { 0xdb }, { 2, 2 }, T, R, pfx_no }, /* pand */
+    { { 0xdb }, { 2, 2 }, T, R, pfx_66 }, /* pand */
+    { { 0xdc }, { 2, 2 }, T, R, pfx_no }, /* paddusb */
+    { { 0xdc }, { 2, 2 }, T, R, pfx_66 }, /* paddusb */
+    { { 0xdd }, { 2, 2 }, T, R, pfx_no }, /* paddusw */
+    { { 0xdd }, { 2, 2 }, T, R, pfx_66 }, /* paddusw */
+    { { 0xde }, { 2, 2 }, T, R, pfx_no }, /* pmaxub */
+    { { 0xde }, { 2, 2 }, T, R, pfx_66 }, /* pmaxub */
+    { { 0xdf }, { 2, 2 }, T, R, pfx_no }, /* pandn */
+    { { 0xdf }, { 2, 2 }, T, R, pfx_66 }, /* pandn */
+    { { 0xe0 }, { 2, 2 }, T, R, pfx_no }, /* pavgb */
+    { { 0xe0 }, { 2, 2 }, T, R, pfx_66 }, /* pavgb */
+    { { 0xe1 }, { 2, 2 }, T, R, pfx_no }, /* psraw */
+    { { 0xe1 }, { 2, 2 }, T, R, pfx_66 }, /* psraw */
+    { { 0xe2 }, { 2, 2 }, T, R, pfx_no }, /* psrad */
+    { { 0xe2 }, { 2, 2 }, T, R, pfx_66 }, /* psrad */
+    { { 0xe3 }, { 2, 2 }, T, R, pfx_no }, /* pavgw */
+    { { 0xe3 }, { 2, 2 }, T, R, pfx_66 }, /* pavgw */
+    { { 0xe4 }, { 2, 2 }, T, R, pfx_no }, /* pmulhuw */
+    { { 0xe4 }, { 2, 2 }, T, R, pfx_66 }, /* pmulhuw */
+    { { 0xe5 }, { 2, 2 }, T, R, pfx_no }, /* pmulhw */
+    { { 0xe5 }, { 2, 2 }, T, R, pfx_66 }, /* pmulhw */
+    { { 0xe6 }, { 2, 2 }, T, R, pfx_66 }, /* cvttpd2dq */
+    { { 0xe6 }, { 2, 2 }, T, R, pfx_f3 }, /* cvtdq2pd */
+    { { 0xe6 }, { 2, 2 }, T, R, pfx_f2 }, /* cvtpd2dq */
+    { { 0xe7 }, { 2, 2 }, F, W, pfx_no }, /* movntq */
+    { { 0xe7 }, { 2, 2 }, F, W, pfx_66 }, /* movntdq */
+    { { 0xe8 }, { 2, 2 }, T, R, pfx_no }, /* psubsb */
+    { { 0xe8 }, { 2, 2 }, T, R, pfx_66 }, /* psubsb */
+    { { 0xe9 }, { 2, 2 }, T, R, pfx_no }, /* psubsw */
+    { { 0xe9 }, { 2, 2 }, T, R, pfx_66 }, /* psubsw */
+    { { 0xea }, { 2, 2 }, T, R, pfx_no }, /* pminsw */
+    { { 0xea }, { 2, 2 }, T, R, pfx_66 }, /* pminsw */
+    { { 0xeb }, { 2, 2 }, T, R, pfx_no }, /* por */
+    { { 0xeb }, { 2, 2 }, T, R, pfx_66 }, /* por */
+    { { 0xec }, { 2, 2 }, T, R, pfx_no }, /* paddsb */
+    { { 0xec }, { 2, 2 }, T, R, pfx_66 }, /* paddsb */
+    { { 0xed }, { 2, 2 }, T, R, pfx_no }, /* paddsw */
+    { { 0xed }, { 2, 2 }, T, R, pfx_66 }, /* paddsw */
+    { { 0xee }, { 2, 2 }, T, R, pfx_no }, /* pmaxsw */
+    { { 0xee }, { 2, 2 }, T, R, pfx_66 }, /* pmaxsw */
+    { { 0xef }, { 2, 2 }, T, R, pfx_no }, /* pxor */
+    { { 0xef }, { 2, 2 }, T, R, pfx_66 }, /* pxor */
+    { { 0xf0 }, { 2, 2 }, T, R, pfx_f2 }, /* lddqu */
+    { { 0xf1 }, { 2, 2 }, T, R, pfx_no }, /* psllw */
+    { { 0xf1 }, { 2, 2 }, T, R, pfx_66 }, /* psllw */
+    { { 0xf2 }, { 2, 2 }, T, R, pfx_no }, /* pslld */
+    { { 0xf2 }, { 2, 2 }, T, R, pfx_66 }, /* pslld */
+    { { 0xf3 }, { 2, 2 }, T, R, pfx_no }, /* psllq */
+    { { 0xf3 }, { 2, 2 }, T, R, pfx_66 }, /* psllq */
+    { { 0xf4 }, { 2, 2 }, T, R, pfx_no }, /* pmuludq */
+    { { 0xf4 }, { 2, 2 }, T, R, pfx_66 }, /* pmuludq */
+    { { 0xf5 }, { 2, 2 }, T, R, pfx_no }, /* pmaddwd */
+    { { 0xf5 }, { 2, 2 }, T, R, pfx_66 }, /* pmaddwd */
+    { { 0xf6 }, { 2, 2 }, T, R, pfx_no }, /* psadbw */
+    { { 0xf6 }, { 2, 2 }, T, R, pfx_66 }, /* psadbw */
+    { { 0xf7, 0xc0 }, { 2, 2 }, F, W, pfx_no }, /* maskmovq */
+    { { 0xf7, 0xc0 }, { 2, 2 }, F, W, pfx_66 }, /* maskmovdqu */
+    { { 0xf8 }, { 2, 2 }, T, R, pfx_no }, /* psubb */
+    { { 0xf8 }, { 2, 2 }, T, R, pfx_66 }, /* psubb */
+    { { 0xf9 }, { 2, 2 }, T, R, pfx_no }, /* psubw */
+    { { 0xf9 }, { 2, 2 }, T, R, pfx_66 }, /* psubw */
+    { { 0xfa }, { 2, 2 }, T, R, pfx_no }, /* psubd */
+    { { 0xfa }, { 2, 2 }, T, R, pfx_66 }, /* psubd */
+    { { 0xfb }, { 2, 2 }, T, R, pfx_no }, /* psubq */
+    { { 0xfb }, { 2, 2 }, T, R, pfx_66 }, /* psubq */
+    { { 0xfc }, { 2, 2 }, T, R, pfx_no }, /* paddb */
+    { { 0xfc }, { 2, 2 }, T, R, pfx_66 }, /* paddb */
+    { { 0xfd }, { 2, 2 }, T, R, pfx_no }, /* paddw */
+    { { 0xfd }, { 2, 2 }, T, R, pfx_66 }, /* paddw */
+    { { 0xfe }, { 2, 2 }, T, R, pfx_no }, /* paddd */
+    { { 0xfe }, { 2, 2 }, T, R, pfx_66 }, /* paddd */
     { { 0xff }, { 2, 2 }, F, N }, /* ud0 */
 }, legacy_0f38[] = {
+    { { 0x00 }, { 2, 2 }, T, R, pfx_no }, /* pshufb */
+    { { 0x00 }, { 2, 2 }, T, R, pfx_66 }, /* pshufb */
+    { { 0x01 }, { 2, 2 }, T, R, pfx_no }, /* phaddw */
+    { { 0x01 }, { 2, 2 }, T, R, pfx_66 }, /* phaddw */
+    { { 0x02 }, { 2, 2 }, T, R, pfx_no }, /* phaddd */
+    { { 0x02 }, { 2, 2 }, T, R, pfx_66 }, /* phaddd */
+    { { 0x03 }, { 2, 2 }, T, R, pfx_no }, /* phaddsw */
+    { { 0x03 }, { 2, 2 }, T, R, pfx_66 }, /* phaddsw */
+    { { 0x04 }, { 2, 2 }, T, R, pfx_no }, /* pmaddubsw */
+    { { 0x04 }, { 2, 2 }, T, R, pfx_66 }, /* pmaddubsw */
+    { { 0x05 }, { 2, 2 }, T, R, pfx_no }, /* phsubw */
+    { { 0x05 }, { 2, 2 }, T, R, pfx_66 }, /* phsubw */
+    { { 0x06 }, { 2, 2 }, T, R, pfx_no }, /* phsubd */
+    { { 0x06 }, { 2, 2 }, T, R, pfx_66 }, /* phsubd */
+    { { 0x07 }, { 2, 2 }, T, R, pfx_no }, /* phsubsw */
+    { { 0x07 }, { 2, 2 }, T, R, pfx_66 }, /* phsubsw */
+    { { 0x08 }, { 2, 2 }, T, R, pfx_no }, /* psignb */
+    { { 0x08 }, { 2, 2 }, T, R, pfx_66 }, /* psignb */
+    { { 0x09 }, { 2, 2 }, T, R, pfx_no }, /* psignw */
+    { { 0x09 }, { 2, 2 }, T, R, pfx_66 }, /* psignw */
+    { { 0x0a }, { 2, 2 }, T, R, pfx_no }, /* psignd */
+    { { 0x0a }, { 2, 2 }, T, R, pfx_66 }, /* psignd */
+    { { 0x0b }, { 2, 2 }, T, R, pfx_no }, /* pmulhrsw */
+    { { 0x0b }, { 2, 2 }, T, R, pfx_66 }, /* pmulhrsw */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_66 }, /* pblendvb */
+    { { 0x14 }, { 2, 2 }, T, R, pfx_66 }, /* blendvps */
+    { { 0x15 }, { 2, 2 }, T, R, pfx_66 }, /* blendvpd */
+    { { 0x17 }, { 2, 2 }, T, R, pfx_66 }, /* ptest */
+    { { 0x1c }, { 2, 2 }, T, R, pfx_no }, /* pabsb */
+    { { 0x1c }, { 2, 2 }, T, R, pfx_66 }, /* pabsb */
+    { { 0x1d }, { 2, 2 }, T, R, pfx_no }, /* pabsw */
+    { { 0x1d }, { 2, 2 }, T, R, pfx_66 }, /* pabsw */
+    { { 0x1e }, { 2, 2 }, T, R, pfx_no }, /* pabsd */
+    { { 0x1e }, { 2, 2 }, T, R, pfx_66 }, /* pabsd */
+    { { 0x20 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxbw */
+    { { 0x21 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxbd */
+    { { 0x22 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxbq */
+    { { 0x23 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxwd */
+    { { 0x24 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxwq */
+    { { 0x25 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxdq */
+    { { 0x28 }, { 2, 2 }, T, R, pfx_66 }, /* pmuldq */
+    { { 0x29 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqq */
+    { { 0x2a }, { 2, 2 }, F, R, pfx_66 }, /* movntdqa */
+    { { 0x2b }, { 2, 2 }, T, R, pfx_66 }, /* packusdw */
+    { { 0x30 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxbw */
+    { { 0x31 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxbd */
+    { { 0x32 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxbq */
+    { { 0x33 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxwd */
+    { { 0x34 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxwq */
+    { { 0x35 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxdq */
+    { { 0x37 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtq */
+    { { 0x38 }, { 2, 2 }, T, R, pfx_66 }, /* pminsb */
+    { { 0x39 }, { 2, 2 }, T, R, pfx_66 }, /* pminsd */
+    { { 0x3a }, { 2, 2 }, T, R, pfx_66 }, /* pminuw */
+    { { 0x3b }, { 2, 2 }, T, R, pfx_66 }, /* pminud */
+    { { 0x3c }, { 2, 2 }, T, R, pfx_66 }, /* pmaxsb */
+    { { 0x3d }, { 2, 2 }, T, R, pfx_66 }, /* pmaxsd */
+    { { 0x3e }, { 2, 2 }, T, R, pfx_66 }, /* pmaxuw */
+    { { 0x3f }, { 2, 2 }, T, R, pfx_66 }, /* pmaxud */
+    { { 0x40 }, { 2, 2 }, T, R, pfx_66 }, /* pmulld */
+    { { 0x41 }, { 2, 2 }, T, R, pfx_66 }, /* phminposuw */
     { { 0x80 }, { 2, 2 }, T, R, pfx_66 }, /* invept */
     { { 0x81 }, { 2, 2 }, T, R, pfx_66 }, /* invvpid */
     { { 0x82 }, { 2, 2 }, T, R, pfx_66 }, /* invpcid */
+    { { 0xc8 }, { 2, 2 }, T, R, pfx_no }, /* sha1nexte */
+    { { 0xc9 }, { 2, 2 }, T, R, pfx_no }, /* sha1msg1 */
+    { { 0xca }, { 2, 2 }, T, R, pfx_no }, /* sha1msg2 */
+    { { 0xcb }, { 2, 2 }, T, R, pfx_no }, /* sha256rnds2 */
+    { { 0xcc }, { 2, 2 }, T, R, pfx_no }, /* sha256msg1 */
+    { { 0xcd }, { 2, 2 }, T, R, pfx_no }, /* sha256msg2 */
+    { { 0xcf }, { 2, 2 }, T, R, pfx_66 }, /* gf2p8mulb */
+    { { 0xdb }, { 2, 2 }, T, R, pfx_66 }, /* aesimc */
+    { { 0xdc }, { 2, 2 }, T, R, pfx_66 }, /* aesenc */
+    { { 0xdd }, { 2, 2 }, T, R, pfx_66 }, /* aesenclast */
+    { { 0xde }, { 2, 2 }, T, R, pfx_66 }, /* aesdec */
+    { { 0xdf }, { 2, 2 }, T, R, pfx_66 }, /* aesdeclast */
     { { 0xf0 }, { 2, 2 }, T, R }, /* movbe */
     { { 0xf0 }, { 2, 2 }, T, R, pfx_f2 }, /* crc32 */
     { { 0xf1 }, { 2, 2 }, T, W }, /* movbe */
@@ -517,6 +866,42 @@ static const struct {
 };
 #undef CND
 #undef REG
+
+static const struct {
+    uint8_t opc;
+    uint8_t mem:2;
+    uint8_t pfx:2;
+} legacy_0f3a[] = {
+    { 0x08, R, pfx_66 }, /* roundps */
+    { 0x09, R, pfx_66 }, /* roundpd */
+    { 0x0a, R, pfx_66 }, /* roundss */
+    { 0x0b, R, pfx_66 }, /* roundsd */
+    { 0x0c, R, pfx_66 }, /* blendps */
+    { 0x0d, R, pfx_66 }, /* blendpd */
+    { 0x0e, R, pfx_66 }, /* pblendw */
+    { 0x0f, R, pfx_no }, /* palignr */
+    { 0x0f, R, pfx_66 }, /* palignr */
+    { 0x14, W, pfx_66 }, /* pextrb */
+    { 0x15, W, pfx_66 }, /* pextrw */
+    { 0x16, W, pfx_66 }, /* pextrd */
+    { 0x17, W, pfx_66 }, /* extractps */
+    { 0x20, R, pfx_66 }, /* pinsrb */
+    { 0x21, R, pfx_66 }, /* insertps */
+    { 0x22, R, pfx_66 }, /* pinsrd */
+    { 0x40, R, pfx_66 }, /* dpps */
+    { 0x41, R, pfx_66 }, /* dppd */
+    { 0x42, R, pfx_66 }, /* mpsadbw */
+    { 0x44, R, pfx_66 }, /* pclmulqdq */
+    { 0x60, R, pfx_66 }, /* pcmpestrm */
+    { 0x61, R, pfx_66 }, /* pcmpestri */
+    { 0x62, R, pfx_66 }, /* pcmpistrm */
+    { 0x63, R, pfx_66 }, /* pcmpistri */
+    { 0xcc, R, pfx_no }, /* sha1rnds4 */
+    { 0xce, R, pfx_66 }, /* gf2p8affineqb */
+    { 0xcf, R, pfx_66 }, /* gf2p8affineinvqb */
+    { 0xdf, R, pfx_66 }, /* aeskeygenassist */
+};
+
 static const struct {
     uint8_t opc[2];
     bool modrm:1; /* Should register form (also) be tested? */
@@ -799,6 +1184,23 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
                     legacy_0f38[t].mem, ctxt, fetch);
         }
 
+        for ( t = 0; t < ARRAY_SIZE(legacy_0f3a); ++t )
+        {
+            uint8_t *ptr = instr;
+
+            memset(instr + 5, 0xcc, 10);
+            if ( legacy_0f3a[t].pfx )
+                *ptr++ = prefixes[legacy_0f3a[t].pfx - 1];
+            *ptr++ = 0x0f;
+            *ptr++ = 0x3a;
+            *ptr++ = legacy_0f3a[t].opc;
+            *ptr++ = 0x00; /* ModR/M */
+            *ptr++ = 0x00; /* imm8 */
+
+            do_test(instr, (void *)ptr - instr, (void *)ptr - instr - 2,
+                    legacy_0f3a[t].mem, ctxt, fetch);
+        }
+
         memset(instr + ARRAY_SIZE(fpu[t].opc), 0xcc, 13);
 
         for ( t = 0; t < ARRAY_SIZE(fpu); ++t )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:34:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:34:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3EsD-0005T7-LO; Wed, 05 Aug 2020 08:34:09 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3EsC-0005Ss-7n
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:08 +0000
X-Inumbo-ID: 8dd431c3-649c-4efb-bab2-b447fb892bc7
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 8dd431c3-649c-4efb-bab2-b447fb892bc7;
 Wed, 05 Aug 2020 08:34:06 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=xbHgzywVsfZPFEYttx3+LcapBLQdoxo5vvHFYNcn+gg=; b=J6+GwbR6NZVATvHQYjC6LzFauu
 wV00A6t8dRWpRkEaiQt66SNFOkpjQCsoIUtm6pctFhVUMjQwmRy0LCKLsoIRb0ih9qXg1bJGj+3Sf
 Y/A/qRAtIOaBuAKqwKUrODyLSMlYfa1Y3S+ofs5Br6+zqDud/TcDMNvL137WQQJaFpRo=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Es9-0007S2-QK
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Es9-0005jc-PT
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: extend decoding / mem access testing to
 VEX-encoded insns
Message-Id: <E1k3Es9-0005jc-PT@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:34:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 5e6dc9b8e51679ead71ab3834c8d24bcb95a4fdf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:27:23 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:27:23 2020 +0200

    x86emul: extend decoding / mem access testing to VEX-encoded insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 529 +++++++++++++++++++++++++++++++++-
 1 file changed, 528 insertions(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 7897df94c2..822d7be404 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -1034,6 +1034,449 @@ static const struct {
     { { 0xdf, 0xe8 }, F, N }, /* fucomip */
     { { 0xdf, 0xf0 }, F, N }, /* fcomip */
 };
+
+#define VSIB(n) 0x04 | ((n) << 3), 0x38 /* reg: %xmm<n>, mem: (%eax,%xmm7) */
+
+static const struct vex {
+    uint8_t opc[3];
+    uint8_t len:3;
+    bool modrm:1; /* Should register form (also) be tested? */
+    uint8_t mem:2;
+    uint8_t pfx:2;
+    uint8_t w:2;
+#define WIG 0
+#define W0 1
+#define W1 2
+#define Wn (W0 | W1)
+    uint8_t l:2;
+#define LIG 0
+#define L0 1
+#define L1 2
+#define Ln (L0 | L1)
+} vex_0f[] = {
+    { { 0x10 }, 2, T, R, pfx_no, WIG, Ln }, /* vmovups */
+    { { 0x10 }, 2, T, R, pfx_66, WIG, Ln }, /* vmovupd */
+    { { 0x10 }, 2, T, R, pfx_f3, WIG, LIG }, /* vmovss */
+    { { 0x10 }, 2, T, R, pfx_f2, WIG, LIG }, /* vmovsd */
+    { { 0x11 }, 2, T, W, pfx_no, WIG, Ln }, /* vmovups */
+    { { 0x11 }, 2, T, W, pfx_66, WIG, Ln }, /* vmovupd */
+    { { 0x11 }, 2, T, W, pfx_f3, WIG, LIG }, /* vmovss */
+    { { 0x11 }, 2, T, W, pfx_f2, WIG, LIG }, /* vmovsd */
+    { { 0x12 }, 2, T, R, pfx_no, WIG, L0 }, /* vmovlps / vmovhlps */
+    { { 0x12 }, 2, F, R, pfx_66, WIG, L0 }, /* vmovlpd */
+    { { 0x12 }, 2, T, R, pfx_f3, WIG, Ln }, /* vmovsldup */
+    { { 0x12 }, 2, T, R, pfx_f2, WIG, Ln }, /* vmovddup */
+    { { 0x13 }, 2, F, W, pfx_no, WIG, L0 }, /* vmovlps */
+    { { 0x13 }, 2, F, W, pfx_66, WIG, L0 }, /* vmovlpd */
+    { { 0x14 }, 2, T, R, pfx_no, WIG, Ln }, /* vunpcklps */
+    { { 0x14 }, 2, T, R, pfx_66, WIG, Ln }, /* vunpcklpd */
+    { { 0x15 }, 2, T, R, pfx_no, WIG, Ln }, /* vunpckhps */
+    { { 0x15 }, 2, T, R, pfx_66, WIG, Ln }, /* vunpckhpd */
+    { { 0x16 }, 2, T, R, pfx_no, WIG, L0 }, /* vmovhps / vmovlhps */
+    { { 0x16 }, 2, F, R, pfx_66, WIG, L0 }, /* vmovhpd */
+    { { 0x16 }, 2, T, R, pfx_f3, WIG, Ln }, /* vmovshdup */
+    { { 0x17 }, 2, F, W, pfx_no, WIG, L0 }, /* vmovhps */
+    { { 0x17 }, 2, F, W, pfx_66, WIG, L0 }, /* vmovhpd */
+    { { 0x28 }, 2, T, R, pfx_no, WIG, Ln }, /* vmovaps */
+    { { 0x28 }, 2, T, R, pfx_66, WIG, Ln }, /* vmovapd */
+    { { 0x29 }, 2, T, W, pfx_no, WIG, Ln }, /* vmovaps */
+    { { 0x29 }, 2, T, W, pfx_66, WIG, Ln }, /* vmovapd */
+    { { 0x2a }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtsi2ss */
+    { { 0x2a }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsi2sd */
+    { { 0x2b }, 2, T, W, pfx_no, WIG, Ln }, /* vmovntps */
+    { { 0x2b }, 2, T, W, pfx_66, WIG, Ln }, /* vmovntpd */
+    { { 0x2c }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvttss2si */
+    { { 0x2c }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvttsd2si */
+    { { 0x2d }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtss2si */
+    { { 0x2d }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsd2si */
+    { { 0x2e }, 2, T, R, pfx_no, WIG, LIG }, /* vucomiss */
+    { { 0x2e }, 2, T, R, pfx_66, WIG, LIG }, /* vucomisd */
+    { { 0x2f }, 2, T, R, pfx_no, WIG, LIG }, /* vcomiss */
+    { { 0x2f }, 2, T, R, pfx_66, WIG, LIG }, /* vcomisd */
+    { { 0x41, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kand{w,q} */
+    { { 0x41, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kand{b,d} */
+    { { 0x42, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kandn{w,q} */
+    { { 0x42, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kandn{b,d} */
+    { { 0x44, 0xc0 }, 2, F, N, pfx_no, Wn, L0 }, /* knot{w,q} */
+    { { 0x44, 0xc0 }, 2, F, N, pfx_66, Wn, L0 }, /* knot{b,d} */
+    { { 0x45, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kor{w,q} */
+    { { 0x45, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kor{b,d} */
+    { { 0x46, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kxnor{w,q} */
+    { { 0x46, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kxnor{b,d} */
+    { { 0x47, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kxor{w,q} */
+    { { 0x47, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kxor{b,d} */
+    { { 0x4a, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kadd{w,q} */
+    { { 0x4a, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kadd{b,d} */
+    { { 0x4b, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kunpck{wd,dq} */
+    { { 0x4b, 0xc0 }, 2, F, N, pfx_66, W0, L1 }, /* kunpckbw */
+    { { 0x50, 0xc0 }, 2, F, N, pfx_no, WIG, Ln }, /* vmovmskps */
+    { { 0x50, 0xc0 }, 2, F, N, pfx_66, WIG, Ln }, /* vmovmskpd */
+    { { 0x51 }, 2, T, R, pfx_no, WIG, Ln }, /* vsqrtps */
+    { { 0x51 }, 2, T, R, pfx_66, WIG, Ln }, /* vsqrtpd */
+    { { 0x51 }, 2, T, R, pfx_f3, WIG, LIG }, /* vsqrtss */
+    { { 0x51 }, 2, T, R, pfx_f2, WIG, LIG }, /* vsqrtsd */
+    { { 0x52 }, 2, T, R, pfx_no, WIG, Ln }, /* vrsqrtps */
+    { { 0x52 }, 2, T, R, pfx_f3, WIG, LIG }, /* vrsqrtss */
+    { { 0x53 }, 2, T, R, pfx_no, WIG, Ln }, /* vrcpps */
+    { { 0x53 }, 2, T, R, pfx_f3, WIG, LIG }, /* vrcpss */
+    { { 0x54 }, 2, T, R, pfx_no, WIG, Ln }, /* vandps */
+    { { 0x54 }, 2, T, R, pfx_66, WIG, Ln }, /* vandpd */
+    { { 0x55 }, 2, T, R, pfx_no, WIG, Ln }, /* vandnps */
+    { { 0x55 }, 2, T, R, pfx_66, WIG, Ln }, /* vandnpd */
+    { { 0x56 }, 2, T, R, pfx_no, WIG, Ln }, /* vorps */
+    { { 0x56 }, 2, T, R, pfx_66, WIG, Ln }, /* vorpd */
+    { { 0x57 }, 2, T, R, pfx_no, WIG, Ln }, /* vxorps */
+    { { 0x57 }, 2, T, R, pfx_66, WIG, Ln }, /* vxorpd */
+    { { 0x58 }, 2, T, R, pfx_no, WIG, Ln }, /* vaddps */
+    { { 0x58 }, 2, T, R, pfx_66, WIG, Ln }, /* vaddpd */
+    { { 0x58 }, 2, T, R, pfx_f3, WIG, LIG }, /* vaddss */
+    { { 0x58 }, 2, T, R, pfx_f2, WIG, LIG }, /* vaddsd */
+    { { 0x59 }, 2, T, R, pfx_no, WIG, Ln }, /* vmulps */
+    { { 0x59 }, 2, T, R, pfx_66, WIG, Ln }, /* vmulpd */
+    { { 0x59 }, 2, T, R, pfx_f3, WIG, LIG }, /* vmulss */
+    { { 0x59 }, 2, T, R, pfx_f2, WIG, LIG }, /* vmulsd */
+    { { 0x5a }, 2, T, R, pfx_no, WIG, Ln }, /* vcvtps2pd */
+    { { 0x5a }, 2, T, R, pfx_66, WIG, Ln }, /* vcvtpd2ps */
+    { { 0x5a }, 2, T, R, pfx_f3, WIG, LIG }, /* vcvtss2sd */
+    { { 0x5a }, 2, T, R, pfx_f2, WIG, LIG }, /* vcvtsd2ss */
+    { { 0x5b }, 2, T, R, pfx_no, WIG, Ln }, /* vcvtdq2ps */
+    { { 0x5b }, 2, T, R, pfx_66, WIG, Ln }, /* vcvtps2dq */
+    { { 0x5b }, 2, T, R, pfx_f3, WIG, Ln }, /* vcvttps2dq */
+    { { 0x5c }, 2, T, R, pfx_no, WIG, Ln }, /* vsubps */
+    { { 0x5c }, 2, T, R, pfx_66, WIG, Ln }, /* vsubpd */
+    { { 0x5c }, 2, T, R, pfx_f3, WIG, LIG }, /* vsubss */
+    { { 0x5c }, 2, T, R, pfx_f2, WIG, LIG }, /* vsubsd */
+    { { 0x5d }, 2, T, R, pfx_no, WIG, Ln }, /* vminps */
+    { { 0x5d }, 2, T, R, pfx_66, WIG, Ln }, /* vminpd */
+    { { 0x5d }, 2, T, R, pfx_f3, WIG, LIG }, /* vminss */
+    { { 0x5d }, 2, T, R, pfx_f2, WIG, LIG }, /* vminsd */
+    { { 0x5e }, 2, T, R, pfx_no, WIG, Ln }, /* vdivps */
+    { { 0x5e }, 2, T, R, pfx_66, WIG, Ln }, /* vdivpd */
+    { { 0x5e }, 2, T, R, pfx_f3, WIG, LIG }, /* vdivss */
+    { { 0x5e }, 2, T, R, pfx_f2, WIG, LIG }, /* vdivsd */
+    { { 0x5f }, 2, T, R, pfx_no, WIG, Ln }, /* vmaxps */
+    { { 0x5f }, 2, T, R, pfx_66, WIG, Ln }, /* vmaxpd */
+    { { 0x5f }, 2, T, R, pfx_f3, WIG, LIG }, /* vmaxss */
+    { { 0x5f }, 2, T, R, pfx_f2, WIG, LIG }, /* vmaxsd */
+    { { 0x60 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklbw */
+    { { 0x61 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklwd */
+    { { 0x62 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckldq */
+    { { 0x63 }, 2, T, R, pfx_66, WIG, Ln }, /* vpacksswb */
+    { { 0x64 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtb */
+    { { 0x65 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtw */
+    { { 0x66 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtd */
+    { { 0x67 }, 2, T, R, pfx_66, WIG, Ln }, /* vpackuswb */
+    { { 0x68 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhbw */
+    { { 0x69 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhwd */
+    { { 0x6a }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhdq */
+    { { 0x6b }, 2, T, R, pfx_66, WIG, Ln }, /* vpackssdw */
+    { { 0x6c }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklqdq */
+    { { 0x6d }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhqdq */
+    { { 0x6e }, 2, T, R, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x6f }, 2, T, R, pfx_66, WIG, Ln }, /* vmovdqa */
+    { { 0x6f }, 2, T, R, pfx_f3, WIG, Ln }, /* vmovdqu */
+    { { 0x70 }, 3, T, R, pfx_66, WIG, Ln }, /* vpshufd */
+    { { 0x70 }, 3, T, R, pfx_f3, WIG, Ln }, /* vpshuflw */
+    { { 0x70 }, 3, T, R, pfx_f2, WIG, Ln }, /* vpshufhw */
+    { { 0x71, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0x71, 0xe0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0x71, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0x72, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrld */
+    { { 0x72, 0xe0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrad */
+    { { 0x72, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpslld */
+    { { 0x73, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrlq */
+    { { 0x73, 0xd8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrldq */
+    { { 0x73, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsllq */
+    { { 0x73, 0xf8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpslldq */
+    { { 0x74 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqb */
+    { { 0x75 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqw */
+    { { 0x76 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqd */
+    { { 0x77 }, 1, F, N, pfx_no, WIG, Ln }, /* vzero{upper,all} */
+    { { 0x7c }, 2, T, R, pfx_66, WIG, Ln }, /* vhaddpd */
+    { { 0x7c }, 2, T, R, pfx_f2, WIG, Ln }, /* vhaddps */
+    { { 0x7d }, 2, T, R, pfx_66, WIG, Ln }, /* vhsubpd */
+    { { 0x7d }, 2, T, R, pfx_f2, WIG, Ln }, /* vhsubps */
+    { { 0x7e }, 2, T, W, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x7e }, 2, T, R, pfx_f3, WIG, L0 }, /* vmovq */
+    { { 0x7f }, 2, T, W, pfx_66, WIG, Ln }, /* vmovdqa */
+    { { 0x7f }, 2, T, W, pfx_f3, WIG, Ln }, /* vmovdqu */
+    { { 0x90 }, 2, T, R, pfx_no, Wn, L0 }, /* kmov{w,q} */
+    { { 0x90 }, 2, T, R, pfx_66, Wn, L0 }, /* kmov{b,d} */
+    { { 0x91 }, 2, N, W, pfx_no, Wn, L0 }, /* kmov{w,q} */
+    { { 0x91 }, 2, N, W, pfx_66, Wn, L0 }, /* kmov{b,d} */
+    { { 0x92, 0xc0 }, 2, F, N, pfx_no, W0, L0 }, /* kmovw */
+    { { 0x92, 0xc0 }, 2, F, N, pfx_66, W0, L0 }, /* kmovb */
+    { { 0x92, 0xc0 }, 2, F, N, pfx_f2, Wn, L0 }, /* kmov{d,q} */
+    { { 0x93, 0xc0 }, 2, F, N, pfx_no, W0, L0 }, /* kmovw */
+    { { 0x93, 0xc0 }, 2, F, N, pfx_66, W0, L0 }, /* kmovb */
+    { { 0x93, 0xc0 }, 2, F, N, pfx_f2, Wn, L0 }, /* kmov{d,q} */
+    { { 0x98, 0xc0 }, 2, F, N, pfx_no, Wn, L0 }, /* kortest{w,q} */
+    { { 0x98, 0xc0 }, 2, F, N, pfx_66, Wn, L0 }, /* kortest{b,d} */
+    { { 0x99, 0xc0 }, 2, F, N, pfx_no, Wn, L0 }, /* ktest{w,q} */
+    { { 0x99, 0xc0 }, 2, F, N, pfx_66, Wn, L0 }, /* ktest{b,d} */
+    { { 0xae, 0x10 }, 2, F, R, pfx_no, WIG, L0 }, /* vldmxcsr */
+    { { 0xae, 0x18 }, 2, F, W, pfx_no, WIG, L0 }, /* vstmxcsr */
+    { { 0xc2 }, 3, T, R, pfx_no, WIG, Ln }, /* vcmpps */
+    { { 0xc2 }, 3, T, R, pfx_66, WIG, Ln }, /* vcmppd */
+    { { 0xc2 }, 3, T, R, pfx_f3, WIG, LIG }, /* vcmpss */
+    { { 0xc2 }, 3, T, R, pfx_f2, WIG, LIG }, /* vcmpsd */
+    { { 0xc4 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrw */
+    { { 0xc5, 0xc0 }, 3, F, N, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0xc6 }, 3, T, R, pfx_no, WIG, Ln }, /* vshufps */
+    { { 0xc6 }, 3, T, R, pfx_66, WIG, Ln }, /* vshufpd */
+    { { 0xd0 }, 2, T, R, pfx_66, WIG, Ln }, /* vaddsubpd */
+    { { 0xd0 }, 2, T, R, pfx_f2, WIG, Ln }, /* vaddsubps */
+    { { 0xd1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0xd2 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrld */
+    { { 0xd3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrlq */
+    { { 0xd4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddq */
+    { { 0xd5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmullw */
+    { { 0xd6 }, 2, T, W, pfx_66, WIG, L0 }, /* vmovq */
+    { { 0xd7, 0xc0 }, 2, F, N, pfx_66, WIG, Ln }, /* vpmovmskb */
+    { { 0xd8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusb */
+    { { 0xd9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusw */
+    { { 0xda }, 2, T, R, pfx_66, WIG, Ln }, /* vpminub */
+    { { 0xdb }, 2, T, R, pfx_66, WIG, Ln }, /* vpand */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusb */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusw */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxub */
+    { { 0xdf }, 2, T, R, pfx_66, WIG, Ln }, /* vpandn */
+    { { 0xe0 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgb */
+    { { 0xe1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0xe2 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrad */
+    { { 0xe3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgw */
+    { { 0xe4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhuw */
+    { { 0xe5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhw */
+    { { 0xe6 }, 2, T, R, pfx_66, WIG, Ln }, /* vcvttpd2dq */
+    { { 0xe6 }, 2, T, R, pfx_f3, WIG, Ln }, /* vcvtdq2pd */
+    { { 0xe6 }, 2, T, R, pfx_f2, WIG, Ln }, /* vcvtpd2dq */
+    { { 0xe7 }, 2, F, W, pfx_66, WIG, Ln }, /* vmovntdq */
+    { { 0xe8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsb */
+    { { 0xe9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsw */
+    { { 0xea }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsw */
+    { { 0xeb }, 2, T, R, pfx_66, WIG, Ln }, /* vpor */
+    { { 0xec }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsb */
+    { { 0xed }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsw */
+    { { 0xee }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsw */
+    { { 0xef }, 2, T, R, pfx_66, WIG, Ln }, /* vpxor */
+    { { 0xf0 }, 2, T, R, pfx_f2, WIG, Ln }, /* vlddqu */
+    { { 0xf1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0xf2 }, 2, T, R, pfx_66, WIG, Ln }, /* vpslld */
+    { { 0xf3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsllq */
+    { { 0xf4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmuludq */
+    { { 0xf5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddwd */
+    { { 0xf6 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsadbw */
+    { { 0xf7, 0xc0 }, 2, F, W, pfx_66, WIG, L0 }, /* vmaskmovdqu */
+    { { 0xf8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubb */
+    { { 0xf9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubw */
+    { { 0xfa }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubd */
+    { { 0xfb }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubq */
+    { { 0xfc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddb */
+    { { 0xfd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddw */
+    { { 0xfe }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddd */
+}, vex_0f38[] = {
+    { { 0x00 }, 2, T, R, pfx_66, WIG, Ln }, /* vpshufb */
+    { { 0x01 }, 2, T, R, pfx_66, WIG, Ln }, /* vphaddw */
+    { { 0x02 }, 2, T, R, pfx_66, WIG, Ln }, /* vphaddd */
+    { { 0x03 }, 2, T, R, pfx_66, WIG, Ln }, /* vphaddsw */
+    { { 0x04 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddubsw */
+    { { 0x05 }, 2, T, R, pfx_66, WIG, Ln }, /* vphsubw */
+    { { 0x06 }, 2, T, R, pfx_66, WIG, Ln }, /* vphsubd */
+    { { 0x07 }, 2, T, R, pfx_66, WIG, Ln }, /* vphsubsw */
+    { { 0x08 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsignb */
+    { { 0x09 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsignw */
+    { { 0x0a }, 2, T, R, pfx_66, WIG, Ln }, /* vpsignd */
+    { { 0x0b }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhrsw */
+    { { 0x0c }, 2, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x0d }, 2, T, R, pfx_66, W0, Ln }, /* vpermilpd */
+    { { 0x0e }, 2, T, R, pfx_66, W0, Ln }, /* vtestps */
+    { { 0x0f }, 2, T, R, pfx_66, W0, Ln }, /* vtestpd */
+    { { 0x13 }, 2, T, R, pfx_66, W0, Ln }, /* vcvtph2ps */
+    { { 0x16 }, 2, T, R, pfx_66, W0, L1 }, /* vpermps */
+    { { 0x17 }, 2, T, R, pfx_66, WIG, Ln }, /* vptest */
+    { { 0x18 }, 2, T, R, pfx_66, W0, Ln }, /* vbroadcastss */
+    { { 0x19 }, 2, T, R, pfx_66, W0, L1 }, /* vbroadcastsd */
+    { { 0x1a }, 2, F, R, pfx_66, W0, L1 }, /* vbroadcastf128 */
+    { { 0x1c }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsb */
+    { { 0x1d }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsw */
+    { { 0x1e }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsd */
+    { { 0x20 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbw */
+    { { 0x21 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbd */
+    { { 0x22 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbq */
+    { { 0x23 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwd */
+    { { 0x24 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwq */
+    { { 0x25 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxdq */
+    { { 0x28 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmuldq */
+    { { 0x29 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqq */
+    { { 0x2a }, 2, F, R, pfx_66, WIG, Ln }, /* vmovntdqa */
+    { { 0x2b }, 2, T, R, pfx_66, WIG, Ln }, /* vpackusdw */
+    { { 0x2c }, 2, F, R, pfx_66, W0, Ln }, /* vmaskmovps */
+    { { 0x2d }, 2, F, R, pfx_66, W0, Ln }, /* vmaskmovpd */
+    { { 0x2e }, 2, F, W, pfx_66, W0, Ln }, /* vmaskmovps */
+    { { 0x2f }, 2, F, W, pfx_66, W0, Ln }, /* vmaskmovpd */
+    { { 0x30 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbw */
+    { { 0x31 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbd */
+    { { 0x32 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbq */
+    { { 0x33 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwd */
+    { { 0x34 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwq */
+    { { 0x35 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxdq */
+    { { 0x36 }, 2, T, R, pfx_66, W0, L1 }, /* vpermd */
+    { { 0x37 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtq */
+    { { 0x38 }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsb */
+    { { 0x39 }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsd */
+    { { 0x3a }, 2, T, R, pfx_66, WIG, Ln }, /* vpminuw */
+    { { 0x3b }, 2, T, R, pfx_66, WIG, Ln }, /* vpminud */
+    { { 0x3c }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsb */
+    { { 0x3d }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsd */
+    { { 0x3e }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxuw */
+    { { 0x3f }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxud */
+    { { 0x40 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulld */
+    { { 0x41 }, 2, T, R, pfx_66, WIG, L0 }, /* vphminposuw */
+    { { 0x45 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsrlv{d,q} */
+    { { 0x46 }, 2, T, R, pfx_66, W0, Ln }, /* vpsravd */
+    { { 0x47 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsllv{d,q} */
+    { { 0x58 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastd */
+    { { 0x59 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastq */
+    { { 0x5a }, 2, F, R, pfx_66, W0, L1 }, /* vbroadcasti128 */
+    { { 0x78 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastb */
+    { { 0x79 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastw */
+    { { 0x8c }, 2, F, R, pfx_66, Wn, Ln }, /* vpmaskmov{d,q} */
+    { { 0x8e }, 2, F, W, pfx_66, Wn, Ln }, /* vpmaskmov{d,q} */
+    { { 0x90, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vpgatherd{d,q} */
+    { { 0x91, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vpgatherq{d,q} */
+    { { 0x92, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vgatherdp{s,d} */
+    { { 0x93, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vgatherqp{s,d} */
+    { { 0x96 }, 2, T, R, pfx_66, Wn, Ln }, /* vmaddsub132p{s,d} */
+    { { 0x97 }, 2, T, R, pfx_66, Wn, Ln }, /* vmsubadd132p{s,d} */
+    { { 0x98 }, 2, T, R, pfx_66, Wn, Ln }, /* vmadd132p{s,d} */
+    { { 0x99 }, 2, T, R, pfx_66, Wn, LIG }, /* vmadd132s{s,d} */
+    { { 0x9a }, 2, T, R, pfx_66, Wn, Ln }, /* vmsub132p{s,d} */
+    { { 0x9b }, 2, T, R, pfx_66, Wn, LIG }, /* vmsub132s{s,d} */
+    { { 0x9c }, 2, T, R, pfx_66, Wn, Ln }, /* vnmadd132p{s,d} */
+    { { 0x9d }, 2, T, R, pfx_66, Wn, LIG }, /* vnmadd132s{s,d} */
+    { { 0x9e }, 2, T, R, pfx_66, Wn, Ln }, /* vnmsub132p{s,d} */
+    { { 0x9f }, 2, T, R, pfx_66, Wn, LIG }, /* vnmsub132s{s,d} */
+    { { 0xa6 }, 2, T, R, pfx_66, Wn, Ln }, /* vmaddsub213p{s,d} */
+    { { 0xa7 }, 2, T, R, pfx_66, Wn, Ln }, /* vmsubadd213p{s,d} */
+    { { 0xa8 }, 2, T, R, pfx_66, Wn, Ln }, /* vmadd213p{s,d} */
+    { { 0xa9 }, 2, T, R, pfx_66, Wn, LIG }, /* vmadd213s{s,d} */
+    { { 0xaa }, 2, T, R, pfx_66, Wn, Ln }, /* vmsub213p{s,d} */
+    { { 0xab }, 2, T, R, pfx_66, Wn, LIG }, /* vmsub213s{s,d} */
+    { { 0xac }, 2, T, R, pfx_66, Wn, Ln }, /* vnmadd213p{s,d} */
+    { { 0xad }, 2, T, R, pfx_66, Wn, LIG }, /* vnmadd213s{s,d} */
+    { { 0xae }, 2, T, R, pfx_66, Wn, Ln }, /* vnmsub213p{s,d} */
+    { { 0xaf }, 2, T, R, pfx_66, Wn, LIG }, /* vnmsub213s{s,d} */
+    { { 0xb6 }, 2, T, R, pfx_66, Wn, Ln }, /* vmaddsub231p{s,d} */
+    { { 0xb7 }, 2, T, R, pfx_66, Wn, Ln }, /* vmsubadd231p{s,d} */
+    { { 0xb8 }, 2, T, R, pfx_66, Wn, Ln }, /* vmadd231p{s,d} */
+    { { 0xb9 }, 2, T, R, pfx_66, Wn, LIG }, /* vmadd231s{s,d} */
+    { { 0xba }, 2, T, R, pfx_66, Wn, Ln }, /* vmsub231p{s,d} */
+    { { 0xbb }, 2, T, R, pfx_66, Wn, LIG }, /* vmsub231s{s,d} */
+    { { 0xbc }, 2, T, R, pfx_66, Wn, Ln }, /* vnmadd231p{s,d} */
+    { { 0xbd }, 2, T, R, pfx_66, Wn, LIG }, /* vnmadd231s{s,d} */
+    { { 0xbe }, 2, T, R, pfx_66, Wn, Ln }, /* vnmsub231p{s,d} */
+    { { 0xbf }, 2, T, R, pfx_66, Wn, LIG }, /* vnmsub231s{s,d} */
+    { { 0xcf }, 2, T, R, pfx_66, W0, Ln }, /* vgf2p8mulb */
+    { { 0xdb }, 2, T, R, pfx_66, WIG, L0 }, /* vaesimc */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenc */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenclast */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdec */
+    { { 0xdf }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdeclast */
+    { { 0xf2 }, 2, T, R, pfx_no, Wn, L0 }, /* andn */
+    { { 0xf3, 0x08 }, 2, T, R, pfx_no, Wn, L0 }, /* blsr */
+    { { 0xf3, 0x10 }, 2, T, R, pfx_no, Wn, L0 }, /* blsmsk */
+    { { 0xf3, 0x18 }, 2, T, R, pfx_no, Wn, L0 }, /* blsi */
+    { { 0xf5 }, 2, T, R, pfx_no, Wn, L0 }, /* bzhi */
+    { { 0xf5 }, 2, T, R, pfx_f3, Wn, L0 }, /* pext */
+    { { 0xf5 }, 2, T, R, pfx_f2, Wn, L0 }, /* pdep */
+    { { 0xf6 }, 2, T, R, pfx_f2, Wn, L0 }, /* mulx */
+    { { 0xf7 }, 2, T, R, pfx_no, Wn, L0 }, /* bextr */
+    { { 0xf7 }, 2, T, R, pfx_66, Wn, L0 }, /* shlx */
+    { { 0xf7 }, 2, T, R, pfx_f3, Wn, L0 }, /* sarx */
+    { { 0xf7 }, 2, T, R, pfx_f2, Wn, L0 }, /* shrx */
+}, vex_0f3a[] = {
+    { { 0x00 }, 3, T, R, pfx_66, W1, L1 }, /* vpermq */
+    { { 0x01 }, 3, T, R, pfx_66, W1, L1 }, /* vpermpd */
+    { { 0x02 }, 3, T, R, pfx_66, W0, Ln }, /* vpblendd */
+    { { 0x04 }, 3, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x05 }, 3, T, R, pfx_66, W0, Ln }, /* vpermilpd */
+    { { 0x06 }, 3, T, R, pfx_66, W0, L1 }, /* vperm2f128 */
+    { { 0x08 }, 3, T, R, pfx_66, WIG, Ln }, /* vroundps */
+    { { 0x09 }, 3, T, R, pfx_66, WIG, Ln }, /* vroundpd */
+    { { 0x0a }, 3, T, R, pfx_66, WIG, LIG }, /* vroundss */
+    { { 0x0b }, 3, T, R, pfx_66, WIG, LIG }, /* vroundsd */
+    { { 0x0c }, 3, T, R, pfx_66, WIG, Ln }, /* vblendps */
+    { { 0x0d }, 3, T, R, pfx_66, WIG, Ln }, /* vblendpd */
+    { { 0x0e }, 3, T, R, pfx_66, WIG, Ln }, /* vpblendw */
+    { { 0x0f }, 3, T, R, pfx_66, WIG, Ln }, /* vpalignr */
+    { { 0x14 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrb */
+    { { 0x15 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0x16 }, 3, T, W, pfx_66, Wn, L0 }, /* vpextr{d,q} */
+    { { 0x17 }, 3, T, W, pfx_66, WIG, L0 }, /* vextractps */
+    { { 0x18 }, 3, T, R, pfx_66, W0, L1 }, /* vinsertf128 */
+    { { 0x19 }, 3, T, W, pfx_66, W0, L1 }, /* vextractf128 */
+    { { 0x1d }, 3, T, W, pfx_66, W0, Ln }, /* vcvtps2ph */
+    { { 0x20 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrb */
+    { { 0x21 }, 3, T, R, pfx_66, WIG, L0 }, /* vinsertps */
+    { { 0x22 }, 3, T, R, pfx_66, Wn, L0 }, /* vpinsr{d,q} */
+    { { 0x30, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftr{b,w} */
+    { { 0x31, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftr{d,q} */
+    { { 0x32, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftl{b,w} */
+    { { 0x33, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftl{d,q} */
+    { { 0x38 }, 3, T, R, pfx_66, W0, L1 }, /* vinserti128 */
+    { { 0x39 }, 3, T, W, pfx_66, W0, L1 }, /* vextracti128 */
+    { { 0x40 }, 3, T, R, pfx_66, WIG, Ln }, /* vdpps */
+    { { 0x41 }, 3, T, R, pfx_66, WIG, Ln }, /* vdppd */
+    { { 0x42 }, 3, T, R, pfx_66, WIG, Ln }, /* vmpsadbw */
+    { { 0x44 }, 3, T, R, pfx_66, WIG, Ln }, /* vpclmulqdq */
+    { { 0x46 }, 3, T, R, pfx_66, W0, L1 }, /* vperm2i128 */
+    { { 0x48 }, 3, T, R, pfx_66, Wn, Ln }, /* vpermil2ps */
+    { { 0x49 }, 3, T, R, pfx_66, Wn, Ln }, /* vpermil2pd */
+    { { 0x4a }, 3, T, R, pfx_66, W0, Ln }, /* vblendvps */
+    { { 0x4b }, 3, T, R, pfx_66, W0, Ln }, /* vblendvpd */
+    { { 0x4c }, 3, T, R, pfx_66, W0, Ln }, /* vpblendvb */
+    { { 0x5c }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddsubps */
+    { { 0x5d }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddsubpd */
+    { { 0x5e }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubaddps */
+    { { 0x5f }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubaddpd */
+    { { 0x60 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpestrm */
+    { { 0x61 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpestri */
+    { { 0x62 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpistrm */
+    { { 0x63 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpistri */
+    { { 0x68 }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddps */
+    { { 0x69 }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddpd */
+    { { 0x6a }, 3, T, R, pfx_66, Wn, LIG }, /* vfmaddss */
+    { { 0x6b }, 3, T, R, pfx_66, Wn, LIG }, /* vfmaddsd */
+    { { 0x6c }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubps */
+    { { 0x6d }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubpd */
+    { { 0x6e }, 3, T, R, pfx_66, Wn, LIG }, /* vfmsubss */
+    { { 0x6f }, 3, T, R, pfx_66, Wn, LIG }, /* vfmsubsd */
+    { { 0x78 }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmaddps */
+    { { 0x79 }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmaddpd */
+    { { 0x7a }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmaddss */
+    { { 0x7b }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmaddsd */
+    { { 0x7c }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmsubps */
+    { { 0x7d }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmsubpd */
+    { { 0x7e }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmsubss */
+    { { 0x7f }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmsubsd */
+    { { 0xce }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineqb */
+    { { 0xcf }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineinvqb */
+    { { 0xdf }, 3, T, R, pfx_66, WIG, Ln }, /* vaeskeygenassist */
+    { { 0xf0 }, 3, T, R, pfx_f2, Wn, L0 }, /* rorx */
+};
+
+static const struct {
+    const struct vex *tbl;
+    unsigned int num;
+} vex[] = {
+    { vex_0f,   ARRAY_SIZE(vex_0f) },
+    { vex_0f38, ARRAY_SIZE(vex_0f38) },
+    { vex_0f3a, ARRAY_SIZE(vex_0f3a) },
+};
+
+#undef Wn
+#undef Ln
+
 #undef F
 #undef N
 #undef R
@@ -1125,7 +1568,7 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
 
     for ( m = 0; m < sizeof(long) / sizeof(int); ++m )
     {
-        unsigned int t;
+        unsigned int t, x;
 
         ctxt->addr_size = 32 << m;
         ctxt->sp_size = 32 << m;
@@ -1211,6 +1654,90 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
                     ctxt, fetch);
         }
 
+        for ( t = 0; t < ARRAY_SIZE(vex_0f); ++t )
+        {
+            if ( vex_0f[t].w == WIG || (vex_0f[t].w & W0) )
+            {
+                uint8_t *ptr = instr;
+
+                memset(instr + 3, 0xcc, 12);
+
+                *ptr++ = 0xc5;
+                *ptr++ = 0xf8 | vex_0f[t].pfx;
+                memcpy(ptr, vex_0f[t].opc, vex_0f[t].len);
+
+                if ( vex_0f[t].l == LIG || (vex_0f[t].l & L0) )
+                    do_test(instr, vex_0f[t].len + ((void *)ptr - instr),
+                            vex_0f[t].modrm ? (void *)ptr - instr + 1 : 0,
+                            vex_0f[t].mem, ctxt, fetch);
+
+                if ( vex_0f[t].l == LIG || (vex_0f[t].l & L1) )
+                {
+                    ptr[-1] |= 4;
+                    memcpy(ptr, vex_0f[t].opc, vex_0f[t].len);
+
+                    do_test(instr, vex_0f[t].len + ((void *)ptr - instr),
+                            vex_0f[t].modrm ? (void *)ptr - instr + 1 : 0,
+                            vex_0f[t].mem, ctxt, fetch);
+                }
+            }
+        }
+
+        for ( x = 0; x < ARRAY_SIZE(vex); ++x )
+        {
+            for ( t = 0; t < vex[x].num; ++t )
+            {
+                uint8_t *ptr = instr;
+
+                memset(instr + 4, 0xcc, 11);
+
+                *ptr++ = 0xc4;
+                *ptr++ = 0xe1 + x;
+                *ptr++ = 0x78 | vex[x].tbl[t].pfx;
+
+                if ( vex[x].tbl[t].w == WIG || (vex[x].tbl[t].w & W0) )
+                {
+                    memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L0) )
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L1) )
+                    {
+                        ptr[-1] |= 4;
+                        memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+                    }
+                }
+
+                if ( vex[x].tbl[t].w == WIG || (vex[x].tbl[t].w & W1) )
+                {
+                    ptr[-1] = 0xf8 | vex[x].tbl[t].pfx;
+                    memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L0) )
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L1) )
+                    {
+                        ptr[-1] |= 4;
+                        memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+                    }
+                }
+            }
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:34:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:34:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3EsL-0005UT-PA; Wed, 05 Aug 2020 08:34:17 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3EsK-0005UJ-SM
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:16 +0000
X-Inumbo-ID: 03644f88-a703-4dd8-8ffd-08eb75ae716a
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 03644f88-a703-4dd8-8ffd-08eb75ae716a;
 Wed, 05 Aug 2020 08:34:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=7acgSmij+08hZtLKWHnc9upjBv5GAtdTk3JI1SJXGWk=; b=4bE3DVRgRcGIHxraVNwPbjhjnH
 N4L8p3tGHTHCwCHpQLqeXOanoUhGr2mbQu7mocBLZ/VKsaJ1VP0E7LFbH2KKL45vRpjSb3awPx/0E
 MsztiU6lnrJE7hJTpo5mmJSR0LyxmSosASMjpclvglHRLakhBnQ0MW7KbUgrojI6WSlg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3EsJ-0007Sa-TE
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3EsJ-0005kT-Sb
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: extend decoding / mem access testing to
 XOP-encoded insns
Message-Id: <E1k3EsJ-0005kT-Sb@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:34:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 3cb82fe3ff4262ddd4fa594c425cbd8f3f14dc76
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:27:31 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:27:31 2020 +0200

    x86emul: extend decoding / mem access testing to XOP-encoded insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 147 ++++++++++++++++++++++++++++++++++
 1 file changed, 147 insertions(+)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 822d7be404..98ffcdb151 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -1474,6 +1474,96 @@ static const struct {
     { vex_0f3a, ARRAY_SIZE(vex_0f3a) },
 };
 
+static const struct xop {
+    uint8_t opc[2];
+    uint8_t w:2;
+    uint8_t l:2;
+} xop_08[] = {
+    { { 0x85 }, W0, L0 }, /* vpmacssww */
+    { { 0x86 }, W0, L0 }, /* vpmacsswd */
+    { { 0x87 }, W0, L0 }, /* vpmacssdql */
+    { { 0x8e }, W0, L0 }, /* vpmacssdd */
+    { { 0x8f }, W0, L0 }, /* vpmacssdqh */
+    { { 0x95 }, W0, L0 }, /* vpmacsww */
+    { { 0x96 }, W0, L0 }, /* vpmacswd */
+    { { 0x97 }, W0, L0 }, /* vpmacsdql */
+    { { 0x9e }, W0, L0 }, /* vpmacsdd */
+    { { 0x9f }, W0, L0 }, /* vpmacsdqh */
+    { { 0xa2 }, Wn, Ln }, /* vpcmov */
+    { { 0xa3 }, Wn, L0 }, /* vpperm */
+    { { 0xa6 }, W0, L0 }, /* vpmadcsswd */
+    { { 0xb6 }, W0, L0 }, /* vpmadcswd */
+    { { 0xc0 }, W0, L0 }, /* vprotb */
+    { { 0xc1 }, W0, L0 }, /* vprotw */
+    { { 0xc2 }, W0, L0 }, /* vprotd */
+    { { 0xc3 }, W0, L0 }, /* vprotq */
+    { { 0xcc }, W0, L0 }, /* vpcomb */
+    { { 0xcd }, W0, L0 }, /* vpcomw */
+    { { 0xce }, W0, L0 }, /* vpcomd */
+    { { 0xcf }, W0, L0 }, /* vpcomq */
+    { { 0xec }, W0, L0 }, /* vpcomub */
+    { { 0xed }, W0, L0 }, /* vpcomuw */
+    { { 0xee }, W0, L0 }, /* vpcomud */
+    { { 0xef }, W0, L0 }, /* vpcomuq */
+}, xop_09[] = {
+    { { 0x01, 0x08 }, Wn, L0 }, /* blcfill */
+    { { 0x01, 0x10 }, Wn, L0 }, /* blsfill */
+    { { 0x01, 0x18 }, Wn, L0 }, /* blcs */
+    { { 0x01, 0x20 }, Wn, L0 }, /* tzmsk */
+    { { 0x01, 0x28 }, Wn, L0 }, /* blcic */
+    { { 0x01, 0x30 }, Wn, L0 }, /* blsic */
+    { { 0x01, 0x38 }, Wn, L0 }, /* t1mskc */
+    { { 0x02, 0x08 }, Wn, L0 }, /* blcmsk */
+    { { 0x02, 0x30 }, Wn, L0 }, /* blci */
+    { { 0x02, 0xc0 }, Wn, L0 }, /* llwpcb */
+    { { 0x02, 0xc8 }, Wn, L0 }, /* slwpcb */
+    { { 0x80 }, W0, Ln }, /* vfrczps */
+    { { 0x81 }, W0, Ln }, /* vfrczpd */
+    { { 0x82 }, W0, L0 }, /* vfrczss */
+    { { 0x83 }, W0, L0 }, /* vfrczsd */
+    { { 0x90 }, Wn, L0 }, /* vprotb */
+    { { 0x91 }, Wn, L0 }, /* vprotw */
+    { { 0x92 }, Wn, L0 }, /* vprotd */
+    { { 0x93 }, Wn, L0 }, /* vprotq */
+    { { 0x94 }, Wn, L0 }, /* vpshlb */
+    { { 0x95 }, Wn, L0 }, /* vpshlw */
+    { { 0x96 }, Wn, L0 }, /* vpshld */
+    { { 0x97 }, Wn, L0 }, /* vpshlq */
+    { { 0x9c }, Wn, L0 }, /* vpshab */
+    { { 0x9d }, Wn, L0 }, /* vpshaw */
+    { { 0x9e }, Wn, L0 }, /* vpshad */
+    { { 0x9f }, Wn, L0 }, /* vpshaq */
+    { { 0xc1 }, W0, L0 }, /* vphaddbw */
+    { { 0xc2 }, W0, L0 }, /* vphaddbd */
+    { { 0xc3 }, W0, L0 }, /* vphaddbq */
+    { { 0xc6 }, W0, L0 }, /* vphaddwd */
+    { { 0xc7 }, W0, L0 }, /* vphaddwq */
+    { { 0xcb }, W0, L0 }, /* vphadddq */
+    { { 0xd1 }, W0, L0 }, /* vphaddubw */
+    { { 0xd2 }, W0, L0 }, /* vphaddubd */
+    { { 0xd3 }, W0, L0 }, /* vphaddubq */
+    { { 0xd6 }, W0, L0 }, /* vphadduwd */
+    { { 0xd7 }, W0, L0 }, /* vphadduwq */
+    { { 0xdb }, W0, L0 }, /* vphaddudq */
+    { { 0xe1 }, W0, L0 }, /* vphsubbw */
+    { { 0xe2 }, W0, L0 }, /* vphsubwd */
+    { { 0xe3 }, W0, L0 }, /* vphsubdq */
+}, xop_0a[] = {
+    { { 0x10 }, Wn, L0 }, /* bextr */
+    { { 0x12, 0x00 }, Wn, L0 }, /* lwpins */
+    { { 0x12, 0x08 }, Wn, L0 }, /* lwpval */
+};
+
+static const struct {
+    const struct xop *tbl;
+    unsigned int num;
+    unsigned int imm;
+} xop[] = {
+    { xop_08, ARRAY_SIZE(xop_08), 1 },
+    { xop_09, ARRAY_SIZE(xop_09), 0 },
+    { xop_0a, ARRAY_SIZE(xop_0a), 4 },
+};
+
 #undef Wn
 #undef Ln
 
@@ -1738,6 +1828,63 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
             }
         }
 
+        for ( x = 0; x < ARRAY_SIZE(xop); ++x )
+        {
+            for ( t = 0; t < xop[x].num; ++t )
+            {
+                uint8_t *ptr = instr;
+                unsigned int modrm;
+                enum mem_access mem;
+
+                memset(instr + 5, 0xcc, 10);
+
+                *ptr++ = 0x8f;
+                *ptr++ = 0xe8 + x;
+                *ptr++ = 0x78;
+                memcpy(ptr, xop[x].tbl[t].opc, 2);
+                memset(ptr + 2, 0, xop[x].imm);
+
+                modrm = ptr[1] & 0xc0 ? 0 : 4;
+                mem = ptr[1] & 0xc0 ? mem_none : mem_read;
+
+                assert(xop[x].tbl[t].w != WIG);
+                assert(xop[x].tbl[t].l != LIG);
+
+                if ( xop[x].tbl[t].w & W0 )
+                {
+                    if ( xop[x].tbl[t].l & L0 )
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+
+                    if ( xop[x].tbl[t].l & L1 )
+                    {
+                        ptr[-1] = 0x7c;
+                        ptr[1] = mem != mem_none ? 0x00 : 0xc0;
+
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+                    }
+                }
+
+                if ( xop[x].tbl[t].w & W1 )
+                {
+                    if ( xop[x].tbl[t].l & L0 )
+                    {
+                        ptr[-1] = 0xf8;
+                        ptr[1] = mem != mem_none ? 0x00 : 0xc0;
+
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+                    }
+
+                    if ( xop[x].tbl[t].l & L1 )
+                    {
+                        ptr[-1] = 0xfc;
+                        ptr[1] = mem != mem_none ? 0x00 : 0xc0;
+
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+                    }
+                }
+            }
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:34:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:34:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3EsV-0005WA-Qr; Wed, 05 Aug 2020 08:34:27 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3EsU-0005Vx-SG
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:26 +0000
X-Inumbo-ID: 683c4224-ed6b-4049-ad54-64d7e27cf068
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 683c4224-ed6b-4049-ad54-64d7e27cf068;
 Wed, 05 Aug 2020 08:34:26 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=GStCMYDHWFGp+8uijv0mXhwwofFu+jivG+bPjA/A3Mc=; b=IVRzZQ5VKVvEVw3wuS7lRkkqeK
 gpuqkXe6bvukign00vxf2gbOwAqWZRvofAQpv3wvp36v3TAo+zHuBvhWra/2aqANKR0qLgkYU5xW8
 9QFR1HHJnRbhYVZcZcTMyESV7tP3Rhw8gtSWXPf+90exYF139xQQV4HWUo4jqLwq4SUM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3EsU-0007Sr-0X
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:26 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3EsT-0005lR-W2
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: AVX512{F,
 BW} down conversion moves are memory writes
Message-Id: <E1k3EsT-0005lR-W2@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:34:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 067e7b76fd38a2f6ba3898c15a09878498a73226
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:28:01 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:28:01 2020 +0200

    x86emul: AVX512{F,BW} down conversion moves are memory writes
    
    For this to be properly reported, the case labels need to move to a
    different switch() block.
    
    Fixes: 30e0bdf79828 ("x86emul: support AVX512{F,BW} down conversion moves")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 10b20cf23b..814e87f842 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -12360,6 +12360,14 @@ x86_insn_is_mem_write(const struct x86_emulate_state *state,
         case X86EMUL_OPC_F2(0x0f38, 0xf8): /* ENQCMD */
         case X86EMUL_OPC_F3(0x0f38, 0xf8): /* ENQCMDS */
             return true;
+
+        case X86EMUL_OPC_EVEX_F3(0x0f38, 0x10) ...
+             X86EMUL_OPC_EVEX_F3(0x0f38, 0x15): /* VPMOVUS* */
+        case X86EMUL_OPC_EVEX_F3(0x0f38, 0x20) ...
+             X86EMUL_OPC_EVEX_F3(0x0f38, 0x25): /* VPMOVS* */
+        case X86EMUL_OPC_EVEX_F3(0x0f38, 0x30) ...
+             X86EMUL_OPC_EVEX_F3(0x0f38, 0x35): /* VPMOV{D,Q,W}* */
+            return state->modrm_mod != 3;
         }
 
         return false;
@@ -12401,12 +12409,6 @@ x86_insn_is_mem_write(const struct x86_emulate_state *state,
     case X86EMUL_OPC(0x0f, 0xab):        /* BTS */
     case X86EMUL_OPC(0x0f, 0xb3):        /* BTR */
     case X86EMUL_OPC(0x0f, 0xbb):        /* BTC */
-    case X86EMUL_OPC_EVEX_F3(0x0f38, 0x10) ...
-         X86EMUL_OPC_EVEX_F3(0x0f38, 0x15): /* VPMOVUS* */
-    case X86EMUL_OPC_EVEX_F3(0x0f38, 0x20) ...
-         X86EMUL_OPC_EVEX_F3(0x0f38, 0x25): /* VPMOVS* */
-    case X86EMUL_OPC_EVEX_F3(0x0f38, 0x30) ...
-         X86EMUL_OPC_EVEX_F3(0x0f38, 0x35): /* VPMOV{D,Q,W}* */
         return true;
 
     case 0xd9:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:34:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:34:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3Esf-0005Y2-SV; Wed, 05 Aug 2020 08:34:37 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3Ese-0005Xr-Te
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:36 +0000
X-Inumbo-ID: cf6d8a6d-96f0-48d2-9462-eded36f4e408
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id cf6d8a6d-96f0-48d2-9462-eded36f4e408;
 Wed, 05 Aug 2020 08:34:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=oXcNsp04dNQ/6wHPH4Hacbn/rIwuEq8u9uOH5B8gCsA=; b=XLrJi5qCzyy9fhSRtanyq+iyar
 mZbKmTXLILW8UYPmP7D2Plz9Rxbsz9V0D/HqKnTqmm+Xc/qPDRovWXZjAJCdEOIuVt/uEHolQiVZX
 5t27K+Ozq0B6HR8qKJoaSSZQpyFr5qt1FczD/8ILMrxVttJbXrrT3rwN76/S9oqjIpF4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Ese-0007Sy-3v
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:36 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Ese-0005mc-3F
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:36 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: AVX512F scatter insns are memory writes
Message-Id: <E1k3Ese-0005mc-3F@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:34:36 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 6156cfeaf28c9cd0ffb84c25216c43aa64d93de4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:28:40 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:28:40 2020 +0200

    x86emul: AVX512F scatter insns are memory writes
    
    While the custom handling renders the "to_mem" field generally unused,
    x86_insn_is_mem_write() still (indirectly) consumes that information,
    and hence the table entries want to be correct.
    
    Fixes: 7d569b848036 ("x86emul: support AVX512F scatter insns")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 814e87f842..c54ad589c4 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -516,7 +516,7 @@ static const struct ext0f38_table {
     [0x9d] = { .simd_size = simd_scalar_vexw, .d8s = d8s_dq },
     [0x9e] = { .simd_size = simd_packed_fp, .d8s = d8s_vl },
     [0x9f] = { .simd_size = simd_scalar_vexw, .d8s = d8s_dq },
-    [0xa0 ... 0xa3] = { .simd_size = simd_other, .vsib = 1, .d8s = d8s_dq },
+    [0xa0 ... 0xa3] = { .simd_size = simd_other, .to_mem = 1, .vsib = 1, .d8s = d8s_dq },
     [0xa6 ... 0xa8] = { .simd_size = simd_packed_fp, .d8s = d8s_vl },
     [0xa9] = { .simd_size = simd_scalar_vexw, .d8s = d8s_dq },
     [0xaa] = { .simd_size = simd_packed_fp, .d8s = d8s_vl },
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:34:47 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:34:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3Esp-0005ZC-U1; Wed, 05 Aug 2020 08:34:47 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3Eso-0005Z5-W1
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:47 +0000
X-Inumbo-ID: 8495286a-83d6-46bc-ad83-cf3b8129ca66
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 8495286a-83d6-46bc-ad83-cf3b8129ca66;
 Wed, 05 Aug 2020 08:34:46 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=bJWUBRTPOqrLicRCvhDg2czQ6lUdT8QVj1QVqU1koxo=; b=0NcAz6T2a6cxKDmxUX/A83t7Nx
 V1oCp/+zDWUuqBWD7RdFINQ+ms3tx92+vpEMHW4QjrSxR8OHIxxFehhJ9RqcLtFzptyWQOYLrsX0P
 ThNIqDTMKAq0l0R8ADTTDmHpl707A4JYwfgGz9QurrLEVmcYEuPX/USSZjaoA+S7Pwok=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Eso-0007T5-7S
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:46 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Eso-0005ns-6q
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:46 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: AVX512PF insns aren't memory accesses
Message-Id: <E1k3Eso-0005ns-6q@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:34:46 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 96137cf1426a1d6419ec9fd205e22b03b2af313d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:29:18 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:29:18 2020 +0200

    x86emul: AVX512PF insns aren't memory accesses
    
    These are prefetches, so should be treated just like other prefetches.
    
    Fixes: 467e91bde720 ("x86emul: support AVX512PF insns")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index c54ad589c4..41883ad6d8 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -12266,6 +12266,8 @@ x86_insn_is_mem_access(const struct x86_emulate_state *state,
          ... X86EMUL_OPC_F2(0x0f, 0x1f): /* NOP space */
         case X86EMUL_OPC(0x0f, 0xb9): /* UD1 */
         case X86EMUL_OPC(0x0f, 0xff): /* UD0 */
+        case X86EMUL_OPC_EVEX_66(0x0f38, 0xc6): /* V{GATH,SCATT}ERPF*D* */
+        case X86EMUL_OPC_EVEX_66(0x0f38, 0xc7): /* V{GATH,SCATT}ERPF*Q* */
             return false;
 
         case X86EMUL_OPC(0x0f, 0x01):
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:34:59 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:34:59 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3Et0-0005aa-Vm; Wed, 05 Aug 2020 08:34:58 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3Et0-0005aU-GE
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:58 +0000
X-Inumbo-ID: ac7f7501-806c-42a5-88a3-5addd675de4d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id ac7f7501-806c-42a5-88a3-5addd675de4d;
 Wed, 05 Aug 2020 08:34:56 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=nEw5/1rfmdU8MEvv4ggIJQdNCTK+ec2FSzM3tpIfTcA=; b=DkFBvrrbtJE3jW8VYkwE7bSYOH
 RZsBLWY7254M4sNonWrMOXsK5JaGuhVHVCMpT0o6DMLUulAeXIGHFiFXptL5fEAS5M3sDYYBQVJYq
 39tpbaOwMQhmTHVAA4WET+4lsvLAHb9vMhLul3SQ3CG+dZPyNEqL39qJXmegO2ofTViY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Esy-0007TD-BC
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:56 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Esy-0005p3-9j
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:34:56 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: extend decoding / mem access testing to
 EVEX-encoded insns
Message-Id: <E1k3Esy-0005p3-9j@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:34:56 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 062aad5190aea2c8a57933c16acae571551a7737
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:29:55 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:29:55 2020 +0200

    x86emul: extend decoding / mem access testing to EVEX-encoded insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 506 +++++++++++++++++++++++++++++++++-
 1 file changed, 505 insertions(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 98ffcdb151..137681ba78 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -1564,9 +1564,469 @@ static const struct {
     { xop_0a, ARRAY_SIZE(xop_0a), 4 },
 };
 
-#undef Wn
 #undef Ln
 
+static const struct evex {
+    uint8_t opc[3];
+    uint8_t len:3;
+    bool modrm:1; /* Should register form (also) be tested? */
+    uint8_t mem:2;
+    uint8_t pfx:2;
+    uint8_t w:2;
+    uint8_t l:3;
+    bool mask:1;
+#define L2 4
+#define Ln (L0 | L1 | L2)
+} evex_0f[] = {
+    { { 0x10 }, 2, T, R, pfx_no, W0, Ln }, /* vmovups */
+    { { 0x10 }, 2, T, R, pfx_66, W1, Ln }, /* vmovupd */
+    { { 0x10 }, 2, T, R, pfx_f3, W0, LIG }, /* vmovss */
+    { { 0x10 }, 2, T, R, pfx_f2, W1, LIG }, /* vmovsd */
+    { { 0x11 }, 2, T, W, pfx_no, W0, Ln }, /* vmovups */
+    { { 0x11 }, 2, T, W, pfx_66, W1, Ln }, /* vmovupd */
+    { { 0x11 }, 2, T, W, pfx_f3, W0, LIG }, /* vmovss */
+    { { 0x11 }, 2, T, W, pfx_f2, W1, LIG }, /* vmovsd */
+    { { 0x12 }, 2, T, R, pfx_no, W0, L0 }, /* vmovlps / vmovhlps */
+    { { 0x12 }, 2, F, R, pfx_66, W1, L0 }, /* vmovlpd */
+    { { 0x12 }, 2, T, R, pfx_f3, W0, Ln }, /* vmovsldup */
+    { { 0x12 }, 2, T, R, pfx_f2, W1, Ln }, /* vmovddup */
+    { { 0x13 }, 2, F, W, pfx_no, W0, L0 }, /* vmovlps */
+    { { 0x13 }, 2, F, W, pfx_66, W1, L0 }, /* vmovlpd */
+    { { 0x14 }, 2, T, R, pfx_no, W0, Ln }, /* vunpcklps */
+    { { 0x14 }, 2, T, R, pfx_66, W1, Ln }, /* vunpcklpd */
+    { { 0x15 }, 2, T, R, pfx_no, W0, Ln }, /* vunpckhps */
+    { { 0x15 }, 2, T, R, pfx_66, W1, Ln }, /* vunpckhpd */
+    { { 0x16 }, 2, T, R, pfx_no, W0, L0 }, /* vmovhps / vmovlhps */
+    { { 0x16 }, 2, F, R, pfx_66, W1, L0 }, /* vmovhpd */
+    { { 0x16 }, 2, T, R, pfx_f3, W0, Ln }, /* vmovshdup */
+    { { 0x17 }, 2, F, W, pfx_no, W0, L0 }, /* vmovhps */
+    { { 0x17 }, 2, F, W, pfx_66, W1, L0 }, /* vmovhpd */
+    { { 0x28 }, 2, T, R, pfx_no, W0, Ln }, /* vmovaps */
+    { { 0x28 }, 2, T, R, pfx_66, W1, Ln }, /* vmovapd */
+    { { 0x29 }, 2, T, W, pfx_no, W0, Ln }, /* vmovaps */
+    { { 0x29 }, 2, T, W, pfx_66, W1, Ln }, /* vmovapd */
+    { { 0x2a }, 2, T, R, pfx_f3, W0, LIG }, /* vcvtsi2ss */
+    { { 0x2a }, 2, T, R, pfx_f2, W1, LIG }, /* vcvtsi2sd */
+    { { 0x2b }, 2, T, W, pfx_no, W0, Ln }, /* vmovntps */
+    { { 0x2b }, 2, T, W, pfx_66, W1, Ln }, /* vmovntpd */
+    { { 0x2c }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvttss2si */
+    { { 0x2c }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvttsd2si */
+    { { 0x2d }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtss2si */
+    { { 0x2d }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsd2si */
+    { { 0x2e }, 2, T, R, pfx_no, W0, LIG }, /* vucomiss */
+    { { 0x2e }, 2, T, R, pfx_66, W1, LIG }, /* vucomisd */
+    { { 0x2f }, 2, T, R, pfx_no, W0, LIG }, /* vcomiss */
+    { { 0x2f }, 2, T, R, pfx_66, W1, LIG }, /* vcomisd */
+    { { 0x51 }, 2, T, R, pfx_no, W0, Ln }, /* vsqrtps */
+    { { 0x51 }, 2, T, R, pfx_66, W1, Ln }, /* vsqrtpd */
+    { { 0x51 }, 2, T, R, pfx_f3, W0, LIG }, /* vsqrtss */
+    { { 0x51 }, 2, T, R, pfx_f2, W1, LIG }, /* vsqrtsd */
+    { { 0x54 }, 2, T, R, pfx_no, W0, Ln }, /* vandps */
+    { { 0x54 }, 2, T, R, pfx_66, W1, Ln }, /* vandpd */
+    { { 0x55 }, 2, T, R, pfx_no, W0, Ln }, /* vandnps */
+    { { 0x55 }, 2, T, R, pfx_66, W1, Ln }, /* vandnpd */
+    { { 0x56 }, 2, T, R, pfx_no, W0, Ln }, /* vorps */
+    { { 0x56 }, 2, T, R, pfx_66, W1, Ln }, /* vorpd */
+    { { 0x57 }, 2, T, R, pfx_no, W0, Ln }, /* vxorps */
+    { { 0x57 }, 2, T, R, pfx_66, W1, Ln }, /* vxorpd */
+    { { 0x58 }, 2, T, R, pfx_no, W0, Ln }, /* vaddps */
+    { { 0x58 }, 2, T, R, pfx_66, W1, Ln }, /* vaddpd */
+    { { 0x58 }, 2, T, R, pfx_f3, W0, LIG }, /* vaddss */
+    { { 0x58 }, 2, T, R, pfx_f2, W1, LIG }, /* vaddsd */
+    { { 0x59 }, 2, T, R, pfx_no, W0, Ln }, /* vmulps */
+    { { 0x59 }, 2, T, R, pfx_66, W1, Ln }, /* vmulpd */
+    { { 0x59 }, 2, T, R, pfx_f3, W0, LIG }, /* vmulss */
+    { { 0x59 }, 2, T, R, pfx_f2, W1, LIG }, /* vmulsd */
+    { { 0x5a }, 2, T, R, pfx_no, W0, Ln }, /* vcvtps2pd */
+    { { 0x5a }, 2, T, R, pfx_66, W1, Ln }, /* vcvtpd2ps */
+    { { 0x5a }, 2, T, R, pfx_f3, W0, LIG }, /* vcvtss2sd */
+    { { 0x5a }, 2, T, R, pfx_f2, W1, LIG }, /* vcvtsd2ss */
+    { { 0x5b }, 2, T, R, pfx_no, Wn, Ln }, /* vcvt{d,q}q2ps */
+    { { 0x5b }, 2, T, R, pfx_66, W0, Ln }, /* vcvtps2dq */
+    { { 0x5b }, 2, T, R, pfx_f3, W0, Ln }, /* vcvttps2dq */
+    { { 0x5c }, 2, T, R, pfx_no, W0, Ln }, /* vsubps */
+    { { 0x5c }, 2, T, R, pfx_66, W1, Ln }, /* vsubpd */
+    { { 0x5c }, 2, T, R, pfx_f3, W0, LIG }, /* vsubss */
+    { { 0x5c }, 2, T, R, pfx_f2, W1, LIG }, /* vsubsd */
+    { { 0x5d }, 2, T, R, pfx_no, W0, Ln }, /* vminps */
+    { { 0x5d }, 2, T, R, pfx_66, W1, Ln }, /* vminpd */
+    { { 0x5d }, 2, T, R, pfx_f3, W0, LIG }, /* vminss */
+    { { 0x5d }, 2, T, R, pfx_f2, W1, LIG }, /* vminsd */
+    { { 0x5e }, 2, T, R, pfx_no, W0, Ln }, /* vdivps */
+    { { 0x5e }, 2, T, R, pfx_66, W1, Ln }, /* vdivpd */
+    { { 0x5e }, 2, T, R, pfx_f3, W0, LIG }, /* vdivss */
+    { { 0x5e }, 2, T, R, pfx_f2, W1, LIG }, /* vdivsd */
+    { { 0x5f }, 2, T, R, pfx_no, W0, Ln }, /* vmaxps */
+    { { 0x5f }, 2, T, R, pfx_66, W1, Ln }, /* vmaxpd */
+    { { 0x5f }, 2, T, R, pfx_f3, W0, LIG }, /* vmaxss */
+    { { 0x5f }, 2, T, R, pfx_f2, W1, LIG }, /* vmaxsd */
+    { { 0x60 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklbw */
+    { { 0x61 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklwd */
+    { { 0x62 }, 2, T, R, pfx_66, W0, Ln }, /* vpunpckldq */
+    { { 0x63 }, 2, T, R, pfx_66, WIG, Ln }, /* vpacksswb */
+    { { 0x64 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtb */
+    { { 0x65 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtw */
+    { { 0x66 }, 2, T, R, pfx_66, W0, Ln }, /* vpcmpgtd */
+    { { 0x67 }, 2, T, R, pfx_66, WIG, Ln }, /* vpackuswb */
+    { { 0x68 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhbw */
+    { { 0x69 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhwd */
+    { { 0x6a }, 2, T, R, pfx_66, W0, Ln }, /* vpunpckhdq */
+    { { 0x6b }, 2, T, R, pfx_66, W0, Ln }, /* vpackssdw */
+    { { 0x6c }, 2, T, R, pfx_66, W1, Ln }, /* vpunpcklqdq */
+    { { 0x6d }, 2, T, R, pfx_66, W1, Ln }, /* vpunpckhqdq */
+    { { 0x6e }, 2, T, R, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x6f }, 2, T, R, pfx_66, Wn, Ln }, /* vmovdqa{32,64} */
+    { { 0x6f }, 2, T, R, pfx_f3, Wn, Ln }, /* vmovdqu{32,64} */
+    { { 0x6f }, 2, T, R, pfx_f2, Wn, Ln }, /* vmovdqu{8,16} */
+    { { 0x70 }, 3, T, R, pfx_66, W0, Ln }, /* vpshufd */
+    { { 0x70 }, 3, T, R, pfx_f3, WIG, Ln }, /* vpshuflw */
+    { { 0x70 }, 3, T, R, pfx_f2, WIG, Ln }, /* vpshufhw */
+    { { 0x71, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0x71, 0xe0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0x71, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0x72, 0xc0 }, 3, F, N, pfx_66, Wn, Ln }, /* vpror{d,q} */
+    { { 0x72, 0xc8 }, 3, F, N, pfx_66, Wn, Ln }, /* vprol{d,q} */
+    { { 0x72, 0xd0 }, 3, F, N, pfx_66, W0, Ln }, /* vpsrld */
+    { { 0x72, 0xe0 }, 3, F, N, pfx_66, Wn, Ln }, /* vpsra{d,q} */
+    { { 0x72, 0xf0 }, 3, F, N, pfx_66, W0, Ln }, /* vpslld */
+    { { 0x73, 0xd0 }, 3, F, N, pfx_66, W1, Ln }, /* vpsrlq */
+    { { 0x73, 0xd8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrldq */
+    { { 0x73, 0xf0 }, 3, F, N, pfx_66, W0, Ln }, /* vpsllq */
+    { { 0x73, 0xf8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpslldq */
+    { { 0x74 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqb */
+    { { 0x75 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqw */
+    { { 0x76 }, 2, T, R, pfx_66, W0, Ln }, /* vpcmpeqd */
+    { { 0x78 }, 2, T, R, pfx_no, Wn, Ln }, /* vcvttp{s,d}2udq */
+    { { 0x78 }, 2, T, R, pfx_66, Wn, Ln }, /* vcvttp{s,d}2uqq */
+    { { 0x78 }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvttss2usi */
+    { { 0x78 }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvttsd2usi */
+    { { 0x79 }, 2, T, R, pfx_no, Wn, Ln }, /* vcvtp{s,d}2udq */
+    { { 0x79 }, 2, T, R, pfx_66, Wn, Ln }, /* vcvtp{s,d}2uqq */
+    { { 0x79 }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtss2usi */
+    { { 0x79 }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsd2usi */
+    { { 0x7a }, 2, T, R, pfx_66, Wn, Ln }, /* vcvttp{s,d}2qq */
+    { { 0x7a }, 2, T, R, pfx_f3, Wn, Ln }, /* vcvtu{d,q}2pd */
+    { { 0x7a }, 2, T, R, pfx_f2, Wn, Ln }, /* vcvtu{d,q}2ps */
+    { { 0x7b }, 2, T, R, pfx_66, Wn, Ln }, /* vcvtp{s,d}2qq */
+    { { 0x7b }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtusi2s */
+    { { 0x7b }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtusi2s */
+    { { 0x7e }, 2, T, W, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x7e }, 2, T, R, pfx_f3, W1, L0 }, /* vmovq */
+    { { 0x7f }, 2, T, W, pfx_66, Wn, Ln }, /* vmovdqa{32,64} */
+    { { 0x7f }, 2, T, W, pfx_f3, Wn, Ln }, /* vmovdqu{32,64} */
+    { { 0x7f }, 2, T, W, pfx_f2, Wn, Ln }, /* vmovdqu{8,16} */
+    { { 0xc2 }, 3, T, R, pfx_no, W0, Ln }, /* vcmpps */
+    { { 0xc2 }, 3, T, R, pfx_66, W1, Ln }, /* vcmppd */
+    { { 0xc2 }, 3, T, R, pfx_f3, W0, LIG }, /* vcmpss */
+    { { 0xc2 }, 3, T, R, pfx_f2, W1, LIG }, /* vcmpsd */
+    { { 0xc4 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrw */
+    { { 0xc5, 0xc0 }, 3, F, N, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0xc6 }, 3, T, R, pfx_no, W0, Ln }, /* vshufps */
+    { { 0xc6 }, 3, T, R, pfx_66, W1, Ln }, /* vshufpd */
+    { { 0xd1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0xd2 }, 2, T, R, pfx_66, W0, Ln }, /* vpsrld */
+    { { 0xd3 }, 2, T, R, pfx_66, W1, Ln }, /* vpsrlq */
+    { { 0xd4 }, 2, T, R, pfx_66, W1, Ln }, /* vpaddq */
+    { { 0xd5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmullw */
+    { { 0xd6 }, 2, T, W, pfx_66, W1, L0 }, /* vmovq */
+    { { 0xd8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusb */
+    { { 0xd9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusw */
+    { { 0xda }, 2, T, R, pfx_66, WIG, Ln }, /* vpminub */
+    { { 0xdb }, 2, T, R, pfx_66, Wn, Ln }, /* vpand{d,q} */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusb */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusw */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxub */
+    { { 0xdf }, 2, T, R, pfx_66, Wn, Ln }, /* vpandn{d,q} */
+    { { 0xe0 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgb */
+    { { 0xe1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0xe2 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsra{d,q} */
+    { { 0xe3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgw */
+    { { 0xe4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhuw */
+    { { 0xe5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhw */
+    { { 0xe6 }, 2, T, R, pfx_66, WIG, Ln }, /* vcvttpd2dq */
+    { { 0xe6 }, 2, T, R, pfx_f3, Wn, Ln }, /* vcvt{d,q}q2pd */
+    { { 0xe6 }, 2, T, R, pfx_f2, WIG, Ln }, /* vcvtpd2dq */
+    { { 0xe7 }, 2, F, W, pfx_66, W0, Ln }, /* vmovntdq */
+    { { 0xe8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsb */
+    { { 0xe9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsw */
+    { { 0xea }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsw */
+    { { 0xeb }, 2, T, R, pfx_66, Wn, Ln }, /* vpor{d,q} */
+    { { 0xec }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsb */
+    { { 0xed }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsw */
+    { { 0xee }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsw */
+    { { 0xef }, 2, T, R, pfx_66, Wn, Ln }, /* vpxor{d,q} */
+    { { 0xf1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0xf2 }, 2, T, R, pfx_66, W0, Ln }, /* vpslld */
+    { { 0xf3 }, 2, T, R, pfx_66, W1, Ln }, /* vpsllq */
+    { { 0xf4 }, 2, T, R, pfx_66, W1, Ln }, /* vpmuludq */
+    { { 0xf5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddwd */
+    { { 0xf6 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsadbw */
+    { { 0xf8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubb */
+    { { 0xf9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubw */
+    { { 0xfa }, 2, T, R, pfx_66, W0, Ln }, /* vpsubd */
+    { { 0xfb }, 2, T, R, pfx_66, W1, Ln }, /* vpsubq */
+    { { 0xfc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddb */
+    { { 0xfd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddw */
+    { { 0xfe }, 2, T, R, pfx_66, W0, Ln }, /* vpaddd */
+}, evex_0f38[] = {
+    { { 0x00 }, 2, T, R, pfx_66, WIG, Ln }, /* vpshufb */
+    { { 0x04 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddubsw */
+    { { 0x0b }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhrsw */
+    { { 0x0c }, 2, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x0d }, 2, T, R, pfx_66, W1, Ln }, /* vpermilpd */
+    { { 0x10 }, 2, T, R, pfx_66, W1, Ln }, /* vpsrlvw */
+    { { 0x10 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovuswb */
+    { { 0x11 }, 2, T, R, pfx_66, W1, Ln }, /* vpsravw */
+    { { 0x11 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusdb */
+    { { 0x12 }, 2, T, R, pfx_66, W1, Ln }, /* vpsllvw */
+    { { 0x12 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusqb */
+    { { 0x13 }, 2, T, R, pfx_66, W0, Ln }, /* vcvtph2ps */
+    { { 0x13 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusdw */
+    { { 0x14 }, 2, T, R, pfx_66, Wn, Ln }, /* vprorv{d,q} */
+    { { 0x14 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusqw */
+    { { 0x15 }, 2, T, R, pfx_66, Wn, Ln }, /* vprolv{d,q} */
+    { { 0x15 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusqd */
+    { { 0x16 }, 2, T, R, pfx_66, Wn, L1|L2 }, /* vpermp{s,d} */
+    { { 0x18 }, 2, T, R, pfx_66, W0, Ln }, /* vbroadcastss */
+    { { 0x19 }, 2, T, R, pfx_66, Wn, L1|L2 }, /* vbroadcast{32x2,sd} */
+    { { 0x1a }, 2, F, R, pfx_66, Wn, L1|L2 }, /* vbroadcastf{32x4,64x2} */
+    { { 0x1b }, 2, F, R, pfx_66, Wn, L2 }, /* vbroadcastf{32x8,64x4} */
+    { { 0x1c }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsb */
+    { { 0x1d }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsw */
+    { { 0x1e }, 2, T, R, pfx_66, W0, Ln }, /* vpabsd */
+    { { 0x1f }, 2, T, R, pfx_66, W1, Ln }, /* vpabsq */
+    { { 0x20 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbw */
+    { { 0x20 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovswb */
+    { { 0x21 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbd */
+    { { 0x21 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsdb */
+    { { 0x22 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbq */
+    { { 0x22 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsqb */
+    { { 0x23 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwd */
+    { { 0x23 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsdw */
+    { { 0x24 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwq */
+    { { 0x24 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsqw */
+    { { 0x25 }, 2, T, R, pfx_66, W0, Ln }, /* vpmovsxdq */
+    { { 0x25 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsqd */
+    { { 0x26 }, 2, T, R, pfx_66, Wn, Ln }, /* vptestm{b,w} */
+    { { 0x26 }, 2, T, R, pfx_f3, Wn, Ln }, /* vptestnm{b,w} */
+    { { 0x27 }, 2, T, R, pfx_66, Wn, Ln }, /* vptestm{d,q} */
+    { { 0x27 }, 2, T, R, pfx_f3, Wn, Ln }, /* vptestnm{d,q} */
+    { { 0x28 }, 2, T, R, pfx_66, W1, Ln }, /* vpmuldq */
+    { { 0x28, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmovm2{b,w} */
+    { { 0x29 }, 2, T, R, pfx_66, W1, Ln }, /* vpcmpeqq */
+    { { 0x29, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmov{b,w}2m */
+    { { 0x2a }, 2, F, R, pfx_66, W0, Ln }, /* vmovntdqa */
+    { { 0x2a, 0xc0 }, 2, F, N, pfx_f3, W1, Ln }, /* vpbroadcastmb2q */
+    { { 0x2b }, 2, T, R, pfx_66, W0, Ln }, /* vpackusdw */
+    { { 0x2c }, 2, F, R, pfx_66, Wn, Ln }, /* vscalefp{s,d} */
+    { { 0x2d }, 2, F, R, pfx_66, Wn, LIG }, /* vscalefs{s,d} */
+    { { 0x30 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbw */
+    { { 0x30 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovwb */
+    { { 0x31 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbd */
+    { { 0x31 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovdb */
+    { { 0x32 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbq */
+    { { 0x32 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovqb */
+    { { 0x33 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwd */
+    { { 0x33 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovdw */
+    { { 0x34 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwq */
+    { { 0x34 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovqw */
+    { { 0x35 }, 2, T, R, pfx_66, W0, Ln }, /* vpmovzxdq */
+    { { 0x35 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovqd */
+    { { 0x36 }, 2, T, R, pfx_66, Wn, L1|L2 }, /* vperm{d,q} */
+    { { 0x37 }, 2, T, R, pfx_66, W1, Ln }, /* vpcmpgtq */
+    { { 0x38 }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsb */
+    { { 0x38, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmovm2{d,q} */
+    { { 0x39 }, 2, T, R, pfx_66, Wn, Ln }, /* vpmins{d,q} */
+    { { 0x39, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmov{d,q}2m */
+    { { 0x3a }, 2, T, R, pfx_66, WIG, Ln }, /* vpminuw */
+    { { 0x2a, 0xc0 }, 2, F, N, pfx_f3, W0, Ln }, /* vpbroadcastmw2d */
+    { { 0x3b }, 2, T, R, pfx_66, Wn, Ln }, /* vpminu{d,q} */
+    { { 0x3c }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsb */
+    { { 0x3d }, 2, T, R, pfx_66, Wn, Ln }, /* vpmaxs{d,q} */
+    { { 0x3e }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxuw */
+    { { 0x3f }, 2, T, R, pfx_66, Wn, Ln }, /* vpmaxu{d,q} */
+    { { 0x40 }, 2, T, R, pfx_66, Wn, Ln }, /* vpmull{d,q} */
+    { { 0x42 }, 2, T, R, pfx_66, Wn, Ln }, /* vgetexpp{s,d} */
+    { { 0x43 }, 2, T, R, pfx_66, Wn, LIG }, /* vgetexps{s,d} */
+    { { 0x44 }, 2, T, R, pfx_66, Wn, Ln }, /* vlzcnt{d,q} */
+    { { 0x45 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsrlv{d,q} */
+    { { 0x46 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsrav{d,q} */
+    { { 0x47 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsllv{d,q} */
+    { { 0x4c }, 2, T, R, pfx_66, Wn, Ln }, /* vrcp14p{s,d} */
+    { { 0x4d }, 2, T, R, pfx_66, Wn, LIG }, /* vrcp14s{s,d} */
+    { { 0x4e }, 2, T, R, pfx_66, Wn, Ln }, /* vrsqrt14p{s,d} */
+    { { 0x4f }, 2, T, R, pfx_66, Wn, LIG }, /* vrsqrt14s{s,d} */
+    { { 0x50 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpbusd */
+    { { 0x51 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpbusds */
+    { { 0x52 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpwssd */
+    { { 0x52 }, 2, T, R, pfx_f3, W0, Ln }, /* vdpbf16ps */
+    { { 0x52 }, 2, T, R, pfx_f2, W0, L2 }, /* vp4dpwssd */
+    { { 0x53 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpwssds */
+    { { 0x53 }, 2, T, R, pfx_f2, W0, L2 }, /* vp4dpwssds */
+    { { 0x54 }, 2, T, R, pfx_66, Wn, Ln }, /* vpopcnt{b,w} */
+    { { 0x55 }, 2, T, R, pfx_66, Wn, Ln }, /* vpopcnt{d,q} */
+    { { 0x58 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastd */
+    { { 0x59 }, 2, T, R, pfx_66, Wn, Ln }, /* vbroadcast32x2 / vpbroadcastq */
+    { { 0x5a }, 2, F, R, pfx_66, Wn, L1|L2 }, /* vbroadcasti{32x4,64x2} */
+    { { 0x5b }, 2, F, R, pfx_66, Wn, L2 }, /* vbroadcasti{32x8,64x4} */
+    { { 0x62 }, 2, T, R, pfx_66, Wn, Ln }, /* vpexpand{b,w} */
+    { { 0x63 }, 2, T, W, pfx_66, Wn, Ln }, /* vpcompress{b,w} */
+    { { 0x64 }, 2, T, R, pfx_66, Wn, Ln }, /* vpblendm{d,q} */
+    { { 0x65 }, 2, T, R, pfx_66, Wn, Ln }, /* vblendmp{s,d} */
+    { { 0x66 }, 2, T, R, pfx_66, Wn, Ln }, /* vpblendm{b,w} */
+    { { 0x68 }, 2, T, R, pfx_f2, Wn, Ln }, /* vp2intersect{d,q} */
+    { { 0x70 }, 2, T, R, pfx_66, W1, Ln }, /* vpshldvw */
+    { { 0x71 }, 2, T, R, pfx_66, Wn, Ln }, /* vpshldv{d,q} */
+    { { 0x72 }, 2, T, R, pfx_66, W1, Ln }, /* vpshrdvw */
+    { { 0x72 }, 2, T, R, pfx_f3, W1, Ln }, /* vcvtneps2bf16 */
+    { { 0x72 }, 2, T, R, pfx_f2, W1, Ln }, /* vcvtne2ps2bf16 */
+    { { 0x73 }, 2, T, R, pfx_66, Wn, Ln }, /* vpshrdv{d,q} */
+    { { 0x75 }, 2, T, R, pfx_66, Wn, Ln }, /* vpermi2{b,w} */
+    { { 0x76 }, 2, T, R, pfx_66, Wn, Ln }, /* vpermi2{d,q} */
+    { { 0x77 }, 2, T, R, pfx_66, Wn, Ln }, /* vpermi2p{s,d} */
+    { { 0x78 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastb */
+    { { 0x79 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastw */
+    { { 0x7a, 0xc0 }, 2, F, N, pfx_66, W0, Ln }, /* vpbroadcastb */
+    { { 0x7b, 0xc0 }, 2, F, N, pfx_66, W0, Ln }, /* vpbroadcastw */
+    { { 0x7c, 0xc0 }, 2, F, N, pfx_66, W0, Ln }, /* vpbroadcast{d,q} */
+    { { 0x7d }, 2, T, R, pfx_66, Wn, Ln }, /* vpermt2{b,w} */
+    { { 0x7e }, 2, T, R, pfx_66, Wn, Ln }, /* vpermt2{d,q} */
+    { { 0x7f }, 2, T, R, pfx_66, Wn, Ln }, /* vpermt2p{s,d} */
+    { { 0x83 }, 2, T, R, pfx_66, W1, Ln }, /* vpmultishiftqb */
+    { { 0x88 }, 2, T, R, pfx_66, Wn, Ln }, /* vpexpandp{s,d} */
+    { { 0x89 }, 2, T, R, pfx_66, Wn, Ln }, /* vpexpand{d,q} */
+    { { 0x8a }, 2, T, W, pfx_66, Wn, Ln }, /* vpcompressp{s,d} */
+    { { 0x8b }, 2, T, W, pfx_66, Wn, Ln }, /* vpcompress{d,q} */
+    { { 0x8d }, 2, F, R, pfx_66, Wn, Ln }, /* vperm{b,w} */
+    { { 0x8f }, 2, F, R, pfx_66, W0, Ln }, /* vpshufbitqmb */
+    { { 0x90, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vpgatherd{d,q} */
+    { { 0x91, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vpgatherq{d,q} */
+    { { 0x92, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vgatherdp{s,d} */
+    { { 0x93, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vgatherqp{s,d} */
+    { { 0x96 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmaddsub132p{s,d} */
+    { { 0x97 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsubadd132p{s,d} */
+    { { 0x98 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmadd132p{s,d} */
+    { { 0x99 }, 2, T, R, pfx_66, Wn, LIG }, /* vfmadd132s{s,d} */
+    { { 0x9a }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsub132p{s,d} */
+    { { 0x9a }, 2, T, R, pfx_f2, W0, L2 }, /* v4fmaddps */
+    { { 0x9b }, 2, T, R, pfx_66, Wn, LIG }, /* vfmsub132s{s,d} */
+    { { 0x9b }, 2, T, R, pfx_f2, W0, LIG }, /* v4fmaddss */
+    { { 0x9c }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmadd132p{s,d} */
+    { { 0x9d }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmadd132s{s,d} */
+    { { 0x9e }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmsub132p{s,d} */
+    { { 0x9f }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmsub132s{s,d} */
+    { { 0xa0, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vpscatterd{d,q} */
+    { { 0xa1, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vpscatterq{d,q} */
+    { { 0xa2, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vscatterdp{s,d} */
+    { { 0xa3, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vscatterqp{s,d} */
+    { { 0xa6 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmaddsub213p{s,d} */
+    { { 0xa7 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsubadd213p{s,d} */
+    { { 0xa8 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmadd213p{s,d} */
+    { { 0xa9 }, 2, T, R, pfx_66, Wn, LIG }, /* vfmadd213s{s,d} */
+    { { 0x9a }, 2, T, R, pfx_f2, W0, L2 }, /* v4fnmaddps */
+    { { 0xaa }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsub213p{s,d} */
+    { { 0xab }, 2, T, R, pfx_66, Wn, LIG }, /* vfmsub213s{s,d} */
+    { { 0x9b }, 2, T, R, pfx_f2, W0, LIG }, /* v4fnmaddss */
+    { { 0xac }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmadd213p{s,d} */
+    { { 0xad }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmadd213s{s,d} */
+    { { 0xae }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmsub213p{s,d} */
+    { { 0xaf }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmsub213s{s,d} */
+    { { 0xb4 }, 2, T, R, pfx_66, W1, Ln }, /* vpmadd52luq */
+    { { 0xb5 }, 2, T, R, pfx_66, W1, Ln }, /* vpmadd52huq */
+    { { 0xb6 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmaddsub231p{s,d} */
+    { { 0xb7 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsubadd231p{s,d} */
+    { { 0xb8 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmadd231p{s,d} */
+    { { 0xb9 }, 2, T, R, pfx_66, Wn, LIG }, /* vfmadd231s{s,d} */
+    { { 0xba }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsub231p{s,d} */
+    { { 0xbb }, 2, T, R, pfx_66, Wn, LIG }, /* vfmsub231s{s,d} */
+    { { 0xbc }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmadd231p{s,d} */
+    { { 0xbd }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmadd231s{s,d} */
+    { { 0xbe }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmsub231p{s,d} */
+    { { 0xbf }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmsub231s{s,d} */
+    { { 0xc4 }, 2, T, R, pfx_66, Wn, Ln }, /* vpconflict{d,q} */
+    { { 0xc6, VSIB(1) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf0dp{s,d} */
+    { { 0xc6, VSIB(2) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf1dp{s,d} */
+    { { 0xc6, VSIB(5) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf0dp{s,d} */
+    { { 0xc6, VSIB(6) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf1dp{s,d} */
+    { { 0xc7, VSIB(1) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf0qp{s,d} */
+    { { 0xc7, VSIB(2) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf1qp{s,d} */
+    { { 0xc7, VSIB(5) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf0qp{s,d} */
+    { { 0xc7, VSIB(6) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf1qp{s,d} */
+    { { 0xc8 }, 2, T, R, pfx_66, Wn, L2 }, /* vexp2p{s,d} */
+    { { 0xca }, 2, T, R, pfx_66, Wn, L2 }, /* vrcp28p{s,d} */
+    { { 0xcb }, 2, T, R, pfx_66, Wn, LIG }, /* vrcp28s{s,d} */
+    { { 0xcc }, 2, T, R, pfx_66, Wn, L2 }, /* vrsqrt28p{s,d} */
+    { { 0xcd }, 2, T, R, pfx_66, Wn, LIG }, /* vrsqrt28s{s,d} */
+    { { 0xcf }, 2, T, R, pfx_66, W0, Ln }, /* vgf2p8mulb */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenc */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenclast */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdec */
+    { { 0xdf }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdeclast */
+}, evex_0f3a[] = {
+    { { 0x00 }, 3, T, R, pfx_66, W1, L1|L2 }, /* vpermq */
+    { { 0x01 }, 3, T, R, pfx_66, W1, L1|L2 }, /* vpermpd */
+    { { 0x03 }, 3, T, R, pfx_66, Wn, Ln }, /* valign{d,q} */
+    { { 0x04 }, 3, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x05 }, 3, T, R, pfx_66, W1, Ln }, /* vpermilpd */
+    { { 0x08 }, 3, T, R, pfx_66, W0, Ln }, /* vrndscaleps */
+    { { 0x09 }, 3, T, R, pfx_66, W1, Ln }, /* vrndscalepd */
+    { { 0x0a }, 3, T, R, pfx_66, WIG, LIG }, /* vrndscaless */
+    { { 0x0b }, 3, T, R, pfx_66, WIG, LIG }, /* vrndscalesd */
+    { { 0x0f }, 3, T, R, pfx_66, WIG, Ln }, /* vpalignr */
+    { { 0x14 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrb */
+    { { 0x15 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0x16 }, 3, T, W, pfx_66, Wn, L0 }, /* vpextr{d,q} */
+    { { 0x17 }, 3, T, W, pfx_66, WIG, L0 }, /* vextractps */
+    { { 0x18 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vinsertf{32x4,64x2} */
+    { { 0x19 }, 3, T, W, pfx_66, Wn, L1|L2 }, /* vextractf{32x4,64x2} */
+    { { 0x1a }, 3, T, R, pfx_66, Wn, L2 }, /* vinsertf{32x8,64x4} */
+    { { 0x1b }, 3, T, W, pfx_66, Wn, L2 }, /* vextractf{32x8,64x4} */
+    { { 0x1d }, 3, T, W, pfx_66, W0, Ln }, /* vcvtps2ph */
+    { { 0x1e }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmpu{d,q} */
+    { { 0x1f }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmp{d,q} */
+    { { 0x20 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrb */
+    { { 0x21 }, 3, T, R, pfx_66, WIG, L0 }, /* vinsertps */
+    { { 0x22 }, 3, T, R, pfx_66, Wn, L0 }, /* vpinsr{d,q} */
+    { { 0x23 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vshuff{32x4,64x2} */
+    { { 0x25 }, 3, T, R, pfx_66, Wn, Ln }, /* vpternlog{d,q} */
+    { { 0x26 }, 3, T, R, pfx_66, Wn, Ln }, /* vgetmantp{s,d} */
+    { { 0x27 }, 3, T, R, pfx_66, Wn, LIG }, /* vgetmants{s,d} */
+    { { 0x38 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vinserti{32x4,64x2} */
+    { { 0x39 }, 3, T, W, pfx_66, Wn, L1|L2 }, /* vextracti{32x4,64x2} */
+    { { 0x3a }, 3, T, R, pfx_66, Wn, L2 }, /* vinserti{32x8,64x4} */
+    { { 0x3b }, 3, T, W, pfx_66, Wn, L2 }, /* vextracti{32x8,64x4} */
+    { { 0x3e }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmpu{b,w} */
+    { { 0x3f }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmp{b,w} */
+    { { 0x42 }, 3, T, R, pfx_66, W0, Ln }, /* vdbpsadbw */
+    { { 0x43 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vshufi{32x4,64x2} */
+    { { 0x44 }, 3, T, R, pfx_66, WIG, Ln }, /* vpclmulqdq */
+    { { 0x50 }, 3, T, R, pfx_66, Wn, Ln }, /* vrangep{s,d} */
+    { { 0x51 }, 3, T, R, pfx_66, Wn, LIG }, /* vranges{s,d} */
+    { { 0x54 }, 3, T, R, pfx_66, Wn, Ln }, /* vfixupimmp{s,d} */
+    { { 0x55 }, 3, T, R, pfx_66, Wn, LIG }, /* vfixumpimms{s,d} */
+    { { 0x56 }, 3, T, R, pfx_66, Wn, Ln }, /* vreducep{s,d} */
+    { { 0x57 }, 3, T, R, pfx_66, Wn, LIG }, /* vreduces{s,d} */
+    { { 0x66 }, 3, T, R, pfx_66, Wn, Ln }, /* vfpclassp{s,d} */
+    { { 0x67 }, 3, T, R, pfx_66, Wn, LIG }, /* vfpclasss{s,d} */
+    { { 0x70 }, 3, T, R, pfx_66, W1, Ln }, /* vshldw */
+    { { 0x71 }, 3, T, R, pfx_66, Wn, Ln }, /* vshld{d,q} */
+    { { 0x72 }, 3, T, R, pfx_66, W1, Ln }, /* vshrdw */
+    { { 0x73 }, 3, T, R, pfx_66, Wn, Ln }, /* vshrd{d,q} */
+    { { 0xce }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineqb */
+    { { 0xcf }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineinvqb */
+};
+
+static const struct {
+    const struct evex *tbl;
+    unsigned int num;
+} evex[] = {
+    { evex_0f,   ARRAY_SIZE(evex_0f) },
+    { evex_0f38, ARRAY_SIZE(evex_0f38) },
+    { evex_0f3a, ARRAY_SIZE(evex_0f3a) },
+};
+
+#undef Wn
+
 #undef F
 #undef N
 #undef R
@@ -1885,6 +2345,50 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
             }
         }
 
+        for ( x = 0; x < ARRAY_SIZE(evex); ++x )
+        {
+            for ( t = 0; t < evex[x].num; ++t )
+            {
+                uint8_t *ptr = instr;
+                unsigned int l;
+
+                memset(instr + 5, 0xcc, 10);
+
+                *ptr++ = 0x62;
+                *ptr++ = 0xf1 + x;
+                *ptr++ = 0x7c | evex[x].tbl[t].pfx;
+                *ptr++ = 0x08 | evex[x].tbl[t].mask;
+
+                for ( l = 3; l--; )
+                {
+                    if ( evex[x].tbl[t].l != LIG && !(evex[x].tbl[t].l & (1u << l)) )
+                        continue;
+
+                    ptr[-1] &= ~0x60;
+                    ptr[-1] |= l << 5;
+                    memcpy(ptr, evex[x].tbl[t].opc, evex[x].tbl[t].len);
+
+                    if ( evex[x].tbl[t].w == WIG || (evex[x].tbl[t].w & W0) )
+                    {
+                        ptr[-2] &= ~0x80;
+                        do_test(instr, evex[x].tbl[t].len + ((void *)ptr - instr),
+                                evex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                evex[x].tbl[t].mem, ctxt, fetch);
+                    }
+
+                    if ( evex[x].tbl[t].w == WIG || (evex[x].tbl[t].w & W1) )
+                    {
+                        ptr[-2] |= 0x80;
+                        memcpy(ptr, evex[x].tbl[t].opc, evex[x].tbl[t].len);
+
+                        do_test(instr, evex[x].tbl[t].len + ((void *)ptr - instr),
+                                evex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                evex[x].tbl[t].mem, ctxt, fetch);
+                    }
+                }
+            }
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 08:35:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 08:35:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3EtB-0005bm-2n; Wed, 05 Aug 2020 08:35:09 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3Et9-0005bb-MR
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:35:07 +0000
X-Inumbo-ID: 5e9c4e27-406f-4682-846b-75283a28ccdb
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 5e9c4e27-406f-4682-846b-75283a28ccdb;
 Wed, 05 Aug 2020 08:35:06 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=UdLtzIZDWtDpXk4CtRl8T3BrsS7LIe0LuJYMRiLmLeM=; b=3NZzkyrlYHRaFcJndzYAjaNC+V
 YD4c/vOuC7FcxW8rEEONq6STog4rtEcUYhAPb1GWOyAS0UBtqBFyv351RqCbZ8coAGiOYy6wVFe9W
 F2dQiaU99pYEjTfZmM1BJiP/JbF4DFovKjdkoUM81dp9b3JyLmEsAI/4D1gH6foOiwnE=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Et8-0007TW-E4
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:35:06 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3Et8-0005qQ-DQ
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 08:35:06 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86emul: correct AVX512_BF16 insn names in EVEX Disp8
 test
Message-Id: <E1k3Et8-0005qQ-DQ@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 08:35:06 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e58a71274c65e7547fc2e917f051c5c04e2820e2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:30:18 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:30:18 2020 +0200

    x86emul: correct AVX512_BF16 insn names in EVEX Disp8 test
    
    The leading 'v' ought to be omitted from the table entries.
    
    Fixes: 7ff66809ccd5 ("x86emul: support AVX512_BF16 insns")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/evex-disp8.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/tests/x86_emulator/evex-disp8.c b/tools/tests/x86_emulator/evex-disp8.c
index 60c569d5e5..78153847a0 100644
--- a/tools/tests/x86_emulator/evex-disp8.c
+++ b/tools/tests/x86_emulator/evex-disp8.c
@@ -551,9 +551,9 @@ static const struct test avx512_4vnniw_512[] = {
 };
 
 static const struct test avx512_bf16_all[] = {
-    INSN(vcvtne2ps2bf16, f2, 0f38, 72, vl, d, vl),
-    INSN(vcvtneps2bf16,  f3, 0f38, 72, vl, d, vl),
-    INSN(vdpbf16ps,      f3, 0f38, 52, vl, d, vl),
+    INSN(cvtne2ps2bf16, f2, 0f38, 72, vl, d, vl),
+    INSN(cvtneps2bf16,  f3, 0f38, 72, vl, d, vl),
+    INSN(dpbf16ps,      f3, 0f38, 52, vl, d, vl),
 };
 
 static const struct test avx512_bitalg_all[] = {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 16:44:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 16:44:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3MWS-0000nj-1V; Wed, 05 Aug 2020 16:44:12 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3MWQ-0000ne-Fv
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:10 +0000
X-Inumbo-ID: 1cf1e96e-b658-47ea-be89-1a6bd04f7f21
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 1cf1e96e-b658-47ea-be89-1a6bd04f7f21;
 Wed, 05 Aug 2020 16:44:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=fnNY8CKEk8a2hrmHktuq0jWwjgdqMVTwe+BUvSQNSYY=; b=LaYoHz61Vj900vZDeYFXT/Ocfl
 NOcFxlH73bcpHd/rZ2n91CQdgVaXItjpLjUlroUzDUt15VMxdF6qDfW6vxX3Zlv1FwpcXdyHv+7gQ
 imrUGSjre6BKWadGomXpID8VNQgyNHBevRLDCr8JyK1YFfyR/70jnXPUR1McEoI3Ubgc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWK-00027u-Uz
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWK-0004Kk-Ti
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/ioapic: Fix fixmap error path logic in
 ioapic_init_mappings()
Message-Id: <E1k3MWK-0004Kk-Ti@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 16:44:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b4175c6693e089ffcd77cd1ea388e76e67d36d57
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 12:05:27 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/ioapic: Fix fixmap error path logic in ioapic_init_mappings()
    
    In the case that bad_ioapic_register() fails, the current position of idx++
    means that clear_fixmap(idx) will be called with the wrong index, and not
    clean up the mapping just created.
    
    Increment idx as part of the loop, rather than midway through the loop body.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/io_apic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 878ee5192d..e66fa99ec7 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2543,7 +2543,7 @@ static void __init ioapic_init_mappings(void)
 
     nr_irqs_gsi = 0;
 
-    for ( i = 0; i < nr_ioapics; i++ )
+    for ( i = 0; i < nr_ioapics; i++, idx++ )
     {
         union IO_APIC_reg_01 reg_01;
         paddr_t ioapic_phys = mp_ioapics[i].mpc_apicaddr;
@@ -2560,7 +2560,6 @@ static void __init ioapic_init_mappings(void)
         set_fixmap_nocache(idx, ioapic_phys);
         apic_printk(APIC_VERBOSE, "mapped IOAPIC to %08Lx (%08lx)\n",
                     __fix_to_virt(idx), ioapic_phys);
-        idx++;
 
         if ( bad_ioapic_register(i) )
         {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 16:44:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 16:44:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3MWX-0000oK-2u; Wed, 05 Aug 2020 16:44:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3MWV-0000oA-Vc
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:16 +0000
X-Inumbo-ID: 5283b03a-71d7-4de3-8426-162fc4c21dd6
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5283b03a-71d7-4de3-8426-162fc4c21dd6;
 Wed, 05 Aug 2020 16:44:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=G/Z6yHqZnk/FF0CIYJghpg3jRbSqBL7yFda4QAyc0gg=; b=punlO2m656kyTmGBBEO0ow7wSt
 MBwMy3sSM5gVv8wZA+3NzVHJpp6Ys9EYRJRJFcYODBYXMcsyh7iUBNGoqI+Id8biHBCpZVCWtOgov
 zkDZgdrMvBOS1WbEEtIT2+yTto15FnXB9lkNhySdkBaMYaB6bWNvK2er8VxmvUanBN2Y=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWV-00027x-1t
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWV-0004LY-0u
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/ioapic: Fix style in io_apic.h
Message-Id: <E1k3MWV-0004LY-0u@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 16:44:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a8ee9c4d3fb8532a60c6c87abd0fe80b5b03c6e8
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 11:49:15 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/ioapic: Fix style in io_apic.h
    
    This file is a mix of Xen and Linux styles.  Switch it fully to Xen style.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/include/asm-x86/io_apic.h | 48 +++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h
index e006b2b8dd..72d0b2872c 100644
--- a/xen/include/asm-x86/io_apic.h
+++ b/xen/include/asm-x86/io_apic.h
@@ -13,9 +13,9 @@
  * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
  */
 
-#define IO_APIC_BASE(idx) \
-		((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
-		+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
+#define IO_APIC_BASE(idx)                                               \
+    ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + (idx))         \
+                      + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
 
 #define IO_APIC_ID(idx) (mp_ioapics[idx].mpc_apicid)
 
@@ -78,14 +78,14 @@ extern int nr_ioapics;
 extern int nr_ioapic_entries[MAX_IO_APICS];
 
 enum ioapic_irq_destination_types {
-	dest_Fixed = 0,
-	dest_LowestPrio = 1,
-	dest_SMI = 2,
-	dest__reserved_1 = 3,
-	dest_NMI = 4,
-	dest_INIT = 5,
-	dest__reserved_2 = 6,
-	dest_ExtINT = 7
+    dest_Fixed = 0,
+    dest_LowestPrio = 1,
+    dest_SMI = 2,
+    dest__reserved_1 = 3,
+    dest_NMI = 4,
+    dest_INIT = 5,
+    dest__reserved_2 = 6,
+    dest_ExtINT = 7
 };
 
 struct IO_APIC_route_entry {
@@ -135,28 +135,28 @@ unsigned int io_apic_gsi_base(unsigned int apic);
 
 static inline unsigned int __io_apic_read(unsigned int apic, unsigned int reg)
 {
-	*IO_APIC_BASE(apic) = reg;
-	return *(IO_APIC_BASE(apic)+4);
+    *IO_APIC_BASE(apic) = reg;
+    return *(IO_APIC_BASE(apic) + 4);
 }
 
 static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
 {
-	if (ioapic_reg_remapped(reg))
-		return iommu_read_apic_from_ire(apic, reg);
-	return __io_apic_read(apic, reg);
+    if ( ioapic_reg_remapped(reg) )
+        return iommu_read_apic_from_ire(apic, reg);
+    return __io_apic_read(apic, reg);
 }
 
 static inline void __io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
 {
-	*IO_APIC_BASE(apic) = reg;
-	*(IO_APIC_BASE(apic)+4) = value;
+    *IO_APIC_BASE(apic) = reg;
+    *(IO_APIC_BASE(apic) + 4) = value;
 }
 
 static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
 {
-	if (ioapic_reg_remapped(reg))
-		return iommu_update_ire_from_apic(apic, reg, value);
-	__io_apic_write(apic, reg, value);
+    if ( ioapic_reg_remapped(reg) )
+        return iommu_update_ire_from_apic(apic, reg, value);
+    __io_apic_write(apic, reg, value);
 }
 
 /*
@@ -165,9 +165,9 @@ static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned i
  */
 static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
 {
-	if (ioapic_reg_remapped(reg))
-		return iommu_update_ire_from_apic(apic, reg, value);
-	*(IO_APIC_BASE(apic)+4) = value;
+    if ( ioapic_reg_remapped(reg) )
+        return iommu_update_ire_from_apic(apic, reg, value);
+    *(IO_APIC_BASE(apic) + 4) = value;
 }
 
 /* 1 if "noapic" boot option passed */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 16:44:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 16:44:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3MWh-0000pT-4Z; Wed, 05 Aug 2020 16:44:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3MWf-0000pG-Vs
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:26 +0000
X-Inumbo-ID: 1436b11c-09ee-4855-8ea8-a7e25e7da615
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 1436b11c-09ee-4855-8ea8-a7e25e7da615;
 Wed, 05 Aug 2020 16:44:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=BE3OMU93mRqq8JWy4cpN2+GzXsomZF1SeHyKuRYmi0M=; b=xIw1N5TGmlm/mur+FzaLxQbNcg
 YAGTN+k3ybwxEHiEFek92XT92wDEoAFdH0OF7OC0Bm0M8Sk43AZs/w9hImfNFq5NZC4hDkdJo9M10
 i9gFjGv4nDC6Le1l02dauPBUtsYE8PNJVtvERKKQfLO5n9yUAZkhTKw+ef67H+Qsk8Ww=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWf-000289-5f
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWf-0004MN-3y
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/ioapic: Improve code generation for __io_apic_{read,
 write}()
Message-Id: <E1k3MWf-0004MN-3y@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 16:44:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit dae7ea5138f72f3ac38367f50d941e8f70628119
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 14:35:16 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/ioapic: Improve code generation for __io_apic_{read,write}()
    
    The write into REGSEL prevents the optimiser from reusing the address
    calculation, forcing it to be calcualted twice.
    
    The calculation itself is quite expensive.  Pull it out into a local varaible.
    
    Bloat-o-meter reports:
      add/remove: 0/0 grow/shrink: 0/26 up/down: 0/-1527 (-1527)
    
    Also correct the register type, which is uint32_t, not int.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/include/asm-x86/io_apic.h | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h
index 72d0b2872c..ef0878b09e 100644
--- a/xen/include/asm-x86/io_apic.h
+++ b/xen/include/asm-x86/io_apic.h
@@ -14,8 +14,8 @@
  */
 
 #define IO_APIC_BASE(idx)                                               \
-    ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + (idx))         \
-                      + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
+    ((volatile uint32_t *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + (idx))    \
+                           + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
 
 #define IO_APIC_ID(idx) (mp_ioapics[idx].mpc_apicid)
 
@@ -135,8 +135,10 @@ unsigned int io_apic_gsi_base(unsigned int apic);
 
 static inline unsigned int __io_apic_read(unsigned int apic, unsigned int reg)
 {
-    *IO_APIC_BASE(apic) = reg;
-    return *(IO_APIC_BASE(apic) + 4);
+    volatile uint32_t *regs = IO_APIC_BASE(apic);
+
+    regs[0] = reg;
+    return regs[4];
 }
 
 static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
@@ -148,8 +150,10 @@ static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
 
 static inline void __io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
 {
-    *IO_APIC_BASE(apic) = reg;
-    *(IO_APIC_BASE(apic) + 4) = value;
+    volatile uint32_t *regs = IO_APIC_BASE(apic);
+
+    regs[0] = reg;
+    regs[4] = value;
 }
 
 static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 05 16:44:38 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 05 Aug 2020 16:44:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k3MWs-0000qo-6C; Wed, 05 Aug 2020 16:44:38 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jaLs=BP=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k3MWq-0000qX-KR
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:36 +0000
X-Inumbo-ID: 0ec690c6-0c80-4626-87ad-716267476d4f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 0ec690c6-0c80-4626-87ad-716267476d4f;
 Wed, 05 Aug 2020 16:44:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=5vUd/LEXbzuKeFLpF27CPA8QO3uq4z5/hHj66KI8SbI=; b=6kT6i5ifFHkWCu/zt5bfaSxnCu
 Lw6EPL7b58iLaNiRJa9059tefTrDGFfExQuPdLRqTs8t/jh2KMd1aghBTZ8v5A9Bila0Xvs02dDR0
 rpGDjusytiNurWWOafkcih6kiux29b0pMKg+yn/rmBin5ooIyL/kq6UXvnfNtGLL0nfU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWp-00028o-8i
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k3MWp-0004Mz-7r
 for xen-changelog@lists.xenproject.org; Wed, 05 Aug 2020 16:44:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/tsc: Fix diagnostics for TSC frequency
Message-Id: <E1k3MWp-0004Mz-7r@xenbits.xenproject.org>
Date: Wed, 05 Aug 2020 16:44:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b2bc1e714462c6cc222e3bbc38d87b039b4fa405
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 14:56:11 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/tsc: Fix diagnostics for TSC frequency
    
    A Gemini Lake platform prints:
    
      (XEN) CPU0: TSC: 19200000MHz * 279 / 3 = 1785600000MHz
      (XEN) CPU0: 800..1800 MHz
    
    during boot.  The units on the first line are Hz, not MHz, so correct that and
    add a space for clarity.
    
    Also, for the min/max line, use three dots instead of two and add more spaces
    so that the line can't be mistaken for being a double decimal point typo.
    
    Boot now reads:
    
      (XEN) CPU0: TSC: 19200000 Hz * 279 / 3 = 1785600000 Hz
      (XEN) CPU0: 800 ... 1800 MHz
    
    Extend these changes to the other TSC diagnostics.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/amd.c   |  4 ++--
 xen/arch/x86/cpu/intel.c | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 0cc6853c42..8bc51bec10 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -624,10 +624,10 @@ void amd_log_freq(const struct cpuinfo_x86 *c)
 	if (idx && idx < h &&
 	    !rdmsr_safe(0xC0010064 + idx, val) && (val >> 63) &&
 	    !rdmsr_safe(0xC0010064, hi) && (hi >> 63))
-		printk("CPU%u: %lu (%lu..%lu) MHz\n",
+		printk("CPU%u: %lu (%lu ... %lu) MHz\n",
 		       smp_processor_id(), FREQ(val), FREQ(lo), FREQ(hi));
 	else if (h && !rdmsr_safe(0xC0010064, hi) && (hi >> 63))
-		printk("CPU%u: %lu..%lu MHz\n",
+		printk("CPU%u: %lu ... %lu MHz\n",
 		       smp_processor_id(), FREQ(lo), FREQ(hi));
 	else
 		printk("CPU%u: %lu MHz\n", smp_processor_id(), FREQ(lo));
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 69e99bb358..37439071d9 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -396,14 +396,14 @@ static void intel_log_freq(const struct cpuinfo_x86 *c)
 
             val *= ebx;
             do_div(val, eax);
-            printk("CPU%u: TSC: %uMHz * %u / %u = %LuMHz\n",
+            printk("CPU%u: TSC: %u Hz * %u / %u = %Lu Hz\n",
                    smp_processor_id(), ecx, ebx, eax, val);
         }
         else if ( ecx | eax | ebx )
         {
             printk("CPU%u: TSC:", smp_processor_id());
             if ( ecx )
-                printk(" core: %uMHz", ecx);
+                printk(" core: %u Hz", ecx);
             if ( ebx && eax )
                 printk(" ratio: %u / %u", ebx, eax);
             printk("\n");
@@ -417,11 +417,11 @@ static void intel_log_freq(const struct cpuinfo_x86 *c)
         {
             printk("CPU%u:", smp_processor_id());
             if ( ecx )
-                printk(" bus: %uMHz", ecx);
+                printk(" bus: %u MHz", ecx);
             if ( eax )
-                printk(" base: %uMHz", eax);
+                printk(" base: %u MHz", eax);
             if ( ebx )
-                printk(" max: %uMHz", ebx);
+                printk(" max: %u MHz", ebx);
             printk("\n");
         }
     }
@@ -446,7 +446,7 @@ static void intel_log_freq(const struct cpuinfo_x86 *c)
 
         printk("CPU%u: ", smp_processor_id());
         if ( min_ratio )
-            printk("%u..", (factor * min_ratio + 50) / 100);
+            printk("%u ... ", (factor * min_ratio + 50) / 100);
         printk("%u MHz\n", (factor * max_ratio + 50) / 100);
     }
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 11:22:12 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 11:22:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k40Rr-0006IC-PD; Fri, 07 Aug 2020 11:22:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k40Rq-0006I7-Cs
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:06 +0000
X-Inumbo-ID: 4f4fd697-dc1c-41b1-bbdb-61dca6017177
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 4f4fd697-dc1c-41b1-bbdb-61dca6017177;
 Fri, 07 Aug 2020 11:22:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=HOJOgbz3VoOEdOImkLT3JmPT767TGENq1CAupy1dyo8=; b=rNyrp3LZVZZEGWoWFYc77Qh3Vd
 OSp9LjLQzUGm299zMv8hDjZ/CJGB4CXaMBIMHQ2b/MqMJ+BcMRiG3tcPy1J50nVmGxEYVZT7m184J
 LzItNQUz9q4GX22i0m82bv5hAueNmks9k+fXp+tYAIq6aZy7falXDH8B/f9WsV/pM3/4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k40Ro-0006c8-Tc
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k40Ro-00019P-Ra
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] build: work around bash issue
Message-Id: <E1k40Ro-00019P-Ra@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 11:22:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 5132a0a37190b73c99dbbecf48dc4fb214feaf14
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:12:00 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 13:12:00 2020 +0200

    build: work around bash issue
    
    Older bash (observed with 3.2.57(2)) fails to honor "set -e" for certain
    built-in commands ("while" here), despite the command's status correctly
    being non-zero. The subsequent objcopy invocation now being separated by
    a semicolon results in no failure. Insert an explicit "exit" (replacing
    ; by && ought to be another possible workaround).
    
    Fixes: e321576f4047 ("xen/build: start using if_changed")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index ebfd40caff..62e9fabe7a 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -193,7 +193,7 @@ define cmd_obj_init_o
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
             exit $$(expr $$idx + 1);; \
         esac; \
-    done; \
+    done || exit $$?; \
     $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@
 endef
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 11:22:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 11:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k40S1-0006J0-Qn; Fri, 07 Aug 2020 11:22:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k40S0-0006Is-FS
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:16 +0000
X-Inumbo-ID: f5da9e48-b63b-4a7a-960b-334606258cd2
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id f5da9e48-b63b-4a7a-960b-334606258cd2;
 Fri, 07 Aug 2020 11:22:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=QLQM3vmFxGdT95MMhRODXBKg2pJxYul8Lq77PRMNJFU=; b=FYfx7z3xG/eBJzABW1EQlJv2KC
 +sSyZHY3YFH2r6JSHPI8+8/MX2DEdLZ29vOP2iM/SgaWa1Za0looR2dYThA1svuwAcE3pLxhwlk66
 xcDyQV5Y0vhKfnyhITXL3ati0Fea6KbS1F+I3F/I2syeJX5USZLmvflLZr/ghZ860N4w=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k40Rz-0006cG-5V
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k40Rz-0001A2-4Y
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] build: correctly report non-empty section sizes upon .o
 -> .init.o conversion
Message-Id: <E1k40Rz-0001A2-4Y@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 11:22:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d87c5166daee1f9e1570961b2d204a4a2570acf5
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:12:21 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 13:12:21 2020 +0200

    build: correctly report non-empty section sizes upon .o -> .init.o conversion
    
    The originally used sed expression converted not just multiple leading
    zeroes (as intended), but also trailing ones, rendering the error
    message somewhat confusing. Collapse zeroes in just the one place where
    we need them collapsed, and leave objdump's output as is for all other
    purposes.
    
    Fixes: 48115d14743e ("Move more kernel decompression bits to .init.* sections")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/Rules.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 62e9fabe7a..e90a03d116 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -185,11 +185,11 @@ cmd_cc_o_S = $(CC) $(a_flags) -c $< -o $@
 
 quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
-    $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name sz rest; do \
+    $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
         .*.local) ;; \
         .text|.text.*|.data|.data.*|.bss) \
-            test $$sz != 0 || continue; \
+            test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
             exit $$(expr $$idx + 1);; \
         esac; \
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 11:22:26 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 11:22:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k40SA-0006K4-SP; Fri, 07 Aug 2020 11:22:26 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k40SA-0006Jx-8S
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:26 +0000
X-Inumbo-ID: 68ea7574-2b6d-4c9f-89c5-731c33670c04
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 68ea7574-2b6d-4c9f-89c5-731c33670c04;
 Fri, 07 Aug 2020 11:22:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=dDymDzwBfd2EdpxgL3htGY+yhxcqI44EFLd8PUv6nM4=; b=wFH/jgB/VdUvIIvL2ugBmoYmO+
 sDY69y4HPfbULgkNw4AYCUNHicu6Iq2mVh8rCo0N6Le1Awg0+59m5YDUFsjC88j7iw8t7Ph4+CY8K
 MhLAQBLU8zP/3/8K9oXS1ICZL4HcUwEkM58KSALp4vvSjOoBT9t3g8DBy5Nm87y6BdYg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k40S9-0006cQ-9c
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k40S9-0001Cc-7g
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 11:22:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: slightly re-arrange 32-bit handling in
 dom0_construct_pv()
Message-Id: <E1k40S9-0001Cc-7g@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 11:22:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 16dcc135e89663628ee2eaf2d02991fc9ce954bf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:14:02 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 13:14:02 2020 +0200

    x86: slightly re-arrange 32-bit handling in dom0_construct_pv()
    
    Add #ifdef-s (the 2nd one will be needed in particular, to guard the
    uses of m2p_compat_vstart and HYPERVISOR_COMPAT_VIRT_START()) and fold
    duplicate uses of elf_32bit().
    
    Also adjust what gets logged: Avoid "compat32" when support isn't built
    in, and don't assume ELF class <> ELFCLASS64 means ELFCLASS32.
    
    While doing this, in code getting touched anyway:
    - use ROUNDUP() instead of open-coding it,
    - drop a stale (dead) BUG_ON(),
    - replace panic() by printk() plus error return, for being consistent
      with other code.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/dom0_build.c | 73 ++++++++++++++++++++++++++------------------
 1 file changed, 44 insertions(+), 29 deletions(-)

diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 3522eb0114..171519e285 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -300,7 +300,6 @@ int __init dom0_construct_pv(struct domain *d,
     struct page_info *page = NULL;
     start_info_t *si;
     struct vcpu *v = d->vcpu[0];
-    unsigned long long value;
     void *image_base = bootstrap_map(image);
     unsigned long image_len = image->mod_end;
     void *image_start = image_base + image_headroom;
@@ -357,27 +356,36 @@ int __init dom0_construct_pv(struct domain *d,
         goto out;
 
     /* compatibility check */
+    printk(" Xen  kernel: 64-bit, lsb%s\n",
+           IS_ENABLED(CONFIG_PV32) ? ", compat32" : "");
     compatible = 0;
     machine = elf_uval(&elf, elf.ehdr, e_machine);
-    printk(" Xen  kernel: 64-bit, lsb, compat32\n");
-    if ( elf_32bit(&elf) && parms.pae == XEN_PAE_BIMODAL )
-        parms.pae = XEN_PAE_EXTCR3;
-    if ( elf_32bit(&elf) && parms.pae && machine == EM_386 )
+
+#ifdef CONFIG_PV32
+    if ( elf_32bit(&elf) )
     {
-        if ( unlikely(rc = switch_compat(d)) )
+        if ( parms.pae == XEN_PAE_BIMODAL )
+            parms.pae = XEN_PAE_EXTCR3;
+        if ( parms.pae && machine == EM_386 )
         {
-            printk("Dom0 failed to switch to compat: %d\n", rc);
-            return rc;
-        }
+            if ( unlikely(rc = switch_compat(d)) )
+            {
+                printk("Dom0 failed to switch to compat: %d\n", rc);
+                return rc;
+            }
 
-        compatible = 1;
+            compatible = 1;
+        }
     }
-    if (elf_64bit(&elf) && machine == EM_X86_64)
+#endif
+
+    if ( elf_64bit(&elf) && machine == EM_X86_64 )
         compatible = 1;
-    printk(" Dom0 kernel: %s%s, %s, paddr %#" PRIx64 " -> %#" PRIx64 "\n",
-           elf_64bit(&elf) ? "64-bit" : "32-bit",
-           parms.pae       ? ", PAE"  : "",
-           elf_msb(&elf)   ? "msb"    : "lsb",
+
+    printk(" Dom0 kernel: %s-bit%s, %s, paddr %#" PRIx64 " -> %#" PRIx64 "\n",
+           elf_64bit(&elf) ? "64" : elf_32bit(&elf) ? "32" : "??",
+           parms.pae       ? ", PAE" : "",
+           elf_msb(&elf)   ? "msb"   : "lsb",
            elf.pstart, elf.pend);
     if ( elf.bsd_symtab_pstart )
         printk(" Dom0 symbol map %#" PRIx64 " -> %#" PRIx64 "\n",
@@ -405,23 +413,30 @@ int __init dom0_construct_pv(struct domain *d,
     if ( parms.pae == XEN_PAE_EXTCR3 )
             set_bit(VMASST_TYPE_pae_extended_cr3, &d->vm_assist);
 
-    if ( !pv_shim && (parms.virt_hv_start_low != UNSET_ADDR) &&
-         elf_32bit(&elf) )
+#ifdef CONFIG_PV32
+    if ( elf_32bit(&elf) )
     {
-        unsigned long mask = (1UL << L2_PAGETABLE_SHIFT) - 1;
-        value = (parms.virt_hv_start_low + mask) & ~mask;
-        BUG_ON(!is_pv_32bit_domain(d));
-        if ( value > __HYPERVISOR_COMPAT_VIRT_START )
-            panic("Domain 0 expects too high a hypervisor start address\n");
-        HYPERVISOR_COMPAT_VIRT_START(d) =
-            max_t(unsigned int, m2p_compat_vstart, value);
-    }
+        if ( !pv_shim && (parms.virt_hv_start_low != UNSET_ADDR) )
+        {
+            unsigned long value = ROUNDUP(parms.virt_hv_start_low,
+                                          1UL << L2_PAGETABLE_SHIFT);
 
-    if ( (parms.p2m_base != UNSET_ADDR) && elf_32bit(&elf) )
-    {
-        printk(XENLOG_WARNING "P2M table base ignored\n");
-        parms.p2m_base = UNSET_ADDR;
+            if ( value > __HYPERVISOR_COMPAT_VIRT_START )
+            {
+                printk("Dom0 expects too high a hypervisor start address\n");
+                return -ERANGE;
+            }
+            HYPERVISOR_COMPAT_VIRT_START(d) =
+                max_t(unsigned int, m2p_compat_vstart, value);
+        }
+
+        if ( parms.p2m_base != UNSET_ADDR )
+        {
+            printk(XENLOG_WARNING "P2M table base ignored\n");
+            parms.p2m_base = UNSET_ADDR;
+        }
     }
+#endif
 
     /*
      * Why do we need this? The number of page-table frames depends on the
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:22:12 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:22:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44C7-0003eM-4e; Fri, 07 Aug 2020 15:22:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44C6-0003eH-30
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:06 +0000
X-Inumbo-ID: 8832746a-0933-40b0-92c3-3b98d60235a0
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 8832746a-0933-40b0-92c3-3b98d60235a0;
 Fri, 07 Aug 2020 15:22:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=87WSC0R7aJmNyXFWekKyHkZvcrAlAUnCy4MnlVUUeMg=; b=Xhdx378eCXeP7rhVbda2/z938u
 w2xDedKENDTmFo0KW4OckkZS5Oin17QMqc6JkxfOc4r1BEXT0C7EAEYuoNGClsEMFOpEwUd9E6trH
 krFwAMNQA149ZhOyyH6Ex2lhvBnaNqC6bQovE6ZlPzFbzamV9e4NlqCtZj+ilZcSzgaA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44C4-0003a7-Un
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44C4-0006Rs-T4
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.14] update Xen version to 4.14.1-pre
Message-Id: <E1k44C4-0006Rs-T4@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:22:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit f836759a7bbf095dc5b1f31a069296bcfd694b82
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:07:56 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:07:56 2020 +0200

    update Xen version to 4.14.1-pre
---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index 4a45e716a8..110ea0f1a8 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 14
-export XEN_EXTRAVERSION ?= .0$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .1-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:22:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44CH-0003eu-6I; Fri, 07 Aug 2020 15:22:17 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44CG-0003en-A0
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:16 +0000
X-Inumbo-ID: 026f6cf7-ddd8-4f9c-8577-5872d0f48f9e
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 026f6cf7-ddd8-4f9c-8577-5872d0f48f9e;
 Fri, 07 Aug 2020 15:22:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=8SOyZrOiFIQXU13vJJYf24OEw1Wi8M+kIyfKOHyxGcU=; b=qja1s8KDDxM0SdFeDzjFkxjfM5
 E9/POy5fvF0WK+FS5PMKGtTkikNJtVaJeklvD06rz9STNfezJwH/csqYyQImAF9KJMzayZ9FC9Gkz
 NyIaAJzoymeF3dhB3I6bXz6/+nztFLCxiiODodrl6mGPmNcElfryaQbistOilfOhADmY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44CF-0003aC-29
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44CF-0006SY-0j
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.14] x86/S3: put data segment registers into known
 state upon resume
Message-Id: <E1k44CF-0006SY-0j@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:22:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b8c3e33a4fe4374f633b4369200731662ff1f750
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:09:19 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:09:19 2020 +0200

    x86/S3: put data segment registers into known state upon resume
    
    wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
    wakeup_start did set it to, and %gs at whatever BIOS did load into it.
    All of this may end up confusing the first load_segments() to run on
    the BSP after resume, in particular allowing a non-nul selector value
    to be left in %fs.
    
    Alongside %ss, also put all other data segment registers into the same
    state that the boot and CPU bringup paths put them in.
    
    Reported-by: M. Vefa Bicakci <m.v.b@runbox.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 55f8c389d4348cc517946fdcb10794112458e81e
    master date: 2020-07-24 10:17:26 +0200
---
 xen/arch/x86/acpi/wakeup_prot.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index dcc7e2327d..a2c41c4f3f 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -49,6 +49,10 @@ ENTRY(s3_resume)
         mov     %rax, %cr0
 
         mov     $__HYPERVISOR_DS64, %eax
+        mov     %eax, %ds
+        mov     %eax, %es
+        mov     %eax, %fs
+        mov     %eax, %gs
         mov     %eax, %ss
         mov     saved_rsp(%rip), %rsp
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:22:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:22:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44CR-0003g8-7u; Fri, 07 Aug 2020 15:22:27 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44CQ-0003fu-0W
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:26 +0000
X-Inumbo-ID: 6dd833a4-0f38-4c86-86c9-adae58b76e87
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 6dd833a4-0f38-4c86-86c9-adae58b76e87;
 Fri, 07 Aug 2020 15:22:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=MSvCFlQAKrGvvchke42QznRKrpq96xjWLwKx6396MA0=; b=Xi+LFuawNTP5lt4m0iJ8RE3qcQ
 Tt9YIqrjJed1SRpCQM6Y0RCUUNEl3oPlQcMkFyJu4F9hrJeuVs4N1qEZgMuFDX/vUZB1JDgukupPU
 3nK8M5rgYyXacN7b+dMZvvfrU2xHM+Efg6o+zAUgHqy7MT2QN6riP3tmpLcnfjkw0260=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44CP-0003aP-5D
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44CP-0006VC-4H
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.14] x86/cpuid: Fix APIC bit clearing
Message-Id: <E1k44CP-0006VC-4H@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:22:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a5dab0a2453da1e15fd49e6a7fa9138e333ba9af
Author:     Fam Zheng <famzheng@amazon.com>
AuthorDate: Fri Aug 7 17:09:51 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:09:51 2020 +0200

    x86/cpuid: Fix APIC bit clearing
    
    The bug is obvious here, other places in this function used
    "cpufeat_mask" correctly.
    
    Fixed: b648feff8ea2 ("xen/x86: Improvements to in-hypervisor cpuid sanity checks")
    Signed-off-by: Fam Zheng <famzheng@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 64219fa179c3e48adad12bfce3f6b3f1596cccbf
    master date: 2020-07-29 19:03:41 +0100
---
 xen/arch/x86/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 6a4a787b68..63a03ef1e5 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -1057,7 +1057,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         {
             /* Fast-forward MSR_APIC_BASE.EN. */
             if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
-                res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+                res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
 
             /*
              * PSE36 is not supported in shadow mode.  This bit should be
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:22:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:22:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Cb-0003hH-9S; Fri, 07 Aug 2020 15:22:37 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Ca-0003h5-Hl
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:36 +0000
X-Inumbo-ID: 784a02c6-e53c-444a-ae66-7130e384761b
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 784a02c6-e53c-444a-ae66-7130e384761b;
 Fri, 07 Aug 2020 15:22:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=2j6MpFc3EpJ0Zxqqzs9fwcic3WGOpkdf7hQYTjn1OQ8=; b=rVDjiIqucjixfATPaX+GBjXI8j
 FdDZsCMfiGrG3sA0Oonp0jVJOVx+iF1gELCIC+SjmNPzo+ce82ZlqpDvBvUdHfpl/tJP3hlFXDOpb
 iKPhUJB1QuGaLeTndyIH8tAtnU8G5fSKNho8XscNJd/jOHwCz+n7A9eDdgRIDglhCFOA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44CZ-0003ad-8n
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44CZ-0006Vk-80
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.14] x86emul: replace UB shifts
Message-Id: <E1k44CZ-0006Vk-80@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:22:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit afed8e4365f0dec26a040ea0670b654e00d8c869
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:10:34 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:10:34 2020 +0200

    x86emul: replace UB shifts
    
    Displacement values can be negative, hence we shouldn't left-shift them.
    Or else we get
    
    (XEN) UBSAN: Undefined behaviour in x86_emulate/x86_emulate.c:3482:55
    (XEN) left shift of negative value -2
    
    While auditing shifts, I noticed a pair of missing parentheses, which
    also get added right here.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    
    x86: comment update after "drop high compat r/o M2P table address range"
    
    Commit 5af040ef8b57 clearly should also have updated the comment, not
    just the #define-s.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b6a907f8c83d37886d0523f1aeff61b98e133498
    master date: 2020-07-31 17:41:58 +0200
    master commit: 2e98d0b1d09e99e3d1287cb13f42b604ebc3c29a
    master date: 2020-08-05 10:21:22 +0200
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 84bb8e0c9b..ee6341b1b7 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3368,7 +3368,7 @@ x86_decode(
         {
             generate_exception_if(d & vSIB, EXC_UD);
             modrm_rm |= ((rex_prefix & 1) << 3) |
-                        (evex_encoded() && !evex.x) << 4;
+                        ((evex_encoded() && !evex.x) << 4);
             ea.type = OP_REG;
         }
         else if ( ad_bytes == 2 )
@@ -3415,7 +3415,7 @@ x86_decode(
                     ea.mem.off = insn_fetch_type(int16_t);
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int16_t);
@@ -3477,7 +3477,7 @@ x86_decode(
                 pc_rel = mode_64bit();
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int32_t);
@@ -9727,7 +9727,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
@@ -9849,7 +9849,8 @@ x86_emulate(
                 continue;
 
             rc = ops->read(ea.mem.seg,
-                           truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                           truncate_ea(ea.mem.off +
+                                       idx * (1 << state->sib_scale)),
                            (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -10020,7 +10021,8 @@ x86_emulate(
                 continue;
 
             rc = ops->write(ea.mem.seg,
-                            truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                            truncate_ea(ea.mem.off +
+                                        idx * (1 << state->sib_scale)),
                             (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -10138,7 +10140,7 @@ x86_emulate(
                   ? ops->write
                   : ops->read)(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                NULL, 0, ctxt);
             if ( rc == X86EMUL_EXCEPTION )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:22:47 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:22:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Cl-0003iK-B6; Fri, 07 Aug 2020 15:22:47 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Ck-0003iC-I3
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:46 +0000
X-Inumbo-ID: cf527447-4113-4696-84a5-fee5b96e2ef4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id cf527447-4113-4696-84a5-fee5b96e2ef4;
 Fri, 07 Aug 2020 15:22:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=uruTCKEF+pDHCOc1J+QWl/utsYM3zpM4UAawyTDglJc=; b=wEd0p/frXmeYS/fpuuiA4xtwXh
 iFFyDGl3BlKqcWZqGrUEmnYDwEfV6V5yyDpGY26bomz1tBt6Nnfim/5rsFvcMp5M64JyopmaEtWvE
 DkSPTpUWgqX+TlogkV4G16p7x2gAz4QMOZDyr6v8PxBcEC2ofRw0CkFKgrEm8ZY4o+80=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Cj-0003ak-CW
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Cj-0006Wi-As
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:45 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.14] x86/hvm: set 'ipat' in EPT for special pages
Message-Id: <E1k44Cj-0006Wi-As@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:22:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 864d5701ec5dc5af028d415e86bf5cf6aaed3a7c
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Aug 7 17:11:10 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:11:10 2020 +0200

    x86/hvm: set 'ipat' in EPT for special pages
    
    All non-MMIO ranges (i.e those not mapping real device MMIO regions) that
    map valid MFNs are normally marked MTRR_TYPE_WRBACK and 'ipat' is set. Hence
    when PV drivers running in a guest populate the BAR space of the Xen Platform
    PCI Device with pages such as the Shared Info page or Grant Table pages,
    accesses to these pages will be cachable.
    
    However, should IOMMU mappings be enabled be enabled for the guest then these
    accesses become uncachable. This has a substantial negative effect on I/O
    throughput of PV devices. Arguably PV drivers should bot be using BAR space to
    host the Shared Info and Grant Table pages but it is currently commonplace for
    them to do this and so this problem needs mitigation. Hence this patch makes
    sure the 'ipat' bit is set for any special page regardless of where in GFN
    space it is mapped.
    
    NOTE: Clearly this mitigation only applies to Intel EPT. It is not obvious
          that there is any similar mitigation possible for AMD NPT. Downstreams
          such as Citrix XenServer have been carrying a patch similar to this for
          several releases though.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: ca24b2ffdbd9a25b2d313a547ccbe97baf3e5a8d
    master date: 2020-07-31 17:42:47 +0200
---
 xen/arch/x86/hvm/mtrr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 511c3be1c8..2bd64e8025 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -794,6 +794,7 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
 {
     int gmtrr_mtype, hmtrr_mtype;
     struct vcpu *v = current;
+    unsigned long i;
 
     *ipat = 0;
 
@@ -836,6 +837,17 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
+    for ( i = 0; i < (1ul << order); i++ )
+    {
+        if ( is_special_page(mfn_to_page(mfn_add(mfn, i))) )
+        {
+            if ( order )
+                return -1;
+            *ipat = 1;
+            return MTRR_TYPE_WRBACK;
+        }
+    }
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:22:57 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:22:57 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Cv-0003jv-Cm; Fri, 07 Aug 2020 15:22:57 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Cu-0003j7-9l
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:56 +0000
X-Inumbo-ID: c936d0b9-7fac-4da7-bce7-9fb6a692ba87
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id c936d0b9-7fac-4da7-bce7-9fb6a692ba87;
 Fri, 07 Aug 2020 15:22:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=dkOKBpHHmc4fvUI3Ukp//tlQhkgDWJudkJUnqqcx6ac=; b=J+Y7grgxAy67NvlZwxtIwDxc53
 ZzVV17oEQjfT4qm2bXhxM+I47Kmjf7sdrGUCnBdeW8BnrCz3Kz/pP56hAmxJg7VquQaD4XTHngTdo
 71cn06EgcrrYsudYjUiPcf4UGsbG8s4XbGPIP0GEXXewWFLTsSNOiqABaUxpjN3Wt5cM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Ct-0003bd-Fv
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:55 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Ct-0006XR-Ec
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:22:55 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.14] x86: comment update after "drop high compat r/o
 M2P table address range"
Message-Id: <E1k44Ct-0006XR-Ec@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:22:55 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c3a0fc22af90ef28e68b116c6a49d9cec57f71cf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:11:44 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:11:44 2020 +0200

    x86: comment update after "drop high compat r/o M2P table address range"
    
    Commit 5af040ef8b57 clearly should also have updated the comment, not
    just the #define-s.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 2e98d0b1d09e99e3d1287cb13f42b604ebc3c29a
    master date: 2020-08-05 10:21:22 +0200
---
 xen/include/asm-x86/config.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 2ba234383d..665e9cc31d 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -144,18 +144,16 @@ extern unsigned char boot_edid_info[128];
  *  0xffff82d000000000 - 0xffff82d03fffffff [1GB,   2^30 bytes, PML4:261]
  *    Compatibility machine-to-phys translation table.
  *  0xffff82d040000000 - 0xffff82d07fffffff [1GB,   2^30 bytes, PML4:261]
- *    High read-only compatibility machine-to-phys translation table.
- *  0xffff82d080000000 - 0xffff82d0bfffffff [1GB,   2^30 bytes, PML4:261]
  *    Xen text, static data, bss.
 #ifndef CONFIG_BIGMEM
- *  0xffff82d0c0000000 - 0xffff82dfffffffff [61GB,              PML4:261]
+ *  0xffff82d080000000 - 0xffff82dfffffffff [62GB,              PML4:261]
  *    Reserved for future use.
  *  0xffff82e000000000 - 0xffff82ffffffffff [128GB, 2^37 bytes, PML4:261]
  *    Page-frame information array.
  *  0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271]
  *    1:1 direct mapping of all physical memory.
 #else
- *  0xffff82d0c0000000 - 0xffff82ffffffffff [189GB,             PML4:261]
+ *  0xffff82d080000000 - 0xffff82ffffffffff [190GB,             PML4:261]
  *    Reserved for future use.
  *  0xffff830000000000 - 0xffff847fffffffff [1.5TB, 3*2^39 bytes, PML4:262-264]
  *    Page-frame information array.
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.14


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:33:10 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:33:10 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Mm-0004aV-67; Fri, 07 Aug 2020 15:33:08 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Ml-0004aQ-2T
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:07 +0000
X-Inumbo-ID: 0c519186-2089-43ab-a7f7-a44f2f72b822
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 0c519186-2089-43ab-a7f7-a44f2f72b822;
 Fri, 07 Aug 2020 15:33:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Qfxfp3VvzZ+lu6WBJczXK1d272QXzZzHgIU1osker0s=; b=kzmEWHyVJ4H0LFcxhnqfxyZWfA
 8UOTU84o1lCII/uogg6ENf1HcR/26KKn9QabgjVpl4X1mRaqCJByVag5nHrrEz82wvaZRNLWqiXHe
 7oN+bV99ZMm4vHRwOS+sKPbCjKdhFGvdaXFV2ZJ6lFqQzouFUXPCZ12hXV+9Egt1eTTk=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Mi-0003p0-Sn
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Mi-0007AT-Qw
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead
 of P2M_UNSHARE
Message-Id: <E1k44Mi-0007AT-Qw@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:33:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ddb6fd3f9c2b238cd9844547996ca300c0e303a3
Author:     Tamas K Lengyel <tamas.lengyel@intel.com>
AuthorDate: Fri Aug 7 17:15:37 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:15:37 2020 +0200

    x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead of P2M_UNSHARE
    
    While forking VMs running a small RTOS system (Zephyr) a Xen crash has been
    observed due to a mm-lock order violation while copying the HVM CPU context
    from the parent. This issue has been identified to be due to
    hap_update_paging_modes first getting a lock on the gfn using get_gfn. This
    call also creates a shared entry in the fork's memory map for the cr3 gfn. The
    function later calls hap_update_cr3 while holding the paging_lock, which
    results in the lock-order violation in vmx_load_pdptrs when it tries to unshare
    the above entry when it grabs the page with the P2M_UNSHARE flag set.
    
    Since vmx_load_pdptrs only reads from the page its usage of P2M_UNSHARE was
    unnecessary to start with. Using P2M_ALLOC is the appropriate flag to ensure
    the p2m is properly populated.
    
    Note that the lock order violation is avoided because before the paging_lock is
    taken a lookup is performed with P2M_ALLOC that forks the page, thus the second
    lookup in vmx_load_pdptrs succeeds without having to perform the fork. We keep
    P2M_ALLOC in vmx_load_pdptrs because there are code-paths leading up to it
    which don't take the paging_lock and that have no previous lookup. Currently no
    other code-path exists leading there with the paging_lock taken, thus no
    further adjustments are necessary.
    
    Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
    master commit: b67e859d0823f5b450e29379af9142d44a3ea370
    master date: 2020-06-19 15:24:55 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 5c47d10384..795adbee8f 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1320,7 +1320,7 @@ static void vmx_load_pdptrs(struct vcpu *v)
     if ( (cr3 & 0x1fUL) && !hvm_pcid_enabled(v) )
         goto crash;
 
-    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_UNSHARE);
+    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_ALLOC);
     if ( !page )
     {
         /* Ideally you don't want to crash but rather go into a wait 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:33:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:33:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Mv-0004bJ-90; Fri, 07 Aug 2020 15:33:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Mu-0004bB-6g
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:16 +0000
X-Inumbo-ID: ef3e085c-2517-4cef-9bf8-4ed87cfa7148
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ef3e085c-2517-4cef-9bf8-4ed87cfa7148;
 Fri, 07 Aug 2020 15:33:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Gjt/b115sYrFGBVlXJQItsSJFrBX614lWnRHTGomGCQ=; b=3bGWuXtHphuv9AfZYA16ZFqlAm
 oYwB2cNWsPJkOCe/TaP8Uk6dXtNUDbKlRbNUAYJfPtx3zTKW7J3Mt8Z2j0QjKinlE8I+8UE+8MmWM
 J13iIxUo4aPQ71vaJFcHoD6Ew9IORoZhXCtLhLmyGPgRhq7qvJUOimbyizuSmihSoJsA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Ms-0003p6-Vq
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Ms-0007Bb-V8
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86/acpi: use FADT flags to determine the PMTMR
 width
Message-Id: <E1k44Ms-0007Bb-V8@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:33:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 665f5c1271843db8886a5b91c41d4cc3294ca279
Author:     Grzegorz Uriasz <gorbak25@gmail.com>
AuthorDate: Fri Aug 7 17:16:48 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:16:48 2020 +0200

    x86/acpi: use FADT flags to determine the PMTMR width
    
    On some computers the bit width of the PM Timer as reported
    by ACPI is 32 bits when in fact the FADT flags report correctly
    that the timer is 24 bits wide. On affected machines such as the
    ASUS FX504GM and never gaming laptops this results in the inability
    to resume the machine from suspend. Without this patch suspend is
    broken on affected machines and even if a machine manages to resume
    correctly then the kernel time and xen timers are trashed.
    
    Signed-off-by: Grzegorz Uriasz <gorbak25@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: f325d2477eef8229c47d97031d314629521c70ab
    master date: 2020-06-25 09:11:09 +0200
---
 xen/arch/x86/acpi/boot.c    | 19 +++++++++++++++----
 xen/arch/x86/time.c         | 12 ++++--------
 xen/include/acpi/acmacros.h |  8 ++++++++
 3 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 15542a9bdf..0b0a8f62e4 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -473,10 +473,17 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
 
 #ifdef CONFIG_X86_PM_TIMER
 	/* detect the location of the ACPI PM Timer */
-	if (fadt->header.revision >= FADT2_REVISION_ID) {
+	if (fadt->header.revision >= FADT2_REVISION_ID &&
+	    fadt->xpm_timer_block.space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
 		/* FADT rev. 2 */
-		if (fadt->xpm_timer_block.space_id ==
-		    ACPI_ADR_SPACE_SYSTEM_IO) {
+		if (fadt->xpm_timer_block.access_width != 0 &&
+		    ACPI_ACCESS_BIT_WIDTH(fadt->xpm_timer_block.access_width) != 32)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid access width(%u)\n",
+			       fadt->xpm_timer_block.access_width);
+		else if (fadt->xpm_timer_block.bit_offset != 0)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid bit offset(%u)\n",
+			       fadt->xpm_timer_block.bit_offset);
+		else {
 			pmtmr_ioport = fadt->xpm_timer_block.address;
 			pmtmr_width = fadt->xpm_timer_block.bit_width;
 		}
@@ -488,8 +495,12 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
  	 */
 	if (!pmtmr_ioport) {
 		pmtmr_ioport = fadt->pm_timer_block;
-		pmtmr_width = fadt->pm_timer_length == 4 ? 24 : 0;
+		pmtmr_width = fadt->pm_timer_length == 4 ? 32 : 0;
 	}
+	if (pmtmr_width < 32 && (fadt->flags & ACPI_FADT_32BIT_TIMER))
+		printk(KERN_WARNING PREFIX "PM-Timer is too short\n");
+	if (pmtmr_width > 24 && !(fadt->flags & ACPI_FADT_32BIT_TIMER))
+		pmtmr_width = 24;
 	if (pmtmr_ioport)
 		printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x (%u bits)\n",
 		       pmtmr_ioport, pmtmr_width);
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 97ae10e46f..5893292424 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -453,16 +453,13 @@ static u64 read_pmtimer_count(void)
 static s64 __init init_pmtimer(struct platform_timesource *pts)
 {
     u64 start;
-    u32 count, target, mask = 0xffffff;
+    u32 count, target, mask;
 
-    if ( !pmtmr_ioport || !pmtmr_width )
+    if ( !pmtmr_ioport || (pmtmr_width != 24 && pmtmr_width != 32) )
         return 0;
 
-    if ( pmtmr_width == 32 )
-    {
-        pts->counter_bits = 32;
-        mask = 0xffffffff;
-    }
+    pts->counter_bits = pmtmr_width;
+    mask = 0xffffffff >> (32 - pmtmr_width);
 
     count = inl(pmtmr_ioport) & mask;
     start = rdtsc_ordered();
@@ -482,7 +479,6 @@ static struct platform_timesource __initdata plt_pmtimer =
     .name = "ACPI PM Timer",
     .frequency = ACPI_PM_FREQUENCY,
     .read_counter = read_pmtimer_count,
-    .counter_bits = 24,
     .init = init_pmtimer
 };
 
diff --git a/xen/include/acpi/acmacros.h b/xen/include/acpi/acmacros.h
index 6765535053..86c503c20f 100644
--- a/xen/include/acpi/acmacros.h
+++ b/xen/include/acpi/acmacros.h
@@ -121,6 +121,14 @@
 #define ACPI_COMPARE_NAME(a,b)          (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
 #endif
 
+/*
+ * Algorithm to obtain access bit or byte width.
+ * Can be used with access_width of struct acpi_generic_address and access_size of
+ * struct acpi_resource_generic_register.
+ */
+#define ACPI_ACCESS_BIT_WIDTH(size)     (1 << ((size) + 2))
+#define ACPI_ACCESS_BYTE_WIDTH(size)    (1 << ((size) - 1))
+
 /*
  * Macros for moving data around to/from buffers that are possibly unaligned.
  * If the hardware supports the transfer of unaligned data, just do the store.
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:33:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:33:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44N5-0004cW-Ab; Fri, 07 Aug 2020 15:33:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44N4-0004cK-0W
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:26 +0000
X-Inumbo-ID: b3581be6-fcca-4322-9701-77404253d08c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id b3581be6-fcca-4322-9701-77404253d08c;
 Fri, 07 Aug 2020 15:33:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=8AF132M3BbhQjcgphpGx8YjewUcpXMRp+rTlFQrCD+8=; b=MnOknLyzruIWSttdH8VZWX7lC2
 UutfuXjP9qjF+Rm4GXLHdzXQt4kUinSsUsUi0CGhwO2a9Z7giu8cNinbef7VyFVvDgG3y8tet7C4Z
 waq9DR7HV6kMWmd9Vd6qunvklLKZHmmTQG8+tft2wQRuLethVlm6rmNmGlV//0kh6t+4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44N3-0003pD-3N
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44N3-0007CG-1j
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86/msr: Disallow access to Processor Trace MSRs
Message-Id: <E1k44N3-0007CG-1j@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:33:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d967a2bcd349b3676374781a8b5c06cf3b43636c
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:17:38 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:17:38 2020 +0200

    x86/msr: Disallow access to Processor Trace MSRs
    
    We do not expose the feature to guests, so should disallow access to the
    respective MSRs.  For simplicity, drop the entire block of MSRs, not just the
    subset which have been specified thus far.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Wei Liu <wl@xen.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: bcdfbb70fca579baa04f212c0936b77919bdae11
    master date: 2020-06-26 16:34:02 +0100
---
 xen/arch/x86/msr.c              | 2 ++
 xen/include/asm-x86/msr-index.h | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c
index 0cded3c0ad..6cbc078d73 100644
--- a/xen/arch/x86/msr.c
+++ b/xen/arch/x86/msr.c
@@ -135,6 +135,7 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t *val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
@@ -290,6 +291,7 @@ int guest_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index 91994669e1..0eb6855614 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -182,6 +182,14 @@
 #define MSR_MCU_OPT_CTRL                    0x00000123
 #define  MCU_OPT_CTRL_RNGDS_MITG_DIS        (_AC(1, ULL) <<  0)
 
+#define MSR_RTIT_OUTPUT_BASE                0x00000560
+#define MSR_RTIT_OUTPUT_MASK                0x00000561
+#define MSR_RTIT_CTL                        0x00000570
+#define MSR_RTIT_STATUS                     0x00000571
+#define MSR_RTIT_CR3_MATCH                  0x00000572
+#define MSR_RTIT_ADDR_A(n)                 (0x00000580 + (n) * 2)
+#define MSR_RTIT_ADDR_B(n)                 (0x00000581 + (n) * 2)
+
 #define MSR_U_CET                           0x000006a0
 #define MSR_S_CET                           0x000006a2
 #define MSR_PL0_SSP                         0x000006a4
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:33:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:33:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44NF-0004da-CF; Fri, 07 Aug 2020 15:33:37 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44NE-0004dO-8G
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:36 +0000
X-Inumbo-ID: 092c8ad8-d747-4df1-b43d-6d27463d0dde
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 092c8ad8-d747-4df1-b43d-6d27463d0dde;
 Fri, 07 Aug 2020 15:33:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=bKu8pxcqZQMDlOFuQSqLVY41o68LcBe+EEhJbmTzZME=; b=m5jAs6tmF6TkmFSXwm+GMvIPHt
 LaODm6mT+Z26AOw6ksGW9i5Z6etcd2p95rEdfW1qQ+G9fvtEagIAedp6UyDGIGF3jG4f/OdmVOr7F
 axBV4j178eogjjP6dk/e8SrZ5qSnUDsSQssZCUCTNJprjpGGclEKpJ6B58Oep+1mcKT4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44ND-0003pN-67
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44ND-0007Cs-5R
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] mm: fix public declaration of struct
 xen_mem_acquire_resource
Message-Id: <E1k44ND-0007Cs-5R@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:33:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ec972cb4181ef3d57a94fe14203b6f2308f4b5ab
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Fri Aug 7 17:18:35 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:18:35 2020 +0200

    mm: fix public declaration of struct xen_mem_acquire_resource
    
    XENMEM_acquire_resource and it's related structure is currently inside
    a __XEN__ or __XEN_TOOLS__ guarded section to limit it's scope to the
    hypervisor or the toolstack only. This is wrong as the hypercall is
    already being used by the Linux kernel at least, and as such needs to
    be public.
    
    Also switch the usage of uint64_aligned_t to plain uint64_t, as
    uint64_aligned_t is only to be used by the toolstack. Doing such
    change will reduce the size of the structure on 32bit x86 by 4bytes,
    since there will be no padding added after the frame_list handle.
    
    This is fine, as users of the previous layout will allocate 4bytes of
    padding that won't be read by Xen, and users of the new layout won't
    allocate those, which is also fine since Xen won't try to access them.
    
    Note that the structure already has compat handling, and such handling
    will take care of copying the right size (ie: minus the padding) when
    called from a 32bit x86 context. This is true for the compat code both
    before and after this patch, since the structures in the memory.h
    compat header are subject to a pragma pack(4), which already removed
    the trailing padding that would otherwise be introduced by the
    alignment of the frame field to 8 bytes.
    
    Fixes: 3f8f12281dd20 ('x86/mm: add HYPERVISOR_memory_op to acquire guest resources')
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 0e2e54966af556f4047c1048855c4a071028a32d
    master date: 2020-06-29 18:03:49 +0200
---
 xen/include/public/memory.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index cfdda6e2a8..bb8cc65c8f 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -599,6 +599,8 @@ struct xen_reserved_device_memory_map {
 typedef struct xen_reserved_device_memory_map xen_reserved_device_memory_map_t;
 DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t);
 
+#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
+
 /*
  * Get the pages for a particular guest resource, so that they can be
  * mapped directly by a tools domain.
@@ -637,7 +639,7 @@ struct xen_mem_acquire_resource {
      * IN - the index of the initial frame to be mapped. This parameter
      *      is ignored if nr_frames is 0.
      */
-    uint64_aligned_t frame;
+    uint64_t frame;
 
 #define XENMEM_resource_ioreq_server_frame_bufioreq 0
 #define XENMEM_resource_ioreq_server_frame_ioreq(n) (1 + (n))
@@ -658,8 +660,6 @@ struct xen_mem_acquire_resource {
 typedef struct xen_mem_acquire_resource xen_mem_acquire_resource_t;
 DEFINE_XEN_GUEST_HANDLE(xen_mem_acquire_resource_t);
 
-#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
-
 /*
  * XENMEM_get_vnumainfo used by guest to get
  * vNUMA topology from hypervisor.
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:33:47 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:33:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44NP-0004ed-Dr; Fri, 07 Aug 2020 15:33:47 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44NO-0004eS-4d
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:46 +0000
X-Inumbo-ID: 15815e17-cada-417f-9345-5fc1bc8ac72d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 15815e17-cada-417f-9345-5fc1bc8ac72d;
 Fri, 07 Aug 2020 15:33:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=G8JK+Pg0f5S9oqujCfacoZKNp5vWeZGOgsu05TAwSYw=; b=z4/4Z/lF7rmSGBQJDlnkB2XfK1
 kuQrQMdo1GhXF5qex7YWq9r6Q1O2NBEn538qTlBA2I70yzuKLWQ+Un+3krx0sN0kaI76JyiYMTeVB
 FwQqccAXZukHLb+T3pTg+tSt44Mya6gf8OBT1/Sd6qPEBMCVOaaA8YMcZp3H8dzP18sg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44NN-0003pV-AJ
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44NN-0007DK-8D
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:45 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86/spec-ctrl: Protect against CALL/JMP
 straight-line speculation
Message-Id: <E1k44NN-0007DK-8D@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:33:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit fff1874b6193a8d23b246c0f7402026f084208b5
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:19:36 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:19:36 2020 +0200

    x86/spec-ctrl: Protect against CALL/JMP straight-line speculation
    
    Some x86 CPUs speculatively execute beyond indirect CALL/JMP instructions.
    
    With CONFIG_INDIRECT_THUNK / Retpolines, indirect CALL/JMP instructions are
    converted to direct CALL/JMP's to __x86_indirect_thunk_REG(), leaving just a
    handful of indirect JMPs implementing those stubs.
    
    There is no architectrual execution beyond an indirect JMP, so use INT3 as
    recommended by vendors to halt speculative execution.  This is shorter than
    LFENCE (which would also work fine), but also shows up in logs if we do
    unexpected execute them.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 3b7dab93f2401b08c673244c9ae0f92e08bd03ba
    master date: 2020-07-01 17:01:24 +0100
---
 xen/arch/x86/indirect-thunk.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/indirect-thunk.S b/xen/arch/x86/indirect-thunk.S
index 3c17f75c23..7392aee127 100644
--- a/xen/arch/x86/indirect-thunk.S
+++ b/xen/arch/x86/indirect-thunk.S
@@ -24,10 +24,12 @@
 .macro IND_THUNK_LFENCE reg:req
         lfence
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 .macro IND_THUNK_JMP reg:req
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:33:57 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:33:57 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44NZ-0004g5-FV; Fri, 07 Aug 2020 15:33:57 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44NY-0004fT-FG
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:56 +0000
X-Inumbo-ID: 6b6e20a9-bbd8-4238-a550-dbc91b0733b5
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 6b6e20a9-bbd8-4238-a550-dbc91b0733b5;
 Fri, 07 Aug 2020 15:33:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=hYEr+bXNmAr5JC7t3z1ocw53eBa6UIjINwVYGsNqdIw=; b=nbWTVTFHPGo2Sda5KiYmwmCCXP
 rk5gm38d8DTpxpRT0WInc6McPWwY0y1p7rPOiE1WQLWseu3wiAtHDHtStutE69KJ79I2LRx35vzgH
 KAXKcMFScoDbIlcDwPMdqaL+sjIyUZbGb0iOnVOi89SV0PLlSJnCLqERxx1GmsgiOGFw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44NX-0003q5-DX
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:55 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44NX-0007EM-Ca
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:33:55 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86: restore pv_rtc_handler() invocation
Message-Id: <E1k44NX-0007EM-Ca@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:33:55 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b67bb90a6bc7dc9df97c9ca6a1b6d85157f657c1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:20:50 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:20:50 2020 +0200

    x86: restore pv_rtc_handler() invocation
    
    This was lost when making the logic accessible to PVH Dom0.
    
    While doing so make the access to the global function pointer safe
    against races (as noticed by Roger): The only current user wants to be
    invoked just once (but can tolerate to be invoked multiple times),
    zapping the pointer at that point.
    
    Fixes: 835d8d69d96a ("x86/rtc: provide mediated access to RTC for PVH dom0")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    master commit: f8fe3c07363d11fc81d8e7382dbcaa357c861569
    master date: 2020-07-15 15:46:30 +0200
---
 xen/arch/x86/hpet.c | 2 +-
 xen/arch/x86/time.c | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index 57f68fa81b..e99d7116b6 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -542,7 +542,7 @@ static void handle_rtc_once(uint8_t index, uint8_t value)
     if ( value & (RTC_PIE | RTC_AIE | RTC_UIE ) )
     {
         cpuidle_disable_deep_cstate();
-        pv_rtc_handler = NULL;
+        ACCESS_ONCE(pv_rtc_handler) = NULL;
     }
 }
 
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 5893292424..8816b3ceb0 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1046,6 +1046,8 @@ void rtc_guest_write(unsigned int port, unsigned int data)
 
     switch ( port )
     {
+        typeof(pv_rtc_handler) hook;
+
     case RTC_PORT(0):
         /*
          * All PV domains (and PVH dom0) are allowed to write to the latched
@@ -1058,6 +1060,11 @@ void rtc_guest_write(unsigned int port, unsigned int data)
     case RTC_PORT(1):
         if ( !ioports_access_permitted(currd, RTC_PORT(0), RTC_PORT(1)) )
             break;
+
+        hook = ACCESS_ONCE(pv_rtc_handler);
+        if ( hook )
+            hook(currd->arch.cmos_idx & 0x7f, data);
+
         spin_lock_irqsave(&rtc_lock, flags);
         outb(currd->arch.cmos_idx & 0x7f, RTC_PORT(0));
         outb(data, RTC_PORT(1));
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:34:07 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:34:07 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Nj-0004h5-HH; Fri, 07 Aug 2020 15:34:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Ni-0004gx-Gp
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:06 +0000
X-Inumbo-ID: 47a4833c-b55c-4221-bdff-a87e76b54d07
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 47a4833c-b55c-4221-bdff-a87e76b54d07;
 Fri, 07 Aug 2020 15:34:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=vesY/vsc2T/u89f5HOlGt9c+B6aKRr3NCmpZfvyrPxM=; b=lIP6LChP6LDlgZlnePD9htljc/
 z2E9UGSHqQ3so6zHJ12MJiM+XRl+Fx9Ty1JbozTB1cVR4eLLCMA3Tn5WY37o7Ess+mF96x7yPwoZb
 /zc5iLhzPMPkOtvr8CwC/5HMpeEOoYJZf+aB9GgEJMHRtp0RyaW/WMeCJkTDi2uw6wDk=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Nh-0003qR-GI
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Nh-0007FA-FX
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86/S3: put data segment registers into known
 state upon resume
Message-Id: <E1k44Nh-0007FA-FX@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:34:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e9e72fb1579d6b81c0bddb5e2c16ee6a34f801b2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:21:28 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:21:28 2020 +0200

    x86/S3: put data segment registers into known state upon resume
    
    wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
    wakeup_start did set it to, and %gs at whatever BIOS did load into it.
    All of this may end up confusing the first load_segments() to run on
    the BSP after resume, in particular allowing a non-nul selector value
    to be left in %fs.
    
    Alongside %ss, also put all other data segment registers into the same
    state that the boot and CPU bringup paths put them in.
    
    Reported-by: M. Vefa Bicakci <m.v.b@runbox.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 55f8c389d4348cc517946fdcb10794112458e81e
    master date: 2020-07-24 10:17:26 +0200
---
 xen/arch/x86/acpi/wakeup_prot.S | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index 74261cb4f1..15c22e597e 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -66,6 +66,12 @@ ENTRY(__ret_point)
         mov     REF(saved_ss), %ss
         LOAD_GREG(sp)
 
+        mov     $__HYPERVISOR_DS64, %eax
+        mov     %eax, %ds
+        mov     %eax, %es
+        mov     %eax, %fs
+        mov     %eax, %gs
+
         /* Reload code selector */
         pushq   $__HYPERVISOR_CS
         leaq    1f(%rip),%rax
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:34:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:34:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Nt-0004iS-KX; Fri, 07 Aug 2020 15:34:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Ns-0004iG-CE
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:16 +0000
X-Inumbo-ID: a01bd00f-25c1-479e-bcb8-f54727275189
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id a01bd00f-25c1-479e-bcb8-f54727275189;
 Fri, 07 Aug 2020 15:34:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=z9YLdy9Tq25akmj5FXwBYfaT9BGpxFU3jqabesrSjks=; b=yk/spk3vtk7uMz6Fi2DToaxuRq
 9pXanz9vghHKmTAd76cPL9Vdrs4C7wZke4Qml/pm8NfkYCIYnkeiU/C2zyO9m5OK59M1sVeEUjyZL
 NKSPkLHheDvvHtTim88+RUufadRHKqdDj+UlfPJic9Ltj84obIHpMVtjaOYhtMp9aCvw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Nr-0003qZ-Jb
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Nr-0007GI-IW
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86/cpuid: Fix APIC bit clearing
Message-Id: <E1k44Nr-0007GI-IW@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:34:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit befa2168039f5141326af6761dd74b06a0121f96
Author:     Fam Zheng <famzheng@amazon.com>
AuthorDate: Fri Aug 7 17:22:06 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:22:06 2020 +0200

    x86/cpuid: Fix APIC bit clearing
    
    The bug is obvious here, other places in this function used
    "cpufeat_mask" correctly.
    
    Fixed: b648feff8ea2 ("xen/x86: Improvements to in-hypervisor cpuid sanity checks")
    Signed-off-by: Fam Zheng <famzheng@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 64219fa179c3e48adad12bfce3f6b3f1596cccbf
    master date: 2020-07-29 19:03:41 +0100
---
 xen/arch/x86/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 005b892a90..a887f38d7f 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -961,7 +961,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         {
             /* Fast-forward MSR_APIC_BASE.EN. */
             if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
-                res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+                res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
 
             /*
              * PSE36 is not supported in shadow mode.  This bit should be
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:34:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:34:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44O3-0004jT-M4; Fri, 07 Aug 2020 15:34:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44O2-0004jJ-Ks
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:26 +0000
X-Inumbo-ID: 7db98953-ee20-4b51-a6a1-329aa216fcfa
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 7db98953-ee20-4b51-a6a1-329aa216fcfa;
 Fri, 07 Aug 2020 15:34:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=72eNQTY+ybnRvLyrw+6DmL0huX/QkkTK8+EnL2rfInY=; b=ozasemMfNPP2Hq3tnkcIqEjHeX
 LUSBfG+ZkY/9E4dSFcuFWMkKMKK1ZG0eohqa7rO/Q4qDYkbo1PnSHxXd4rDWdL7vwyZaXo75E8sFp
 //WSm/Zqs229RqtWnahrMU17YYCCphdkFOQWOLnRmgn1sE14aCnEr+LzQG2w/ODzqiC8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44O1-0003ql-N9
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44O1-0007H5-MB
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86emul: replace UB shifts
Message-Id: <E1k44O1-0007H5-MB@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:34:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e1829658a0b4e24a330140ce9f715966ab6e97b8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:22:50 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:22:50 2020 +0200

    x86emul: replace UB shifts
    
    Displacement values can be negative, hence we shouldn't left-shift them.
    Or else we get
    
    (XEN) UBSAN: Undefined behaviour in x86_emulate/x86_emulate.c:3482:55
    (XEN) left shift of negative value -2
    
    While auditing shifts, I noticed a pair of missing parentheses, which
    also get added right here.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    
    x86emul: replace further UB shifts
    
    I have no explanation how I managed to overlook these while putting
    together what is now b6a907f8c83d ("x86emul: replace UB shifts").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b6a907f8c83d37886d0523f1aeff61b98e133498
    master date: 2020-07-31 17:41:58 +0200
    master commit: 21de9680eb594a7038d4d4ed78e53ac90a8c5a6e
    master date: 2020-08-05 10:19:29 +0200
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 3a60c6f3f2..a6f67c6a56 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3250,7 +3250,7 @@ x86_decode(
         {
             generate_exception_if(d & vSIB, EXC_UD);
             modrm_rm |= ((rex_prefix & 1) << 3) |
-                        (evex_encoded() && !evex.x) << 4;
+                        ((evex_encoded() && !evex.x) << 4);
             ea.type = OP_REG;
         }
         else if ( ad_bytes == 2 )
@@ -3297,7 +3297,7 @@ x86_decode(
                     ea.mem.off = insn_fetch_type(int16_t);
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int16_t);
@@ -3359,7 +3359,7 @@ x86_decode(
                 pc_rel = mode_64bit();
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int32_t);
@@ -9263,7 +9263,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
@@ -9385,7 +9385,8 @@ x86_emulate(
                 continue;
 
             rc = ops->read(ea.mem.seg,
-                           truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                           truncate_ea(ea.mem.off +
+                                       idx * (1 << state->sib_scale)),
                            (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -9556,7 +9557,8 @@ x86_emulate(
                 continue;
 
             rc = ops->write(ea.mem.seg,
-                            truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                            truncate_ea(ea.mem.off +
+                                        idx * (1 << state->sib_scale)),
                             (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -9674,7 +9676,7 @@ x86_emulate(
                   ? ops->write
                   : ops->read)(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                NULL, 0, ctxt);
             if ( rc == X86EMUL_EXCEPTION )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:34:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:34:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44OD-0004kV-Nb; Fri, 07 Aug 2020 15:34:37 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44OC-0004kJ-Km
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:36 +0000
X-Inumbo-ID: dff3020d-bc36-40ba-9e26-2a06be989a0f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id dff3020d-bc36-40ba-9e26-2a06be989a0f;
 Fri, 07 Aug 2020 15:34:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=cCRhvwfanvlS8QZLzHMD2DQ2Q3S2YFQkgj65plwqQek=; b=ImwdndAMm4p042J2QTvCt8tB8j
 DSA4n9TeXPuDQQr1utFbxc5/mubCCC5mPKZAj9s+DAWuO1WGNguwY9pRbTwWTDpxBkHgCAQrAe6qu
 eU5pDidB2L2gOQQ+QVJL1KmuLCuEqiTLe8YJibJ6bo3wYJwf2aoWwEep2MYC9/8Gy0Og=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44OB-0003qt-Qh
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44OB-0007Hx-PG
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.13] x86/hvm: set 'ipat' in EPT for special pages
Message-Id: <E1k44OB-0007Hx-PG@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:34:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9b367b2b0b714f3ffb69ed6be0a118e8d3eac07f
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Aug 7 17:23:39 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:23:39 2020 +0200

    x86/hvm: set 'ipat' in EPT for special pages
    
    All non-MMIO ranges (i.e those not mapping real device MMIO regions) that
    map valid MFNs are normally marked MTRR_TYPE_WRBACK and 'ipat' is set. Hence
    when PV drivers running in a guest populate the BAR space of the Xen Platform
    PCI Device with pages such as the Shared Info page or Grant Table pages,
    accesses to these pages will be cachable.
    
    However, should IOMMU mappings be enabled be enabled for the guest then these
    accesses become uncachable. This has a substantial negative effect on I/O
    throughput of PV devices. Arguably PV drivers should bot be using BAR space to
    host the Shared Info and Grant Table pages but it is currently commonplace for
    them to do this and so this problem needs mitigation. Hence this patch makes
    sure the 'ipat' bit is set for any special page regardless of where in GFN
    space it is mapped.
    
    NOTE: Clearly this mitigation only applies to Intel EPT. It is not obvious
          that there is any similar mitigation possible for AMD NPT. Downstreams
          such as Citrix XenServer have been carrying a patch similar to this for
          several releases though.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: ca24b2ffdbd9a25b2d313a547ccbe97baf3e5a8d
    master date: 2020-07-31 17:42:47 +0200
---
 xen/arch/x86/hvm/mtrr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 5ad15eafe0..5965e5bda9 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -796,6 +796,7 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
 {
     int gmtrr_mtype, hmtrr_mtype;
     struct vcpu *v = current;
+    unsigned long i;
 
     *ipat = 0;
 
@@ -838,6 +839,17 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
+    for ( i = 0; i < (1ul << order); i++ )
+    {
+        if ( is_xen_heap_page(mfn_to_page(mfn_add(mfn, i))) )
+        {
+            if ( order )
+                return -1;
+            *ipat = 1;
+            return MTRR_TYPE_WRBACK;
+        }
+    }
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:34:48 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:34:48 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44OO-0004la-PE; Fri, 07 Aug 2020 15:34:48 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44ON-0004lO-GJ
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:47 +0000
X-Inumbo-ID: 51fbb217-a353-4497-b0d9-ea8666160785
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 51fbb217-a353-4497-b0d9-ea8666160785;
 Fri, 07 Aug 2020 15:34:46 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=bbt4drLOpmeHTGwFXB1m9DGSMuVpIw/0i0NUjvrvfmg=; b=y4MuRkHOmjOGiuq8jRH3Xq42qA
 hWVJXj4JamJnAPalz1vtyz2+PQ6oybw0hgcpAdVmPRcBmZWDn2WCg0uyPfoKVkBeMHqkUMaZrC1LT
 mGtHGHa0h0nfWFLN7785lRYfIelBM5mG0VLsBk+sdrHbHmnQkU5avROLNCQuf9HJm1HM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44OM-0003rf-Ls
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:46 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44OM-0007Jp-LA
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:46 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead
 of P2M_UNSHARE
Message-Id: <E1k44OM-0007Jp-LA@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:34:46 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit df11056150070ee6404bd242e3c7d70d55ee2686
Author:     Tamas K Lengyel <tamas.lengyel@intel.com>
AuthorDate: Fri Aug 7 17:27:11 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:27:11 2020 +0200

    x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead of P2M_UNSHARE
    
    While forking VMs running a small RTOS system (Zephyr) a Xen crash has been
    observed due to a mm-lock order violation while copying the HVM CPU context
    from the parent. This issue has been identified to be due to
    hap_update_paging_modes first getting a lock on the gfn using get_gfn. This
    call also creates a shared entry in the fork's memory map for the cr3 gfn. The
    function later calls hap_update_cr3 while holding the paging_lock, which
    results in the lock-order violation in vmx_load_pdptrs when it tries to unshare
    the above entry when it grabs the page with the P2M_UNSHARE flag set.
    
    Since vmx_load_pdptrs only reads from the page its usage of P2M_UNSHARE was
    unnecessary to start with. Using P2M_ALLOC is the appropriate flag to ensure
    the p2m is properly populated.
    
    Note that the lock order violation is avoided because before the paging_lock is
    taken a lookup is performed with P2M_ALLOC that forks the page, thus the second
    lookup in vmx_load_pdptrs succeeds without having to perform the fork. We keep
    P2M_ALLOC in vmx_load_pdptrs because there are code-paths leading up to it
    which don't take the paging_lock and that have no previous lookup. Currently no
    other code-path exists leading there with the paging_lock taken, thus no
    further adjustments are necessary.
    
    Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
    master commit: b67e859d0823f5b450e29379af9142d44a3ea370
    master date: 2020-06-19 15:24:55 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 662c3988dd..36b979851f 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1385,7 +1385,7 @@ static void vmx_load_pdptrs(struct vcpu *v)
     if ( (cr3 & 0x1fUL) && !hvm_pcid_enabled(v) )
         goto crash;
 
-    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_UNSHARE);
+    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_ALLOC);
     if ( !page )
     {
         /* Ideally you don't want to crash but rather go into a wait 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:34:58 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:34:58 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44OY-0004nG-Qn; Fri, 07 Aug 2020 15:34:58 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44OX-0004n5-Oq
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:57 +0000
X-Inumbo-ID: 705ba46c-bae2-47dc-b479-253c308a92fb
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 705ba46c-bae2-47dc-b479-253c308a92fb;
 Fri, 07 Aug 2020 15:34:56 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=3GuIMUnSPQ5Rd15SWahP3XqcsPry0PAOjC67tczIG1s=; b=eYRfpmcu9Vo/rZcMEmZcEjcTop
 6Y4yYcpYNxhDq55+grdhL008zNiyR4DYnZKsmSpM/seq1rRTM/UihqxiQhpqjaFcaa7kz3z6K8xFI
 BM6vhoWE3qhQ3GwpzjZ4mqCAX/xQ2MiB9BuXrlK1MUD06+on1S48g8fZUiIom+/TBFmM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44OW-0003rn-PB
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:56 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44OW-0007KL-O5
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:34:56 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86/acpi: use FADT flags to determine the PMTMR
 width
Message-Id: <E1k44OW-0007KL-O5@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:34:56 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a1aae5418981fda97400400aeaab3d3a3c9e0297
Author:     Grzegorz Uriasz <gorbak25@gmail.com>
AuthorDate: Fri Aug 7 17:28:06 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:28:06 2020 +0200

    x86/acpi: use FADT flags to determine the PMTMR width
    
    On some computers the bit width of the PM Timer as reported
    by ACPI is 32 bits when in fact the FADT flags report correctly
    that the timer is 24 bits wide. On affected machines such as the
    ASUS FX504GM and never gaming laptops this results in the inability
    to resume the machine from suspend. Without this patch suspend is
    broken on affected machines and even if a machine manages to resume
    correctly then the kernel time and xen timers are trashed.
    
    Signed-off-by: Grzegorz Uriasz <gorbak25@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: f325d2477eef8229c47d97031d314629521c70ab
    master date: 2020-06-25 09:11:09 +0200
---
 xen/arch/x86/acpi/boot.c    | 19 +++++++++++++++----
 xen/arch/x86/time.c         | 12 ++++--------
 xen/include/acpi/acmacros.h |  8 ++++++++
 3 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index e6ab9fa398..6398ee4b02 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -475,10 +475,17 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
 
 #ifdef CONFIG_X86_PM_TIMER
 	/* detect the location of the ACPI PM Timer */
-	if (fadt->header.revision >= FADT2_REVISION_ID) {
+	if (fadt->header.revision >= FADT2_REVISION_ID &&
+	    fadt->xpm_timer_block.space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
 		/* FADT rev. 2 */
-		if (fadt->xpm_timer_block.space_id ==
-		    ACPI_ADR_SPACE_SYSTEM_IO) {
+		if (fadt->xpm_timer_block.access_width != 0 &&
+		    ACPI_ACCESS_BIT_WIDTH(fadt->xpm_timer_block.access_width) != 32)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid access width(%u)\n",
+			       fadt->xpm_timer_block.access_width);
+		else if (fadt->xpm_timer_block.bit_offset != 0)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid bit offset(%u)\n",
+			       fadt->xpm_timer_block.bit_offset);
+		else {
 			pmtmr_ioport = fadt->xpm_timer_block.address;
 			pmtmr_width = fadt->xpm_timer_block.bit_width;
 		}
@@ -490,8 +497,12 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
  	 */
 	if (!pmtmr_ioport) {
 		pmtmr_ioport = fadt->pm_timer_block;
-		pmtmr_width = fadt->pm_timer_length == 4 ? 24 : 0;
+		pmtmr_width = fadt->pm_timer_length == 4 ? 32 : 0;
 	}
+	if (pmtmr_width < 32 && (fadt->flags & ACPI_FADT_32BIT_TIMER))
+		printk(KERN_WARNING PREFIX "PM-Timer is too short\n");
+	if (pmtmr_width > 24 && !(fadt->flags & ACPI_FADT_32BIT_TIMER))
+		pmtmr_width = 24;
 	if (pmtmr_ioport)
 		printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x (%u bits)\n",
 		       pmtmr_ioport, pmtmr_width);
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 02648915b1..8c5b9afdd6 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -452,16 +452,13 @@ static u64 read_pmtimer_count(void)
 static s64 __init init_pmtimer(struct platform_timesource *pts)
 {
     u64 start;
-    u32 count, target, mask = 0xffffff;
+    u32 count, target, mask;
 
-    if ( !pmtmr_ioport || !pmtmr_width )
+    if ( !pmtmr_ioport || (pmtmr_width != 24 && pmtmr_width != 32) )
         return 0;
 
-    if ( pmtmr_width == 32 )
-    {
-        pts->counter_bits = 32;
-        mask = 0xffffffff;
-    }
+    pts->counter_bits = pmtmr_width;
+    mask = 0xffffffff >> (32 - pmtmr_width);
 
     count = inl(pmtmr_ioport) & mask;
     start = rdtsc_ordered();
@@ -481,7 +478,6 @@ static struct platform_timesource __initdata plt_pmtimer =
     .name = "ACPI PM Timer",
     .frequency = ACPI_PM_FREQUENCY,
     .read_counter = read_pmtimer_count,
-    .counter_bits = 24,
     .init = init_pmtimer
 };
 
diff --git a/xen/include/acpi/acmacros.h b/xen/include/acpi/acmacros.h
index 6765535053..86c503c20f 100644
--- a/xen/include/acpi/acmacros.h
+++ b/xen/include/acpi/acmacros.h
@@ -121,6 +121,14 @@
 #define ACPI_COMPARE_NAME(a,b)          (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
 #endif
 
+/*
+ * Algorithm to obtain access bit or byte width.
+ * Can be used with access_width of struct acpi_generic_address and access_size of
+ * struct acpi_resource_generic_register.
+ */
+#define ACPI_ACCESS_BIT_WIDTH(size)     (1 << ((size) + 2))
+#define ACPI_ACCESS_BYTE_WIDTH(size)    (1 << ((size) - 1))
+
 /*
  * Macros for moving data around to/from buffers that are possibly unaligned.
  * If the hardware supports the transfer of unaligned data, just do the store.
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:35:08 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:35:08 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Oi-0004oC-Sg; Fri, 07 Aug 2020 15:35:08 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Oh-0004o2-Qq
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:07 +0000
X-Inumbo-ID: 9ab09853-b05c-459e-8edb-50d627d4795a
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 9ab09853-b05c-459e-8edb-50d627d4795a;
 Fri, 07 Aug 2020 15:35:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Dv1N5DQQ3Wc+ZiQqRHxjBnjHCN+DRxOnz+Co8GpthVg=; b=p8kaaw9xl86BUZNab5n0PDL4n8
 k1IWLddiNTK5BCzIBtLQzSwzdteqkoVTnjyy54IUsPYmK3gqJH/TON4VBr0gsbcTyzyN3MTa6G0rm
 v0G38Knnuh/Le0tYPMuP4YL5im/DFHWXhKEGLYm6S/Mtnvu7yLXCD+hvlBeoQrYtelmA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Og-0003s8-S6
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:06 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Og-0007LN-RN
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:06 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86/msr: Disallow access to Processor Trace MSRs
Message-Id: <E1k44Og-0007LN-RN@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:35:06 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 43258cec1413e819d84e005b11d70ad021b1a21e
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:28:48 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:28:48 2020 +0200

    x86/msr: Disallow access to Processor Trace MSRs
    
    We do not expose the feature to guests, so should disallow access to the
    respective MSRs.  For simplicity, drop the entire block of MSRs, not just the
    subset which have been specified thus far.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Wei Liu <wl@xen.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: bcdfbb70fca579baa04f212c0936b77919bdae11
    master date: 2020-06-26 16:34:02 +0100
---
 xen/arch/x86/msr.c              | 2 ++
 xen/include/asm-x86/msr-index.h | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c
index 9ff27b7007..1c18e10345 100644
--- a/xen/arch/x86/msr.c
+++ b/xen/arch/x86/msr.c
@@ -134,6 +134,7 @@ int guest_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
@@ -275,6 +276,7 @@ int guest_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index 91994669e1..0eb6855614 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -182,6 +182,14 @@
 #define MSR_MCU_OPT_CTRL                    0x00000123
 #define  MCU_OPT_CTRL_RNGDS_MITG_DIS        (_AC(1, ULL) <<  0)
 
+#define MSR_RTIT_OUTPUT_BASE                0x00000560
+#define MSR_RTIT_OUTPUT_MASK                0x00000561
+#define MSR_RTIT_CTL                        0x00000570
+#define MSR_RTIT_STATUS                     0x00000571
+#define MSR_RTIT_CR3_MATCH                  0x00000572
+#define MSR_RTIT_ADDR_A(n)                 (0x00000580 + (n) * 2)
+#define MSR_RTIT_ADDR_B(n)                 (0x00000581 + (n) * 2)
+
 #define MSR_U_CET                           0x000006a0
 #define MSR_S_CET                           0x000006a2
 #define MSR_PL0_SSP                         0x000006a4
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:35:20 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:35:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Ot-0004pU-Vu; Fri, 07 Aug 2020 15:35:19 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Or-0004pF-Tw
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:17 +0000
X-Inumbo-ID: dbe3ff53-a1ad-4bbb-b68f-76527965b8ba
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id dbe3ff53-a1ad-4bbb-b68f-76527965b8ba;
 Fri, 07 Aug 2020 15:35:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=dAwhwOn08ZLoaYSDSCTUa54TA945HJ/aj6m74PNhyPc=; b=YyeGcsqn2D3c36vib4u8DKzfJe
 n5kxx2iLeRVVF/mprimJOU5PmZDSdxcUDO+d14wwFa48ic3o50O1f4YrxkjGd7IBO+rzyvJCBR3k7
 1bhMVeIE6CaGdYYqCbWQGZBUnwMaPWqQLVd7u4/B/XUt1gs1wa8QvrMemOhv02hWPbAc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Oq-0003sG-VI
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:16 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Oq-0007Mk-UD
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:16 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] mm: fix public declaration of struct
 xen_mem_acquire_resource
Message-Id: <E1k44Oq-0007Mk-UD@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:35:16 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7cce3f25a13715eef16d55fe716c0a850b85573d
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Fri Aug 7 17:29:41 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:29:41 2020 +0200

    mm: fix public declaration of struct xen_mem_acquire_resource
    
    XENMEM_acquire_resource and it's related structure is currently inside
    a __XEN__ or __XEN_TOOLS__ guarded section to limit it's scope to the
    hypervisor or the toolstack only. This is wrong as the hypercall is
    already being used by the Linux kernel at least, and as such needs to
    be public.
    
    Also switch the usage of uint64_aligned_t to plain uint64_t, as
    uint64_aligned_t is only to be used by the toolstack. Doing such
    change will reduce the size of the structure on 32bit x86 by 4bytes,
    since there will be no padding added after the frame_list handle.
    
    This is fine, as users of the previous layout will allocate 4bytes of
    padding that won't be read by Xen, and users of the new layout won't
    allocate those, which is also fine since Xen won't try to access them.
    
    Note that the structure already has compat handling, and such handling
    will take care of copying the right size (ie: minus the padding) when
    called from a 32bit x86 context. This is true for the compat code both
    before and after this patch, since the structures in the memory.h
    compat header are subject to a pragma pack(4), which already removed
    the trailing padding that would otherwise be introduced by the
    alignment of the frame field to 8 bytes.
    
    Fixes: 3f8f12281dd20 ('x86/mm: add HYPERVISOR_memory_op to acquire guest resources')
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 0e2e54966af556f4047c1048855c4a071028a32d
    master date: 2020-06-29 18:03:49 +0200
---
 xen/include/public/memory.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index 8638023e4a..2d2cd446be 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -599,6 +599,8 @@ struct xen_reserved_device_memory_map {
 typedef struct xen_reserved_device_memory_map xen_reserved_device_memory_map_t;
 DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t);
 
+#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
+
 /*
  * Get the pages for a particular guest resource, so that they can be
  * mapped directly by a tools domain.
@@ -646,7 +648,7 @@ struct xen_mem_acquire_resource {
      * IN - the index of the initial frame to be mapped. This parameter
      *      is ignored if nr_frames is 0.
      */
-    uint64_aligned_t frame;
+    uint64_t frame;
 
 #define XENMEM_resource_ioreq_server_frame_bufioreq 0
 #define XENMEM_resource_ioreq_server_frame_ioreq(n) (1 + (n))
@@ -667,8 +669,6 @@ struct xen_mem_acquire_resource {
 typedef struct xen_mem_acquire_resource xen_mem_acquire_resource_t;
 DEFINE_XEN_GUEST_HANDLE(xen_mem_acquire_resource_t);
 
-#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
-
 /*
  * XENMEM_get_vnumainfo used by guest to get
  * vNUMA topology from hypervisor.
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:35:29 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:35:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44P3-0004qR-1J; Fri, 07 Aug 2020 15:35:29 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44P1-0004qJ-SG
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:27 +0000
X-Inumbo-ID: 40057daf-a3d3-43c7-97a5-eaab5725677c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 40057daf-a3d3-43c7-97a5-eaab5725677c;
 Fri, 07 Aug 2020 15:35:27 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=33GvufMhBmEj/3SB9BMoMItOgJgESK943oWIsTyn1As=; b=BT4RK62s3PJwDClsFMUDnnyUXc
 V9v2vrVIzllZqYJlak3B2sX6m3Nrim5V8p103HctbSpEFfoi69+/gSWpcRF79kmoT3u9V9T8edGf7
 172/MyE77QUpPzP+IJrOm1ATHNxbA9KGJrCsfKUAiGHotJDafi1caOEMNQvo4HKTKmBI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44P1-0003sR-1z
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:27 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44P1-0007Nj-17
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:27 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86/spec-ctrl: Protect against CALL/JMP
 straight-line speculation
Message-Id: <E1k44P1-0007Nj-17@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:35:27 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit df9a0ad1f8b874160a305bfa7a3145327f5a72b2
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:30:35 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:30:35 2020 +0200

    x86/spec-ctrl: Protect against CALL/JMP straight-line speculation
    
    Some x86 CPUs speculatively execute beyond indirect CALL/JMP instructions.
    
    With CONFIG_INDIRECT_THUNK / Retpolines, indirect CALL/JMP instructions are
    converted to direct CALL/JMP's to __x86_indirect_thunk_REG(), leaving just a
    handful of indirect JMPs implementing those stubs.
    
    There is no architectrual execution beyond an indirect JMP, so use INT3 as
    recommended by vendors to halt speculative execution.  This is shorter than
    LFENCE (which would also work fine), but also shows up in logs if we do
    unexpected execute them.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 3b7dab93f2401b08c673244c9ae0f92e08bd03ba
    master date: 2020-07-01 17:01:24 +0100
---
 xen/arch/x86/indirect-thunk.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/indirect-thunk.S b/xen/arch/x86/indirect-thunk.S
index 3c17f75c23..7392aee127 100644
--- a/xen/arch/x86/indirect-thunk.S
+++ b/xen/arch/x86/indirect-thunk.S
@@ -24,10 +24,12 @@
 .macro IND_THUNK_LFENCE reg:req
         lfence
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 .macro IND_THUNK_JMP reg:req
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:35:39 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:35:39 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44PD-0004rd-3V; Fri, 07 Aug 2020 15:35:39 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44PB-0004rR-Sk
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:37 +0000
X-Inumbo-ID: f984a35b-6408-4988-9e9d-655b21d9ecdd
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id f984a35b-6408-4988-9e9d-655b21d9ecdd;
 Fri, 07 Aug 2020 15:35:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=sXV42fJUZN5E+J9CDG26D9p59yZq5Vq4DPc1q47rqrc=; b=iA7TB+TTqJWkmsuuDKYo4IzIBF
 epImoSohiXAQ7TKdcczdixeWo30cBc4SdSVjQgbjHbXfq6r7yy4pO5YILEUL4tA/cd0sksK21PXzx
 wM/U2ALiOEKjbZL3lNNpSFjJJ7LHHb6wF4U6R26/d0S+z+70F9+vp/cHrUJlecYs53a8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44PB-0003sZ-4r
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:37 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44PB-0007Ok-49
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:37 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86/S3: put data segment registers into known
 state upon resume
Message-Id: <E1k44PB-0007Ok-49@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:35:37 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 85ce36d12b43ed15e556265c6204858d3b52d747
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:31:16 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:31:16 2020 +0200

    x86/S3: put data segment registers into known state upon resume
    
    wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
    wakeup_start did set it to, and %gs at whatever BIOS did load into it.
    All of this may end up confusing the first load_segments() to run on
    the BSP after resume, in particular allowing a non-nul selector value
    to be left in %fs.
    
    Alongside %ss, also put all other data segment registers into the same
    state that the boot and CPU bringup paths put them in.
    
    Reported-by: M. Vefa Bicakci <m.v.b@runbox.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 55f8c389d4348cc517946fdcb10794112458e81e
    master date: 2020-07-24 10:17:26 +0200
---
 xen/arch/x86/acpi/wakeup_prot.S | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index 361751d290..6dc9e2bd82 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -84,6 +84,12 @@ ENTRY(__ret_point)
         mov     REF(saved_ss), %ss
         LOAD_GREG(sp)
 
+        mov     $__HYPERVISOR_DS64, %eax
+        mov     %eax, %ds
+        mov     %eax, %es
+        mov     %eax, %fs
+        mov     %eax, %gs
+
         /* Reload code selector */
         pushq   $(__HYPERVISOR_CS64)
         leaq    1f(%rip),%rax
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:35:49 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:35:49 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44PN-0004si-5B; Fri, 07 Aug 2020 15:35:49 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44PM-0004sW-05
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:48 +0000
X-Inumbo-ID: 6ff6879e-d82d-48db-84a9-e24fa53bf82f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 6ff6879e-d82d-48db-84a9-e24fa53bf82f;
 Fri, 07 Aug 2020 15:35:47 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=IBsvutURU/LGvJUPdfvLfGJOv+zNJp7L130/B5meeDM=; b=Tm9d+FdoXCnUc44JrS3DR85Gu3
 NqB5vVSj73dG2ZeMwEAPTbMq3C9637c8FGdN7KnxzHZA8uH/SNXLZYy0vSIGSyDU3nCUde449L+as
 l1nwhkJ9NJ4ycuSYzrAblD2wsWDW082N1zMdxHZqOVJGKxq5Nlecpi9wfIxpxT9vlWKk=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44PL-0003t8-8C
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:47 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44PL-0007Po-73
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:47 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86/cpuid: Fix APIC bit clearing
Message-Id: <E1k44PL-0007Po-73@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:35:47 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 07fd5d3598cd9772f15b0ea740c0691cc9569186
Author:     Fam Zheng <famzheng@amazon.com>
AuthorDate: Fri Aug 7 17:32:02 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:32:02 2020 +0200

    x86/cpuid: Fix APIC bit clearing
    
    The bug is obvious here, other places in this function used
    "cpufeat_mask" correctly.
    
    Fixed: b648feff8ea2 ("xen/x86: Improvements to in-hypervisor cpuid sanity checks")
    Signed-off-by: Fam Zheng <famzheng@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 64219fa179c3e48adad12bfce3f6b3f1596cccbf
    master date: 2020-07-29 19:03:41 +0100
---
 xen/arch/x86/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 91faf02a2b..56072d4316 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -968,7 +968,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         {
             /* Fast-forward MSR_APIC_BASE.EN. */
             if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
-                res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+                res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
 
             /*
              * PSE36 is not supported in shadow mode.  This bit should be
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:35:59 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:35:59 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44PX-0004uG-6o; Fri, 07 Aug 2020 15:35:59 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44PW-0004u6-5u
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:58 +0000
X-Inumbo-ID: 4afac6e5-e674-4c57-95a1-8ce52399da11
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 4afac6e5-e674-4c57-95a1-8ce52399da11;
 Fri, 07 Aug 2020 15:35:57 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=p1a6OQHQNsiDqa7r3LhaN6yka+pQ2ZVWAi9Q/r6k3cc=; b=VWOTEhlzyncDnKK9QA/C+wY+Jp
 NDhh5dNBaNzpNat3zMmzwXRB39ECfUZzwrc3WtcENZQPTKjjPlDSWCdQ8/orfoAKw3ofA/svTagXB
 Ohj4qsJmdL1NpBz0vHBNjpNaK+pnOYx6lb3r7k+tbP0KVXJDuxsU6rxyKlbCuO55aNJg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44PV-0003tF-BW
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:57 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44PV-0007Qh-Ao
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:35:57 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86emul: replace UB shifts
Message-Id: <E1k44PV-0007Qh-Ao@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:35:57 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit dca9cc7db628040a8b673a3e5cf7df237429bd68
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:32:42 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:32:42 2020 +0200

    x86emul: replace UB shifts
    
    Displacement values can be negative, hence we shouldn't left-shift them.
    Or else we get
    
    (XEN) UBSAN: Undefined behaviour in x86_emulate/x86_emulate.c:3482:55
    (XEN) left shift of negative value -2
    
    While auditing shifts, I noticed a pair of missing parentheses, which
    also get added right here.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    
    x86emul: replace further UB shifts
    
    I have no explanation how I managed to overlook these while putting
    together what is now b6a907f8c83d ("x86emul: replace UB shifts").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b6a907f8c83d37886d0523f1aeff61b98e133498
    master date: 2020-07-31 17:41:58 +0200
    master commit: 21de9680eb594a7038d4d4ed78e53ac90a8c5a6e
    master date: 2020-08-05 10:19:29 +0200
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 98f52083f8..09de6ee15d 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3131,7 +3131,7 @@ x86_decode(
                     ea.mem.off = insn_fetch_type(int16_t);
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int16_t);
@@ -3190,7 +3190,7 @@ x86_decode(
                 pc_rel = mode_64bit();
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int32_t);
@@ -8521,7 +8521,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 15:36:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 15:36:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k44Ph-0004vL-8Y; Fri, 07 Aug 2020 15:36:09 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k44Pg-0004vC-7n
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:36:08 +0000
X-Inumbo-ID: 18ec5331-3c7a-4d1f-9e45-288f05aa8b4f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 18ec5331-3c7a-4d1f-9e45-288f05aa8b4f;
 Fri, 07 Aug 2020 15:36:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=KduR82snpYOjuyB0fPzx8IaoVmDOJA0lMvMhrWtXTv8=; b=N/hPSspHy7dvcO7lexKL1397M5
 iGMPd8qmKKnv1ftu19SvM9tAmW3j/PqnPTKoSTcSI+8Ql7Q9xJaYjFT8VBL1ksZQ3/hRjtrvey8oC
 Ao97eNGoRrKQ+I6qKk+fgjVKz0P/FPcqJf+WDA8RmpTTHJuaikwnkaThvoXQWZ8khhsI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Pf-0003tq-EN
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:36:07 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k44Pf-0007SB-Df
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 15:36:07 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging-4.12] x86/hvm: set 'ipat' in EPT for special pages
Message-Id: <E1k44Pf-0007SB-Df@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 15:36:07 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 1336ca17742471fc4a59879ae2f637a59530a933
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Aug 7 17:33:22 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:33:22 2020 +0200

    x86/hvm: set 'ipat' in EPT for special pages
    
    All non-MMIO ranges (i.e those not mapping real device MMIO regions) that
    map valid MFNs are normally marked MTRR_TYPE_WRBACK and 'ipat' is set. Hence
    when PV drivers running in a guest populate the BAR space of the Xen Platform
    PCI Device with pages such as the Shared Info page or Grant Table pages,
    accesses to these pages will be cachable.
    
    However, should IOMMU mappings be enabled be enabled for the guest then these
    accesses become uncachable. This has a substantial negative effect on I/O
    throughput of PV devices. Arguably PV drivers should bot be using BAR space to
    host the Shared Info and Grant Table pages but it is currently commonplace for
    them to do this and so this problem needs mitigation. Hence this patch makes
    sure the 'ipat' bit is set for any special page regardless of where in GFN
    space it is mapped.
    
    NOTE: Clearly this mitigation only applies to Intel EPT. It is not obvious
          that there is any similar mitigation possible for AMD NPT. Downstreams
          such as Citrix XenServer have been carrying a patch similar to this for
          several releases though.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: ca24b2ffdbd9a25b2d313a547ccbe97baf3e5a8d
    master date: 2020-07-31 17:42:47 +0200
---
 xen/arch/x86/hvm/mtrr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 7ccd85bcea..c7c404fb69 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -795,6 +795,7 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
 {
     int gmtrr_mtype, hmtrr_mtype;
     struct vcpu *v = current;
+    unsigned long i;
 
     *ipat = 0;
 
@@ -837,6 +838,17 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
+    for ( i = 0; i < (1ul << order); i++ )
+    {
+        if ( is_xen_heap_page(mfn_to_page(mfn_add(mfn, i))) )
+        {
+            if ( order )
+                return -1;
+            *ipat = 1;
+            return MTRR_TYPE_WRBACK;
+        }
+    }
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.12


From xen-changelog-bounces@lists.xenproject.org Fri Aug 07 16:33:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 07 Aug 2020 16:33:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k45Ip-000290-VQ; Fri, 07 Aug 2020 16:33:07 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=1NmG=BR=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k45Io-00028v-9m
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 16:33:06 +0000
X-Inumbo-ID: d7e91b84-8864-4af7-a161-2c1dad564beb
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id d7e91b84-8864-4af7-a161-2c1dad564beb;
 Fri, 07 Aug 2020 16:33:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=r8+FL8xXB4sP6vBDzgeJv10v2nR1eM0yjcLKTZ8iE30=; b=JjoUg0yYC0tlIlOE5ZMb/9FWFK
 RtII9U/qQwdmsL4OSZarl2xoBUhRneHJ98pTbkXd8KPWS8aA7MVKQcKdbAWq8L63r3XltKCrosW+d
 fc+8+oKTwIr3LHViN1DmmYeHUaYd2WVqF8inU9QTGp8QYZgiOd6q/6LBMPpTz3w20vH0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k45Im-0005h4-IQ
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 16:33:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k45Im-00035f-G7
 for xen-changelog@lists.xenproject.org; Fri, 07 Aug 2020 16:33:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/EFI: sanitize build logic
Message-Id: <E1k45Im-00035f-G7@xenbits.xenproject.org>
Date: Fri, 07 Aug 2020 16:33:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 90c7eee53fcc0b48bd51aa3a7d1d0d9980ce1a7a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:32:11 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 7 17:30:58 2020 +0100

    x86/EFI: sanitize build logic
    
    With changes done over time and as far as linking goes, the only special
    thing about building with EFI support enabled is the need for the dummy
    relocations object for xen.gz uniformly in all build stages. All other
    efi/*.o can be consumed from the built_in*.o files.
    
    In efi/Makefile, besides moving relocs-dummy.o to "extra", also properly
    split between obj-y and obj-bin-y.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile     | 30 ++++++++++++++----------------
 xen/arch/x86/efi/Makefile |  5 +++--
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index b388861679..77e5534cff 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -113,28 +113,35 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 		{ echo "No Multiboot2 header found" >&2; false; }
 	mv $(TMP) $(TARGET)
 
+# Check if the compiler supports the MS ABI.
+export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
+# Check if the linker supports PE.
+XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
+EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
 
 ifeq ($(CONFIG_LTO),y)
 # Gather all LTO objects together
 prelink_lto.o: $(ALL_OBJS)
 	$(LD_LTO) -r -o $@ $^
 
-prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/compat.o
-	$(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi_lto.o: $(ALL_OBJS)
+	$(LD_LTO) -r -o $@ $^
 
 # Link it with all the binary objects
-prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o
+prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o efi/boot.init.o
+prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 else
-prelink.o: $(ALL_OBJS)
+prelink.o: $(ALL_OBJS) $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi.o: $(ALL_OBJS)
+	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
@@ -171,12 +178,6 @@ EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
 EFI_LDFLAGS += --major-os-version=2 --minor-os-version=0
 EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0
 
-# Check if the compiler supports the MS ABI.
-export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
-# Check if the linker supports PE.
-XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
-CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
-
 $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
 $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
 
@@ -223,9 +224,6 @@ $(TARGET).efi: FORCE
 	echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) disabled'
 endif
 
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: ;
-
 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h
 	$(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $<
 
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 3e4c395b75..4b2b010a80 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -14,6 +14,7 @@ $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
 $(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
-obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o
-extra-$(XEN_BUILD_EFI) += buildid.o
+obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ))
+obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ))
+extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o
 nocov-$(XEN_BUILD_EFI) += stub.o
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:55:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:55:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D8b-0005Fj-H0; Sat, 08 Aug 2020 00:55:05 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D8a-0005Fe-DQ
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:04 +0000
X-Inumbo-ID: 4bbb3383-253b-4c3b-bf63-ee921d1f283d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 4bbb3383-253b-4c3b-bf63-ee921d1f283d;
 Sat, 08 Aug 2020 00:55:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=P656I40R/ENwKvlAnxbKnPDYMVW7pTtkkYlNNUqfRiE=; b=W5J+URKbOhCuJH/f9bXhrTVQA/
 2IIqAl1ed/cG3UyQX+DWCiK8889vj5VNlYydeM904NSHVhMfJfB1eATHEQAlRtvbczat4pLvB3J63
 /gU0lC+Pw/glUImtHt2rHrx93oBALeiJJuMPMqXeWDLBU3LQrCoop6YvFD7XcttyF0L8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D8Y-0000eI-RC
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D8Y-0002zt-QP
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: avoid assembler warning about .type not taking
 effect in test harness
Message-Id: <E1k4D8Y-0002zt-QP@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9909532113692020c1b50eb974cac47d4ea10e69
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 3 16:27:22 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 3 16:27:22 2020 +0200

    x86emul: avoid assembler warning about .type not taking effect in test harness
    
    gcc re-orders top level blocks by default when optimizing. This
    re-ordering results in all our .type directives to get emitted to the
    assembly file first, followed by gcc's. The assembler warns about
    attempts to change the type of a symbol when it was already set (and
    when there's no intervening setting to "notype").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index 48b3e6dce1..7b07c31bbd 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -295,4 +295,9 @@ x86-emulate.o cpuid.o test_x86_emulator.o evex-disp8.o predicates.o wrappers.o:
 x86-emulate.o: x86_emulate/x86_emulate.c
 x86-emulate.o: HOSTCFLAGS += -D__XEN_TOOLS__
 
+# In order for our custom .type assembler directives to reliably land after
+# gcc's, we need to keep it from re-ordering top-level constructs.
+$(call cc-option-add,HOSTCFLAGS-toplevel,HOSTCC,-fno-toplevel-reorder)
+test_x86_emulator.o: HOSTCFLAGS += $(HOSTCFLAGS-toplevel)
+
 test_x86_emulator.o: $(addsuffix .h,$(TESTCASES)) $(addsuffix -opmask.h,$(OPMASK))
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:55:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:55:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D8l-0005Gr-Ik; Sat, 08 Aug 2020 00:55:15 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D8k-0005Gl-CP
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:14 +0000
X-Inumbo-ID: 3780f779-cffb-45c1-9107-099d13b24bf5
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3780f779-cffb-45c1-9107-099d13b24bf5;
 Sat, 08 Aug 2020 00:55:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=e2wUd9nS5lnrzOe9/p+fedZD272nEGJY31aK3qkK01o=; b=V6agJfyBthMKSjNsoTxdYSNVxN
 RfB6Xyue+GlN9R3qzjLNPAcqI1mMMV1QaxS6ObOAgyonpGvPrViC4lE+/TLh/R9O9NlqJodk+tX6K
 3BRFVWo7xOWbRRu7zBgEvZ5YcG4ntlsYw+SnGibNZZL65EcSBJV5fw3Zj9noxocqgpwQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D8i-0000eR-VE
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D8i-00030Y-TH
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] libxl: avoid golang building without CONFIG_GOLANG=y
Message-Id: <E1k4D8i-00030Y-TH@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit fe49938f21c26f0ce630c69af055f927dd0ed75f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 3 10:06:32 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Tue Aug 4 14:46:55 2020 +0000

    libxl: avoid golang building without CONFIG_GOLANG=y
    
    While this doesn't address the real problem I've run into (attempting to
    update r/o source files), not recursing into tools/golang/xenlight/ is
    enough to fix the build for me for the moment. I don't currently see why
    60db5da62ac0 ("libxl: Generate golang bindings in libxl Makefile") found
    it necessary to invoke this build step unconditionally.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/libxl/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 38cd43abae..4fc4e1e944 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -282,7 +282,9 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_
 # about races with tools/golang/xenlight/Makefile:all
 .PHONY: idl-external
 idl-external:
+ifeq ($(CONFIG_GOLANG),y)
 	$(MAKE) -C $(XEN_ROOT)/tools/golang/xenlight idl-gen
+endif
 
 LIBXL_IDLGEN_FILES = _libxl_types.h _libxl_types_json.h _libxl_types_private.h _libxl_types.c \
 	_libxl_types_internal.h _libxl_types_internal_json.h _libxl_types_internal_private.h _libxl_types_internal.c
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:55:24 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D8u-0005I3-KF; Sat, 08 Aug 2020 00:55:24 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D8t-0005Hu-R0
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:23 +0000
X-Inumbo-ID: 2b29ead3-a2b1-40dd-bd8e-0d97bf708098
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 2b29ead3-a2b1-40dd-bd8e-0d97bf708098;
 Sat, 08 Aug 2020 00:55:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ZoCATJBapr0Zz9DwidUBBh3XXsDdjnydlrDaGwnh9bM=; b=QoZ6rFJ24WaZ+ny6DbEraURs++
 UBKKwJ8dWjz/IfHiZx4jFheWCuf7UpawqUQDifvMi5A8kL5b2O2kbFE4wriSZ8FeEFYjL6L496UrQ
 a0X9Qa87Ae2YoEdhG6IkjEvEfRM1sA5SC7fFMgx1L9O8ccoTsljdmWvY1Rj1cKTwueSg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D8t-0000eY-2N
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D8t-000314-12
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] Revert "libxl: avoid golang building without
 CONFIG_GOLANG=y"
Message-Id: <E1k4D8t-000314-12@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:55:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c9f9a7258dc07735e2da2b6d0b51a0218c76a51f
Author:     Wei Liu <wl@xen.org>
AuthorDate: Tue Aug 4 15:53:48 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Tue Aug 4 15:58:07 2020 +0000

    Revert "libxl: avoid golang building without CONFIG_GOLANG=y"
    
    This reverts commit fe49938f21c26f0ce630c69af055f927dd0ed75f.
    
    We have an on-going discussion regarding this patch.
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 tools/libxl/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 4fc4e1e944..38cd43abae 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -282,9 +282,7 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_
 # about races with tools/golang/xenlight/Makefile:all
 .PHONY: idl-external
 idl-external:
-ifeq ($(CONFIG_GOLANG),y)
 	$(MAKE) -C $(XEN_ROOT)/tools/golang/xenlight idl-gen
-endif
 
 LIBXL_IDLGEN_FILES = _libxl_types.h _libxl_types_json.h _libxl_types_private.h _libxl_types.c \
 	_libxl_types_internal.h _libxl_types_internal_json.h _libxl_types_internal_private.h _libxl_types_internal.c
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:55:34 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D94-0005JO-Ln; Sat, 08 Aug 2020 00:55:34 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D94-0005JF-21
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:34 +0000
X-Inumbo-ID: 5f7d6c0c-0beb-4e01-8b79-a49aa858e30a
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5f7d6c0c-0beb-4e01-8b79-a49aa858e30a;
 Sat, 08 Aug 2020 00:55:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=eFsjT8Qv7u5dsxPWEmjLaZs4i/tezmaZkPtnLE1G1uM=; b=sDGE8IETiceAy4KyQmnBH7T96m
 YHTq8KTIEAtq5lS/kBmN71qcaU8AlLYl72PcNOUPiC6d2/HwoaGON8yWg1MTElsabDNvjOWq7q81F
 u4tM92gL70qyNMm13/XqXy+LTARd8wThgB4Xx+SKg+ru3PIa+zuC3L/+PAGEcYJhrkN4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D93-0000ef-6t
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D93-00031a-51
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: replace further UB shifts
Message-Id: <E1k4D93-00031a-51@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:55:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 21de9680eb594a7038d4d4ed78e53ac90a8c5a6e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:19:29 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:19:29 2020 +0200

    x86emul: replace further UB shifts
    
    I have no explanation how I managed to overlook these while putting
    together what is now b6a907f8c83d ("x86emul: replace UB shifts").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index b8a4a1ca82..10b20cf23b 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -9735,7 +9735,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
@@ -9857,7 +9857,8 @@ x86_emulate(
                 continue;
 
             rc = ops->read(ea.mem.seg,
-                           truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                           truncate_ea(ea.mem.off +
+                                       idx * (1 << state->sib_scale)),
                            (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:55:44 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:55:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D9E-0005KV-NK; Sat, 08 Aug 2020 00:55:44 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D9D-0005KM-Sx
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:43 +0000
X-Inumbo-ID: 83b00071-d037-4d86-9a67-b1e5ae245607
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 83b00071-d037-4d86-9a67-b1e5ae245607;
 Sat, 08 Aug 2020 00:55:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=D1tBP7Td1HRTH6C8dobAYcu6s75O5si/DI/q6pKkb9g=; b=Oyro+5FwaH+H2O592YO3SxnubW
 NdIEZbqTOqvRUEdXBm76HfgD1KFhfMNTSdWK3DRwb09ND++oyQxDDTM9N0Du0iunYnE/kv0LelW8H
 zrH4asOc10Ep81w4Fxy4E85PO/xo1dLYX8YYoltb07eh3PQou4q6HDy7b0xj8ft455dA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9D-0000em-9s
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9D-00032A-9H
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:43 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: further FPU env testing relaxation for AMD-like
 CPUs
Message-Id: <E1k4D9D-00032A-9H@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:55:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 48660560d1b64763551be5746f980eec700ba46c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:20:59 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:20:59 2020 +0200

    x86emul: further FPU env testing relaxation for AMD-like CPUs
    
    See the code comment that's being extended. Additionally a few more
    zap_fpsel() invocations are needed - whenever we stored state after
    there potentially having been a context switch behind our backs.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/test_x86_emulator.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tools/tests/x86_emulator/test_x86_emulator.c b/tools/tests/x86_emulator/test_x86_emulator.c
index 4b01fa8b8d..b9663214e2 100644
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -752,6 +752,13 @@ static struct x86_emulate_ops emulops = {
  * 64-bit OSes may not (be able to) properly restore the two selectors in
  * the FPU environment. Zap them so that memcmp() on two saved images will
  * work regardless of whether a context switch occurred in the middle.
+ *
+ * Additionally on AMD-like CPUs FDP/FIP/FOP may get lost across context
+ * switches, when there's no unmasked pending FP exception: With
+ * CPUID.80000008.EBX[2] clear, the fields don't get written/read by
+ * {F,}XSAVE / {F,}XRSTOR (which OSes often compensate for by invoking an
+ * insn forcing the fields to gain a deterministic value), whereas with said
+ * bit set, zeroes will get written (and hence later restored).
  */
 static void zap_fpsel(unsigned int *env, bool is_32bit)
 {
@@ -765,6 +772,21 @@ static void zap_fpsel(unsigned int *env, bool is_32bit)
         env[2] &= ~0xffff;
         env[3] &= ~0xffff;
     }
+
+    if ( cp.x86_vendor != X86_VENDOR_AMD && cp.x86_vendor != X86_VENDOR_HYGON )
+        return;
+
+    if ( is_32bit )
+    {
+        env[3] = 0;
+        env[4] = 0;
+        env[5] = 0;
+    }
+    else
+    {
+        env[1] &= 0xffff;
+        env[2] = 0;
+    }
 }
 
 static void zap_xfpsel(unsigned int *env)
@@ -2460,6 +2482,7 @@ int main(int argc, char **argv)
         regs.edx = (unsigned long)res;
         rc = x86_emulate(&ctxt, &emulops);
         asm volatile ( "fnstenv %0" : "=m" (res[9]) :: "memory" );
+        zap_fpsel(&res[9], true);
         if ( (rc != X86EMUL_OKAY) ||
              memcmp(res + 2, res + 9, 28) ||
              (regs.eip != (unsigned long)&instr[3]) )
@@ -2487,6 +2510,7 @@ int main(int argc, char **argv)
         res[23] = 0xaa55aa55;
         res[24] = 0xaa55aa55;
         rc = x86_emulate(&ctxt, &emulops);
+        zap_fpsel(&res[0], false);
         if ( (rc != X86EMUL_OKAY) ||
              memcmp(res, res + 25, 94) ||
              (res[23] >> 16) != 0xaa55 ||
@@ -2514,6 +2538,7 @@ int main(int argc, char **argv)
         regs.edx = (unsigned long)res;
         rc = x86_emulate(&ctxt, &emulops);
         asm volatile ( "fnsave %0" : "=m" (res[27]) :: "memory" );
+        zap_fpsel(&res[27], true);
         if ( (rc != X86EMUL_OKAY) ||
              memcmp(res, res + 27, 108) ||
              (regs.eip != (unsigned long)&instr[2]) )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:55:54 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:55:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D9O-0005LZ-PE; Sat, 08 Aug 2020 00:55:54 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D9N-0005LS-Uq
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:53 +0000
X-Inumbo-ID: a5ba46ac-9339-4e06-a761-2af22006b893
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id a5ba46ac-9339-4e06-a761-2af22006b893;
 Sat, 08 Aug 2020 00:55:53 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Dsf5fFvoWtxALrBpmtF8+sUdTkcseduC8NH1cQmRG74=; b=db9QjqZQv13QwycvgtqIZHkStc
 kmHBh3ZxRN6hLnvuW4VUbJh3CDF4JNtDVN7g/sodg2URm81PXvILpFflzcdfLKVz0ZNzao05T97FI
 wpCgyhdj/5arhcdQGjh1jtzrh8BeCBbaW2G/16GoE2BJ/F0aNaZ0Ya1vCLiTVBfY24Wo=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9N-0000ew-Cr
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9N-00032e-C3
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:55:53 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86: comment update after "drop high compat r/o M2P
 table address range"
Message-Id: <E1k4D9N-00032e-C3@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:55:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 2e98d0b1d09e99e3d1287cb13f42b604ebc3c29a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:21:22 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:21:22 2020 +0200

    x86: comment update after "drop high compat r/o M2P table address range"
    
    Commit 5af040ef8b57 clearly should also have updated the comment, not
    just the #define-s.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/include/asm-x86/config.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 2ba234383d..665e9cc31d 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -144,18 +144,16 @@ extern unsigned char boot_edid_info[128];
  *  0xffff82d000000000 - 0xffff82d03fffffff [1GB,   2^30 bytes, PML4:261]
  *    Compatibility machine-to-phys translation table.
  *  0xffff82d040000000 - 0xffff82d07fffffff [1GB,   2^30 bytes, PML4:261]
- *    High read-only compatibility machine-to-phys translation table.
- *  0xffff82d080000000 - 0xffff82d0bfffffff [1GB,   2^30 bytes, PML4:261]
  *    Xen text, static data, bss.
 #ifndef CONFIG_BIGMEM
- *  0xffff82d0c0000000 - 0xffff82dfffffffff [61GB,              PML4:261]
+ *  0xffff82d080000000 - 0xffff82dfffffffff [62GB,              PML4:261]
  *    Reserved for future use.
  *  0xffff82e000000000 - 0xffff82ffffffffff [128GB, 2^37 bytes, PML4:261]
  *    Page-frame information array.
  *  0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271]
  *    1:1 direct mapping of all physical memory.
 #else
- *  0xffff82d0c0000000 - 0xffff82ffffffffff [189GB,             PML4:261]
+ *  0xffff82d080000000 - 0xffff82ffffffffff [190GB,             PML4:261]
  *    Reserved for future use.
  *  0xffff830000000000 - 0xffff847fffffffff [1.5TB, 3*2^39 bytes, PML4:262-264]
  *    Page-frame information array.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:56:04 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:56:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D9Y-0005Mh-Qz; Sat, 08 Aug 2020 00:56:04 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D9Y-0005Ma-2S
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:04 +0000
X-Inumbo-ID: 3bd9c2ae-78cc-4f0b-9d38-716a6533ef6c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3bd9c2ae-78cc-4f0b-9d38-716a6533ef6c;
 Sat, 08 Aug 2020 00:56:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=TDpenWuhVVvbZu/eY961GCixyKvfbgBrnoqYahHk/60=; b=We7Gc9J8xj4wI6LWCmBh2bpeED
 z0pewBeBcvuzXKDT2aQXuw6FEdpTEKnmew2wwc3cn7swkPUP+G3nI9eodb0cjeoc2fhG2JeSc9hwy
 dX5ZuRLPDsnnVPhwslvFcDDQlmXqsrT6FmSNDv6z2b1BCZOU+UKj2QI171TFSNPs8QBU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9X-0000fh-Fs
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9X-00033S-F1
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:03 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: adjustments to mem access / write logic testing
Message-Id: <E1k4D9X-00033S-F1@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:56:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit df8fb11d8880cb0f4f1bbcff1700d0a80e0f6983
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:26:11 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:26:11 2020 +0200

    x86emul: adjustments to mem access / write logic testing
    
    The combination of specifying a ModR/M byte with the upper two bits set
    and the modrm field set to T is pointless - the same test will be
    executed twice, i.e. overall things will be slower for no extra gain. I
    can only assume this was a copy-and-paste-without-enough-editing mistake
    of mine.
    
    Furthermore adjust the base type of a few bit fields to shrink table
    size, as subsequently quite a few new entries will get added to the
    tables using this type.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 80 +++++++++++++++++------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 80491ef3ed..156bbf1502 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -21,8 +21,8 @@ static const struct {
     uint8_t opc[8];
     uint8_t len[2]; /* 32- and 64-bit mode */
     bool modrm:1; /* Should register form (also) be tested? */
-    unsigned int mem:2;
-    unsigned int pfx:2;
+    uint8_t mem:2;
+    uint8_t pfx:2;
 #define REG(opc, more...) \
     { { (opc) | 0 }, more }, /* %?ax */ \
     { { (opc) | 1 }, more }, /* %?cx */ \
@@ -334,53 +334,53 @@ static const struct {
     /*{ 0x01, 0x28 }, { 2, 2 }, F, W, pfx_f3 }, rstorssp */
     { { 0x01, 0x30 }, { 2, 2 }, T, R }, /* lmsw */
     { { 0x01, 0x38 }, { 2, 2 }, F, N }, /* invlpg */
-    { { 0x01, 0xc0 }, { 2, 2 }, T, N }, /* enclv */
-    { { 0x01, 0xc1 }, { 2, 2 }, T, N }, /* vmcall */
+    { { 0x01, 0xc0 }, { 2, 2 }, F, N }, /* enclv */
+    { { 0x01, 0xc1 }, { 2, 2 }, F, N }, /* vmcall */
     /*{ 0x01, 0xc2 }, { 2, 2 }, F, R }, vmlaunch */
     /*{ 0x01, 0xc3 }, { 2, 2 }, F, R }, vmresume */
-    { { 0x01, 0xc4 }, { 2, 2 }, T, N }, /* vmxoff */
-    { { 0x01, 0xc5 }, { 2, 2 }, T, N }, /* pconfig */
-    { { 0x01, 0xc8 }, { 2, 2 }, T, N }, /* monitor */
-    { { 0x01, 0xc9 }, { 2, 2 }, T, N }, /* mwait */
-    { { 0x01, 0xca }, { 2, 2 }, T, N }, /* clac */
-    { { 0x01, 0xcb }, { 2, 2 }, T, N }, /* stac */
-    { { 0x01, 0xcf }, { 2, 2 }, T, N }, /* encls */
-    { { 0x01, 0xd0 }, { 2, 2 }, T, N }, /* xgetbv */
-    { { 0x01, 0xd1 }, { 2, 2 }, T, N }, /* xsetbv */
-    { { 0x01, 0xd4 }, { 2, 2 }, T, N }, /* vmfunc */
-    { { 0x01, 0xd5 }, { 2, 2 }, T, N }, /* xend */
-    { { 0x01, 0xd6 }, { 2, 2 }, T, N }, /* xtest */
-    { { 0x01, 0xd7 }, { 2, 2 }, T, N }, /* enclu */
+    { { 0x01, 0xc4 }, { 2, 2 }, F, N }, /* vmxoff */
+    { { 0x01, 0xc5 }, { 2, 2 }, F, N }, /* pconfig */
+    { { 0x01, 0xc8 }, { 2, 2 }, F, N }, /* monitor */
+    { { 0x01, 0xc9 }, { 2, 2 }, F, N }, /* mwait */
+    { { 0x01, 0xca }, { 2, 2 }, F, N }, /* clac */
+    { { 0x01, 0xcb }, { 2, 2 }, F, N }, /* stac */
+    { { 0x01, 0xcf }, { 2, 2 }, F, N }, /* encls */
+    { { 0x01, 0xd0 }, { 2, 2 }, F, N }, /* xgetbv */
+    { { 0x01, 0xd1 }, { 2, 2 }, F, N }, /* xsetbv */
+    { { 0x01, 0xd4 }, { 2, 2 }, F, N }, /* vmfunc */
+    { { 0x01, 0xd5 }, { 2, 2 }, F, N }, /* xend */
+    { { 0x01, 0xd6 }, { 2, 2 }, F, N }, /* xtest */
+    { { 0x01, 0xd7 }, { 2, 2 }, F, N }, /* enclu */
     /*{ 0x01, 0xd8 }, { 2, 2 }, F, R }, vmrun */
-    { { 0x01, 0xd9 }, { 2, 2 }, T, N }, /* vmcall */
-    { { 0x01, 0xd9 }, { 2, 2 }, T, N, pfx_f3 }, /* vmgexit */
-    { { 0x01, 0xd9 }, { 2, 2 }, T, N, pfx_f2 }, /* vmgexit */
+    { { 0x01, 0xd9 }, { 2, 2 }, F, N }, /* vmcall */
+    { { 0x01, 0xd9 }, { 2, 2 }, F, N, pfx_f3 }, /* vmgexit */
+    { { 0x01, 0xd9 }, { 2, 2 }, F, N, pfx_f2 }, /* vmgexit */
     /*{ 0x01, 0xda }, { 2, 2 }, F, R }, vmload */
     /*{ 0x01, 0xdb }, { 2, 2 }, F, W }, vmsave */
-    { { 0x01, 0xdc }, { 2, 2 }, T, N }, /* stgi */
-    { { 0x01, 0xdd }, { 2, 2 }, T, N }, /* clgi */
+    { { 0x01, 0xdc }, { 2, 2 }, F, N }, /* stgi */
+    { { 0x01, 0xdd }, { 2, 2 }, F, N }, /* clgi */
     /*{ 0x01, 0xde }, { 2, 2 }, F, R }, skinit */
-    { { 0x01, 0xdf }, { 2, 2 }, T, N }, /* invlpga */
-    { { 0x01, 0xe8 }, { 2, 2 }, T, N }, /* serialize */
+    { { 0x01, 0xdf }, { 2, 2 }, F, N }, /* invlpga */
+    { { 0x01, 0xe8 }, { 2, 2 }, F, N }, /* serialize */
     /*{ 0x01, 0xe8 }, { 2, 2 }, F, W, pfx_f3 }, setssbsy */
-    { { 0x01, 0xe8 }, { 2, 2 }, T, N, pfx_f2 }, /* xsusldtrk */
-    { { 0x01, 0xe9 }, { 2, 2 }, T, N, pfx_f2 }, /* xresldtrk */
+    { { 0x01, 0xe8 }, { 2, 2 }, F, N, pfx_f2 }, /* xsusldtrk */
+    { { 0x01, 0xe9 }, { 2, 2 }, F, N, pfx_f2 }, /* xresldtrk */
     /*{ 0x01, 0xea }, { 2, 2 }, F, W, pfx_f3 }, saveprevssp */
-    { { 0x01, 0xee }, { 2, 2 }, T, N }, /* rdpkru */
-    { { 0x01, 0xef }, { 2, 2 }, T, N }, /* wrpkru */
-    { { 0x01, 0xf8 }, { 0, 2 }, T, N }, /* swapgs */
-    { { 0x01, 0xf9 }, { 2, 2 }, T, N }, /* rdtscp */
-    { { 0x01, 0xfa }, { 2, 2 }, T, N }, /* monitorx */
-    { { 0x01, 0xfa }, { 2, 2 }, T, N, pfx_f3 }, /* mcommit */
-    { { 0x01, 0xfb }, { 2, 2 }, T, N }, /* mwaitx */
+    { { 0x01, 0xee }, { 2, 2 }, F, N }, /* rdpkru */
+    { { 0x01, 0xef }, { 2, 2 }, F, N }, /* wrpkru */
+    { { 0x01, 0xf8 }, { 0, 2 }, F, N }, /* swapgs */
+    { { 0x01, 0xf9 }, { 2, 2 }, F, N }, /* rdtscp */
+    { { 0x01, 0xfa }, { 2, 2 }, F, N }, /* monitorx */
+    { { 0x01, 0xfa }, { 2, 2 }, F, N, pfx_f3 }, /* mcommit */
+    { { 0x01, 0xfb }, { 2, 2 }, F, N }, /* mwaitx */
     { { 0x01, 0xfc }, { 2, 2 }, F, W }, /* clzero */
-    { { 0x01, 0xfd }, { 2, 2 }, T, N }, /* rdpru */
-    { { 0x01, 0xfe }, { 2, 2 }, T, N }, /* invlpgb */
-    { { 0x01, 0xfe }, { 0, 2 }, T, N, pfx_f3 }, /* rmpadjust */
-    { { 0x01, 0xfe }, { 0, 2 }, T, N, pfx_f2 }, /* rmpupdate */
-    { { 0x01, 0xff }, { 2, 2 }, T, N }, /* tlbsync */
-    { { 0x01, 0xff }, { 0, 2 }, T, N, pfx_f3 }, /* psmash */
-    { { 0x01, 0xff }, { 0, 2 }, T, N, pfx_f2 }, /* pvalidate */
+    { { 0x01, 0xfd }, { 2, 2 }, F, N }, /* rdpru */
+    { { 0x01, 0xfe }, { 2, 2 }, F, N }, /* invlpgb */
+    { { 0x01, 0xfe }, { 0, 2 }, F, N, pfx_f3 }, /* rmpadjust */
+    { { 0x01, 0xfe }, { 0, 2 }, F, N, pfx_f2 }, /* rmpupdate */
+    { { 0x01, 0xff }, { 2, 2 }, F, N }, /* tlbsync */
+    { { 0x01, 0xff }, { 0, 2 }, F, N, pfx_f3 }, /* psmash */
+    { { 0x01, 0xff }, { 0, 2 }, F, N, pfx_f2 }, /* pvalidate */
     { { 0x02 }, { 2, 2 }, T, R }, /* lar */
     { { 0x03 }, { 2, 2 }, T, R }, /* lsl */
     { { 0x05 }, { 1, 1 }, F, N }, /* syscall */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:56:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:56:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D9i-0005ON-UD; Sat, 08 Aug 2020 00:56:14 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D9i-0005OH-6S
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:14 +0000
X-Inumbo-ID: b16a2b3c-6037-46cd-9083-5d05fa350ddd
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id b16a2b3c-6037-46cd-9083-5d05fa350ddd;
 Sat, 08 Aug 2020 00:56:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=aTlI9B6wquQLxH+k4Wv/un1Pg9Y1VkaNFZxV/1mPkw0=; b=H09rjnmG8I2avWpE32liXUl2jT
 QoUDCUdyx728SS/sho7cClfYx5JLIjyYU+7LWAOaexD3Dy/n1ZhR8XzlONpDcxKDJHiIFoCDl0YQg
 UTAWrA+QMZGCW9q66HbdZhioc3eQMEssbw3wCNX+do1kcZt93rIi5iizuifb8lw4ORrs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9h-0000fw-Iz
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9h-000344-I4
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:13 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: extend decoding / mem access testing to FPU
 insns
Message-Id: <E1k4D9h-000344-I4@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:56:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 37b7b1571bedbbe93392a1f51da501d88985071c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:26:59 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:26:59 2020 +0200

    x86emul: extend decoding / mem access testing to FPU insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 142 ++++++++++++++++++++++++++++++++++
 1 file changed, 142 insertions(+)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 156bbf1502..af06a1d282 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -517,6 +517,138 @@ static const struct {
 };
 #undef CND
 #undef REG
+static const struct {
+    uint8_t opc[2];
+    bool modrm:1; /* Should register form (also) be tested? */
+    uint8_t mem:2;
+} fpu[] = {
+    { { 0xd8, 0x00 }, T, R }, /* fadd */
+    { { 0xd8, 0x08 }, T, R }, /* fmul */
+    { { 0xd8, 0x10 }, T, R }, /* fcom */
+    { { 0xd8, 0x18 }, T, R }, /* fcomp */
+    { { 0xd8, 0x20 }, T, R }, /* fsub */
+    { { 0xd8, 0x28 }, T, R }, /* fsubr */
+    { { 0xd8, 0x30 }, T, R }, /* fdiv */
+    { { 0xd8, 0x38 }, T, R }, /* fdivr */
+    { { 0xd9, 0x00 }, T, R }, /* fld */
+    { { 0xd9, 0x10 }, F, W }, /* fst */
+    { { 0xd9, 0x18 }, T, W }, /* fstp */
+    { { 0xd9, 0x20 }, F, R }, /* fldenv */
+    { { 0xd9, 0x28 }, F, R }, /* fldcw */
+    { { 0xd9, 0x30 }, F, W }, /* fnstenv */
+    { { 0xd9, 0x38 }, F, W }, /* fnstcw */
+    { { 0xd9, 0xc8 }, F, N }, /* fxch */
+    { { 0xd9, 0xd0 }, F, N }, /* fnop */
+    { { 0xd9, 0xe0 }, F, N }, /* fchs */
+    { { 0xd9, 0xe1 }, F, N }, /* fabs */
+    { { 0xd9, 0xe4 }, F, N }, /* ftst */
+    { { 0xd9, 0xe5 }, F, N }, /* fxam */
+    { { 0xd9, 0xe6 }, F, N }, /* ftstp */
+    { { 0xd9, 0xe8 }, F, N }, /* fld1 */
+    { { 0xd9, 0xe9 }, F, N }, /* fldl2t */
+    { { 0xd9, 0xea }, F, N }, /* fldl2e */
+    { { 0xd9, 0xeb }, F, N }, /* fldpi */
+    { { 0xd9, 0xec }, F, N }, /* fldlg2 */
+    { { 0xd9, 0xed }, F, N }, /* fldln2 */
+    { { 0xd9, 0xee }, F, N }, /* fldz */
+    { { 0xd9, 0xf0 }, F, N }, /* f2xm1 */
+    { { 0xd9, 0xf1 }, F, N }, /* fyl2x */
+    { { 0xd9, 0xf2 }, F, N }, /* fptan */
+    { { 0xd9, 0xf3 }, F, N }, /* fpatan */
+    { { 0xd9, 0xf4 }, F, N }, /* fxtract */
+    { { 0xd9, 0xf5 }, F, N }, /* fprem1 */
+    { { 0xd9, 0xf6 }, F, N }, /* fdecstp */
+    { { 0xd9, 0xf7 }, F, N }, /* fincstp */
+    { { 0xd9, 0xf8 }, F, N }, /* fprem */
+    { { 0xd9, 0xf9 }, F, N }, /* fyl2xp1 */
+    { { 0xd9, 0xfa }, F, N }, /* fsqrt */
+    { { 0xd9, 0xfb }, F, N }, /* fsincos */
+    { { 0xd9, 0xfc }, F, N }, /* frndint */
+    { { 0xd9, 0xfd }, F, N }, /* fscale */
+    { { 0xd9, 0xfe }, F, N }, /* fsin */
+    { { 0xd9, 0xff }, F, N }, /* fcos */
+    { { 0xda, 0x00 }, F, R }, /* fiadd */
+    { { 0xda, 0x08 }, F, R }, /* fimul */
+    { { 0xda, 0x10 }, F, R }, /* ficom */
+    { { 0xda, 0x18 }, F, R }, /* ficomp */
+    { { 0xda, 0x20 }, F, R }, /* fisub */
+    { { 0xda, 0x28 }, F, R }, /* fisubr */
+    { { 0xda, 0x30 }, F, R }, /* fidiv */
+    { { 0xda, 0x38 }, F, R }, /* fidivr */
+    { { 0xda, 0xc0 }, F, N }, /* fcmovb */
+    { { 0xda, 0xc8 }, F, N }, /* fcmove */
+    { { 0xda, 0xd0 }, F, N }, /* fcmovbe */
+    { { 0xda, 0xd8 }, F, N }, /* fcmovu */
+    { { 0xda, 0xe9 }, F, N }, /* fucompp */
+    { { 0xdb, 0x00 }, F, R }, /* fild */
+    { { 0xdb, 0x08 }, F, W }, /* fisttp */
+    { { 0xdb, 0x10 }, F, W }, /* fist */
+    { { 0xdb, 0x18 }, F, W }, /* fistp */
+    { { 0xdb, 0x28 }, F, R }, /* fld */
+    { { 0xdb, 0x38 }, F, W }, /* fstp */
+    { { 0xdb, 0xc0 }, F, N }, /* fcmovnb */
+    { { 0xdb, 0xc8 }, F, N }, /* fcmovne */
+    { { 0xdb, 0xd0 }, F, N }, /* fcmovnbe */
+    { { 0xdb, 0xd8 }, F, N }, /* fcmovnu */
+    { { 0xdb, 0xe0 }, F, N }, /* fneni */
+    { { 0xdb, 0xe1 }, F, N }, /* fndisi */
+    { { 0xdb, 0xe2 }, F, N }, /* fnclex */
+    { { 0xdb, 0xe3 }, F, N }, /* fninit */
+    { { 0xdb, 0xe4 }, F, N }, /* fsetpm */
+    { { 0xdb, 0xe5 }, F, N }, /* frstpm */
+    { { 0xdb, 0xe8 }, F, N }, /* fucomi */
+    { { 0xdb, 0xf0 }, F, N }, /* fcomi */
+    { { 0xdc, 0x00 }, T, R }, /* fadd */
+    { { 0xdc, 0x08 }, T, R }, /* fmul */
+    { { 0xdc, 0x10 }, T, R }, /* fcom */
+    { { 0xdc, 0x18 }, T, R }, /* fcomp */
+    { { 0xdc, 0x20 }, T, R }, /* fsub */
+    { { 0xdc, 0x28 }, T, R }, /* fsubr */
+    { { 0xdc, 0x30 }, T, R }, /* fdiv */
+    { { 0xdc, 0x38 }, T, R }, /* fdivr */
+    { { 0xdd, 0x00 }, F, R }, /* fld */
+    { { 0xdd, 0x08 }, F, W }, /* fisttp */
+    { { 0xdd, 0x10 }, T, W }, /* fst */
+    { { 0xdd, 0x18 }, T, W }, /* fstp */
+    { { 0xdd, 0x20 }, F, R }, /* frstor */
+    { { 0xdd, 0x30 }, F, W }, /* fnsave */
+    { { 0xdd, 0x38 }, F, W }, /* fnstsw */
+    { { 0xdd, 0xc0 }, F, N }, /* ffree */
+    { { 0xdd, 0xc8 }, F, N }, /* fxch */
+    { { 0xdd, 0xe0 }, F, N }, /* fucom */
+    { { 0xdd, 0xe8 }, F, N }, /* fucomp */
+    { { 0xde, 0x00 }, F, R }, /* fiadd */
+    { { 0xde, 0x08 }, F, R }, /* fimul */
+    { { 0xde, 0x10 }, F, R }, /* ficom */
+    { { 0xde, 0x18 }, F, R }, /* ficomp */
+    { { 0xde, 0x20 }, F, R }, /* fisub */
+    { { 0xde, 0x28 }, F, R }, /* fisubr */
+    { { 0xde, 0x30 }, F, R }, /* fidiv */
+    { { 0xde, 0x38 }, F, R }, /* fidivr */
+    { { 0xde, 0xc0 }, F, N }, /* faddp */
+    { { 0xde, 0xc8 }, F, N }, /* fmulp */
+    { { 0xde, 0xd0 }, F, N }, /* fcomp */
+    { { 0xde, 0xd9 }, F, N }, /* fcompp */
+    { { 0xde, 0xe0 }, F, N }, /* fsubrp */
+    { { 0xde, 0xe8 }, F, N }, /* fsubp */
+    { { 0xde, 0xf0 }, F, N }, /* fdivrp */
+    { { 0xde, 0xf8 }, F, N }, /* fdivp */
+    { { 0xdf, 0x00 }, F, R }, /* fild */
+    { { 0xdf, 0x08 }, F, W }, /* fisttp */
+    { { 0xdf, 0x10 }, F, W }, /* fist */
+    { { 0xdf, 0x18 }, F, W }, /* fistp */
+    { { 0xdf, 0x20 }, F, R }, /* fbld */
+    { { 0xdf, 0x28 }, F, R }, /* fild */
+    { { 0xdf, 0x30 }, F, W }, /* fbstp */
+    { { 0xdf, 0x38 }, F, W }, /* fistp */
+    { { 0xdf, 0xc0 }, F, N }, /* ffreep */
+    { { 0xdf, 0xc8 }, F, N }, /* fxch */
+    { { 0xdf, 0xd0 }, F, N }, /* fstp */
+    { { 0xdf, 0xd8 }, F, N }, /* fstp */
+    { { 0xdf, 0xe0 }, F, N }, /* fnstsw */
+    { { 0xdf, 0xe8 }, F, N }, /* fucomip */
+    { { 0xdf, 0xf0 }, F, N }, /* fcomip */
+};
 #undef F
 #undef N
 #undef R
@@ -667,6 +799,16 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
                     legacy_0f38[t].mem, ctxt, fetch);
         }
 
+        memset(instr + ARRAY_SIZE(fpu[t].opc), 0xcc, 13);
+
+        for ( t = 0; t < ARRAY_SIZE(fpu); ++t )
+        {
+            memcpy(instr, fpu[t].opc, ARRAY_SIZE(fpu[t].opc));
+
+            do_test(instr, ARRAY_SIZE(fpu[t].opc), fpu[t].modrm, fpu[t].mem,
+                    ctxt, fetch);
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:56:26 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:56:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4D9t-0005PS-Vw; Sat, 08 Aug 2020 00:56:25 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4D9s-0005PI-By
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:24 +0000
X-Inumbo-ID: 0c5a0360-90b5-481d-ba13-cbd8958225b3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 0c5a0360-90b5-481d-ba13-cbd8958225b3;
 Sat, 08 Aug 2020 00:56:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=UXJ4fvB4j9dmwi5Y1jXfaLuX1uOaZQ71ZKgJoZ0Qz7c=; b=MJyn28P3paaUhyQu4fmPlcveSZ
 p98JPIOce2UyHXfD1+2+/4nvrjgS9F4kYwk9+aNsHc4BDyvdVttK7pDGIo/eA3gLzfJB8iElLcXct
 Et07hrBEmMdbBh+JhRkROqxfxeM7MMsy9Q+0r8KLP6uBrZ0avQ7ESEaFCRVolEfeloZw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9r-0000hU-MA
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4D9r-00034t-LD
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: extend decoding / mem access testing to MMX /
 SSE insns
Message-Id: <E1k4D9r-00034t-LD@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:56:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d9dad3584b63f7a4d1a33ee3a4b637b4b0d36856
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:27:11 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:27:11 2020 +0200

    x86emul: extend decoding / mem access testing to MMX / SSE insns
    
    IOW just legacy encoded ones. For 3dNow! just one example is used, as
    they're all similar in nature both encoding- and operand-wise.
    
    Rename pfx_none to pfx_no, so it can be used to improve readability /
    column alignment.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 404 +++++++++++++++++++++++++++++++++-
 1 file changed, 403 insertions(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index af06a1d282..7897df94c2 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -3,7 +3,7 @@
 #include <stdio.h>
 
 enum mem_access { mem_none, mem_read, mem_write };
-enum pfx { pfx_none, pfx_66, pfx_f3, pfx_f2 };
+enum pfx { pfx_no, pfx_66, pfx_f3, pfx_f2 };
 static const uint8_t prefixes[] = { 0x66, 0xf3, 0xf2 };
 
 #define F false
@@ -393,6 +393,30 @@ static const struct {
     { { 0x0d, 0x00 }, { 2, 2 }, F, N }, /* prefetch */
     { { 0x0d, 0x08 }, { 2, 2 }, F, N }, /* prefetchw */
     { { 0x0e }, { 1, 1 }, F, N }, /* femms */
+    { { 0x0f, 0x00, 0x9e }, { 3, 3 }, T, R }, /* pfadd */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_no }, /* movups */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_66 }, /* movupd */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_f3 }, /* movss */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_f2 }, /* movsd */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_no }, /* movups */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_66 }, /* movupd */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_f3 }, /* movss */
+    { { 0x11 }, { 2, 2 }, T, W, pfx_f2 }, /* movsd */
+    { { 0x12 }, { 2, 2 }, T, R, pfx_no }, /* movlps / movhlps */
+    { { 0x12 }, { 2, 2 }, F, R, pfx_66 }, /* movlpd */
+    { { 0x12 }, { 2, 2 }, T, R, pfx_f3 }, /* movsldup */
+    { { 0x12 }, { 2, 2 }, T, R, pfx_f2 }, /* movddup */
+    { { 0x13 }, { 2, 2 }, F, W, pfx_no }, /* movlps */
+    { { 0x13 }, { 2, 2 }, F, W, pfx_66 }, /* movlpd */
+    { { 0x14 }, { 2, 2 }, T, R, pfx_no }, /* unpcklps */
+    { { 0x14 }, { 2, 2 }, T, R, pfx_66 }, /* unpcklpd */
+    { { 0x15 }, { 2, 2 }, T, R, pfx_no }, /* unpckhps */
+    { { 0x15 }, { 2, 2 }, T, R, pfx_66 }, /* unpckhpd */
+    { { 0x16 }, { 2, 2 }, T, R, pfx_no }, /* movhps / movlhps */
+    { { 0x16 }, { 2, 2 }, F, R, pfx_66 }, /* movhpd */
+    { { 0x16 }, { 2, 2 }, T, R, pfx_f3 }, /* movshdup */
+    { { 0x17 }, { 2, 2 }, F, W, pfx_no }, /* movhps */
+    { { 0x17 }, { 2, 2 }, F, W, pfx_66 }, /* movhpd */
     { { 0x18, 0x00 }, { 2, 2 }, F, N }, /* prefetchnta */
     { { 0x18, 0x08 }, { 2, 2 }, F, N }, /* prefetch0 */
     { { 0x18, 0x10 }, { 2, 2 }, F, N }, /* prefetch1 */
@@ -414,6 +438,30 @@ static const struct {
     { { 0x21 }, { 2, 2 }, T, N }, /* mov */
     { { 0x22 }, { 2, 2 }, T, N }, /* mov */
     { { 0x23 }, { 2, 2 }, T, N }, /* mov */
+    { { 0x28 }, { 2, 2 }, T, R, pfx_no }, /* movaps */
+    { { 0x28 }, { 2, 2 }, T, R, pfx_66 }, /* movapd */
+    { { 0x29 }, { 2, 2 }, T, W, pfx_no }, /* movaps */
+    { { 0x29 }, { 2, 2 }, T, W, pfx_66 }, /* movapd */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_no }, /* cvtpi2ps */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_66 }, /* cvtpi2pd */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_f3 }, /* cvtsi2ss */
+    { { 0x2a }, { 2, 2 }, T, R, pfx_f2 }, /* cvtsi2sd */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_no }, /* movntps */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_66 }, /* movntpd */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_f3 }, /* movntss */
+    { { 0x2b }, { 2, 2 }, T, W, pfx_f2 }, /* movntsd */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_no }, /* cvttps2pi */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_66 }, /* cvttpd2pi */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_f3 }, /* cvttss2si */
+    { { 0x2c }, { 2, 2 }, T, R, pfx_f2 }, /* cvttsd2si */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_no }, /* cvtps2pi */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_66 }, /* cvtpd2pi */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_f3 }, /* cvtss2si */
+    { { 0x2d }, { 2, 2 }, T, R, pfx_f2 }, /* cvtsd2si */
+    { { 0x2e }, { 2, 2 }, T, R, pfx_no }, /* ucomiss */
+    { { 0x2e }, { 2, 2 }, T, R, pfx_66 }, /* ucomisd */
+    { { 0x2f }, { 2, 2 }, T, R, pfx_no }, /* comiss */
+    { { 0x2f }, { 2, 2 }, T, R, pfx_66 }, /* comisd */
     { { 0x30 }, { 1, 1 }, F, N }, /* wrmsr */
     { { 0x31 }, { 1, 1 }, F, N }, /* rdtsc */
     { { 0x32 }, { 1, 1 }, F, N }, /* rdmsr */
@@ -421,8 +469,131 @@ static const struct {
     { { 0x34 }, { 1, 1 }, F, N }, /* sysenter */
     { { 0x35 }, { 1, 1 }, F, N }, /* sysexit */
     CND(0x40,   { 2, 2 }, T, R ), /* cmov<cc> */
+    { { 0x50, 0xc0 }, { 2, 2 }, F, N, pfx_no }, /* movmskps */
+    { { 0x50, 0xc0 }, { 2, 2 }, F, N, pfx_66 }, /* movmskpd */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_no }, /* sqrtps */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_66 }, /* sqrtpd */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_f3 }, /* sqrtss */
+    { { 0x51 }, { 2, 2 }, T, R, pfx_f2 }, /* sqrtsd */
+    { { 0x52 }, { 2, 2 }, T, R, pfx_no }, /* rsqrtps */
+    { { 0x52 }, { 2, 2 }, T, R, pfx_f3 }, /* rsqrtss */
+    { { 0x53 }, { 2, 2 }, T, R, pfx_no }, /* rcpps */
+    { { 0x53 }, { 2, 2 }, T, R, pfx_f3 }, /* rcpss */
+    { { 0x54 }, { 2, 2 }, T, R, pfx_no }, /* andps */
+    { { 0x54 }, { 2, 2 }, T, R, pfx_66 }, /* andpd */
+    { { 0x55 }, { 2, 2 }, T, R, pfx_no }, /* andnps */
+    { { 0x55 }, { 2, 2 }, T, R, pfx_66 }, /* andnpd */
+    { { 0x56 }, { 2, 2 }, T, R, pfx_no }, /* orps */
+    { { 0x56 }, { 2, 2 }, T, R, pfx_66 }, /* orpd */
+    { { 0x57 }, { 2, 2 }, T, R, pfx_no }, /* xorps */
+    { { 0x57 }, { 2, 2 }, T, R, pfx_66 }, /* xorpd */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_no }, /* addps */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_66 }, /* addpd */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_f3 }, /* addss */
+    { { 0x58 }, { 2, 2 }, T, R, pfx_f2 }, /* addsd */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_no }, /* mulps */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_66 }, /* mulpd */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_f3 }, /* mulss */
+    { { 0x59 }, { 2, 2 }, T, R, pfx_f2 }, /* mulsd */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_no }, /* cvtps2pd */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_66 }, /* cvtpd2ps */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_f3 }, /* cvtss2sd */
+    { { 0x5a }, { 2, 2 }, T, R, pfx_f2 }, /* cvtsd2ss */
+    { { 0x5b }, { 2, 2 }, T, R, pfx_no }, /* cvtdq2ps */
+    { { 0x5b }, { 2, 2 }, T, R, pfx_66 }, /* cvtps2dq */
+    { { 0x5b }, { 2, 2 }, T, R, pfx_f3 }, /* cvttps2dq */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_no }, /* subps */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_66 }, /* subpd */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_f3 }, /* subss */
+    { { 0x5c }, { 2, 2 }, T, R, pfx_f2 }, /* subsd */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_no }, /* minps */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_66 }, /* minpd */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_f3 }, /* minss */
+    { { 0x5d }, { 2, 2 }, T, R, pfx_f2 }, /* minsd */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_no }, /* divps */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_66 }, /* divpd */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_f3 }, /* divss */
+    { { 0x5e }, { 2, 2 }, T, R, pfx_f2 }, /* divsd */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_no }, /* maxps */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_66 }, /* maxpd */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_f3 }, /* maxss */
+    { { 0x5f }, { 2, 2 }, T, R, pfx_f2 }, /* maxsd */
+    { { 0x60 }, { 2, 2 }, T, R, pfx_no }, /* punpcklbw */
+    { { 0x60 }, { 2, 2 }, T, R, pfx_66 }, /* punpcklbw */
+    { { 0x61 }, { 2, 2 }, T, R, pfx_no }, /* punpcklwd */
+    { { 0x61 }, { 2, 2 }, T, R, pfx_66 }, /* punpcklwd */
+    { { 0x62 }, { 2, 2 }, T, R, pfx_no }, /* punpckldq */
+    { { 0x62 }, { 2, 2 }, T, R, pfx_66 }, /* punpckldq */
+    { { 0x63 }, { 2, 2 }, T, R, pfx_no }, /* packsswb */
+    { { 0x63 }, { 2, 2 }, T, R, pfx_66 }, /* packsswb */
+    { { 0x64 }, { 2, 2 }, T, R, pfx_no }, /* pcmpgtb */
+    { { 0x64 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtb */
+    { { 0x65 }, { 2, 2 }, T, R, pfx_no }, /* pcmpgtw */
+    { { 0x65 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtw */
+    { { 0x66 }, { 2, 2 }, T, R, pfx_no }, /* pcmpgtd */
+    { { 0x66 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtd */
+    { { 0x67 }, { 2, 2 }, T, R, pfx_no }, /* packuswb */
+    { { 0x67 }, { 2, 2 }, T, R, pfx_66 }, /* packuswb */
+    { { 0x68 }, { 2, 2 }, T, R, pfx_no }, /* punpckhbw */
+    { { 0x68 }, { 2, 2 }, T, R, pfx_66 }, /* punpckhbw */
+    { { 0x69 }, { 2, 2 }, T, R, pfx_no }, /* punpckhwd */
+    { { 0x69 }, { 2, 2 }, T, R, pfx_66 }, /* punpckhwd */
+    { { 0x6a }, { 2, 2 }, T, R, pfx_no }, /* punpckhdq */
+    { { 0x6a }, { 2, 2 }, T, R, pfx_66 }, /* punpckhdq */
+    { { 0x6b }, { 2, 2 }, T, R, pfx_no }, /* packssdw */
+    { { 0x6b }, { 2, 2 }, T, R, pfx_66 }, /* packssdw */
+    { { 0x6c }, { 2, 2 }, T, R, pfx_66 }, /* punpcklqdq */
+    { { 0x6d }, { 2, 2 }, T, R, pfx_66 }, /* punpckhqdq */
+    { { 0x6e }, { 2, 2 }, T, R, pfx_no }, /* movd */
+    { { 0x6e }, { 2, 2 }, T, R, pfx_66 }, /* movd */
+    { { 0x6f }, { 2, 2 }, T, R, pfx_no }, /* movq */
+    { { 0x6f }, { 2, 2 }, T, R, pfx_66 }, /* movdqa */
+    { { 0x6f }, { 2, 2 }, T, R, pfx_f3 }, /* movdqu */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_no }, /* pshufw */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_66 }, /* pshufd */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_f3 }, /* pshuflw */
+    { { 0x70 }, { 3, 3 }, T, R, pfx_f2 }, /* pshufhw */
+    { { 0x71, 0xd0 }, { 3, 3 }, F, N, pfx_no }, /* psrlw */
+    { { 0x71, 0xd0 }, { 3, 3 }, F, N, pfx_66 }, /* psrlw */
+    { { 0x71, 0xe0 }, { 3, 3 }, F, N, pfx_no }, /* psraw */
+    { { 0x71, 0xe0 }, { 3, 3 }, F, N, pfx_66 }, /* psraw */
+    { { 0x71, 0xf0 }, { 3, 3 }, F, N, pfx_no }, /* psllw */
+    { { 0x71, 0xf0 }, { 3, 3 }, F, N, pfx_66 }, /* psllw */
+    { { 0x72, 0xd0 }, { 3, 3 }, F, N, pfx_no }, /* psrld */
+    { { 0x72, 0xd0 }, { 3, 3 }, F, N, pfx_66 }, /* psrld */
+    { { 0x72, 0xe0 }, { 3, 3 }, F, N, pfx_no }, /* psrad */
+    { { 0x72, 0xe0 }, { 3, 3 }, F, N, pfx_66 }, /* psrad */
+    { { 0x72, 0xf0 }, { 3, 3 }, F, N, pfx_no }, /* pslld */
+    { { 0x72, 0xf0 }, { 3, 3 }, F, N, pfx_66 }, /* pslld */
+    { { 0x73, 0xd0 }, { 3, 3 }, F, N, pfx_no }, /* psrlq */
+    { { 0x73, 0xd0 }, { 3, 3 }, F, N, pfx_66 }, /* psrlq */
+    { { 0x73, 0xd8 }, { 3, 3 }, F, N, pfx_66 }, /* psrldq */
+    { { 0x73, 0xf0 }, { 3, 3 }, F, N, pfx_no }, /* psllq */
+    { { 0x73, 0xf0 }, { 3, 3 }, F, N, pfx_66 }, /* psllq */
+    { { 0x73, 0xf8 }, { 3, 3 }, F, N, pfx_66 }, /* pslldq */
+    { { 0x74 }, { 2, 2 }, T, R, pfx_no }, /* pcmpeqb */
+    { { 0x74 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqb */
+    { { 0x75 }, { 2, 2 }, T, R, pfx_no }, /* pcmpeqw */
+    { { 0x75 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqw */
+    { { 0x76 }, { 2, 2 }, T, R, pfx_no }, /* pcmpeqd */
+    { { 0x76 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqd */
+    { { 0x77 }, { 1, 1 }, F, N }, /* emms */
     /*{ 0x78 }, { 2, 2 }, T, W }, vmread */
+    { { 0x78, 0xc0 }, { 4, 4 }, F, N, pfx_66 }, /* extrq */
+    { { 0x78, 0xc0 }, { 4, 4 }, F, N, pfx_f2 }, /* insertq */
     { { 0x79 }, { 2, 2 }, T, R }, /* vmwrite */
+    { { 0x79, 0xc0 }, { 2, 2 }, F, N, pfx_66 }, /* extrq */
+    { { 0x79, 0xc0 }, { 2, 2 }, F, N, pfx_f2 }, /* insertq */
+    { { 0x7c }, { 2, 2 }, T, R, pfx_66 }, /* haddpd */
+    { { 0x7c }, { 2, 2 }, T, R, pfx_f2 }, /* haddps */
+    { { 0x7d }, { 2, 2 }, T, R, pfx_66 }, /* hsubpd */
+    { { 0x7d }, { 2, 2 }, T, R, pfx_f2 }, /* hsubps */
+    { { 0x7e }, { 2, 2 }, T, W, pfx_no }, /* movd */
+    { { 0x7e }, { 2, 2 }, T, W, pfx_66 }, /* movd */
+    { { 0x7e }, { 2, 2 }, T, R, pfx_f3 }, /* movq */
+    { { 0x7f }, { 2, 2 }, T, W, pfx_no }, /* movq */
+    { { 0x7f }, { 2, 2 }, T, W, pfx_66 }, /* movdqa */
+    { { 0x7f }, { 2, 2 }, T, W, pfx_f3 }, /* movdqu */
     CND(0x80,   { 5, 5 }, F, N ), /* j<cc> */
     CND(0x90,   { 2, 2 }, T, W ), /* set<cc> */
     { { 0xa0 }, { 1, 1 }, F, W }, /* push %fs */
@@ -484,7 +655,17 @@ static const struct {
     { { 0xbf }, { 2, 2 }, F, R }, /* movsx */
     { { 0xc0 }, { 2, 2 }, F, W }, /* xadd */
     { { 0xc1 }, { 2, 2 }, F, W }, /* xadd */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_no }, /* cmpps */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_66 }, /* cmppd */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_f3 }, /* cmpss */
+    { { 0xc2 }, { 3, 3 }, T, R, pfx_f2 }, /* cmpsd */
     { { 0xc3 }, { 2, 2 }, F, W }, /* movnti */
+    { { 0xc4 }, { 3, 3 }, T, R, pfx_no }, /* pinsrw */
+    { { 0xc4 }, { 3, 3 }, T, R, pfx_66 }, /* pinsrw */
+    { { 0xc5, 0xc0 }, { 3, 3 }, F, N, pfx_no }, /* pextrw */
+    { { 0xc5, 0xc0 }, { 3, 3 }, F, N, pfx_66 }, /* pextrw */
+    { { 0xc6 }, { 3, 3 }, T, R, pfx_no }, /* shufps */
+    { { 0xc6 }, { 3, 3 }, T, R, pfx_66 }, /* shufpd */
     { { 0xc7, 0x08 }, { 2, 2 }, F, W }, /* cmpxchg8b */
     { { 0xc7, 0x18 }, { 2, 2 }, F, R }, /* xrstors */
     { { 0xc7, 0x20 }, { 2, 2 }, F, W }, /* xsavec */
@@ -497,11 +678,179 @@ static const struct {
     { { 0xc7, 0xf8 }, { 2, 2 }, F, N }, /* rdseed */
     { { 0xc7, 0xf8 }, { 2, 2 }, F, N, pfx_f3 }, /* rdpid */
     REG(0xc8,   { 1, 1 }, F, N ), /* bswap */
+    { { 0xd0 }, { 2, 2 }, T, R, pfx_66 }, /* addsubpd */
+    { { 0xd0 }, { 2, 2 }, T, R, pfx_f2 }, /* addsubps */
+    { { 0xd1 }, { 2, 2 }, T, R, pfx_no }, /* psrlw */
+    { { 0xd1 }, { 2, 2 }, T, R, pfx_66 }, /* psrlw */
+    { { 0xd2 }, { 2, 2 }, T, R, pfx_no }, /* psrld */
+    { { 0xd2 }, { 2, 2 }, T, R, pfx_66 }, /* psrld */
+    { { 0xd3 }, { 2, 2 }, T, R, pfx_no }, /* psrlq */
+    { { 0xd3 }, { 2, 2 }, T, R, pfx_66 }, /* psrlq */
+    { { 0xd4 }, { 2, 2 }, T, R, pfx_no }, /* paddq */
+    { { 0xd4 }, { 2, 2 }, T, R, pfx_66 }, /* paddq */
+    { { 0xd5 }, { 2, 2 }, T, R, pfx_no }, /* pmullw */
+    { { 0xd5 }, { 2, 2 }, T, R, pfx_66 }, /* pmullw */
+    { { 0xd6 }, { 2, 2 }, T, W, pfx_66 }, /* movq */
+    { { 0xd6, 0xc0 }, { 2, 2 }, F, N, pfx_f3 }, /* movq2dq */
+    { { 0xd6, 0xc0 }, { 2, 2 }, F, N, pfx_f2 }, /* movdq2q */
+    { { 0xd7, 0xc0 }, { 2, 2 }, F, N, pfx_no }, /* pmovmskb */
+    { { 0xd7, 0xc0 }, { 2, 2 }, F, N, pfx_66 }, /* pmovmskb */
+    { { 0xd8 }, { 2, 2 }, T, R, pfx_no }, /* psubusb */
+    { { 0xd8 }, { 2, 2 }, T, R, pfx_66 }, /* psubusb */
+    { { 0xd9 }, { 2, 2 }, T, R, pfx_no }, /* psubusw */
+    { { 0xd9 }, { 2, 2 }, T, R, pfx_66 }, /* psubusw */
+    { { 0xda }, { 2, 2 }, T, R, pfx_no }, /* pminub */
+    { { 0xda }, { 2, 2 }, T, R, pfx_66 }, /* pminub */
+    { { 0xdb }, { 2, 2 }, T, R, pfx_no }, /* pand */
+    { { 0xdb }, { 2, 2 }, T, R, pfx_66 }, /* pand */
+    { { 0xdc }, { 2, 2 }, T, R, pfx_no }, /* paddusb */
+    { { 0xdc }, { 2, 2 }, T, R, pfx_66 }, /* paddusb */
+    { { 0xdd }, { 2, 2 }, T, R, pfx_no }, /* paddusw */
+    { { 0xdd }, { 2, 2 }, T, R, pfx_66 }, /* paddusw */
+    { { 0xde }, { 2, 2 }, T, R, pfx_no }, /* pmaxub */
+    { { 0xde }, { 2, 2 }, T, R, pfx_66 }, /* pmaxub */
+    { { 0xdf }, { 2, 2 }, T, R, pfx_no }, /* pandn */
+    { { 0xdf }, { 2, 2 }, T, R, pfx_66 }, /* pandn */
+    { { 0xe0 }, { 2, 2 }, T, R, pfx_no }, /* pavgb */
+    { { 0xe0 }, { 2, 2 }, T, R, pfx_66 }, /* pavgb */
+    { { 0xe1 }, { 2, 2 }, T, R, pfx_no }, /* psraw */
+    { { 0xe1 }, { 2, 2 }, T, R, pfx_66 }, /* psraw */
+    { { 0xe2 }, { 2, 2 }, T, R, pfx_no }, /* psrad */
+    { { 0xe2 }, { 2, 2 }, T, R, pfx_66 }, /* psrad */
+    { { 0xe3 }, { 2, 2 }, T, R, pfx_no }, /* pavgw */
+    { { 0xe3 }, { 2, 2 }, T, R, pfx_66 }, /* pavgw */
+    { { 0xe4 }, { 2, 2 }, T, R, pfx_no }, /* pmulhuw */
+    { { 0xe4 }, { 2, 2 }, T, R, pfx_66 }, /* pmulhuw */
+    { { 0xe5 }, { 2, 2 }, T, R, pfx_no }, /* pmulhw */
+    { { 0xe5 }, { 2, 2 }, T, R, pfx_66 }, /* pmulhw */
+    { { 0xe6 }, { 2, 2 }, T, R, pfx_66 }, /* cvttpd2dq */
+    { { 0xe6 }, { 2, 2 }, T, R, pfx_f3 }, /* cvtdq2pd */
+    { { 0xe6 }, { 2, 2 }, T, R, pfx_f2 }, /* cvtpd2dq */
+    { { 0xe7 }, { 2, 2 }, F, W, pfx_no }, /* movntq */
+    { { 0xe7 }, { 2, 2 }, F, W, pfx_66 }, /* movntdq */
+    { { 0xe8 }, { 2, 2 }, T, R, pfx_no }, /* psubsb */
+    { { 0xe8 }, { 2, 2 }, T, R, pfx_66 }, /* psubsb */
+    { { 0xe9 }, { 2, 2 }, T, R, pfx_no }, /* psubsw */
+    { { 0xe9 }, { 2, 2 }, T, R, pfx_66 }, /* psubsw */
+    { { 0xea }, { 2, 2 }, T, R, pfx_no }, /* pminsw */
+    { { 0xea }, { 2, 2 }, T, R, pfx_66 }, /* pminsw */
+    { { 0xeb }, { 2, 2 }, T, R, pfx_no }, /* por */
+    { { 0xeb }, { 2, 2 }, T, R, pfx_66 }, /* por */
+    { { 0xec }, { 2, 2 }, T, R, pfx_no }, /* paddsb */
+    { { 0xec }, { 2, 2 }, T, R, pfx_66 }, /* paddsb */
+    { { 0xed }, { 2, 2 }, T, R, pfx_no }, /* paddsw */
+    { { 0xed }, { 2, 2 }, T, R, pfx_66 }, /* paddsw */
+    { { 0xee }, { 2, 2 }, T, R, pfx_no }, /* pmaxsw */
+    { { 0xee }, { 2, 2 }, T, R, pfx_66 }, /* pmaxsw */
+    { { 0xef }, { 2, 2 }, T, R, pfx_no }, /* pxor */
+    { { 0xef }, { 2, 2 }, T, R, pfx_66 }, /* pxor */
+    { { 0xf0 }, { 2, 2 }, T, R, pfx_f2 }, /* lddqu */
+    { { 0xf1 }, { 2, 2 }, T, R, pfx_no }, /* psllw */
+    { { 0xf1 }, { 2, 2 }, T, R, pfx_66 }, /* psllw */
+    { { 0xf2 }, { 2, 2 }, T, R, pfx_no }, /* pslld */
+    { { 0xf2 }, { 2, 2 }, T, R, pfx_66 }, /* pslld */
+    { { 0xf3 }, { 2, 2 }, T, R, pfx_no }, /* psllq */
+    { { 0xf3 }, { 2, 2 }, T, R, pfx_66 }, /* psllq */
+    { { 0xf4 }, { 2, 2 }, T, R, pfx_no }, /* pmuludq */
+    { { 0xf4 }, { 2, 2 }, T, R, pfx_66 }, /* pmuludq */
+    { { 0xf5 }, { 2, 2 }, T, R, pfx_no }, /* pmaddwd */
+    { { 0xf5 }, { 2, 2 }, T, R, pfx_66 }, /* pmaddwd */
+    { { 0xf6 }, { 2, 2 }, T, R, pfx_no }, /* psadbw */
+    { { 0xf6 }, { 2, 2 }, T, R, pfx_66 }, /* psadbw */
+    { { 0xf7, 0xc0 }, { 2, 2 }, F, W, pfx_no }, /* maskmovq */
+    { { 0xf7, 0xc0 }, { 2, 2 }, F, W, pfx_66 }, /* maskmovdqu */
+    { { 0xf8 }, { 2, 2 }, T, R, pfx_no }, /* psubb */
+    { { 0xf8 }, { 2, 2 }, T, R, pfx_66 }, /* psubb */
+    { { 0xf9 }, { 2, 2 }, T, R, pfx_no }, /* psubw */
+    { { 0xf9 }, { 2, 2 }, T, R, pfx_66 }, /* psubw */
+    { { 0xfa }, { 2, 2 }, T, R, pfx_no }, /* psubd */
+    { { 0xfa }, { 2, 2 }, T, R, pfx_66 }, /* psubd */
+    { { 0xfb }, { 2, 2 }, T, R, pfx_no }, /* psubq */
+    { { 0xfb }, { 2, 2 }, T, R, pfx_66 }, /* psubq */
+    { { 0xfc }, { 2, 2 }, T, R, pfx_no }, /* paddb */
+    { { 0xfc }, { 2, 2 }, T, R, pfx_66 }, /* paddb */
+    { { 0xfd }, { 2, 2 }, T, R, pfx_no }, /* paddw */
+    { { 0xfd }, { 2, 2 }, T, R, pfx_66 }, /* paddw */
+    { { 0xfe }, { 2, 2 }, T, R, pfx_no }, /* paddd */
+    { { 0xfe }, { 2, 2 }, T, R, pfx_66 }, /* paddd */
     { { 0xff }, { 2, 2 }, F, N }, /* ud0 */
 }, legacy_0f38[] = {
+    { { 0x00 }, { 2, 2 }, T, R, pfx_no }, /* pshufb */
+    { { 0x00 }, { 2, 2 }, T, R, pfx_66 }, /* pshufb */
+    { { 0x01 }, { 2, 2 }, T, R, pfx_no }, /* phaddw */
+    { { 0x01 }, { 2, 2 }, T, R, pfx_66 }, /* phaddw */
+    { { 0x02 }, { 2, 2 }, T, R, pfx_no }, /* phaddd */
+    { { 0x02 }, { 2, 2 }, T, R, pfx_66 }, /* phaddd */
+    { { 0x03 }, { 2, 2 }, T, R, pfx_no }, /* phaddsw */
+    { { 0x03 }, { 2, 2 }, T, R, pfx_66 }, /* phaddsw */
+    { { 0x04 }, { 2, 2 }, T, R, pfx_no }, /* pmaddubsw */
+    { { 0x04 }, { 2, 2 }, T, R, pfx_66 }, /* pmaddubsw */
+    { { 0x05 }, { 2, 2 }, T, R, pfx_no }, /* phsubw */
+    { { 0x05 }, { 2, 2 }, T, R, pfx_66 }, /* phsubw */
+    { { 0x06 }, { 2, 2 }, T, R, pfx_no }, /* phsubd */
+    { { 0x06 }, { 2, 2 }, T, R, pfx_66 }, /* phsubd */
+    { { 0x07 }, { 2, 2 }, T, R, pfx_no }, /* phsubsw */
+    { { 0x07 }, { 2, 2 }, T, R, pfx_66 }, /* phsubsw */
+    { { 0x08 }, { 2, 2 }, T, R, pfx_no }, /* psignb */
+    { { 0x08 }, { 2, 2 }, T, R, pfx_66 }, /* psignb */
+    { { 0x09 }, { 2, 2 }, T, R, pfx_no }, /* psignw */
+    { { 0x09 }, { 2, 2 }, T, R, pfx_66 }, /* psignw */
+    { { 0x0a }, { 2, 2 }, T, R, pfx_no }, /* psignd */
+    { { 0x0a }, { 2, 2 }, T, R, pfx_66 }, /* psignd */
+    { { 0x0b }, { 2, 2 }, T, R, pfx_no }, /* pmulhrsw */
+    { { 0x0b }, { 2, 2 }, T, R, pfx_66 }, /* pmulhrsw */
+    { { 0x10 }, { 2, 2 }, T, R, pfx_66 }, /* pblendvb */
+    { { 0x14 }, { 2, 2 }, T, R, pfx_66 }, /* blendvps */
+    { { 0x15 }, { 2, 2 }, T, R, pfx_66 }, /* blendvpd */
+    { { 0x17 }, { 2, 2 }, T, R, pfx_66 }, /* ptest */
+    { { 0x1c }, { 2, 2 }, T, R, pfx_no }, /* pabsb */
+    { { 0x1c }, { 2, 2 }, T, R, pfx_66 }, /* pabsb */
+    { { 0x1d }, { 2, 2 }, T, R, pfx_no }, /* pabsw */
+    { { 0x1d }, { 2, 2 }, T, R, pfx_66 }, /* pabsw */
+    { { 0x1e }, { 2, 2 }, T, R, pfx_no }, /* pabsd */
+    { { 0x1e }, { 2, 2 }, T, R, pfx_66 }, /* pabsd */
+    { { 0x20 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxbw */
+    { { 0x21 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxbd */
+    { { 0x22 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxbq */
+    { { 0x23 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxwd */
+    { { 0x24 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxwq */
+    { { 0x25 }, { 2, 2 }, T, R, pfx_66 }, /* pmovsxdq */
+    { { 0x28 }, { 2, 2 }, T, R, pfx_66 }, /* pmuldq */
+    { { 0x29 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpeqq */
+    { { 0x2a }, { 2, 2 }, F, R, pfx_66 }, /* movntdqa */
+    { { 0x2b }, { 2, 2 }, T, R, pfx_66 }, /* packusdw */
+    { { 0x30 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxbw */
+    { { 0x31 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxbd */
+    { { 0x32 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxbq */
+    { { 0x33 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxwd */
+    { { 0x34 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxwq */
+    { { 0x35 }, { 2, 2 }, T, R, pfx_66 }, /* pmovzxdq */
+    { { 0x37 }, { 2, 2 }, T, R, pfx_66 }, /* pcmpgtq */
+    { { 0x38 }, { 2, 2 }, T, R, pfx_66 }, /* pminsb */
+    { { 0x39 }, { 2, 2 }, T, R, pfx_66 }, /* pminsd */
+    { { 0x3a }, { 2, 2 }, T, R, pfx_66 }, /* pminuw */
+    { { 0x3b }, { 2, 2 }, T, R, pfx_66 }, /* pminud */
+    { { 0x3c }, { 2, 2 }, T, R, pfx_66 }, /* pmaxsb */
+    { { 0x3d }, { 2, 2 }, T, R, pfx_66 }, /* pmaxsd */
+    { { 0x3e }, { 2, 2 }, T, R, pfx_66 }, /* pmaxuw */
+    { { 0x3f }, { 2, 2 }, T, R, pfx_66 }, /* pmaxud */
+    { { 0x40 }, { 2, 2 }, T, R, pfx_66 }, /* pmulld */
+    { { 0x41 }, { 2, 2 }, T, R, pfx_66 }, /* phminposuw */
     { { 0x80 }, { 2, 2 }, T, R, pfx_66 }, /* invept */
     { { 0x81 }, { 2, 2 }, T, R, pfx_66 }, /* invvpid */
     { { 0x82 }, { 2, 2 }, T, R, pfx_66 }, /* invpcid */
+    { { 0xc8 }, { 2, 2 }, T, R, pfx_no }, /* sha1nexte */
+    { { 0xc9 }, { 2, 2 }, T, R, pfx_no }, /* sha1msg1 */
+    { { 0xca }, { 2, 2 }, T, R, pfx_no }, /* sha1msg2 */
+    { { 0xcb }, { 2, 2 }, T, R, pfx_no }, /* sha256rnds2 */
+    { { 0xcc }, { 2, 2 }, T, R, pfx_no }, /* sha256msg1 */
+    { { 0xcd }, { 2, 2 }, T, R, pfx_no }, /* sha256msg2 */
+    { { 0xcf }, { 2, 2 }, T, R, pfx_66 }, /* gf2p8mulb */
+    { { 0xdb }, { 2, 2 }, T, R, pfx_66 }, /* aesimc */
+    { { 0xdc }, { 2, 2 }, T, R, pfx_66 }, /* aesenc */
+    { { 0xdd }, { 2, 2 }, T, R, pfx_66 }, /* aesenclast */
+    { { 0xde }, { 2, 2 }, T, R, pfx_66 }, /* aesdec */
+    { { 0xdf }, { 2, 2 }, T, R, pfx_66 }, /* aesdeclast */
     { { 0xf0 }, { 2, 2 }, T, R }, /* movbe */
     { { 0xf0 }, { 2, 2 }, T, R, pfx_f2 }, /* crc32 */
     { { 0xf1 }, { 2, 2 }, T, W }, /* movbe */
@@ -517,6 +866,42 @@ static const struct {
 };
 #undef CND
 #undef REG
+
+static const struct {
+    uint8_t opc;
+    uint8_t mem:2;
+    uint8_t pfx:2;
+} legacy_0f3a[] = {
+    { 0x08, R, pfx_66 }, /* roundps */
+    { 0x09, R, pfx_66 }, /* roundpd */
+    { 0x0a, R, pfx_66 }, /* roundss */
+    { 0x0b, R, pfx_66 }, /* roundsd */
+    { 0x0c, R, pfx_66 }, /* blendps */
+    { 0x0d, R, pfx_66 }, /* blendpd */
+    { 0x0e, R, pfx_66 }, /* pblendw */
+    { 0x0f, R, pfx_no }, /* palignr */
+    { 0x0f, R, pfx_66 }, /* palignr */
+    { 0x14, W, pfx_66 }, /* pextrb */
+    { 0x15, W, pfx_66 }, /* pextrw */
+    { 0x16, W, pfx_66 }, /* pextrd */
+    { 0x17, W, pfx_66 }, /* extractps */
+    { 0x20, R, pfx_66 }, /* pinsrb */
+    { 0x21, R, pfx_66 }, /* insertps */
+    { 0x22, R, pfx_66 }, /* pinsrd */
+    { 0x40, R, pfx_66 }, /* dpps */
+    { 0x41, R, pfx_66 }, /* dppd */
+    { 0x42, R, pfx_66 }, /* mpsadbw */
+    { 0x44, R, pfx_66 }, /* pclmulqdq */
+    { 0x60, R, pfx_66 }, /* pcmpestrm */
+    { 0x61, R, pfx_66 }, /* pcmpestri */
+    { 0x62, R, pfx_66 }, /* pcmpistrm */
+    { 0x63, R, pfx_66 }, /* pcmpistri */
+    { 0xcc, R, pfx_no }, /* sha1rnds4 */
+    { 0xce, R, pfx_66 }, /* gf2p8affineqb */
+    { 0xcf, R, pfx_66 }, /* gf2p8affineinvqb */
+    { 0xdf, R, pfx_66 }, /* aeskeygenassist */
+};
+
 static const struct {
     uint8_t opc[2];
     bool modrm:1; /* Should register form (also) be tested? */
@@ -799,6 +1184,23 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
                     legacy_0f38[t].mem, ctxt, fetch);
         }
 
+        for ( t = 0; t < ARRAY_SIZE(legacy_0f3a); ++t )
+        {
+            uint8_t *ptr = instr;
+
+            memset(instr + 5, 0xcc, 10);
+            if ( legacy_0f3a[t].pfx )
+                *ptr++ = prefixes[legacy_0f3a[t].pfx - 1];
+            *ptr++ = 0x0f;
+            *ptr++ = 0x3a;
+            *ptr++ = legacy_0f3a[t].opc;
+            *ptr++ = 0x00; /* ModR/M */
+            *ptr++ = 0x00; /* imm8 */
+
+            do_test(instr, (void *)ptr - instr, (void *)ptr - instr - 2,
+                    legacy_0f3a[t].mem, ctxt, fetch);
+        }
+
         memset(instr + ARRAY_SIZE(fpu[t].opc), 0xcc, 13);
 
         for ( t = 0; t < ARRAY_SIZE(fpu); ++t )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:56:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:56:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DA5-0005Qf-2m; Sat, 08 Aug 2020 00:56:37 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DA4-0005QY-BD
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:36 +0000
X-Inumbo-ID: 3c3d65c6-5e64-4223-be37-49c4b469a10f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 3c3d65c6-5e64-4223-be37-49c4b469a10f;
 Sat, 08 Aug 2020 00:56:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=0EdysWW3Kgvl0lYN/kG+3YazyJwRksz8UyteaZwfBjM=; b=SOVvjbisP6oiDUcEhydcqqQHg1
 UzSO+/aDQmzEM2D1flg81yrZTVndd8jCyVU+DIqrJjwRwR7BiqDx4QNPIsgUoGtPHSsAuRpUNZ43Q
 5jSaSkAplqbVPxQRMFh+F1BkErcbm379ALBqziKYEp99yroox45mVi/itDx3a75uGTZw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DA1-0000iC-Pr
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DA1-00035b-OV
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: extend decoding / mem access testing to
 VEX-encoded insns
Message-Id: <E1k4DA1-00035b-OV@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:56:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 5e6dc9b8e51679ead71ab3834c8d24bcb95a4fdf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:27:23 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:27:23 2020 +0200

    x86emul: extend decoding / mem access testing to VEX-encoded insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 529 +++++++++++++++++++++++++++++++++-
 1 file changed, 528 insertions(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 7897df94c2..822d7be404 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -1034,6 +1034,449 @@ static const struct {
     { { 0xdf, 0xe8 }, F, N }, /* fucomip */
     { { 0xdf, 0xf0 }, F, N }, /* fcomip */
 };
+
+#define VSIB(n) 0x04 | ((n) << 3), 0x38 /* reg: %xmm<n>, mem: (%eax,%xmm7) */
+
+static const struct vex {
+    uint8_t opc[3];
+    uint8_t len:3;
+    bool modrm:1; /* Should register form (also) be tested? */
+    uint8_t mem:2;
+    uint8_t pfx:2;
+    uint8_t w:2;
+#define WIG 0
+#define W0 1
+#define W1 2
+#define Wn (W0 | W1)
+    uint8_t l:2;
+#define LIG 0
+#define L0 1
+#define L1 2
+#define Ln (L0 | L1)
+} vex_0f[] = {
+    { { 0x10 }, 2, T, R, pfx_no, WIG, Ln }, /* vmovups */
+    { { 0x10 }, 2, T, R, pfx_66, WIG, Ln }, /* vmovupd */
+    { { 0x10 }, 2, T, R, pfx_f3, WIG, LIG }, /* vmovss */
+    { { 0x10 }, 2, T, R, pfx_f2, WIG, LIG }, /* vmovsd */
+    { { 0x11 }, 2, T, W, pfx_no, WIG, Ln }, /* vmovups */
+    { { 0x11 }, 2, T, W, pfx_66, WIG, Ln }, /* vmovupd */
+    { { 0x11 }, 2, T, W, pfx_f3, WIG, LIG }, /* vmovss */
+    { { 0x11 }, 2, T, W, pfx_f2, WIG, LIG }, /* vmovsd */
+    { { 0x12 }, 2, T, R, pfx_no, WIG, L0 }, /* vmovlps / vmovhlps */
+    { { 0x12 }, 2, F, R, pfx_66, WIG, L0 }, /* vmovlpd */
+    { { 0x12 }, 2, T, R, pfx_f3, WIG, Ln }, /* vmovsldup */
+    { { 0x12 }, 2, T, R, pfx_f2, WIG, Ln }, /* vmovddup */
+    { { 0x13 }, 2, F, W, pfx_no, WIG, L0 }, /* vmovlps */
+    { { 0x13 }, 2, F, W, pfx_66, WIG, L0 }, /* vmovlpd */
+    { { 0x14 }, 2, T, R, pfx_no, WIG, Ln }, /* vunpcklps */
+    { { 0x14 }, 2, T, R, pfx_66, WIG, Ln }, /* vunpcklpd */
+    { { 0x15 }, 2, T, R, pfx_no, WIG, Ln }, /* vunpckhps */
+    { { 0x15 }, 2, T, R, pfx_66, WIG, Ln }, /* vunpckhpd */
+    { { 0x16 }, 2, T, R, pfx_no, WIG, L0 }, /* vmovhps / vmovlhps */
+    { { 0x16 }, 2, F, R, pfx_66, WIG, L0 }, /* vmovhpd */
+    { { 0x16 }, 2, T, R, pfx_f3, WIG, Ln }, /* vmovshdup */
+    { { 0x17 }, 2, F, W, pfx_no, WIG, L0 }, /* vmovhps */
+    { { 0x17 }, 2, F, W, pfx_66, WIG, L0 }, /* vmovhpd */
+    { { 0x28 }, 2, T, R, pfx_no, WIG, Ln }, /* vmovaps */
+    { { 0x28 }, 2, T, R, pfx_66, WIG, Ln }, /* vmovapd */
+    { { 0x29 }, 2, T, W, pfx_no, WIG, Ln }, /* vmovaps */
+    { { 0x29 }, 2, T, W, pfx_66, WIG, Ln }, /* vmovapd */
+    { { 0x2a }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtsi2ss */
+    { { 0x2a }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsi2sd */
+    { { 0x2b }, 2, T, W, pfx_no, WIG, Ln }, /* vmovntps */
+    { { 0x2b }, 2, T, W, pfx_66, WIG, Ln }, /* vmovntpd */
+    { { 0x2c }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvttss2si */
+    { { 0x2c }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvttsd2si */
+    { { 0x2d }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtss2si */
+    { { 0x2d }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsd2si */
+    { { 0x2e }, 2, T, R, pfx_no, WIG, LIG }, /* vucomiss */
+    { { 0x2e }, 2, T, R, pfx_66, WIG, LIG }, /* vucomisd */
+    { { 0x2f }, 2, T, R, pfx_no, WIG, LIG }, /* vcomiss */
+    { { 0x2f }, 2, T, R, pfx_66, WIG, LIG }, /* vcomisd */
+    { { 0x41, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kand{w,q} */
+    { { 0x41, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kand{b,d} */
+    { { 0x42, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kandn{w,q} */
+    { { 0x42, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kandn{b,d} */
+    { { 0x44, 0xc0 }, 2, F, N, pfx_no, Wn, L0 }, /* knot{w,q} */
+    { { 0x44, 0xc0 }, 2, F, N, pfx_66, Wn, L0 }, /* knot{b,d} */
+    { { 0x45, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kor{w,q} */
+    { { 0x45, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kor{b,d} */
+    { { 0x46, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kxnor{w,q} */
+    { { 0x46, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kxnor{b,d} */
+    { { 0x47, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kxor{w,q} */
+    { { 0x47, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kxor{b,d} */
+    { { 0x4a, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kadd{w,q} */
+    { { 0x4a, 0xc0 }, 2, F, N, pfx_66, Wn, L1 }, /* kadd{b,d} */
+    { { 0x4b, 0xc0 }, 2, F, N, pfx_no, Wn, L1 }, /* kunpck{wd,dq} */
+    { { 0x4b, 0xc0 }, 2, F, N, pfx_66, W0, L1 }, /* kunpckbw */
+    { { 0x50, 0xc0 }, 2, F, N, pfx_no, WIG, Ln }, /* vmovmskps */
+    { { 0x50, 0xc0 }, 2, F, N, pfx_66, WIG, Ln }, /* vmovmskpd */
+    { { 0x51 }, 2, T, R, pfx_no, WIG, Ln }, /* vsqrtps */
+    { { 0x51 }, 2, T, R, pfx_66, WIG, Ln }, /* vsqrtpd */
+    { { 0x51 }, 2, T, R, pfx_f3, WIG, LIG }, /* vsqrtss */
+    { { 0x51 }, 2, T, R, pfx_f2, WIG, LIG }, /* vsqrtsd */
+    { { 0x52 }, 2, T, R, pfx_no, WIG, Ln }, /* vrsqrtps */
+    { { 0x52 }, 2, T, R, pfx_f3, WIG, LIG }, /* vrsqrtss */
+    { { 0x53 }, 2, T, R, pfx_no, WIG, Ln }, /* vrcpps */
+    { { 0x53 }, 2, T, R, pfx_f3, WIG, LIG }, /* vrcpss */
+    { { 0x54 }, 2, T, R, pfx_no, WIG, Ln }, /* vandps */
+    { { 0x54 }, 2, T, R, pfx_66, WIG, Ln }, /* vandpd */
+    { { 0x55 }, 2, T, R, pfx_no, WIG, Ln }, /* vandnps */
+    { { 0x55 }, 2, T, R, pfx_66, WIG, Ln }, /* vandnpd */
+    { { 0x56 }, 2, T, R, pfx_no, WIG, Ln }, /* vorps */
+    { { 0x56 }, 2, T, R, pfx_66, WIG, Ln }, /* vorpd */
+    { { 0x57 }, 2, T, R, pfx_no, WIG, Ln }, /* vxorps */
+    { { 0x57 }, 2, T, R, pfx_66, WIG, Ln }, /* vxorpd */
+    { { 0x58 }, 2, T, R, pfx_no, WIG, Ln }, /* vaddps */
+    { { 0x58 }, 2, T, R, pfx_66, WIG, Ln }, /* vaddpd */
+    { { 0x58 }, 2, T, R, pfx_f3, WIG, LIG }, /* vaddss */
+    { { 0x58 }, 2, T, R, pfx_f2, WIG, LIG }, /* vaddsd */
+    { { 0x59 }, 2, T, R, pfx_no, WIG, Ln }, /* vmulps */
+    { { 0x59 }, 2, T, R, pfx_66, WIG, Ln }, /* vmulpd */
+    { { 0x59 }, 2, T, R, pfx_f3, WIG, LIG }, /* vmulss */
+    { { 0x59 }, 2, T, R, pfx_f2, WIG, LIG }, /* vmulsd */
+    { { 0x5a }, 2, T, R, pfx_no, WIG, Ln }, /* vcvtps2pd */
+    { { 0x5a }, 2, T, R, pfx_66, WIG, Ln }, /* vcvtpd2ps */
+    { { 0x5a }, 2, T, R, pfx_f3, WIG, LIG }, /* vcvtss2sd */
+    { { 0x5a }, 2, T, R, pfx_f2, WIG, LIG }, /* vcvtsd2ss */
+    { { 0x5b }, 2, T, R, pfx_no, WIG, Ln }, /* vcvtdq2ps */
+    { { 0x5b }, 2, T, R, pfx_66, WIG, Ln }, /* vcvtps2dq */
+    { { 0x5b }, 2, T, R, pfx_f3, WIG, Ln }, /* vcvttps2dq */
+    { { 0x5c }, 2, T, R, pfx_no, WIG, Ln }, /* vsubps */
+    { { 0x5c }, 2, T, R, pfx_66, WIG, Ln }, /* vsubpd */
+    { { 0x5c }, 2, T, R, pfx_f3, WIG, LIG }, /* vsubss */
+    { { 0x5c }, 2, T, R, pfx_f2, WIG, LIG }, /* vsubsd */
+    { { 0x5d }, 2, T, R, pfx_no, WIG, Ln }, /* vminps */
+    { { 0x5d }, 2, T, R, pfx_66, WIG, Ln }, /* vminpd */
+    { { 0x5d }, 2, T, R, pfx_f3, WIG, LIG }, /* vminss */
+    { { 0x5d }, 2, T, R, pfx_f2, WIG, LIG }, /* vminsd */
+    { { 0x5e }, 2, T, R, pfx_no, WIG, Ln }, /* vdivps */
+    { { 0x5e }, 2, T, R, pfx_66, WIG, Ln }, /* vdivpd */
+    { { 0x5e }, 2, T, R, pfx_f3, WIG, LIG }, /* vdivss */
+    { { 0x5e }, 2, T, R, pfx_f2, WIG, LIG }, /* vdivsd */
+    { { 0x5f }, 2, T, R, pfx_no, WIG, Ln }, /* vmaxps */
+    { { 0x5f }, 2, T, R, pfx_66, WIG, Ln }, /* vmaxpd */
+    { { 0x5f }, 2, T, R, pfx_f3, WIG, LIG }, /* vmaxss */
+    { { 0x5f }, 2, T, R, pfx_f2, WIG, LIG }, /* vmaxsd */
+    { { 0x60 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklbw */
+    { { 0x61 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklwd */
+    { { 0x62 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckldq */
+    { { 0x63 }, 2, T, R, pfx_66, WIG, Ln }, /* vpacksswb */
+    { { 0x64 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtb */
+    { { 0x65 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtw */
+    { { 0x66 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtd */
+    { { 0x67 }, 2, T, R, pfx_66, WIG, Ln }, /* vpackuswb */
+    { { 0x68 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhbw */
+    { { 0x69 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhwd */
+    { { 0x6a }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhdq */
+    { { 0x6b }, 2, T, R, pfx_66, WIG, Ln }, /* vpackssdw */
+    { { 0x6c }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklqdq */
+    { { 0x6d }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhqdq */
+    { { 0x6e }, 2, T, R, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x6f }, 2, T, R, pfx_66, WIG, Ln }, /* vmovdqa */
+    { { 0x6f }, 2, T, R, pfx_f3, WIG, Ln }, /* vmovdqu */
+    { { 0x70 }, 3, T, R, pfx_66, WIG, Ln }, /* vpshufd */
+    { { 0x70 }, 3, T, R, pfx_f3, WIG, Ln }, /* vpshuflw */
+    { { 0x70 }, 3, T, R, pfx_f2, WIG, Ln }, /* vpshufhw */
+    { { 0x71, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0x71, 0xe0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0x71, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0x72, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrld */
+    { { 0x72, 0xe0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrad */
+    { { 0x72, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpslld */
+    { { 0x73, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrlq */
+    { { 0x73, 0xd8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrldq */
+    { { 0x73, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsllq */
+    { { 0x73, 0xf8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpslldq */
+    { { 0x74 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqb */
+    { { 0x75 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqw */
+    { { 0x76 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqd */
+    { { 0x77 }, 1, F, N, pfx_no, WIG, Ln }, /* vzero{upper,all} */
+    { { 0x7c }, 2, T, R, pfx_66, WIG, Ln }, /* vhaddpd */
+    { { 0x7c }, 2, T, R, pfx_f2, WIG, Ln }, /* vhaddps */
+    { { 0x7d }, 2, T, R, pfx_66, WIG, Ln }, /* vhsubpd */
+    { { 0x7d }, 2, T, R, pfx_f2, WIG, Ln }, /* vhsubps */
+    { { 0x7e }, 2, T, W, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x7e }, 2, T, R, pfx_f3, WIG, L0 }, /* vmovq */
+    { { 0x7f }, 2, T, W, pfx_66, WIG, Ln }, /* vmovdqa */
+    { { 0x7f }, 2, T, W, pfx_f3, WIG, Ln }, /* vmovdqu */
+    { { 0x90 }, 2, T, R, pfx_no, Wn, L0 }, /* kmov{w,q} */
+    { { 0x90 }, 2, T, R, pfx_66, Wn, L0 }, /* kmov{b,d} */
+    { { 0x91 }, 2, N, W, pfx_no, Wn, L0 }, /* kmov{w,q} */
+    { { 0x91 }, 2, N, W, pfx_66, Wn, L0 }, /* kmov{b,d} */
+    { { 0x92, 0xc0 }, 2, F, N, pfx_no, W0, L0 }, /* kmovw */
+    { { 0x92, 0xc0 }, 2, F, N, pfx_66, W0, L0 }, /* kmovb */
+    { { 0x92, 0xc0 }, 2, F, N, pfx_f2, Wn, L0 }, /* kmov{d,q} */
+    { { 0x93, 0xc0 }, 2, F, N, pfx_no, W0, L0 }, /* kmovw */
+    { { 0x93, 0xc0 }, 2, F, N, pfx_66, W0, L0 }, /* kmovb */
+    { { 0x93, 0xc0 }, 2, F, N, pfx_f2, Wn, L0 }, /* kmov{d,q} */
+    { { 0x98, 0xc0 }, 2, F, N, pfx_no, Wn, L0 }, /* kortest{w,q} */
+    { { 0x98, 0xc0 }, 2, F, N, pfx_66, Wn, L0 }, /* kortest{b,d} */
+    { { 0x99, 0xc0 }, 2, F, N, pfx_no, Wn, L0 }, /* ktest{w,q} */
+    { { 0x99, 0xc0 }, 2, F, N, pfx_66, Wn, L0 }, /* ktest{b,d} */
+    { { 0xae, 0x10 }, 2, F, R, pfx_no, WIG, L0 }, /* vldmxcsr */
+    { { 0xae, 0x18 }, 2, F, W, pfx_no, WIG, L0 }, /* vstmxcsr */
+    { { 0xc2 }, 3, T, R, pfx_no, WIG, Ln }, /* vcmpps */
+    { { 0xc2 }, 3, T, R, pfx_66, WIG, Ln }, /* vcmppd */
+    { { 0xc2 }, 3, T, R, pfx_f3, WIG, LIG }, /* vcmpss */
+    { { 0xc2 }, 3, T, R, pfx_f2, WIG, LIG }, /* vcmpsd */
+    { { 0xc4 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrw */
+    { { 0xc5, 0xc0 }, 3, F, N, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0xc6 }, 3, T, R, pfx_no, WIG, Ln }, /* vshufps */
+    { { 0xc6 }, 3, T, R, pfx_66, WIG, Ln }, /* vshufpd */
+    { { 0xd0 }, 2, T, R, pfx_66, WIG, Ln }, /* vaddsubpd */
+    { { 0xd0 }, 2, T, R, pfx_f2, WIG, Ln }, /* vaddsubps */
+    { { 0xd1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0xd2 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrld */
+    { { 0xd3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrlq */
+    { { 0xd4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddq */
+    { { 0xd5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmullw */
+    { { 0xd6 }, 2, T, W, pfx_66, WIG, L0 }, /* vmovq */
+    { { 0xd7, 0xc0 }, 2, F, N, pfx_66, WIG, Ln }, /* vpmovmskb */
+    { { 0xd8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusb */
+    { { 0xd9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusw */
+    { { 0xda }, 2, T, R, pfx_66, WIG, Ln }, /* vpminub */
+    { { 0xdb }, 2, T, R, pfx_66, WIG, Ln }, /* vpand */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusb */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusw */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxub */
+    { { 0xdf }, 2, T, R, pfx_66, WIG, Ln }, /* vpandn */
+    { { 0xe0 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgb */
+    { { 0xe1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0xe2 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrad */
+    { { 0xe3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgw */
+    { { 0xe4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhuw */
+    { { 0xe5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhw */
+    { { 0xe6 }, 2, T, R, pfx_66, WIG, Ln }, /* vcvttpd2dq */
+    { { 0xe6 }, 2, T, R, pfx_f3, WIG, Ln }, /* vcvtdq2pd */
+    { { 0xe6 }, 2, T, R, pfx_f2, WIG, Ln }, /* vcvtpd2dq */
+    { { 0xe7 }, 2, F, W, pfx_66, WIG, Ln }, /* vmovntdq */
+    { { 0xe8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsb */
+    { { 0xe9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsw */
+    { { 0xea }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsw */
+    { { 0xeb }, 2, T, R, pfx_66, WIG, Ln }, /* vpor */
+    { { 0xec }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsb */
+    { { 0xed }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsw */
+    { { 0xee }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsw */
+    { { 0xef }, 2, T, R, pfx_66, WIG, Ln }, /* vpxor */
+    { { 0xf0 }, 2, T, R, pfx_f2, WIG, Ln }, /* vlddqu */
+    { { 0xf1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0xf2 }, 2, T, R, pfx_66, WIG, Ln }, /* vpslld */
+    { { 0xf3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsllq */
+    { { 0xf4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmuludq */
+    { { 0xf5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddwd */
+    { { 0xf6 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsadbw */
+    { { 0xf7, 0xc0 }, 2, F, W, pfx_66, WIG, L0 }, /* vmaskmovdqu */
+    { { 0xf8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubb */
+    { { 0xf9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubw */
+    { { 0xfa }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubd */
+    { { 0xfb }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubq */
+    { { 0xfc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddb */
+    { { 0xfd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddw */
+    { { 0xfe }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddd */
+}, vex_0f38[] = {
+    { { 0x00 }, 2, T, R, pfx_66, WIG, Ln }, /* vpshufb */
+    { { 0x01 }, 2, T, R, pfx_66, WIG, Ln }, /* vphaddw */
+    { { 0x02 }, 2, T, R, pfx_66, WIG, Ln }, /* vphaddd */
+    { { 0x03 }, 2, T, R, pfx_66, WIG, Ln }, /* vphaddsw */
+    { { 0x04 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddubsw */
+    { { 0x05 }, 2, T, R, pfx_66, WIG, Ln }, /* vphsubw */
+    { { 0x06 }, 2, T, R, pfx_66, WIG, Ln }, /* vphsubd */
+    { { 0x07 }, 2, T, R, pfx_66, WIG, Ln }, /* vphsubsw */
+    { { 0x08 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsignb */
+    { { 0x09 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsignw */
+    { { 0x0a }, 2, T, R, pfx_66, WIG, Ln }, /* vpsignd */
+    { { 0x0b }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhrsw */
+    { { 0x0c }, 2, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x0d }, 2, T, R, pfx_66, W0, Ln }, /* vpermilpd */
+    { { 0x0e }, 2, T, R, pfx_66, W0, Ln }, /* vtestps */
+    { { 0x0f }, 2, T, R, pfx_66, W0, Ln }, /* vtestpd */
+    { { 0x13 }, 2, T, R, pfx_66, W0, Ln }, /* vcvtph2ps */
+    { { 0x16 }, 2, T, R, pfx_66, W0, L1 }, /* vpermps */
+    { { 0x17 }, 2, T, R, pfx_66, WIG, Ln }, /* vptest */
+    { { 0x18 }, 2, T, R, pfx_66, W0, Ln }, /* vbroadcastss */
+    { { 0x19 }, 2, T, R, pfx_66, W0, L1 }, /* vbroadcastsd */
+    { { 0x1a }, 2, F, R, pfx_66, W0, L1 }, /* vbroadcastf128 */
+    { { 0x1c }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsb */
+    { { 0x1d }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsw */
+    { { 0x1e }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsd */
+    { { 0x20 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbw */
+    { { 0x21 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbd */
+    { { 0x22 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbq */
+    { { 0x23 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwd */
+    { { 0x24 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwq */
+    { { 0x25 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxdq */
+    { { 0x28 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmuldq */
+    { { 0x29 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqq */
+    { { 0x2a }, 2, F, R, pfx_66, WIG, Ln }, /* vmovntdqa */
+    { { 0x2b }, 2, T, R, pfx_66, WIG, Ln }, /* vpackusdw */
+    { { 0x2c }, 2, F, R, pfx_66, W0, Ln }, /* vmaskmovps */
+    { { 0x2d }, 2, F, R, pfx_66, W0, Ln }, /* vmaskmovpd */
+    { { 0x2e }, 2, F, W, pfx_66, W0, Ln }, /* vmaskmovps */
+    { { 0x2f }, 2, F, W, pfx_66, W0, Ln }, /* vmaskmovpd */
+    { { 0x30 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbw */
+    { { 0x31 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbd */
+    { { 0x32 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbq */
+    { { 0x33 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwd */
+    { { 0x34 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwq */
+    { { 0x35 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxdq */
+    { { 0x36 }, 2, T, R, pfx_66, W0, L1 }, /* vpermd */
+    { { 0x37 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtq */
+    { { 0x38 }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsb */
+    { { 0x39 }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsd */
+    { { 0x3a }, 2, T, R, pfx_66, WIG, Ln }, /* vpminuw */
+    { { 0x3b }, 2, T, R, pfx_66, WIG, Ln }, /* vpminud */
+    { { 0x3c }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsb */
+    { { 0x3d }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsd */
+    { { 0x3e }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxuw */
+    { { 0x3f }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxud */
+    { { 0x40 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulld */
+    { { 0x41 }, 2, T, R, pfx_66, WIG, L0 }, /* vphminposuw */
+    { { 0x45 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsrlv{d,q} */
+    { { 0x46 }, 2, T, R, pfx_66, W0, Ln }, /* vpsravd */
+    { { 0x47 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsllv{d,q} */
+    { { 0x58 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastd */
+    { { 0x59 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastq */
+    { { 0x5a }, 2, F, R, pfx_66, W0, L1 }, /* vbroadcasti128 */
+    { { 0x78 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastb */
+    { { 0x79 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastw */
+    { { 0x8c }, 2, F, R, pfx_66, Wn, Ln }, /* vpmaskmov{d,q} */
+    { { 0x8e }, 2, F, W, pfx_66, Wn, Ln }, /* vpmaskmov{d,q} */
+    { { 0x90, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vpgatherd{d,q} */
+    { { 0x91, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vpgatherq{d,q} */
+    { { 0x92, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vgatherdp{s,d} */
+    { { 0x93, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln }, /* vgatherqp{s,d} */
+    { { 0x96 }, 2, T, R, pfx_66, Wn, Ln }, /* vmaddsub132p{s,d} */
+    { { 0x97 }, 2, T, R, pfx_66, Wn, Ln }, /* vmsubadd132p{s,d} */
+    { { 0x98 }, 2, T, R, pfx_66, Wn, Ln }, /* vmadd132p{s,d} */
+    { { 0x99 }, 2, T, R, pfx_66, Wn, LIG }, /* vmadd132s{s,d} */
+    { { 0x9a }, 2, T, R, pfx_66, Wn, Ln }, /* vmsub132p{s,d} */
+    { { 0x9b }, 2, T, R, pfx_66, Wn, LIG }, /* vmsub132s{s,d} */
+    { { 0x9c }, 2, T, R, pfx_66, Wn, Ln }, /* vnmadd132p{s,d} */
+    { { 0x9d }, 2, T, R, pfx_66, Wn, LIG }, /* vnmadd132s{s,d} */
+    { { 0x9e }, 2, T, R, pfx_66, Wn, Ln }, /* vnmsub132p{s,d} */
+    { { 0x9f }, 2, T, R, pfx_66, Wn, LIG }, /* vnmsub132s{s,d} */
+    { { 0xa6 }, 2, T, R, pfx_66, Wn, Ln }, /* vmaddsub213p{s,d} */
+    { { 0xa7 }, 2, T, R, pfx_66, Wn, Ln }, /* vmsubadd213p{s,d} */
+    { { 0xa8 }, 2, T, R, pfx_66, Wn, Ln }, /* vmadd213p{s,d} */
+    { { 0xa9 }, 2, T, R, pfx_66, Wn, LIG }, /* vmadd213s{s,d} */
+    { { 0xaa }, 2, T, R, pfx_66, Wn, Ln }, /* vmsub213p{s,d} */
+    { { 0xab }, 2, T, R, pfx_66, Wn, LIG }, /* vmsub213s{s,d} */
+    { { 0xac }, 2, T, R, pfx_66, Wn, Ln }, /* vnmadd213p{s,d} */
+    { { 0xad }, 2, T, R, pfx_66, Wn, LIG }, /* vnmadd213s{s,d} */
+    { { 0xae }, 2, T, R, pfx_66, Wn, Ln }, /* vnmsub213p{s,d} */
+    { { 0xaf }, 2, T, R, pfx_66, Wn, LIG }, /* vnmsub213s{s,d} */
+    { { 0xb6 }, 2, T, R, pfx_66, Wn, Ln }, /* vmaddsub231p{s,d} */
+    { { 0xb7 }, 2, T, R, pfx_66, Wn, Ln }, /* vmsubadd231p{s,d} */
+    { { 0xb8 }, 2, T, R, pfx_66, Wn, Ln }, /* vmadd231p{s,d} */
+    { { 0xb9 }, 2, T, R, pfx_66, Wn, LIG }, /* vmadd231s{s,d} */
+    { { 0xba }, 2, T, R, pfx_66, Wn, Ln }, /* vmsub231p{s,d} */
+    { { 0xbb }, 2, T, R, pfx_66, Wn, LIG }, /* vmsub231s{s,d} */
+    { { 0xbc }, 2, T, R, pfx_66, Wn, Ln }, /* vnmadd231p{s,d} */
+    { { 0xbd }, 2, T, R, pfx_66, Wn, LIG }, /* vnmadd231s{s,d} */
+    { { 0xbe }, 2, T, R, pfx_66, Wn, Ln }, /* vnmsub231p{s,d} */
+    { { 0xbf }, 2, T, R, pfx_66, Wn, LIG }, /* vnmsub231s{s,d} */
+    { { 0xcf }, 2, T, R, pfx_66, W0, Ln }, /* vgf2p8mulb */
+    { { 0xdb }, 2, T, R, pfx_66, WIG, L0 }, /* vaesimc */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenc */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenclast */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdec */
+    { { 0xdf }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdeclast */
+    { { 0xf2 }, 2, T, R, pfx_no, Wn, L0 }, /* andn */
+    { { 0xf3, 0x08 }, 2, T, R, pfx_no, Wn, L0 }, /* blsr */
+    { { 0xf3, 0x10 }, 2, T, R, pfx_no, Wn, L0 }, /* blsmsk */
+    { { 0xf3, 0x18 }, 2, T, R, pfx_no, Wn, L0 }, /* blsi */
+    { { 0xf5 }, 2, T, R, pfx_no, Wn, L0 }, /* bzhi */
+    { { 0xf5 }, 2, T, R, pfx_f3, Wn, L0 }, /* pext */
+    { { 0xf5 }, 2, T, R, pfx_f2, Wn, L0 }, /* pdep */
+    { { 0xf6 }, 2, T, R, pfx_f2, Wn, L0 }, /* mulx */
+    { { 0xf7 }, 2, T, R, pfx_no, Wn, L0 }, /* bextr */
+    { { 0xf7 }, 2, T, R, pfx_66, Wn, L0 }, /* shlx */
+    { { 0xf7 }, 2, T, R, pfx_f3, Wn, L0 }, /* sarx */
+    { { 0xf7 }, 2, T, R, pfx_f2, Wn, L0 }, /* shrx */
+}, vex_0f3a[] = {
+    { { 0x00 }, 3, T, R, pfx_66, W1, L1 }, /* vpermq */
+    { { 0x01 }, 3, T, R, pfx_66, W1, L1 }, /* vpermpd */
+    { { 0x02 }, 3, T, R, pfx_66, W0, Ln }, /* vpblendd */
+    { { 0x04 }, 3, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x05 }, 3, T, R, pfx_66, W0, Ln }, /* vpermilpd */
+    { { 0x06 }, 3, T, R, pfx_66, W0, L1 }, /* vperm2f128 */
+    { { 0x08 }, 3, T, R, pfx_66, WIG, Ln }, /* vroundps */
+    { { 0x09 }, 3, T, R, pfx_66, WIG, Ln }, /* vroundpd */
+    { { 0x0a }, 3, T, R, pfx_66, WIG, LIG }, /* vroundss */
+    { { 0x0b }, 3, T, R, pfx_66, WIG, LIG }, /* vroundsd */
+    { { 0x0c }, 3, T, R, pfx_66, WIG, Ln }, /* vblendps */
+    { { 0x0d }, 3, T, R, pfx_66, WIG, Ln }, /* vblendpd */
+    { { 0x0e }, 3, T, R, pfx_66, WIG, Ln }, /* vpblendw */
+    { { 0x0f }, 3, T, R, pfx_66, WIG, Ln }, /* vpalignr */
+    { { 0x14 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrb */
+    { { 0x15 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0x16 }, 3, T, W, pfx_66, Wn, L0 }, /* vpextr{d,q} */
+    { { 0x17 }, 3, T, W, pfx_66, WIG, L0 }, /* vextractps */
+    { { 0x18 }, 3, T, R, pfx_66, W0, L1 }, /* vinsertf128 */
+    { { 0x19 }, 3, T, W, pfx_66, W0, L1 }, /* vextractf128 */
+    { { 0x1d }, 3, T, W, pfx_66, W0, Ln }, /* vcvtps2ph */
+    { { 0x20 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrb */
+    { { 0x21 }, 3, T, R, pfx_66, WIG, L0 }, /* vinsertps */
+    { { 0x22 }, 3, T, R, pfx_66, Wn, L0 }, /* vpinsr{d,q} */
+    { { 0x30, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftr{b,w} */
+    { { 0x31, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftr{d,q} */
+    { { 0x32, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftl{b,w} */
+    { { 0x33, 0xc0 }, 3, F, N, pfx_66, Wn, L0 }, /* kshiftl{d,q} */
+    { { 0x38 }, 3, T, R, pfx_66, W0, L1 }, /* vinserti128 */
+    { { 0x39 }, 3, T, W, pfx_66, W0, L1 }, /* vextracti128 */
+    { { 0x40 }, 3, T, R, pfx_66, WIG, Ln }, /* vdpps */
+    { { 0x41 }, 3, T, R, pfx_66, WIG, Ln }, /* vdppd */
+    { { 0x42 }, 3, T, R, pfx_66, WIG, Ln }, /* vmpsadbw */
+    { { 0x44 }, 3, T, R, pfx_66, WIG, Ln }, /* vpclmulqdq */
+    { { 0x46 }, 3, T, R, pfx_66, W0, L1 }, /* vperm2i128 */
+    { { 0x48 }, 3, T, R, pfx_66, Wn, Ln }, /* vpermil2ps */
+    { { 0x49 }, 3, T, R, pfx_66, Wn, Ln }, /* vpermil2pd */
+    { { 0x4a }, 3, T, R, pfx_66, W0, Ln }, /* vblendvps */
+    { { 0x4b }, 3, T, R, pfx_66, W0, Ln }, /* vblendvpd */
+    { { 0x4c }, 3, T, R, pfx_66, W0, Ln }, /* vpblendvb */
+    { { 0x5c }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddsubps */
+    { { 0x5d }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddsubpd */
+    { { 0x5e }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubaddps */
+    { { 0x5f }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubaddpd */
+    { { 0x60 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpestrm */
+    { { 0x61 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpestri */
+    { { 0x62 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpistrm */
+    { { 0x63 }, 3, T, R, pfx_66, WIG, L0 }, /* vpcmpistri */
+    { { 0x68 }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddps */
+    { { 0x69 }, 3, T, R, pfx_66, Wn, Ln }, /* vfmaddpd */
+    { { 0x6a }, 3, T, R, pfx_66, Wn, LIG }, /* vfmaddss */
+    { { 0x6b }, 3, T, R, pfx_66, Wn, LIG }, /* vfmaddsd */
+    { { 0x6c }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubps */
+    { { 0x6d }, 3, T, R, pfx_66, Wn, Ln }, /* vfmsubpd */
+    { { 0x6e }, 3, T, R, pfx_66, Wn, LIG }, /* vfmsubss */
+    { { 0x6f }, 3, T, R, pfx_66, Wn, LIG }, /* vfmsubsd */
+    { { 0x78 }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmaddps */
+    { { 0x79 }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmaddpd */
+    { { 0x7a }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmaddss */
+    { { 0x7b }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmaddsd */
+    { { 0x7c }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmsubps */
+    { { 0x7d }, 3, T, R, pfx_66, Wn, Ln }, /* vfnmsubpd */
+    { { 0x7e }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmsubss */
+    { { 0x7f }, 3, T, R, pfx_66, Wn, LIG }, /* vfnmsubsd */
+    { { 0xce }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineqb */
+    { { 0xcf }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineinvqb */
+    { { 0xdf }, 3, T, R, pfx_66, WIG, Ln }, /* vaeskeygenassist */
+    { { 0xf0 }, 3, T, R, pfx_f2, Wn, L0 }, /* rorx */
+};
+
+static const struct {
+    const struct vex *tbl;
+    unsigned int num;
+} vex[] = {
+    { vex_0f,   ARRAY_SIZE(vex_0f) },
+    { vex_0f38, ARRAY_SIZE(vex_0f38) },
+    { vex_0f3a, ARRAY_SIZE(vex_0f3a) },
+};
+
+#undef Wn
+#undef Ln
+
 #undef F
 #undef N
 #undef R
@@ -1125,7 +1568,7 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
 
     for ( m = 0; m < sizeof(long) / sizeof(int); ++m )
     {
-        unsigned int t;
+        unsigned int t, x;
 
         ctxt->addr_size = 32 << m;
         ctxt->sp_size = 32 << m;
@@ -1211,6 +1654,90 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
                     ctxt, fetch);
         }
 
+        for ( t = 0; t < ARRAY_SIZE(vex_0f); ++t )
+        {
+            if ( vex_0f[t].w == WIG || (vex_0f[t].w & W0) )
+            {
+                uint8_t *ptr = instr;
+
+                memset(instr + 3, 0xcc, 12);
+
+                *ptr++ = 0xc5;
+                *ptr++ = 0xf8 | vex_0f[t].pfx;
+                memcpy(ptr, vex_0f[t].opc, vex_0f[t].len);
+
+                if ( vex_0f[t].l == LIG || (vex_0f[t].l & L0) )
+                    do_test(instr, vex_0f[t].len + ((void *)ptr - instr),
+                            vex_0f[t].modrm ? (void *)ptr - instr + 1 : 0,
+                            vex_0f[t].mem, ctxt, fetch);
+
+                if ( vex_0f[t].l == LIG || (vex_0f[t].l & L1) )
+                {
+                    ptr[-1] |= 4;
+                    memcpy(ptr, vex_0f[t].opc, vex_0f[t].len);
+
+                    do_test(instr, vex_0f[t].len + ((void *)ptr - instr),
+                            vex_0f[t].modrm ? (void *)ptr - instr + 1 : 0,
+                            vex_0f[t].mem, ctxt, fetch);
+                }
+            }
+        }
+
+        for ( x = 0; x < ARRAY_SIZE(vex); ++x )
+        {
+            for ( t = 0; t < vex[x].num; ++t )
+            {
+                uint8_t *ptr = instr;
+
+                memset(instr + 4, 0xcc, 11);
+
+                *ptr++ = 0xc4;
+                *ptr++ = 0xe1 + x;
+                *ptr++ = 0x78 | vex[x].tbl[t].pfx;
+
+                if ( vex[x].tbl[t].w == WIG || (vex[x].tbl[t].w & W0) )
+                {
+                    memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L0) )
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L1) )
+                    {
+                        ptr[-1] |= 4;
+                        memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+                    }
+                }
+
+                if ( vex[x].tbl[t].w == WIG || (vex[x].tbl[t].w & W1) )
+                {
+                    ptr[-1] = 0xf8 | vex[x].tbl[t].pfx;
+                    memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L0) )
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+
+                    if ( vex[x].tbl[t].l == LIG || (vex[x].tbl[t].l & L1) )
+                    {
+                        ptr[-1] |= 4;
+                        memcpy(ptr, vex[x].tbl[t].opc, vex[x].tbl[t].len);
+
+                        do_test(instr, vex[x].tbl[t].len + ((void *)ptr - instr),
+                                vex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                vex[x].tbl[t].mem, ctxt, fetch);
+                    }
+                }
+            }
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:56:46 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:56:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DAE-0005Rk-61; Sat, 08 Aug 2020 00:56:46 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DAC-0005Ra-HK
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:44 +0000
X-Inumbo-ID: 198e970f-c0dc-42a0-a9b1-89f6dda39d55
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 198e970f-c0dc-42a0-a9b1-89f6dda39d55;
 Sat, 08 Aug 2020 00:56:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=KZBEm9EtvlL9gjTFGaI5pQxn8zvIwRbWCbqrMTXWqCY=; b=eoh7c4uCpx+TPdlQ0Gk222ceH6
 E/EP4gveIIv23OVHRleS4fA93muPpgBjukTJ3Pa11b8ChT6CRdoVmxA7hqnL5wBz7od7TZn7vZ2WF
 SKGzXyajXKBukYR+d6UcfRW0dLM6pJ++/R/hz9LyjP+nkDXJEof63u36RiwOZKOXJiog=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAB-0000iQ-Tr
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAB-00036F-SD
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:43 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: extend decoding / mem access testing to
 XOP-encoded insns
Message-Id: <E1k4DAB-00036F-SD@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:56:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 3cb82fe3ff4262ddd4fa594c425cbd8f3f14dc76
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:27:31 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:27:31 2020 +0200

    x86emul: extend decoding / mem access testing to XOP-encoded insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 147 ++++++++++++++++++++++++++++++++++
 1 file changed, 147 insertions(+)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 822d7be404..98ffcdb151 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -1474,6 +1474,96 @@ static const struct {
     { vex_0f3a, ARRAY_SIZE(vex_0f3a) },
 };
 
+static const struct xop {
+    uint8_t opc[2];
+    uint8_t w:2;
+    uint8_t l:2;
+} xop_08[] = {
+    { { 0x85 }, W0, L0 }, /* vpmacssww */
+    { { 0x86 }, W0, L0 }, /* vpmacsswd */
+    { { 0x87 }, W0, L0 }, /* vpmacssdql */
+    { { 0x8e }, W0, L0 }, /* vpmacssdd */
+    { { 0x8f }, W0, L0 }, /* vpmacssdqh */
+    { { 0x95 }, W0, L0 }, /* vpmacsww */
+    { { 0x96 }, W0, L0 }, /* vpmacswd */
+    { { 0x97 }, W0, L0 }, /* vpmacsdql */
+    { { 0x9e }, W0, L0 }, /* vpmacsdd */
+    { { 0x9f }, W0, L0 }, /* vpmacsdqh */
+    { { 0xa2 }, Wn, Ln }, /* vpcmov */
+    { { 0xa3 }, Wn, L0 }, /* vpperm */
+    { { 0xa6 }, W0, L0 }, /* vpmadcsswd */
+    { { 0xb6 }, W0, L0 }, /* vpmadcswd */
+    { { 0xc0 }, W0, L0 }, /* vprotb */
+    { { 0xc1 }, W0, L0 }, /* vprotw */
+    { { 0xc2 }, W0, L0 }, /* vprotd */
+    { { 0xc3 }, W0, L0 }, /* vprotq */
+    { { 0xcc }, W0, L0 }, /* vpcomb */
+    { { 0xcd }, W0, L0 }, /* vpcomw */
+    { { 0xce }, W0, L0 }, /* vpcomd */
+    { { 0xcf }, W0, L0 }, /* vpcomq */
+    { { 0xec }, W0, L0 }, /* vpcomub */
+    { { 0xed }, W0, L0 }, /* vpcomuw */
+    { { 0xee }, W0, L0 }, /* vpcomud */
+    { { 0xef }, W0, L0 }, /* vpcomuq */
+}, xop_09[] = {
+    { { 0x01, 0x08 }, Wn, L0 }, /* blcfill */
+    { { 0x01, 0x10 }, Wn, L0 }, /* blsfill */
+    { { 0x01, 0x18 }, Wn, L0 }, /* blcs */
+    { { 0x01, 0x20 }, Wn, L0 }, /* tzmsk */
+    { { 0x01, 0x28 }, Wn, L0 }, /* blcic */
+    { { 0x01, 0x30 }, Wn, L0 }, /* blsic */
+    { { 0x01, 0x38 }, Wn, L0 }, /* t1mskc */
+    { { 0x02, 0x08 }, Wn, L0 }, /* blcmsk */
+    { { 0x02, 0x30 }, Wn, L0 }, /* blci */
+    { { 0x02, 0xc0 }, Wn, L0 }, /* llwpcb */
+    { { 0x02, 0xc8 }, Wn, L0 }, /* slwpcb */
+    { { 0x80 }, W0, Ln }, /* vfrczps */
+    { { 0x81 }, W0, Ln }, /* vfrczpd */
+    { { 0x82 }, W0, L0 }, /* vfrczss */
+    { { 0x83 }, W0, L0 }, /* vfrczsd */
+    { { 0x90 }, Wn, L0 }, /* vprotb */
+    { { 0x91 }, Wn, L0 }, /* vprotw */
+    { { 0x92 }, Wn, L0 }, /* vprotd */
+    { { 0x93 }, Wn, L0 }, /* vprotq */
+    { { 0x94 }, Wn, L0 }, /* vpshlb */
+    { { 0x95 }, Wn, L0 }, /* vpshlw */
+    { { 0x96 }, Wn, L0 }, /* vpshld */
+    { { 0x97 }, Wn, L0 }, /* vpshlq */
+    { { 0x9c }, Wn, L0 }, /* vpshab */
+    { { 0x9d }, Wn, L0 }, /* vpshaw */
+    { { 0x9e }, Wn, L0 }, /* vpshad */
+    { { 0x9f }, Wn, L0 }, /* vpshaq */
+    { { 0xc1 }, W0, L0 }, /* vphaddbw */
+    { { 0xc2 }, W0, L0 }, /* vphaddbd */
+    { { 0xc3 }, W0, L0 }, /* vphaddbq */
+    { { 0xc6 }, W0, L0 }, /* vphaddwd */
+    { { 0xc7 }, W0, L0 }, /* vphaddwq */
+    { { 0xcb }, W0, L0 }, /* vphadddq */
+    { { 0xd1 }, W0, L0 }, /* vphaddubw */
+    { { 0xd2 }, W0, L0 }, /* vphaddubd */
+    { { 0xd3 }, W0, L0 }, /* vphaddubq */
+    { { 0xd6 }, W0, L0 }, /* vphadduwd */
+    { { 0xd7 }, W0, L0 }, /* vphadduwq */
+    { { 0xdb }, W0, L0 }, /* vphaddudq */
+    { { 0xe1 }, W0, L0 }, /* vphsubbw */
+    { { 0xe2 }, W0, L0 }, /* vphsubwd */
+    { { 0xe3 }, W0, L0 }, /* vphsubdq */
+}, xop_0a[] = {
+    { { 0x10 }, Wn, L0 }, /* bextr */
+    { { 0x12, 0x00 }, Wn, L0 }, /* lwpins */
+    { { 0x12, 0x08 }, Wn, L0 }, /* lwpval */
+};
+
+static const struct {
+    const struct xop *tbl;
+    unsigned int num;
+    unsigned int imm;
+} xop[] = {
+    { xop_08, ARRAY_SIZE(xop_08), 1 },
+    { xop_09, ARRAY_SIZE(xop_09), 0 },
+    { xop_0a, ARRAY_SIZE(xop_0a), 4 },
+};
+
 #undef Wn
 #undef Ln
 
@@ -1738,6 +1828,63 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
             }
         }
 
+        for ( x = 0; x < ARRAY_SIZE(xop); ++x )
+        {
+            for ( t = 0; t < xop[x].num; ++t )
+            {
+                uint8_t *ptr = instr;
+                unsigned int modrm;
+                enum mem_access mem;
+
+                memset(instr + 5, 0xcc, 10);
+
+                *ptr++ = 0x8f;
+                *ptr++ = 0xe8 + x;
+                *ptr++ = 0x78;
+                memcpy(ptr, xop[x].tbl[t].opc, 2);
+                memset(ptr + 2, 0, xop[x].imm);
+
+                modrm = ptr[1] & 0xc0 ? 0 : 4;
+                mem = ptr[1] & 0xc0 ? mem_none : mem_read;
+
+                assert(xop[x].tbl[t].w != WIG);
+                assert(xop[x].tbl[t].l != LIG);
+
+                if ( xop[x].tbl[t].w & W0 )
+                {
+                    if ( xop[x].tbl[t].l & L0 )
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+
+                    if ( xop[x].tbl[t].l & L1 )
+                    {
+                        ptr[-1] = 0x7c;
+                        ptr[1] = mem != mem_none ? 0x00 : 0xc0;
+
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+                    }
+                }
+
+                if ( xop[x].tbl[t].w & W1 )
+                {
+                    if ( xop[x].tbl[t].l & L0 )
+                    {
+                        ptr[-1] = 0xf8;
+                        ptr[1] = mem != mem_none ? 0x00 : 0xc0;
+
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+                    }
+
+                    if ( xop[x].tbl[t].l & L1 )
+                    {
+                        ptr[-1] = 0xfc;
+                        ptr[1] = mem != mem_none ? 0x00 : 0xc0;
+
+                        do_test(instr, 5 + xop[x].imm, modrm, mem, ctxt, fetch);
+                    }
+                }
+            }
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:56:56 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:56:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DAO-0005Sr-7f; Sat, 08 Aug 2020 00:56:56 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DAN-0005Si-71
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:55 +0000
X-Inumbo-ID: 842b5268-2a1a-4e5f-94c8-c186d7b6eef2
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 842b5268-2a1a-4e5f-94c8-c186d7b6eef2;
 Sat, 08 Aug 2020 00:56:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=6rkGzjqPClN1VjnEGdp2HRDjSxF9qagKQr/NEDPIjbE=; b=j5eppD7Xz38RELpKGqoefEwgwz
 Z15e8N1mcrepu5lShg49oYA6dIYEAnU/9sZYZgWsMk+AdnIBJ9YBWFI07JBbOtXrIZIc5rZfXXt29
 Ygz4/z5N02loNJ1P+is4zntPmWcrPWTsF+MmCNXOZ6R5o/JpZ5akqHoL19ZLTfi4KAFw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAM-0000ia-1K
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAM-00036l-0O
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:56:54 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: AVX512{F,
 BW} down conversion moves are memory writes
Message-Id: <E1k4DAM-00036l-0O@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:56:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 067e7b76fd38a2f6ba3898c15a09878498a73226
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:28:01 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:28:01 2020 +0200

    x86emul: AVX512{F,BW} down conversion moves are memory writes
    
    For this to be properly reported, the case labels need to move to a
    different switch() block.
    
    Fixes: 30e0bdf79828 ("x86emul: support AVX512{F,BW} down conversion moves")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 10b20cf23b..814e87f842 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -12360,6 +12360,14 @@ x86_insn_is_mem_write(const struct x86_emulate_state *state,
         case X86EMUL_OPC_F2(0x0f38, 0xf8): /* ENQCMD */
         case X86EMUL_OPC_F3(0x0f38, 0xf8): /* ENQCMDS */
             return true;
+
+        case X86EMUL_OPC_EVEX_F3(0x0f38, 0x10) ...
+             X86EMUL_OPC_EVEX_F3(0x0f38, 0x15): /* VPMOVUS* */
+        case X86EMUL_OPC_EVEX_F3(0x0f38, 0x20) ...
+             X86EMUL_OPC_EVEX_F3(0x0f38, 0x25): /* VPMOVS* */
+        case X86EMUL_OPC_EVEX_F3(0x0f38, 0x30) ...
+             X86EMUL_OPC_EVEX_F3(0x0f38, 0x35): /* VPMOV{D,Q,W}* */
+            return state->modrm_mod != 3;
         }
 
         return false;
@@ -12401,12 +12409,6 @@ x86_insn_is_mem_write(const struct x86_emulate_state *state,
     case X86EMUL_OPC(0x0f, 0xab):        /* BTS */
     case X86EMUL_OPC(0x0f, 0xb3):        /* BTR */
     case X86EMUL_OPC(0x0f, 0xbb):        /* BTC */
-    case X86EMUL_OPC_EVEX_F3(0x0f38, 0x10) ...
-         X86EMUL_OPC_EVEX_F3(0x0f38, 0x15): /* VPMOVUS* */
-    case X86EMUL_OPC_EVEX_F3(0x0f38, 0x20) ...
-         X86EMUL_OPC_EVEX_F3(0x0f38, 0x25): /* VPMOVS* */
-    case X86EMUL_OPC_EVEX_F3(0x0f38, 0x30) ...
-         X86EMUL_OPC_EVEX_F3(0x0f38, 0x35): /* VPMOV{D,Q,W}* */
         return true;
 
     case 0xd9:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:57:06 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:57:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DAY-0005Tx-9R; Sat, 08 Aug 2020 00:57:06 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DAW-0005Tl-NZ
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:04 +0000
X-Inumbo-ID: cdf87a07-4c9d-49bc-a19a-dd043f034c3d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id cdf87a07-4c9d-49bc-a19a-dd043f034c3d;
 Sat, 08 Aug 2020 00:57:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=DITJlxpbT8XVwKnXT6u6d3n2vvUkaOhIsvJBfEFM0H0=; b=gehHALb9QtqFFxvpHdgQPctsRR
 hWmAQUcm30QOoyaNsunwgF6DpN5MSw+DODTAzYl58i3DnmfjGtv/2PiKcKy3Jz0B51TuKtxEXA8z4
 J5iTKFrpMJ59aq2CdB61ZiCyaMtAq1yoPl6kdNMyrKLJYQLKqx7iazplHnxhufmu2nfk=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAW-0000jZ-5Q
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAW-00037Y-49
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: AVX512F scatter insns are memory writes
Message-Id: <E1k4DAW-00037Y-49@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:57:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 6156cfeaf28c9cd0ffb84c25216c43aa64d93de4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:28:40 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:28:40 2020 +0200

    x86emul: AVX512F scatter insns are memory writes
    
    While the custom handling renders the "to_mem" field generally unused,
    x86_insn_is_mem_write() still (indirectly) consumes that information,
    and hence the table entries want to be correct.
    
    Fixes: 7d569b848036 ("x86emul: support AVX512F scatter insns")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 814e87f842..c54ad589c4 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -516,7 +516,7 @@ static const struct ext0f38_table {
     [0x9d] = { .simd_size = simd_scalar_vexw, .d8s = d8s_dq },
     [0x9e] = { .simd_size = simd_packed_fp, .d8s = d8s_vl },
     [0x9f] = { .simd_size = simd_scalar_vexw, .d8s = d8s_dq },
-    [0xa0 ... 0xa3] = { .simd_size = simd_other, .vsib = 1, .d8s = d8s_dq },
+    [0xa0 ... 0xa3] = { .simd_size = simd_other, .to_mem = 1, .vsib = 1, .d8s = d8s_dq },
     [0xa6 ... 0xa8] = { .simd_size = simd_packed_fp, .d8s = d8s_vl },
     [0xa9] = { .simd_size = simd_scalar_vexw, .d8s = d8s_dq },
     [0xaa] = { .simd_size = simd_packed_fp, .d8s = d8s_vl },
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:57:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:57:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DAi-0005Vc-BN; Sat, 08 Aug 2020 00:57:16 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DAh-0005VQ-1S
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:15 +0000
X-Inumbo-ID: 6eee2df0-06b0-4d3f-8114-b0444de088f6
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 6eee2df0-06b0-4d3f-8114-b0444de088f6;
 Sat, 08 Aug 2020 00:57:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=d0AGh7aKwCduIuzHmbhGsCdsySjMW6IFicD2m0sIZX8=; b=hjS/fKBq67qOv5/D6hh8mE9YGS
 JMOkSPr6wERpZBoaqWmNMX73HD57yIHLsd7puTTwhLWKQyzGLEL+Si8GAaeikignGslMdpSB4at0L
 F33HY8wlF8BH2LHs4hddLrJk0OTj+mYD40z/s6galHRyg32iwPJvv3DQO6VR/pk5WEgM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAg-0000jj-9W
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAg-00038B-8F
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: AVX512PF insns aren't memory accesses
Message-Id: <E1k4DAg-00038B-8F@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:57:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 96137cf1426a1d6419ec9fd205e22b03b2af313d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:29:18 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:29:18 2020 +0200

    x86emul: AVX512PF insns aren't memory accesses
    
    These are prefetches, so should be treated just like other prefetches.
    
    Fixes: 467e91bde720 ("x86emul: support AVX512PF insns")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index c54ad589c4..41883ad6d8 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -12266,6 +12266,8 @@ x86_insn_is_mem_access(const struct x86_emulate_state *state,
          ... X86EMUL_OPC_F2(0x0f, 0x1f): /* NOP space */
         case X86EMUL_OPC(0x0f, 0xb9): /* UD1 */
         case X86EMUL_OPC(0x0f, 0xff): /* UD0 */
+        case X86EMUL_OPC_EVEX_66(0x0f38, 0xc6): /* V{GATH,SCATT}ERPF*D* */
+        case X86EMUL_OPC_EVEX_66(0x0f38, 0xc7): /* V{GATH,SCATT}ERPF*Q* */
             return false;
 
         case X86EMUL_OPC(0x0f, 0x01):
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:57:28 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:57:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DAu-0005Wh-DF; Sat, 08 Aug 2020 00:57:28 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DAs-0005Wa-Sp
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:26 +0000
X-Inumbo-ID: ba232a5d-fada-4d93-b96a-9a5fd88e7a86
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ba232a5d-fada-4d93-b96a-9a5fd88e7a86;
 Sat, 08 Aug 2020 00:57:24 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=VoC/ZDC0CXFGevxsIeT+tAUvT2WfFUY6ssKQ/dsuHJU=; b=ipHcGxTECQCHYiyItBApDYh3oi
 RdRt3Gc9gGxBSY9DD2u6d/1qoaB1Nky5HW+9vDc11m+84+GpC6mk00Y/YUVpLgTq7/jQYrdZnNr0k
 ZsLCzlfHTTliEr57IOfUi3tlkDUZF3Xy6sFjBJrRvToc1a5R8tPs0FIOCojI5gEAyAgM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAq-0000jr-CX
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DAq-0003Ah-Bn
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:24 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: extend decoding / mem access testing to
 EVEX-encoded insns
Message-Id: <E1k4DAq-0003Ah-Bn@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:57:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 062aad5190aea2c8a57933c16acae571551a7737
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:29:55 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:29:55 2020 +0200

    x86emul: extend decoding / mem access testing to EVEX-encoded insns
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/predicates.c | 506 +++++++++++++++++++++++++++++++++-
 1 file changed, 505 insertions(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/predicates.c b/tools/tests/x86_emulator/predicates.c
index 98ffcdb151..137681ba78 100644
--- a/tools/tests/x86_emulator/predicates.c
+++ b/tools/tests/x86_emulator/predicates.c
@@ -1564,9 +1564,469 @@ static const struct {
     { xop_0a, ARRAY_SIZE(xop_0a), 4 },
 };
 
-#undef Wn
 #undef Ln
 
+static const struct evex {
+    uint8_t opc[3];
+    uint8_t len:3;
+    bool modrm:1; /* Should register form (also) be tested? */
+    uint8_t mem:2;
+    uint8_t pfx:2;
+    uint8_t w:2;
+    uint8_t l:3;
+    bool mask:1;
+#define L2 4
+#define Ln (L0 | L1 | L2)
+} evex_0f[] = {
+    { { 0x10 }, 2, T, R, pfx_no, W0, Ln }, /* vmovups */
+    { { 0x10 }, 2, T, R, pfx_66, W1, Ln }, /* vmovupd */
+    { { 0x10 }, 2, T, R, pfx_f3, W0, LIG }, /* vmovss */
+    { { 0x10 }, 2, T, R, pfx_f2, W1, LIG }, /* vmovsd */
+    { { 0x11 }, 2, T, W, pfx_no, W0, Ln }, /* vmovups */
+    { { 0x11 }, 2, T, W, pfx_66, W1, Ln }, /* vmovupd */
+    { { 0x11 }, 2, T, W, pfx_f3, W0, LIG }, /* vmovss */
+    { { 0x11 }, 2, T, W, pfx_f2, W1, LIG }, /* vmovsd */
+    { { 0x12 }, 2, T, R, pfx_no, W0, L0 }, /* vmovlps / vmovhlps */
+    { { 0x12 }, 2, F, R, pfx_66, W1, L0 }, /* vmovlpd */
+    { { 0x12 }, 2, T, R, pfx_f3, W0, Ln }, /* vmovsldup */
+    { { 0x12 }, 2, T, R, pfx_f2, W1, Ln }, /* vmovddup */
+    { { 0x13 }, 2, F, W, pfx_no, W0, L0 }, /* vmovlps */
+    { { 0x13 }, 2, F, W, pfx_66, W1, L0 }, /* vmovlpd */
+    { { 0x14 }, 2, T, R, pfx_no, W0, Ln }, /* vunpcklps */
+    { { 0x14 }, 2, T, R, pfx_66, W1, Ln }, /* vunpcklpd */
+    { { 0x15 }, 2, T, R, pfx_no, W0, Ln }, /* vunpckhps */
+    { { 0x15 }, 2, T, R, pfx_66, W1, Ln }, /* vunpckhpd */
+    { { 0x16 }, 2, T, R, pfx_no, W0, L0 }, /* vmovhps / vmovlhps */
+    { { 0x16 }, 2, F, R, pfx_66, W1, L0 }, /* vmovhpd */
+    { { 0x16 }, 2, T, R, pfx_f3, W0, Ln }, /* vmovshdup */
+    { { 0x17 }, 2, F, W, pfx_no, W0, L0 }, /* vmovhps */
+    { { 0x17 }, 2, F, W, pfx_66, W1, L0 }, /* vmovhpd */
+    { { 0x28 }, 2, T, R, pfx_no, W0, Ln }, /* vmovaps */
+    { { 0x28 }, 2, T, R, pfx_66, W1, Ln }, /* vmovapd */
+    { { 0x29 }, 2, T, W, pfx_no, W0, Ln }, /* vmovaps */
+    { { 0x29 }, 2, T, W, pfx_66, W1, Ln }, /* vmovapd */
+    { { 0x2a }, 2, T, R, pfx_f3, W0, LIG }, /* vcvtsi2ss */
+    { { 0x2a }, 2, T, R, pfx_f2, W1, LIG }, /* vcvtsi2sd */
+    { { 0x2b }, 2, T, W, pfx_no, W0, Ln }, /* vmovntps */
+    { { 0x2b }, 2, T, W, pfx_66, W1, Ln }, /* vmovntpd */
+    { { 0x2c }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvttss2si */
+    { { 0x2c }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvttsd2si */
+    { { 0x2d }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtss2si */
+    { { 0x2d }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsd2si */
+    { { 0x2e }, 2, T, R, pfx_no, W0, LIG }, /* vucomiss */
+    { { 0x2e }, 2, T, R, pfx_66, W1, LIG }, /* vucomisd */
+    { { 0x2f }, 2, T, R, pfx_no, W0, LIG }, /* vcomiss */
+    { { 0x2f }, 2, T, R, pfx_66, W1, LIG }, /* vcomisd */
+    { { 0x51 }, 2, T, R, pfx_no, W0, Ln }, /* vsqrtps */
+    { { 0x51 }, 2, T, R, pfx_66, W1, Ln }, /* vsqrtpd */
+    { { 0x51 }, 2, T, R, pfx_f3, W0, LIG }, /* vsqrtss */
+    { { 0x51 }, 2, T, R, pfx_f2, W1, LIG }, /* vsqrtsd */
+    { { 0x54 }, 2, T, R, pfx_no, W0, Ln }, /* vandps */
+    { { 0x54 }, 2, T, R, pfx_66, W1, Ln }, /* vandpd */
+    { { 0x55 }, 2, T, R, pfx_no, W0, Ln }, /* vandnps */
+    { { 0x55 }, 2, T, R, pfx_66, W1, Ln }, /* vandnpd */
+    { { 0x56 }, 2, T, R, pfx_no, W0, Ln }, /* vorps */
+    { { 0x56 }, 2, T, R, pfx_66, W1, Ln }, /* vorpd */
+    { { 0x57 }, 2, T, R, pfx_no, W0, Ln }, /* vxorps */
+    { { 0x57 }, 2, T, R, pfx_66, W1, Ln }, /* vxorpd */
+    { { 0x58 }, 2, T, R, pfx_no, W0, Ln }, /* vaddps */
+    { { 0x58 }, 2, T, R, pfx_66, W1, Ln }, /* vaddpd */
+    { { 0x58 }, 2, T, R, pfx_f3, W0, LIG }, /* vaddss */
+    { { 0x58 }, 2, T, R, pfx_f2, W1, LIG }, /* vaddsd */
+    { { 0x59 }, 2, T, R, pfx_no, W0, Ln }, /* vmulps */
+    { { 0x59 }, 2, T, R, pfx_66, W1, Ln }, /* vmulpd */
+    { { 0x59 }, 2, T, R, pfx_f3, W0, LIG }, /* vmulss */
+    { { 0x59 }, 2, T, R, pfx_f2, W1, LIG }, /* vmulsd */
+    { { 0x5a }, 2, T, R, pfx_no, W0, Ln }, /* vcvtps2pd */
+    { { 0x5a }, 2, T, R, pfx_66, W1, Ln }, /* vcvtpd2ps */
+    { { 0x5a }, 2, T, R, pfx_f3, W0, LIG }, /* vcvtss2sd */
+    { { 0x5a }, 2, T, R, pfx_f2, W1, LIG }, /* vcvtsd2ss */
+    { { 0x5b }, 2, T, R, pfx_no, Wn, Ln }, /* vcvt{d,q}q2ps */
+    { { 0x5b }, 2, T, R, pfx_66, W0, Ln }, /* vcvtps2dq */
+    { { 0x5b }, 2, T, R, pfx_f3, W0, Ln }, /* vcvttps2dq */
+    { { 0x5c }, 2, T, R, pfx_no, W0, Ln }, /* vsubps */
+    { { 0x5c }, 2, T, R, pfx_66, W1, Ln }, /* vsubpd */
+    { { 0x5c }, 2, T, R, pfx_f3, W0, LIG }, /* vsubss */
+    { { 0x5c }, 2, T, R, pfx_f2, W1, LIG }, /* vsubsd */
+    { { 0x5d }, 2, T, R, pfx_no, W0, Ln }, /* vminps */
+    { { 0x5d }, 2, T, R, pfx_66, W1, Ln }, /* vminpd */
+    { { 0x5d }, 2, T, R, pfx_f3, W0, LIG }, /* vminss */
+    { { 0x5d }, 2, T, R, pfx_f2, W1, LIG }, /* vminsd */
+    { { 0x5e }, 2, T, R, pfx_no, W0, Ln }, /* vdivps */
+    { { 0x5e }, 2, T, R, pfx_66, W1, Ln }, /* vdivpd */
+    { { 0x5e }, 2, T, R, pfx_f3, W0, LIG }, /* vdivss */
+    { { 0x5e }, 2, T, R, pfx_f2, W1, LIG }, /* vdivsd */
+    { { 0x5f }, 2, T, R, pfx_no, W0, Ln }, /* vmaxps */
+    { { 0x5f }, 2, T, R, pfx_66, W1, Ln }, /* vmaxpd */
+    { { 0x5f }, 2, T, R, pfx_f3, W0, LIG }, /* vmaxss */
+    { { 0x5f }, 2, T, R, pfx_f2, W1, LIG }, /* vmaxsd */
+    { { 0x60 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklbw */
+    { { 0x61 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpcklwd */
+    { { 0x62 }, 2, T, R, pfx_66, W0, Ln }, /* vpunpckldq */
+    { { 0x63 }, 2, T, R, pfx_66, WIG, Ln }, /* vpacksswb */
+    { { 0x64 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtb */
+    { { 0x65 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpgtw */
+    { { 0x66 }, 2, T, R, pfx_66, W0, Ln }, /* vpcmpgtd */
+    { { 0x67 }, 2, T, R, pfx_66, WIG, Ln }, /* vpackuswb */
+    { { 0x68 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhbw */
+    { { 0x69 }, 2, T, R, pfx_66, WIG, Ln }, /* vpunpckhwd */
+    { { 0x6a }, 2, T, R, pfx_66, W0, Ln }, /* vpunpckhdq */
+    { { 0x6b }, 2, T, R, pfx_66, W0, Ln }, /* vpackssdw */
+    { { 0x6c }, 2, T, R, pfx_66, W1, Ln }, /* vpunpcklqdq */
+    { { 0x6d }, 2, T, R, pfx_66, W1, Ln }, /* vpunpckhqdq */
+    { { 0x6e }, 2, T, R, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x6f }, 2, T, R, pfx_66, Wn, Ln }, /* vmovdqa{32,64} */
+    { { 0x6f }, 2, T, R, pfx_f3, Wn, Ln }, /* vmovdqu{32,64} */
+    { { 0x6f }, 2, T, R, pfx_f2, Wn, Ln }, /* vmovdqu{8,16} */
+    { { 0x70 }, 3, T, R, pfx_66, W0, Ln }, /* vpshufd */
+    { { 0x70 }, 3, T, R, pfx_f3, WIG, Ln }, /* vpshuflw */
+    { { 0x70 }, 3, T, R, pfx_f2, WIG, Ln }, /* vpshufhw */
+    { { 0x71, 0xd0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0x71, 0xe0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0x71, 0xf0 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0x72, 0xc0 }, 3, F, N, pfx_66, Wn, Ln }, /* vpror{d,q} */
+    { { 0x72, 0xc8 }, 3, F, N, pfx_66, Wn, Ln }, /* vprol{d,q} */
+    { { 0x72, 0xd0 }, 3, F, N, pfx_66, W0, Ln }, /* vpsrld */
+    { { 0x72, 0xe0 }, 3, F, N, pfx_66, Wn, Ln }, /* vpsra{d,q} */
+    { { 0x72, 0xf0 }, 3, F, N, pfx_66, W0, Ln }, /* vpslld */
+    { { 0x73, 0xd0 }, 3, F, N, pfx_66, W1, Ln }, /* vpsrlq */
+    { { 0x73, 0xd8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpsrldq */
+    { { 0x73, 0xf0 }, 3, F, N, pfx_66, W0, Ln }, /* vpsllq */
+    { { 0x73, 0xf8 }, 3, F, N, pfx_66, WIG, Ln }, /* vpslldq */
+    { { 0x74 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqb */
+    { { 0x75 }, 2, T, R, pfx_66, WIG, Ln }, /* vpcmpeqw */
+    { { 0x76 }, 2, T, R, pfx_66, W0, Ln }, /* vpcmpeqd */
+    { { 0x78 }, 2, T, R, pfx_no, Wn, Ln }, /* vcvttp{s,d}2udq */
+    { { 0x78 }, 2, T, R, pfx_66, Wn, Ln }, /* vcvttp{s,d}2uqq */
+    { { 0x78 }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvttss2usi */
+    { { 0x78 }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvttsd2usi */
+    { { 0x79 }, 2, T, R, pfx_no, Wn, Ln }, /* vcvtp{s,d}2udq */
+    { { 0x79 }, 2, T, R, pfx_66, Wn, Ln }, /* vcvtp{s,d}2uqq */
+    { { 0x79 }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtss2usi */
+    { { 0x79 }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtsd2usi */
+    { { 0x7a }, 2, T, R, pfx_66, Wn, Ln }, /* vcvttp{s,d}2qq */
+    { { 0x7a }, 2, T, R, pfx_f3, Wn, Ln }, /* vcvtu{d,q}2pd */
+    { { 0x7a }, 2, T, R, pfx_f2, Wn, Ln }, /* vcvtu{d,q}2ps */
+    { { 0x7b }, 2, T, R, pfx_66, Wn, Ln }, /* vcvtp{s,d}2qq */
+    { { 0x7b }, 2, T, R, pfx_f3, Wn, LIG }, /* vcvtusi2s */
+    { { 0x7b }, 2, T, R, pfx_f2, Wn, LIG }, /* vcvtusi2s */
+    { { 0x7e }, 2, T, W, pfx_66, Wn, L0 }, /* vmov{d,q} */
+    { { 0x7e }, 2, T, R, pfx_f3, W1, L0 }, /* vmovq */
+    { { 0x7f }, 2, T, W, pfx_66, Wn, Ln }, /* vmovdqa{32,64} */
+    { { 0x7f }, 2, T, W, pfx_f3, Wn, Ln }, /* vmovdqu{32,64} */
+    { { 0x7f }, 2, T, W, pfx_f2, Wn, Ln }, /* vmovdqu{8,16} */
+    { { 0xc2 }, 3, T, R, pfx_no, W0, Ln }, /* vcmpps */
+    { { 0xc2 }, 3, T, R, pfx_66, W1, Ln }, /* vcmppd */
+    { { 0xc2 }, 3, T, R, pfx_f3, W0, LIG }, /* vcmpss */
+    { { 0xc2 }, 3, T, R, pfx_f2, W1, LIG }, /* vcmpsd */
+    { { 0xc4 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrw */
+    { { 0xc5, 0xc0 }, 3, F, N, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0xc6 }, 3, T, R, pfx_no, W0, Ln }, /* vshufps */
+    { { 0xc6 }, 3, T, R, pfx_66, W1, Ln }, /* vshufpd */
+    { { 0xd1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsrlw */
+    { { 0xd2 }, 2, T, R, pfx_66, W0, Ln }, /* vpsrld */
+    { { 0xd3 }, 2, T, R, pfx_66, W1, Ln }, /* vpsrlq */
+    { { 0xd4 }, 2, T, R, pfx_66, W1, Ln }, /* vpaddq */
+    { { 0xd5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmullw */
+    { { 0xd6 }, 2, T, W, pfx_66, W1, L0 }, /* vmovq */
+    { { 0xd8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusb */
+    { { 0xd9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubusw */
+    { { 0xda }, 2, T, R, pfx_66, WIG, Ln }, /* vpminub */
+    { { 0xdb }, 2, T, R, pfx_66, Wn, Ln }, /* vpand{d,q} */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusb */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddusw */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxub */
+    { { 0xdf }, 2, T, R, pfx_66, Wn, Ln }, /* vpandn{d,q} */
+    { { 0xe0 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgb */
+    { { 0xe1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsraw */
+    { { 0xe2 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsra{d,q} */
+    { { 0xe3 }, 2, T, R, pfx_66, WIG, Ln }, /* vpavgw */
+    { { 0xe4 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhuw */
+    { { 0xe5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhw */
+    { { 0xe6 }, 2, T, R, pfx_66, WIG, Ln }, /* vcvttpd2dq */
+    { { 0xe6 }, 2, T, R, pfx_f3, Wn, Ln }, /* vcvt{d,q}q2pd */
+    { { 0xe6 }, 2, T, R, pfx_f2, WIG, Ln }, /* vcvtpd2dq */
+    { { 0xe7 }, 2, F, W, pfx_66, W0, Ln }, /* vmovntdq */
+    { { 0xe8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsb */
+    { { 0xe9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubsw */
+    { { 0xea }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsw */
+    { { 0xeb }, 2, T, R, pfx_66, Wn, Ln }, /* vpor{d,q} */
+    { { 0xec }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsb */
+    { { 0xed }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddsw */
+    { { 0xee }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsw */
+    { { 0xef }, 2, T, R, pfx_66, Wn, Ln }, /* vpxor{d,q} */
+    { { 0xf1 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsllw */
+    { { 0xf2 }, 2, T, R, pfx_66, W0, Ln }, /* vpslld */
+    { { 0xf3 }, 2, T, R, pfx_66, W1, Ln }, /* vpsllq */
+    { { 0xf4 }, 2, T, R, pfx_66, W1, Ln }, /* vpmuludq */
+    { { 0xf5 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddwd */
+    { { 0xf6 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsadbw */
+    { { 0xf8 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubb */
+    { { 0xf9 }, 2, T, R, pfx_66, WIG, Ln }, /* vpsubw */
+    { { 0xfa }, 2, T, R, pfx_66, W0, Ln }, /* vpsubd */
+    { { 0xfb }, 2, T, R, pfx_66, W1, Ln }, /* vpsubq */
+    { { 0xfc }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddb */
+    { { 0xfd }, 2, T, R, pfx_66, WIG, Ln }, /* vpaddw */
+    { { 0xfe }, 2, T, R, pfx_66, W0, Ln }, /* vpaddd */
+}, evex_0f38[] = {
+    { { 0x00 }, 2, T, R, pfx_66, WIG, Ln }, /* vpshufb */
+    { { 0x04 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaddubsw */
+    { { 0x0b }, 2, T, R, pfx_66, WIG, Ln }, /* vpmulhrsw */
+    { { 0x0c }, 2, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x0d }, 2, T, R, pfx_66, W1, Ln }, /* vpermilpd */
+    { { 0x10 }, 2, T, R, pfx_66, W1, Ln }, /* vpsrlvw */
+    { { 0x10 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovuswb */
+    { { 0x11 }, 2, T, R, pfx_66, W1, Ln }, /* vpsravw */
+    { { 0x11 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusdb */
+    { { 0x12 }, 2, T, R, pfx_66, W1, Ln }, /* vpsllvw */
+    { { 0x12 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusqb */
+    { { 0x13 }, 2, T, R, pfx_66, W0, Ln }, /* vcvtph2ps */
+    { { 0x13 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusdw */
+    { { 0x14 }, 2, T, R, pfx_66, Wn, Ln }, /* vprorv{d,q} */
+    { { 0x14 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusqw */
+    { { 0x15 }, 2, T, R, pfx_66, Wn, Ln }, /* vprolv{d,q} */
+    { { 0x15 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovusqd */
+    { { 0x16 }, 2, T, R, pfx_66, Wn, L1|L2 }, /* vpermp{s,d} */
+    { { 0x18 }, 2, T, R, pfx_66, W0, Ln }, /* vbroadcastss */
+    { { 0x19 }, 2, T, R, pfx_66, Wn, L1|L2 }, /* vbroadcast{32x2,sd} */
+    { { 0x1a }, 2, F, R, pfx_66, Wn, L1|L2 }, /* vbroadcastf{32x4,64x2} */
+    { { 0x1b }, 2, F, R, pfx_66, Wn, L2 }, /* vbroadcastf{32x8,64x4} */
+    { { 0x1c }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsb */
+    { { 0x1d }, 2, T, R, pfx_66, WIG, Ln }, /* vpabsw */
+    { { 0x1e }, 2, T, R, pfx_66, W0, Ln }, /* vpabsd */
+    { { 0x1f }, 2, T, R, pfx_66, W1, Ln }, /* vpabsq */
+    { { 0x20 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbw */
+    { { 0x20 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovswb */
+    { { 0x21 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbd */
+    { { 0x21 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsdb */
+    { { 0x22 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxbq */
+    { { 0x22 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsqb */
+    { { 0x23 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwd */
+    { { 0x23 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsdw */
+    { { 0x24 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovsxwq */
+    { { 0x24 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsqw */
+    { { 0x25 }, 2, T, R, pfx_66, W0, Ln }, /* vpmovsxdq */
+    { { 0x25 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovsqd */
+    { { 0x26 }, 2, T, R, pfx_66, Wn, Ln }, /* vptestm{b,w} */
+    { { 0x26 }, 2, T, R, pfx_f3, Wn, Ln }, /* vptestnm{b,w} */
+    { { 0x27 }, 2, T, R, pfx_66, Wn, Ln }, /* vptestm{d,q} */
+    { { 0x27 }, 2, T, R, pfx_f3, Wn, Ln }, /* vptestnm{d,q} */
+    { { 0x28 }, 2, T, R, pfx_66, W1, Ln }, /* vpmuldq */
+    { { 0x28, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmovm2{b,w} */
+    { { 0x29 }, 2, T, R, pfx_66, W1, Ln }, /* vpcmpeqq */
+    { { 0x29, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmov{b,w}2m */
+    { { 0x2a }, 2, F, R, pfx_66, W0, Ln }, /* vmovntdqa */
+    { { 0x2a, 0xc0 }, 2, F, N, pfx_f3, W1, Ln }, /* vpbroadcastmb2q */
+    { { 0x2b }, 2, T, R, pfx_66, W0, Ln }, /* vpackusdw */
+    { { 0x2c }, 2, F, R, pfx_66, Wn, Ln }, /* vscalefp{s,d} */
+    { { 0x2d }, 2, F, R, pfx_66, Wn, LIG }, /* vscalefs{s,d} */
+    { { 0x30 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbw */
+    { { 0x30 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovwb */
+    { { 0x31 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbd */
+    { { 0x31 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovdb */
+    { { 0x32 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxbq */
+    { { 0x32 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovqb */
+    { { 0x33 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwd */
+    { { 0x33 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovdw */
+    { { 0x34 }, 2, T, R, pfx_66, WIG, Ln }, /* vpmovzxwq */
+    { { 0x34 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovqw */
+    { { 0x35 }, 2, T, R, pfx_66, W0, Ln }, /* vpmovzxdq */
+    { { 0x35 }, 2, T, W, pfx_f3, W0, Ln }, /* vpmovqd */
+    { { 0x36 }, 2, T, R, pfx_66, Wn, L1|L2 }, /* vperm{d,q} */
+    { { 0x37 }, 2, T, R, pfx_66, W1, Ln }, /* vpcmpgtq */
+    { { 0x38 }, 2, T, R, pfx_66, WIG, Ln }, /* vpminsb */
+    { { 0x38, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmovm2{d,q} */
+    { { 0x39 }, 2, T, R, pfx_66, Wn, Ln }, /* vpmins{d,q} */
+    { { 0x39, 0xc0 }, 2, F, N, pfx_f3, Wn, Ln }, /* vpmov{d,q}2m */
+    { { 0x3a }, 2, T, R, pfx_66, WIG, Ln }, /* vpminuw */
+    { { 0x2a, 0xc0 }, 2, F, N, pfx_f3, W0, Ln }, /* vpbroadcastmw2d */
+    { { 0x3b }, 2, T, R, pfx_66, Wn, Ln }, /* vpminu{d,q} */
+    { { 0x3c }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxsb */
+    { { 0x3d }, 2, T, R, pfx_66, Wn, Ln }, /* vpmaxs{d,q} */
+    { { 0x3e }, 2, T, R, pfx_66, WIG, Ln }, /* vpmaxuw */
+    { { 0x3f }, 2, T, R, pfx_66, Wn, Ln }, /* vpmaxu{d,q} */
+    { { 0x40 }, 2, T, R, pfx_66, Wn, Ln }, /* vpmull{d,q} */
+    { { 0x42 }, 2, T, R, pfx_66, Wn, Ln }, /* vgetexpp{s,d} */
+    { { 0x43 }, 2, T, R, pfx_66, Wn, LIG }, /* vgetexps{s,d} */
+    { { 0x44 }, 2, T, R, pfx_66, Wn, Ln }, /* vlzcnt{d,q} */
+    { { 0x45 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsrlv{d,q} */
+    { { 0x46 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsrav{d,q} */
+    { { 0x47 }, 2, T, R, pfx_66, Wn, Ln }, /* vpsllv{d,q} */
+    { { 0x4c }, 2, T, R, pfx_66, Wn, Ln }, /* vrcp14p{s,d} */
+    { { 0x4d }, 2, T, R, pfx_66, Wn, LIG }, /* vrcp14s{s,d} */
+    { { 0x4e }, 2, T, R, pfx_66, Wn, Ln }, /* vrsqrt14p{s,d} */
+    { { 0x4f }, 2, T, R, pfx_66, Wn, LIG }, /* vrsqrt14s{s,d} */
+    { { 0x50 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpbusd */
+    { { 0x51 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpbusds */
+    { { 0x52 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpwssd */
+    { { 0x52 }, 2, T, R, pfx_f3, W0, Ln }, /* vdpbf16ps */
+    { { 0x52 }, 2, T, R, pfx_f2, W0, L2 }, /* vp4dpwssd */
+    { { 0x53 }, 2, T, R, pfx_66, W0, Ln }, /* vpdpwssds */
+    { { 0x53 }, 2, T, R, pfx_f2, W0, L2 }, /* vp4dpwssds */
+    { { 0x54 }, 2, T, R, pfx_66, Wn, Ln }, /* vpopcnt{b,w} */
+    { { 0x55 }, 2, T, R, pfx_66, Wn, Ln }, /* vpopcnt{d,q} */
+    { { 0x58 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastd */
+    { { 0x59 }, 2, T, R, pfx_66, Wn, Ln }, /* vbroadcast32x2 / vpbroadcastq */
+    { { 0x5a }, 2, F, R, pfx_66, Wn, L1|L2 }, /* vbroadcasti{32x4,64x2} */
+    { { 0x5b }, 2, F, R, pfx_66, Wn, L2 }, /* vbroadcasti{32x8,64x4} */
+    { { 0x62 }, 2, T, R, pfx_66, Wn, Ln }, /* vpexpand{b,w} */
+    { { 0x63 }, 2, T, W, pfx_66, Wn, Ln }, /* vpcompress{b,w} */
+    { { 0x64 }, 2, T, R, pfx_66, Wn, Ln }, /* vpblendm{d,q} */
+    { { 0x65 }, 2, T, R, pfx_66, Wn, Ln }, /* vblendmp{s,d} */
+    { { 0x66 }, 2, T, R, pfx_66, Wn, Ln }, /* vpblendm{b,w} */
+    { { 0x68 }, 2, T, R, pfx_f2, Wn, Ln }, /* vp2intersect{d,q} */
+    { { 0x70 }, 2, T, R, pfx_66, W1, Ln }, /* vpshldvw */
+    { { 0x71 }, 2, T, R, pfx_66, Wn, Ln }, /* vpshldv{d,q} */
+    { { 0x72 }, 2, T, R, pfx_66, W1, Ln }, /* vpshrdvw */
+    { { 0x72 }, 2, T, R, pfx_f3, W1, Ln }, /* vcvtneps2bf16 */
+    { { 0x72 }, 2, T, R, pfx_f2, W1, Ln }, /* vcvtne2ps2bf16 */
+    { { 0x73 }, 2, T, R, pfx_66, Wn, Ln }, /* vpshrdv{d,q} */
+    { { 0x75 }, 2, T, R, pfx_66, Wn, Ln }, /* vpermi2{b,w} */
+    { { 0x76 }, 2, T, R, pfx_66, Wn, Ln }, /* vpermi2{d,q} */
+    { { 0x77 }, 2, T, R, pfx_66, Wn, Ln }, /* vpermi2p{s,d} */
+    { { 0x78 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastb */
+    { { 0x79 }, 2, T, R, pfx_66, W0, Ln }, /* vpbroadcastw */
+    { { 0x7a, 0xc0 }, 2, F, N, pfx_66, W0, Ln }, /* vpbroadcastb */
+    { { 0x7b, 0xc0 }, 2, F, N, pfx_66, W0, Ln }, /* vpbroadcastw */
+    { { 0x7c, 0xc0 }, 2, F, N, pfx_66, W0, Ln }, /* vpbroadcast{d,q} */
+    { { 0x7d }, 2, T, R, pfx_66, Wn, Ln }, /* vpermt2{b,w} */
+    { { 0x7e }, 2, T, R, pfx_66, Wn, Ln }, /* vpermt2{d,q} */
+    { { 0x7f }, 2, T, R, pfx_66, Wn, Ln }, /* vpermt2p{s,d} */
+    { { 0x83 }, 2, T, R, pfx_66, W1, Ln }, /* vpmultishiftqb */
+    { { 0x88 }, 2, T, R, pfx_66, Wn, Ln }, /* vpexpandp{s,d} */
+    { { 0x89 }, 2, T, R, pfx_66, Wn, Ln }, /* vpexpand{d,q} */
+    { { 0x8a }, 2, T, W, pfx_66, Wn, Ln }, /* vpcompressp{s,d} */
+    { { 0x8b }, 2, T, W, pfx_66, Wn, Ln }, /* vpcompress{d,q} */
+    { { 0x8d }, 2, F, R, pfx_66, Wn, Ln }, /* vperm{b,w} */
+    { { 0x8f }, 2, F, R, pfx_66, W0, Ln }, /* vpshufbitqmb */
+    { { 0x90, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vpgatherd{d,q} */
+    { { 0x91, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vpgatherq{d,q} */
+    { { 0x92, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vgatherdp{s,d} */
+    { { 0x93, VSIB(1) }, 3, F, R, pfx_66, Wn, Ln, T }, /* vgatherqp{s,d} */
+    { { 0x96 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmaddsub132p{s,d} */
+    { { 0x97 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsubadd132p{s,d} */
+    { { 0x98 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmadd132p{s,d} */
+    { { 0x99 }, 2, T, R, pfx_66, Wn, LIG }, /* vfmadd132s{s,d} */
+    { { 0x9a }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsub132p{s,d} */
+    { { 0x9a }, 2, T, R, pfx_f2, W0, L2 }, /* v4fmaddps */
+    { { 0x9b }, 2, T, R, pfx_66, Wn, LIG }, /* vfmsub132s{s,d} */
+    { { 0x9b }, 2, T, R, pfx_f2, W0, LIG }, /* v4fmaddss */
+    { { 0x9c }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmadd132p{s,d} */
+    { { 0x9d }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmadd132s{s,d} */
+    { { 0x9e }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmsub132p{s,d} */
+    { { 0x9f }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmsub132s{s,d} */
+    { { 0xa0, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vpscatterd{d,q} */
+    { { 0xa1, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vpscatterq{d,q} */
+    { { 0xa2, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vscatterdp{s,d} */
+    { { 0xa3, VSIB(1) }, 3, F, W, pfx_66, Wn, Ln, T }, /* vscatterqp{s,d} */
+    { { 0xa6 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmaddsub213p{s,d} */
+    { { 0xa7 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsubadd213p{s,d} */
+    { { 0xa8 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmadd213p{s,d} */
+    { { 0xa9 }, 2, T, R, pfx_66, Wn, LIG }, /* vfmadd213s{s,d} */
+    { { 0x9a }, 2, T, R, pfx_f2, W0, L2 }, /* v4fnmaddps */
+    { { 0xaa }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsub213p{s,d} */
+    { { 0xab }, 2, T, R, pfx_66, Wn, LIG }, /* vfmsub213s{s,d} */
+    { { 0x9b }, 2, T, R, pfx_f2, W0, LIG }, /* v4fnmaddss */
+    { { 0xac }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmadd213p{s,d} */
+    { { 0xad }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmadd213s{s,d} */
+    { { 0xae }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmsub213p{s,d} */
+    { { 0xaf }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmsub213s{s,d} */
+    { { 0xb4 }, 2, T, R, pfx_66, W1, Ln }, /* vpmadd52luq */
+    { { 0xb5 }, 2, T, R, pfx_66, W1, Ln }, /* vpmadd52huq */
+    { { 0xb6 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmaddsub231p{s,d} */
+    { { 0xb7 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsubadd231p{s,d} */
+    { { 0xb8 }, 2, T, R, pfx_66, Wn, Ln }, /* vfmadd231p{s,d} */
+    { { 0xb9 }, 2, T, R, pfx_66, Wn, LIG }, /* vfmadd231s{s,d} */
+    { { 0xba }, 2, T, R, pfx_66, Wn, Ln }, /* vfmsub231p{s,d} */
+    { { 0xbb }, 2, T, R, pfx_66, Wn, LIG }, /* vfmsub231s{s,d} */
+    { { 0xbc }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmadd231p{s,d} */
+    { { 0xbd }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmadd231s{s,d} */
+    { { 0xbe }, 2, T, R, pfx_66, Wn, Ln }, /* vfnmsub231p{s,d} */
+    { { 0xbf }, 2, T, R, pfx_66, Wn, LIG }, /* vfnmsub231s{s,d} */
+    { { 0xc4 }, 2, T, R, pfx_66, Wn, Ln }, /* vpconflict{d,q} */
+    { { 0xc6, VSIB(1) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf0dp{s,d} */
+    { { 0xc6, VSIB(2) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf1dp{s,d} */
+    { { 0xc6, VSIB(5) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf0dp{s,d} */
+    { { 0xc6, VSIB(6) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf1dp{s,d} */
+    { { 0xc7, VSIB(1) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf0qp{s,d} */
+    { { 0xc7, VSIB(2) }, 3, F, N, pfx_66, Wn, L2, T }, /* vgatherpf1qp{s,d} */
+    { { 0xc7, VSIB(5) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf0qp{s,d} */
+    { { 0xc7, VSIB(6) }, 3, F, N, pfx_66, Wn, L2, T }, /* vscatterpf1qp{s,d} */
+    { { 0xc8 }, 2, T, R, pfx_66, Wn, L2 }, /* vexp2p{s,d} */
+    { { 0xca }, 2, T, R, pfx_66, Wn, L2 }, /* vrcp28p{s,d} */
+    { { 0xcb }, 2, T, R, pfx_66, Wn, LIG }, /* vrcp28s{s,d} */
+    { { 0xcc }, 2, T, R, pfx_66, Wn, L2 }, /* vrsqrt28p{s,d} */
+    { { 0xcd }, 2, T, R, pfx_66, Wn, LIG }, /* vrsqrt28s{s,d} */
+    { { 0xcf }, 2, T, R, pfx_66, W0, Ln }, /* vgf2p8mulb */
+    { { 0xdc }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenc */
+    { { 0xdd }, 2, T, R, pfx_66, WIG, Ln }, /* vaesenclast */
+    { { 0xde }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdec */
+    { { 0xdf }, 2, T, R, pfx_66, WIG, Ln }, /* vaesdeclast */
+}, evex_0f3a[] = {
+    { { 0x00 }, 3, T, R, pfx_66, W1, L1|L2 }, /* vpermq */
+    { { 0x01 }, 3, T, R, pfx_66, W1, L1|L2 }, /* vpermpd */
+    { { 0x03 }, 3, T, R, pfx_66, Wn, Ln }, /* valign{d,q} */
+    { { 0x04 }, 3, T, R, pfx_66, W0, Ln }, /* vpermilps */
+    { { 0x05 }, 3, T, R, pfx_66, W1, Ln }, /* vpermilpd */
+    { { 0x08 }, 3, T, R, pfx_66, W0, Ln }, /* vrndscaleps */
+    { { 0x09 }, 3, T, R, pfx_66, W1, Ln }, /* vrndscalepd */
+    { { 0x0a }, 3, T, R, pfx_66, WIG, LIG }, /* vrndscaless */
+    { { 0x0b }, 3, T, R, pfx_66, WIG, LIG }, /* vrndscalesd */
+    { { 0x0f }, 3, T, R, pfx_66, WIG, Ln }, /* vpalignr */
+    { { 0x14 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrb */
+    { { 0x15 }, 3, T, W, pfx_66, WIG, L0 }, /* vpextrw */
+    { { 0x16 }, 3, T, W, pfx_66, Wn, L0 }, /* vpextr{d,q} */
+    { { 0x17 }, 3, T, W, pfx_66, WIG, L0 }, /* vextractps */
+    { { 0x18 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vinsertf{32x4,64x2} */
+    { { 0x19 }, 3, T, W, pfx_66, Wn, L1|L2 }, /* vextractf{32x4,64x2} */
+    { { 0x1a }, 3, T, R, pfx_66, Wn, L2 }, /* vinsertf{32x8,64x4} */
+    { { 0x1b }, 3, T, W, pfx_66, Wn, L2 }, /* vextractf{32x8,64x4} */
+    { { 0x1d }, 3, T, W, pfx_66, W0, Ln }, /* vcvtps2ph */
+    { { 0x1e }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmpu{d,q} */
+    { { 0x1f }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmp{d,q} */
+    { { 0x20 }, 3, T, R, pfx_66, WIG, L0 }, /* vpinsrb */
+    { { 0x21 }, 3, T, R, pfx_66, WIG, L0 }, /* vinsertps */
+    { { 0x22 }, 3, T, R, pfx_66, Wn, L0 }, /* vpinsr{d,q} */
+    { { 0x23 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vshuff{32x4,64x2} */
+    { { 0x25 }, 3, T, R, pfx_66, Wn, Ln }, /* vpternlog{d,q} */
+    { { 0x26 }, 3, T, R, pfx_66, Wn, Ln }, /* vgetmantp{s,d} */
+    { { 0x27 }, 3, T, R, pfx_66, Wn, LIG }, /* vgetmants{s,d} */
+    { { 0x38 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vinserti{32x4,64x2} */
+    { { 0x39 }, 3, T, W, pfx_66, Wn, L1|L2 }, /* vextracti{32x4,64x2} */
+    { { 0x3a }, 3, T, R, pfx_66, Wn, L2 }, /* vinserti{32x8,64x4} */
+    { { 0x3b }, 3, T, W, pfx_66, Wn, L2 }, /* vextracti{32x8,64x4} */
+    { { 0x3e }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmpu{b,w} */
+    { { 0x3f }, 3, T, R, pfx_66, Wn, Ln }, /* vpcmp{b,w} */
+    { { 0x42 }, 3, T, R, pfx_66, W0, Ln }, /* vdbpsadbw */
+    { { 0x43 }, 3, T, R, pfx_66, Wn, L1|L2 }, /* vshufi{32x4,64x2} */
+    { { 0x44 }, 3, T, R, pfx_66, WIG, Ln }, /* vpclmulqdq */
+    { { 0x50 }, 3, T, R, pfx_66, Wn, Ln }, /* vrangep{s,d} */
+    { { 0x51 }, 3, T, R, pfx_66, Wn, LIG }, /* vranges{s,d} */
+    { { 0x54 }, 3, T, R, pfx_66, Wn, Ln }, /* vfixupimmp{s,d} */
+    { { 0x55 }, 3, T, R, pfx_66, Wn, LIG }, /* vfixumpimms{s,d} */
+    { { 0x56 }, 3, T, R, pfx_66, Wn, Ln }, /* vreducep{s,d} */
+    { { 0x57 }, 3, T, R, pfx_66, Wn, LIG }, /* vreduces{s,d} */
+    { { 0x66 }, 3, T, R, pfx_66, Wn, Ln }, /* vfpclassp{s,d} */
+    { { 0x67 }, 3, T, R, pfx_66, Wn, LIG }, /* vfpclasss{s,d} */
+    { { 0x70 }, 3, T, R, pfx_66, W1, Ln }, /* vshldw */
+    { { 0x71 }, 3, T, R, pfx_66, Wn, Ln }, /* vshld{d,q} */
+    { { 0x72 }, 3, T, R, pfx_66, W1, Ln }, /* vshrdw */
+    { { 0x73 }, 3, T, R, pfx_66, Wn, Ln }, /* vshrd{d,q} */
+    { { 0xce }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineqb */
+    { { 0xcf }, 3, T, R, pfx_66, W1, Ln }, /* vgf2p8affineinvqb */
+};
+
+static const struct {
+    const struct evex *tbl;
+    unsigned int num;
+} evex[] = {
+    { evex_0f,   ARRAY_SIZE(evex_0f) },
+    { evex_0f38, ARRAY_SIZE(evex_0f38) },
+    { evex_0f3a, ARRAY_SIZE(evex_0f3a) },
+};
+
+#undef Wn
+
 #undef F
 #undef N
 #undef R
@@ -1885,6 +2345,50 @@ void predicates_test(void *instr, struct x86_emulate_ctxt *ctxt,
             }
         }
 
+        for ( x = 0; x < ARRAY_SIZE(evex); ++x )
+        {
+            for ( t = 0; t < evex[x].num; ++t )
+            {
+                uint8_t *ptr = instr;
+                unsigned int l;
+
+                memset(instr + 5, 0xcc, 10);
+
+                *ptr++ = 0x62;
+                *ptr++ = 0xf1 + x;
+                *ptr++ = 0x7c | evex[x].tbl[t].pfx;
+                *ptr++ = 0x08 | evex[x].tbl[t].mask;
+
+                for ( l = 3; l--; )
+                {
+                    if ( evex[x].tbl[t].l != LIG && !(evex[x].tbl[t].l & (1u << l)) )
+                        continue;
+
+                    ptr[-1] &= ~0x60;
+                    ptr[-1] |= l << 5;
+                    memcpy(ptr, evex[x].tbl[t].opc, evex[x].tbl[t].len);
+
+                    if ( evex[x].tbl[t].w == WIG || (evex[x].tbl[t].w & W0) )
+                    {
+                        ptr[-2] &= ~0x80;
+                        do_test(instr, evex[x].tbl[t].len + ((void *)ptr - instr),
+                                evex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                evex[x].tbl[t].mem, ctxt, fetch);
+                    }
+
+                    if ( evex[x].tbl[t].w == WIG || (evex[x].tbl[t].w & W1) )
+                    {
+                        ptr[-2] |= 0x80;
+                        memcpy(ptr, evex[x].tbl[t].opc, evex[x].tbl[t].len);
+
+                        do_test(instr, evex[x].tbl[t].len + ((void *)ptr - instr),
+                                evex[x].tbl[t].modrm ? (void *)ptr - instr + 1 : 0,
+                                evex[x].tbl[t].mem, ctxt, fetch);
+                    }
+                }
+            }
+        }
+
         if ( errors )
             exit(1);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:57:36 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:57:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DB2-0005Za-Gc; Sat, 08 Aug 2020 00:57:36 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DB1-0005ZS-27
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:35 +0000
X-Inumbo-ID: 08c14417-2bce-4c45-97c4-be01a46d6298
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 08c14417-2bce-4c45-97c4-be01a46d6298;
 Sat, 08 Aug 2020 00:57:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=/RmM+s3pZooizBYUkqtt57/FC4h9O9SxuJRWb7IrwBg=; b=VN7trvO4Uc/3QzaWViA6/Jm1IZ
 JDVjQ64c4WWr++qKI7fEQobrV9PiR/Ms915vhnBml2vZGf4qzxRLu+VzfcjeGrSwZat9hPVbAQeX/
 t/tZEW48zD2BlXEhm9x1UAfWmQUDc8y2oNZj98vTXC3NqH64vlsche/IQNNFCS4WZXZ8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DB0-0000k0-GO
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DB0-0003BL-El
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:34 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86emul: correct AVX512_BF16 insn names in EVEX Disp8
 test
Message-Id: <E1k4DB0-0003BL-El@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:57:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e58a71274c65e7547fc2e917f051c5c04e2820e2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 5 10:30:18 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 5 10:30:18 2020 +0200

    x86emul: correct AVX512_BF16 insn names in EVEX Disp8 test
    
    The leading 'v' ought to be omitted from the table entries.
    
    Fixes: 7ff66809ccd5 ("x86emul: support AVX512_BF16 insns")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/tests/x86_emulator/evex-disp8.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/tests/x86_emulator/evex-disp8.c b/tools/tests/x86_emulator/evex-disp8.c
index 60c569d5e5..78153847a0 100644
--- a/tools/tests/x86_emulator/evex-disp8.c
+++ b/tools/tests/x86_emulator/evex-disp8.c
@@ -551,9 +551,9 @@ static const struct test avx512_4vnniw_512[] = {
 };
 
 static const struct test avx512_bf16_all[] = {
-    INSN(vcvtne2ps2bf16, f2, 0f38, 72, vl, d, vl),
-    INSN(vcvtneps2bf16,  f3, 0f38, 72, vl, d, vl),
-    INSN(vdpbf16ps,      f3, 0f38, 52, vl, d, vl),
+    INSN(cvtne2ps2bf16, f2, 0f38, 72, vl, d, vl),
+    INSN(cvtneps2bf16,  f3, 0f38, 72, vl, d, vl),
+    INSN(dpbf16ps,      f3, 0f38, 52, vl, d, vl),
 };
 
 static const struct test avx512_bitalg_all[] = {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:57:46 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:57:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DBC-0005aj-IE; Sat, 08 Aug 2020 00:57:46 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DBB-0005aZ-7z
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:45 +0000
X-Inumbo-ID: 391e8602-1d29-4b41-9089-3242ae584419
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 391e8602-1d29-4b41-9089-3242ae584419;
 Sat, 08 Aug 2020 00:57:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=MiUWHsDfZBFT3gIE5G8/DcUGjS/56VlpkQQWevryiA4=; b=xtJjXekNnITdKCU0fqkZ+hZu0V
 hA+cQkFh2S4EsIJjmydwn1yEIjtDhS9XPqoM06zzZwvshLt3b81p4DstoDT4ylZ0o4TTosM91xDGE
 3NN7bhZxUtFakjSEygT5J2L2WGVCQ3vvva6zb838DzxGX7QkgGdhTXMR6/JCp10mVJ0I=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBA-0000k7-JI
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBA-0003Bt-Ih
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:44 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/ioapic: Fix fixmap error path logic in
 ioapic_init_mappings()
Message-Id: <E1k4DBA-0003Bt-Ih@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:57:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b4175c6693e089ffcd77cd1ea388e76e67d36d57
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 12:05:27 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/ioapic: Fix fixmap error path logic in ioapic_init_mappings()
    
    In the case that bad_ioapic_register() fails, the current position of idx++
    means that clear_fixmap(idx) will be called with the wrong index, and not
    clean up the mapping just created.
    
    Increment idx as part of the loop, rather than midway through the loop body.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/io_apic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 878ee5192d..e66fa99ec7 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2543,7 +2543,7 @@ static void __init ioapic_init_mappings(void)
 
     nr_irqs_gsi = 0;
 
-    for ( i = 0; i < nr_ioapics; i++ )
+    for ( i = 0; i < nr_ioapics; i++, idx++ )
     {
         union IO_APIC_reg_01 reg_01;
         paddr_t ioapic_phys = mp_ioapics[i].mpc_apicaddr;
@@ -2560,7 +2560,6 @@ static void __init ioapic_init_mappings(void)
         set_fixmap_nocache(idx, ioapic_phys);
         apic_printk(APIC_VERBOSE, "mapped IOAPIC to %08Lx (%08lx)\n",
                     __fix_to_virt(idx), ioapic_phys);
-        idx++;
 
         if ( bad_ioapic_register(i) )
         {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:57:56 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:57:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DBM-0005br-Jn; Sat, 08 Aug 2020 00:57:56 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DBL-0005bg-Jm
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:55 +0000
X-Inumbo-ID: ac20dac6-286e-4498-b152-10304ae4d0e5
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ac20dac6-286e-4498-b152-10304ae4d0e5;
 Sat, 08 Aug 2020 00:57:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ixk868TiZlC73mz7+Cw8IxGK9GCGkkBqBUpC0EGAjlE=; b=LP7WqQPVmCdEdwPASrcUxd5bqR
 kTV8aaKeLL/+ISKHEFWjPPY7HOuM6pSovTp7bDcAoDRfLPz+e0MaZAzG9Rt7Giqv4jvhmzt28/YLP
 nMM1gtLCcr6D/LL0t5na7esKEI9+TSd14UTE1EYnC12TFd1pcmGH9oxLvwwtiXLBJo6U=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBK-0000kJ-M4
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBK-0003CX-LR
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:57:54 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/ioapic: Fix style in io_apic.h
Message-Id: <E1k4DBK-0003CX-LR@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:57:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a8ee9c4d3fb8532a60c6c87abd0fe80b5b03c6e8
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 11:49:15 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/ioapic: Fix style in io_apic.h
    
    This file is a mix of Xen and Linux styles.  Switch it fully to Xen style.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/include/asm-x86/io_apic.h | 48 +++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h
index e006b2b8dd..72d0b2872c 100644
--- a/xen/include/asm-x86/io_apic.h
+++ b/xen/include/asm-x86/io_apic.h
@@ -13,9 +13,9 @@
  * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
  */
 
-#define IO_APIC_BASE(idx) \
-		((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
-		+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
+#define IO_APIC_BASE(idx)                                               \
+    ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + (idx))         \
+                      + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
 
 #define IO_APIC_ID(idx) (mp_ioapics[idx].mpc_apicid)
 
@@ -78,14 +78,14 @@ extern int nr_ioapics;
 extern int nr_ioapic_entries[MAX_IO_APICS];
 
 enum ioapic_irq_destination_types {
-	dest_Fixed = 0,
-	dest_LowestPrio = 1,
-	dest_SMI = 2,
-	dest__reserved_1 = 3,
-	dest_NMI = 4,
-	dest_INIT = 5,
-	dest__reserved_2 = 6,
-	dest_ExtINT = 7
+    dest_Fixed = 0,
+    dest_LowestPrio = 1,
+    dest_SMI = 2,
+    dest__reserved_1 = 3,
+    dest_NMI = 4,
+    dest_INIT = 5,
+    dest__reserved_2 = 6,
+    dest_ExtINT = 7
 };
 
 struct IO_APIC_route_entry {
@@ -135,28 +135,28 @@ unsigned int io_apic_gsi_base(unsigned int apic);
 
 static inline unsigned int __io_apic_read(unsigned int apic, unsigned int reg)
 {
-	*IO_APIC_BASE(apic) = reg;
-	return *(IO_APIC_BASE(apic)+4);
+    *IO_APIC_BASE(apic) = reg;
+    return *(IO_APIC_BASE(apic) + 4);
 }
 
 static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
 {
-	if (ioapic_reg_remapped(reg))
-		return iommu_read_apic_from_ire(apic, reg);
-	return __io_apic_read(apic, reg);
+    if ( ioapic_reg_remapped(reg) )
+        return iommu_read_apic_from_ire(apic, reg);
+    return __io_apic_read(apic, reg);
 }
 
 static inline void __io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
 {
-	*IO_APIC_BASE(apic) = reg;
-	*(IO_APIC_BASE(apic)+4) = value;
+    *IO_APIC_BASE(apic) = reg;
+    *(IO_APIC_BASE(apic) + 4) = value;
 }
 
 static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
 {
-	if (ioapic_reg_remapped(reg))
-		return iommu_update_ire_from_apic(apic, reg, value);
-	__io_apic_write(apic, reg, value);
+    if ( ioapic_reg_remapped(reg) )
+        return iommu_update_ire_from_apic(apic, reg, value);
+    __io_apic_write(apic, reg, value);
 }
 
 /*
@@ -165,9 +165,9 @@ static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned i
  */
 static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
 {
-	if (ioapic_reg_remapped(reg))
-		return iommu_update_ire_from_apic(apic, reg, value);
-	*(IO_APIC_BASE(apic)+4) = value;
+    if ( ioapic_reg_remapped(reg) )
+        return iommu_update_ire_from_apic(apic, reg, value);
+    *(IO_APIC_BASE(apic) + 4) = value;
 }
 
 /* 1 if "noapic" boot option passed */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:58:06 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:58:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DBW-0005cw-LS; Sat, 08 Aug 2020 00:58:06 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DBV-0005cm-EG
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:58:05 +0000
X-Inumbo-ID: f67fc39d-025d-4eb6-8904-c646e3d86344
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id f67fc39d-025d-4eb6-8904-c646e3d86344;
 Sat, 08 Aug 2020 00:58:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Kn1o4XWh7KRuhJUZI7mSisXYVZkBcLLNgZHWLwXgdh0=; b=STSZ5195KTO0PEoP84ZheqMi0k
 gceRoMytqxXE2Ktk8cyh57EVntTqh+Fz4AliO2pQMhkYzrrJPj9XEdTfz3A4HAZhHdgvH2bsZTcwX
 FlOIv8iR5PbnKd2IqpHbe8cWIejg8iFXkSEBNv9FCTPz8Ud9eoAq1MjyIxDDSYzFpt8s=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBU-0000l4-Oz
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:58:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBU-0003DM-OF
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:58:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/ioapic: Improve code generation for __io_apic_{read,
 write}()
Message-Id: <E1k4DBU-0003DM-OF@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:58:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit dae7ea5138f72f3ac38367f50d941e8f70628119
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 14:35:16 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/ioapic: Improve code generation for __io_apic_{read,write}()
    
    The write into REGSEL prevents the optimiser from reusing the address
    calculation, forcing it to be calcualted twice.
    
    The calculation itself is quite expensive.  Pull it out into a local varaible.
    
    Bloat-o-meter reports:
      add/remove: 0/0 grow/shrink: 0/26 up/down: 0/-1527 (-1527)
    
    Also correct the register type, which is uint32_t, not int.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/include/asm-x86/io_apic.h | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h
index 72d0b2872c..ef0878b09e 100644
--- a/xen/include/asm-x86/io_apic.h
+++ b/xen/include/asm-x86/io_apic.h
@@ -14,8 +14,8 @@
  */
 
 #define IO_APIC_BASE(idx)                                               \
-    ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + (idx))         \
-                      + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
+    ((volatile uint32_t *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + (idx))    \
+                           + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
 
 #define IO_APIC_ID(idx) (mp_ioapics[idx].mpc_apicid)
 
@@ -135,8 +135,10 @@ unsigned int io_apic_gsi_base(unsigned int apic);
 
 static inline unsigned int __io_apic_read(unsigned int apic, unsigned int reg)
 {
-    *IO_APIC_BASE(apic) = reg;
-    return *(IO_APIC_BASE(apic) + 4);
+    volatile uint32_t *regs = IO_APIC_BASE(apic);
+
+    regs[0] = reg;
+    return regs[4];
 }
 
 static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
@@ -148,8 +150,10 @@ static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
 
 static inline void __io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
 {
-    *IO_APIC_BASE(apic) = reg;
-    *(IO_APIC_BASE(apic) + 4) = value;
+    volatile uint32_t *regs = IO_APIC_BASE(apic);
+
+    regs[0] = reg;
+    regs[4] = value;
 }
 
 static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 00:58:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 00:58:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4DBg-0005eX-NI; Sat, 08 Aug 2020 00:58:16 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4DBf-0005eE-Dt
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:58:15 +0000
X-Inumbo-ID: 937f9390-8b00-473f-97bf-475542e149f1
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 937f9390-8b00-473f-97bf-475542e149f1;
 Sat, 08 Aug 2020 00:58:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=kWAnDGYr+HS7CfPv3fjUjcJ1/KqjY3wDuNoYYyKQAM0=; b=LduBQysnqepUxFpK3goL93NEVA
 76CFgVfuNHEYRSivsloEsrwlw7MA0d3Qe1K4hZrO85eySxexfmJMhNgsVIUh9/rGJqFX4Ith+sEP9
 RRDirGwB+onLJRdqmYANxgJWuitSHpKmeuYeGs5mt+h/SG6KjCDp7/jcsa6yqFigypBU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBe-0000lB-Rv
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:58:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4DBe-0003E9-RG
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 00:58:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/tsc: Fix diagnostics for TSC frequency
Message-Id: <E1k4DBe-0003E9-RG@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 00:58:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b2bc1e714462c6cc222e3bbc38d87b039b4fa405
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Aug 5 14:56:11 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 5 17:35:11 2020 +0100

    x86/tsc: Fix diagnostics for TSC frequency
    
    A Gemini Lake platform prints:
    
      (XEN) CPU0: TSC: 19200000MHz * 279 / 3 = 1785600000MHz
      (XEN) CPU0: 800..1800 MHz
    
    during boot.  The units on the first line are Hz, not MHz, so correct that and
    add a space for clarity.
    
    Also, for the min/max line, use three dots instead of two and add more spaces
    so that the line can't be mistaken for being a double decimal point typo.
    
    Boot now reads:
    
      (XEN) CPU0: TSC: 19200000 Hz * 279 / 3 = 1785600000 Hz
      (XEN) CPU0: 800 ... 1800 MHz
    
    Extend these changes to the other TSC diagnostics.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/amd.c   |  4 ++--
 xen/arch/x86/cpu/intel.c | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 0cc6853c42..8bc51bec10 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -624,10 +624,10 @@ void amd_log_freq(const struct cpuinfo_x86 *c)
 	if (idx && idx < h &&
 	    !rdmsr_safe(0xC0010064 + idx, val) && (val >> 63) &&
 	    !rdmsr_safe(0xC0010064, hi) && (hi >> 63))
-		printk("CPU%u: %lu (%lu..%lu) MHz\n",
+		printk("CPU%u: %lu (%lu ... %lu) MHz\n",
 		       smp_processor_id(), FREQ(val), FREQ(lo), FREQ(hi));
 	else if (h && !rdmsr_safe(0xC0010064, hi) && (hi >> 63))
-		printk("CPU%u: %lu..%lu MHz\n",
+		printk("CPU%u: %lu ... %lu MHz\n",
 		       smp_processor_id(), FREQ(lo), FREQ(hi));
 	else
 		printk("CPU%u: %lu MHz\n", smp_processor_id(), FREQ(lo));
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 69e99bb358..37439071d9 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -396,14 +396,14 @@ static void intel_log_freq(const struct cpuinfo_x86 *c)
 
             val *= ebx;
             do_div(val, eax);
-            printk("CPU%u: TSC: %uMHz * %u / %u = %LuMHz\n",
+            printk("CPU%u: TSC: %u Hz * %u / %u = %Lu Hz\n",
                    smp_processor_id(), ecx, ebx, eax, val);
         }
         else if ( ecx | eax | ebx )
         {
             printk("CPU%u: TSC:", smp_processor_id());
             if ( ecx )
-                printk(" core: %uMHz", ecx);
+                printk(" core: %u Hz", ecx);
             if ( ebx && eax )
                 printk(" ratio: %u / %u", ebx, eax);
             printk("\n");
@@ -417,11 +417,11 @@ static void intel_log_freq(const struct cpuinfo_x86 *c)
         {
             printk("CPU%u:", smp_processor_id());
             if ( ecx )
-                printk(" bus: %uMHz", ecx);
+                printk(" bus: %u MHz", ecx);
             if ( eax )
-                printk(" base: %uMHz", eax);
+                printk(" base: %u MHz", eax);
             if ( ebx )
-                printk(" max: %uMHz", ebx);
+                printk(" max: %u MHz", ebx);
             printk("\n");
         }
     }
@@ -446,7 +446,7 @@ static void intel_log_freq(const struct cpuinfo_x86 *c)
 
         printk("CPU%u: ", smp_processor_id());
         if ( min_ratio )
-            printk("%u..", (factor * min_ratio + 50) / 100);
+            printk("%u ... ", (factor * min_ratio + 50) / 100);
         printk("%u MHz\n", (factor * max_ratio + 50) / 100);
     }
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:55:10 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:55:10 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NRI-0008Sb-Iy; Sat, 08 Aug 2020 11:55:04 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NRH-0008SU-LO
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:03 +0000
X-Inumbo-ID: d6315491-f316-4217-a340-5f1049961c47
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id d6315491-f316-4217-a340-5f1049961c47;
 Sat, 08 Aug 2020 11:55:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=UjCwHuQrLR9AVPUhY1OR3TowOKv1Y5ZPtk0T+ivY+Vo=; b=QFijNH2HWWEoTX2z/cQFjDCwrY
 HqPi5j4QjkLk4u6b9QUCs3VQ3bF7iuHpClJyNGbcTHuJHzfQZSq8fwLOL2ZzQeCGqzGyOee1ET9j0
 5VAwqP9q502kxq1UB9Uu2nNx8rR3nqSO1woqr1X/BVOujcj1dm+r2+KzWCvF9Ka3JRoQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRG-0004ks-98
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRG-0005Rr-7x
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead
 of P2M_UNSHARE
Message-Id: <E1k4NRG-0005Rr-7x@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ddb6fd3f9c2b238cd9844547996ca300c0e303a3
Author:     Tamas K Lengyel <tamas.lengyel@intel.com>
AuthorDate: Fri Aug 7 17:15:37 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:15:37 2020 +0200

    x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead of P2M_UNSHARE
    
    While forking VMs running a small RTOS system (Zephyr) a Xen crash has been
    observed due to a mm-lock order violation while copying the HVM CPU context
    from the parent. This issue has been identified to be due to
    hap_update_paging_modes first getting a lock on the gfn using get_gfn. This
    call also creates a shared entry in the fork's memory map for the cr3 gfn. The
    function later calls hap_update_cr3 while holding the paging_lock, which
    results in the lock-order violation in vmx_load_pdptrs when it tries to unshare
    the above entry when it grabs the page with the P2M_UNSHARE flag set.
    
    Since vmx_load_pdptrs only reads from the page its usage of P2M_UNSHARE was
    unnecessary to start with. Using P2M_ALLOC is the appropriate flag to ensure
    the p2m is properly populated.
    
    Note that the lock order violation is avoided because before the paging_lock is
    taken a lookup is performed with P2M_ALLOC that forks the page, thus the second
    lookup in vmx_load_pdptrs succeeds without having to perform the fork. We keep
    P2M_ALLOC in vmx_load_pdptrs because there are code-paths leading up to it
    which don't take the paging_lock and that have no previous lookup. Currently no
    other code-path exists leading there with the paging_lock taken, thus no
    further adjustments are necessary.
    
    Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
    master commit: b67e859d0823f5b450e29379af9142d44a3ea370
    master date: 2020-06-19 15:24:55 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 5c47d10384..795adbee8f 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1320,7 +1320,7 @@ static void vmx_load_pdptrs(struct vcpu *v)
     if ( (cr3 & 0x1fUL) && !hvm_pcid_enabled(v) )
         goto crash;
 
-    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_UNSHARE);
+    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_ALLOC);
     if ( !page )
     {
         /* Ideally you don't want to crash but rather go into a wait 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:55:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:55:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NRS-0008TD-M0; Sat, 08 Aug 2020 11:55:14 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NRS-0008T8-7l
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:14 +0000
X-Inumbo-ID: 78824625-6cac-4902-9ee9-b5747bb85553
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 78824625-6cac-4902-9ee9-b5747bb85553;
 Sat, 08 Aug 2020 11:55:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=4MQNY5t/WsqlaizoPamKgXACD9kzQR2Z2iAfLZbUWDU=; b=pM3nxX/TO4d96PJ6KL24KIwmQq
 md1y687JCMKf3dmvYiCIO5MYBnn6Esvs5B+IlExNxKZQiKn9GnUpnLB+x/YzzYNmP6Yb2emksaznB
 7AreQIr9G7zs9Un8FpqtxCUSBufZOjC+z+IPcL8Qc4zyMQtC/OsEfy9NARzaXzW9L/k4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRQ-0004kv-CQ
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRQ-0005Sj-BS
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86/acpi: use FADT flags to determine the PMTMR
 width
Message-Id: <E1k4NRQ-0005Sj-BS@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 665f5c1271843db8886a5b91c41d4cc3294ca279
Author:     Grzegorz Uriasz <gorbak25@gmail.com>
AuthorDate: Fri Aug 7 17:16:48 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:16:48 2020 +0200

    x86/acpi: use FADT flags to determine the PMTMR width
    
    On some computers the bit width of the PM Timer as reported
    by ACPI is 32 bits when in fact the FADT flags report correctly
    that the timer is 24 bits wide. On affected machines such as the
    ASUS FX504GM and never gaming laptops this results in the inability
    to resume the machine from suspend. Without this patch suspend is
    broken on affected machines and even if a machine manages to resume
    correctly then the kernel time and xen timers are trashed.
    
    Signed-off-by: Grzegorz Uriasz <gorbak25@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: f325d2477eef8229c47d97031d314629521c70ab
    master date: 2020-06-25 09:11:09 +0200
---
 xen/arch/x86/acpi/boot.c    | 19 +++++++++++++++----
 xen/arch/x86/time.c         | 12 ++++--------
 xen/include/acpi/acmacros.h |  8 ++++++++
 3 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 15542a9bdf..0b0a8f62e4 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -473,10 +473,17 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
 
 #ifdef CONFIG_X86_PM_TIMER
 	/* detect the location of the ACPI PM Timer */
-	if (fadt->header.revision >= FADT2_REVISION_ID) {
+	if (fadt->header.revision >= FADT2_REVISION_ID &&
+	    fadt->xpm_timer_block.space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
 		/* FADT rev. 2 */
-		if (fadt->xpm_timer_block.space_id ==
-		    ACPI_ADR_SPACE_SYSTEM_IO) {
+		if (fadt->xpm_timer_block.access_width != 0 &&
+		    ACPI_ACCESS_BIT_WIDTH(fadt->xpm_timer_block.access_width) != 32)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid access width(%u)\n",
+			       fadt->xpm_timer_block.access_width);
+		else if (fadt->xpm_timer_block.bit_offset != 0)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid bit offset(%u)\n",
+			       fadt->xpm_timer_block.bit_offset);
+		else {
 			pmtmr_ioport = fadt->xpm_timer_block.address;
 			pmtmr_width = fadt->xpm_timer_block.bit_width;
 		}
@@ -488,8 +495,12 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
  	 */
 	if (!pmtmr_ioport) {
 		pmtmr_ioport = fadt->pm_timer_block;
-		pmtmr_width = fadt->pm_timer_length == 4 ? 24 : 0;
+		pmtmr_width = fadt->pm_timer_length == 4 ? 32 : 0;
 	}
+	if (pmtmr_width < 32 && (fadt->flags & ACPI_FADT_32BIT_TIMER))
+		printk(KERN_WARNING PREFIX "PM-Timer is too short\n");
+	if (pmtmr_width > 24 && !(fadt->flags & ACPI_FADT_32BIT_TIMER))
+		pmtmr_width = 24;
 	if (pmtmr_ioport)
 		printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x (%u bits)\n",
 		       pmtmr_ioport, pmtmr_width);
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 97ae10e46f..5893292424 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -453,16 +453,13 @@ static u64 read_pmtimer_count(void)
 static s64 __init init_pmtimer(struct platform_timesource *pts)
 {
     u64 start;
-    u32 count, target, mask = 0xffffff;
+    u32 count, target, mask;
 
-    if ( !pmtmr_ioport || !pmtmr_width )
+    if ( !pmtmr_ioport || (pmtmr_width != 24 && pmtmr_width != 32) )
         return 0;
 
-    if ( pmtmr_width == 32 )
-    {
-        pts->counter_bits = 32;
-        mask = 0xffffffff;
-    }
+    pts->counter_bits = pmtmr_width;
+    mask = 0xffffffff >> (32 - pmtmr_width);
 
     count = inl(pmtmr_ioport) & mask;
     start = rdtsc_ordered();
@@ -482,7 +479,6 @@ static struct platform_timesource __initdata plt_pmtimer =
     .name = "ACPI PM Timer",
     .frequency = ACPI_PM_FREQUENCY,
     .read_counter = read_pmtimer_count,
-    .counter_bits = 24,
     .init = init_pmtimer
 };
 
diff --git a/xen/include/acpi/acmacros.h b/xen/include/acpi/acmacros.h
index 6765535053..86c503c20f 100644
--- a/xen/include/acpi/acmacros.h
+++ b/xen/include/acpi/acmacros.h
@@ -121,6 +121,14 @@
 #define ACPI_COMPARE_NAME(a,b)          (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
 #endif
 
+/*
+ * Algorithm to obtain access bit or byte width.
+ * Can be used with access_width of struct acpi_generic_address and access_size of
+ * struct acpi_resource_generic_register.
+ */
+#define ACPI_ACCESS_BIT_WIDTH(size)     (1 << ((size) + 2))
+#define ACPI_ACCESS_BYTE_WIDTH(size)    (1 << ((size) - 1))
+
 /*
  * Macros for moving data around to/from buffers that are possibly unaligned.
  * If the hardware supports the transfer of unaligned data, just do the store.
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:55:25 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:55:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NRd-0008UL-No; Sat, 08 Aug 2020 11:55:25 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NRc-0008UB-RM
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:24 +0000
X-Inumbo-ID: 9585ac48-2b1c-49ab-a887-1ed215dbf720
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 9585ac48-2b1c-49ab-a887-1ed215dbf720;
 Sat, 08 Aug 2020 11:55:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=r2byFkx6QJHjf5Kg6zASog2ptNIEQhs14n6lrxLgKcw=; b=S0NlwypMBnkLP5gBNtk0dI7J6i
 Mi6dm76CN0BM3xGLjxQjw8nxDLzXNZt5pQresZKrexcD2X/am4mHE/3yi0CVEvNrHiZF3WVeJWBsW
 B9mZoK9AYYMnOoF6vBw/vlSEjHdPjmSfrG6UOat1oi4bct8jojG62rBVdnp/18+/Q/t8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRa-0004lk-G4
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRa-0005TH-ET
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86/msr: Disallow access to Processor Trace MSRs
Message-Id: <E1k4NRa-0005TH-ET@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d967a2bcd349b3676374781a8b5c06cf3b43636c
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:17:38 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:17:38 2020 +0200

    x86/msr: Disallow access to Processor Trace MSRs
    
    We do not expose the feature to guests, so should disallow access to the
    respective MSRs.  For simplicity, drop the entire block of MSRs, not just the
    subset which have been specified thus far.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Wei Liu <wl@xen.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: bcdfbb70fca579baa04f212c0936b77919bdae11
    master date: 2020-06-26 16:34:02 +0100
---
 xen/arch/x86/msr.c              | 2 ++
 xen/include/asm-x86/msr-index.h | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c
index 0cded3c0ad..6cbc078d73 100644
--- a/xen/arch/x86/msr.c
+++ b/xen/arch/x86/msr.c
@@ -135,6 +135,7 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t *val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
@@ -290,6 +291,7 @@ int guest_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index 91994669e1..0eb6855614 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -182,6 +182,14 @@
 #define MSR_MCU_OPT_CTRL                    0x00000123
 #define  MCU_OPT_CTRL_RNGDS_MITG_DIS        (_AC(1, ULL) <<  0)
 
+#define MSR_RTIT_OUTPUT_BASE                0x00000560
+#define MSR_RTIT_OUTPUT_MASK                0x00000561
+#define MSR_RTIT_CTL                        0x00000570
+#define MSR_RTIT_STATUS                     0x00000571
+#define MSR_RTIT_CR3_MATCH                  0x00000572
+#define MSR_RTIT_ADDR_A(n)                 (0x00000580 + (n) * 2)
+#define MSR_RTIT_ADDR_B(n)                 (0x00000581 + (n) * 2)
+
 #define MSR_U_CET                           0x000006a0
 #define MSR_S_CET                           0x000006a2
 #define MSR_PL0_SSP                         0x000006a4
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:55:34 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NRm-0008W0-PN; Sat, 08 Aug 2020 11:55:34 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NRl-0008Vm-JS
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:33 +0000
X-Inumbo-ID: 70a273aa-b81a-43ac-8ddf-5d7a372d4abc
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 70a273aa-b81a-43ac-8ddf-5d7a372d4abc;
 Sat, 08 Aug 2020 11:55:32 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=JZrDXuOJz3VzHU8nkYWNAH8EAJEUqUMbCDTn6ucElmw=; b=aZTbm2GnJbdr+71Xg0Jg7iqnws
 oWO+ghuss/y7t14FcILqDcwYMBd5R+At35sajv9TZZ52+zE2vgFX0j2l44zhAWfIoQtfU4C7pC6Dz
 n0Yj9H5sncg4FKD+TjgMrucj98raN7YDTit329daejeLIC8XYTbUf4FVqsM7qBBy6pGU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRk-0004ly-JG
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRk-0005Ts-IF
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:32 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] mm: fix public declaration of struct
 xen_mem_acquire_resource
Message-Id: <E1k4NRk-0005Ts-IF@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ec972cb4181ef3d57a94fe14203b6f2308f4b5ab
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Fri Aug 7 17:18:35 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:18:35 2020 +0200

    mm: fix public declaration of struct xen_mem_acquire_resource
    
    XENMEM_acquire_resource and it's related structure is currently inside
    a __XEN__ or __XEN_TOOLS__ guarded section to limit it's scope to the
    hypervisor or the toolstack only. This is wrong as the hypercall is
    already being used by the Linux kernel at least, and as such needs to
    be public.
    
    Also switch the usage of uint64_aligned_t to plain uint64_t, as
    uint64_aligned_t is only to be used by the toolstack. Doing such
    change will reduce the size of the structure on 32bit x86 by 4bytes,
    since there will be no padding added after the frame_list handle.
    
    This is fine, as users of the previous layout will allocate 4bytes of
    padding that won't be read by Xen, and users of the new layout won't
    allocate those, which is also fine since Xen won't try to access them.
    
    Note that the structure already has compat handling, and such handling
    will take care of copying the right size (ie: minus the padding) when
    called from a 32bit x86 context. This is true for the compat code both
    before and after this patch, since the structures in the memory.h
    compat header are subject to a pragma pack(4), which already removed
    the trailing padding that would otherwise be introduced by the
    alignment of the frame field to 8 bytes.
    
    Fixes: 3f8f12281dd20 ('x86/mm: add HYPERVISOR_memory_op to acquire guest resources')
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 0e2e54966af556f4047c1048855c4a071028a32d
    master date: 2020-06-29 18:03:49 +0200
---
 xen/include/public/memory.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index cfdda6e2a8..bb8cc65c8f 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -599,6 +599,8 @@ struct xen_reserved_device_memory_map {
 typedef struct xen_reserved_device_memory_map xen_reserved_device_memory_map_t;
 DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t);
 
+#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
+
 /*
  * Get the pages for a particular guest resource, so that they can be
  * mapped directly by a tools domain.
@@ -637,7 +639,7 @@ struct xen_mem_acquire_resource {
      * IN - the index of the initial frame to be mapped. This parameter
      *      is ignored if nr_frames is 0.
      */
-    uint64_aligned_t frame;
+    uint64_t frame;
 
 #define XENMEM_resource_ioreq_server_frame_bufioreq 0
 #define XENMEM_resource_ioreq_server_frame_ioreq(n) (1 + (n))
@@ -658,8 +660,6 @@ struct xen_mem_acquire_resource {
 typedef struct xen_mem_acquire_resource xen_mem_acquire_resource_t;
 DEFINE_XEN_GUEST_HANDLE(xen_mem_acquire_resource_t);
 
-#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
-
 /*
  * XENMEM_get_vnumainfo used by guest to get
  * vNUMA topology from hypervisor.
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:55:46 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:55:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NRy-00006w-8s; Sat, 08 Aug 2020 11:55:46 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NRw-0008Vm-Lj
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:44 +0000
X-Inumbo-ID: 2200d357-b7e5-4b4f-b0cd-6ff3d131f829
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 2200d357-b7e5-4b4f-b0cd-6ff3d131f829;
 Sat, 08 Aug 2020 11:55:42 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Kff8dvExim+yoktWRh3upFVWwovKiaNW20c71f1HMtQ=; b=o8Wen8+7whfCWG4/rYEeBYekUc
 CD3nqSPD1+JzCG2IprmF6fb/owLk1su0G8SiE9SOnVWzewo/oUCIlzWp7LMjhMJS+d4ctHA/clGsB
 n4zPLjIKI4Cnm6EMZ/Hluu1HJzdpeZK2kGf5Bk4EDoFb80/BQckcR5GQcs43Oepxoyrw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRu-0004m9-MV
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NRu-0005Up-Le
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:42 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86/spec-ctrl: Protect against CALL/JMP
 straight-line speculation
Message-Id: <E1k4NRu-0005Up-Le@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit fff1874b6193a8d23b246c0f7402026f084208b5
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:19:36 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:19:36 2020 +0200

    x86/spec-ctrl: Protect against CALL/JMP straight-line speculation
    
    Some x86 CPUs speculatively execute beyond indirect CALL/JMP instructions.
    
    With CONFIG_INDIRECT_THUNK / Retpolines, indirect CALL/JMP instructions are
    converted to direct CALL/JMP's to __x86_indirect_thunk_REG(), leaving just a
    handful of indirect JMPs implementing those stubs.
    
    There is no architectrual execution beyond an indirect JMP, so use INT3 as
    recommended by vendors to halt speculative execution.  This is shorter than
    LFENCE (which would also work fine), but also shows up in logs if we do
    unexpected execute them.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 3b7dab93f2401b08c673244c9ae0f92e08bd03ba
    master date: 2020-07-01 17:01:24 +0100
---
 xen/arch/x86/indirect-thunk.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/indirect-thunk.S b/xen/arch/x86/indirect-thunk.S
index 3c17f75c23..7392aee127 100644
--- a/xen/arch/x86/indirect-thunk.S
+++ b/xen/arch/x86/indirect-thunk.S
@@ -24,10 +24,12 @@
 .macro IND_THUNK_LFENCE reg:req
         lfence
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 .macro IND_THUNK_JMP reg:req
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:55:55 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:55:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NS7-00008k-AZ; Sat, 08 Aug 2020 11:55:55 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NS5-00008U-Iu
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:53 +0000
X-Inumbo-ID: 32d0af99-5c52-44fd-97db-1fa6e3223989
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 32d0af99-5c52-44fd-97db-1fa6e3223989;
 Sat, 08 Aug 2020 11:55:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=wjZVbeLXSGnscAgD/s+eTna54Qm+ZdX0pAB1vFl6MLg=; b=JS8777eI53Ff0GIwqNneglvbB6
 +mJoDv/iQMtQ1wdGEOY5itWfZbQ9Zk9lwKF072//UMfrLe0Q3PEHzi9852apfuAuByOc6pKkBpFL+
 HjXdDT4m1pfR0oeHOkBpai+3tXL2eZ28PL9Os0zcZyyefpyRtKx0agbpWTdhrrvfvinw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NS4-0004mH-Pg
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NS4-0005Vf-On
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:55:52 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86: restore pv_rtc_handler() invocation
Message-Id: <E1k4NS4-0005Vf-On@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b67bb90a6bc7dc9df97c9ca6a1b6d85157f657c1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:20:50 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:20:50 2020 +0200

    x86: restore pv_rtc_handler() invocation
    
    This was lost when making the logic accessible to PVH Dom0.
    
    While doing so make the access to the global function pointer safe
    against races (as noticed by Roger): The only current user wants to be
    invoked just once (but can tolerate to be invoked multiple times),
    zapping the pointer at that point.
    
    Fixes: 835d8d69d96a ("x86/rtc: provide mediated access to RTC for PVH dom0")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    master commit: f8fe3c07363d11fc81d8e7382dbcaa357c861569
    master date: 2020-07-15 15:46:30 +0200
---
 xen/arch/x86/hpet.c | 2 +-
 xen/arch/x86/time.c | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index 57f68fa81b..e99d7116b6 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -542,7 +542,7 @@ static void handle_rtc_once(uint8_t index, uint8_t value)
     if ( value & (RTC_PIE | RTC_AIE | RTC_UIE ) )
     {
         cpuidle_disable_deep_cstate();
-        pv_rtc_handler = NULL;
+        ACCESS_ONCE(pv_rtc_handler) = NULL;
     }
 }
 
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 5893292424..8816b3ceb0 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1046,6 +1046,8 @@ void rtc_guest_write(unsigned int port, unsigned int data)
 
     switch ( port )
     {
+        typeof(pv_rtc_handler) hook;
+
     case RTC_PORT(0):
         /*
          * All PV domains (and PVH dom0) are allowed to write to the latched
@@ -1058,6 +1060,11 @@ void rtc_guest_write(unsigned int port, unsigned int data)
     case RTC_PORT(1):
         if ( !ioports_access_permitted(currd, RTC_PORT(0), RTC_PORT(1)) )
             break;
+
+        hook = ACCESS_ONCE(pv_rtc_handler);
+        if ( hook )
+            hook(currd->arch.cmos_idx & 0x7f, data);
+
         spin_lock_irqsave(&rtc_lock, flags);
         outb(currd->arch.cmos_idx & 0x7f, RTC_PORT(0));
         outb(data, RTC_PORT(1));
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:56:05 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:56:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NSH-0000Aa-C7; Sat, 08 Aug 2020 11:56:05 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NSF-0000AB-Pm
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:03 +0000
X-Inumbo-ID: 33e1772f-7200-4de4-989a-f5159f33f522
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 33e1772f-7200-4de4-989a-f5159f33f522;
 Sat, 08 Aug 2020 11:56:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=EV+Sxz/D6txUlzEEUUje16wjhu84ZNhZRKuxXsUi5EE=; b=EdIHnGulrN4mK+cVROKzaCJ40u
 soCl6MJEItOs2wx3DG6jBVcXQU8wFqST4dZwRzZ0+RIMRl5W3pWoVyup4Wy8ob6G3WVzJpHItPIcS
 Lq6zXFNNzIiLzb8xAUngF1CVZf/lhuLNvJEhtcs5FZfRKxgIq2d3EoLeQfRE5bUzDzUQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSE-0004ma-SZ
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSE-0005WZ-Ri
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86/S3: put data segment registers into known state
 upon resume
Message-Id: <E1k4NSE-0005WZ-Ri@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:56:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e9e72fb1579d6b81c0bddb5e2c16ee6a34f801b2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:21:28 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:21:28 2020 +0200

    x86/S3: put data segment registers into known state upon resume
    
    wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
    wakeup_start did set it to, and %gs at whatever BIOS did load into it.
    All of this may end up confusing the first load_segments() to run on
    the BSP after resume, in particular allowing a non-nul selector value
    to be left in %fs.
    
    Alongside %ss, also put all other data segment registers into the same
    state that the boot and CPU bringup paths put them in.
    
    Reported-by: M. Vefa Bicakci <m.v.b@runbox.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 55f8c389d4348cc517946fdcb10794112458e81e
    master date: 2020-07-24 10:17:26 +0200
---
 xen/arch/x86/acpi/wakeup_prot.S | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index 74261cb4f1..15c22e597e 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -66,6 +66,12 @@ ENTRY(__ret_point)
         mov     REF(saved_ss), %ss
         LOAD_GREG(sp)
 
+        mov     $__HYPERVISOR_DS64, %eax
+        mov     %eax, %ds
+        mov     %eax, %es
+        mov     %eax, %fs
+        mov     %eax, %gs
+
         /* Reload code selector */
         pushq   $__HYPERVISOR_CS
         leaq    1f(%rip),%rax
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:56:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:56:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NSS-0000CP-Ez; Sat, 08 Aug 2020 11:56:16 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NSQ-0000CB-Iu
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:14 +0000
X-Inumbo-ID: 7e2b162b-5c61-4ed6-9558-00ea2eb754c3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 7e2b162b-5c61-4ed6-9558-00ea2eb754c3;
 Sat, 08 Aug 2020 11:56:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=2xYGGeiyAU9xD7xEr5UwohDLk1y6lFpyR0dI9u+VMaE=; b=3OB1WDnDv4u2a7jCslyaCVPJX5
 JcV4PVOaFh8+QCMm+j3x1i+wEsgVunuBS6JsjtT29umXGD40liTaRyC3IQ9qJkRauYlON10GcFy6U
 eK2RDpirwTZWRb1AvgxrmwhtncA29MP6mTd7BKkx8pAD9IOlZpJh+G/aeOFAlNXNpGVA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSO-0004mw-VR
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSO-0005XW-Up
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86/cpuid: Fix APIC bit clearing
Message-Id: <E1k4NSO-0005XW-Up@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:56:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit befa2168039f5141326af6761dd74b06a0121f96
Author:     Fam Zheng <famzheng@amazon.com>
AuthorDate: Fri Aug 7 17:22:06 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:22:06 2020 +0200

    x86/cpuid: Fix APIC bit clearing
    
    The bug is obvious here, other places in this function used
    "cpufeat_mask" correctly.
    
    Fixed: b648feff8ea2 ("xen/x86: Improvements to in-hypervisor cpuid sanity checks")
    Signed-off-by: Fam Zheng <famzheng@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 64219fa179c3e48adad12bfce3f6b3f1596cccbf
    master date: 2020-07-29 19:03:41 +0100
---
 xen/arch/x86/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 005b892a90..a887f38d7f 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -961,7 +961,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         {
             /* Fast-forward MSR_APIC_BASE.EN. */
             if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
-                res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+                res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
 
             /*
              * PSE36 is not supported in shadow mode.  This bit should be
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:56:25 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:56:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NSb-0000Dr-GX; Sat, 08 Aug 2020 11:56:25 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NSa-0000DZ-15
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:24 +0000
X-Inumbo-ID: 867f0d78-3161-4401-b8d1-3b415c4cae9b
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 867f0d78-3161-4401-b8d1-3b415c4cae9b;
 Sat, 08 Aug 2020 11:56:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=OWKn+LDksiil9AIYr1yPElRbBqrIUCTUq4sRrGTMLQ4=; b=MbFg+XXzN7NC+4QXOUNXl9vOWI
 ZkUrfHCk/qLUihQFEIA9sgZSmxZn5AD39ed9YuuTZrmOqMt/KE5YePlVxYf4eWv+EzdT8kSB4MqSD
 qXJ3GWcwFanmpDQD8i3RllG5+YtfpyXP1xp1PgHyn0CreWumc9KShxbX0C9KdV0jlitQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSZ-0004oI-2c
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSZ-0005YY-1j
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86emul: replace UB shifts
Message-Id: <E1k4NSZ-0005YY-1j@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:56:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e1829658a0b4e24a330140ce9f715966ab6e97b8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:22:50 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:22:50 2020 +0200

    x86emul: replace UB shifts
    
    Displacement values can be negative, hence we shouldn't left-shift them.
    Or else we get
    
    (XEN) UBSAN: Undefined behaviour in x86_emulate/x86_emulate.c:3482:55
    (XEN) left shift of negative value -2
    
    While auditing shifts, I noticed a pair of missing parentheses, which
    also get added right here.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    
    x86emul: replace further UB shifts
    
    I have no explanation how I managed to overlook these while putting
    together what is now b6a907f8c83d ("x86emul: replace UB shifts").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b6a907f8c83d37886d0523f1aeff61b98e133498
    master date: 2020-07-31 17:41:58 +0200
    master commit: 21de9680eb594a7038d4d4ed78e53ac90a8c5a6e
    master date: 2020-08-05 10:19:29 +0200
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 3a60c6f3f2..a6f67c6a56 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3250,7 +3250,7 @@ x86_decode(
         {
             generate_exception_if(d & vSIB, EXC_UD);
             modrm_rm |= ((rex_prefix & 1) << 3) |
-                        (evex_encoded() && !evex.x) << 4;
+                        ((evex_encoded() && !evex.x) << 4);
             ea.type = OP_REG;
         }
         else if ( ad_bytes == 2 )
@@ -3297,7 +3297,7 @@ x86_decode(
                     ea.mem.off = insn_fetch_type(int16_t);
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int16_t);
@@ -3359,7 +3359,7 @@ x86_decode(
                 pc_rel = mode_64bit();
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int32_t);
@@ -9263,7 +9263,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
@@ -9385,7 +9385,8 @@ x86_emulate(
                 continue;
 
             rc = ops->read(ea.mem.seg,
-                           truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                           truncate_ea(ea.mem.off +
+                                       idx * (1 << state->sib_scale)),
                            (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -9556,7 +9557,8 @@ x86_emulate(
                 continue;
 
             rc = ops->write(ea.mem.seg,
-                            truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                            truncate_ea(ea.mem.off +
+                                        idx * (1 << state->sib_scale)),
                             (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -9674,7 +9676,7 @@ x86_emulate(
                   ? ops->write
                   : ops->read)(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                NULL, 0, ctxt);
             if ( rc == X86EMUL_EXCEPTION )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 11:56:35 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 11:56:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4NSl-0000Fx-I4; Sat, 08 Aug 2020 11:56:35 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4NSk-0000Fe-0O
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:34 +0000
X-Inumbo-ID: 20276c0b-4f96-4d25-a255-25b30f90ef23
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 20276c0b-4f96-4d25-a255-25b30f90ef23;
 Sat, 08 Aug 2020 11:56:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=pSGGDTCzVG+62KDN+KyoQqsJNNhaz+eHBMCtXwTjrqs=; b=oMJobzXlHXWmJWi7cy2I23bc3C
 mqcnvT6WHBGq0Un0k915h2hU5TF2t5MDjHT0aDfj4QRtO9NWG/RvbFZ7+X0YR56V4qzIy7v1toQKs
 Yxq6YzHS1OyPjrR53nehVbjQVOpvtto63zMWmxurhOcBgvc+EFVyUxdq8jSjA8qgiTMs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSj-0004pd-5R
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4NSj-0005Z5-4f
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 11:56:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.13] x86/hvm: set 'ipat' in EPT for special pages
Message-Id: <E1k4NSj-0005Z5-4f@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 11:56:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9b367b2b0b714f3ffb69ed6be0a118e8d3eac07f
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Aug 7 17:23:39 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:23:39 2020 +0200

    x86/hvm: set 'ipat' in EPT for special pages
    
    All non-MMIO ranges (i.e those not mapping real device MMIO regions) that
    map valid MFNs are normally marked MTRR_TYPE_WRBACK and 'ipat' is set. Hence
    when PV drivers running in a guest populate the BAR space of the Xen Platform
    PCI Device with pages such as the Shared Info page or Grant Table pages,
    accesses to these pages will be cachable.
    
    However, should IOMMU mappings be enabled be enabled for the guest then these
    accesses become uncachable. This has a substantial negative effect on I/O
    throughput of PV devices. Arguably PV drivers should bot be using BAR space to
    host the Shared Info and Grant Table pages but it is currently commonplace for
    them to do this and so this problem needs mitigation. Hence this patch makes
    sure the 'ipat' bit is set for any special page regardless of where in GFN
    space it is mapped.
    
    NOTE: Clearly this mitigation only applies to Intel EPT. It is not obvious
          that there is any similar mitigation possible for AMD NPT. Downstreams
          such as Citrix XenServer have been carrying a patch similar to this for
          several releases though.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: ca24b2ffdbd9a25b2d313a547ccbe97baf3e5a8d
    master date: 2020-07-31 17:42:47 +0200
---
 xen/arch/x86/hvm/mtrr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 5ad15eafe0..5965e5bda9 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -796,6 +796,7 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
 {
     int gmtrr_mtype, hmtrr_mtype;
     struct vcpu *v = current;
+    unsigned long i;
 
     *ipat = 0;
 
@@ -838,6 +839,17 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
+    for ( i = 0; i < (1ul << order); i++ )
+    {
+        if ( is_xen_heap_page(mfn_to_page(mfn_add(mfn, i))) )
+        {
+            if ( order )
+                return -1;
+            *ipat = 1;
+            return MTRR_TYPE_WRBACK;
+        }
+    }
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:00:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:00:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V0f-0008Oa-P9; Sat, 08 Aug 2020 20:00:05 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V0e-0008An-Fu
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:04 +0000
X-Inumbo-ID: 8a806763-6e7d-4a54-bf14-28a7ba73a3b3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 8a806763-6e7d-4a54-bf14-28a7ba73a3b3;
 Sat, 08 Aug 2020 20:00:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=63HkwEzgKe5Ru2o+d/FAA7RAuqp9u+YafFG1zZe4dFw=; b=sz9wDOmH7h3m2Io7PpYnRVpJrV
 etMkEL7OHTDefs4UTCMfWSeOHVRKWzl7K6nJ8slkjVXycf28hsfijyNnENx/GVaxrSmvkiV6s/IU2
 slr/AeWIMiUuj6DXu5iNAWNKuxbs8Q0RU5Bt1AKC2kcV9KUdgumOxo4auAbIbga2LQyc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V0c-0007cF-SK
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V0c-0003Y4-QI
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead
 of P2M_UNSHARE
Message-Id: <E1k4V0c-0003Y4-QI@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:00:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit df11056150070ee6404bd242e3c7d70d55ee2686
Author:     Tamas K Lengyel <tamas.lengyel@intel.com>
AuthorDate: Fri Aug 7 17:27:11 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:27:11 2020 +0200

    x86/vmx: use P2M_ALLOC in vmx_load_pdptrs instead of P2M_UNSHARE
    
    While forking VMs running a small RTOS system (Zephyr) a Xen crash has been
    observed due to a mm-lock order violation while copying the HVM CPU context
    from the parent. This issue has been identified to be due to
    hap_update_paging_modes first getting a lock on the gfn using get_gfn. This
    call also creates a shared entry in the fork's memory map for the cr3 gfn. The
    function later calls hap_update_cr3 while holding the paging_lock, which
    results in the lock-order violation in vmx_load_pdptrs when it tries to unshare
    the above entry when it grabs the page with the P2M_UNSHARE flag set.
    
    Since vmx_load_pdptrs only reads from the page its usage of P2M_UNSHARE was
    unnecessary to start with. Using P2M_ALLOC is the appropriate flag to ensure
    the p2m is properly populated.
    
    Note that the lock order violation is avoided because before the paging_lock is
    taken a lookup is performed with P2M_ALLOC that forks the page, thus the second
    lookup in vmx_load_pdptrs succeeds without having to perform the fork. We keep
    P2M_ALLOC in vmx_load_pdptrs because there are code-paths leading up to it
    which don't take the paging_lock and that have no previous lookup. Currently no
    other code-path exists leading there with the paging_lock taken, thus no
    further adjustments are necessary.
    
    Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
    master commit: b67e859d0823f5b450e29379af9142d44a3ea370
    master date: 2020-06-19 15:24:55 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 662c3988dd..36b979851f 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1385,7 +1385,7 @@ static void vmx_load_pdptrs(struct vcpu *v)
     if ( (cr3 & 0x1fUL) && !hvm_pcid_enabled(v) )
         goto crash;
 
-    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_UNSHARE);
+    page = get_page_from_gfn(v->domain, cr3 >> PAGE_SHIFT, &p2mt, P2M_ALLOC);
     if ( !page )
     {
         /* Ideally you don't want to crash but rather go into a wait 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:00:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:00:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V0o-0008Qw-Qs; Sat, 08 Aug 2020 20:00:14 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V0n-0008Qq-JB
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:13 +0000
X-Inumbo-ID: 315a26dd-cb78-425b-8af2-4b4386aab012
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 315a26dd-cb78-425b-8af2-4b4386aab012;
 Sat, 08 Aug 2020 20:00:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=TLNKUW+WAGC4vlZssh8wUVhK6v1xb1SP/r1J86Ub/Aw=; b=ULkx/xZqk98e3SQ3esdNB79o3m
 3lHQoOMfJfTeElDVlFU3iXMBarCqyibSSeUeULlJvsAkGXEgEO6layCyDCpH+GvHsji4AfB2hp0YA
 tkFJYO5NkIfwu2k9sai1yQWES12EpylyIgKgpePr/9Nja7Ea/j70N9xXdunx+DKnJJoM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V0m-0007cI-W0
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V0m-0003ZP-Ud
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86/acpi: use FADT flags to determine the PMTMR
 width
Message-Id: <E1k4V0m-0003ZP-Ud@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a1aae5418981fda97400400aeaab3d3a3c9e0297
Author:     Grzegorz Uriasz <gorbak25@gmail.com>
AuthorDate: Fri Aug 7 17:28:06 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:28:06 2020 +0200

    x86/acpi: use FADT flags to determine the PMTMR width
    
    On some computers the bit width of the PM Timer as reported
    by ACPI is 32 bits when in fact the FADT flags report correctly
    that the timer is 24 bits wide. On affected machines such as the
    ASUS FX504GM and never gaming laptops this results in the inability
    to resume the machine from suspend. Without this patch suspend is
    broken on affected machines and even if a machine manages to resume
    correctly then the kernel time and xen timers are trashed.
    
    Signed-off-by: Grzegorz Uriasz <gorbak25@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: f325d2477eef8229c47d97031d314629521c70ab
    master date: 2020-06-25 09:11:09 +0200
---
 xen/arch/x86/acpi/boot.c    | 19 +++++++++++++++----
 xen/arch/x86/time.c         | 12 ++++--------
 xen/include/acpi/acmacros.h |  8 ++++++++
 3 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index e6ab9fa398..6398ee4b02 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -475,10 +475,17 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
 
 #ifdef CONFIG_X86_PM_TIMER
 	/* detect the location of the ACPI PM Timer */
-	if (fadt->header.revision >= FADT2_REVISION_ID) {
+	if (fadt->header.revision >= FADT2_REVISION_ID &&
+	    fadt->xpm_timer_block.space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
 		/* FADT rev. 2 */
-		if (fadt->xpm_timer_block.space_id ==
-		    ACPI_ADR_SPACE_SYSTEM_IO) {
+		if (fadt->xpm_timer_block.access_width != 0 &&
+		    ACPI_ACCESS_BIT_WIDTH(fadt->xpm_timer_block.access_width) != 32)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid access width(%u)\n",
+			       fadt->xpm_timer_block.access_width);
+		else if (fadt->xpm_timer_block.bit_offset != 0)
+			printk(KERN_WARNING PREFIX "PM-Timer has invalid bit offset(%u)\n",
+			       fadt->xpm_timer_block.bit_offset);
+		else {
 			pmtmr_ioport = fadt->xpm_timer_block.address;
 			pmtmr_width = fadt->xpm_timer_block.bit_width;
 		}
@@ -490,8 +497,12 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
  	 */
 	if (!pmtmr_ioport) {
 		pmtmr_ioport = fadt->pm_timer_block;
-		pmtmr_width = fadt->pm_timer_length == 4 ? 24 : 0;
+		pmtmr_width = fadt->pm_timer_length == 4 ? 32 : 0;
 	}
+	if (pmtmr_width < 32 && (fadt->flags & ACPI_FADT_32BIT_TIMER))
+		printk(KERN_WARNING PREFIX "PM-Timer is too short\n");
+	if (pmtmr_width > 24 && !(fadt->flags & ACPI_FADT_32BIT_TIMER))
+		pmtmr_width = 24;
 	if (pmtmr_ioport)
 		printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x (%u bits)\n",
 		       pmtmr_ioport, pmtmr_width);
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 02648915b1..8c5b9afdd6 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -452,16 +452,13 @@ static u64 read_pmtimer_count(void)
 static s64 __init init_pmtimer(struct platform_timesource *pts)
 {
     u64 start;
-    u32 count, target, mask = 0xffffff;
+    u32 count, target, mask;
 
-    if ( !pmtmr_ioport || !pmtmr_width )
+    if ( !pmtmr_ioport || (pmtmr_width != 24 && pmtmr_width != 32) )
         return 0;
 
-    if ( pmtmr_width == 32 )
-    {
-        pts->counter_bits = 32;
-        mask = 0xffffffff;
-    }
+    pts->counter_bits = pmtmr_width;
+    mask = 0xffffffff >> (32 - pmtmr_width);
 
     count = inl(pmtmr_ioport) & mask;
     start = rdtsc_ordered();
@@ -481,7 +478,6 @@ static struct platform_timesource __initdata plt_pmtimer =
     .name = "ACPI PM Timer",
     .frequency = ACPI_PM_FREQUENCY,
     .read_counter = read_pmtimer_count,
-    .counter_bits = 24,
     .init = init_pmtimer
 };
 
diff --git a/xen/include/acpi/acmacros.h b/xen/include/acpi/acmacros.h
index 6765535053..86c503c20f 100644
--- a/xen/include/acpi/acmacros.h
+++ b/xen/include/acpi/acmacros.h
@@ -121,6 +121,14 @@
 #define ACPI_COMPARE_NAME(a,b)          (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
 #endif
 
+/*
+ * Algorithm to obtain access bit or byte width.
+ * Can be used with access_width of struct acpi_generic_address and access_size of
+ * struct acpi_resource_generic_register.
+ */
+#define ACPI_ACCESS_BIT_WIDTH(size)     (1 << ((size) + 2))
+#define ACPI_ACCESS_BYTE_WIDTH(size)    (1 << ((size) - 1))
+
 /*
  * Macros for moving data around to/from buffers that are possibly unaligned.
  * If the hardware supports the transfer of unaligned data, just do the store.
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:00:24 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:00:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V0y-0008Ru-SS; Sat, 08 Aug 2020 20:00:24 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V0x-0008Ri-NM
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:23 +0000
X-Inumbo-ID: a9d4a310-ea40-4aac-b6a2-e05f99b40955
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id a9d4a310-ea40-4aac-b6a2-e05f99b40955;
 Sat, 08 Aug 2020 20:00:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ci5ifUwqxWK3KKfbjP8PutiVKlalAwAkmENoIdeYTvI=; b=DUWvDN8YG4H2EIbuFxzLs5TmPn
 3l0spj8dkhwl2RLBulbihhIH9rE0ll9wXgBifIKOy8vf+GTwZrx0deck3QuLtYxdprn6yeIPJbKI6
 5B6rBWZmQX3Nesmg5M15sXLsj+kalQ9i8Tdv8fS1RKuYGsXSJVZIPd2WBOZ0PUGhuRkk=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V0x-0007cV-36
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V0x-0003aB-20
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86/msr: Disallow access to Processor Trace MSRs
Message-Id: <E1k4V0x-0003aB-20@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:00:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 43258cec1413e819d84e005b11d70ad021b1a21e
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:28:48 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:28:48 2020 +0200

    x86/msr: Disallow access to Processor Trace MSRs
    
    We do not expose the feature to guests, so should disallow access to the
    respective MSRs.  For simplicity, drop the entire block of MSRs, not just the
    subset which have been specified thus far.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Wei Liu <wl@xen.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: bcdfbb70fca579baa04f212c0936b77919bdae11
    master date: 2020-06-26 16:34:02 +0100
---
 xen/arch/x86/msr.c              | 2 ++
 xen/include/asm-x86/msr-index.h | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c
index 9ff27b7007..1c18e10345 100644
--- a/xen/arch/x86/msr.c
+++ b/xen/arch/x86/msr.c
@@ -134,6 +134,7 @@ int guest_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
@@ -275,6 +276,7 @@ int guest_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val)
     case MSR_TSX_FORCE_ABORT:
     case MSR_TSX_CTRL:
     case MSR_MCU_OPT_CTRL:
+    case MSR_RTIT_OUTPUT_BASE ... MSR_RTIT_ADDR_B(7):
     case MSR_U_CET:
     case MSR_S_CET:
     case MSR_PL0_SSP ... MSR_INTERRUPT_SSP_TABLE:
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index 91994669e1..0eb6855614 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -182,6 +182,14 @@
 #define MSR_MCU_OPT_CTRL                    0x00000123
 #define  MCU_OPT_CTRL_RNGDS_MITG_DIS        (_AC(1, ULL) <<  0)
 
+#define MSR_RTIT_OUTPUT_BASE                0x00000560
+#define MSR_RTIT_OUTPUT_MASK                0x00000561
+#define MSR_RTIT_CTL                        0x00000570
+#define MSR_RTIT_STATUS                     0x00000571
+#define MSR_RTIT_CR3_MATCH                  0x00000572
+#define MSR_RTIT_ADDR_A(n)                 (0x00000580 + (n) * 2)
+#define MSR_RTIT_ADDR_B(n)                 (0x00000581 + (n) * 2)
+
 #define MSR_U_CET                           0x000006a0
 #define MSR_S_CET                           0x000006a2
 #define MSR_PL0_SSP                         0x000006a4
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:00:35 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:00:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V19-0008T5-UA; Sat, 08 Aug 2020 20:00:35 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V18-0008Sy-V9
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:34 +0000
X-Inumbo-ID: b9413106-119d-4399-8fa5-57a81e3eba62
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id b9413106-119d-4399-8fa5-57a81e3eba62;
 Sat, 08 Aug 2020 20:00:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=eHoOlejvVDDDiWW3gqlvwPViDZNSRf3LHDWphhr4M3Y=; b=NNd/AaEvMYqjeMbzz8LyBeJYZF
 0D9Lxsbl16kpNWPneSopT4c04IF+oBVgj5ks+45vr+nv3Il0kEyflbPFtwPhGALGlWVgmY6OtD7KO
 8W41fT+BXmByt7+nFFpSQOyvGIzPBJstpQO1Sjihf4Y84kGpLO53RZjN6sp4iQ+xycV4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V17-0007d3-61
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V17-0003an-5G
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] mm: fix public declaration of struct
 xen_mem_acquire_resource
Message-Id: <E1k4V17-0003an-5G@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:00:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7cce3f25a13715eef16d55fe716c0a850b85573d
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Fri Aug 7 17:29:41 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:29:41 2020 +0200

    mm: fix public declaration of struct xen_mem_acquire_resource
    
    XENMEM_acquire_resource and it's related structure is currently inside
    a __XEN__ or __XEN_TOOLS__ guarded section to limit it's scope to the
    hypervisor or the toolstack only. This is wrong as the hypercall is
    already being used by the Linux kernel at least, and as such needs to
    be public.
    
    Also switch the usage of uint64_aligned_t to plain uint64_t, as
    uint64_aligned_t is only to be used by the toolstack. Doing such
    change will reduce the size of the structure on 32bit x86 by 4bytes,
    since there will be no padding added after the frame_list handle.
    
    This is fine, as users of the previous layout will allocate 4bytes of
    padding that won't be read by Xen, and users of the new layout won't
    allocate those, which is also fine since Xen won't try to access them.
    
    Note that the structure already has compat handling, and such handling
    will take care of copying the right size (ie: minus the padding) when
    called from a 32bit x86 context. This is true for the compat code both
    before and after this patch, since the structures in the memory.h
    compat header are subject to a pragma pack(4), which already removed
    the trailing padding that would otherwise be introduced by the
    alignment of the frame field to 8 bytes.
    
    Fixes: 3f8f12281dd20 ('x86/mm: add HYPERVISOR_memory_op to acquire guest resources')
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 0e2e54966af556f4047c1048855c4a071028a32d
    master date: 2020-06-29 18:03:49 +0200
---
 xen/include/public/memory.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index 8638023e4a..2d2cd446be 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -599,6 +599,8 @@ struct xen_reserved_device_memory_map {
 typedef struct xen_reserved_device_memory_map xen_reserved_device_memory_map_t;
 DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t);
 
+#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
+
 /*
  * Get the pages for a particular guest resource, so that they can be
  * mapped directly by a tools domain.
@@ -646,7 +648,7 @@ struct xen_mem_acquire_resource {
      * IN - the index of the initial frame to be mapped. This parameter
      *      is ignored if nr_frames is 0.
      */
-    uint64_aligned_t frame;
+    uint64_t frame;
 
 #define XENMEM_resource_ioreq_server_frame_bufioreq 0
 #define XENMEM_resource_ioreq_server_frame_ioreq(n) (1 + (n))
@@ -667,8 +669,6 @@ struct xen_mem_acquire_resource {
 typedef struct xen_mem_acquire_resource xen_mem_acquire_resource_t;
 DEFINE_XEN_GUEST_HANDLE(xen_mem_acquire_resource_t);
 
-#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
-
 /*
  * XENMEM_get_vnumainfo used by guest to get
  * vNUMA topology from hypervisor.
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:00:45 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:00:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V1I-0008Ui-Vm; Sat, 08 Aug 2020 20:00:44 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V1H-0008UV-SU
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:43 +0000
X-Inumbo-ID: 293b75db-a464-420c-bc74-48d51dcde6ad
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 293b75db-a464-420c-bc74-48d51dcde6ad;
 Sat, 08 Aug 2020 20:00:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=OK1mMaTGb5GChU8XT4KHsqVKyQ2mw6N3pmKEeCeRaY8=; b=6sSBzGyxiBSoNijLHn3848PHrv
 mku6gjdStTVnCjFVwlbtbOnZnjGUZ+A9wnEOFZmXqMcFqoQo+h85OUns33IP6rLeMqMjAAQ80fcYg
 vms7piZ35VeXdZSaiBX4tmhcNk82kCNeB18L/K2xrUyBJo0f5A1ZRz9MXEDlEvuCN4MI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1H-0007dB-8s
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1H-0003bT-87
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:43 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86/spec-ctrl: Protect against CALL/JMP
 straight-line speculation
Message-Id: <E1k4V1H-0003bT-87@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:00:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit df9a0ad1f8b874160a305bfa7a3145327f5a72b2
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Aug 7 17:30:35 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:30:35 2020 +0200

    x86/spec-ctrl: Protect against CALL/JMP straight-line speculation
    
    Some x86 CPUs speculatively execute beyond indirect CALL/JMP instructions.
    
    With CONFIG_INDIRECT_THUNK / Retpolines, indirect CALL/JMP instructions are
    converted to direct CALL/JMP's to __x86_indirect_thunk_REG(), leaving just a
    handful of indirect JMPs implementing those stubs.
    
    There is no architectrual execution beyond an indirect JMP, so use INT3 as
    recommended by vendors to halt speculative execution.  This is shorter than
    LFENCE (which would also work fine), but also shows up in logs if we do
    unexpected execute them.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: 3b7dab93f2401b08c673244c9ae0f92e08bd03ba
    master date: 2020-07-01 17:01:24 +0100
---
 xen/arch/x86/indirect-thunk.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/indirect-thunk.S b/xen/arch/x86/indirect-thunk.S
index 3c17f75c23..7392aee127 100644
--- a/xen/arch/x86/indirect-thunk.S
+++ b/xen/arch/x86/indirect-thunk.S
@@ -24,10 +24,12 @@
 .macro IND_THUNK_LFENCE reg:req
         lfence
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 .macro IND_THUNK_JMP reg:req
         jmp *%\reg
+        int3 /* Halt straight-line speculation */
 .endm
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:00:59 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:00:59 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V1X-00005Y-Ei; Sat, 08 Aug 2020 20:00:59 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V1W-0008Vm-RW
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:58 +0000
X-Inumbo-ID: 2f70f6af-00d0-40d0-8f19-7f4b236068d0
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 2f70f6af-00d0-40d0-8f19-7f4b236068d0;
 Sat, 08 Aug 2020 20:00:53 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=0t406KbGtkaC8+cQmqUBnabX5+piSNdJmw9J2PWcEUo=; b=A3neehenn/+2WDYPTfXQmlPSKD
 Jh7KhfJ+m6f99acZJNOncwItNZOcZ6jtVF3Mr2cmB1C8oTtPklQ121cZJPoOGl2VKwByYQv3rQe2d
 CVNW3nyCVG4aPRSnq6XwgnPF3I9Dbgyl80p4VYOWMcxerqJWenxTLD75TQU8aZBnSydo=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1R-0007dN-Cy
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1R-0003bz-B2
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:00:53 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86/S3: put data segment registers into known state
 upon resume
Message-Id: <E1k4V1R-0003bz-B2@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:00:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 85ce36d12b43ed15e556265c6204858d3b52d747
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:31:16 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:31:16 2020 +0200

    x86/S3: put data segment registers into known state upon resume
    
    wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
    wakeup_start did set it to, and %gs at whatever BIOS did load into it.
    All of this may end up confusing the first load_segments() to run on
    the BSP after resume, in particular allowing a non-nul selector value
    to be left in %fs.
    
    Alongside %ss, also put all other data segment registers into the same
    state that the boot and CPU bringup paths put them in.
    
    Reported-by: M. Vefa Bicakci <m.v.b@runbox.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 55f8c389d4348cc517946fdcb10794112458e81e
    master date: 2020-07-24 10:17:26 +0200
---
 xen/arch/x86/acpi/wakeup_prot.S | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index 361751d290..6dc9e2bd82 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -84,6 +84,12 @@ ENTRY(__ret_point)
         mov     REF(saved_ss), %ss
         LOAD_GREG(sp)
 
+        mov     $__HYPERVISOR_DS64, %eax
+        mov     %eax, %ds
+        mov     %eax, %es
+        mov     %eax, %fs
+        mov     %eax, %gs
+
         /* Reload code selector */
         pushq   $(__HYPERVISOR_CS64)
         leaq    1f(%rip),%rax
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:01:05 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:01:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V1d-00007G-HX; Sat, 08 Aug 2020 20:01:05 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V1c-00006W-36
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:04 +0000
X-Inumbo-ID: f29d93fc-e622-4263-a432-8c9c31963e64
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id f29d93fc-e622-4263-a432-8c9c31963e64;
 Sat, 08 Aug 2020 20:01:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=JEVW97ECeHehRzq5rue0kIW1uMMWgFdzZ4XgkJi2TaE=; b=InwQJNePQ6KNexmok9VNziFrTK
 hBf4bDMZZusm0QxDrJtagDqIFiNuQqeb5yQqGpNUikOBI+wKDntl5aACuOYj/EPChHkJT7TlgVS4P
 XFMcb5bXHNgqk4tF66UGIkuts4sRMA2hsxxypbBaBhLjcBpJwl50OhC9+0NrP+qeMEHU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1b-0007dj-G2
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1b-0003cw-FD
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:03 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86/cpuid: Fix APIC bit clearing
Message-Id: <E1k4V1b-0003cw-FD@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:01:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 07fd5d3598cd9772f15b0ea740c0691cc9569186
Author:     Fam Zheng <famzheng@amazon.com>
AuthorDate: Fri Aug 7 17:32:02 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:32:02 2020 +0200

    x86/cpuid: Fix APIC bit clearing
    
    The bug is obvious here, other places in this function used
    "cpufeat_mask" correctly.
    
    Fixed: b648feff8ea2 ("xen/x86: Improvements to in-hypervisor cpuid sanity checks")
    Signed-off-by: Fam Zheng <famzheng@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 64219fa179c3e48adad12bfce3f6b3f1596cccbf
    master date: 2020-07-29 19:03:41 +0100
---
 xen/arch/x86/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 91faf02a2b..56072d4316 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -968,7 +968,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         {
             /* Fast-forward MSR_APIC_BASE.EN. */
             if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
-                res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+                res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
 
             /*
              * PSE36 is not supported in shadow mode.  This bit should be
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:01:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:01:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V1n-000096-JL; Sat, 08 Aug 2020 20:01:15 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V1m-00008r-4h
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:14 +0000
X-Inumbo-ID: 433eca65-b9be-4208-96a5-8eb71e88bd37
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 433eca65-b9be-4208-96a5-8eb71e88bd37;
 Sat, 08 Aug 2020 20:01:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=aoM6lQjxfze7LJ4BGjeoietkMwqjOsmhBbt03d7/YVk=; b=lL5gESoTcX4znAfsqMSk3IMBfK
 M0wtuENmzsbqanIbOMwoqP5vYJFbD7yLF6Db4FHQUCTCBRGunuMvZNcH4072AgxB1i/DfQ4x0ZFt7
 ThahEcv/TRu4WzO05hRxFt8c0SEXPY/3WgZWRQtC/P+KcfS6yFEaMmFaIE7arz3iFCms=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1l-0007e5-JA
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1l-0003dh-IX
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:13 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86emul: replace UB shifts
Message-Id: <E1k4V1l-0003dh-IX@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:01:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit dca9cc7db628040a8b673a3e5cf7df237429bd68
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:32:42 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:32:42 2020 +0200

    x86emul: replace UB shifts
    
    Displacement values can be negative, hence we shouldn't left-shift them.
    Or else we get
    
    (XEN) UBSAN: Undefined behaviour in x86_emulate/x86_emulate.c:3482:55
    (XEN) left shift of negative value -2
    
    While auditing shifts, I noticed a pair of missing parentheses, which
    also get added right here.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    
    x86emul: replace further UB shifts
    
    I have no explanation how I managed to overlook these while putting
    together what is now b6a907f8c83d ("x86emul: replace UB shifts").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b6a907f8c83d37886d0523f1aeff61b98e133498
    master date: 2020-07-31 17:41:58 +0200
    master commit: 21de9680eb594a7038d4d4ed78e53ac90a8c5a6e
    master date: 2020-08-05 10:19:29 +0200
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 98f52083f8..09de6ee15d 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3131,7 +3131,7 @@ x86_decode(
                     ea.mem.off = insn_fetch_type(int16_t);
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int16_t);
@@ -3190,7 +3190,7 @@ x86_decode(
                 pc_rel = mode_64bit();
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int32_t);
@@ -8521,7 +8521,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sat Aug 08 20:01:25 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 08 Aug 2020 20:01:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4V1x-0000Az-Kn; Sat, 08 Aug 2020 20:01:25 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=HNdF=BS=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4V1w-0000Aa-Gf
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:24 +0000
X-Inumbo-ID: 2a217b2d-deb1-438d-ac3d-d6ab6c43497d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 2a217b2d-deb1-438d-ac3d-d6ab6c43497d;
 Sat, 08 Aug 2020 20:01:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=n3/RLBc7qUOHtNQereLFyEst6aEVIicaPaIkq+GmgGs=; b=LrB6+cmUNtq7lR+tUN8a1ZQlbx
 IZkWbKTkhy3x0EvEQzuBiUQwxGsd5EBHnXoafM+tW3W3F9cSglEk/C7Jg9NtHsLkyc6DbtbCeh1At
 oHJ3ViXZiu+YFWOIFbZ6cQ+i3oZ9/vBQ6qi9u+azPHUv9l59gTpqdhrhWs+qRY8z/pnU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1v-0007fd-M5
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4V1v-0003eP-LL
 for xen-changelog@lists.xenproject.org; Sat, 08 Aug 2020 20:01:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.12] x86/hvm: set 'ipat' in EPT for special pages
Message-Id: <E1k4V1v-0003eP-LL@xenbits.xenproject.org>
Date: Sat, 08 Aug 2020 20:01:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 1336ca17742471fc4a59879ae2f637a59530a933
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Aug 7 17:33:22 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:33:22 2020 +0200

    x86/hvm: set 'ipat' in EPT for special pages
    
    All non-MMIO ranges (i.e those not mapping real device MMIO regions) that
    map valid MFNs are normally marked MTRR_TYPE_WRBACK and 'ipat' is set. Hence
    when PV drivers running in a guest populate the BAR space of the Xen Platform
    PCI Device with pages such as the Shared Info page or Grant Table pages,
    accesses to these pages will be cachable.
    
    However, should IOMMU mappings be enabled be enabled for the guest then these
    accesses become uncachable. This has a substantial negative effect on I/O
    throughput of PV devices. Arguably PV drivers should bot be using BAR space to
    host the Shared Info and Grant Table pages but it is currently commonplace for
    them to do this and so this problem needs mitigation. Hence this patch makes
    sure the 'ipat' bit is set for any special page regardless of where in GFN
    space it is mapped.
    
    NOTE: Clearly this mitigation only applies to Intel EPT. It is not obvious
          that there is any similar mitigation possible for AMD NPT. Downstreams
          such as Citrix XenServer have been carrying a patch similar to this for
          several releases though.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: ca24b2ffdbd9a25b2d313a547ccbe97baf3e5a8d
    master date: 2020-07-31 17:42:47 +0200
---
 xen/arch/x86/hvm/mtrr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 7ccd85bcea..c7c404fb69 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -795,6 +795,7 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
 {
     int gmtrr_mtype, hmtrr_mtype;
     struct vcpu *v = current;
+    unsigned long i;
 
     *ipat = 0;
 
@@ -837,6 +838,17 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
+    for ( i = 0; i < (1ul << order); i++ )
+    {
+        if ( is_xen_heap_page(mfn_to_page(mfn_add(mfn, i))) )
+        {
+            if ( order )
+                return -1;
+            *ipat = 1;
+            return MTRR_TYPE_WRBACK;
+        }
+    }
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12


From xen-changelog-bounces@lists.xenproject.org Sun Aug 09 08:33:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 09 Aug 2020 08:33:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4glM-0002pa-NT; Sun, 09 Aug 2020 08:33:04 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hV8B=BT=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4glM-0002pQ-0a
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:04 +0000
X-Inumbo-ID: ddae02a3-62b0-49b8-ac9a-ebf9a8a3720a
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ddae02a3-62b0-49b8-ac9a-ebf9a8a3720a;
 Sun, 09 Aug 2020 08:33:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=qOj88V4RkGu4ThAeeB94z77yqQ8S8nBG5MLlvWVUJDY=; b=Vm+d1iI9Ce+pBwn5eHEtHeG1rt
 MfJbsaKuuGugJiaBdtE4nQzvMk7rKSDxZ8Xthm2yHP8SIkaXk0cS4dZMEe6aK8q4Xijgv2HuA5BT9
 8kP8slLxw58E2xO0sFnUopymNFwUWCMOXFaqq4oy380fQk385LqVw7E8SCO8IHZO5XdE=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4glK-000621-MR
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4glK-0002jr-KI
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] build: work around bash issue
Message-Id: <E1k4glK-0002jr-KI@xenbits.xenproject.org>
Date: Sun, 09 Aug 2020 08:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 5132a0a37190b73c99dbbecf48dc4fb214feaf14
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:12:00 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 13:12:00 2020 +0200

    build: work around bash issue
    
    Older bash (observed with 3.2.57(2)) fails to honor "set -e" for certain
    built-in commands ("while" here), despite the command's status correctly
    being non-zero. The subsequent objcopy invocation now being separated by
    a semicolon results in no failure. Insert an explicit "exit" (replacing
    ; by && ought to be another possible workaround).
    
    Fixes: e321576f4047 ("xen/build: start using if_changed")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index ebfd40caff..62e9fabe7a 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -193,7 +193,7 @@ define cmd_obj_init_o
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
             exit $$(expr $$idx + 1);; \
         esac; \
-    done; \
+    done || exit $$?; \
     $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@
 endef
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 09 08:33:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 09 Aug 2020 08:33:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4glY-0002qN-2e; Sun, 09 Aug 2020 08:33:16 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hV8B=BT=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4glW-0002qC-OI
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:14 +0000
X-Inumbo-ID: d36f726c-639d-4249-bd9e-e2c498c40906
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id d36f726c-639d-4249-bd9e-e2c498c40906;
 Sun, 09 Aug 2020 08:33:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=n84qB3SP0cfXCq0qHsQt+2AvEP6su2JZbgZINt2ockM=; b=cLdVo3mK1wm2nM3rq+zmOLH8SA
 OJLoCTQz2JfyAmIiIrnV54M1ydEgojBztQ9R6F0c2KAFZlS2XfZCJJwwNXRDnYv93Qmd2L3yZh3q8
 xDnmfmLO0ABXqwKSI0MVo1maHu//bNQIVgSrfiawn4fl1zMChR7hlm+jmR4SwUi3jwmI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4glU-000627-Pz
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4glU-0002kp-OZ
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] build: correctly report non-empty section sizes upon .o
 -> .init.o conversion
Message-Id: <E1k4glU-0002kp-OZ@xenbits.xenproject.org>
Date: Sun, 09 Aug 2020 08:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d87c5166daee1f9e1570961b2d204a4a2570acf5
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:12:21 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 13:12:21 2020 +0200

    build: correctly report non-empty section sizes upon .o -> .init.o conversion
    
    The originally used sed expression converted not just multiple leading
    zeroes (as intended), but also trailing ones, rendering the error
    message somewhat confusing. Collapse zeroes in just the one place where
    we need them collapsed, and leave objdump's output as is for all other
    purposes.
    
    Fixes: 48115d14743e ("Move more kernel decompression bits to .init.* sections")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/Rules.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 62e9fabe7a..e90a03d116 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -185,11 +185,11 @@ cmd_cc_o_S = $(CC) $(a_flags) -c $< -o $@
 
 quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
-    $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name sz rest; do \
+    $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
         .*.local) ;; \
         .text|.text.*|.data|.data.*|.bss) \
-            test $$sz != 0 || continue; \
+            test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
             exit $$(expr $$idx + 1);; \
         esac; \
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 09 08:33:25 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 09 Aug 2020 08:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4glh-0002rZ-4L; Sun, 09 Aug 2020 08:33:25 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hV8B=BT=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4glf-0002rR-SJ
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:23 +0000
X-Inumbo-ID: b52c278c-7f86-46cb-aa2e-4afce368e950
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id b52c278c-7f86-46cb-aa2e-4afce368e950;
 Sun, 09 Aug 2020 08:33:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=9B5DXPnJWpkGEZYhE8NfxbI2DZkx2zxqE9TCJl+6zkk=; b=n6bmwfPBf43eKzxaZNXV5Z+yG+
 nwUVJfyEPIk+0Gvft6i2GNxk5oeLHPup7ML1DJzgkkyL0YqOq9OLacl6XGkpzZX2/k/vutxf10bVQ
 YruNEGMAbbUvb0aIrDT7GCFNW4GcmzN0tHwpRFkX96LBxgVRuQQPUx03n/lpDKdoyjus=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4gle-00062E-Te
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4gle-0002lW-S5
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86: slightly re-arrange 32-bit handling in
 dom0_construct_pv()
Message-Id: <E1k4gle-0002lW-S5@xenbits.xenproject.org>
Date: Sun, 09 Aug 2020 08:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 16dcc135e89663628ee2eaf2d02991fc9ce954bf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:14:02 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 13:14:02 2020 +0200

    x86: slightly re-arrange 32-bit handling in dom0_construct_pv()
    
    Add #ifdef-s (the 2nd one will be needed in particular, to guard the
    uses of m2p_compat_vstart and HYPERVISOR_COMPAT_VIRT_START()) and fold
    duplicate uses of elf_32bit().
    
    Also adjust what gets logged: Avoid "compat32" when support isn't built
    in, and don't assume ELF class <> ELFCLASS64 means ELFCLASS32.
    
    While doing this, in code getting touched anyway:
    - use ROUNDUP() instead of open-coding it,
    - drop a stale (dead) BUG_ON(),
    - replace panic() by printk() plus error return, for being consistent
      with other code.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/dom0_build.c | 73 ++++++++++++++++++++++++++------------------
 1 file changed, 44 insertions(+), 29 deletions(-)

diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 3522eb0114..171519e285 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -300,7 +300,6 @@ int __init dom0_construct_pv(struct domain *d,
     struct page_info *page = NULL;
     start_info_t *si;
     struct vcpu *v = d->vcpu[0];
-    unsigned long long value;
     void *image_base = bootstrap_map(image);
     unsigned long image_len = image->mod_end;
     void *image_start = image_base + image_headroom;
@@ -357,27 +356,36 @@ int __init dom0_construct_pv(struct domain *d,
         goto out;
 
     /* compatibility check */
+    printk(" Xen  kernel: 64-bit, lsb%s\n",
+           IS_ENABLED(CONFIG_PV32) ? ", compat32" : "");
     compatible = 0;
     machine = elf_uval(&elf, elf.ehdr, e_machine);
-    printk(" Xen  kernel: 64-bit, lsb, compat32\n");
-    if ( elf_32bit(&elf) && parms.pae == XEN_PAE_BIMODAL )
-        parms.pae = XEN_PAE_EXTCR3;
-    if ( elf_32bit(&elf) && parms.pae && machine == EM_386 )
+
+#ifdef CONFIG_PV32
+    if ( elf_32bit(&elf) )
     {
-        if ( unlikely(rc = switch_compat(d)) )
+        if ( parms.pae == XEN_PAE_BIMODAL )
+            parms.pae = XEN_PAE_EXTCR3;
+        if ( parms.pae && machine == EM_386 )
         {
-            printk("Dom0 failed to switch to compat: %d\n", rc);
-            return rc;
-        }
+            if ( unlikely(rc = switch_compat(d)) )
+            {
+                printk("Dom0 failed to switch to compat: %d\n", rc);
+                return rc;
+            }
 
-        compatible = 1;
+            compatible = 1;
+        }
     }
-    if (elf_64bit(&elf) && machine == EM_X86_64)
+#endif
+
+    if ( elf_64bit(&elf) && machine == EM_X86_64 )
         compatible = 1;
-    printk(" Dom0 kernel: %s%s, %s, paddr %#" PRIx64 " -> %#" PRIx64 "\n",
-           elf_64bit(&elf) ? "64-bit" : "32-bit",
-           parms.pae       ? ", PAE"  : "",
-           elf_msb(&elf)   ? "msb"    : "lsb",
+
+    printk(" Dom0 kernel: %s-bit%s, %s, paddr %#" PRIx64 " -> %#" PRIx64 "\n",
+           elf_64bit(&elf) ? "64" : elf_32bit(&elf) ? "32" : "??",
+           parms.pae       ? ", PAE" : "",
+           elf_msb(&elf)   ? "msb"   : "lsb",
            elf.pstart, elf.pend);
     if ( elf.bsd_symtab_pstart )
         printk(" Dom0 symbol map %#" PRIx64 " -> %#" PRIx64 "\n",
@@ -405,23 +413,30 @@ int __init dom0_construct_pv(struct domain *d,
     if ( parms.pae == XEN_PAE_EXTCR3 )
             set_bit(VMASST_TYPE_pae_extended_cr3, &d->vm_assist);
 
-    if ( !pv_shim && (parms.virt_hv_start_low != UNSET_ADDR) &&
-         elf_32bit(&elf) )
+#ifdef CONFIG_PV32
+    if ( elf_32bit(&elf) )
     {
-        unsigned long mask = (1UL << L2_PAGETABLE_SHIFT) - 1;
-        value = (parms.virt_hv_start_low + mask) & ~mask;
-        BUG_ON(!is_pv_32bit_domain(d));
-        if ( value > __HYPERVISOR_COMPAT_VIRT_START )
-            panic("Domain 0 expects too high a hypervisor start address\n");
-        HYPERVISOR_COMPAT_VIRT_START(d) =
-            max_t(unsigned int, m2p_compat_vstart, value);
-    }
+        if ( !pv_shim && (parms.virt_hv_start_low != UNSET_ADDR) )
+        {
+            unsigned long value = ROUNDUP(parms.virt_hv_start_low,
+                                          1UL << L2_PAGETABLE_SHIFT);
 
-    if ( (parms.p2m_base != UNSET_ADDR) && elf_32bit(&elf) )
-    {
-        printk(XENLOG_WARNING "P2M table base ignored\n");
-        parms.p2m_base = UNSET_ADDR;
+            if ( value > __HYPERVISOR_COMPAT_VIRT_START )
+            {
+                printk("Dom0 expects too high a hypervisor start address\n");
+                return -ERANGE;
+            }
+            HYPERVISOR_COMPAT_VIRT_START(d) =
+                max_t(unsigned int, m2p_compat_vstart, value);
+        }
+
+        if ( parms.p2m_base != UNSET_ADDR )
+        {
+            printk(XENLOG_WARNING "P2M table base ignored\n");
+            parms.p2m_base = UNSET_ADDR;
+        }
     }
+#endif
 
     /*
      * Why do we need this? The number of page-table frames depends on the
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sun Aug 09 08:33:35 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 09 Aug 2020 08:33:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4glr-0002tO-7Z; Sun, 09 Aug 2020 08:33:35 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hV8B=BT=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4glq-0002tA-0B
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:34 +0000
X-Inumbo-ID: 563d926e-9743-4c19-bc01-4a904db5525d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 563d926e-9743-4c19-bc01-4a904db5525d;
 Sun, 09 Aug 2020 08:33:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=yVBwH/b0t7REpxFJNqY0gy36c2VLKCKWcrgjprG5qqM=; b=0NVDWS4o1NgtLLFBERHOnY57Xz
 Sa0nfPl0yzbypiY6Dc3VyZ+6WcfQxZVIXDczmQLKA53Y9iFpfCKSGqhQY88VEZb8zubfQgyf34YZk
 aez41i5YFQtfK4spE94f7BjRB6cieEXFeFTjkbw2npHpr8MOFBFhejSj8iYIDC+SK0a8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4glp-00062N-19
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4glo-0002m1-Vn
 for xen-changelog@lists.xenproject.org; Sun, 09 Aug 2020 08:33:32 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/EFI: sanitize build logic
Message-Id: <E1k4glo-0002m1-Vn@xenbits.xenproject.org>
Date: Sun, 09 Aug 2020 08:33:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 90c7eee53fcc0b48bd51aa3a7d1d0d9980ce1a7a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 13:32:11 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 7 17:30:58 2020 +0100

    x86/EFI: sanitize build logic
    
    With changes done over time and as far as linking goes, the only special
    thing about building with EFI support enabled is the need for the dummy
    relocations object for xen.gz uniformly in all build stages. All other
    efi/*.o can be consumed from the built_in*.o files.
    
    In efi/Makefile, besides moving relocs-dummy.o to "extra", also properly
    split between obj-y and obj-bin-y.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile     | 30 ++++++++++++++----------------
 xen/arch/x86/efi/Makefile |  5 +++--
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index b388861679..77e5534cff 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -113,28 +113,35 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 		{ echo "No Multiboot2 header found" >&2; false; }
 	mv $(TMP) $(TARGET)
 
+# Check if the compiler supports the MS ABI.
+export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
+# Check if the linker supports PE.
+XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
+EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
 
 ifeq ($(CONFIG_LTO),y)
 # Gather all LTO objects together
 prelink_lto.o: $(ALL_OBJS)
 	$(LD_LTO) -r -o $@ $^
 
-prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/compat.o
-	$(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi_lto.o: $(ALL_OBJS)
+	$(LD_LTO) -r -o $@ $^
 
 # Link it with all the binary objects
-prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o
+prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o efi/boot.init.o
+prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 else
-prelink.o: $(ALL_OBJS)
+prelink.o: $(ALL_OBJS) $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi.o: $(ALL_OBJS)
+	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
@@ -171,12 +178,6 @@ EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
 EFI_LDFLAGS += --major-os-version=2 --minor-os-version=0
 EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0
 
-# Check if the compiler supports the MS ABI.
-export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
-# Check if the linker supports PE.
-XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
-CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
-
 $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
 $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
 
@@ -223,9 +224,6 @@ $(TARGET).efi: FORCE
 	echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) disabled'
 endif
 
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: ;
-
 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h
 	$(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $<
 
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 3e4c395b75..4b2b010a80 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -14,6 +14,7 @@ $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
 $(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
-obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o
-extra-$(XEN_BUILD_EFI) += buildid.o
+obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ))
+obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ))
+extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o
 nocov-$(XEN_BUILD_EFI) += stub.o
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Aug 10 01:55:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 10 Aug 2020 01:55:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4x1k-0003qG-Bi; Mon, 10 Aug 2020 01:55:04 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Kdth=BU=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4x1j-0003qB-8R
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:03 +0000
X-Inumbo-ID: 182e2322-5ab7-4b34-9a65-77d2261ba027
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 182e2322-5ab7-4b34-9a65-77d2261ba027;
 Mon, 10 Aug 2020 01:55:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=xbcshl7uUFN8z/ybQoIiOtTa2Ch76J/AVu4Y5wCE5VI=; b=s4wplZf86ZJxjZP3Q6mqbg4mTY
 uIK5iIuMF8aLjW8WHvgaIaJQxgq/Zrj9MkpQOvPSBGsJSQTeJ/So6YJc4COzGoBFId1B8o4LUJpKk
 XRby2y1d/apFn92UIIo32g35TgZQkSdiWLJEg5tvXUaEgfQsRaw9CArV/7bArMlPEqOw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x1h-0001cn-VB
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x1h-0004zK-UG
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:01 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.14] update Xen version to 4.14.1-pre
Message-Id: <E1k4x1h-0004zK-UG@xenbits.xenproject.org>
Date: Mon, 10 Aug 2020 01:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit f836759a7bbf095dc5b1f31a069296bcfd694b82
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:07:56 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:07:56 2020 +0200

    update Xen version to 4.14.1-pre
---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index 4a45e716a8..110ea0f1a8 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 14
-export XEN_EXTRAVERSION ?= .0$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .1-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.14


From xen-changelog-bounces@lists.xenproject.org Mon Aug 10 01:55:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 10 Aug 2020 01:55:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4x1u-0003qv-DF; Mon, 10 Aug 2020 01:55:14 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Kdth=BU=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4x1t-0003qn-05
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:13 +0000
X-Inumbo-ID: 17807602-2a33-49cc-8cb1-4d4367c98d52
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 17807602-2a33-49cc-8cb1-4d4367c98d52;
 Mon, 10 Aug 2020 01:55:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=IAjkUuiobT8LCAKwaBMprqaeOD4d+TpqHr4xEi052Fs=; b=lSsUezqM6HLiJ/VuzKUlNZLhzc
 iFPXSjC5pkk9zwYT8PLYULJFAqUNOSrLero5MOon1gAjLtuLRQfgCWSSQU+Gh6l5KrLP8gEJa1cEK
 7h75Vitx/ZXlq8uoJEJwFqvLAopDIQnhymDt/QOitlDQcb7TBZZkli059k+KisrX+Nvg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x1s-0001ct-43
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x1s-0004zp-15
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.14] x86/S3: put data segment registers into known state
 upon resume
Message-Id: <E1k4x1s-0004zp-15@xenbits.xenproject.org>
Date: Mon, 10 Aug 2020 01:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b8c3e33a4fe4374f633b4369200731662ff1f750
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:09:19 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:09:19 2020 +0200

    x86/S3: put data segment registers into known state upon resume
    
    wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
    wakeup_start did set it to, and %gs at whatever BIOS did load into it.
    All of this may end up confusing the first load_segments() to run on
    the BSP after resume, in particular allowing a non-nul selector value
    to be left in %fs.
    
    Alongside %ss, also put all other data segment registers into the same
    state that the boot and CPU bringup paths put them in.
    
    Reported-by: M. Vefa Bicakci <m.v.b@runbox.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 55f8c389d4348cc517946fdcb10794112458e81e
    master date: 2020-07-24 10:17:26 +0200
---
 xen/arch/x86/acpi/wakeup_prot.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index dcc7e2327d..a2c41c4f3f 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -49,6 +49,10 @@ ENTRY(s3_resume)
         mov     %rax, %cr0
 
         mov     $__HYPERVISOR_DS64, %eax
+        mov     %eax, %ds
+        mov     %eax, %es
+        mov     %eax, %fs
+        mov     %eax, %gs
         mov     %eax, %ss
         mov     saved_rsp(%rip), %rsp
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.14


From xen-changelog-bounces@lists.xenproject.org Mon Aug 10 01:55:25 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 10 Aug 2020 01:55:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4x25-0003sA-Er; Mon, 10 Aug 2020 01:55:25 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Kdth=BU=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4x24-0003s0-EE
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:24 +0000
X-Inumbo-ID: bba9234b-9c52-4d19-affd-4f052998a4d9
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id bba9234b-9c52-4d19-affd-4f052998a4d9;
 Mon, 10 Aug 2020 01:55:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=H+JWuGzoht9Bwa5vsctvANqp7UcoTEG60+a4LN5aVEk=; b=REf0wbZ6F7DJ7wHejpb3RZqArA
 BRh+yz8mzuEDJnA1miimR5CBQ5pdlv34+fLp40D4mSrw+SthCP0P/OJje9S2eoy0sZyjawXCd6zGu
 1hzT73VQ21JqDPgm2CLZS0i78B+AHvGi6GmTYHg86nGRHMXpKrxmCRS7SzqYaAS7O9Qw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x22-0001dR-78
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x22-00050R-6G
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.14] x86/cpuid: Fix APIC bit clearing
Message-Id: <E1k4x22-00050R-6G@xenbits.xenproject.org>
Date: Mon, 10 Aug 2020 01:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a5dab0a2453da1e15fd49e6a7fa9138e333ba9af
Author:     Fam Zheng <famzheng@amazon.com>
AuthorDate: Fri Aug 7 17:09:51 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:09:51 2020 +0200

    x86/cpuid: Fix APIC bit clearing
    
    The bug is obvious here, other places in this function used
    "cpufeat_mask" correctly.
    
    Fixed: b648feff8ea2 ("xen/x86: Improvements to in-hypervisor cpuid sanity checks")
    Signed-off-by: Fam Zheng <famzheng@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 64219fa179c3e48adad12bfce3f6b3f1596cccbf
    master date: 2020-07-29 19:03:41 +0100
---
 xen/arch/x86/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 6a4a787b68..63a03ef1e5 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -1057,7 +1057,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         {
             /* Fast-forward MSR_APIC_BASE.EN. */
             if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
-                res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+                res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
 
             /*
              * PSE36 is not supported in shadow mode.  This bit should be
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.14


From xen-changelog-bounces@lists.xenproject.org Mon Aug 10 01:55:34 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 10 Aug 2020 01:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4x2E-0003ti-GM; Mon, 10 Aug 2020 01:55:34 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Kdth=BU=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4x2D-0003tV-6v
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:33 +0000
X-Inumbo-ID: 8846d28a-d777-46a4-b49f-81abc71706fb
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 8846d28a-d777-46a4-b49f-81abc71706fb;
 Mon, 10 Aug 2020 01:55:32 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=P5HRFOXYeNbaJGhso2vj+6evhZNEVwyQEv4Hk41jPPg=; b=Q5WMZi5EWHBt1pJBoab0hk7bnn
 ijuNSXuVe3+36JHOSiPplKqrBHYb9C72MDoNcrOctGLJ2ZjDVwUE8wqUghxUAVwwqUSasIl1JIvBW
 XO1fY6ekLQRmBEJnP+q/Ajh5w5joWtsJFdq4vbkS4giDfZ0Zz2W5NY49afVQV78PQ4PU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x2C-0001dY-B8
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x2C-00050v-9x
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:32 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.14] x86emul: replace UB shifts
Message-Id: <E1k4x2C-00050v-9x@xenbits.xenproject.org>
Date: Mon, 10 Aug 2020 01:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit afed8e4365f0dec26a040ea0670b654e00d8c869
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:10:34 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:10:34 2020 +0200

    x86emul: replace UB shifts
    
    Displacement values can be negative, hence we shouldn't left-shift them.
    Or else we get
    
    (XEN) UBSAN: Undefined behaviour in x86_emulate/x86_emulate.c:3482:55
    (XEN) left shift of negative value -2
    
    While auditing shifts, I noticed a pair of missing parentheses, which
    also get added right here.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    
    x86: comment update after "drop high compat r/o M2P table address range"
    
    Commit 5af040ef8b57 clearly should also have updated the comment, not
    just the #define-s.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b6a907f8c83d37886d0523f1aeff61b98e133498
    master date: 2020-07-31 17:41:58 +0200
    master commit: 2e98d0b1d09e99e3d1287cb13f42b604ebc3c29a
    master date: 2020-08-05 10:21:22 +0200
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 84bb8e0c9b..ee6341b1b7 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3368,7 +3368,7 @@ x86_decode(
         {
             generate_exception_if(d & vSIB, EXC_UD);
             modrm_rm |= ((rex_prefix & 1) << 3) |
-                        (evex_encoded() && !evex.x) << 4;
+                        ((evex_encoded() && !evex.x) << 4);
             ea.type = OP_REG;
         }
         else if ( ad_bytes == 2 )
@@ -3415,7 +3415,7 @@ x86_decode(
                     ea.mem.off = insn_fetch_type(int16_t);
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int16_t);
@@ -3477,7 +3477,7 @@ x86_decode(
                 pc_rel = mode_64bit();
                 break;
             case 1:
-                ea.mem.off += insn_fetch_type(int8_t) << disp8scale;
+                ea.mem.off += insn_fetch_type(int8_t) * (1 << disp8scale);
                 break;
             case 2:
                 ea.mem.off += insn_fetch_type(int32_t);
@@ -9727,7 +9727,7 @@ x86_emulate(
 
                 rc = ops->read(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
                 if ( rc != X86EMUL_OKAY )
                 {
@@ -9849,7 +9849,8 @@ x86_emulate(
                 continue;
 
             rc = ops->read(ea.mem.seg,
-                           truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                           truncate_ea(ea.mem.off +
+                                       idx * (1 << state->sib_scale)),
                            (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -10020,7 +10021,8 @@ x86_emulate(
                 continue;
 
             rc = ops->write(ea.mem.seg,
-                            truncate_ea(ea.mem.off + (idx << state->sib_scale)),
+                            truncate_ea(ea.mem.off +
+                                        idx * (1 << state->sib_scale)),
                             (void *)mmvalp + i * op_bytes, op_bytes, ctxt);
             if ( rc != X86EMUL_OKAY )
             {
@@ -10138,7 +10140,7 @@ x86_emulate(
                   ? ops->write
                   : ops->read)(ea.mem.seg,
                                truncate_ea(ea.mem.off +
-                                           (idx << state->sib_scale)),
+                                           idx * (1 << state->sib_scale)),
                                NULL, 0, ctxt);
             if ( rc == X86EMUL_EXCEPTION )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.14


From xen-changelog-bounces@lists.xenproject.org Mon Aug 10 01:55:44 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 10 Aug 2020 01:55:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4x2O-0003ut-I0; Mon, 10 Aug 2020 01:55:44 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Kdth=BU=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4x2N-0003uf-A4
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:43 +0000
X-Inumbo-ID: 26d127a7-2df4-4294-a7f6-5e9893b6b2af
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 26d127a7-2df4-4294-a7f6-5e9893b6b2af;
 Mon, 10 Aug 2020 01:55:42 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=mGBSGrmqMlGqnlwQOSmIZTaER19OQ6n5uWhbJlwLx9w=; b=van7KobhoquaKQbTx1J1FUgW+D
 idJEocGZiYkAX+KumeUUP8X+0cYOLSGWoOQjNov1V7SMPBnYGfRnl5ADs67/WSpQEa2oM1PyI3+k1
 hcb80EMOAZPCXQN9gxUdTyCMhuy/xAhyUdrnrbBLMx191DP+neYv6/W+uekkeLcxB1wM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x2M-0001df-E7
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x2M-00051M-DG
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:42 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.14] x86/hvm: set 'ipat' in EPT for special pages
Message-Id: <E1k4x2M-00051M-DG@xenbits.xenproject.org>
Date: Mon, 10 Aug 2020 01:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 864d5701ec5dc5af028d415e86bf5cf6aaed3a7c
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Fri Aug 7 17:11:10 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:11:10 2020 +0200

    x86/hvm: set 'ipat' in EPT for special pages
    
    All non-MMIO ranges (i.e those not mapping real device MMIO regions) that
    map valid MFNs are normally marked MTRR_TYPE_WRBACK and 'ipat' is set. Hence
    when PV drivers running in a guest populate the BAR space of the Xen Platform
    PCI Device with pages such as the Shared Info page or Grant Table pages,
    accesses to these pages will be cachable.
    
    However, should IOMMU mappings be enabled be enabled for the guest then these
    accesses become uncachable. This has a substantial negative effect on I/O
    throughput of PV devices. Arguably PV drivers should bot be using BAR space to
    host the Shared Info and Grant Table pages but it is currently commonplace for
    them to do this and so this problem needs mitigation. Hence this patch makes
    sure the 'ipat' bit is set for any special page regardless of where in GFN
    space it is mapped.
    
    NOTE: Clearly this mitigation only applies to Intel EPT. It is not obvious
          that there is any similar mitigation possible for AMD NPT. Downstreams
          such as Citrix XenServer have been carrying a patch similar to this for
          several releases though.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: ca24b2ffdbd9a25b2d313a547ccbe97baf3e5a8d
    master date: 2020-07-31 17:42:47 +0200
---
 xen/arch/x86/hvm/mtrr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 511c3be1c8..2bd64e8025 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -794,6 +794,7 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
 {
     int gmtrr_mtype, hmtrr_mtype;
     struct vcpu *v = current;
+    unsigned long i;
 
     *ipat = 0;
 
@@ -836,6 +837,17 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
+    for ( i = 0; i < (1ul << order); i++ )
+    {
+        if ( is_special_page(mfn_to_page(mfn_add(mfn, i))) )
+        {
+            if ( order )
+                return -1;
+            *ipat = 1;
+            return MTRR_TYPE_WRBACK;
+        }
+    }
+
     gmtrr_mtype = hvm_get_mem_pinned_cacheattr(d, _gfn(gfn), order);
     if ( gmtrr_mtype >= 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.14


From xen-changelog-bounces@lists.xenproject.org Mon Aug 10 01:55:54 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 10 Aug 2020 01:55:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k4x2Y-0003vx-JY; Mon, 10 Aug 2020 01:55:54 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Kdth=BU=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k4x2X-0003vn-AP
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:53 +0000
X-Inumbo-ID: a50ead07-b4f7-4684-acb2-6fc04af1048b
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id a50ead07-b4f7-4684-acb2-6fc04af1048b;
 Mon, 10 Aug 2020 01:55:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=dvn9Zdff7qYOnzfHN1NU49EVmKuzL6GJgDhLN1Iu/yY=; b=btLEYo7q2kVJW28dC6OHzbbHqt
 CdfJbOTN00/a370ctkSQCkuwGndq9wh2S/muiHbVp/6GY6MFiQ8BXnI5/r7KDxMHJFcrNbaAMMm7/
 h7cWlvltrUN/31suZFuQaaZKH8ztStE0SkWePLVQRTloAM8LIwfspiTsfD6C0ro4sMhw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x2W-0001dr-Gu
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k4x2W-00051r-GB
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 01:55:52 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen stable-4.14] x86: comment update after "drop high compat r/o M2P
 table address range"
Message-Id: <E1k4x2W-00051r-GB@xenbits.xenproject.org>
Date: Mon, 10 Aug 2020 01:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c3a0fc22af90ef28e68b116c6a49d9cec57f71cf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Aug 7 17:11:44 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 7 17:11:44 2020 +0200

    x86: comment update after "drop high compat r/o M2P table address range"
    
    Commit 5af040ef8b57 clearly should also have updated the comment, not
    just the #define-s.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: 2e98d0b1d09e99e3d1287cb13f42b604ebc3c29a
    master date: 2020-08-05 10:21:22 +0200
---
 xen/include/asm-x86/config.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 2ba234383d..665e9cc31d 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -144,18 +144,16 @@ extern unsigned char boot_edid_info[128];
  *  0xffff82d000000000 - 0xffff82d03fffffff [1GB,   2^30 bytes, PML4:261]
  *    Compatibility machine-to-phys translation table.
  *  0xffff82d040000000 - 0xffff82d07fffffff [1GB,   2^30 bytes, PML4:261]
- *    High read-only compatibility machine-to-phys translation table.
- *  0xffff82d080000000 - 0xffff82d0bfffffff [1GB,   2^30 bytes, PML4:261]
  *    Xen text, static data, bss.
 #ifndef CONFIG_BIGMEM
- *  0xffff82d0c0000000 - 0xffff82dfffffffff [61GB,              PML4:261]
+ *  0xffff82d080000000 - 0xffff82dfffffffff [62GB,              PML4:261]
  *    Reserved for future use.
  *  0xffff82e000000000 - 0xffff82ffffffffff [128GB, 2^37 bytes, PML4:261]
  *    Page-frame information array.
  *  0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271]
  *    1:1 direct mapping of all physical memory.
 #else
- *  0xffff82d0c0000000 - 0xffff82ffffffffff [189GB,             PML4:261]
+ *  0xffff82d080000000 - 0xffff82ffffffffff [190GB,             PML4:261]
  *    Reserved for future use.
  *  0xffff830000000000 - 0xffff847fffffffff [1.5TB, 3*2^39 bytes, PML4:262-264]
  *    Page-frame information array.
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.14


From xen-changelog-bounces@lists.xenproject.org Mon Aug 10 14:55:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 10 Aug 2020 14:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k59Cd-0001Xo-K8; Mon, 10 Aug 2020 14:55:07 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Kdth=BU=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k59Cc-0001Xj-36
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 14:55:06 +0000
X-Inumbo-ID: d1ba42ea-9bcb-4cba-8fbd-1c46b83300d5
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id d1ba42ea-9bcb-4cba-8fbd-1c46b83300d5;
 Mon, 10 Aug 2020 14:55:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=A5LzXEVXqKttuYCFh2WhENomnN1pilMG+RkaCsey1ks=; b=cblhy7GKTvSshiOtBl9Uj3jgZq
 HnqGKEsX7xX2RZwYtzBzJnHiQ2UG88+HpDIhbXX1OKv0oX7dfVlmQfiP98odoVU+nnI9iTJoHgOlQ
 +eEYpdhgXMx4dCH79lzdqISrFsbZQRTfDgBJuyQ85facEUqKGi121h3imazqd+t9nmeI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k59Ca-0000LT-EF
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 14:55:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k59Ca-0004TV-BN
 for xen-changelog@lists.xenproject.org; Mon, 10 Aug 2020 14:55:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] Revert "x86/EFI: sanitize build logic"
Message-Id: <E1k59Ca-0004TV-BN@xenbits.xenproject.org>
Date: Mon, 10 Aug 2020 14:55:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7a4dd361d10718608ad37f969df0a3cf5bc17b12
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 10 15:45:46 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Aug 10 15:45:46 2020 +0100

    Revert "x86/EFI: sanitize build logic"
    
    This reverts commit 90c7eee53fcc0b48bd51aa3a7d1d0d9980ce1a7a.
    
    It breaks the build in some configurations with CONFIG_LIVEPATCH enabled.
    
      make[2]: *** No rule to make target 'efi/buildid.o', needed by '/local/xen.git/xen/xen.efi'.  Stop.
      make[2]: *** Waiting for unfinished jobs....
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile     | 30 ++++++++++++++++--------------
 xen/arch/x86/efi/Makefile |  5 ++---
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 77e5534cff..b388861679 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -113,35 +113,28 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 		{ echo "No Multiboot2 header found" >&2; false; }
 	mv $(TMP) $(TARGET)
 
-# Check if the compiler supports the MS ABI.
-export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
-# Check if the linker supports PE.
-XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
-CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
-
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
-EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
 
 ifeq ($(CONFIG_LTO),y)
 # Gather all LTO objects together
 prelink_lto.o: $(ALL_OBJS)
 	$(LD_LTO) -r -o $@ $^
 
-prelink-efi_lto.o: $(ALL_OBJS)
-	$(LD_LTO) -r -o $@ $^
+prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/compat.o
+	$(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.o,$^)
 
 # Link it with all the binary objects
-prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o $(EFI_OBJS-y)
+prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o
+prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o efi/boot.init.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 else
-prelink.o: $(ALL_OBJS) $(EFI_OBJS-y)
+prelink.o: $(ALL_OBJS)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(ALL_OBJS)
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
+prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o
+	$(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^)
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
@@ -178,6 +171,12 @@ EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
 EFI_LDFLAGS += --major-os-version=2 --minor-os-version=0
 EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0
 
+# Check if the compiler supports the MS ABI.
+export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
+# Check if the linker supports PE.
+XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+
 $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
 $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
 
@@ -224,6 +223,9 @@ $(TARGET).efi: FORCE
 	echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) disabled'
 endif
 
+efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
+efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: ;
+
 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h
 	$(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $<
 
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 4b2b010a80..3e4c395b75 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -14,7 +14,6 @@ $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
 $(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
-obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ))
-obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ))
-extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o
+obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o
+extra-$(XEN_BUILD_EFI) += buildid.o
 nocov-$(XEN_BUILD_EFI) += stub.o
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 11 07:22:11 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 11 Aug 2020 07:22:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k5Obl-0008FX-Qp; Tue, 11 Aug 2020 07:22:05 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Vp7m=BV=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k5Obk-0008FS-Li
 for xen-changelog@lists.xenproject.org; Tue, 11 Aug 2020 07:22:04 +0000
X-Inumbo-ID: 3aacc29d-5c9d-448d-8269-a670a7243db8
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3aacc29d-5c9d-448d-8269-a670a7243db8;
 Tue, 11 Aug 2020 07:22:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=xTFLxRF97FMKJOzL1LSP/6hGVyUAq/mOdp0EzsXPN/g=; b=XEYNqYT/wOnxE+r37/eQqhPABL
 MHNoP+aDaRZOzMPEoDy5vcH4QBQARAgxsHJtnQ0xroN3PCtNcR3sZGNr3Lo9zNSeqHR9GvwI6lUnb
 YIjYIHh4qPw53s6mrPue5BPIfx5TLtpa610bKa0v+RWodDM6If9XJ7H/7Fvh1GExKZvc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k5Obi-0002Ut-9V
 for xen-changelog@lists.xenproject.org; Tue, 11 Aug 2020 07:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k5Obi-0006w4-8R
 for xen-changelog@lists.xenproject.org; Tue, 11 Aug 2020 07:22:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] Revert "x86/EFI: sanitize build logic"
Message-Id: <E1k5Obi-0006w4-8R@xenbits.xenproject.org>
Date: Tue, 11 Aug 2020 07:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7a4dd361d10718608ad37f969df0a3cf5bc17b12
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 10 15:45:46 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Aug 10 15:45:46 2020 +0100

    Revert "x86/EFI: sanitize build logic"
    
    This reverts commit 90c7eee53fcc0b48bd51aa3a7d1d0d9980ce1a7a.
    
    It breaks the build in some configurations with CONFIG_LIVEPATCH enabled.
    
      make[2]: *** No rule to make target 'efi/buildid.o', needed by '/local/xen.git/xen/xen.efi'.  Stop.
      make[2]: *** Waiting for unfinished jobs....
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile     | 30 ++++++++++++++++--------------
 xen/arch/x86/efi/Makefile |  5 ++---
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 77e5534cff..b388861679 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -113,35 +113,28 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 		{ echo "No Multiboot2 header found" >&2; false; }
 	mv $(TMP) $(TARGET)
 
-# Check if the compiler supports the MS ABI.
-export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
-# Check if the linker supports PE.
-XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
-CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
-
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
-EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
 
 ifeq ($(CONFIG_LTO),y)
 # Gather all LTO objects together
 prelink_lto.o: $(ALL_OBJS)
 	$(LD_LTO) -r -o $@ $^
 
-prelink-efi_lto.o: $(ALL_OBJS)
-	$(LD_LTO) -r -o $@ $^
+prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/compat.o
+	$(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.o,$^)
 
 # Link it with all the binary objects
-prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o $(EFI_OBJS-y)
+prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o
+prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o efi/boot.init.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 else
-prelink.o: $(ALL_OBJS) $(EFI_OBJS-y)
+prelink.o: $(ALL_OBJS)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(ALL_OBJS)
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
+prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o
+	$(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^)
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
@@ -178,6 +171,12 @@ EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
 EFI_LDFLAGS += --major-os-version=2 --minor-os-version=0
 EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0
 
+# Check if the compiler supports the MS ABI.
+export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
+# Check if the linker supports PE.
+XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+
 $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
 $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
 
@@ -224,6 +223,9 @@ $(TARGET).efi: FORCE
 	echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) disabled'
 endif
 
+efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
+efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: ;
+
 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h
 	$(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $<
 
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 4b2b010a80..3e4c395b75 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -14,7 +14,6 @@ $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
 $(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
-obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ))
-obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ))
-extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o
+obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o
+extra-$(XEN_BUILD_EFI) += buildid.o
 nocov-$(XEN_BUILD_EFI) += stub.o
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Aug 12 09:33:11 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 12 Aug 2020 09:33:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k5n87-0007Al-Dt; Wed, 12 Aug 2020 09:33:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Rex4=BW=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k5n86-0007Ag-8p
 for xen-changelog@lists.xenproject.org; Wed, 12 Aug 2020 09:33:06 +0000
X-Inumbo-ID: 991830fd-dc86-4953-a76e-964cf03abd7e
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 991830fd-dc86-4953-a76e-964cf03abd7e;
 Wed, 12 Aug 2020 09:33:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From:Sender:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=//R371OBRYmeS0zrXkrJapuzST22pFXd8CVnU43XPjU=; b=dsDJ10OVKgR91D7fN2AsKxek52
 z1lj1lNvzLP3L/50BgFP3u6GF62XM8VJRstii8uVwvkIUDHCZykvQyW23dXcpVcLufp3lXtwfGscW
 PkPpfLIMgIR5OYtaluCaEQQXayrcgkjBIltsd5xNALDLk+DolVa+vxxD1K4IrbtjrxlU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k5n85-00015a-0y
 for xen-changelog@lists.xenproject.org; Wed, 12 Aug 2020 09:33:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k5n84-0005x8-VW
 for xen-changelog@lists.xenproject.org; Wed, 12 Aug 2020 09:33:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] Config.mk: update seabios to 1.14.0
Message-Id: <E1k5n84-0005x8-VW@xenbits.xenproject.org>
Date: Wed, 12 Aug 2020 09:33:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 47b0bf14c09ff6d365b5641e7a497bf83f82c8c0
Author:     Wei Liu <wl@xen.org>
AuthorDate: Wed Aug 12 09:21:39 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Wed Aug 12 09:26:29 2020 +0000

    Config.mk: update seabios to 1.14.0
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 Config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Config.mk b/Config.mk
index 7d556aed30..4093dcb9e3 100644
--- a/Config.mk
+++ b/Config.mk
@@ -248,7 +248,7 @@ OVMF_UPSTREAM_REVISION ?= 20d2e5a125e34fc8501026613a71549b2a1a3e54
 QEMU_UPSTREAM_REVISION ?= master
 MINIOS_UPSTREAM_REVISION ?= master
 
-SEABIOS_UPSTREAM_REVISION ?= rel-1.13.0
+SEABIOS_UPSTREAM_REVISION ?= rel-1.14.0
 
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 13 11:55:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 13 Aug 2020 11:55:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6Bp6-0001aV-TJ; Thu, 13 Aug 2020 11:55:08 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=0m43=BX=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6Bp4-0001aQ-SU
 for xen-changelog@lists.xenproject.org; Thu, 13 Aug 2020 11:55:06 +0000
X-Inumbo-ID: 39c62b41-a0c1-45f8-bdd4-9b69597aa631
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 39c62b41-a0c1-45f8-bdd4-9b69597aa631;
 Thu, 13 Aug 2020 11:55:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=PXSUoTq0NfxrhMNaSWmPohdslA4wuch98Jfz5yP/JUo=; b=lBtbOYZ1BvqBWUqKRtGynsyFow
 syfXriLuS7u4eQm8UlK8xBbwml1dA3X6IF/kQXnEw7TqcSUK2avYy2qg2qMp9dTNNIjGAs+m+hwiB
 GdjMosLvD6X+SuM1QOT3WcX5lfRNEXsCH+S3ImTm2IdkjmDzFkl4YTqrh5eG5qH5Sbuc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6Bp3-0008Bt-2k
 for xen-changelog@lists.xenproject.org; Thu, 13 Aug 2020 11:55:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6Bp2-0003Wi-Vt
 for xen-changelog@lists.xenproject.org; Thu, 13 Aug 2020 11:55:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/setup: Ignore early boot parameters like
 no-real-mode
Message-Id: <E1k6Bp2-0003Wi-Vt@xenbits.xenproject.org>
Date: Thu, 13 Aug 2020 11:55:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e44d986084760929e32bd4f5456677d370206d7f
Author:     Trammell Hudson <hudson@trmm.net>
AuthorDate: Wed Aug 12 17:42:48 2020 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Aug 13 12:42:24 2020 +0100

    x86/setup: Ignore early boot parameters like no-real-mode
    
    There are parameters in xen/arch/x86/boot/cmdline.c that
    are only used early in the boot process, so handlers are
    necessary to avoid an "Unknown command line option" in
    dmesg.
    
    This also updates ignore_param() to generate a temporary
    variable name so that the macro can be used more than once
    per file.
    
    Signed-off-by: Trammell hudson <hudson@trmm.net>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    [Leave note to stop TEMP_NAME() finding more general use]
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/setup.c    |  9 +++++++++
 xen/include/xen/param.h | 11 ++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index c9b6af826d..4b15e067fa 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -679,6 +679,15 @@ static void __init noreturn reinit_bsp_stack(void)
     reset_stack_and_jump_nolp(init_done);
 }
 
+/*
+ * x86 early command line parsing in xen/arch/x86/boot/cmdline.c
+ * has options that are only used during the very initial boot process,
+ * so they can be ignored now.
+ */
+ignore_param("no-real-mode");
+ignore_param("edd");
+ignore_param("edid");
+
 /*
  * Some scripts add "placeholder" to work around a grub error where it ate the
  * first parameter.
diff --git a/xen/include/xen/param.h b/xen/include/xen/param.h
index c2fd075dd0..f4be944248 100644
--- a/xen/include/xen/param.h
+++ b/xen/include/xen/param.h
@@ -35,6 +35,11 @@ extern const struct kernel_param __setup_start[], __setup_end[];
     __attribute__((__aligned__(1))) char
 #define __kparam          __param(__initsetup)
 
+/* Only for use with .init data, to avoid creating livepatch problems. */
+#define __TEMP_NAME(base, line) base ## _ ## line
+#define _TEMP_NAME(base, line) __TEMP_NAME(base, line)
+#define TEMP_NAME(base) _TEMP_NAME(base, __LINE__)
+
 #define custom_param(_name, _var) \
     __setup_str __setup_str_##_var[] = _name; \
     __kparam __setup_##_var = \
@@ -71,9 +76,9 @@ extern const struct kernel_param __setup_start[], __setup_end[];
           .len = sizeof(_var), \
           .par.var = &_var }
 #define ignore_param(_name)                 \
-    __setup_str setup_str_ign[] = _name;    \
-    __kparam setup_ign =                    \
-        { .name = setup_str_ign,            \
+    __setup_str TEMP_NAME(__setup_str_ign)[] = _name;    \
+    __kparam TEMP_NAME(__setup_ign) =                    \
+        { .name = TEMP_NAME(__setup_str_ign),            \
           .type = OPT_IGNORE }
 
 #ifdef CONFIG_HYPFS
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 13 11:55:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 13 Aug 2020 11:55:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6BpF-0001b6-Uz; Thu, 13 Aug 2020 11:55:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=0m43=BX=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6BpE-0001aw-5y
 for xen-changelog@lists.xenproject.org; Thu, 13 Aug 2020 11:55:16 +0000
X-Inumbo-ID: 5921cb2c-288e-4c70-991e-67ffe2bde9c4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5921cb2c-288e-4c70-991e-67ffe2bde9c4;
 Thu, 13 Aug 2020 11:55:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=3e6xCopfJIG4BkXUI3KBFBkoOYRM11mMLEaxkzctNVA=; b=bQzWLivAp+yD0pKl8bA3fWZH7Q
 7GD64gvU7DBrgf0NdAPNaTgb9ftjrUwWcZelD2/KDE4WG1tsauQhADjPkNZLULB6Ud4SZjFKy4sBG
 4Qm5SeZT6HGpykzQZB+/pYE3MH6hrerxkdTU0qrnWyXnYYXQNeIS9KlOLdvuswCaZz7M=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6BpD-0008By-6f
 for xen-changelog@lists.xenproject.org; Thu, 13 Aug 2020 11:55:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6BpD-0003XO-4v
 for xen-changelog@lists.xenproject.org; Thu, 13 Aug 2020 11:55:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/viridian: remove the viridian_vcpu msg_pending bit
 mask
Message-Id: <E1k6BpD-0003XO-4v@xenbits.xenproject.org>
Date: Thu, 13 Aug 2020 11:55:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 391a8b6d20b72c4f24f8511f78ef75a6119cbe22
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Thu Aug 13 11:35:53 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Aug 13 12:42:26 2020 +0100

    x86/viridian: remove the viridian_vcpu msg_pending bit mask
    
    The mask does not actually serve a useful purpose as we only use the SynIC
    for timer messages. Dropping the mask means that the EOM MSR handler
    essentially becomes a no-op. This means we can avoid setting 'message_pending'
    for timer messages and hence avoid a VMEXIT for the EOM.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 xen/arch/x86/hvm/viridian/synic.c  | 24 +-----------------------
 xen/arch/x86/hvm/vlapic.c          |  4 ----
 xen/include/asm-x86/hvm/viridian.h |  2 --
 3 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c
index 94a2b88733..22e2df27e5 100644
--- a/xen/arch/x86/hvm/viridian/synic.c
+++ b/xen/arch/x86/hvm/viridian/synic.c
@@ -137,7 +137,6 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         if ( !(viridian_feature_mask(d) & HVMPV_synic) )
             return X86EMUL_EXCEPTION;
 
-        vv->msg_pending = 0;
         break;
 
     case HV_X64_MSR_SINT0 ... HV_X64_MSR_SINT15:
@@ -168,9 +167,6 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         printk(XENLOG_G_INFO "%pv: VIRIDIAN SINT%u: vector: %x\n", v, sintx,
                vector);
 
-        if ( new.polling )
-            __clear_bit(sintx, &vv->msg_pending);
-
         *vs = new;
         break;
     }
@@ -334,9 +330,6 @@ bool viridian_synic_deliver_timer_msg(struct vcpu *v, unsigned int sintx,
         .DeliveryTime = delivery,
     };
 
-    if ( test_bit(sintx, &vv->msg_pending) )
-        return false;
-
     /*
      * To avoid using an atomic test-and-set, and barrier before calling
      * vlapic_set_irq(), this function must be called in context of the
@@ -346,12 +339,9 @@ bool viridian_synic_deliver_timer_msg(struct vcpu *v, unsigned int sintx,
 
     msg += sintx;
 
+    /* There is no need to set message_pending as we do not require an EOM */
     if ( msg->header.message_type != HVMSG_NONE )
-    {
-        msg->header.message_flags.msg_pending = 1;
-        __set_bit(sintx, &vv->msg_pending);
         return false;
-    }
 
     msg->header.message_type = HVMSG_TIMER_EXPIRED;
     msg->header.message_flags.msg_pending = 0;
@@ -380,18 +370,6 @@ bool viridian_synic_is_auto_eoi_sint(const struct vcpu *v,
     return vs->auto_eoi;
 }
 
-void viridian_synic_ack_sint(const struct vcpu *v, unsigned int vector)
-{
-    struct viridian_vcpu *vv = v->arch.hvm.viridian;
-    unsigned int sintx = vv->vector_to_sintx[vector];
-
-    ASSERT(v == current);
-
-    if ( sintx < ARRAY_SIZE(vv->sint) )
-        __clear_bit(array_index_nospec(sintx, ARRAY_SIZE(vv->sint)),
-                    &vv->msg_pending);
-}
-
 void viridian_synic_save_vcpu_ctxt(const struct vcpu *v,
                                    struct hvm_viridian_vcpu_context *ctxt)
 {
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index 7b5c633033..4e3861eb7d 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -462,12 +462,8 @@ void vlapic_handle_EOI(struct vlapic *vlapic, u8 vector)
     struct vcpu *v = vlapic_vcpu(vlapic);
     struct domain *d = v->domain;
 
-    /* All synic SINTx vectors are edge triggered */
-
     if ( vlapic_test_vector(vector, &vlapic->regs->data[APIC_TMR]) )
         vioapic_update_EOI(d, vector);
-    else if ( has_viridian_synic(d) )
-        viridian_synic_ack_sint(v, vector);
 
     hvm_dpci_msi_eoi(d, vector);
 }
diff --git a/xen/include/asm-x86/hvm/viridian.h b/xen/include/asm-x86/hvm/viridian.h
index 844e56b38f..cbf77d9c76 100644
--- a/xen/include/asm-x86/hvm/viridian.h
+++ b/xen/include/asm-x86/hvm/viridian.h
@@ -31,7 +31,6 @@ struct viridian_vcpu
     struct viridian_page vp_assist;
     bool apic_assist_pending;
     bool polled;
-    unsigned int msg_pending;
     uint64_t scontrol;
     uint64_t siefp;
     struct viridian_page simp;
@@ -89,7 +88,6 @@ void viridian_apic_assist_clear(const struct vcpu *v);
 void viridian_synic_poll(struct vcpu *v);
 bool viridian_synic_is_auto_eoi_sint(const struct vcpu *v,
                                      unsigned int vector);
-void viridian_synic_ack_sint(const struct vcpu *v, unsigned int vector);
 
 #endif /* __ASM_X86_HVM_VIRIDIAN_H__ */
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 15:44:08 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 15:44:08 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6bsB-0001OA-Om; Fri, 14 Aug 2020 15:44:03 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6bsB-0001O5-57
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:03 +0000
X-Inumbo-ID: c002c183-e0c9-4802-bc68-bded9a4c9a78
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id c002c183-e0c9-4802-bc68-bded9a4c9a78;
 Fri, 14 Aug 2020 15:44:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=V2hhv3SKyLxSXloANFZR0xM2D+edUYt14LLbQtj2IAI=; b=pHYbnx3iAle/jsxxRlNsi2iLq9
 gO7Gn2D28i/GwP/OikWupU3kZhObuSDH4MRklePAEySYUEUtgktRfmieiLzJ3xNAP4m3evzhQDuZm
 l4LyMXTRCPzUrkCvV9WB+QadL/L8OEfJ7LfAuVh4cpXyAADjPiJ3O81QMAyqEtUNPAHM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6bsA-0008Ni-3j
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6bsA-0005je-2m
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] Config.mk: update seabios to 1.14.0
Message-Id: <E1k6bsA-0005je-2m@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 15:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 47b0bf14c09ff6d365b5641e7a497bf83f82c8c0
Author:     Wei Liu <wl@xen.org>
AuthorDate: Wed Aug 12 09:21:39 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Wed Aug 12 09:26:29 2020 +0000

    Config.mk: update seabios to 1.14.0
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 Config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Config.mk b/Config.mk
index 7d556aed30..4093dcb9e3 100644
--- a/Config.mk
+++ b/Config.mk
@@ -248,7 +248,7 @@ OVMF_UPSTREAM_REVISION ?= 20d2e5a125e34fc8501026613a71549b2a1a3e54
 QEMU_UPSTREAM_REVISION ?= master
 MINIOS_UPSTREAM_REVISION ?= master
 
-SEABIOS_UPSTREAM_REVISION ?= rel-1.13.0
+SEABIOS_UPSTREAM_REVISION ?= rel-1.14.0
 
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 15:44:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 15:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6bsL-0001P7-QK; Fri, 14 Aug 2020 15:44:13 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6bsL-0001Oz-4u
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:13 +0000
X-Inumbo-ID: a9d0af51-58b4-43c2-9f4b-f5f3232c39be
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id a9d0af51-58b4-43c2-9f4b-f5f3232c39be;
 Fri, 14 Aug 2020 15:44:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=3BvxSCdfCOJuo+h04DdQZm20PIqDQEHJGvLpGMj/tEc=; b=KCbhZYU7I6L+dXm9w+wnyzcGm0
 zVt6E1k0SpSyVZ6z5VibalTegkFtEW/RMahbUR6b/VLx+2unEjce+oRFucsUFDfZEM80/y5/tepJg
 PMdfMtCoLYUqUCiynjMDqU390/eEiPvLKUSkcXrAJRXR9KjPXX81qoAUI8EYOQ5cVwh4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6bsK-0008No-7F
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6bsK-0005kX-63
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/setup: Ignore early boot parameters like no-real-mode
Message-Id: <E1k6bsK-0005kX-63@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 15:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e44d986084760929e32bd4f5456677d370206d7f
Author:     Trammell Hudson <hudson@trmm.net>
AuthorDate: Wed Aug 12 17:42:48 2020 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Aug 13 12:42:24 2020 +0100

    x86/setup: Ignore early boot parameters like no-real-mode
    
    There are parameters in xen/arch/x86/boot/cmdline.c that
    are only used early in the boot process, so handlers are
    necessary to avoid an "Unknown command line option" in
    dmesg.
    
    This also updates ignore_param() to generate a temporary
    variable name so that the macro can be used more than once
    per file.
    
    Signed-off-by: Trammell hudson <hudson@trmm.net>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    [Leave note to stop TEMP_NAME() finding more general use]
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/setup.c    |  9 +++++++++
 xen/include/xen/param.h | 11 ++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index c9b6af826d..4b15e067fa 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -679,6 +679,15 @@ static void __init noreturn reinit_bsp_stack(void)
     reset_stack_and_jump_nolp(init_done);
 }
 
+/*
+ * x86 early command line parsing in xen/arch/x86/boot/cmdline.c
+ * has options that are only used during the very initial boot process,
+ * so they can be ignored now.
+ */
+ignore_param("no-real-mode");
+ignore_param("edd");
+ignore_param("edid");
+
 /*
  * Some scripts add "placeholder" to work around a grub error where it ate the
  * first parameter.
diff --git a/xen/include/xen/param.h b/xen/include/xen/param.h
index c2fd075dd0..f4be944248 100644
--- a/xen/include/xen/param.h
+++ b/xen/include/xen/param.h
@@ -35,6 +35,11 @@ extern const struct kernel_param __setup_start[], __setup_end[];
     __attribute__((__aligned__(1))) char
 #define __kparam          __param(__initsetup)
 
+/* Only for use with .init data, to avoid creating livepatch problems. */
+#define __TEMP_NAME(base, line) base ## _ ## line
+#define _TEMP_NAME(base, line) __TEMP_NAME(base, line)
+#define TEMP_NAME(base) _TEMP_NAME(base, __LINE__)
+
 #define custom_param(_name, _var) \
     __setup_str __setup_str_##_var[] = _name; \
     __kparam __setup_##_var = \
@@ -71,9 +76,9 @@ extern const struct kernel_param __setup_start[], __setup_end[];
           .len = sizeof(_var), \
           .par.var = &_var }
 #define ignore_param(_name)                 \
-    __setup_str setup_str_ign[] = _name;    \
-    __kparam setup_ign =                    \
-        { .name = setup_str_ign,            \
+    __setup_str TEMP_NAME(__setup_str_ign)[] = _name;    \
+    __kparam TEMP_NAME(__setup_ign) =                    \
+        { .name = TEMP_NAME(__setup_str_ign),            \
           .type = OPT_IGNORE }
 
 #ifdef CONFIG_HYPFS
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 15:44:24 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 15:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6bsW-0001QR-S4; Fri, 14 Aug 2020 15:44:24 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6bsV-0001QE-IM
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:23 +0000
X-Inumbo-ID: 3acd2a6f-5655-4283-b36f-fa15cdab4a4a
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3acd2a6f-5655-4283-b36f-fa15cdab4a4a;
 Fri, 14 Aug 2020 15:44:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=SokDVLiEqCIg/IMbq5Pr7bQxTDam9EOw8hVbZ62Kv2A=; b=37cXfeVknb/MaphyxLHiFil3qM
 CsOttieAiQslRwKogCD5nw/eTuKGcRSY7e8QXX+gERbnX7tTqs/AUcxgwYzP0nhYnuOaa+/TFjzdh
 EzaEyuMDHn0np1z0+1zvhuIpclOHXu1K8b/5J8lgdnvVdGCcKApFrdiaGd7z3wHKEMIM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6bsU-0008OS-CH
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6bsU-0005l1-9Q
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 15:44:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/viridian: remove the viridian_vcpu msg_pending bit
 mask
Message-Id: <E1k6bsU-0005l1-9Q@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 15:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 391a8b6d20b72c4f24f8511f78ef75a6119cbe22
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Thu Aug 13 11:35:53 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Aug 13 12:42:26 2020 +0100

    x86/viridian: remove the viridian_vcpu msg_pending bit mask
    
    The mask does not actually serve a useful purpose as we only use the SynIC
    for timer messages. Dropping the mask means that the EOM MSR handler
    essentially becomes a no-op. This means we can avoid setting 'message_pending'
    for timer messages and hence avoid a VMEXIT for the EOM.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 xen/arch/x86/hvm/viridian/synic.c  | 24 +-----------------------
 xen/arch/x86/hvm/vlapic.c          |  4 ----
 xen/include/asm-x86/hvm/viridian.h |  2 --
 3 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c
index 94a2b88733..22e2df27e5 100644
--- a/xen/arch/x86/hvm/viridian/synic.c
+++ b/xen/arch/x86/hvm/viridian/synic.c
@@ -137,7 +137,6 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         if ( !(viridian_feature_mask(d) & HVMPV_synic) )
             return X86EMUL_EXCEPTION;
 
-        vv->msg_pending = 0;
         break;
 
     case HV_X64_MSR_SINT0 ... HV_X64_MSR_SINT15:
@@ -168,9 +167,6 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         printk(XENLOG_G_INFO "%pv: VIRIDIAN SINT%u: vector: %x\n", v, sintx,
                vector);
 
-        if ( new.polling )
-            __clear_bit(sintx, &vv->msg_pending);
-
         *vs = new;
         break;
     }
@@ -334,9 +330,6 @@ bool viridian_synic_deliver_timer_msg(struct vcpu *v, unsigned int sintx,
         .DeliveryTime = delivery,
     };
 
-    if ( test_bit(sintx, &vv->msg_pending) )
-        return false;
-
     /*
      * To avoid using an atomic test-and-set, and barrier before calling
      * vlapic_set_irq(), this function must be called in context of the
@@ -346,12 +339,9 @@ bool viridian_synic_deliver_timer_msg(struct vcpu *v, unsigned int sintx,
 
     msg += sintx;
 
+    /* There is no need to set message_pending as we do not require an EOM */
     if ( msg->header.message_type != HVMSG_NONE )
-    {
-        msg->header.message_flags.msg_pending = 1;
-        __set_bit(sintx, &vv->msg_pending);
         return false;
-    }
 
     msg->header.message_type = HVMSG_TIMER_EXPIRED;
     msg->header.message_flags.msg_pending = 0;
@@ -380,18 +370,6 @@ bool viridian_synic_is_auto_eoi_sint(const struct vcpu *v,
     return vs->auto_eoi;
 }
 
-void viridian_synic_ack_sint(const struct vcpu *v, unsigned int vector)
-{
-    struct viridian_vcpu *vv = v->arch.hvm.viridian;
-    unsigned int sintx = vv->vector_to_sintx[vector];
-
-    ASSERT(v == current);
-
-    if ( sintx < ARRAY_SIZE(vv->sint) )
-        __clear_bit(array_index_nospec(sintx, ARRAY_SIZE(vv->sint)),
-                    &vv->msg_pending);
-}
-
 void viridian_synic_save_vcpu_ctxt(const struct vcpu *v,
                                    struct hvm_viridian_vcpu_context *ctxt)
 {
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index 7b5c633033..4e3861eb7d 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -462,12 +462,8 @@ void vlapic_handle_EOI(struct vlapic *vlapic, u8 vector)
     struct vcpu *v = vlapic_vcpu(vlapic);
     struct domain *d = v->domain;
 
-    /* All synic SINTx vectors are edge triggered */
-
     if ( vlapic_test_vector(vector, &vlapic->regs->data[APIC_TMR]) )
         vioapic_update_EOI(d, vector);
-    else if ( has_viridian_synic(d) )
-        viridian_synic_ack_sint(v, vector);
 
     hvm_dpci_msi_eoi(d, vector);
 }
diff --git a/xen/include/asm-x86/hvm/viridian.h b/xen/include/asm-x86/hvm/viridian.h
index 844e56b38f..cbf77d9c76 100644
--- a/xen/include/asm-x86/hvm/viridian.h
+++ b/xen/include/asm-x86/hvm/viridian.h
@@ -31,7 +31,6 @@ struct viridian_vcpu
     struct viridian_page vp_assist;
     bool apic_assist_pending;
     bool polled;
-    unsigned int msg_pending;
     uint64_t scontrol;
     uint64_t siefp;
     struct viridian_page simp;
@@ -89,7 +88,6 @@ void viridian_apic_assist_clear(const struct vcpu *v);
 void viridian_synic_poll(struct vcpu *v);
 bool viridian_synic_is_auto_eoi_sint(const struct vcpu *v,
                                      unsigned int vector);
-void viridian_synic_ack_sint(const struct vcpu *v, unsigned int vector);
 
 #endif /* __ASM_X86_HVM_VIRIDIAN_H__ */
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 16:22:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 16:22:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6cT1-0005Bw-L2; Fri, 14 Aug 2020 16:22:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6cT0-0005Br-Fv
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:06 +0000
X-Inumbo-ID: 5b6a04b4-efe2-497b-901e-ab743aa39db3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 5b6a04b4-efe2-497b-901e-ab743aa39db3;
 Fri, 14 Aug 2020 16:22:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=N6dYwQ4SoLEuv+24f1MJf6F7ETvi4PMTVNWb7lh4J3M=; b=OZNn878Z0pjmdpi1E59DuFzJVH
 CnBrNRM5IRnmJk6z0GAWb/Hcix6yTcFFEunvI/xXHDaLgyHZCIFP/wYLx1I6kOlZbseBpZEvXo7Pc
 0fIbpVn+L/6iZZ6MsykWweVAu3ywDWY40u8X/xs7soPh+Xck9ttbff10rtcBXS5TlyeI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cSy-0001Ej-PM
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cSy-0008Rb-Ni
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/xenstore: Do not abort xenstore-ls if a node
 disappears while iterating
Message-Id: <E1k6cSy-0008Rb-Ni@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 16:22:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit beb105af19cc3e58e2ed49224cfe190a736e5fa0
Author:     David Woodhouse <dwmw@amazon.co.uk>
AuthorDate: Thu Mar 19 20:40:24 2020 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    tools/xenstore: Do not abort xenstore-ls if a node disappears while iterating
    
    The do_ls() function has somewhat inconsistent handling of errors.
    
    If reading the node's contents with xs_read() fails, then do_ls() will
    just quietly not display the contents.
    
    If reading the node's permissions with xs_get_permissions() fails, then
    do_ls() will print a warning, continue, and ultimately won't exit with
    an error code (unless another error happens).
    
    If recursing into the node with xs_directory() fails, then do_ls() will
    abort immediately, not printing any further nodes.
    
    For persistent failure modes — such as ENOENT because a node has been
    removed, or EACCES because it has had its permisions changed since the
    xs_directory() on the parent directory returned its name — it's
    obviously quite likely that if either of the first two errors occur for
    a given node, then so will the third and thus xenstore-ls will abort.
    
    The ENOENT one is actually a fairly common case, and has caused tools to
    fail to clean up a network device because it *apparently* already
    doesn't exist in xenstore.
    
    There is a school of thought that says, "Well, xenstore-ls returned an
    error. So the tools should not trust its output."
    
    The natural corollary of this would surely be that the tools must re-run
    xenstore-ls as many times as is necessary until its manages to exit
    without hitting the race condition. I am not keen on that conclusion.
    
    For the specific case of ENOENT it seems reasonable to declare that,
    but for the timing, we might as well just not have seen that node at
    all when calling xs_directory() for the parent. By ignoring the error,
    we give acceptable output.
    
    The issue can be reproduced as follows:
    
    (dom0) # for a in `seq 1 1000` ; do
                  xenstore-write /local/domain/2/foo/$a $a ;
             done
    
    Now simultaneously:
    
    (dom0) # for a in `seq 1 999` ; do
                  xenstore-rm /local/domain/2/foo/$a ;
             done
    (dom2) # while true ; do
                  ./xenstore-ls -p /local/domain/2/foo | grep -c 1000 ;
             done
    
    We should expect to see node 1000 in the output, every time.
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/xenstore/xenstore_client.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c
index 3afc630ab8..ae7ed3eb9e 100644
--- a/tools/xenstore/xenstore_client.c
+++ b/tools/xenstore/xenstore_client.c
@@ -148,14 +148,20 @@ static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms
     int i;
     unsigned int num, len;
 
+    e = xs_directory(h, XBT_NULL, path, &num);
+    if (e == NULL) {
+        if (cur_depth && errno == ENOENT) {
+            /* If a node disappears while recursing, silently move on. */
+            return;
+        }
+
+        err(1, "xs_directory (%s)", path);
+    }
+
     newpath = malloc(STRING_MAX);
     if (!newpath)
       err(1, "malloc in do_ls");
 
-    e = xs_directory(h, XBT_NULL, path, &num);
-    if (e == NULL)
-        err(1, "xs_directory (%s)", path);
-
     for (i = 0; i<num; i++) {
         char buf[MAX_STRLEN(unsigned int)+1];
         struct xs_permissions *perms;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 16:22:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 16:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6cTA-0005CQ-Ml; Fri, 14 Aug 2020 16:22:16 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6cT9-0005CJ-V8
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:15 +0000
X-Inumbo-ID: 3f3731c2-c484-43a8-ab02-e224edf93c89
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 3f3731c2-c484-43a8-ab02-e224edf93c89;
 Fri, 14 Aug 2020 16:22:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=gUH6VQtfB+49DafTr8aFGwAFl0HQKd8uGbCQixa4iV4=; b=04J87nVkYjwUEgLcO+m0bPGI6N
 k06c0B0qWmZkU9Ici9vdctCv6bP1PmRl+aWYwZwyYPm1jB+2ekgCDU+6XntU+dDgKRgOArzr668Dp
 8a8QiNjLoXbbumzWJ4oX1tmHdblJ4K3axGmE97IYoayxGhnfpDmI1ptEUMhCIRTvKWpc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cT8-0001Em-SV
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cT8-0008SB-Rb
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/vmx: reorder code in vmx_deliver_posted_intr
Message-Id: <E1k6cT8-0008SB-Rb@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 16:22:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9ce2befd953274c9f919fdf55bb13516876148aa
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Thu Jul 30 16:03:09 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/vmx: reorder code in vmx_deliver_posted_intr
    
    Remove the unneeded else branch, which allows to reduce the
    indentation of a larger block of code, while making the flow of the
    function more obvious.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c | 55 ++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 29 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index eb54aadfba..86799c24ba 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2003,6 +2003,8 @@ static void __vmx_deliver_posted_interrupt(struct vcpu *v)
 
 static void vmx_deliver_posted_intr(struct vcpu *v, u8 vector)
 {
+    struct pi_desc old, new, prev;
+
     if ( pi_test_and_set_pir(vector, &v->arch.hvm.vmx.pi_desc) )
         return;
 
@@ -2014,41 +2016,36 @@ static void vmx_deliver_posted_intr(struct vcpu *v, u8 vector)
          * VMEntry as it used to be.
          */
         pi_set_on(&v->arch.hvm.vmx.pi_desc);
+        vcpu_kick(v);
+        return;
     }
-    else
-    {
-        struct pi_desc old, new, prev;
 
-        prev.control = v->arch.hvm.vmx.pi_desc.control;
+    prev.control = v->arch.hvm.vmx.pi_desc.control;
 
-        do {
-            /*
-             * Currently, we don't support urgent interrupt, all
-             * interrupts are recognized as non-urgent interrupt,
-             * Besides that, if 'ON' is already set, no need to
-             * sent posted-interrupts notification event as well,
-             * according to hardware behavior.
-             */
-            if ( pi_test_sn(&prev) || pi_test_on(&prev) )
-            {
-                vcpu_kick(v);
-                return;
-            }
-
-            old.control = v->arch.hvm.vmx.pi_desc.control &
-                          ~((1 << POSTED_INTR_ON) | (1 << POSTED_INTR_SN));
-            new.control = v->arch.hvm.vmx.pi_desc.control |
-                          (1 << POSTED_INTR_ON);
+    do {
+        /*
+         * Currently, we don't support urgent interrupt, all
+         * interrupts are recognized as non-urgent interrupt,
+         * Besides that, if 'ON' is already set, no need to
+         * send posted-interrupts notification event as well,
+         * according to hardware behavior.
+         */
+        if ( pi_test_sn(&prev) || pi_test_on(&prev) )
+        {
+            vcpu_kick(v);
+            return;
+        }
 
-            prev.control = cmpxchg(&v->arch.hvm.vmx.pi_desc.control,
-                                   old.control, new.control);
-        } while ( prev.control != old.control );
+        old.control = v->arch.hvm.vmx.pi_desc.control &
+                      ~((1 << POSTED_INTR_ON) | (1 << POSTED_INTR_SN));
+        new.control = v->arch.hvm.vmx.pi_desc.control |
+                      (1 << POSTED_INTR_ON);
 
-        __vmx_deliver_posted_interrupt(v);
-        return;
-    }
+        prev.control = cmpxchg(&v->arch.hvm.vmx.pi_desc.control,
+                               old.control, new.control);
+    } while ( prev.control != old.control );
 
-    vcpu_kick(v);
+    __vmx_deliver_posted_interrupt(v);
 }
 
 static void vmx_sync_pir_to_irr(struct vcpu *v)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 16:22:28 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 16:22:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6cTM-0005Dg-OT; Fri, 14 Aug 2020 16:22:28 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6cTL-0005DQ-Gm
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:27 +0000
X-Inumbo-ID: 8d9732fd-c825-489e-818a-9c5a017d7222
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 8d9732fd-c825-489e-818a-9c5a017d7222;
 Fri, 14 Aug 2020 16:22:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=+vKyJ/lqpFAsJh0Tq1gOSHWmvn0mCV1HaddsDO/wHpg=; b=dijp35DRbDKRfXe9VW0M6IYyMj
 zVgW6Hv3TT3zq/2jYLb313IDvANFcE0uadUYtkUnLHjaXRF3wFflCm3BrNY7QoDSmIBcctLLhF64s
 38OpMhSHiKcSE96VENzbcdz9YTHamV92wqhgAYK7YmXZcGCnO03l9XwNkl4J0ngporoI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTI-0001FW-W2
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTI-0008Sq-V3
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:24 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/iommu: re-arrange arch_iommu to separate common
 fields...
Message-Id: <E1k6cTI-0008Sq-V3@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 16:22:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e0f25d134c85f4ee0e7c1602fa8016e50937e468
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 4 14:41:56 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/iommu: re-arrange arch_iommu to separate common fields...
    
    ... from those specific to VT-d or AMD IOMMU, and put the latter in a union.
    
    There is no functional change in this patch, although the initialization of
    the 'mapped_rmrrs' list occurs slightly later in iommu_domain_init() since
    it is now done (correctly) in VT-d specific code rather than in general x86
    code.
    
    NOTE: I have not combined the AMD IOMMU 'root_table' and VT-d 'pgd_maddr'
          fields even though they perform essentially the same function. The
          concept of 'root table' in the VT-d code is different from that in the
          AMD code so attempting to use a common name will probably only serve
          to confuse the reader.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/tboot.c                        |  4 +--
 xen/drivers/passthrough/amd/iommu_guest.c   |  8 ++---
 xen/drivers/passthrough/amd/iommu_map.c     | 14 ++++----
 xen/drivers/passthrough/amd/pci_amd_iommu.c | 35 ++++++++++---------
 xen/drivers/passthrough/vtd/iommu.c         | 53 ++++++++++++++++-------------
 xen/drivers/passthrough/x86/iommu.c         |  1 -
 xen/include/asm-x86/iommu.h                 | 27 +++++++++------
 7 files changed, 78 insertions(+), 64 deletions(-)

diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index 320e06f129..e66b0940c4 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -230,8 +230,8 @@ static void tboot_gen_domain_integrity(const uint8_t key[TB_KEY_SIZE],
         {
             const struct domain_iommu *dio = dom_iommu(d);
 
-            update_iommu_mac(&ctx, dio->arch.pgd_maddr,
-                             agaw_to_level(dio->arch.agaw));
+            update_iommu_mac(&ctx, dio->arch.vtd.pgd_maddr,
+                             agaw_to_level(dio->arch.vtd.agaw));
         }
     }
 
diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c
index 014a72a54b..30b7353cd6 100644
--- a/xen/drivers/passthrough/amd/iommu_guest.c
+++ b/xen/drivers/passthrough/amd/iommu_guest.c
@@ -50,12 +50,12 @@ static uint16_t guest_bdf(struct domain *d, uint16_t machine_bdf)
 
 static inline struct guest_iommu *domain_iommu(struct domain *d)
 {
-    return dom_iommu(d)->arch.g_iommu;
+    return dom_iommu(d)->arch.amd.g_iommu;
 }
 
 static inline struct guest_iommu *vcpu_iommu(struct vcpu *v)
 {
-    return dom_iommu(v->domain)->arch.g_iommu;
+    return dom_iommu(v->domain)->arch.amd.g_iommu;
 }
 
 static void guest_iommu_enable(struct guest_iommu *iommu)
@@ -823,7 +823,7 @@ int guest_iommu_init(struct domain* d)
     guest_iommu_reg_init(iommu);
     iommu->mmio_base = ~0ULL;
     iommu->domain = d;
-    hd->arch.g_iommu = iommu;
+    hd->arch.amd.g_iommu = iommu;
 
     tasklet_init(&iommu->cmd_buffer_tasklet, guest_iommu_process_command, d);
 
@@ -845,5 +845,5 @@ void guest_iommu_destroy(struct domain *d)
     tasklet_kill(&iommu->cmd_buffer_tasklet);
     xfree(iommu);
 
-    dom_iommu(d)->arch.g_iommu = NULL;
+    dom_iommu(d)->arch.amd.g_iommu = NULL;
 }
diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c
index 93e96cd69c..47b4472e8a 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -180,8 +180,8 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn,
     struct page_info *table;
     const struct domain_iommu *hd = dom_iommu(d);
 
-    table = hd->arch.root_table;
-    level = hd->arch.paging_mode;
+    table = hd->arch.amd.root_table;
+    level = hd->arch.amd.paging_mode;
 
     BUG_ON( table == NULL || level < 1 || level > 6 );
 
@@ -325,7 +325,7 @@ int amd_iommu_unmap_page(struct domain *d, dfn_t dfn,
 
     spin_lock(&hd->arch.mapping_lock);
 
-    if ( !hd->arch.root_table )
+    if ( !hd->arch.amd.root_table )
     {
         spin_unlock(&hd->arch.mapping_lock);
         return 0;
@@ -450,7 +450,7 @@ int __init amd_iommu_quarantine_init(struct domain *d)
     unsigned int level = amd_iommu_get_paging_mode(end_gfn);
     struct amd_iommu_pte *table;
 
-    if ( hd->arch.root_table )
+    if ( hd->arch.amd.root_table )
     {
         ASSERT_UNREACHABLE();
         return 0;
@@ -458,11 +458,11 @@ int __init amd_iommu_quarantine_init(struct domain *d)
 
     spin_lock(&hd->arch.mapping_lock);
 
-    hd->arch.root_table = alloc_amd_iommu_pgtable();
-    if ( !hd->arch.root_table )
+    hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+    if ( !hd->arch.amd.root_table )
         goto out;
 
-    table = __map_domain_page(hd->arch.root_table);
+    table = __map_domain_page(hd->arch.amd.root_table);
     while ( level )
     {
         struct page_info *pg;
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 5f5f4a2eac..09a05f9d75 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -91,7 +91,8 @@ static void amd_iommu_setup_domain_device(
     u8 bus = pdev->bus;
     const struct domain_iommu *hd = dom_iommu(domain);
 
-    BUG_ON( !hd->arch.root_table || !hd->arch.paging_mode ||
+    BUG_ON( !hd->arch.amd.root_table ||
+            !hd->arch.amd.paging_mode ||
             !iommu->dev_table.buffer );
 
     if ( iommu_hwdom_passthrough && is_hardware_domain(domain) )
@@ -110,8 +111,8 @@ static void amd_iommu_setup_domain_device(
 
         /* bind DTE to domain page-tables */
         amd_iommu_set_root_page_table(
-            dte, page_to_maddr(hd->arch.root_table), domain->domain_id,
-            hd->arch.paging_mode, valid);
+            dte, page_to_maddr(hd->arch.amd.root_table),
+            domain->domain_id, hd->arch.amd.paging_mode, valid);
 
         /* Undo what amd_iommu_disable_domain_device() may have done. */
         ivrs_dev = &get_ivrs_mappings(iommu->seg)[req_id];
@@ -131,8 +132,8 @@ static void amd_iommu_setup_domain_device(
                         "root table = %#"PRIx64", "
                         "domain = %d, paging mode = %d\n",
                         req_id, pdev->type,
-                        page_to_maddr(hd->arch.root_table),
-                        domain->domain_id, hd->arch.paging_mode);
+                        page_to_maddr(hd->arch.amd.root_table),
+                        domain->domain_id, hd->arch.amd.paging_mode);
     }
 
     spin_unlock_irqrestore(&iommu->lock, flags);
@@ -206,10 +207,10 @@ static int iov_enable_xt(void)
 
 int amd_iommu_alloc_root(struct domain_iommu *hd)
 {
-    if ( unlikely(!hd->arch.root_table) )
+    if ( unlikely(!hd->arch.amd.root_table) )
     {
-        hd->arch.root_table = alloc_amd_iommu_pgtable();
-        if ( !hd->arch.root_table )
+        hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+        if ( !hd->arch.amd.root_table )
             return -ENOMEM;
     }
 
@@ -239,7 +240,7 @@ static int amd_iommu_domain_init(struct domain *d)
      *   physical address space we give it, but this isn't known yet so use 4
      *   unilaterally.
      */
-    hd->arch.paging_mode = amd_iommu_get_paging_mode(
+    hd->arch.amd.paging_mode = amd_iommu_get_paging_mode(
         is_hvm_domain(d)
         ? 1ul << (DEFAULT_DOMAIN_ADDRESS_WIDTH - PAGE_SHIFT)
         : get_upper_mfn_bound() + 1);
@@ -305,7 +306,7 @@ static void amd_iommu_disable_domain_device(const struct domain *domain,
         AMD_IOMMU_DEBUG("Disable: device id = %#x, "
                         "domain = %d, paging mode = %d\n",
                         req_id,  domain->domain_id,
-                        dom_iommu(domain)->arch.paging_mode);
+                        dom_iommu(domain)->arch.amd.paging_mode);
     }
     spin_unlock_irqrestore(&iommu->lock, flags);
 
@@ -420,10 +421,11 @@ static void deallocate_iommu_page_tables(struct domain *d)
     struct domain_iommu *hd = dom_iommu(d);
 
     spin_lock(&hd->arch.mapping_lock);
-    if ( hd->arch.root_table )
+    if ( hd->arch.amd.root_table )
     {
-        deallocate_next_page_table(hd->arch.root_table, hd->arch.paging_mode);
-        hd->arch.root_table = NULL;
+        deallocate_next_page_table(hd->arch.amd.root_table,
+                                   hd->arch.amd.paging_mode);
+        hd->arch.amd.root_table = NULL;
     }
     spin_unlock(&hd->arch.mapping_lock);
 }
@@ -598,11 +600,12 @@ static void amd_dump_p2m_table(struct domain *d)
 {
     const struct domain_iommu *hd = dom_iommu(d);
 
-    if ( !hd->arch.root_table )
+    if ( !hd->arch.amd.root_table )
         return;
 
-    printk("p2m table has %d levels\n", hd->arch.paging_mode);
-    amd_dump_p2m_table_level(hd->arch.root_table, hd->arch.paging_mode, 0, 0);
+    printk("p2m table has %u levels\n", hd->arch.amd.paging_mode);
+    amd_dump_p2m_table_level(hd->arch.amd.root_table,
+                             hd->arch.amd.paging_mode, 0, 0);
 }
 
 static const struct iommu_ops __initconstrel _iommu_ops = {
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index deaeab095d..94e0455a4d 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -257,20 +257,20 @@ static u64 bus_to_context_maddr(struct vtd_iommu *iommu, u8 bus)
 static u64 addr_to_dma_page_maddr(struct domain *domain, u64 addr, int alloc)
 {
     struct domain_iommu *hd = dom_iommu(domain);
-    int addr_width = agaw_to_width(hd->arch.agaw);
+    int addr_width = agaw_to_width(hd->arch.vtd.agaw);
     struct dma_pte *parent, *pte = NULL;
-    int level = agaw_to_level(hd->arch.agaw);
+    int level = agaw_to_level(hd->arch.vtd.agaw);
     int offset;
     u64 pte_maddr = 0;
 
     addr &= (((u64)1) << addr_width) - 1;
     ASSERT(spin_is_locked(&hd->arch.mapping_lock));
-    if ( !hd->arch.pgd_maddr &&
+    if ( !hd->arch.vtd.pgd_maddr &&
          (!alloc ||
-          ((hd->arch.pgd_maddr = alloc_pgtable_maddr(1, hd->node)) == 0)) )
+          ((hd->arch.vtd.pgd_maddr = alloc_pgtable_maddr(1, hd->node)) == 0)) )
         goto out;
 
-    parent = (struct dma_pte *)map_vtd_domain_page(hd->arch.pgd_maddr);
+    parent = (struct dma_pte *)map_vtd_domain_page(hd->arch.vtd.pgd_maddr);
     while ( level > 1 )
     {
         offset = address_level_offset(addr, level);
@@ -593,7 +593,7 @@ static int __must_check iommu_flush_iotlb(struct domain *d, dfn_t dfn,
     {
         iommu = drhd->iommu;
 
-        if ( !test_bit(iommu->index, &hd->arch.iommu_bitmap) )
+        if ( !test_bit(iommu->index, &hd->arch.vtd.iommu_bitmap) )
             continue;
 
         flush_dev_iotlb = !!find_ats_dev_drhd(iommu);
@@ -1278,7 +1278,10 @@ void __init iommu_free(struct acpi_drhd_unit *drhd)
 
 static int intel_iommu_domain_init(struct domain *d)
 {
-    dom_iommu(d)->arch.agaw = width_to_agaw(DEFAULT_DOMAIN_ADDRESS_WIDTH);
+    struct domain_iommu *hd = dom_iommu(d);
+
+    hd->arch.vtd.agaw = width_to_agaw(DEFAULT_DOMAIN_ADDRESS_WIDTH);
+    INIT_LIST_HEAD(&hd->arch.vtd.mapped_rmrrs);
 
     return 0;
 }
@@ -1375,10 +1378,10 @@ int domain_context_mapping_one(
         spin_lock(&hd->arch.mapping_lock);
 
         /* Ensure we have pagetables allocated down to leaf PTE. */
-        if ( hd->arch.pgd_maddr == 0 )
+        if ( hd->arch.vtd.pgd_maddr == 0 )
         {
             addr_to_dma_page_maddr(domain, 0, 1);
-            if ( hd->arch.pgd_maddr == 0 )
+            if ( hd->arch.vtd.pgd_maddr == 0 )
             {
             nomem:
                 spin_unlock(&hd->arch.mapping_lock);
@@ -1389,7 +1392,7 @@ int domain_context_mapping_one(
         }
 
         /* Skip top levels of page tables for 2- and 3-level DRHDs. */
-        pgd_maddr = hd->arch.pgd_maddr;
+        pgd_maddr = hd->arch.vtd.pgd_maddr;
         for ( agaw = level_to_agaw(4);
               agaw != level_to_agaw(iommu->nr_pt_levels);
               agaw-- )
@@ -1443,7 +1446,7 @@ int domain_context_mapping_one(
     if ( rc > 0 )
         rc = 0;
 
-    set_bit(iommu->index, &hd->arch.iommu_bitmap);
+    set_bit(iommu->index, &hd->arch.vtd.iommu_bitmap);
 
     unmap_vtd_domain_page(context_entries);
 
@@ -1714,7 +1717,7 @@ static int domain_context_unmap(struct domain *domain, u8 devfn,
     {
         int iommu_domid;
 
-        clear_bit(iommu->index, &dom_iommu(domain)->arch.iommu_bitmap);
+        clear_bit(iommu->index, &dom_iommu(domain)->arch.vtd.iommu_bitmap);
 
         iommu_domid = domain_iommu_domid(domain, iommu);
         if ( iommu_domid == -1 )
@@ -1739,7 +1742,7 @@ static void iommu_domain_teardown(struct domain *d)
     if ( list_empty(&acpi_drhd_units) )
         return;
 
-    list_for_each_entry_safe ( mrmrr, tmp, &hd->arch.mapped_rmrrs, list )
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->arch.vtd.mapped_rmrrs, list )
     {
         list_del(&mrmrr->list);
         xfree(mrmrr);
@@ -1751,8 +1754,9 @@ static void iommu_domain_teardown(struct domain *d)
         return;
 
     spin_lock(&hd->arch.mapping_lock);
-    iommu_free_pagetable(hd->arch.pgd_maddr, agaw_to_level(hd->arch.agaw));
-    hd->arch.pgd_maddr = 0;
+    iommu_free_pagetable(hd->arch.vtd.pgd_maddr,
+                         agaw_to_level(hd->arch.vtd.agaw));
+    hd->arch.vtd.pgd_maddr = 0;
     spin_unlock(&hd->arch.mapping_lock);
 }
 
@@ -1892,7 +1896,7 @@ static void iommu_set_pgd(struct domain *d)
     mfn_t pgd_mfn;
 
     pgd_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m_get_hostp2m(d)));
-    dom_iommu(d)->arch.pgd_maddr =
+    dom_iommu(d)->arch.vtd.pgd_maddr =
         pagetable_get_paddr(pagetable_from_mfn(pgd_mfn));
 }
 
@@ -1912,7 +1916,7 @@ static int rmrr_identity_mapping(struct domain *d, bool_t map,
      * No need to acquire hd->arch.mapping_lock: Both insertion and removal
      * get done while holding pcidevs_lock.
      */
-    list_for_each_entry( mrmrr, &hd->arch.mapped_rmrrs, list )
+    list_for_each_entry( mrmrr, &hd->arch.vtd.mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
@@ -1959,7 +1963,7 @@ static int rmrr_identity_mapping(struct domain *d, bool_t map,
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
     mrmrr->count = 1;
-    list_add_tail(&mrmrr->list, &hd->arch.mapped_rmrrs);
+    list_add_tail(&mrmrr->list, &hd->arch.vtd.mapped_rmrrs);
 
     return 0;
 }
@@ -2657,8 +2661,9 @@ static void vtd_dump_p2m_table(struct domain *d)
         return;
 
     hd = dom_iommu(d);
-    printk("p2m table has %d levels\n", agaw_to_level(hd->arch.agaw));
-    vtd_dump_p2m_table_level(hd->arch.pgd_maddr, agaw_to_level(hd->arch.agaw), 0, 0);
+    printk("p2m table has %d levels\n", agaw_to_level(hd->arch.vtd.agaw));
+    vtd_dump_p2m_table_level(hd->arch.vtd.pgd_maddr,
+                             agaw_to_level(hd->arch.vtd.agaw), 0, 0);
 }
 
 static int __init intel_iommu_quarantine_init(struct domain *d)
@@ -2669,7 +2674,7 @@ static int __init intel_iommu_quarantine_init(struct domain *d)
     unsigned int level = agaw_to_level(agaw);
     int rc;
 
-    if ( hd->arch.pgd_maddr )
+    if ( hd->arch.vtd.pgd_maddr )
     {
         ASSERT_UNREACHABLE();
         return 0;
@@ -2677,11 +2682,11 @@ static int __init intel_iommu_quarantine_init(struct domain *d)
 
     spin_lock(&hd->arch.mapping_lock);
 
-    hd->arch.pgd_maddr = alloc_pgtable_maddr(1, hd->node);
-    if ( !hd->arch.pgd_maddr )
+    hd->arch.vtd.pgd_maddr = alloc_pgtable_maddr(1, hd->node);
+    if ( !hd->arch.vtd.pgd_maddr )
         goto out;
 
-    parent = map_vtd_domain_page(hd->arch.pgd_maddr);
+    parent = map_vtd_domain_page(hd->arch.vtd.pgd_maddr);
     while ( level )
     {
         uint64_t maddr;
diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c
index 3d7670e8c6..a12109a1de 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -139,7 +139,6 @@ int arch_iommu_domain_init(struct domain *d)
     struct domain_iommu *hd = dom_iommu(d);
 
     spin_lock_init(&hd->arch.mapping_lock);
-    INIT_LIST_HEAD(&hd->arch.mapped_rmrrs);
 
     return 0;
 }
diff --git a/xen/include/asm-x86/iommu.h b/xen/include/asm-x86/iommu.h
index 6c9d5e5632..8ce97c981f 100644
--- a/xen/include/asm-x86/iommu.h
+++ b/xen/include/asm-x86/iommu.h
@@ -45,16 +45,23 @@ typedef uint64_t daddr_t;
 
 struct arch_iommu
 {
-    u64 pgd_maddr;                 /* io page directory machine address */
-    spinlock_t mapping_lock;            /* io page table lock */
-    int agaw;     /* adjusted guest address width, 0 is level 2 30-bit */
-    u64 iommu_bitmap;              /* bitmap of iommu(s) that the domain uses */
-    struct list_head mapped_rmrrs;
-
-    /* amd iommu support */
-    int paging_mode;
-    struct page_info *root_table;
-    struct guest_iommu *g_iommu;
+    spinlock_t mapping_lock; /* io page table lock */
+
+    union {
+        /* Intel VT-d */
+        struct {
+            uint64_t pgd_maddr; /* io page directory machine address */
+            unsigned int agaw; /* adjusted guest address width, 0 is level 2 30-bit */
+            uint64_t iommu_bitmap; /* bitmap of iommu(s) that the domain uses */
+            struct list_head mapped_rmrrs;
+        } vtd;
+        /* AMD IOMMU */
+        struct {
+            unsigned int paging_mode;
+            struct page_info *root_table;
+            struct guest_iommu *g_iommu;
+        } amd;
+    };
 };
 
 extern struct iommu_ops iommu_ops;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 16:22:36 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 16:22:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6cTU-0005Es-Rj; Fri, 14 Aug 2020 16:22:36 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6cTU-0005El-1w
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:36 +0000
X-Inumbo-ID: c94cf88b-f14c-4555-b44d-b18a9c1ebe12
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id c94cf88b-f14c-4555-b44d-b18a9c1ebe12;
 Fri, 14 Aug 2020 16:22:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=orj5qFfn1ZYBeBDCc2L1XyCbXXuhsrYlxVpMfsRDy0E=; b=wWrDBAKayglRQoysHJcTXpXELW
 Q1AKdW1nI57mlDI1JKNIlmF6/RTGvVAb7uK1hBER3Js4m9/jjhPpISl0NMxUyKztcdqLlF4qGprae
 MkzDMIdF5TNrLmWgzF8YoKpGoJ7eeVw0pUiD19uhJBn/UGRT1iR7BAbXWw/zaT1BAtD8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTT-0001Fh-30
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTT-0008TQ-25
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/iommu: add common page-table allocator
Message-Id: <E1k6cTT-0008TQ-25@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 16:22:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 15bc9a1ef51c4e0f9786eb143e9d43a657e7d239
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 4 14:41:57 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/iommu: add common page-table allocator
    
    Instead of having separate page table allocation functions in VT-d and AMD
    IOMMU code, we could use a common allocation function in the general x86 code.
    
    This patch adds a new allocation function, iommu_alloc_pgtable(), for this
    purpose. The function adds the page table pages to a list. The pages in this
    list are then freed by iommu_free_pgtables(), which is called by
    domain_relinquish_resources() after PCI devices have been de-assigned.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/domain.c               |  9 ++++++-
 xen/drivers/passthrough/x86/iommu.c | 51 +++++++++++++++++++++++++++++++++++++
 xen/include/asm-x86/iommu.h         |  7 +++++
 3 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index f8084dc9e3..d1ecc7b83b 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -2153,7 +2153,8 @@ int domain_relinquish_resources(struct domain *d)
         d->arch.rel_priv = PROG_ ## x; /* Fallthrough */ case PROG_ ## x
 
         enum {
-            PROG_paging = 1,
+            PROG_iommu_pagetables = 1,
+            PROG_paging,
             PROG_vcpu_pagetables,
             PROG_shared,
             PROG_xen,
@@ -2168,6 +2169,12 @@ int domain_relinquish_resources(struct domain *d)
         if ( ret )
             return ret;
 
+    PROGRESS(iommu_pagetables):
+
+        ret = iommu_free_pgtables(d);
+        if ( ret )
+            return ret;
+
     PROGRESS(paging):
 
         /* Tear down paging-assistance stuff. */
diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c
index a12109a1de..aea07e47c4 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -140,6 +140,9 @@ int arch_iommu_domain_init(struct domain *d)
 
     spin_lock_init(&hd->arch.mapping_lock);
 
+    INIT_PAGE_LIST_HEAD(&hd->arch.pgtables.list);
+    spin_lock_init(&hd->arch.pgtables.lock);
+
     return 0;
 }
 
@@ -257,6 +260,54 @@ void __hwdom_init arch_iommu_hwdom_init(struct domain *d)
         return;
 }
 
+int iommu_free_pgtables(struct domain *d)
+{
+    struct domain_iommu *hd = dom_iommu(d);
+    struct page_info *pg;
+    unsigned int done = 0;
+
+    while ( (pg = page_list_remove_head(&hd->arch.pgtables.list)) )
+    {
+        free_domheap_page(pg);
+
+        if ( !(++done & 0xff) && general_preempt_check() )
+            return -ERESTART;
+    }
+
+    return 0;
+}
+
+struct page_info *iommu_alloc_pgtable(struct domain *d)
+{
+    struct domain_iommu *hd = dom_iommu(d);
+    unsigned int memflags = 0;
+    struct page_info *pg;
+    void *p;
+
+#ifdef CONFIG_NUMA
+    if ( hd->node != NUMA_NO_NODE )
+        memflags = MEMF_node(hd->node);
+#endif
+
+    pg = alloc_domheap_page(NULL, memflags);
+    if ( !pg )
+        return NULL;
+
+    p = __map_domain_page(pg);
+    clear_page(p);
+
+    if ( hd->platform_ops->sync_cache )
+        iommu_vcall(hd->platform_ops, sync_cache, p, PAGE_SIZE);
+
+    unmap_domain_page(p);
+
+    spin_lock(&hd->arch.pgtables.lock);
+    page_list_add(pg, &hd->arch.pgtables.list);
+    spin_unlock(&hd->arch.pgtables.lock);
+
+    return pg;
+}
+
 /*
  * Local variables:
  * mode: C
diff --git a/xen/include/asm-x86/iommu.h b/xen/include/asm-x86/iommu.h
index 8ce97c981f..970eb06ffa 100644
--- a/xen/include/asm-x86/iommu.h
+++ b/xen/include/asm-x86/iommu.h
@@ -46,6 +46,10 @@ typedef uint64_t daddr_t;
 struct arch_iommu
 {
     spinlock_t mapping_lock; /* io page table lock */
+    struct {
+        struct page_list_head list;
+        spinlock_t lock;
+    } pgtables;
 
     union {
         /* Intel VT-d */
@@ -131,6 +135,9 @@ int pi_update_irte(const struct pi_desc *pi_desc, const struct pirq *pirq,
         iommu_vcall(ops, sync_cache, addr, size);       \
 })
 
+int __must_check iommu_free_pgtables(struct domain *d);
+struct page_info *__must_check iommu_alloc_pgtable(struct domain *d);
+
 #endif /* !__ARCH_X86_IOMMU_H__ */
 /*
  * Local variables:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 16:22:47 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 16:22:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6cTf-0005GG-Tv; Fri, 14 Aug 2020 16:22:47 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6cTe-0005G3-BK
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:46 +0000
X-Inumbo-ID: fe16cfe2-0068-4e04-ae35-4c2cf6b6bc3f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id fe16cfe2-0068-4e04-ae35-4c2cf6b6bc3f;
 Fri, 14 Aug 2020 16:22:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=/IxA8jgl+6wnuW1GTCHWqwVJ8iAyxLzBqB4G3ZZuPms=; b=4z7dFdxEKJdumx8JAJ90EqZpGs
 7DYqipoAvNdSy0HVvRrQ+CLU2BFtgay7wXIdez3MdGcc+oobU6K9xwDdxJYlpqpdNiyoOul9PR2uQ
 OO/Gkz9m61AHveOC270mP+TPx+1Jt6nkcAx1DhXem/GUXV55RgFfr3jS0izOLrMl2tnc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTd-0001Fp-7C
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTd-0008Ty-59
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:45 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/iommu: convert AMD IOMMU code to use new page table
 allocator
Message-Id: <E1k6cTd-0008Ty-59@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 16:22:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c4bdb646f47a09d4f18496570cd1f7cab84acce0
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 4 14:41:59 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/iommu: convert AMD IOMMU code to use new page table allocator
    
    This patch converts the AMD IOMMU code to use the new page table allocator
    function. This allows all the free-ing code to be removed (since it is now
    handled by the general x86 code) which reduces TLB and cache thrashing as well
    as shortening the code.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/amd/iommu.h         | 18 +------
 xen/drivers/passthrough/amd/iommu_map.c     | 10 ++--
 xen/drivers/passthrough/amd/pci_amd_iommu.c | 75 ++++-------------------------
 3 files changed, 16 insertions(+), 87 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu.h b/xen/drivers/passthrough/amd/iommu.h
index 3489c2a015..e2d174f3b4 100644
--- a/xen/drivers/passthrough/amd/iommu.h
+++ b/xen/drivers/passthrough/amd/iommu.h
@@ -226,7 +226,7 @@ int __must_check amd_iommu_map_page(struct domain *d, dfn_t dfn,
                                     unsigned int *flush_flags);
 int __must_check amd_iommu_unmap_page(struct domain *d, dfn_t dfn,
                                       unsigned int *flush_flags);
-int __must_check amd_iommu_alloc_root(struct domain_iommu *hd);
+int __must_check amd_iommu_alloc_root(struct domain *d);
 int amd_iommu_reserve_domain_unity_map(struct domain *domain,
                                        paddr_t phys_addr, unsigned long size,
                                        int iw, int ir);
@@ -356,22 +356,6 @@ static inline int amd_iommu_get_paging_mode(unsigned long max_frames)
     return level;
 }
 
-static inline struct page_info *alloc_amd_iommu_pgtable(void)
-{
-    struct page_info *pg = alloc_domheap_page(NULL, 0);
-
-    if ( pg )
-        clear_domain_page(page_to_mfn(pg));
-
-    return pg;
-}
-
-static inline void free_amd_iommu_pgtable(struct page_info *pg)
-{
-    if ( pg )
-        free_domheap_page(pg);
-}
-
 static inline void *__alloc_amd_iommu_tables(unsigned int order)
 {
     return alloc_xenheap_pages(order, 0);
diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c
index 47b4472e8a..54b991294a 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -217,7 +217,7 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn,
             mfn = next_table_mfn;
 
             /* allocate lower level page table */
-            table = alloc_amd_iommu_pgtable();
+            table = iommu_alloc_pgtable(d);
             if ( table == NULL )
             {
                 AMD_IOMMU_DEBUG("Cannot allocate I/O page table\n");
@@ -248,7 +248,7 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn,
 
             if ( next_table_mfn == 0 )
             {
-                table = alloc_amd_iommu_pgtable();
+                table = iommu_alloc_pgtable(d);
                 if ( table == NULL )
                 {
                     AMD_IOMMU_DEBUG("Cannot allocate I/O page table\n");
@@ -286,7 +286,7 @@ int amd_iommu_map_page(struct domain *d, dfn_t dfn, mfn_t mfn,
 
     spin_lock(&hd->arch.mapping_lock);
 
-    rc = amd_iommu_alloc_root(hd);
+    rc = amd_iommu_alloc_root(d);
     if ( rc )
     {
         spin_unlock(&hd->arch.mapping_lock);
@@ -458,7 +458,7 @@ int __init amd_iommu_quarantine_init(struct domain *d)
 
     spin_lock(&hd->arch.mapping_lock);
 
-    hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+    hd->arch.amd.root_table = iommu_alloc_pgtable(d);
     if ( !hd->arch.amd.root_table )
         goto out;
 
@@ -473,7 +473,7 @@ int __init amd_iommu_quarantine_init(struct domain *d)
          * page table pages, and the resulting allocations are always
          * zeroed.
          */
-        pg = alloc_amd_iommu_pgtable();
+        pg = iommu_alloc_pgtable(d);
         if ( !pg )
             break;
 
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 09a05f9d75..3390c22cf3 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -205,11 +205,13 @@ static int iov_enable_xt(void)
     return 0;
 }
 
-int amd_iommu_alloc_root(struct domain_iommu *hd)
+int amd_iommu_alloc_root(struct domain *d)
 {
+    struct domain_iommu *hd = dom_iommu(d);
+
     if ( unlikely(!hd->arch.amd.root_table) )
     {
-        hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+        hd->arch.amd.root_table = iommu_alloc_pgtable(d);
         if ( !hd->arch.amd.root_table )
             return -ENOMEM;
     }
@@ -217,12 +219,13 @@ int amd_iommu_alloc_root(struct domain_iommu *hd)
     return 0;
 }
 
-static int __must_check allocate_domain_resources(struct domain_iommu *hd)
+static int __must_check allocate_domain_resources(struct domain *d)
 {
+    struct domain_iommu *hd = dom_iommu(d);
     int rc;
 
     spin_lock(&hd->arch.mapping_lock);
-    rc = amd_iommu_alloc_root(hd);
+    rc = amd_iommu_alloc_root(d);
     spin_unlock(&hd->arch.mapping_lock);
 
     return rc;
@@ -254,7 +257,7 @@ static void __hwdom_init amd_iommu_hwdom_init(struct domain *d)
 {
     const struct amd_iommu *iommu;
 
-    if ( allocate_domain_resources(dom_iommu(d)) )
+    if ( allocate_domain_resources(d) )
         BUG();
 
     for_each_amd_iommu ( iommu )
@@ -323,7 +326,6 @@ static int reassign_device(struct domain *source, struct domain *target,
 {
     struct amd_iommu *iommu;
     int bdf, rc;
-    struct domain_iommu *t = dom_iommu(target);
 
     bdf = PCI_BDF2(pdev->bus, pdev->devfn);
     iommu = find_iommu_for_device(pdev->seg, bdf);
@@ -344,7 +346,7 @@ static int reassign_device(struct domain *source, struct domain *target,
         pdev->domain = target;
     }
 
-    rc = allocate_domain_resources(t);
+    rc = allocate_domain_resources(target);
     if ( rc )
         return rc;
 
@@ -376,65 +378,9 @@ static int amd_iommu_assign_device(struct domain *d, u8 devfn,
     return reassign_device(pdev->domain, d, devfn, pdev);
 }
 
-static void deallocate_next_page_table(struct page_info *pg, int level)
-{
-    PFN_ORDER(pg) = level;
-    spin_lock(&iommu_pt_cleanup_lock);
-    page_list_add_tail(pg, &iommu_pt_cleanup_list);
-    spin_unlock(&iommu_pt_cleanup_lock);
-}
-
-static void deallocate_page_table(struct page_info *pg)
-{
-    struct amd_iommu_pte *table_vaddr;
-    unsigned int index, level = PFN_ORDER(pg);
-
-    PFN_ORDER(pg) = 0;
-
-    if ( level <= 1 )
-    {
-        free_amd_iommu_pgtable(pg);
-        return;
-    }
-
-    table_vaddr = __map_domain_page(pg);
-
-    for ( index = 0; index < PTE_PER_TABLE_SIZE; index++ )
-    {
-        struct amd_iommu_pte *pde = &table_vaddr[index];
-
-        if ( pde->mfn && pde->next_level && pde->pr )
-        {
-            /* We do not support skip levels yet */
-            ASSERT(pde->next_level == level - 1);
-            deallocate_next_page_table(mfn_to_page(_mfn(pde->mfn)),
-                                       pde->next_level);
-        }
-    }
-
-    unmap_domain_page(table_vaddr);
-    free_amd_iommu_pgtable(pg);
-}
-
-static void deallocate_iommu_page_tables(struct domain *d)
-{
-    struct domain_iommu *hd = dom_iommu(d);
-
-    spin_lock(&hd->arch.mapping_lock);
-    if ( hd->arch.amd.root_table )
-    {
-        deallocate_next_page_table(hd->arch.amd.root_table,
-                                   hd->arch.amd.paging_mode);
-        hd->arch.amd.root_table = NULL;
-    }
-    spin_unlock(&hd->arch.mapping_lock);
-}
-
-
 static void amd_iommu_domain_destroy(struct domain *d)
 {
-    deallocate_iommu_page_tables(d);
-    amd_iommu_flush_all_pages(d);
+    dom_iommu(d)->arch.amd.root_table = NULL;
 }
 
 static int amd_iommu_add_device(u8 devfn, struct pci_dev *pdev)
@@ -620,7 +566,6 @@ static const struct iommu_ops __initconstrel _iommu_ops = {
     .unmap_page = amd_iommu_unmap_page,
     .iotlb_flush = amd_iommu_flush_iotlb_pages,
     .iotlb_flush_all = amd_iommu_flush_iotlb_all,
-    .free_page_table = deallocate_page_table,
     .reassign_device = reassign_device,
     .get_device_group_id = amd_iommu_group_id,
     .enable_x2apic = iov_enable_xt,
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 16:22:57 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 16:22:57 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6cTo-0005HB-VY; Fri, 14 Aug 2020 16:22:56 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6cTo-0005H2-5D
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:56 +0000
X-Inumbo-ID: 3f0c91ec-1f18-45f7-a2cc-2bd087b6b461
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 3f0c91ec-1f18-45f7-a2cc-2bd087b6b461;
 Fri, 14 Aug 2020 16:22:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Jz7EogCiLkCuOZ2Rklb0g7KHohZzDd47yFJo1hzLCkU=; b=lJzxMW1yr7mui13YbRwgzDywe/
 Zl9CY2+wwWuEdtMBrU1nkrnYgFuJFqDyd97028XsCJTlkaEgijrdWku8cyFRVOAqJoN+Qz79qLoej
 PSy2CAn0JSXF/d4+sM8FXTH+lZvUb8PxEoeHY9tVnYJY9T0t0b6/t8aX1K8+on1ippFY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTn-0001G0-B8
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:55 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cTn-0008UX-9P
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:22:55 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] rpmball: Adjust to new rpm, do not require --force
Message-Id: <E1k6cTn-0008UX-9P@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 16:22:55 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 438c5ffa44e99cceb574c0f9946aacacdedd2952
Author:     Don Slutz <Don.Slutz@Gmail.com>
AuthorDate: Sun Aug 9 14:22:34 2020 -0400
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 17:18:56 2020 +0100

    rpmball: Adjust to new rpm, do not require --force
    
    Also prevent warning: directory /boot: remove failed
    
    Before:
    
    [root@TestCloud1 xen]# rpm -hiv dist/xen*rpm
    Preparing...                          ################################# [100%]
            file /boot from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/bin from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/lib from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/lib64 from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/sbin from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
    [root@TestCloud1 xen]# rpm -e xen
    warning: directory /boot: remove failed: Device or resource busy
    
    After:
    
    [root@TestCloud1 xen]# rpm -hiv dist/xen*rpm
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:xen-4.15-unstable                ################################# [100%]
    [root@TestCloud1 xen]# rpm -e xen
    [root@TestCloud1 xen]#
    
    Signed-off-by: Don Slutz <Don.Slutz@Gmail.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/misc/mkrpm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
index ae40e1a4c4..68819b2d73 100644
--- a/tools/misc/mkrpm
+++ b/tools/misc/mkrpm
@@ -62,7 +62,8 @@ rm -rf \$RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-/*
+/*/*/*
+/boot/*
 
 %post
 EOF
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 16:33:08 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 16:33:08 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6cde-0006Jd-DG; Fri, 14 Aug 2020 16:33:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6cdd-0006JX-Sd
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:33:05 +0000
X-Inumbo-ID: 8dfac0ff-a7ba-4ddb-818d-471ce41b2d38
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 8dfac0ff-a7ba-4ddb-818d-471ce41b2d38;
 Fri, 14 Aug 2020 16:33:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=UqF7QxuGUYlY1RjwpYbgazRjFfKpZM6kAwwWGu/Rxks=; b=Vsba1iiBwumNtOh0SDWOBUdBcM
 DzNU3RZ9RJxV85/IZ0hQMThTwlxk81VPno2HBpWvZyu7Eol+JNfKK6fTAtJ7FZjYS+DKyzH+sKn1E
 LCSbjjo0vRB3W20K15knk+yhHUmBdaVZeXkvbslzuvmQM9kyZ281j8QTX1I19iwLsW+E=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cdd-0001TG-04
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:33:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6cdc-0000hA-Ul
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 16:33:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/hvm: change EOI exit bitmap helper parameter
Message-Id: <E1k6cdc-0000hA-Ul@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 16:33:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 74ac7c81788198342d1dd60f95fa4870fa64728e
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Wed Aug 12 14:47:05 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 17:26:01 2020 +0100

    x86/hvm: change EOI exit bitmap helper parameter
    
    Change the last parameter of the update_eoi_exit_bitmap helper to be a
    set/clear boolean instead of a triggering field. This is already
    inline with how the function is implemented, and will allow deciding
    whether an exit is required by the higher layers that call into
    update_eoi_exit_bitmap. Note that the current behavior is not changed
    by this patch.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c    | 4 ++--
 xen/include/asm-x86/hvm/hvm.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 86799c24ba..a0d58ffbe2 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1885,9 +1885,9 @@ static void vmx_set_info_guest(struct vcpu *v)
     vmx_vmcs_exit(v);
 }
 
-static void vmx_update_eoi_exit_bitmap(struct vcpu *v, u8 vector, u8 trig)
+static void vmx_update_eoi_exit_bitmap(struct vcpu *v, uint8_t vector, bool set)
 {
-    if ( trig )
+    if ( set )
         vmx_set_eoi_exit_bitmap(v, vector);
     else
         vmx_clear_eoi_exit_bitmap(v, vector);
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index 1eb377dd82..be0d8b0a4d 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -192,7 +192,7 @@ struct hvm_function_table {
     void (*nhvm_domain_relinquish_resources)(struct domain *d);
 
     /* Virtual interrupt delivery */
-    void (*update_eoi_exit_bitmap)(struct vcpu *v, u8 vector, u8 trig);
+    void (*update_eoi_exit_bitmap)(struct vcpu *v, uint8_t vector, bool set);
     void (*process_isr)(int isr, struct vcpu *v);
     void (*deliver_posted_intr)(struct vcpu *v, u8 vector);
     void (*sync_pir_to_irr)(struct vcpu *v);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 19:00:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 19:00:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6evw-0008FP-47; Fri, 14 Aug 2020 19:00:08 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6evu-0008B2-Lb
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:06 +0000
X-Inumbo-ID: f863ca41-70ae-4a97-bf93-3a2baf3ed30f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id f863ca41-70ae-4a97-bf93-3a2baf3ed30f;
 Fri, 14 Aug 2020 19:00:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=8pGdvzdAt/wGZJWBTsWRDXFJuWZ9nMhC33J2HzMworM=; b=gHE/C389wferNvvI7338B+ZZJW
 CjK/yzgJJu7j0zZus45m9HpJFfDq1unHugC8NYmIoE/7lnXz0lPqZRbcNSZTkLq3tlgcCh3/YDADE
 SxyTxvGblhz/u48zkdqofPORCdz1f7K3xRFcKLb4aI9aLsGapt2cpg6rSYn4AcBDhTdc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6evt-0004cB-Ce
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6evt-0001Rq-AR
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] xen/guest_access: Add emacs magics
Message-Id: <E1k6evt-0001Rq-AR@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 19:00:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7207c157f3d905c943a8a71b6602b77e2e0703a1
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 11:50:18 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:00 2020 +0100

    xen/guest_access: Add emacs magics
    
    Add emacs magics for xen/guest_access.h and
    asm-x86/guest_access.h.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/include/asm-x86/guest_access.h | 9 +++++++++
 xen/include/xen/guest_access.h     | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/xen/include/asm-x86/guest_access.h b/xen/include/asm-x86/guest_access.h
index 2be3577bd3..369676f31a 100644
--- a/xen/include/asm-x86/guest_access.h
+++ b/xen/include/asm-x86/guest_access.h
@@ -160,3 +160,12 @@
 })
 
 #endif /* __ASM_X86_GUEST_ACCESS_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/include/xen/guest_access.h b/xen/include/xen/guest_access.h
index 09989df819..75103d30c8 100644
--- a/xen/include/xen/guest_access.h
+++ b/xen/include/xen/guest_access.h
@@ -33,3 +33,12 @@ char *safe_copy_string_from_guest(XEN_GUEST_HANDLE(char) u_buf,
                                   size_t size, size_t max_size);
 
 #endif /* __XEN_GUEST_ACCESS_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 19:00:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 19:00:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6ew5-0008Fq-5w; Fri, 14 Aug 2020 19:00:17 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6ew4-0008Fk-Ew
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:16 +0000
X-Inumbo-ID: b2828874-a7ed-42e2-a694-3d361d605696
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id b2828874-a7ed-42e2-a694-3d361d605696;
 Fri, 14 Aug 2020 19:00:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=6Wwa7dv/SVsTHSIU6B+b9v4uzMHW/G4u23pmggRlkVA=; b=4k1kd0dsQoRVO/EPsQ8QE3BkJi
 UuzGdJRQ5TSD0ExZMBLCGb2/7QUrAHceBCDee+b4Ohne4csMQ73sVXDqhfPY3Gz5Sm55mfdRUukbu
 ucQEDSKyWDh6EHMMPMeNezT5vj2OH+HmoyKEU874hnlhW/389qfXbk/qtl4dB2yUEZ48=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6ew3-0004cG-Gs
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6ew3-0001Sw-Ei
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] xen/arm: kernel: Re-order the includes
Message-Id: <E1k6ew3-0001Sw-Ei@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 19:00:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 529527b57abb407db90bfb69036096624391d4ce
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 12:03:22 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:33 2020 +0100

    xen/arm: kernel: Re-order the includes
    
    We usually have xen/ includes first and then asm/. They are also ordered
    alphabetically among themselves.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/kernel.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 8eff074836..f95fa392af 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -3,20 +3,20 @@
  *
  * Copyright (C) 2011 Citrix Systems, Inc.
  */
+#include <xen/domain_page.h>
 #include <xen/errno.h>
+#include <xen/gunzip.h>
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/mm.h>
-#include <xen/domain_page.h>
 #include <xen/sched.h>
-#include <asm/byteorder.h>
-#include <asm/setup.h>
-#include <xen/libfdt/libfdt.h>
-#include <xen/gunzip.h>
 #include <xen/vmap.h>
 
+#include <asm/byteorder.h>
 #include <asm/guest_access.h>
 #include <asm/kernel.h>
+#include <asm/setup.h>
 
 #define UIMAGE_MAGIC          0x27051956
 #define UIMAGE_NMLEN          32
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 19:00:28 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 19:00:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6ewG-0008HF-94; Fri, 14 Aug 2020 19:00:28 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6ewF-0008H3-10
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:27 +0000
X-Inumbo-ID: deb98ff4-c776-4ad7-bf2d-f58752e4abc7
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id deb98ff4-c776-4ad7-bf2d-f58752e4abc7;
 Fri, 14 Aug 2020 19:00:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=uWsCKlmfZ8hACYE+NXiwHk2LooByYG7/QpjVz1aKqAM=; b=y9d64GfswsG0mEqRpQ4gUlYFr4
 P9gvCz0ImtZahNoEb8Q1gtyfbG97FXissJyWCHAHjKXytEAIsPbYEKYEYhpjhNNhEpSpCw7R5ZGl7
 eu6rnHmgcPO+uyH9az5t4GbdM6e30ahjY1L2JIeY2cJVH2ryX01VfFGRA/GTPosX2Ohc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6ewD-0004cu-LR
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6ewD-0001TO-Ix
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] xen/arm: decode: Re-order the includes
Message-Id: <E1k6ewD-0001TO-Ix@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 19:00:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9c7ff81802263ecb964c471fbbbbfe753873b983
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 12:06:04 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:33 2020 +0100

    xen/arm: decode: Re-order the includes
    
    We usually have xen/ includes first and then asm/. They are also ordered
    alphabetically among themselves.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/decode.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
index 8b1e15d118..144793c8ce 100644
--- a/xen/arch/arm/decode.c
+++ b/xen/arch/arm/decode.c
@@ -17,11 +17,12 @@
  * GNU General Public License for more details.
  */
 
-#include <xen/types.h>
+#include <xen/lib.h>
 #include <xen/sched.h>
+#include <xen/types.h>
+
 #include <asm/current.h>
 #include <asm/guest_access.h>
-#include <xen/lib.h>
 
 #include "decode.h"
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 19:00:38 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 19:00:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6ewQ-0008IU-Ah; Fri, 14 Aug 2020 19:00:38 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6ewO-0008ID-K7
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:36 +0000
X-Inumbo-ID: bed933c7-390e-4eff-8c0d-53e2f93c8403
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id bed933c7-390e-4eff-8c0d-53e2f93c8403;
 Fri, 14 Aug 2020 19:00:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Bn/mf2INZc1ILQZ5za4OS1lBIelKLxi9NyUxGi5k/wQ=; b=OMtbKRP/kGIePAs5dKeEnSALCN
 ZxlpFo66tmrZDk0Acmg/ZKrG6CYfnidf2isv7LfEg6p0im8FNBteAfJdpExjC+f73tytqL3bRaZCq
 crLOmgVzIkdrWoppUf0w7zHkD733cUh2QKPEqysqb8KRzRvn2scSNLYbVn5re6Y/c+Go=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6ewN-0004d4-Oz
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6ewN-0001Ty-Nd
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:00:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] xen/arm: guestcopy: Re-order the includes
Message-Id: <E1k6ewN-0001Ty-Nd@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 19:00:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 2404e59b1d934fedc3fd3bd92b3d5d2a981cd433
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 12:07:17 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:33 2020 +0100

    xen/arm: guestcopy: Re-order the includes
    
    We usually have xen/ includes first and then asm/. They are also ordered
    alphabetically among themselves.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Stefano Stabellini <sstabellini@kernel.org>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/guestcopy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c
index 7a0f3e9d5f..c8023e2bca 100644
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -1,7 +1,8 @@
-#include <xen/lib.h>
 #include <xen/domain_page.h>
+#include <xen/lib.h>
 #include <xen/mm.h>
 #include <xen/sched.h>
+
 #include <asm/current.h>
 #include <asm/guest_access.h>
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 19:22:10 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 19:22:10 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6fHC-0001tY-Ui; Fri, 14 Aug 2020 19:22:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6fHC-0001tH-5S
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:22:06 +0000
X-Inumbo-ID: 414d670f-e865-4c4a-93ca-da9b7e728284
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 414d670f-e865-4c4a-93ca-da9b7e728284;
 Fri, 14 Aug 2020 19:22:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=z84dtnkKRTGjzI730gnFNwq/rInE9v6bIdZIYN/7Bxc=; b=MqNKlmTfcPRCjcW0BEzPoHCXMT
 gbWgzaW31Zh9Js36/bViMHp9HJvRwDDo3LLSROo4tmRJnMLEKXKZBvCIGTGlWEnLI5uTu54hh3bqX
 uAZ1SeLjqtQi/DY3NeRWjSREDiXd0EeJvSMyZauAEYI7pshXiL7qIE1rlhfS44yd/eMs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6fHB-000541-3b
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:22:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6fHB-0002dE-2b
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 19:22:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] xen/arm: cmpxchg: Add missing memory barriers in
 __cmpxchg_mb_timeout()
Message-Id: <E1k6fHB-0002dE-2b@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 19:22:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d501ef90ae7f2a79130ea89acb3d6d1792972934
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Wed Jul 29 14:50:37 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 20:21:23 2020 +0100

    xen/arm: cmpxchg: Add missing memory barriers in __cmpxchg_mb_timeout()
    
    The function __cmpxchg_mb_timeout() was intended to have the same
    semantics as __cmpxchg_mb(). Unfortunately, the memory barriers were
    not added when first implemented.
    
    There is no known issue with the existing callers, but the barriers are
    added given this is the expected semantics in Xen.
    
    The issue was introduced by XSA-295.
    
    Backport: 4.8+
    Fixes: 86b0bc958373 ("xen/arm: cmpxchg: Provide a new helper that can timeout")
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/include/asm-arm/arm32/cmpxchg.h | 8 +++++++-
 xen/include/asm-arm/arm64/cmpxchg.h | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/asm-arm/arm32/cmpxchg.h
index 49ca2a0d7a..0770f272ee 100644
--- a/xen/include/asm-arm/arm32/cmpxchg.h
+++ b/xen/include/asm-arm/arm32/cmpxchg.h
@@ -147,7 +147,13 @@ static always_inline bool __cmpxchg_mb_timeout(volatile void *ptr,
 					       int size,
 					       unsigned int max_try)
 {
-	return __int_cmpxchg(ptr, old, new, size, true, max_try);
+	bool ret;
+
+	smp_mb();
+	ret = __int_cmpxchg(ptr, old, new, size, true, max_try);
+	smp_mb();
+
+	return ret;
 }
 
 #define cmpxchg(ptr,o,n)						\
diff --git a/xen/include/asm-arm/arm64/cmpxchg.h b/xen/include/asm-arm/arm64/cmpxchg.h
index 5bc2e1f786..fc5c60f0bd 100644
--- a/xen/include/asm-arm/arm64/cmpxchg.h
+++ b/xen/include/asm-arm/arm64/cmpxchg.h
@@ -160,7 +160,13 @@ static always_inline bool __cmpxchg_mb_timeout(volatile void *ptr,
 					       int size,
 					       unsigned int max_try)
 {
-	return __int_cmpxchg(ptr, old, new, size, true, max_try);
+	bool ret;
+
+	smp_mb();
+	ret = __int_cmpxchg(ptr, old, new, size, true, max_try);
+	smp_mb();
+
+	return ret;
 }
 
 #define cmpxchg(ptr, o, n) \
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 20:33:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 20:33:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6gNw-0008CG-2P; Fri, 14 Aug 2020 20:33:08 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6gNv-0008CA-Dg
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 20:33:07 +0000
X-Inumbo-ID: b5db3d98-5aa2-4122-a61a-0275e37e81cf
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id b5db3d98-5aa2-4122-a61a-0275e37e81cf;
 Fri, 14 Aug 2020 20:33:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=RlktaVQVYbv8lO8ew7iFHFTm8MowwkZXT22FdwCoeUQ=; b=w3f3MT/EnzSu5y5w6Qyo4e4aKU
 zeRWtfnSPAqpDqx/+xnbw1q7IGd9RfSR3I0C7QamMlv2RIIVUgySo1wy9LXoeLI/XbOxcZAxG+GXz
 NvPPZaIdkAOiNPq0AhwcK/2Sub6TNE8mKGRbTgrof6L1oDc91Tg1Ws9gKLEx8LfNbMBo=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6gNs-0006cn-FT
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 20:33:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6gNs-0006sO-Cu
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 20:33:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] Config.mk: update OVMF changeset
Message-Id: <E1k6gNs-0006sO-Cu@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 20:33:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit f0f2344d3ce1657fd4572aab00cb6b3c1dfce5e5
Author:     Wei Liu <wl@xen.org>
AuthorDate: Wed Aug 12 09:55:11 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Fri Aug 14 20:21:25 2020 +0000

    Config.mk: update OVMF changeset
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 Config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Config.mk b/Config.mk
index 4093dcb9e3..3603cf4ca5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -244,7 +244,7 @@ QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-traditional.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git
 endif
-OVMF_UPSTREAM_REVISION ?= 20d2e5a125e34fc8501026613a71549b2a1a3e54
+OVMF_UPSTREAM_REVISION ?= a3741780fe3535e19e02efa869a7cac481891129
 QEMU_UPSTREAM_REVISION ?= master
 MINIOS_UPSTREAM_REVISION ?= master
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 14 20:33:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 14 Aug 2020 20:33:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k6gO5-0008D3-47; Fri, 14 Aug 2020 20:33:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=9s7u=BY=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k6gO4-0008Cx-6p
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 20:33:16 +0000
X-Inumbo-ID: 4383465a-7550-41ce-a6ab-d4b5d0de2381
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 4383465a-7550-41ce-a6ab-d4b5d0de2381;
 Fri, 14 Aug 2020 20:33:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=dffVIZb9tCY2GVEh0Petac/uxfK6PjsMs0U3BEgCR+o=; b=F2uUaPlCO5PDpvAyeuzYdhZDAk
 BGMMpOxHXOtSsBBNkUEGVJofY2WtS8URf8EQK/0PTOSj9ZRafdFgn8wEtHuS6dLhe72lrFsdX1y3L
 jXSyIXAYejE6SNo5RfNkxWfysDJjmq43wLBostnfdG+TFC06tCV3rrchsadW87gqas2I=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6gO2-0006cr-If
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 20:33:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k6gO2-0006t9-Hp
 for xen-changelog@lists.xenproject.org; Fri, 14 Aug 2020 20:33:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools: bump library version numbers
Message-Id: <E1k6gO2-0006t9-Hp@xenbits.xenproject.org>
Date: Fri, 14 Aug 2020 20:33:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 79c2d51cba34b250fd23fd32dc2311da89a4772c
Author:     Wei Liu <wl@xen.org>
AuthorDate: Wed Aug 12 09:55:34 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Fri Aug 14 20:21:25 2020 +0000

    tools: bump library version numbers
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 tools/libfsimage/common/Makefile  | 2 +-
 tools/libvchan/Makefile           | 2 +-
 tools/libxc/Makefile              | 2 +-
 tools/libxl/Makefile              | 4 ++--
 tools/xenstat/libxenstat/Makefile | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
index 8c8ba09f12..060f029ca9 100644
--- a/tools/libfsimage/common/Makefile
+++ b/tools/libfsimage/common/Makefile
@@ -1,7 +1,7 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
 
-MAJOR = 4.14
+MAJOR = 4.15
 MINOR = 0
 
 LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
diff --git a/tools/libvchan/Makefile b/tools/libvchan/Makefile
index 913bcc8884..d99a6137e1 100644
--- a/tools/libvchan/Makefile
+++ b/tools/libvchan/Makefile
@@ -15,7 +15,7 @@ $(LIBVCHAN_OBJS) $(LIBVCHAN_PIC_OBJS): CFLAGS += $(CFLAGS_libxenstore) $(CFLAGS_
 $(NODE_OBJS) $(NODE2_OBJS): CFLAGS += $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
 vchan-socket-proxy.o: CFLAGS += $(CFLAGS_libxenstore) $(CFLAGS_libxenctrl) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
 
-MAJOR = 4.14
+MAJOR = 4.15
 MINOR = 0
 
 CFLAGS += -I../include -I.
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index fae5969a73..955cd5ab18 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -1,7 +1,7 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-MAJOR    = 4.14
+MAJOR    = 4.15
 MINOR    = 0
 
 ifeq ($(CONFIG_LIBXC_MINIOS),y)
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 38cd43abae..0e8dfc6193 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -5,10 +5,10 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-MAJOR = 4.14
+MAJOR = 4.15
 MINOR = 0
 
-XLUMAJOR = 4.14
+XLUMAJOR = 4.15
 XLUMINOR = 0
 
 CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile
index 03cb212e3b..ab980852da 100644
--- a/tools/xenstat/libxenstat/Makefile
+++ b/tools/xenstat/libxenstat/Makefile
@@ -18,7 +18,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 LDCONFIG=ldconfig
 MAKE_LINK=ln -sf
 
-MAJOR=4.14
+MAJOR=4.15
 MINOR=0
 
 LIB=src/libxenstat.a
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Aug 17 10:00:06 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 17 Aug 2020 10:00:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k7bvv-0007Tk-Hv; Mon, 17 Aug 2020 10:00:03 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=esnY=B3=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k7bvv-0007SV-85
 for xen-changelog@lists.xenproject.org; Mon, 17 Aug 2020 10:00:03 +0000
X-Inumbo-ID: 382599fb-b3be-410f-8af2-bd53e8ee4c51
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 382599fb-b3be-410f-8af2-bd53e8ee4c51;
 Mon, 17 Aug 2020 10:00:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=yPuKg4Pg7qDtyUZLjorOzI59kYscfgL5W3uAR92iAaA=; b=Ot0ECslIhy8Q/d4cdHwCSB5oe8
 h1UgJmSEXg4QyYlflM7HzfpNHIuGNTlwp1H+dqf9JxNu00T5qwAO82yxLdVuXtxX29POFpeGep23h
 EKp5QMA0zc8zjoA382JHXFPT02RWvxcjc6G7AyfDe6FIGKjYOfIzURfnpXfXhJW1LXRs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k7bvu-0004uG-6d
 for xen-changelog@lists.xenproject.org; Mon, 17 Aug 2020 10:00:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k7bvu-0000mp-57
 for xen-changelog@lists.xenproject.org; Mon, 17 Aug 2020 10:00:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [mini-os master] mini-os: fix do_map_frames() for pvh
Message-Id: <E1k7bvu-0000mp-57@xenbits.xenproject.org>
Date: Mon, 17 Aug 2020 10:00:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b070125a6992e671292d781cbb71f98eea5359a3
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sat Aug 15 13:12:57 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Mon Aug 17 09:54:58 2020 +0000

    mini-os: fix do_map_frames() for pvh
    
    In case ov PVH dom_map_frames() is missing to increment the virtual
    address. This leads to writing only the first page table entry multiple
    times.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 arch/x86/mm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/mm.c b/arch/x86/mm.c
index ea58444..8ba14a5 100644
--- a/arch/x86/mm.c
+++ b/arch/x86/mm.c
@@ -695,6 +695,7 @@ int do_map_frames(unsigned long va,
         pgt[l1_table_offset(va)] = (pgentry_t)
             (((mfns[done * stride] + done * incr) << PAGE_SHIFT) | prot);
         done++;
+        va += PAGE_SIZE;
 #endif
     }
 
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Aug 17 10:00:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 17 Aug 2020 10:00:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k7bw5-0007us-JU; Mon, 17 Aug 2020 10:00:13 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=esnY=B3=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k7bw5-0007um-6w
 for xen-changelog@lists.xenproject.org; Mon, 17 Aug 2020 10:00:13 +0000
X-Inumbo-ID: 93efc129-16e3-44d4-90d6-47d6a2b02a11
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 93efc129-16e3-44d4-90d6-47d6a2b02a11;
 Mon, 17 Aug 2020 10:00:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=pSJMpDv5/bfcGWOishGWJnahcTp3ACJf47P82gcKD+0=; b=MnOUWkhnyXWZFEts/a6W7AAcgh
 zlgnIUvnCV3lW1dBB+6ZWrbGAutz8nT6lbrpTPDi6UDNH7/x1GZoYtDNu+4+B9tZAgzAqwlNJdySN
 IcIF8TV5a/Dng54K5BfKsP0mykfZcajYXMPj3J+Chf/bq7IVBIESceI3z6dC6a+kI24s=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k7bw4-0004up-9h
 for xen-changelog@lists.xenproject.org; Mon, 17 Aug 2020 10:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k7bw4-0000oM-8m
 for xen-changelog@lists.xenproject.org; Mon, 17 Aug 2020 10:00:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [mini-os master] mini-os: correct memory access rights for pvh mode
Message-Id: <E1k7bw4-0000oM-8m@xenbits.xenproject.org>
Date: Mon, 17 Aug 2020 10:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 051b87bb9c19609976fb038f386920e1ce5454c5
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sat Aug 15 13:15:57 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Mon Aug 17 09:55:22 2020 +0000

    mini-os: correct memory access rights for pvh mode
    
    When running as a PVH guest the memory access rights are not set
    correctly: _PAGE_USER should not be set and CR0.WP should be set.
    Especially CR0.WP is important in order to let the allocate on
    demand feature work, as it requires a page fault when writing to a
    read-only page.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 arch/x86/x86_hvm.S    |  2 +-
 include/x86/arch_mm.h | 18 ++++++++++++------
 include/x86/os.h      |  1 +
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/arch/x86/x86_hvm.S b/arch/x86/x86_hvm.S
index 6e8ad98..42a5f02 100644
--- a/arch/x86/x86_hvm.S
+++ b/arch/x86/x86_hvm.S
@@ -20,7 +20,7 @@ _start:
 #endif /* __x86_64__ */
 
         mov %cr0, %eax
-        or $X86_CR0_PG, %eax
+        or $(X86_CR0_PG | X86_CR0_WP), %eax
         mov %eax, %cr0
 
         lgdt gdt_ptr
diff --git a/include/x86/arch_mm.h b/include/x86/arch_mm.h
index cbbeb21..ffbec5a 100644
--- a/include/x86/arch_mm.h
+++ b/include/x86/arch_mm.h
@@ -171,17 +171,23 @@ typedef unsigned long pgentry_t;
 #define _PAGE_PSE      CONST(0x080)
 #define _PAGE_GLOBAL   CONST(0x100)
 
+#ifdef CONFIG_PARAVIRT
+#define PAGE_USER _PAGE_USER
+#else
+#define PAGE_USER CONST(0)
+#endif
+
 #if defined(__i386__)
 #define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED)
 #define L1_PROT_RO (_PAGE_PRESENT|_PAGE_ACCESSED)
-#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY |_PAGE_USER)
+#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY |PAGE_USER)
 #define L3_PROT (_PAGE_PRESENT)
 #elif defined(__x86_64__)
-#define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_USER)
-#define L1_PROT_RO (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_USER)
-#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
-#define L3_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
-#define L4_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
+#define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|PAGE_USER)
+#define L1_PROT_RO (_PAGE_PRESENT|_PAGE_ACCESSED|PAGE_USER)
+#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|PAGE_USER)
+#define L3_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|PAGE_USER)
+#define L4_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|PAGE_USER)
 #endif /* __i386__ || __x86_64__ */
 
 /* flags for ioremap */
diff --git a/include/x86/os.h b/include/x86/os.h
index a73b63e..46a824d 100644
--- a/include/x86/os.h
+++ b/include/x86/os.h
@@ -27,6 +27,7 @@
 #define MSR_EFER          0xc0000080
 #define _EFER_LME         8             /* Long mode enable */
 
+#define X86_CR0_WP        0x00010000    /* Write protect */
 #define X86_CR0_PG        0x80000000    /* Paging */
 #define X86_CR4_PAE       0x00000020    /* enable physical address extensions */
 #define X86_CR4_OSFXSR    0x00000200    /* enable fast FPU save and restore */
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 12:44:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 12:44:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k80yF-0002FT-NA; Tue, 18 Aug 2020 12:44:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k80yE-0002FM-QL
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 12:44:06 +0000
X-Inumbo-ID: cc5f14e0-fd3a-475c-b4a2-92ec84e26db4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id cc5f14e0-fd3a-475c-b4a2-92ec84e26db4;
 Tue, 18 Aug 2020 12:44:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=B5AQZyut9xi2mbZJ3Wb9orTSCIvOmsK5z20w40Bt/iM=; b=eIcrnVyQs0STS4V8iqVPPJIqqB
 7IRDG3WsZNgcBAP7B1iy71/0MA5HprFUQ4p1t4y161OiEh/QA9OrfmdPfvZkIPPPJjudh+mjN72Ff
 9R5Vj/IJv2jI/KMVmWNPTFoVccrO2BSi0sV/yplGGVcjLRNNTYOs24dEvSQgqcqCCOeo=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k80yC-0003w4-UD
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 12:44:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k80yC-00014l-SM
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 12:44:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] docs/process/branching-checklist: Get osstest branch
 right
Message-Id: <E1k80yC-00014l-SM@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 12:44:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit eee588bd73a7251fc5204b0563965372018f6319
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Wed Jul 15 16:39:18 2020 +0100
Commit:     Ian Jackson <ian.jackson@eu.citrix.com>
CommitDate: Tue Aug 18 13:40:18 2020 +0100

    docs/process/branching-checklist: Get osstest branch right
    
    The runes for this manual osstest were wrong.  It needs to run as
    osstest, and cr-for-branches should be run from testing.git.
    
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 docs/process/branching-checklist.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/process/branching-checklist.txt b/docs/process/branching-checklist.txt
index e286e65962..0e83272caa 100644
--- a/docs/process/branching-checklist.txt
+++ b/docs/process/branching-checklist.txt
@@ -86,8 +86,8 @@ including turning off debug.
 
 Set off a manual osstest run, since the osstest cr-for-branches change
 will take a while to take effect:
-  ssh osstest.test-lab
-  cd branches/for-xen-$v-testing.git
+  ssh osstest@osstest.test-lab
+  cd testing.git
   screen -S $v
   BRANCHES=xen-$v-testing ./cr-for-branches branches -w "./cr-daily-branch --real"
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 15:11:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 15:11:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k83GV-0000iV-BB; Tue, 18 Aug 2020 15:11:07 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k83GU-0000iQ-M3
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 15:11:06 +0000
X-Inumbo-ID: f3a8354e-9cba-4cb3-90ac-26ba00000d04
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id f3a8354e-9cba-4cb3-90ac-26ba00000d04;
 Tue, 18 Aug 2020 15:11:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=soUMv/nKIsWC81X5PS6dfqB2bEq1uEytznh9j0G3haM=; b=Wfo/fcBv4VpWdHfcNodC0kGJk4
 m1cBbWrQM7Ragh2C2405awfvfUOQ4I9fkX66bQpLDTy3pcM56NqB57XAOM1Rdqy0I+jZfVmeqctZD
 LnXl50uCQSSqKOa6VoT/I0ICDcu1E6HODF5yNhu5j8WOO2Nun37yEhUdjqe3nXDNfetM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k83GS-00075z-9d
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 15:11:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k83GS-0001GA-8k
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 15:11:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] QEMU_TRADITIONAL_REVISION update
Message-Id: <E1k83GS-0001GA-8k@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 15:11:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 4d5b2099f11348db1529dc6cbd19d5a66b4ae61b
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Aug 18 16:00:10 2020 +0100
Commit:     Ian Jackson <ian.jackson@eu.citrix.com>
CommitDate: Tue Aug 18 16:00:10 2020 +0100

    QEMU_TRADITIONAL_REVISION update
    
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Config.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 3603cf4ca5..8269503f73 100644
--- a/Config.mk
+++ b/Config.mk
@@ -253,9 +253,9 @@ SEABIOS_UPSTREAM_REVISION ?= rel-1.14.0
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
 
-QEMU_TRADITIONAL_REVISION ?= 3c659044118e34603161457db9934a34f816d78b
-# Fri Mar 13 12:35:26 2020 +0000
-# xen: cleanup IOREQ server on exit
+QEMU_TRADITIONAL_REVISION ?= 3d273dd05e51e5a1ffba3d98c7437ee84e8f8764
+# Wed Jul 15 10:01:40 2020 +0100
+# qemu-trad: remove Xen path dependencies
 
 # Specify which qemu-dm to use. This may be `ioemu' to use the old
 # Mercurial in-tree version, or a local directory, or a git URL.
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 15:44:07 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 15:44:07 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k83mO-0003KZ-Ra; Tue, 18 Aug 2020 15:44:04 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k83mN-0003KR-Vf
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 15:44:04 +0000
X-Inumbo-ID: 6202377b-8ac5-4f98-ae69-299336918480
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 6202377b-8ac5-4f98-ae69-299336918480;
 Tue, 18 Aug 2020 15:44:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=cVvir8M+cH8w/J7zguZ+6YUCuryYaUmToDCzF2v0LhE=; b=OGJQuyFW3HkFTdVmNzRPyWkmhU
 jcH54DiAVK1aJbFmfi++cMxQ4S0r7nIhC5VJ91te0gdrhz/U3TNtEV5u4fZJ3kwuSwsFNUPPoK26T
 MJqGqK60235jp6c/qUA3LOtK7e8iqKpIDakeyITULB489ft04bUqCUal69ACdocoo6C0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k83mL-0007lE-Mz
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 15:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k83mL-0002vQ-LI
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 15:44:01 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [qemu-xen-traditional master] qemu-trad: remove Xen path dependencies
Message-Id: <E1k83mL-0002vQ-LI@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 15:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 3d273dd05e51e5a1ffba3d98c7437ee84e8f8764
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Wed Jul 15 10:01:40 2020 +0100
Commit:     Ian Jackson <ian.jackson@eu.citrix.com>
CommitDate: Tue Aug 18 15:54:39 2020 +0100

    qemu-trad: remove Xen path dependencies
    
    xen-hhoks.mak contains hard wired paths for the used libraries of
    qemu-trad. Replace those by the make variables from Xen's Rules.mk,
    which is already included.
    
    This in turn removes the need to add the runtime link paths of the
    libraries the directly used libraries depend on.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 xen-hooks.mak | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/xen-hooks.mak b/xen-hooks.mak
index a68eba3c..2689db0f 100644
--- a/xen-hooks.mak
+++ b/xen-hooks.mak
@@ -1,10 +1,8 @@
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/toollog/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/evtchn/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libs/gnttab/include
+XEN_LIBS = evtchn gnttab ctrl guest store
+
 CPPFLAGS+= -DXC_WANT_COMPAT_MAP_FOREIGN_API
 CPPFLAGS+= -DXC_WANT_COMPAT_DEVICEMODEL_API
-CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc/include
-CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore/include
+CPPFLAGS += $(foreach lib,$(XEN_LIBS),$(CFLAGS_libxen$(lib)))
 CPPFLAGS+= -I$(XEN_ROOT)/tools/include
 
 SSE2 := $(call cc-option,-msse2,)
@@ -22,15 +20,7 @@ endif
 
 CFLAGS += $(CMDLINE_CFLAGS)
 
-LIBS += -L$(XEN_ROOT)/tools/libs/evtchn -lxenevtchn
-LIBS += -L$(XEN_ROOT)/tools/libs/gnttab -lxengnttab
-LIBS += -L$(XEN_ROOT)/tools/libxc -lxenctrl -lxenguest
-LIBS += -L$(XEN_ROOT)/tools/xenstore -lxenstore
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toollog
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toolcore
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/call
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/foreignmemory
-LIBS += -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/devicemodel
+LIBS += $(foreach lib,$(XEN_LIBS),$(LDLIBS_libxen$(lib)))
 
 LDFLAGS := $(CFLAGS) $(LDFLAGS)
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-traditional.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 16:44:11 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 16:44:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k84iU-0001Cy-Vt; Tue, 18 Aug 2020 16:44:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k84iT-0001Co-WD
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:06 +0000
X-Inumbo-ID: dd8332f1-037b-4b08-975b-07fea815a737
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id dd8332f1-037b-4b08-975b-07fea815a737;
 Tue, 18 Aug 2020 16:44:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=O+zb8GU9WqqTQdKZSycXP1X7Py1FFcrAhd35xuJo5Kg=; b=A9fkkYuPqf+Y5/Gao28F/apzs0
 PDR6n7s6wOY7BTv8ycNXU4VdmsliHRAoQ6ZbnGTv4soKOmdSPe9sO5ktUIbOqprMm1n5P6PNRx4vB
 UXolttCU//sbW5gW72VyAfBQtj9z1Rr6GzyV7xwUYaNyWwEvg2UFTvsaQanWFLaDoDIo=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84iT-00016g-2o
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84iT-0006Pa-20
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/ocaml/libs/xc: Fix ambiguous documentation comment
Message-Id: <E1k84iT-0006Pa-20@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 16:44:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ba02a2cd1c2e87203117f2fe920c2115a121dbbc
Author:     Edwin Török <edvin.torok@citrix.com>
AuthorDate: Mon Aug 17 19:45:44 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    tools/ocaml/libs/xc: Fix ambiguous documentation comment
    
    Signed-off-by: Edwin Török <edvin.torok@citrix.com>
    Acked-by: Christian Lindig <christian.lindig@citrix.com>
---
 tools/ocaml/libs/xc/xenctrl.mli | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli
index 26ec7e59b1..f7f6ec570d 100644
--- a/tools/ocaml/libs/xc/xenctrl.mli
+++ b/tools/ocaml/libs/xc/xenctrl.mli
@@ -132,8 +132,10 @@ external interface_close : handle -> unit = "stub_xc_interface_close"
  * interface_open and interface_close or with_intf although mixing both
  * is possible *)
 val with_intf : (handle -> 'a) -> 'a
+
 (** [get_handle] returns the global handle used by [with_intf] *)
 val get_handle: unit -> handle option
+
 (** [close handle] closes the handle maintained by [with_intf]. This
  * should only be closed before process exit. It must not be called from
  * a function called directly or indirectly by with_intf as this
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 16:44:18 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 16:44:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k84ig-0001EL-1Q; Tue, 18 Aug 2020 16:44:18 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k84ie-0001E8-NX
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:16 +0000
X-Inumbo-ID: cf039dc9-8ef5-48b1-95c0-fb3949ed1e77
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id cf039dc9-8ef5-48b1-95c0-fb3949ed1e77;
 Tue, 18 Aug 2020 16:44:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=6RYWlMARbMSvAI/yliwU7Ja6p4dvGuN9OPp6qKG6Foc=; b=aqlmzsZ/7DSKd3IHN6V/BbiBPI
 cVHV1FA9lAiSzLXE3I5H+f5Ebok74gEzeNeYklQDANgk4ZReNmQUO5W48Apa1xICjOUtq5X3xPINX
 qbk1PyuBVBmQJc3H0NtPOoq9chvrFet7a0CbiSpiJiH2wiu2QBKNQKnUI2+fi9u/MpTQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84id-00016m-5o
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84id-0006QE-52
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/ocaml/xenstored: drop select based socket watching
Message-Id: <E1k84id-0006QE-52@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 16:44:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 80a868f0f6ccffee5843cbf1ad880ffcb76267a2
Author:     Edwin Török <edvin.torok@citrix.com>
AuthorDate: Mon Aug 17 19:45:47 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    tools/ocaml/xenstored: drop select based socket watching
    
    Poll has been the default since 2014, I think we can safely say by now
    that poll() works and we don't need to fall back to select().
    
    This will allow fixing up the way we call poll to be more efficient
    (and pave the way for introducing epoll support):
    currently poll wraps the select API, which is inefficient.
    
    Signed-off-by: Edwin Török <edvin.torok@citrix.com>
    Acked-by: Christian Lindig <christian.lindig@citrix.com>
---
 tools/ocaml/xenstored/Makefile     | 12 +++---
 tools/ocaml/xenstored/parse_arg.ml |  7 +---
 tools/ocaml/xenstored/poll.ml      | 67 +++++++++++++++++++++++++++++++++
 tools/ocaml/xenstored/poll.mli     | 19 ++++++++++
 tools/ocaml/xenstored/select.ml    | 77 --------------------------------------
 tools/ocaml/xenstored/select.mli   | 27 -------------
 tools/ocaml/xenstored/xenstored.ml |  4 +-
 7 files changed, 95 insertions(+), 118 deletions(-)

diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile
index 68d35c483a..692a62584e 100644
--- a/tools/ocaml/xenstored/Makefile
+++ b/tools/ocaml/xenstored/Makefile
@@ -18,12 +18,12 @@ OCAMLINCLUDE += \
 	-I $(OCAML_TOPLEVEL)/libs/xc \
 	-I $(OCAML_TOPLEVEL)/libs/eventchn
 
-LIBS = syslog.cma syslog.cmxa select.cma select.cmxa
+LIBS = syslog.cma syslog.cmxa poll.cma poll.cmxa
 syslog_OBJS = syslog
 syslog_C_OBJS = syslog_stubs
-select_OBJS = select
-select_C_OBJS = select_stubs
-OCAML_LIBRARY = syslog select
+poll_OBJS = poll
+poll_C_OBJS = select_stubs
+OCAML_LIBRARY = syslog poll
 
 LIBS += systemd.cma systemd.cmxa
 systemd_OBJS = systemd
@@ -58,13 +58,13 @@ OBJS = paths \
 	process \
 	xenstored
 
-INTF = symbol.cmi trie.cmi syslog.cmi systemd.cmi select.cmi
+INTF = symbol.cmi trie.cmi syslog.cmi systemd.cmi poll.cmi
 
 XENSTOREDLIBS = \
 	unix.cmxa \
 	-ccopt -L -ccopt . syslog.cmxa \
 	-ccopt -L -ccopt . systemd.cmxa \
-	-ccopt -L -ccopt . select.cmxa \
+	-ccopt -L -ccopt . poll.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/mmap $(OCAML_TOPLEVEL)/libs/mmap/xenmmap.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/eventchn $(OCAML_TOPLEVEL)/libs/eventchn/xeneventchn.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xc $(OCAML_TOPLEVEL)/libs/xc/xenctrl.cmxa \
diff --git a/tools/ocaml/xenstored/parse_arg.ml b/tools/ocaml/xenstored/parse_arg.ml
index 1803c3eda0..2c4b5a8528 100644
--- a/tools/ocaml/xenstored/parse_arg.ml
+++ b/tools/ocaml/xenstored/parse_arg.ml
@@ -25,7 +25,6 @@ type config =
 	tracefile: string option; (* old xenstored compatibility *)
 	restart: bool;
 	disable_socket: bool;
-	use_select: bool;
 }
 
 let do_argv =
@@ -37,7 +36,7 @@ let do_argv =
 	and config_file = ref ""
 	and restart = ref false
 	and disable_socket = ref false
-	and use_select = ref false in
+	in
 
 	let speclist =
 		[ ("--no-domain-init", Arg.Unit (fun () -> domain_init := false),
@@ -54,9 +53,8 @@ let do_argv =
 		  ("-T", Arg.Set_string tracefile, ""); (* for compatibility *)
 		  ("--restart", Arg.Set restart, "Read database on starting");
 		  ("--disable-socket", Arg.Unit (fun () -> disable_socket := true), "Disable socket");
-		  ("--use-select", Arg.Unit (fun () -> use_select := true), "Use select instead of poll"); (* for backward compatibility and testing *)
 		] in
-	let usage_msg = "usage : xenstored [--config-file <filename>] [--no-domain-init] [--help] [--no-fork] [--reraise-top-level] [--restart] [--disable-socket] [--use-select]" in
+	let usage_msg = "usage : xenstored [--config-file <filename>] [--no-domain-init] [--help] [--no-fork] [--reraise-top-level] [--restart] [--disable-socket]" in
 	Arg.parse speclist (fun _ -> ()) usage_msg;
 	{
 		domain_init = !domain_init;
@@ -68,5 +66,4 @@ let do_argv =
 		tracefile = if !tracefile <> "" then Some !tracefile else None;
 		restart = !restart;
 		disable_socket = !disable_socket;
-		use_select = !use_select;
 	}
diff --git a/tools/ocaml/xenstored/poll.ml b/tools/ocaml/xenstored/poll.ml
new file mode 100644
index 0000000000..26f8620dfc
--- /dev/null
+++ b/tools/ocaml/xenstored/poll.ml
@@ -0,0 +1,67 @@
+(*
+ * Copyright (C) 2014 Zheng Li <dev@zheng.li>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *)
+
+
+(* The [read], [write], [except] are fields mapped to the POLLIN/OUT/PRI
+   subscription flags used by poll, which have a correspondence to the
+   readfds, writefds, exceptfds concept as in select. *)
+type event = {
+	mutable read: bool;
+	mutable write: bool;
+	mutable except: bool;
+}
+
+external select_on_poll: (Unix.file_descr * event) array -> int -> int = "stub_select_on_poll"
+external set_fd_limit: int -> unit = "stub_set_fd_limit"
+
+(* The rlim_max given to setrlimit must not go above the system level nr_open,
+   which we can read from /proc/sys. *)
+let get_sys_fs_nr_open () =
+	try
+		let ch = open_in "/proc/sys/fs/nr_open" in
+		let v = int_of_string (input_line ch) in
+		close_in_noerr ch; v
+	with _ -> 1024 * 1024
+
+let init_event () = {read = false; write = false; except = false}
+
+let poll_select in_fds out_fds exc_fds timeout =
+	let h = Hashtbl.create 57 in
+	let add_event event_set fd =
+		let e =
+			try Hashtbl.find h fd
+			with Not_found ->
+				let e = init_event () in
+				Hashtbl.add h fd e; e in
+		event_set e in
+	List.iter (add_event (fun x -> x.read <- true)) in_fds;
+	List.iter (add_event (fun x -> x.write <- true)) out_fds;
+	List.iter (add_event (fun x -> x.except <- true)) exc_fds;
+	(* Unix.stdin and init_event are dummy input as stubs, which will
+           always be overwritten later on.  *)
+	let a = Array.make (Hashtbl.length h) (Unix.stdin, init_event ()) in
+	let i = ref (-1) in
+	Hashtbl.iter (fun fd event -> incr i; Array.set a !i (fd, event)) h;
+	let n = select_on_poll a (int_of_float (timeout *. 1000.)) in
+	let r = [], [], [] in
+	if n = 0 then r else
+		Array.fold_right
+			(fun (fd, event) (r, w, x) ->
+			 (if event.read then fd :: r else r),
+			 (if event.write then fd :: w else w),
+			 (if event.except then fd :: x else x))
+			a r
+
+let () =
+        set_fd_limit (get_sys_fs_nr_open ())
diff --git a/tools/ocaml/xenstored/poll.mli b/tools/ocaml/xenstored/poll.mli
new file mode 100644
index 0000000000..f73465b99f
--- /dev/null
+++ b/tools/ocaml/xenstored/poll.mli
@@ -0,0 +1,19 @@
+(*
+ * Copyright (C) 2014 Zheng Li <dev@zheng.li>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *)
+
+
+(** Same interface and semantics as [Unix.select], implemented using poll(3). *)
+val poll_select:
+	Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> float
+	-> Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
diff --git a/tools/ocaml/xenstored/select.ml b/tools/ocaml/xenstored/select.ml
deleted file mode 100644
index 0455e163e3..0000000000
--- a/tools/ocaml/xenstored/select.ml
+++ /dev/null
@@ -1,77 +0,0 @@
-(*
- * Copyright (C) 2014 Zheng Li <dev@zheng.li>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *)
-
-
-(* The [read], [write], [except] are fields mapped to the POLLIN/OUT/PRI
-   subscription flags used by poll, which have a correspondence to the
-   readfds, writefds, exceptfds concept as in select. *)
-type event = {
-	mutable read: bool;
-	mutable write: bool;
-	mutable except: bool;
-}
-
-external select_on_poll: (Unix.file_descr * event) array -> int -> int = "stub_select_on_poll"
-external set_fd_limit: int -> unit = "stub_set_fd_limit"
-
-(* The rlim_max given to setrlimit must not go above the system level nr_open,
-   which we can read from /proc/sys. *)
-let get_sys_fs_nr_open () =
-	try
-		let ch = open_in "/proc/sys/fs/nr_open" in
-		let v = int_of_string (input_line ch) in
-		close_in_noerr ch; v
-	with _ -> 1024 * 1024
-
-let init_event () = {read = false; write = false; except = false}
-
-let poll_select in_fds out_fds exc_fds timeout =
-	let h = Hashtbl.create 57 in
-	let add_event event_set fd =
-		let e =
-			try Hashtbl.find h fd
-			with Not_found ->
-				let e = init_event () in
-				Hashtbl.add h fd e; e in
-		event_set e in
-	List.iter (add_event (fun x -> x.read <- true)) in_fds;
-	List.iter (add_event (fun x -> x.write <- true)) out_fds;
-	List.iter (add_event (fun x -> x.except <- true)) exc_fds;
-	(* Unix.stdin and init_event are dummy input as stubs, which will
-           always be overwritten later on.  *)
-	let a = Array.make (Hashtbl.length h) (Unix.stdin, init_event ()) in
-	let i = ref (-1) in
-	Hashtbl.iter (fun fd event -> incr i; Array.set a !i (fd, event)) h;
-	let n = select_on_poll a (int_of_float (timeout *. 1000.)) in
-	let r = [], [], [] in
-	if n = 0 then r else
-		Array.fold_right
-			(fun (fd, event) (r, w, x) ->
-			 (if event.read then fd :: r else r),
-			 (if event.write then fd :: w else w),
-			 (if event.except then fd :: x else x))
-			a r
-
-(* If the use_poll function is not called at all, we default to the original Unix.select behavior *)
-let select_fun = ref Unix.select
-
-let use_poll yes =
-	let sel_fun, max_fd =
-		if yes then poll_select, get_sys_fs_nr_open ()
-		else Unix.select, 1024 in
-	select_fun := sel_fun;
-	set_fd_limit max_fd
-
-let select in_fds out_fds exc_fds timeout =
-	(!select_fun) in_fds out_fds exc_fds timeout
diff --git a/tools/ocaml/xenstored/select.mli b/tools/ocaml/xenstored/select.mli
deleted file mode 100644
index 3912779172..0000000000
--- a/tools/ocaml/xenstored/select.mli
+++ /dev/null
@@ -1,27 +0,0 @@
-(*
- * Copyright (C) 2014 Zheng Li <dev@zheng.li>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *)
-
-
-(** Same interface and semantics as [Unix.select] but with an extra alternative
-    implementation based on poll. Switching implementations is done by calling
-     the [use_poll] function. *)
-val select:
-	Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> float
-	-> Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
-
-(** [use_poll true] will use poll based select with max fds number limitation
-   eliminated; [use_poll false] will use standard [Unix.select] with max fd
-   number set to 1024; not calling this function at all equals to use the
-   standard [Unix.select] with max fd number setting untouched. *)
-val use_poll: bool -> unit
diff --git a/tools/ocaml/xenstored/xenstored.ml b/tools/ocaml/xenstored/xenstored.ml
index a4466c5b5c..5b96f1852a 100644
--- a/tools/ocaml/xenstored/xenstored.ml
+++ b/tools/ocaml/xenstored/xenstored.ml
@@ -308,8 +308,6 @@ let _ =
 		);
 	);
 
-	Select.use_poll (not cf.use_select);
-
 	Sys.set_signal Sys.sighup (Sys.Signal_handle sighup_handler);
 	Sys.set_signal Sys.sigterm (Sys.Signal_handle (fun _ -> quit := true));
 	Sys.set_signal Sys.sigusr1 (Sys.Signal_handle (fun _ -> sigusr1_handler store));
@@ -453,7 +451,7 @@ let _ =
 		let inset, outset = Connections.select ~only_if:is_peaceful cons in
 		let rset, wset, _ =
 		try
-			Select.select (spec_fds @ inset) outset [] timeout
+			Poll.poll_select (spec_fds @ inset) outset [] timeout
 		with Unix.Unix_error(Unix.EINTR, _, _) ->
 			[], [], [] in
 		let sfds, cfds =
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 16:44:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 16:44:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k84ip-0001G6-4q; Tue, 18 Aug 2020 16:44:27 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k84io-0001Ft-Ai
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:26 +0000
X-Inumbo-ID: 4aee2510-c382-4f1d-9c21-af20d0b779df
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 4aee2510-c382-4f1d-9c21-af20d0b779df;
 Tue, 18 Aug 2020 16:44:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=77+zblyLY89UgQrryuv0oa2djOFa1uzATppN+dk3IkE=; b=xuVvAv9muXG/QB5hZGmmdlr80f
 GdFA4GWB4G6Wmnvpi+gJwGRo9b84fmoIMzjIY/AAQjj2JEN2yYxu9KLTCqhqP7IahhZC/triJcw7B
 XHxXpQpVjvvG2fyo+RqxnxrjZDTnMYHMRMdvzQaXiSEP8XsGf2VoB6/p9bbBhaF4UmZc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84in-00016u-BE
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84in-0006Qk-7y
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/pv: handle writes to the EFER MSR
Message-Id: <E1k84in-0006Qk-7y@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 16:44:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit feab5bddf771f04ec5e5fbe4c704db740e8401ab
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Mon Aug 17 17:57:52 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    x86/pv: handle writes to the EFER MSR
    
    Silently drop writes to the EFER MSR for PV guests if the value is not
    changed from what it's being reported. Current PV Linux will attempt
    to write to the MSR with the same value that's been read, and raising
    a fault will result in a guest crash.
    
    As part of this work introduce a helper to easily get the EFER value
    reported to guests.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/emul-priv-op.c | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index efeb2a727e..d1d16b4806 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -837,6 +837,23 @@ static inline bool is_cpufreq_controller(const struct domain *d)
             is_hardware_domain(d));
 }
 
+static uint64_t guest_efer(const struct domain *d)
+{
+    uint64_t val;
+
+    /* Hide unknown bits, and unconditionally hide SVME from guests. */
+    val = read_efer() & EFER_KNOWN_MASK & ~EFER_SVME;
+    /*
+     * Hide the 64-bit features from 32-bit guests.  SCE has
+     * vendor-dependent behaviour.
+     */
+    if ( is_pv_32bit_domain(d) )
+        val &= ~(EFER_LME | EFER_LMA |
+                 (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL
+                  ? EFER_SCE : 0));
+    return val;
+}
+
 static int read_msr(unsigned int reg, uint64_t *val,
                     struct x86_emulate_ctxt *ctxt)
 {
@@ -880,16 +897,7 @@ static int read_msr(unsigned int reg, uint64_t *val,
         return X86EMUL_OKAY;
 
     case MSR_EFER:
-        /* Hide unknown bits, and unconditionally hide SVME from guests. */
-        *val = read_efer() & EFER_KNOWN_MASK & ~EFER_SVME;
-        /*
-         * Hide the 64-bit features from 32-bit guests.  SCE has
-         * vendor-dependent behaviour.
-         */
-        if ( is_pv_32bit_domain(currd) )
-            *val &= ~(EFER_LME | EFER_LMA |
-                      (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL
-                       ? EFER_SCE : 0));
+        *val = guest_efer(currd);
         return X86EMUL_OKAY;
 
     case MSR_K7_FID_VID_CTL:
@@ -1005,6 +1013,15 @@ static int write_msr(unsigned int reg, uint64_t val,
         curr->arch.pv.gs_base_user = val;
         return X86EMUL_OKAY;
 
+    case MSR_EFER:
+        /*
+         * Reject writes which change the value, but Linux depends on being
+         * able to write back the current value.
+         */
+        if ( val != guest_efer(currd) )
+            break;
+        return X86EMUL_OKAY;
+
     case MSR_K7_FID_VID_STATUS:
     case MSR_K7_FID_VID_CTL:
     case MSR_K8_PSTATE_LIMIT:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 16:44:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 16:44:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k84iz-0001HU-6S; Tue, 18 Aug 2020 16:44:37 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k84iy-0001HE-6q
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:36 +0000
X-Inumbo-ID: ae3cdd79-c4e9-4f67-948b-2f8c2407a478
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id ae3cdd79-c4e9-4f67-948b-2f8c2407a478;
 Tue, 18 Aug 2020 16:44:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=e+qp3PkP+31PI/H0K+d9mFd2ns94UPPnssgHxBskDFw=; b=GdApXY101BCzVz4DcAw3QFPm4J
 PjxDKq88LoIZmoa9eXGRpp881xvObjpx+55ndpSdXrDjZ2JngZ1N5UIqLPsGAIU9gwV1Je8TFcerS
 eRYGGO8JRGpDNDjnAmtb0FRvq9ND8rA51SHZxittt7FoUqIM+1y+YUpe5gwBk3Qm8UqI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84ix-000176-EA
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84ix-0006RG-DN
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/pv: handle reads to the PAT MSR
Message-Id: <E1k84ix-0006RG-DN@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 16:44:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ba28efb242341c35da30251943c352b6e00bf425
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Mon Aug 17 17:57:53 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    x86/pv: handle reads to the PAT MSR
    
    The value in the PAT MSR is part of the ABI between Xen and PV guests,
    and there's no reason to not allow a PV guest to read it.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/emul-priv-op.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index d1d16b4806..971ba9e58c 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -900,6 +900,10 @@ static int read_msr(unsigned int reg, uint64_t *val,
         *val = guest_efer(currd);
         return X86EMUL_OKAY;
 
+    case MSR_IA32_CR_PAT:
+        *val = XEN_MSR_PAT;
+        return X86EMUL_OKAY;
+
     case MSR_K7_FID_VID_CTL:
     case MSR_K7_FID_VID_STATUS:
     case MSR_K8_PSTATE_LIMIT:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 18 16:44:47 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 18 Aug 2020 16:44:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k84j9-0001K0-9l; Tue, 18 Aug 2020 16:44:47 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=J94m=B4=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k84j8-0001Iz-8I
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:46 +0000
X-Inumbo-ID: 3dbb553e-ecbd-4986-8824-a98484383eca
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 3dbb553e-ecbd-4986-8824-a98484383eca;
 Tue, 18 Aug 2020 16:44:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=E76J0js57e/Ghv/0ypxMplliZjam0XxDyuqUKaWr7iA=; b=FlZF+0eUgvN4SSDgx3EP7ZLD60
 0RhsY1iP/DVpFUnDEZBwa5spoe6RAtERFsvoUSe+wx3pLUIxPhE0Zqcvy1i6L+hZ5+Y/9pLlCPjjZ
 FLzsFkWMjhDiIxkXrhb/KNWiIPgfMu+pmjvHqInqDLipsUxlMzFeJQRDk+vw86R5w0fA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84j7-00017G-HM
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k84j7-0006SA-Gb
 for xen-changelog@lists.xenproject.org; Tue, 18 Aug 2020 16:44:45 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/pv: allow reading APIC_BASE MSR
Message-Id: <E1k84j7-0006SA-Gb@xenbits.xenproject.org>
Date: Tue, 18 Aug 2020 16:44:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a825751f633482c0634ebb7c7b7ba33acadcfe7b
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Mon Aug 17 17:57:54 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    x86/pv: allow reading APIC_BASE MSR
    
    Linux PV guests will attempt to read the APIC_BASE MSR, so just report
    a default value to make Linux happy.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/emul-priv-op.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index 971ba9e58c..bcc1188f6a 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -872,6 +872,13 @@ static int read_msr(unsigned int reg, uint64_t *val,
 
     switch ( reg )
     {
+    case MSR_APIC_BASE:
+        /* Linux PV guests will attempt to read APIC_BASE. */
+        *val = APIC_BASE_ENABLE | APIC_DEFAULT_PHYS_BASE;
+        if ( !curr->vcpu_id )
+            *val |= APIC_BASE_BSP;
+        return X86EMUL_OKAY;
+
     case MSR_FS_BASE:
         if ( is_pv_32bit_domain(currd) )
             break;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 19 09:11:18 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 19 Aug 2020 09:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k8K7p-0002kx-Qs; Wed, 19 Aug 2020 09:11:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=uZ09=B5=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k8K7o-0002kj-Em
 for xen-changelog@lists.xenproject.org; Wed, 19 Aug 2020 09:11:16 +0000
X-Inumbo-ID: 64acdd22-6361-4ea3-8a45-9e8825a8bc2d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 64acdd22-6361-4ea3-8a45-9e8825a8bc2d;
 Wed, 19 Aug 2020 09:11:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=BYW9lKZCuZc+3SNaqDaoNjaKQqJ2U9WRTMIw4ShwONA=; b=sTo6T9rxSK2D+z7DKWvfIl8L5q
 d5drV3hMyqRkkn/9ZaofJH46/nIxCfRTbJYjf1jqKrkSaePhkYbPNk//7aLDVVrEGiHZ8ZYsSAvyv
 Yf6LJpo/OGdcU+tRLOIvz7ryl9IeJ2CrsSQ+k+Iavr/OuAT2ft78u+nDABEz2ASJ0MBs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8K7n-0003XV-Ac
 for xen-changelog@lists.xenproject.org; Wed, 19 Aug 2020 09:11:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8K7n-00060w-8q
 for xen-changelog@lists.xenproject.org; Wed, 19 Aug 2020 09:11:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: move cpu_{up,down}_helper()
Message-Id: <E1k8K7n-00060w-8q@xenbits.xenproject.org>
Date: Wed, 19 Aug 2020 09:11:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit f9d67340b4aa254f64b40f2031720f61a33c2904
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 19 11:09:38 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 19 11:09:38 2020 +0200

    x86: move cpu_{up,down}_helper()
    
    This is in preparation of making the building of sysctl.c conditional.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/smp.c    | 34 ++++++++++++++++++++++++++++++++++
 xen/arch/x86/sysctl.c | 33 ---------------------------------
 2 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c
index 6f1aaa2106..14aa355a6b 100644
--- a/xen/arch/x86/smp.c
+++ b/xen/arch/x86/smp.c
@@ -22,6 +22,7 @@
 #include <asm/hardirq.h>
 #include <asm/hpet.h>
 #include <asm/hvm/support.h>
+#include <asm/setup.h>
 #include <irq_vectors.h>
 #include <mach_apic.h>
 
@@ -396,3 +397,36 @@ void call_function_interrupt(struct cpu_user_regs *regs)
     perfc_incr(ipis);
     smp_call_function_interrupt();
 }
+
+long cpu_up_helper(void *data)
+{
+    unsigned int cpu = (unsigned long)data;
+    int ret = cpu_up(cpu);
+
+    /* Have one more go on EBUSY. */
+    if ( ret == -EBUSY )
+        ret = cpu_up(cpu);
+
+    if ( !ret && !opt_smt &&
+         cpu_data[cpu].compute_unit_id == INVALID_CUID &&
+         cpumask_weight(per_cpu(cpu_sibling_mask, cpu)) > 1 )
+    {
+        ret = cpu_down_helper(data);
+        if ( ret )
+            printk("Could not re-offline CPU%u (%d)\n", cpu, ret);
+        else
+            ret = -EPERM;
+    }
+
+    return ret;
+}
+
+long cpu_down_helper(void *data)
+{
+    int cpu = (unsigned long)data;
+    int ret = cpu_down(cpu);
+    /* Have one more go on EBUSY. */
+    if ( ret == -EBUSY )
+        ret = cpu_down(cpu);
+    return ret;
+}
diff --git a/xen/arch/x86/sysctl.c b/xen/arch/x86/sysctl.c
index b0cb1b57e7..aff52a13f3 100644
--- a/xen/arch/x86/sysctl.c
+++ b/xen/arch/x86/sysctl.c
@@ -79,39 +79,6 @@ static void l3_cache_get(void *arg)
         l3_info->size = info.size / 1024; /* in KB unit */
 }
 
-long cpu_up_helper(void *data)
-{
-    unsigned int cpu = (unsigned long)data;
-    int ret = cpu_up(cpu);
-
-    /* Have one more go on EBUSY. */
-    if ( ret == -EBUSY )
-        ret = cpu_up(cpu);
-
-    if ( !ret && !opt_smt &&
-         cpu_data[cpu].compute_unit_id == INVALID_CUID &&
-         cpumask_weight(per_cpu(cpu_sibling_mask, cpu)) > 1 )
-    {
-        ret = cpu_down_helper(data);
-        if ( ret )
-            printk("Could not re-offline CPU%u (%d)\n", cpu, ret);
-        else
-            ret = -EPERM;
-    }
-
-    return ret;
-}
-
-long cpu_down_helper(void *data)
-{
-    int cpu = (unsigned long)data;
-    int ret = cpu_down(cpu);
-    /* Have one more go on EBUSY. */
-    if ( ret == -EBUSY )
-        ret = cpu_down(cpu);
-    return ret;
-}
-
 static long smt_up_down_helper(void *data)
 {
     bool up = (bool)data;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 19 09:11:18 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 19 Aug 2020 09:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k8K7l-0002kT-PR; Wed, 19 Aug 2020 09:11:13 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=uZ09=B5=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k8K7k-0002k4-I7
 for xen-changelog@lists.xenproject.org; Wed, 19 Aug 2020 09:11:12 +0000
X-Inumbo-ID: e5de0f25-895c-47b0-90e3-6b0254499ab3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id e5de0f25-895c-47b0-90e3-6b0254499ab3;
 Wed, 19 Aug 2020 09:11:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=wi9Qee/6neIdBHLcF2WAJongE+o8/BTMvqTtRDLJy8M=; b=eTvmgI5es+HRImzQ73GrvcIgTh
 cqsd5LHWR1M0zav7ACgj/WMu71V6jY75kqWlOeokqprA+9CF9PgP4oB7Y/qh3hIy8GMLLjy2gucLc
 uU7qh1CzzTDNA7YuaroMNSuC1eQsEAPim97fX/XI1Vdu9c7o1Q3UrkAncK0AQ5sPdFMM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8K7d-0003XQ-6g
 for xen-changelog@lists.xenproject.org; Wed, 19 Aug 2020 09:11:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8K7d-0005zy-4O
 for xen-changelog@lists.xenproject.org; Wed, 19 Aug 2020 09:11:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: move domain_cpu_policy_changed()
Message-Id: <E1k8K7d-0005zy-4O@xenbits.xenproject.org>
Date: Wed, 19 Aug 2020 09:11:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 46a5f4fb5a973b10809d6d5438c1ddb419de5496
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 19 11:08:46 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 19 11:08:46 2020 +0200

    x86: move domain_cpu_policy_changed()
    
    This is in preparation of making the building of domctl.c conditional.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/domain.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++
 xen/arch/x86/domctl.c | 167 --------------------------------------------------
 2 files changed, 167 insertions(+), 167 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index d1ecc7b83b..00ef05b4af 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -294,6 +294,173 @@ void update_guest_memory_policy(struct vcpu *v,
     }
 }
 
+void domain_cpu_policy_changed(struct domain *d)
+{
+    const struct cpuid_policy *p = d->arch.cpuid;
+    struct vcpu *v;
+
+    if ( is_pv_domain(d) )
+    {
+        if ( ((levelling_caps & LCAP_1cd) == LCAP_1cd) )
+        {
+            uint64_t mask = cpuidmask_defaults._1cd;
+            uint32_t ecx = p->basic._1c;
+            uint32_t edx = p->basic._1d;
+
+            /*
+             * Must expose hosts HTT and X2APIC value so a guest using native
+             * CPUID can correctly interpret other leaves which cannot be
+             * masked.
+             */
+            if ( cpu_has_x2apic )
+                ecx |= cpufeat_mask(X86_FEATURE_X2APIC);
+            if ( cpu_has_htt )
+                edx |= cpufeat_mask(X86_FEATURE_HTT);
+
+            switch ( boot_cpu_data.x86_vendor )
+            {
+            case X86_VENDOR_INTEL:
+                /*
+                 * Intel masking MSRs are documented as AND masks.
+                 * Experimentally, they are applied after OSXSAVE and APIC
+                 * are fast-forwarded from real hardware state.
+                 */
+                mask &= ((uint64_t)edx << 32) | ecx;
+
+                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
+                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
+                else
+                    ecx = 0;
+                edx = cpufeat_mask(X86_FEATURE_APIC);
+
+                mask |= ((uint64_t)edx << 32) | ecx;
+                break;
+
+            case X86_VENDOR_AMD:
+            case X86_VENDOR_HYGON:
+                mask &= ((uint64_t)ecx << 32) | edx;
+
+                /*
+                 * AMD masking MSRs are documented as overrides.
+                 * Experimentally, fast-forwarding of the OSXSAVE and APIC
+                 * bits from real hardware state only occurs if the MSR has
+                 * the respective bits set.
+                 */
+                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
+                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
+                else
+                    ecx = 0;
+                edx = cpufeat_mask(X86_FEATURE_APIC);
+
+                /*
+                 * If the Hypervisor bit is set in the policy, we can also
+                 * forward it into real CPUID.
+                 */
+                if ( p->basic.hypervisor )
+                    ecx |= cpufeat_mask(X86_FEATURE_HYPERVISOR);
+
+                mask |= ((uint64_t)ecx << 32) | edx;
+                break;
+            }
+
+            d->arch.pv.cpuidmasks->_1cd = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_6c) == LCAP_6c) )
+        {
+            uint64_t mask = cpuidmask_defaults._6c;
+
+            if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
+                mask &= (~0ULL << 32) | p->basic.raw[6].c;
+
+            d->arch.pv.cpuidmasks->_6c = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_7ab0) == LCAP_7ab0) )
+        {
+            uint64_t mask = cpuidmask_defaults._7ab0;
+
+            /*
+             * Leaf 7[0].eax is max_subleaf, not a feature mask.  Take it
+             * wholesale from the policy, but clamp the features in 7[0].ebx
+             * per usual.
+             */
+            if ( boot_cpu_data.x86_vendor &
+                 (X86_VENDOR_AMD | X86_VENDOR_HYGON) )
+                mask = (((uint64_t)p->feat.max_subleaf << 32) |
+                        ((uint32_t)mask & p->feat._7b0));
+
+            d->arch.pv.cpuidmasks->_7ab0 = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_Da1) == LCAP_Da1) )
+        {
+            uint64_t mask = cpuidmask_defaults.Da1;
+            uint32_t eax = p->xstate.Da1;
+
+            if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
+                mask &= (~0ULL << 32) | eax;
+
+            d->arch.pv.cpuidmasks->Da1 = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_e1cd) == LCAP_e1cd) )
+        {
+            uint64_t mask = cpuidmask_defaults.e1cd;
+            uint32_t ecx = p->extd.e1c;
+            uint32_t edx = p->extd.e1d;
+
+            /*
+             * Must expose hosts CMP_LEGACY value so a guest using native
+             * CPUID can correctly interpret other leaves which cannot be
+             * masked.
+             */
+            if ( cpu_has_cmp_legacy )
+                ecx |= cpufeat_mask(X86_FEATURE_CMP_LEGACY);
+
+            /*
+             * If not emulating AMD or Hygon, clear the duplicated features
+             * in e1d.
+             */
+            if ( !(p->x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) )
+                edx &= ~CPUID_COMMON_1D_FEATURES;
+
+            switch ( boot_cpu_data.x86_vendor )
+            {
+            case X86_VENDOR_INTEL:
+                mask &= ((uint64_t)edx << 32) | ecx;
+                break;
+
+            case X86_VENDOR_AMD:
+            case X86_VENDOR_HYGON:
+                mask &= ((uint64_t)ecx << 32) | edx;
+
+                /*
+                 * Fast-forward bits - Must be set in the masking MSR for
+                 * fast-forwarding to occur in hardware.
+                 */
+                ecx = 0;
+                edx = cpufeat_mask(X86_FEATURE_APIC);
+
+                mask |= ((uint64_t)ecx << 32) | edx;
+                break;
+            }
+
+            d->arch.pv.cpuidmasks->e1cd = mask;
+        }
+    }
+
+    for_each_vcpu ( d, v )
+    {
+        cpuid_policy_updated(v);
+
+        /* If PMU version is zero then the guest doesn't have VPMU */
+        if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
+             p->basic.pmu_version == 0 )
+            vpmu_destroy(v);
+    }
+}
+
 #ifndef CONFIG_BIGMEM
 /*
  * The hole may be at or above the 44-bit boundary, so we need to determine
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 6f2c69788d..7c644add92 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -49,173 +49,6 @@ static int gdbsx_guest_mem_io(domid_t domid, struct xen_domctl_gdbsx_memio *iop)
 }
 #endif
 
-void domain_cpu_policy_changed(struct domain *d)
-{
-    const struct cpuid_policy *p = d->arch.cpuid;
-    struct vcpu *v;
-
-    if ( is_pv_domain(d) )
-    {
-        if ( ((levelling_caps & LCAP_1cd) == LCAP_1cd) )
-        {
-            uint64_t mask = cpuidmask_defaults._1cd;
-            uint32_t ecx = p->basic._1c;
-            uint32_t edx = p->basic._1d;
-
-            /*
-             * Must expose hosts HTT and X2APIC value so a guest using native
-             * CPUID can correctly interpret other leaves which cannot be
-             * masked.
-             */
-            if ( cpu_has_x2apic )
-                ecx |= cpufeat_mask(X86_FEATURE_X2APIC);
-            if ( cpu_has_htt )
-                edx |= cpufeat_mask(X86_FEATURE_HTT);
-
-            switch ( boot_cpu_data.x86_vendor )
-            {
-            case X86_VENDOR_INTEL:
-                /*
-                 * Intel masking MSRs are documented as AND masks.
-                 * Experimentally, they are applied after OSXSAVE and APIC
-                 * are fast-forwarded from real hardware state.
-                 */
-                mask &= ((uint64_t)edx << 32) | ecx;
-
-                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
-                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
-                else
-                    ecx = 0;
-                edx = cpufeat_mask(X86_FEATURE_APIC);
-
-                mask |= ((uint64_t)edx << 32) | ecx;
-                break;
-
-            case X86_VENDOR_AMD:
-            case X86_VENDOR_HYGON:
-                mask &= ((uint64_t)ecx << 32) | edx;
-
-                /*
-                 * AMD masking MSRs are documented as overrides.
-                 * Experimentally, fast-forwarding of the OSXSAVE and APIC
-                 * bits from real hardware state only occurs if the MSR has
-                 * the respective bits set.
-                 */
-                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
-                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
-                else
-                    ecx = 0;
-                edx = cpufeat_mask(X86_FEATURE_APIC);
-
-                /*
-                 * If the Hypervisor bit is set in the policy, we can also
-                 * forward it into real CPUID.
-                 */
-                if ( p->basic.hypervisor )
-                    ecx |= cpufeat_mask(X86_FEATURE_HYPERVISOR);
-
-                mask |= ((uint64_t)ecx << 32) | edx;
-                break;
-            }
-
-            d->arch.pv.cpuidmasks->_1cd = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_6c) == LCAP_6c) )
-        {
-            uint64_t mask = cpuidmask_defaults._6c;
-
-            if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
-                mask &= (~0ULL << 32) | p->basic.raw[6].c;
-
-            d->arch.pv.cpuidmasks->_6c = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_7ab0) == LCAP_7ab0) )
-        {
-            uint64_t mask = cpuidmask_defaults._7ab0;
-
-            /*
-             * Leaf 7[0].eax is max_subleaf, not a feature mask.  Take it
-             * wholesale from the policy, but clamp the features in 7[0].ebx
-             * per usual.
-             */
-            if ( boot_cpu_data.x86_vendor &
-                 (X86_VENDOR_AMD | X86_VENDOR_HYGON) )
-                mask = (((uint64_t)p->feat.max_subleaf << 32) |
-                        ((uint32_t)mask & p->feat._7b0));
-
-            d->arch.pv.cpuidmasks->_7ab0 = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_Da1) == LCAP_Da1) )
-        {
-            uint64_t mask = cpuidmask_defaults.Da1;
-            uint32_t eax = p->xstate.Da1;
-
-            if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
-                mask &= (~0ULL << 32) | eax;
-
-            d->arch.pv.cpuidmasks->Da1 = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_e1cd) == LCAP_e1cd) )
-        {
-            uint64_t mask = cpuidmask_defaults.e1cd;
-            uint32_t ecx = p->extd.e1c;
-            uint32_t edx = p->extd.e1d;
-
-            /*
-             * Must expose hosts CMP_LEGACY value so a guest using native
-             * CPUID can correctly interpret other leaves which cannot be
-             * masked.
-             */
-            if ( cpu_has_cmp_legacy )
-                ecx |= cpufeat_mask(X86_FEATURE_CMP_LEGACY);
-
-            /*
-             * If not emulating AMD or Hygon, clear the duplicated features
-             * in e1d.
-             */
-            if ( !(p->x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) )
-                edx &= ~CPUID_COMMON_1D_FEATURES;
-
-            switch ( boot_cpu_data.x86_vendor )
-            {
-            case X86_VENDOR_INTEL:
-                mask &= ((uint64_t)edx << 32) | ecx;
-                break;
-
-            case X86_VENDOR_AMD:
-            case X86_VENDOR_HYGON:
-                mask &= ((uint64_t)ecx << 32) | edx;
-
-                /*
-                 * Fast-forward bits - Must be set in the masking MSR for
-                 * fast-forwarding to occur in hardware.
-                 */
-                ecx = 0;
-                edx = cpufeat_mask(X86_FEATURE_APIC);
-
-                mask |= ((uint64_t)ecx << 32) | edx;
-                break;
-            }
-
-            d->arch.pv.cpuidmasks->e1cd = mask;
-        }
-    }
-
-    for_each_vcpu ( d, v )
-    {
-        cpuid_policy_updated(v);
-
-        /* If PMU version is zero then the guest doesn't have VPMU */
-        if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
-             p->basic.pmu_version == 0 )
-            vpmu_destroy(v);
-    }
-}
-
 static int update_domain_cpu_policy(struct domain *d,
                                     xen_domctl_cpu_policy_t *xdpc)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 20 09:33:11 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 20 Aug 2020 09:33:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k8gwU-0006qk-QH; Thu, 20 Aug 2020 09:33:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=ULg8=B6=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k8gwU-0006qa-4r
 for xen-changelog@lists.xenproject.org; Thu, 20 Aug 2020 09:33:06 +0000
X-Inumbo-ID: f10b94d8-2153-4f60-9954-7cc91ee7c6af
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id f10b94d8-2153-4f60-9954-7cc91ee7c6af;
 Thu, 20 Aug 2020 09:33:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=T8SanOdN3KmiHDr5Bxr7a3jvf2RLeWifW4sTXM/B3ag=; b=jI8DNFbRZJ+pOgpm7YJefC6SVx
 xKCIXQ/oNg8p9KchuGFXAYTOV648GxaSl7Guy7eq0bnGRnYcpz2MC2MCI8/HjHcRpXmIIWHUuW1iS
 /RONDwLJ2X/xHkyan0ZZcR7QLUYAokp6ES37FGXXYNht9pJtnQDpvDqTUErfHWDK9Yv8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8gwT-0007S3-7V
 for xen-changelog@lists.xenproject.org; Thu, 20 Aug 2020 09:33:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8gwT-0004CS-6D
 for xen-changelog@lists.xenproject.org; Thu, 20 Aug 2020 09:33:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] arm: Add Neoverse N1 processor identification
Message-Id: <E1k8gwT-0004CS-6D@xenbits.xenproject.org>
Date: Thu, 20 Aug 2020 09:33:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 3b418b33265402aab0cb1bf2b745a25724bae2d8
Author:     Bertrand Marquis <bertrand.marquis@arm.com>
AuthorDate: Tue Aug 18 14:47:38 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Thu Aug 20 10:19:30 2020 +0100

    arm: Add Neoverse N1 processor identification
    
    Add MIDR and CPU part numbers for Neoverse N1
    
    Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/include/asm-arm/processor.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index aa642e3ab2..3ca67f8157 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -58,6 +58,7 @@
 #define ARM_CPU_PART_CORTEX_A73     0xD09
 #define ARM_CPU_PART_CORTEX_A75     0xD0A
 #define ARM_CPU_PART_CORTEX_A76     0xD0B
+#define ARM_CPU_PART_NEOVERSE_N1    0xD0C
 
 #define MIDR_CORTEX_A12 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A12)
 #define MIDR_CORTEX_A17 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A17)
@@ -68,6 +69,7 @@
 #define MIDR_CORTEX_A73 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A73)
 #define MIDR_CORTEX_A75 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A75)
 #define MIDR_CORTEX_A76 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76)
+#define MIDR_NEOVERSE_N1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N1)
 
 /* MPIDR Multiprocessor Affinity Register */
 #define _MPIDR_UP           (30)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 20 09:33:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 20 Aug 2020 09:33:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k8gwe-0006sD-Rt; Thu, 20 Aug 2020 09:33:16 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=ULg8=B6=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k8gwe-0006s6-5e
 for xen-changelog@lists.xenproject.org; Thu, 20 Aug 2020 09:33:16 +0000
X-Inumbo-ID: 0fc32ddc-9eb3-420b-8091-c63eedbec42d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 0fc32ddc-9eb3-420b-8091-c63eedbec42d;
 Thu, 20 Aug 2020 09:33:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=b37TTu1wYifYdkdsbsHfKvmtTlxMRliTcr5FVeh5vlk=; b=ExNg6kBYqFqEZr4iasHkT9hRU/
 uIusMfVY1dcf3eXe92gKfNePsVu6wlOELZHd2YTgmVNqp0X8btf92Ph3wX0jXCagIfEdDWWavAbpe
 Afpxsv2srwYg80EPcX79UEwxKQq278PQ8DYYxUMMxHC9K5/+MCwbtK6gKTOrkA/zAgO0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8gwd-0007SF-Bv
 for xen-changelog@lists.xenproject.org; Thu, 20 Aug 2020 09:33:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k8gwd-0004D0-9c
 for xen-changelog@lists.xenproject.org; Thu, 20 Aug 2020 09:33:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] xen/arm: Enable CPU Erratum 1165522 for Neoverse
Message-Id: <E1k8gwd-0004D0-9c@xenbits.xenproject.org>
Date: Thu, 20 Aug 2020 09:33:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 858c0be8c2fa4125a0fa0acaa03ae730e5c7cb3c
Author:     Bertrand Marquis <bertrand.marquis@arm.com>
AuthorDate: Tue Aug 18 14:47:39 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Thu Aug 20 10:19:50 2020 +0100

    xen/arm: Enable CPU Erratum 1165522 for Neoverse
    
    Enable CPU erratum of Speculative AT on the Neoverse N1 processor
    versions r0p0 to r2p0.
    Also Fix Cortex A76 Erratum string which had a wrong errata number.
    
    Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/cpuerrata.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 0248893de0..6c09017515 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -476,9 +476,15 @@ static const struct arm_cpu_capabilities arm_errata[] = {
         .matches = has_ssbd_mitigation,
     },
 #endif
+    {
+        /* Neoverse r0p0 - r2p0 */
+        .desc = "ARM erratum 1165522",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_RANGE(MIDR_NEOVERSE_N1, 0, 2 << MIDR_VARIANT_SHIFT),
+    },
     {
         /* Cortex-A76 r0p0 - r2p0 */
-        .desc = "ARM erratum 116522",
+        .desc = "ARM erratum 1165522",
         .capability = ARM64_WORKAROUND_AT_SPECULATE,
         MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT),
     },
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:55:10 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:55:10 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MUa-0007da-Qh; Sat, 22 Aug 2020 05:55:04 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MUZ-0007dQ-V4
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:03 +0000
X-Inumbo-ID: a38a65e7-d035-4422-ba41-f354f1d3b5b6
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id a38a65e7-d035-4422-ba41-f354f1d3b5b6;
 Sat, 22 Aug 2020 05:55:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=vVzEc1MEL4n3n38jDPtx9vnmCd70WkHNOCcON7nY4aY=; b=DZnTRjicEkiaPoAxWyCtIz+Kea
 fHDfvVIEjKDXF5Lf8A0J02sLmHQMolC7uNrRZNP95V4486+nMKvFw4Q9jSoNpXpz1toWqxqKC0VHe
 eODpFHdjND+4aHZDgMzAZ0k4kyN7H/ZhciAtf6wYVoK9cItrLZY9bqCnzmuOTl7lX8O4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MUY-0001bI-AI
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MUY-0008Hc-8k
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] tools/xenstore: Do not abort xenstore-ls if a node
 disappears while iterating
Message-Id: <E1k9MUY-0008Hc-8k@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit beb105af19cc3e58e2ed49224cfe190a736e5fa0
Author:     David Woodhouse <dwmw@amazon.co.uk>
AuthorDate: Thu Mar 19 20:40:24 2020 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    tools/xenstore: Do not abort xenstore-ls if a node disappears while iterating
    
    The do_ls() function has somewhat inconsistent handling of errors.
    
    If reading the node's contents with xs_read() fails, then do_ls() will
    just quietly not display the contents.
    
    If reading the node's permissions with xs_get_permissions() fails, then
    do_ls() will print a warning, continue, and ultimately won't exit with
    an error code (unless another error happens).
    
    If recursing into the node with xs_directory() fails, then do_ls() will
    abort immediately, not printing any further nodes.
    
    For persistent failure modes — such as ENOENT because a node has been
    removed, or EACCES because it has had its permisions changed since the
    xs_directory() on the parent directory returned its name — it's
    obviously quite likely that if either of the first two errors occur for
    a given node, then so will the third and thus xenstore-ls will abort.
    
    The ENOENT one is actually a fairly common case, and has caused tools to
    fail to clean up a network device because it *apparently* already
    doesn't exist in xenstore.
    
    There is a school of thought that says, "Well, xenstore-ls returned an
    error. So the tools should not trust its output."
    
    The natural corollary of this would surely be that the tools must re-run
    xenstore-ls as many times as is necessary until its manages to exit
    without hitting the race condition. I am not keen on that conclusion.
    
    For the specific case of ENOENT it seems reasonable to declare that,
    but for the timing, we might as well just not have seen that node at
    all when calling xs_directory() for the parent. By ignoring the error,
    we give acceptable output.
    
    The issue can be reproduced as follows:
    
    (dom0) # for a in `seq 1 1000` ; do
                  xenstore-write /local/domain/2/foo/$a $a ;
             done
    
    Now simultaneously:
    
    (dom0) # for a in `seq 1 999` ; do
                  xenstore-rm /local/domain/2/foo/$a ;
             done
    (dom2) # while true ; do
                  ./xenstore-ls -p /local/domain/2/foo | grep -c 1000 ;
             done
    
    We should expect to see node 1000 in the output, every time.
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/xenstore/xenstore_client.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c
index 3afc630ab8..ae7ed3eb9e 100644
--- a/tools/xenstore/xenstore_client.c
+++ b/tools/xenstore/xenstore_client.c
@@ -148,14 +148,20 @@ static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms
     int i;
     unsigned int num, len;
 
+    e = xs_directory(h, XBT_NULL, path, &num);
+    if (e == NULL) {
+        if (cur_depth && errno == ENOENT) {
+            /* If a node disappears while recursing, silently move on. */
+            return;
+        }
+
+        err(1, "xs_directory (%s)", path);
+    }
+
     newpath = malloc(STRING_MAX);
     if (!newpath)
       err(1, "malloc in do_ls");
 
-    e = xs_directory(h, XBT_NULL, path, &num);
-    if (e == NULL)
-        err(1, "xs_directory (%s)", path);
-
     for (i = 0; i<num; i++) {
         char buf[MAX_STRLEN(unsigned int)+1];
         struct xs_permissions *perms;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:55:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:55:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MUl-0007eK-SO; Sat, 22 Aug 2020 05:55:15 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MUl-0007eE-37
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:15 +0000
X-Inumbo-ID: ffccbff6-843a-4354-98dc-bce83430c9b9
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id ffccbff6-843a-4354-98dc-bce83430c9b9;
 Sat, 22 Aug 2020 05:55:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=k+8RwSHVOwQIRPI62r47SEpSqPhTjBTls1ay0wNw0Jo=; b=Pb8w55kbQCi6CSCsuECEAVUWNa
 3uMuNlRYz1cZs+hvEjYqbh+90CkqSOO2xgO6xWc/8ut/ZLpIq0waq4ZtrtzaTwFePDjP+DIBU7hxZ
 NSUu1crpB+5sNoihhgUPzQs3muAqBaYgSYjSfQ29N2oNYd2lrnSu6vxsI+lCReo6fI8I=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MUi-0001bP-DY
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MUi-0008I4-Ce
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/vmx: reorder code in vmx_deliver_posted_intr
Message-Id: <E1k9MUi-0008I4-Ce@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9ce2befd953274c9f919fdf55bb13516876148aa
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Thu Jul 30 16:03:09 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/vmx: reorder code in vmx_deliver_posted_intr
    
    Remove the unneeded else branch, which allows to reduce the
    indentation of a larger block of code, while making the flow of the
    function more obvious.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c | 55 ++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 29 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index eb54aadfba..86799c24ba 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2003,6 +2003,8 @@ static void __vmx_deliver_posted_interrupt(struct vcpu *v)
 
 static void vmx_deliver_posted_intr(struct vcpu *v, u8 vector)
 {
+    struct pi_desc old, new, prev;
+
     if ( pi_test_and_set_pir(vector, &v->arch.hvm.vmx.pi_desc) )
         return;
 
@@ -2014,41 +2016,36 @@ static void vmx_deliver_posted_intr(struct vcpu *v, u8 vector)
          * VMEntry as it used to be.
          */
         pi_set_on(&v->arch.hvm.vmx.pi_desc);
+        vcpu_kick(v);
+        return;
     }
-    else
-    {
-        struct pi_desc old, new, prev;
 
-        prev.control = v->arch.hvm.vmx.pi_desc.control;
+    prev.control = v->arch.hvm.vmx.pi_desc.control;
 
-        do {
-            /*
-             * Currently, we don't support urgent interrupt, all
-             * interrupts are recognized as non-urgent interrupt,
-             * Besides that, if 'ON' is already set, no need to
-             * sent posted-interrupts notification event as well,
-             * according to hardware behavior.
-             */
-            if ( pi_test_sn(&prev) || pi_test_on(&prev) )
-            {
-                vcpu_kick(v);
-                return;
-            }
-
-            old.control = v->arch.hvm.vmx.pi_desc.control &
-                          ~((1 << POSTED_INTR_ON) | (1 << POSTED_INTR_SN));
-            new.control = v->arch.hvm.vmx.pi_desc.control |
-                          (1 << POSTED_INTR_ON);
+    do {
+        /*
+         * Currently, we don't support urgent interrupt, all
+         * interrupts are recognized as non-urgent interrupt,
+         * Besides that, if 'ON' is already set, no need to
+         * send posted-interrupts notification event as well,
+         * according to hardware behavior.
+         */
+        if ( pi_test_sn(&prev) || pi_test_on(&prev) )
+        {
+            vcpu_kick(v);
+            return;
+        }
 
-            prev.control = cmpxchg(&v->arch.hvm.vmx.pi_desc.control,
-                                   old.control, new.control);
-        } while ( prev.control != old.control );
+        old.control = v->arch.hvm.vmx.pi_desc.control &
+                      ~((1 << POSTED_INTR_ON) | (1 << POSTED_INTR_SN));
+        new.control = v->arch.hvm.vmx.pi_desc.control |
+                      (1 << POSTED_INTR_ON);
 
-        __vmx_deliver_posted_interrupt(v);
-        return;
-    }
+        prev.control = cmpxchg(&v->arch.hvm.vmx.pi_desc.control,
+                               old.control, new.control);
+    } while ( prev.control != old.control );
 
-    vcpu_kick(v);
+    __vmx_deliver_posted_interrupt(v);
 }
 
 static void vmx_sync_pir_to_irr(struct vcpu *v)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:55:24 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MUu-0007fS-UB; Sat, 22 Aug 2020 05:55:24 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MUu-0007fI-8B
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:24 +0000
X-Inumbo-ID: 54ed239a-fb2d-44d7-ba00-6b98ad604cb4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 54ed239a-fb2d-44d7-ba00-6b98ad604cb4;
 Sat, 22 Aug 2020 05:55:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=o0IiTKOM/piIoMokrdJ/VM/Ram+ssjT+3txvC12OBNQ=; b=Bgmtoh8JRIvtqX8LL5yOs3IqOd
 /2Hgen7qoItp+5E7L7q6NaMyE5xd+CEzdEMFzu/LB0VYo25d6XpOdQl+iv7EEpixPyLvQE3zygQUQ
 AB7YlE0uc7FGeth4L+9b8uSu+gsEGDtw6rNkAXnhw+5NVvyVhOC2WELjbC+6EWu6vzR4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MUs-0001c3-IS
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MUs-0008IW-G1
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/iommu: re-arrange arch_iommu to separate common
 fields...
Message-Id: <E1k9MUs-0008IW-G1@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e0f25d134c85f4ee0e7c1602fa8016e50937e468
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 4 14:41:56 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/iommu: re-arrange arch_iommu to separate common fields...
    
    ... from those specific to VT-d or AMD IOMMU, and put the latter in a union.
    
    There is no functional change in this patch, although the initialization of
    the 'mapped_rmrrs' list occurs slightly later in iommu_domain_init() since
    it is now done (correctly) in VT-d specific code rather than in general x86
    code.
    
    NOTE: I have not combined the AMD IOMMU 'root_table' and VT-d 'pgd_maddr'
          fields even though they perform essentially the same function. The
          concept of 'root table' in the VT-d code is different from that in the
          AMD code so attempting to use a common name will probably only serve
          to confuse the reader.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/tboot.c                        |  4 +--
 xen/drivers/passthrough/amd/iommu_guest.c   |  8 ++---
 xen/drivers/passthrough/amd/iommu_map.c     | 14 ++++----
 xen/drivers/passthrough/amd/pci_amd_iommu.c | 35 ++++++++++---------
 xen/drivers/passthrough/vtd/iommu.c         | 53 ++++++++++++++++-------------
 xen/drivers/passthrough/x86/iommu.c         |  1 -
 xen/include/asm-x86/iommu.h                 | 27 +++++++++------
 7 files changed, 78 insertions(+), 64 deletions(-)

diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index 320e06f129..e66b0940c4 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -230,8 +230,8 @@ static void tboot_gen_domain_integrity(const uint8_t key[TB_KEY_SIZE],
         {
             const struct domain_iommu *dio = dom_iommu(d);
 
-            update_iommu_mac(&ctx, dio->arch.pgd_maddr,
-                             agaw_to_level(dio->arch.agaw));
+            update_iommu_mac(&ctx, dio->arch.vtd.pgd_maddr,
+                             agaw_to_level(dio->arch.vtd.agaw));
         }
     }
 
diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c
index 014a72a54b..30b7353cd6 100644
--- a/xen/drivers/passthrough/amd/iommu_guest.c
+++ b/xen/drivers/passthrough/amd/iommu_guest.c
@@ -50,12 +50,12 @@ static uint16_t guest_bdf(struct domain *d, uint16_t machine_bdf)
 
 static inline struct guest_iommu *domain_iommu(struct domain *d)
 {
-    return dom_iommu(d)->arch.g_iommu;
+    return dom_iommu(d)->arch.amd.g_iommu;
 }
 
 static inline struct guest_iommu *vcpu_iommu(struct vcpu *v)
 {
-    return dom_iommu(v->domain)->arch.g_iommu;
+    return dom_iommu(v->domain)->arch.amd.g_iommu;
 }
 
 static void guest_iommu_enable(struct guest_iommu *iommu)
@@ -823,7 +823,7 @@ int guest_iommu_init(struct domain* d)
     guest_iommu_reg_init(iommu);
     iommu->mmio_base = ~0ULL;
     iommu->domain = d;
-    hd->arch.g_iommu = iommu;
+    hd->arch.amd.g_iommu = iommu;
 
     tasklet_init(&iommu->cmd_buffer_tasklet, guest_iommu_process_command, d);
 
@@ -845,5 +845,5 @@ void guest_iommu_destroy(struct domain *d)
     tasklet_kill(&iommu->cmd_buffer_tasklet);
     xfree(iommu);
 
-    dom_iommu(d)->arch.g_iommu = NULL;
+    dom_iommu(d)->arch.amd.g_iommu = NULL;
 }
diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c
index 93e96cd69c..47b4472e8a 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -180,8 +180,8 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn,
     struct page_info *table;
     const struct domain_iommu *hd = dom_iommu(d);
 
-    table = hd->arch.root_table;
-    level = hd->arch.paging_mode;
+    table = hd->arch.amd.root_table;
+    level = hd->arch.amd.paging_mode;
 
     BUG_ON( table == NULL || level < 1 || level > 6 );
 
@@ -325,7 +325,7 @@ int amd_iommu_unmap_page(struct domain *d, dfn_t dfn,
 
     spin_lock(&hd->arch.mapping_lock);
 
-    if ( !hd->arch.root_table )
+    if ( !hd->arch.amd.root_table )
     {
         spin_unlock(&hd->arch.mapping_lock);
         return 0;
@@ -450,7 +450,7 @@ int __init amd_iommu_quarantine_init(struct domain *d)
     unsigned int level = amd_iommu_get_paging_mode(end_gfn);
     struct amd_iommu_pte *table;
 
-    if ( hd->arch.root_table )
+    if ( hd->arch.amd.root_table )
     {
         ASSERT_UNREACHABLE();
         return 0;
@@ -458,11 +458,11 @@ int __init amd_iommu_quarantine_init(struct domain *d)
 
     spin_lock(&hd->arch.mapping_lock);
 
-    hd->arch.root_table = alloc_amd_iommu_pgtable();
-    if ( !hd->arch.root_table )
+    hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+    if ( !hd->arch.amd.root_table )
         goto out;
 
-    table = __map_domain_page(hd->arch.root_table);
+    table = __map_domain_page(hd->arch.amd.root_table);
     while ( level )
     {
         struct page_info *pg;
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 5f5f4a2eac..09a05f9d75 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -91,7 +91,8 @@ static void amd_iommu_setup_domain_device(
     u8 bus = pdev->bus;
     const struct domain_iommu *hd = dom_iommu(domain);
 
-    BUG_ON( !hd->arch.root_table || !hd->arch.paging_mode ||
+    BUG_ON( !hd->arch.amd.root_table ||
+            !hd->arch.amd.paging_mode ||
             !iommu->dev_table.buffer );
 
     if ( iommu_hwdom_passthrough && is_hardware_domain(domain) )
@@ -110,8 +111,8 @@ static void amd_iommu_setup_domain_device(
 
         /* bind DTE to domain page-tables */
         amd_iommu_set_root_page_table(
-            dte, page_to_maddr(hd->arch.root_table), domain->domain_id,
-            hd->arch.paging_mode, valid);
+            dte, page_to_maddr(hd->arch.amd.root_table),
+            domain->domain_id, hd->arch.amd.paging_mode, valid);
 
         /* Undo what amd_iommu_disable_domain_device() may have done. */
         ivrs_dev = &get_ivrs_mappings(iommu->seg)[req_id];
@@ -131,8 +132,8 @@ static void amd_iommu_setup_domain_device(
                         "root table = %#"PRIx64", "
                         "domain = %d, paging mode = %d\n",
                         req_id, pdev->type,
-                        page_to_maddr(hd->arch.root_table),
-                        domain->domain_id, hd->arch.paging_mode);
+                        page_to_maddr(hd->arch.amd.root_table),
+                        domain->domain_id, hd->arch.amd.paging_mode);
     }
 
     spin_unlock_irqrestore(&iommu->lock, flags);
@@ -206,10 +207,10 @@ static int iov_enable_xt(void)
 
 int amd_iommu_alloc_root(struct domain_iommu *hd)
 {
-    if ( unlikely(!hd->arch.root_table) )
+    if ( unlikely(!hd->arch.amd.root_table) )
     {
-        hd->arch.root_table = alloc_amd_iommu_pgtable();
-        if ( !hd->arch.root_table )
+        hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+        if ( !hd->arch.amd.root_table )
             return -ENOMEM;
     }
 
@@ -239,7 +240,7 @@ static int amd_iommu_domain_init(struct domain *d)
      *   physical address space we give it, but this isn't known yet so use 4
      *   unilaterally.
      */
-    hd->arch.paging_mode = amd_iommu_get_paging_mode(
+    hd->arch.amd.paging_mode = amd_iommu_get_paging_mode(
         is_hvm_domain(d)
         ? 1ul << (DEFAULT_DOMAIN_ADDRESS_WIDTH - PAGE_SHIFT)
         : get_upper_mfn_bound() + 1);
@@ -305,7 +306,7 @@ static void amd_iommu_disable_domain_device(const struct domain *domain,
         AMD_IOMMU_DEBUG("Disable: device id = %#x, "
                         "domain = %d, paging mode = %d\n",
                         req_id,  domain->domain_id,
-                        dom_iommu(domain)->arch.paging_mode);
+                        dom_iommu(domain)->arch.amd.paging_mode);
     }
     spin_unlock_irqrestore(&iommu->lock, flags);
 
@@ -420,10 +421,11 @@ static void deallocate_iommu_page_tables(struct domain *d)
     struct domain_iommu *hd = dom_iommu(d);
 
     spin_lock(&hd->arch.mapping_lock);
-    if ( hd->arch.root_table )
+    if ( hd->arch.amd.root_table )
     {
-        deallocate_next_page_table(hd->arch.root_table, hd->arch.paging_mode);
-        hd->arch.root_table = NULL;
+        deallocate_next_page_table(hd->arch.amd.root_table,
+                                   hd->arch.amd.paging_mode);
+        hd->arch.amd.root_table = NULL;
     }
     spin_unlock(&hd->arch.mapping_lock);
 }
@@ -598,11 +600,12 @@ static void amd_dump_p2m_table(struct domain *d)
 {
     const struct domain_iommu *hd = dom_iommu(d);
 
-    if ( !hd->arch.root_table )
+    if ( !hd->arch.amd.root_table )
         return;
 
-    printk("p2m table has %d levels\n", hd->arch.paging_mode);
-    amd_dump_p2m_table_level(hd->arch.root_table, hd->arch.paging_mode, 0, 0);
+    printk("p2m table has %u levels\n", hd->arch.amd.paging_mode);
+    amd_dump_p2m_table_level(hd->arch.amd.root_table,
+                             hd->arch.amd.paging_mode, 0, 0);
 }
 
 static const struct iommu_ops __initconstrel _iommu_ops = {
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index deaeab095d..94e0455a4d 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -257,20 +257,20 @@ static u64 bus_to_context_maddr(struct vtd_iommu *iommu, u8 bus)
 static u64 addr_to_dma_page_maddr(struct domain *domain, u64 addr, int alloc)
 {
     struct domain_iommu *hd = dom_iommu(domain);
-    int addr_width = agaw_to_width(hd->arch.agaw);
+    int addr_width = agaw_to_width(hd->arch.vtd.agaw);
     struct dma_pte *parent, *pte = NULL;
-    int level = agaw_to_level(hd->arch.agaw);
+    int level = agaw_to_level(hd->arch.vtd.agaw);
     int offset;
     u64 pte_maddr = 0;
 
     addr &= (((u64)1) << addr_width) - 1;
     ASSERT(spin_is_locked(&hd->arch.mapping_lock));
-    if ( !hd->arch.pgd_maddr &&
+    if ( !hd->arch.vtd.pgd_maddr &&
          (!alloc ||
-          ((hd->arch.pgd_maddr = alloc_pgtable_maddr(1, hd->node)) == 0)) )
+          ((hd->arch.vtd.pgd_maddr = alloc_pgtable_maddr(1, hd->node)) == 0)) )
         goto out;
 
-    parent = (struct dma_pte *)map_vtd_domain_page(hd->arch.pgd_maddr);
+    parent = (struct dma_pte *)map_vtd_domain_page(hd->arch.vtd.pgd_maddr);
     while ( level > 1 )
     {
         offset = address_level_offset(addr, level);
@@ -593,7 +593,7 @@ static int __must_check iommu_flush_iotlb(struct domain *d, dfn_t dfn,
     {
         iommu = drhd->iommu;
 
-        if ( !test_bit(iommu->index, &hd->arch.iommu_bitmap) )
+        if ( !test_bit(iommu->index, &hd->arch.vtd.iommu_bitmap) )
             continue;
 
         flush_dev_iotlb = !!find_ats_dev_drhd(iommu);
@@ -1278,7 +1278,10 @@ void __init iommu_free(struct acpi_drhd_unit *drhd)
 
 static int intel_iommu_domain_init(struct domain *d)
 {
-    dom_iommu(d)->arch.agaw = width_to_agaw(DEFAULT_DOMAIN_ADDRESS_WIDTH);
+    struct domain_iommu *hd = dom_iommu(d);
+
+    hd->arch.vtd.agaw = width_to_agaw(DEFAULT_DOMAIN_ADDRESS_WIDTH);
+    INIT_LIST_HEAD(&hd->arch.vtd.mapped_rmrrs);
 
     return 0;
 }
@@ -1375,10 +1378,10 @@ int domain_context_mapping_one(
         spin_lock(&hd->arch.mapping_lock);
 
         /* Ensure we have pagetables allocated down to leaf PTE. */
-        if ( hd->arch.pgd_maddr == 0 )
+        if ( hd->arch.vtd.pgd_maddr == 0 )
         {
             addr_to_dma_page_maddr(domain, 0, 1);
-            if ( hd->arch.pgd_maddr == 0 )
+            if ( hd->arch.vtd.pgd_maddr == 0 )
             {
             nomem:
                 spin_unlock(&hd->arch.mapping_lock);
@@ -1389,7 +1392,7 @@ int domain_context_mapping_one(
         }
 
         /* Skip top levels of page tables for 2- and 3-level DRHDs. */
-        pgd_maddr = hd->arch.pgd_maddr;
+        pgd_maddr = hd->arch.vtd.pgd_maddr;
         for ( agaw = level_to_agaw(4);
               agaw != level_to_agaw(iommu->nr_pt_levels);
               agaw-- )
@@ -1443,7 +1446,7 @@ int domain_context_mapping_one(
     if ( rc > 0 )
         rc = 0;
 
-    set_bit(iommu->index, &hd->arch.iommu_bitmap);
+    set_bit(iommu->index, &hd->arch.vtd.iommu_bitmap);
 
     unmap_vtd_domain_page(context_entries);
 
@@ -1714,7 +1717,7 @@ static int domain_context_unmap(struct domain *domain, u8 devfn,
     {
         int iommu_domid;
 
-        clear_bit(iommu->index, &dom_iommu(domain)->arch.iommu_bitmap);
+        clear_bit(iommu->index, &dom_iommu(domain)->arch.vtd.iommu_bitmap);
 
         iommu_domid = domain_iommu_domid(domain, iommu);
         if ( iommu_domid == -1 )
@@ -1739,7 +1742,7 @@ static void iommu_domain_teardown(struct domain *d)
     if ( list_empty(&acpi_drhd_units) )
         return;
 
-    list_for_each_entry_safe ( mrmrr, tmp, &hd->arch.mapped_rmrrs, list )
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->arch.vtd.mapped_rmrrs, list )
     {
         list_del(&mrmrr->list);
         xfree(mrmrr);
@@ -1751,8 +1754,9 @@ static void iommu_domain_teardown(struct domain *d)
         return;
 
     spin_lock(&hd->arch.mapping_lock);
-    iommu_free_pagetable(hd->arch.pgd_maddr, agaw_to_level(hd->arch.agaw));
-    hd->arch.pgd_maddr = 0;
+    iommu_free_pagetable(hd->arch.vtd.pgd_maddr,
+                         agaw_to_level(hd->arch.vtd.agaw));
+    hd->arch.vtd.pgd_maddr = 0;
     spin_unlock(&hd->arch.mapping_lock);
 }
 
@@ -1892,7 +1896,7 @@ static void iommu_set_pgd(struct domain *d)
     mfn_t pgd_mfn;
 
     pgd_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m_get_hostp2m(d)));
-    dom_iommu(d)->arch.pgd_maddr =
+    dom_iommu(d)->arch.vtd.pgd_maddr =
         pagetable_get_paddr(pagetable_from_mfn(pgd_mfn));
 }
 
@@ -1912,7 +1916,7 @@ static int rmrr_identity_mapping(struct domain *d, bool_t map,
      * No need to acquire hd->arch.mapping_lock: Both insertion and removal
      * get done while holding pcidevs_lock.
      */
-    list_for_each_entry( mrmrr, &hd->arch.mapped_rmrrs, list )
+    list_for_each_entry( mrmrr, &hd->arch.vtd.mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
@@ -1959,7 +1963,7 @@ static int rmrr_identity_mapping(struct domain *d, bool_t map,
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
     mrmrr->count = 1;
-    list_add_tail(&mrmrr->list, &hd->arch.mapped_rmrrs);
+    list_add_tail(&mrmrr->list, &hd->arch.vtd.mapped_rmrrs);
 
     return 0;
 }
@@ -2657,8 +2661,9 @@ static void vtd_dump_p2m_table(struct domain *d)
         return;
 
     hd = dom_iommu(d);
-    printk("p2m table has %d levels\n", agaw_to_level(hd->arch.agaw));
-    vtd_dump_p2m_table_level(hd->arch.pgd_maddr, agaw_to_level(hd->arch.agaw), 0, 0);
+    printk("p2m table has %d levels\n", agaw_to_level(hd->arch.vtd.agaw));
+    vtd_dump_p2m_table_level(hd->arch.vtd.pgd_maddr,
+                             agaw_to_level(hd->arch.vtd.agaw), 0, 0);
 }
 
 static int __init intel_iommu_quarantine_init(struct domain *d)
@@ -2669,7 +2674,7 @@ static int __init intel_iommu_quarantine_init(struct domain *d)
     unsigned int level = agaw_to_level(agaw);
     int rc;
 
-    if ( hd->arch.pgd_maddr )
+    if ( hd->arch.vtd.pgd_maddr )
     {
         ASSERT_UNREACHABLE();
         return 0;
@@ -2677,11 +2682,11 @@ static int __init intel_iommu_quarantine_init(struct domain *d)
 
     spin_lock(&hd->arch.mapping_lock);
 
-    hd->arch.pgd_maddr = alloc_pgtable_maddr(1, hd->node);
-    if ( !hd->arch.pgd_maddr )
+    hd->arch.vtd.pgd_maddr = alloc_pgtable_maddr(1, hd->node);
+    if ( !hd->arch.vtd.pgd_maddr )
         goto out;
 
-    parent = map_vtd_domain_page(hd->arch.pgd_maddr);
+    parent = map_vtd_domain_page(hd->arch.vtd.pgd_maddr);
     while ( level )
     {
         uint64_t maddr;
diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c
index 3d7670e8c6..a12109a1de 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -139,7 +139,6 @@ int arch_iommu_domain_init(struct domain *d)
     struct domain_iommu *hd = dom_iommu(d);
 
     spin_lock_init(&hd->arch.mapping_lock);
-    INIT_LIST_HEAD(&hd->arch.mapped_rmrrs);
 
     return 0;
 }
diff --git a/xen/include/asm-x86/iommu.h b/xen/include/asm-x86/iommu.h
index 6c9d5e5632..8ce97c981f 100644
--- a/xen/include/asm-x86/iommu.h
+++ b/xen/include/asm-x86/iommu.h
@@ -45,16 +45,23 @@ typedef uint64_t daddr_t;
 
 struct arch_iommu
 {
-    u64 pgd_maddr;                 /* io page directory machine address */
-    spinlock_t mapping_lock;            /* io page table lock */
-    int agaw;     /* adjusted guest address width, 0 is level 2 30-bit */
-    u64 iommu_bitmap;              /* bitmap of iommu(s) that the domain uses */
-    struct list_head mapped_rmrrs;
-
-    /* amd iommu support */
-    int paging_mode;
-    struct page_info *root_table;
-    struct guest_iommu *g_iommu;
+    spinlock_t mapping_lock; /* io page table lock */
+
+    union {
+        /* Intel VT-d */
+        struct {
+            uint64_t pgd_maddr; /* io page directory machine address */
+            unsigned int agaw; /* adjusted guest address width, 0 is level 2 30-bit */
+            uint64_t iommu_bitmap; /* bitmap of iommu(s) that the domain uses */
+            struct list_head mapped_rmrrs;
+        } vtd;
+        /* AMD IOMMU */
+        struct {
+            unsigned int paging_mode;
+            struct page_info *root_table;
+            struct guest_iommu *g_iommu;
+        } amd;
+    };
 };
 
 extern struct iommu_ops iommu_ops;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:55:35 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:55:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MV5-0007gq-1W; Sat, 22 Aug 2020 05:55:35 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MV3-0007ge-MA
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:33 +0000
X-Inumbo-ID: e6ae866e-e208-4654-aef0-0d2b534ed6c9
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id e6ae866e-e208-4654-aef0-0d2b534ed6c9;
 Sat, 22 Aug 2020 05:55:32 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=NjAVVrXewVC10WpgLausvnsJ9ON9+2D6WlJh6EXcoJI=; b=g4sgzo6dOq/rpho/hIqsdjIccM
 5k6Uj2XZn2PUcm4iwcJ3mCBICcIrMV014YFlbFFNvjTezzjBQC/WyxxYKSLsyfuyFB7THM/J53Xmf
 yJJQ7w9VJ2rcDrCs6U21QdWISthiRkU03CGIOt4RjcM2ce98PfzVijLHmmTRt6fpKadc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MV2-0001cD-MZ
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MV2-0008Iw-Ku
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:32 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/iommu: add common page-table allocator
Message-Id: <E1k9MV2-0008Iw-Ku@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 15bc9a1ef51c4e0f9786eb143e9d43a657e7d239
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 4 14:41:57 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/iommu: add common page-table allocator
    
    Instead of having separate page table allocation functions in VT-d and AMD
    IOMMU code, we could use a common allocation function in the general x86 code.
    
    This patch adds a new allocation function, iommu_alloc_pgtable(), for this
    purpose. The function adds the page table pages to a list. The pages in this
    list are then freed by iommu_free_pgtables(), which is called by
    domain_relinquish_resources() after PCI devices have been de-assigned.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/domain.c               |  9 ++++++-
 xen/drivers/passthrough/x86/iommu.c | 51 +++++++++++++++++++++++++++++++++++++
 xen/include/asm-x86/iommu.h         |  7 +++++
 3 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index f8084dc9e3..d1ecc7b83b 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -2153,7 +2153,8 @@ int domain_relinquish_resources(struct domain *d)
         d->arch.rel_priv = PROG_ ## x; /* Fallthrough */ case PROG_ ## x
 
         enum {
-            PROG_paging = 1,
+            PROG_iommu_pagetables = 1,
+            PROG_paging,
             PROG_vcpu_pagetables,
             PROG_shared,
             PROG_xen,
@@ -2168,6 +2169,12 @@ int domain_relinquish_resources(struct domain *d)
         if ( ret )
             return ret;
 
+    PROGRESS(iommu_pagetables):
+
+        ret = iommu_free_pgtables(d);
+        if ( ret )
+            return ret;
+
     PROGRESS(paging):
 
         /* Tear down paging-assistance stuff. */
diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c
index a12109a1de..aea07e47c4 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -140,6 +140,9 @@ int arch_iommu_domain_init(struct domain *d)
 
     spin_lock_init(&hd->arch.mapping_lock);
 
+    INIT_PAGE_LIST_HEAD(&hd->arch.pgtables.list);
+    spin_lock_init(&hd->arch.pgtables.lock);
+
     return 0;
 }
 
@@ -257,6 +260,54 @@ void __hwdom_init arch_iommu_hwdom_init(struct domain *d)
         return;
 }
 
+int iommu_free_pgtables(struct domain *d)
+{
+    struct domain_iommu *hd = dom_iommu(d);
+    struct page_info *pg;
+    unsigned int done = 0;
+
+    while ( (pg = page_list_remove_head(&hd->arch.pgtables.list)) )
+    {
+        free_domheap_page(pg);
+
+        if ( !(++done & 0xff) && general_preempt_check() )
+            return -ERESTART;
+    }
+
+    return 0;
+}
+
+struct page_info *iommu_alloc_pgtable(struct domain *d)
+{
+    struct domain_iommu *hd = dom_iommu(d);
+    unsigned int memflags = 0;
+    struct page_info *pg;
+    void *p;
+
+#ifdef CONFIG_NUMA
+    if ( hd->node != NUMA_NO_NODE )
+        memflags = MEMF_node(hd->node);
+#endif
+
+    pg = alloc_domheap_page(NULL, memflags);
+    if ( !pg )
+        return NULL;
+
+    p = __map_domain_page(pg);
+    clear_page(p);
+
+    if ( hd->platform_ops->sync_cache )
+        iommu_vcall(hd->platform_ops, sync_cache, p, PAGE_SIZE);
+
+    unmap_domain_page(p);
+
+    spin_lock(&hd->arch.pgtables.lock);
+    page_list_add(pg, &hd->arch.pgtables.list);
+    spin_unlock(&hd->arch.pgtables.lock);
+
+    return pg;
+}
+
 /*
  * Local variables:
  * mode: C
diff --git a/xen/include/asm-x86/iommu.h b/xen/include/asm-x86/iommu.h
index 8ce97c981f..970eb06ffa 100644
--- a/xen/include/asm-x86/iommu.h
+++ b/xen/include/asm-x86/iommu.h
@@ -46,6 +46,10 @@ typedef uint64_t daddr_t;
 struct arch_iommu
 {
     spinlock_t mapping_lock; /* io page table lock */
+    struct {
+        struct page_list_head list;
+        spinlock_t lock;
+    } pgtables;
 
     union {
         /* Intel VT-d */
@@ -131,6 +135,9 @@ int pi_update_irte(const struct pi_desc *pi_desc, const struct pirq *pirq,
         iommu_vcall(ops, sync_cache, addr, size);       \
 })
 
+int __must_check iommu_free_pgtables(struct domain *d);
+struct page_info *__must_check iommu_alloc_pgtable(struct domain *d);
+
 #endif /* !__ARCH_X86_IOMMU_H__ */
 /*
  * Local variables:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:55:46 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:55:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MVF-0007ig-3C; Sat, 22 Aug 2020 05:55:45 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MVD-0007hs-Vk
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:44 +0000
X-Inumbo-ID: 35f3375f-28a7-4121-b2dd-a3f218f41b48
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 35f3375f-28a7-4121-b2dd-a3f218f41b48;
 Sat, 22 Aug 2020 05:55:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=NgwY5IrbEYCZT0abPwy2fODGh+mnL8mx4CYcRaEyGEI=; b=sR9YjKqusTrbb1f3Jw83X6loem
 3hS3HtE/xfadVT8ZKFGi7jzVGVxe1ZR4gbAtmTQHfyf7KzOQB7QaWXk/kRXSs5lmZFo/I+SjGZOE+
 uf5TQAzPEEv5a26l4s3o5qcTmU1jJaNXWhlfouuogSCJaJ5rT8Px4fRzwaiqf9K9YUlI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVC-0001cL-Q2
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVC-0008JO-Ox
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:42 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/iommu: convert AMD IOMMU code to use new page table
 allocator
Message-Id: <E1k9MVC-0008JO-Ox@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c4bdb646f47a09d4f18496570cd1f7cab84acce0
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 4 14:41:59 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 16:14:21 2020 +0100

    x86/iommu: convert AMD IOMMU code to use new page table allocator
    
    This patch converts the AMD IOMMU code to use the new page table allocator
    function. This allows all the free-ing code to be removed (since it is now
    handled by the general x86 code) which reduces TLB and cache thrashing as well
    as shortening the code.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/amd/iommu.h         | 18 +------
 xen/drivers/passthrough/amd/iommu_map.c     | 10 ++--
 xen/drivers/passthrough/amd/pci_amd_iommu.c | 75 ++++-------------------------
 3 files changed, 16 insertions(+), 87 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu.h b/xen/drivers/passthrough/amd/iommu.h
index 3489c2a015..e2d174f3b4 100644
--- a/xen/drivers/passthrough/amd/iommu.h
+++ b/xen/drivers/passthrough/amd/iommu.h
@@ -226,7 +226,7 @@ int __must_check amd_iommu_map_page(struct domain *d, dfn_t dfn,
                                     unsigned int *flush_flags);
 int __must_check amd_iommu_unmap_page(struct domain *d, dfn_t dfn,
                                       unsigned int *flush_flags);
-int __must_check amd_iommu_alloc_root(struct domain_iommu *hd);
+int __must_check amd_iommu_alloc_root(struct domain *d);
 int amd_iommu_reserve_domain_unity_map(struct domain *domain,
                                        paddr_t phys_addr, unsigned long size,
                                        int iw, int ir);
@@ -356,22 +356,6 @@ static inline int amd_iommu_get_paging_mode(unsigned long max_frames)
     return level;
 }
 
-static inline struct page_info *alloc_amd_iommu_pgtable(void)
-{
-    struct page_info *pg = alloc_domheap_page(NULL, 0);
-
-    if ( pg )
-        clear_domain_page(page_to_mfn(pg));
-
-    return pg;
-}
-
-static inline void free_amd_iommu_pgtable(struct page_info *pg)
-{
-    if ( pg )
-        free_domheap_page(pg);
-}
-
 static inline void *__alloc_amd_iommu_tables(unsigned int order)
 {
     return alloc_xenheap_pages(order, 0);
diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c
index 47b4472e8a..54b991294a 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -217,7 +217,7 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn,
             mfn = next_table_mfn;
 
             /* allocate lower level page table */
-            table = alloc_amd_iommu_pgtable();
+            table = iommu_alloc_pgtable(d);
             if ( table == NULL )
             {
                 AMD_IOMMU_DEBUG("Cannot allocate I/O page table\n");
@@ -248,7 +248,7 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn,
 
             if ( next_table_mfn == 0 )
             {
-                table = alloc_amd_iommu_pgtable();
+                table = iommu_alloc_pgtable(d);
                 if ( table == NULL )
                 {
                     AMD_IOMMU_DEBUG("Cannot allocate I/O page table\n");
@@ -286,7 +286,7 @@ int amd_iommu_map_page(struct domain *d, dfn_t dfn, mfn_t mfn,
 
     spin_lock(&hd->arch.mapping_lock);
 
-    rc = amd_iommu_alloc_root(hd);
+    rc = amd_iommu_alloc_root(d);
     if ( rc )
     {
         spin_unlock(&hd->arch.mapping_lock);
@@ -458,7 +458,7 @@ int __init amd_iommu_quarantine_init(struct domain *d)
 
     spin_lock(&hd->arch.mapping_lock);
 
-    hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+    hd->arch.amd.root_table = iommu_alloc_pgtable(d);
     if ( !hd->arch.amd.root_table )
         goto out;
 
@@ -473,7 +473,7 @@ int __init amd_iommu_quarantine_init(struct domain *d)
          * page table pages, and the resulting allocations are always
          * zeroed.
          */
-        pg = alloc_amd_iommu_pgtable();
+        pg = iommu_alloc_pgtable(d);
         if ( !pg )
             break;
 
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 09a05f9d75..3390c22cf3 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -205,11 +205,13 @@ static int iov_enable_xt(void)
     return 0;
 }
 
-int amd_iommu_alloc_root(struct domain_iommu *hd)
+int amd_iommu_alloc_root(struct domain *d)
 {
+    struct domain_iommu *hd = dom_iommu(d);
+
     if ( unlikely(!hd->arch.amd.root_table) )
     {
-        hd->arch.amd.root_table = alloc_amd_iommu_pgtable();
+        hd->arch.amd.root_table = iommu_alloc_pgtable(d);
         if ( !hd->arch.amd.root_table )
             return -ENOMEM;
     }
@@ -217,12 +219,13 @@ int amd_iommu_alloc_root(struct domain_iommu *hd)
     return 0;
 }
 
-static int __must_check allocate_domain_resources(struct domain_iommu *hd)
+static int __must_check allocate_domain_resources(struct domain *d)
 {
+    struct domain_iommu *hd = dom_iommu(d);
     int rc;
 
     spin_lock(&hd->arch.mapping_lock);
-    rc = amd_iommu_alloc_root(hd);
+    rc = amd_iommu_alloc_root(d);
     spin_unlock(&hd->arch.mapping_lock);
 
     return rc;
@@ -254,7 +257,7 @@ static void __hwdom_init amd_iommu_hwdom_init(struct domain *d)
 {
     const struct amd_iommu *iommu;
 
-    if ( allocate_domain_resources(dom_iommu(d)) )
+    if ( allocate_domain_resources(d) )
         BUG();
 
     for_each_amd_iommu ( iommu )
@@ -323,7 +326,6 @@ static int reassign_device(struct domain *source, struct domain *target,
 {
     struct amd_iommu *iommu;
     int bdf, rc;
-    struct domain_iommu *t = dom_iommu(target);
 
     bdf = PCI_BDF2(pdev->bus, pdev->devfn);
     iommu = find_iommu_for_device(pdev->seg, bdf);
@@ -344,7 +346,7 @@ static int reassign_device(struct domain *source, struct domain *target,
         pdev->domain = target;
     }
 
-    rc = allocate_domain_resources(t);
+    rc = allocate_domain_resources(target);
     if ( rc )
         return rc;
 
@@ -376,65 +378,9 @@ static int amd_iommu_assign_device(struct domain *d, u8 devfn,
     return reassign_device(pdev->domain, d, devfn, pdev);
 }
 
-static void deallocate_next_page_table(struct page_info *pg, int level)
-{
-    PFN_ORDER(pg) = level;
-    spin_lock(&iommu_pt_cleanup_lock);
-    page_list_add_tail(pg, &iommu_pt_cleanup_list);
-    spin_unlock(&iommu_pt_cleanup_lock);
-}
-
-static void deallocate_page_table(struct page_info *pg)
-{
-    struct amd_iommu_pte *table_vaddr;
-    unsigned int index, level = PFN_ORDER(pg);
-
-    PFN_ORDER(pg) = 0;
-
-    if ( level <= 1 )
-    {
-        free_amd_iommu_pgtable(pg);
-        return;
-    }
-
-    table_vaddr = __map_domain_page(pg);
-
-    for ( index = 0; index < PTE_PER_TABLE_SIZE; index++ )
-    {
-        struct amd_iommu_pte *pde = &table_vaddr[index];
-
-        if ( pde->mfn && pde->next_level && pde->pr )
-        {
-            /* We do not support skip levels yet */
-            ASSERT(pde->next_level == level - 1);
-            deallocate_next_page_table(mfn_to_page(_mfn(pde->mfn)),
-                                       pde->next_level);
-        }
-    }
-
-    unmap_domain_page(table_vaddr);
-    free_amd_iommu_pgtable(pg);
-}
-
-static void deallocate_iommu_page_tables(struct domain *d)
-{
-    struct domain_iommu *hd = dom_iommu(d);
-
-    spin_lock(&hd->arch.mapping_lock);
-    if ( hd->arch.amd.root_table )
-    {
-        deallocate_next_page_table(hd->arch.amd.root_table,
-                                   hd->arch.amd.paging_mode);
-        hd->arch.amd.root_table = NULL;
-    }
-    spin_unlock(&hd->arch.mapping_lock);
-}
-
-
 static void amd_iommu_domain_destroy(struct domain *d)
 {
-    deallocate_iommu_page_tables(d);
-    amd_iommu_flush_all_pages(d);
+    dom_iommu(d)->arch.amd.root_table = NULL;
 }
 
 static int amd_iommu_add_device(u8 devfn, struct pci_dev *pdev)
@@ -620,7 +566,6 @@ static const struct iommu_ops __initconstrel _iommu_ops = {
     .unmap_page = amd_iommu_unmap_page,
     .iotlb_flush = amd_iommu_flush_iotlb_pages,
     .iotlb_flush_all = amd_iommu_flush_iotlb_all,
-    .free_page_table = deallocate_page_table,
     .reassign_device = reassign_device,
     .get_device_group_id = amd_iommu_group_id,
     .enable_x2apic = iov_enable_xt,
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:55:55 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:55:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MVP-0007jl-4p; Sat, 22 Aug 2020 05:55:55 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MVO-0007jc-7i
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:54 +0000
X-Inumbo-ID: 7742d99c-6aff-4c4e-8d3a-649682ce05b1
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 7742d99c-6aff-4c4e-8d3a-649682ce05b1;
 Sat, 22 Aug 2020 05:55:53 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=DBpoRFS0vc3Qi1FlsEEI04BpyEap3hbYAg9ao6FRXMY=; b=wWkd8qt5WDs6+ZW/Q+66CFf/0Y
 bCwm6PpzhGXmZzlO50cs8z3rE967ncnJVuBw0Qt4/QcMurb6bCgJXwu/ClF6z9YjRXwOtedKxze4q
 lV0LxblBFQ1Vyp9cb5tDCcrI97HZDgNSD5wyvXTfurO3SJN4kmv6majtAC4SGRal1DZc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVM-0001cW-Sr
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVM-0008Jw-SD
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:55:52 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] rpmball: Adjust to new rpm, do not require --force
Message-Id: <E1k9MVM-0008Jw-SD@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 438c5ffa44e99cceb574c0f9946aacacdedd2952
Author:     Don Slutz <Don.Slutz@Gmail.com>
AuthorDate: Sun Aug 9 14:22:34 2020 -0400
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 17:18:56 2020 +0100

    rpmball: Adjust to new rpm, do not require --force
    
    Also prevent warning: directory /boot: remove failed
    
    Before:
    
    [root@TestCloud1 xen]# rpm -hiv dist/xen*rpm
    Preparing...                          ################################# [100%]
            file /boot from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/bin from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/lib from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/lib64 from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
            file /usr/sbin from install of xen-4.15-unstable.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
    [root@TestCloud1 xen]# rpm -e xen
    warning: directory /boot: remove failed: Device or resource busy
    
    After:
    
    [root@TestCloud1 xen]# rpm -hiv dist/xen*rpm
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:xen-4.15-unstable                ################################# [100%]
    [root@TestCloud1 xen]# rpm -e xen
    [root@TestCloud1 xen]#
    
    Signed-off-by: Don Slutz <Don.Slutz@Gmail.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/misc/mkrpm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/misc/mkrpm b/tools/misc/mkrpm
index ae40e1a4c4..68819b2d73 100644
--- a/tools/misc/mkrpm
+++ b/tools/misc/mkrpm
@@ -62,7 +62,8 @@ rm -rf \$RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-/*
+/*/*/*
+/boot/*
 
 %post
 EOF
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:56:05 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:56:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MVZ-0007ks-6K; Sat, 22 Aug 2020 05:56:05 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MVX-0007ke-R8
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:03 +0000
X-Inumbo-ID: 6271ca5f-8526-4cd9-a43c-41115652b2e0
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 6271ca5f-8526-4cd9-a43c-41115652b2e0;
 Sat, 22 Aug 2020 05:56:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=nMaLSJm7nYYiLmXlMxe9xR9Sk8V00XfhkjKPBJ4/CZg=; b=V0ejFk7z6tOkkFOl1GYmPThqcH
 32+MQk8F2ilKoiy7RbzTSXcda3tF8U2GoTocAUsrcr3N4wFCU8RSiXdu5dW3tavavN+kD46BJatLo
 2aNOSbUoky1zrcnJmqkEFpUg6iEP7G+GcHoCee4D1/oUtdZ4TVAvrArGNYWZr14aCbUw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVW-0001cu-W3
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVW-0008KZ-VG
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/hvm: change EOI exit bitmap helper parameter
Message-Id: <E1k9MVW-0008KZ-VG@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:56:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 74ac7c81788198342d1dd60f95fa4870fa64728e
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Wed Aug 12 14:47:05 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Aug 14 17:26:01 2020 +0100

    x86/hvm: change EOI exit bitmap helper parameter
    
    Change the last parameter of the update_eoi_exit_bitmap helper to be a
    set/clear boolean instead of a triggering field. This is already
    inline with how the function is implemented, and will allow deciding
    whether an exit is required by the higher layers that call into
    update_eoi_exit_bitmap. Note that the current behavior is not changed
    by this patch.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c    | 4 ++--
 xen/include/asm-x86/hvm/hvm.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 86799c24ba..a0d58ffbe2 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1885,9 +1885,9 @@ static void vmx_set_info_guest(struct vcpu *v)
     vmx_vmcs_exit(v);
 }
 
-static void vmx_update_eoi_exit_bitmap(struct vcpu *v, u8 vector, u8 trig)
+static void vmx_update_eoi_exit_bitmap(struct vcpu *v, uint8_t vector, bool set)
 {
-    if ( trig )
+    if ( set )
         vmx_set_eoi_exit_bitmap(v, vector);
     else
         vmx_clear_eoi_exit_bitmap(v, vector);
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index 1eb377dd82..be0d8b0a4d 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -192,7 +192,7 @@ struct hvm_function_table {
     void (*nhvm_domain_relinquish_resources)(struct domain *d);
 
     /* Virtual interrupt delivery */
-    void (*update_eoi_exit_bitmap)(struct vcpu *v, u8 vector, u8 trig);
+    void (*update_eoi_exit_bitmap)(struct vcpu *v, uint8_t vector, bool set);
     void (*process_isr)(int isr, struct vcpu *v);
     void (*deliver_posted_intr)(struct vcpu *v, u8 vector);
     void (*sync_pir_to_irr)(struct vcpu *v);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:56:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:56:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MVj-0007lu-8N; Sat, 22 Aug 2020 05:56:15 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MVi-0007ll-Fg
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:14 +0000
X-Inumbo-ID: 702b4452-1614-40fc-817a-f9c3f6d8d611
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 702b4452-1614-40fc-817a-f9c3f6d8d611;
 Sat, 22 Aug 2020 05:56:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Rymt9E+aNMoG1zMt7BvrrX220aXYcPeE0gGcbbZUf7E=; b=10bexaYYc9qyQ1kcHWq6S2aNhW
 NNKxHZvWfknvkLTV6V0bhsVnG6tAVFp4d7XXYUB4LA9u8FJ7XC3KPkAnTkz3sB//l6LKBhkecFPez
 XfwoCMXPaBe4pfxX+ZmHA8D0aCn+a3imxAD9j0lHF/eHXDP/lLMMEIbSPI79iijDCU+Y=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVh-0001dg-3E
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVh-0008LE-1v
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:13 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] xen/guest_access: Add emacs magics
Message-Id: <E1k9MVh-0008LE-1v@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:56:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7207c157f3d905c943a8a71b6602b77e2e0703a1
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 11:50:18 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:00 2020 +0100

    xen/guest_access: Add emacs magics
    
    Add emacs magics for xen/guest_access.h and
    asm-x86/guest_access.h.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/include/asm-x86/guest_access.h | 9 +++++++++
 xen/include/xen/guest_access.h     | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/xen/include/asm-x86/guest_access.h b/xen/include/asm-x86/guest_access.h
index 2be3577bd3..369676f31a 100644
--- a/xen/include/asm-x86/guest_access.h
+++ b/xen/include/asm-x86/guest_access.h
@@ -160,3 +160,12 @@
 })
 
 #endif /* __ASM_X86_GUEST_ACCESS_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/include/xen/guest_access.h b/xen/include/xen/guest_access.h
index 09989df819..75103d30c8 100644
--- a/xen/include/xen/guest_access.h
+++ b/xen/include/xen/guest_access.h
@@ -33,3 +33,12 @@ char *safe_copy_string_from_guest(XEN_GUEST_HANDLE(char) u_buf,
                                   size_t size, size_t max_size);
 
 #endif /* __XEN_GUEST_ACCESS_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:56:25 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:56:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MVt-0007mx-9u; Sat, 22 Aug 2020 05:56:25 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MVs-0007mi-3e
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:24 +0000
X-Inumbo-ID: 701b70a3-ce71-45c8-96fc-7812c11d658b
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 701b70a3-ce71-45c8-96fc-7812c11d658b;
 Sat, 22 Aug 2020 05:56:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=lOaPBrk6web2DMFE7n4+ofnY2WhU5+05dlbpYcqmtG8=; b=dczaHtLSyT4OCiBvq8biuUscjn
 +D6be2DM5B0ivNAb8LFTFRsXYC0GRGzKDulv+ocOnOR1jg3v4cj+qVekUB1VqzM57uP7ccXYY9AmY
 nAXDfdXOEwec55Ic0a1bGEwXBbY8lMgA8T41ugGhn5TfNDzE/dQYd5ExJQSIahT4TxAA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVr-0001fT-6P
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MVr-0008Lc-5S
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] xen/arm: kernel: Re-order the includes
Message-Id: <E1k9MVr-0008Lc-5S@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:56:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 529527b57abb407db90bfb69036096624391d4ce
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 12:03:22 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:33 2020 +0100

    xen/arm: kernel: Re-order the includes
    
    We usually have xen/ includes first and then asm/. They are also ordered
    alphabetically among themselves.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/kernel.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 8eff074836..f95fa392af 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -3,20 +3,20 @@
  *
  * Copyright (C) 2011 Citrix Systems, Inc.
  */
+#include <xen/domain_page.h>
 #include <xen/errno.h>
+#include <xen/gunzip.h>
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/mm.h>
-#include <xen/domain_page.h>
 #include <xen/sched.h>
-#include <asm/byteorder.h>
-#include <asm/setup.h>
-#include <xen/libfdt/libfdt.h>
-#include <xen/gunzip.h>
 #include <xen/vmap.h>
 
+#include <asm/byteorder.h>
 #include <asm/guest_access.h>
 #include <asm/kernel.h>
+#include <asm/setup.h>
 
 #define UIMAGE_MAGIC          0x27051956
 #define UIMAGE_NMLEN          32
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:56:36 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:56:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MW4-0007og-Ct; Sat, 22 Aug 2020 05:56:36 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MW3-0007oY-Fw
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:35 +0000
X-Inumbo-ID: a375086d-8d74-4a9d-81db-e60c5d6d7c7c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id a375086d-8d74-4a9d-81db-e60c5d6d7c7c;
 Sat, 22 Aug 2020 05:56:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=qCe0JLtGzTbWS89zJzlC09QcJVOQOoVqZ0m5iJ+AzYg=; b=BRsOAN/v5s1bYwYKCh7yXHIEUe
 gnpLNAa3ADUOlMLVAaENIhRhVrMdxLsSb2EevRLAg7oc3MUOeR7vAtqwZG673KC4olRoQYQePqSAy
 nDvdbkWf+vAXMQzbS+UTnEG4XItD8N/Ivtcc0LW/PLX1Vx4OwVVfJpK4ZW0/OmlIZSxA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MW1-0001fb-AE
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MW1-0008MA-8i
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] xen/arm: decode: Re-order the includes
Message-Id: <E1k9MW1-0008MA-8i@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:56:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 9c7ff81802263ecb964c471fbbbbfe753873b983
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 12:06:04 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:33 2020 +0100

    xen/arm: decode: Re-order the includes
    
    We usually have xen/ includes first and then asm/. They are also ordered
    alphabetically among themselves.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/decode.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
index 8b1e15d118..144793c8ce 100644
--- a/xen/arch/arm/decode.c
+++ b/xen/arch/arm/decode.c
@@ -17,11 +17,12 @@
  * GNU General Public License for more details.
  */
 
-#include <xen/types.h>
+#include <xen/lib.h>
 #include <xen/sched.h>
+#include <xen/types.h>
+
 #include <asm/current.h>
 #include <asm/guest_access.h>
-#include <xen/lib.h>
 
 #include "decode.h"
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:56:45 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:56:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MWD-0007q0-EZ; Sat, 22 Aug 2020 05:56:45 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MWC-0007pQ-8z
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:44 +0000
X-Inumbo-ID: 2ed974fb-40a2-45fc-9a2a-018208baae6c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 2ed974fb-40a2-45fc-9a2a-018208baae6c;
 Sat, 22 Aug 2020 05:56:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Z5AtRJ794cWGEfw0VDoFBr6Tklx9BMAtNF9jhhGD7nk=; b=fcYySCRco3xbMUpV/d5XO/2d1C
 /ksMFzHasQV2OfAeBev/2MSM4Qlo4KvQIHT1uwrZDI7b0+tKCs6VIw2Y0PygmbCVPbi+/wT7sLa5Q
 j7Zt+9RLP2ndyfRyTfHUDz6GGLO5IqlkM7oQvJRX5Xd3VDUi3V36FcPzUPgSp21uk+eU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWB-0001fj-D6
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWB-0008Mc-CV
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:43 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] xen/arm: guestcopy: Re-order the includes
Message-Id: <E1k9MWB-0008Mc-CV@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:56:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 2404e59b1d934fedc3fd3bd92b3d5d2a981cd433
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Sat Apr 4 12:07:17 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 19:56:33 2020 +0100

    xen/arm: guestcopy: Re-order the includes
    
    We usually have xen/ includes first and then asm/. They are also ordered
    alphabetically among themselves.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Stefano Stabellini <sstabellini@kernel.org>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/guestcopy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c
index 7a0f3e9d5f..c8023e2bca 100644
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -1,7 +1,8 @@
-#include <xen/lib.h>
 #include <xen/domain_page.h>
+#include <xen/lib.h>
 #include <xen/mm.h>
 #include <xen/sched.h>
+
 #include <asm/current.h>
 #include <asm/guest_access.h>
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:56:55 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:56:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MWN-0007rA-G7; Sat, 22 Aug 2020 05:56:55 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MWM-0007qy-BV
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:54 +0000
X-Inumbo-ID: e5b79e1c-e9a7-4458-8cc1-40d45d20ca16
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id e5b79e1c-e9a7-4458-8cc1-40d45d20ca16;
 Sat, 22 Aug 2020 05:56:53 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=kCeJfKxiVv8C8/7GdZl1fFVkzxdgYtXg8YSwLz+Oa9w=; b=7NmMFLq9UBrcDA20ijFpSqDqDA
 CdVxRWMRmHClQN3IKFz5+7EQPzTOIvbnCmydGRueo8S+/iZaFVJMk4Othpk/KPJY+7oPiyE/44Kwt
 yu0FYeV82ToFnnAKJ+FWGH090t0rN4N0MVLkH9P7z+sb1nTnulJ9UWm2/PjZUKZvYmUY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWL-0001fx-G9
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWL-0008N7-FT
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:56:53 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] xen/arm: cmpxchg: Add missing memory barriers in
 __cmpxchg_mb_timeout()
Message-Id: <E1k9MWL-0008N7-FT@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:56:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d501ef90ae7f2a79130ea89acb3d6d1792972934
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Wed Jul 29 14:50:37 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Aug 14 20:21:23 2020 +0100

    xen/arm: cmpxchg: Add missing memory barriers in __cmpxchg_mb_timeout()
    
    The function __cmpxchg_mb_timeout() was intended to have the same
    semantics as __cmpxchg_mb(). Unfortunately, the memory barriers were
    not added when first implemented.
    
    There is no known issue with the existing callers, but the barriers are
    added given this is the expected semantics in Xen.
    
    The issue was introduced by XSA-295.
    
    Backport: 4.8+
    Fixes: 86b0bc958373 ("xen/arm: cmpxchg: Provide a new helper that can timeout")
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/include/asm-arm/arm32/cmpxchg.h | 8 +++++++-
 xen/include/asm-arm/arm64/cmpxchg.h | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/asm-arm/arm32/cmpxchg.h
index 49ca2a0d7a..0770f272ee 100644
--- a/xen/include/asm-arm/arm32/cmpxchg.h
+++ b/xen/include/asm-arm/arm32/cmpxchg.h
@@ -147,7 +147,13 @@ static always_inline bool __cmpxchg_mb_timeout(volatile void *ptr,
 					       int size,
 					       unsigned int max_try)
 {
-	return __int_cmpxchg(ptr, old, new, size, true, max_try);
+	bool ret;
+
+	smp_mb();
+	ret = __int_cmpxchg(ptr, old, new, size, true, max_try);
+	smp_mb();
+
+	return ret;
 }
 
 #define cmpxchg(ptr,o,n)						\
diff --git a/xen/include/asm-arm/arm64/cmpxchg.h b/xen/include/asm-arm/arm64/cmpxchg.h
index 5bc2e1f786..fc5c60f0bd 100644
--- a/xen/include/asm-arm/arm64/cmpxchg.h
+++ b/xen/include/asm-arm/arm64/cmpxchg.h
@@ -160,7 +160,13 @@ static always_inline bool __cmpxchg_mb_timeout(volatile void *ptr,
 					       int size,
 					       unsigned int max_try)
 {
-	return __int_cmpxchg(ptr, old, new, size, true, max_try);
+	bool ret;
+
+	smp_mb();
+	ret = __int_cmpxchg(ptr, old, new, size, true, max_try);
+	smp_mb();
+
+	return ret;
 }
 
 #define cmpxchg(ptr, o, n) \
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:57:05 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:57:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MWX-0007sC-I1; Sat, 22 Aug 2020 05:57:05 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MWW-0007s0-9Z
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:04 +0000
X-Inumbo-ID: ce8af4da-6292-4054-86e5-9ec2a9b0873c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ce8af4da-6292-4054-86e5-9ec2a9b0873c;
 Sat, 22 Aug 2020 05:57:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=TEdjweGd5/LWM+ZoVC8jnW9wIDu+gTxkcLyuWmPURG0=; b=syqysZfyHSPUJidjDgPZV+fL3S
 RHHndZxRR4tszJNpcJinxZOd+3XHceJoxqxaGBUEk5m6VkuPzGIeRzcEtPx+RwSx5NDFeZ5VBHTF8
 T0XJqi8xBAZWimu50pc2dIs7GtiAdQLUo/PO2ys1R80rqLUwkR5AbP1/FC62dgHp4tTs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWV-0001gI-J6
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWV-0008Nk-IJ
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:03 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] Config.mk: update OVMF changeset
Message-Id: <E1k9MWV-0008Nk-IJ@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:57:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit f0f2344d3ce1657fd4572aab00cb6b3c1dfce5e5
Author:     Wei Liu <wl@xen.org>
AuthorDate: Wed Aug 12 09:55:11 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Fri Aug 14 20:21:25 2020 +0000

    Config.mk: update OVMF changeset
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 Config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Config.mk b/Config.mk
index 4093dcb9e3..3603cf4ca5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -244,7 +244,7 @@ QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-traditional.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git
 endif
-OVMF_UPSTREAM_REVISION ?= 20d2e5a125e34fc8501026613a71549b2a1a3e54
+OVMF_UPSTREAM_REVISION ?= a3741780fe3535e19e02efa869a7cac481891129
 QEMU_UPSTREAM_REVISION ?= master
 MINIOS_UPSTREAM_REVISION ?= master
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:57:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:57:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MWh-0007tA-Js; Sat, 22 Aug 2020 05:57:15 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MWg-0007t0-IG
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:14 +0000
X-Inumbo-ID: d69a017b-2eea-444c-bf15-1a6a9bf234d7
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id d69a017b-2eea-444c-bf15-1a6a9bf234d7;
 Sat, 22 Aug 2020 05:57:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=bXRKzSkGeaGZlUIuHNkx3JGlgP2Gg91GMrWNsTNATIw=; b=T0g1UVPIRlXy4TdT0R2Jsamttz
 XQmMmmtWuB7S3ruNTtgCzistj12PQ+IdZUemOKB1ErtBw59YD/KAd4LkNLrlhWptFTeTnpmmv3OxN
 2+43V9Z+U5F8NL1m520p6tkjpSQVRZn01i2ehDVTRhDxNFNhLmI9YJFvmKf93D7cVdJM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWf-0001gp-Lw
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWf-0008Pj-LM
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:13 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] tools: bump library version numbers
Message-Id: <E1k9MWf-0008Pj-LM@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:57:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 79c2d51cba34b250fd23fd32dc2311da89a4772c
Author:     Wei Liu <wl@xen.org>
AuthorDate: Wed Aug 12 09:55:34 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Fri Aug 14 20:21:25 2020 +0000

    tools: bump library version numbers
    
    Signed-off-by: Wei Liu <wl@xen.org>
---
 tools/libfsimage/common/Makefile  | 2 +-
 tools/libvchan/Makefile           | 2 +-
 tools/libxc/Makefile              | 2 +-
 tools/libxl/Makefile              | 4 ++--
 tools/xenstat/libxenstat/Makefile | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
index 8c8ba09f12..060f029ca9 100644
--- a/tools/libfsimage/common/Makefile
+++ b/tools/libfsimage/common/Makefile
@@ -1,7 +1,7 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
 
-MAJOR = 4.14
+MAJOR = 4.15
 MINOR = 0
 
 LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
diff --git a/tools/libvchan/Makefile b/tools/libvchan/Makefile
index 913bcc8884..d99a6137e1 100644
--- a/tools/libvchan/Makefile
+++ b/tools/libvchan/Makefile
@@ -15,7 +15,7 @@ $(LIBVCHAN_OBJS) $(LIBVCHAN_PIC_OBJS): CFLAGS += $(CFLAGS_libxenstore) $(CFLAGS_
 $(NODE_OBJS) $(NODE2_OBJS): CFLAGS += $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
 vchan-socket-proxy.o: CFLAGS += $(CFLAGS_libxenstore) $(CFLAGS_libxenctrl) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
 
-MAJOR = 4.14
+MAJOR = 4.15
 MINOR = 0
 
 CFLAGS += -I../include -I.
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index fae5969a73..955cd5ab18 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -1,7 +1,7 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-MAJOR    = 4.14
+MAJOR    = 4.15
 MINOR    = 0
 
 ifeq ($(CONFIG_LIBXC_MINIOS),y)
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 38cd43abae..0e8dfc6193 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -5,10 +5,10 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-MAJOR = 4.14
+MAJOR = 4.15
 MINOR = 0
 
-XLUMAJOR = 4.14
+XLUMAJOR = 4.15
 XLUMINOR = 0
 
 CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile
index 03cb212e3b..ab980852da 100644
--- a/tools/xenstat/libxenstat/Makefile
+++ b/tools/xenstat/libxenstat/Makefile
@@ -18,7 +18,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 LDCONFIG=ldconfig
 MAKE_LINK=ln -sf
 
-MAJOR=4.14
+MAJOR=4.15
 MINOR=0
 
 LIB=src/libxenstat.a
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:57:26 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:57:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MWs-0007vm-La; Sat, 22 Aug 2020 05:57:26 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MWr-0007ve-FS
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:25 +0000
X-Inumbo-ID: 9e9133af-eac8-43bd-b533-d8518cf39b0d
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 9e9133af-eac8-43bd-b533-d8518cf39b0d;
 Sat, 22 Aug 2020 05:57:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=q78TcdAfqgF1oxTuHbc4H8wlgoRBeX/EJAWlUqqK7Dk=; b=k7lupGKya3hIhs8VsXBc32D7dU
 4Khvrb8dz9oOSBax8TlioxdkFEaBwSSpLYpIMhm+i/p0RhjeNE7xT+647fOgpQWmxijiY6TjG9yCE
 Wnn8Mu46y0d8XUmN/2L1u8NuqxEDH9rz7Ndf7YoxklVzPfPCjgphEINnu9aIsmqwo8Y0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWp-0001gz-Om
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWp-0008QD-O7
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] docs/process/branching-checklist: Get osstest branch
 right
Message-Id: <E1k9MWp-0008QD-O7@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:57:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit eee588bd73a7251fc5204b0563965372018f6319
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Wed Jul 15 16:39:18 2020 +0100
Commit:     Ian Jackson <ian.jackson@eu.citrix.com>
CommitDate: Tue Aug 18 13:40:18 2020 +0100

    docs/process/branching-checklist: Get osstest branch right
    
    The runes for this manual osstest were wrong.  It needs to run as
    osstest, and cr-for-branches should be run from testing.git.
    
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 docs/process/branching-checklist.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/process/branching-checklist.txt b/docs/process/branching-checklist.txt
index e286e65962..0e83272caa 100644
--- a/docs/process/branching-checklist.txt
+++ b/docs/process/branching-checklist.txt
@@ -86,8 +86,8 @@ including turning off debug.
 
 Set off a manual osstest run, since the osstest cr-for-branches change
 will take a while to take effect:
-  ssh osstest.test-lab
-  cd branches/for-xen-$v-testing.git
+  ssh osstest@osstest.test-lab
+  cd testing.git
   screen -S $v
   BRANCHES=xen-$v-testing ./cr-for-branches branches -w "./cr-daily-branch --real"
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:57:35 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:57:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MX1-0007wl-NP; Sat, 22 Aug 2020 05:57:35 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MX0-0007wd-JA
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:34 +0000
X-Inumbo-ID: d8549501-e979-4164-923b-ff57cb34bc66
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id d8549501-e979-4164-923b-ff57cb34bc66;
 Sat, 22 Aug 2020 05:57:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=5Wl5XUIHJaFPl6UWlBTtGgvLlUTQwfp0ZPpKj5DD4ZM=; b=GkOcOTARtGLTdjQcI9csLQTybs
 oeKmnltlfbgTQFntaRc3z097R9U3DC78X4zBaYsImEqPHk5xX1wkdSUwNxGcrVT4cd97M9jDl+3Ux
 1WZ8Yf+aD2/OuKHY0XrpWEMJMU7O49NIoqvKx6O+Pm38ay9ilfb3AoroUuhLAQQvQPs0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWz-0001h7-SJ
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MWz-0008Qh-RA
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] QEMU_TRADITIONAL_REVISION update
Message-Id: <E1k9MWz-0008Qh-RA@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:57:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 4d5b2099f11348db1529dc6cbd19d5a66b4ae61b
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Tue Aug 18 16:00:10 2020 +0100
Commit:     Ian Jackson <ian.jackson@eu.citrix.com>
CommitDate: Tue Aug 18 16:00:10 2020 +0100

    QEMU_TRADITIONAL_REVISION update
    
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Config.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 3603cf4ca5..8269503f73 100644
--- a/Config.mk
+++ b/Config.mk
@@ -253,9 +253,9 @@ SEABIOS_UPSTREAM_REVISION ?= rel-1.14.0
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
 
-QEMU_TRADITIONAL_REVISION ?= 3c659044118e34603161457db9934a34f816d78b
-# Fri Mar 13 12:35:26 2020 +0000
-# xen: cleanup IOREQ server on exit
+QEMU_TRADITIONAL_REVISION ?= 3d273dd05e51e5a1ffba3d98c7437ee84e8f8764
+# Wed Jul 15 10:01:40 2020 +0100
+# qemu-trad: remove Xen path dependencies
 
 # Specify which qemu-dm to use. This may be `ioemu' to use the old
 # Mercurial in-tree version, or a local directory, or a git URL.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:57:45 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:57:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MXB-0007yV-PD; Sat, 22 Aug 2020 05:57:45 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MXA-0007xi-M1
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:44 +0000
X-Inumbo-ID: ff84b1d8-6f11-4cd7-a8ec-a6ec585542f7
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ff84b1d8-6f11-4cd7-a8ec-a6ec585542f7;
 Sat, 22 Aug 2020 05:57:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=YMxbmle0PoNKfYmEXD+V5r+navH518RZgBS3WFrFRXg=; b=Lv46qxAIJA7rpwlzKjhAegIec1
 jKmFagq5pjfhswuItAv9vLhGDUT5Y9by70gsKsDg6mWZvlMRm353pNtpxtqa7mvNMqjxMt3akuwVW
 SnczJi4hUBzN8ouW1nYXtJUIBh1Rcsfsz5zplA6V0koa08ZCeq57Tq5MjtWnoZoQ/ZNU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MX9-0001hF-VA
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MX9-0008RC-Uc
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:43 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] tools/ocaml/libs/xc: Fix ambiguous documentation comment
Message-Id: <E1k9MX9-0008RC-Uc@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:57:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ba02a2cd1c2e87203117f2fe920c2115a121dbbc
Author:     Edwin Török <edvin.torok@citrix.com>
AuthorDate: Mon Aug 17 19:45:44 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    tools/ocaml/libs/xc: Fix ambiguous documentation comment
    
    Signed-off-by: Edwin Török <edvin.torok@citrix.com>
    Acked-by: Christian Lindig <christian.lindig@citrix.com>
---
 tools/ocaml/libs/xc/xenctrl.mli | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli
index 26ec7e59b1..f7f6ec570d 100644
--- a/tools/ocaml/libs/xc/xenctrl.mli
+++ b/tools/ocaml/libs/xc/xenctrl.mli
@@ -132,8 +132,10 @@ external interface_close : handle -> unit = "stub_xc_interface_close"
  * interface_open and interface_close or with_intf although mixing both
  * is possible *)
 val with_intf : (handle -> 'a) -> 'a
+
 (** [get_handle] returns the global handle used by [with_intf] *)
 val get_handle: unit -> handle option
+
 (** [close handle] closes the handle maintained by [with_intf]. This
  * should only be closed before process exit. It must not be called from
  * a function called directly or indirectly by with_intf as this
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:57:56 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:57:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MXM-0007zm-Qs; Sat, 22 Aug 2020 05:57:56 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MXL-0007zb-Iu
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:55 +0000
X-Inumbo-ID: 1d2f9ac3-5f91-4f95-896f-9dfc359c7aab
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 1d2f9ac3-5f91-4f95-896f-9dfc359c7aab;
 Sat, 22 Aug 2020 05:57:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=rW6D/Qu013nWuDWB5jv8ptSvzf1VqM2oTHm4vzdB6F4=; b=TO2VbEr35GZtsWXFSUpMhugK8S
 a6z7TjEwGyeXyoCxSGDbTdRnSZ8R+cmTZ4o7kia/J+N71t52dsa2oLa4YxKR5ynVlRWNrVk5eFAfA
 68K+DvsQ5uIqOIXStGbCKv1odwdXgdNrIaBGEIFPsTsOxWzXqidKqOYOzAEfrWwzzvks=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXK-0001hN-1t
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXK-0008Re-1E
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:57:54 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] tools/ocaml/xenstored: drop select based socket watching
Message-Id: <E1k9MXK-0008Re-1E@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:57:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 80a868f0f6ccffee5843cbf1ad880ffcb76267a2
Author:     Edwin Török <edvin.torok@citrix.com>
AuthorDate: Mon Aug 17 19:45:47 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    tools/ocaml/xenstored: drop select based socket watching
    
    Poll has been the default since 2014, I think we can safely say by now
    that poll() works and we don't need to fall back to select().
    
    This will allow fixing up the way we call poll to be more efficient
    (and pave the way for introducing epoll support):
    currently poll wraps the select API, which is inefficient.
    
    Signed-off-by: Edwin Török <edvin.torok@citrix.com>
    Acked-by: Christian Lindig <christian.lindig@citrix.com>
---
 tools/ocaml/xenstored/Makefile     | 12 +++---
 tools/ocaml/xenstored/parse_arg.ml |  7 +---
 tools/ocaml/xenstored/poll.ml      | 67 +++++++++++++++++++++++++++++++++
 tools/ocaml/xenstored/poll.mli     | 19 ++++++++++
 tools/ocaml/xenstored/select.ml    | 77 --------------------------------------
 tools/ocaml/xenstored/select.mli   | 27 -------------
 tools/ocaml/xenstored/xenstored.ml |  4 +-
 7 files changed, 95 insertions(+), 118 deletions(-)

diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile
index 68d35c483a..692a62584e 100644
--- a/tools/ocaml/xenstored/Makefile
+++ b/tools/ocaml/xenstored/Makefile
@@ -18,12 +18,12 @@ OCAMLINCLUDE += \
 	-I $(OCAML_TOPLEVEL)/libs/xc \
 	-I $(OCAML_TOPLEVEL)/libs/eventchn
 
-LIBS = syslog.cma syslog.cmxa select.cma select.cmxa
+LIBS = syslog.cma syslog.cmxa poll.cma poll.cmxa
 syslog_OBJS = syslog
 syslog_C_OBJS = syslog_stubs
-select_OBJS = select
-select_C_OBJS = select_stubs
-OCAML_LIBRARY = syslog select
+poll_OBJS = poll
+poll_C_OBJS = select_stubs
+OCAML_LIBRARY = syslog poll
 
 LIBS += systemd.cma systemd.cmxa
 systemd_OBJS = systemd
@@ -58,13 +58,13 @@ OBJS = paths \
 	process \
 	xenstored
 
-INTF = symbol.cmi trie.cmi syslog.cmi systemd.cmi select.cmi
+INTF = symbol.cmi trie.cmi syslog.cmi systemd.cmi poll.cmi
 
 XENSTOREDLIBS = \
 	unix.cmxa \
 	-ccopt -L -ccopt . syslog.cmxa \
 	-ccopt -L -ccopt . systemd.cmxa \
-	-ccopt -L -ccopt . select.cmxa \
+	-ccopt -L -ccopt . poll.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/mmap $(OCAML_TOPLEVEL)/libs/mmap/xenmmap.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/eventchn $(OCAML_TOPLEVEL)/libs/eventchn/xeneventchn.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xc $(OCAML_TOPLEVEL)/libs/xc/xenctrl.cmxa \
diff --git a/tools/ocaml/xenstored/parse_arg.ml b/tools/ocaml/xenstored/parse_arg.ml
index 1803c3eda0..2c4b5a8528 100644
--- a/tools/ocaml/xenstored/parse_arg.ml
+++ b/tools/ocaml/xenstored/parse_arg.ml
@@ -25,7 +25,6 @@ type config =
 	tracefile: string option; (* old xenstored compatibility *)
 	restart: bool;
 	disable_socket: bool;
-	use_select: bool;
 }
 
 let do_argv =
@@ -37,7 +36,7 @@ let do_argv =
 	and config_file = ref ""
 	and restart = ref false
 	and disable_socket = ref false
-	and use_select = ref false in
+	in
 
 	let speclist =
 		[ ("--no-domain-init", Arg.Unit (fun () -> domain_init := false),
@@ -54,9 +53,8 @@ let do_argv =
 		  ("-T", Arg.Set_string tracefile, ""); (* for compatibility *)
 		  ("--restart", Arg.Set restart, "Read database on starting");
 		  ("--disable-socket", Arg.Unit (fun () -> disable_socket := true), "Disable socket");
-		  ("--use-select", Arg.Unit (fun () -> use_select := true), "Use select instead of poll"); (* for backward compatibility and testing *)
 		] in
-	let usage_msg = "usage : xenstored [--config-file <filename>] [--no-domain-init] [--help] [--no-fork] [--reraise-top-level] [--restart] [--disable-socket] [--use-select]" in
+	let usage_msg = "usage : xenstored [--config-file <filename>] [--no-domain-init] [--help] [--no-fork] [--reraise-top-level] [--restart] [--disable-socket]" in
 	Arg.parse speclist (fun _ -> ()) usage_msg;
 	{
 		domain_init = !domain_init;
@@ -68,5 +66,4 @@ let do_argv =
 		tracefile = if !tracefile <> "" then Some !tracefile else None;
 		restart = !restart;
 		disable_socket = !disable_socket;
-		use_select = !use_select;
 	}
diff --git a/tools/ocaml/xenstored/poll.ml b/tools/ocaml/xenstored/poll.ml
new file mode 100644
index 0000000000..26f8620dfc
--- /dev/null
+++ b/tools/ocaml/xenstored/poll.ml
@@ -0,0 +1,67 @@
+(*
+ * Copyright (C) 2014 Zheng Li <dev@zheng.li>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *)
+
+
+(* The [read], [write], [except] are fields mapped to the POLLIN/OUT/PRI
+   subscription flags used by poll, which have a correspondence to the
+   readfds, writefds, exceptfds concept as in select. *)
+type event = {
+	mutable read: bool;
+	mutable write: bool;
+	mutable except: bool;
+}
+
+external select_on_poll: (Unix.file_descr * event) array -> int -> int = "stub_select_on_poll"
+external set_fd_limit: int -> unit = "stub_set_fd_limit"
+
+(* The rlim_max given to setrlimit must not go above the system level nr_open,
+   which we can read from /proc/sys. *)
+let get_sys_fs_nr_open () =
+	try
+		let ch = open_in "/proc/sys/fs/nr_open" in
+		let v = int_of_string (input_line ch) in
+		close_in_noerr ch; v
+	with _ -> 1024 * 1024
+
+let init_event () = {read = false; write = false; except = false}
+
+let poll_select in_fds out_fds exc_fds timeout =
+	let h = Hashtbl.create 57 in
+	let add_event event_set fd =
+		let e =
+			try Hashtbl.find h fd
+			with Not_found ->
+				let e = init_event () in
+				Hashtbl.add h fd e; e in
+		event_set e in
+	List.iter (add_event (fun x -> x.read <- true)) in_fds;
+	List.iter (add_event (fun x -> x.write <- true)) out_fds;
+	List.iter (add_event (fun x -> x.except <- true)) exc_fds;
+	(* Unix.stdin and init_event are dummy input as stubs, which will
+           always be overwritten later on.  *)
+	let a = Array.make (Hashtbl.length h) (Unix.stdin, init_event ()) in
+	let i = ref (-1) in
+	Hashtbl.iter (fun fd event -> incr i; Array.set a !i (fd, event)) h;
+	let n = select_on_poll a (int_of_float (timeout *. 1000.)) in
+	let r = [], [], [] in
+	if n = 0 then r else
+		Array.fold_right
+			(fun (fd, event) (r, w, x) ->
+			 (if event.read then fd :: r else r),
+			 (if event.write then fd :: w else w),
+			 (if event.except then fd :: x else x))
+			a r
+
+let () =
+        set_fd_limit (get_sys_fs_nr_open ())
diff --git a/tools/ocaml/xenstored/poll.mli b/tools/ocaml/xenstored/poll.mli
new file mode 100644
index 0000000000..f73465b99f
--- /dev/null
+++ b/tools/ocaml/xenstored/poll.mli
@@ -0,0 +1,19 @@
+(*
+ * Copyright (C) 2014 Zheng Li <dev@zheng.li>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *)
+
+
+(** Same interface and semantics as [Unix.select], implemented using poll(3). *)
+val poll_select:
+	Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> float
+	-> Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
diff --git a/tools/ocaml/xenstored/select.ml b/tools/ocaml/xenstored/select.ml
deleted file mode 100644
index 0455e163e3..0000000000
--- a/tools/ocaml/xenstored/select.ml
+++ /dev/null
@@ -1,77 +0,0 @@
-(*
- * Copyright (C) 2014 Zheng Li <dev@zheng.li>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *)
-
-
-(* The [read], [write], [except] are fields mapped to the POLLIN/OUT/PRI
-   subscription flags used by poll, which have a correspondence to the
-   readfds, writefds, exceptfds concept as in select. *)
-type event = {
-	mutable read: bool;
-	mutable write: bool;
-	mutable except: bool;
-}
-
-external select_on_poll: (Unix.file_descr * event) array -> int -> int = "stub_select_on_poll"
-external set_fd_limit: int -> unit = "stub_set_fd_limit"
-
-(* The rlim_max given to setrlimit must not go above the system level nr_open,
-   which we can read from /proc/sys. *)
-let get_sys_fs_nr_open () =
-	try
-		let ch = open_in "/proc/sys/fs/nr_open" in
-		let v = int_of_string (input_line ch) in
-		close_in_noerr ch; v
-	with _ -> 1024 * 1024
-
-let init_event () = {read = false; write = false; except = false}
-
-let poll_select in_fds out_fds exc_fds timeout =
-	let h = Hashtbl.create 57 in
-	let add_event event_set fd =
-		let e =
-			try Hashtbl.find h fd
-			with Not_found ->
-				let e = init_event () in
-				Hashtbl.add h fd e; e in
-		event_set e in
-	List.iter (add_event (fun x -> x.read <- true)) in_fds;
-	List.iter (add_event (fun x -> x.write <- true)) out_fds;
-	List.iter (add_event (fun x -> x.except <- true)) exc_fds;
-	(* Unix.stdin and init_event are dummy input as stubs, which will
-           always be overwritten later on.  *)
-	let a = Array.make (Hashtbl.length h) (Unix.stdin, init_event ()) in
-	let i = ref (-1) in
-	Hashtbl.iter (fun fd event -> incr i; Array.set a !i (fd, event)) h;
-	let n = select_on_poll a (int_of_float (timeout *. 1000.)) in
-	let r = [], [], [] in
-	if n = 0 then r else
-		Array.fold_right
-			(fun (fd, event) (r, w, x) ->
-			 (if event.read then fd :: r else r),
-			 (if event.write then fd :: w else w),
-			 (if event.except then fd :: x else x))
-			a r
-
-(* If the use_poll function is not called at all, we default to the original Unix.select behavior *)
-let select_fun = ref Unix.select
-
-let use_poll yes =
-	let sel_fun, max_fd =
-		if yes then poll_select, get_sys_fs_nr_open ()
-		else Unix.select, 1024 in
-	select_fun := sel_fun;
-	set_fd_limit max_fd
-
-let select in_fds out_fds exc_fds timeout =
-	(!select_fun) in_fds out_fds exc_fds timeout
diff --git a/tools/ocaml/xenstored/select.mli b/tools/ocaml/xenstored/select.mli
deleted file mode 100644
index 3912779172..0000000000
--- a/tools/ocaml/xenstored/select.mli
+++ /dev/null
@@ -1,27 +0,0 @@
-(*
- * Copyright (C) 2014 Zheng Li <dev@zheng.li>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *)
-
-
-(** Same interface and semantics as [Unix.select] but with an extra alternative
-    implementation based on poll. Switching implementations is done by calling
-     the [use_poll] function. *)
-val select:
-	Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> float
-	-> Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
-
-(** [use_poll true] will use poll based select with max fds number limitation
-   eliminated; [use_poll false] will use standard [Unix.select] with max fd
-   number set to 1024; not calling this function at all equals to use the
-   standard [Unix.select] with max fd number setting untouched. *)
-val use_poll: bool -> unit
diff --git a/tools/ocaml/xenstored/xenstored.ml b/tools/ocaml/xenstored/xenstored.ml
index a4466c5b5c..5b96f1852a 100644
--- a/tools/ocaml/xenstored/xenstored.ml
+++ b/tools/ocaml/xenstored/xenstored.ml
@@ -308,8 +308,6 @@ let _ =
 		);
 	);
 
-	Select.use_poll (not cf.use_select);
-
 	Sys.set_signal Sys.sighup (Sys.Signal_handle sighup_handler);
 	Sys.set_signal Sys.sigterm (Sys.Signal_handle (fun _ -> quit := true));
 	Sys.set_signal Sys.sigusr1 (Sys.Signal_handle (fun _ -> sigusr1_handler store));
@@ -453,7 +451,7 @@ let _ =
 		let inset, outset = Connections.select ~only_if:is_peaceful cons in
 		let rset, wset, _ =
 		try
-			Select.select (spec_fds @ inset) outset [] timeout
+			Poll.poll_select (spec_fds @ inset) outset [] timeout
 		with Unix.Unix_error(Unix.EINTR, _, _) ->
 			[], [], [] in
 		let sfds, cfds =
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:58:06 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:58:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MXW-00080o-U0; Sat, 22 Aug 2020 05:58:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MXU-00080f-WC
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:05 +0000
X-Inumbo-ID: 1d802c9f-f3b8-4829-968e-abb2ca5fb0b2
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 1d802c9f-f3b8-4829-968e-abb2ca5fb0b2;
 Sat, 22 Aug 2020 05:58:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=6GJRY23HsNjSF6Qvc5Pbouo+Vva2p79jQqOBh8COmmQ=; b=4GjMsOAQojwWRxREY/wCMhiS5g
 3DC8DNUXkoZp1RIhUbH+ts5pROHCtljTzKgE0SF+/m2WzRfoRxbFofTKQ7miq1mZyIaFI784ar4xB
 jHMUzilM7/W8ayVgDyALQYQzy2OtRcUyXHJ4QbK3PrB1bRjdF2YlPtgkElChmgW2OGMg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXU-0001hi-4s
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXU-0008SI-4B
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/pv: handle writes to the EFER MSR
Message-Id: <E1k9MXU-0008SI-4B@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:58:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit feab5bddf771f04ec5e5fbe4c704db740e8401ab
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Mon Aug 17 17:57:52 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    x86/pv: handle writes to the EFER MSR
    
    Silently drop writes to the EFER MSR for PV guests if the value is not
    changed from what it's being reported. Current PV Linux will attempt
    to write to the MSR with the same value that's been read, and raising
    a fault will result in a guest crash.
    
    As part of this work introduce a helper to easily get the EFER value
    reported to guests.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/emul-priv-op.c | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index efeb2a727e..d1d16b4806 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -837,6 +837,23 @@ static inline bool is_cpufreq_controller(const struct domain *d)
             is_hardware_domain(d));
 }
 
+static uint64_t guest_efer(const struct domain *d)
+{
+    uint64_t val;
+
+    /* Hide unknown bits, and unconditionally hide SVME from guests. */
+    val = read_efer() & EFER_KNOWN_MASK & ~EFER_SVME;
+    /*
+     * Hide the 64-bit features from 32-bit guests.  SCE has
+     * vendor-dependent behaviour.
+     */
+    if ( is_pv_32bit_domain(d) )
+        val &= ~(EFER_LME | EFER_LMA |
+                 (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL
+                  ? EFER_SCE : 0));
+    return val;
+}
+
 static int read_msr(unsigned int reg, uint64_t *val,
                     struct x86_emulate_ctxt *ctxt)
 {
@@ -880,16 +897,7 @@ static int read_msr(unsigned int reg, uint64_t *val,
         return X86EMUL_OKAY;
 
     case MSR_EFER:
-        /* Hide unknown bits, and unconditionally hide SVME from guests. */
-        *val = read_efer() & EFER_KNOWN_MASK & ~EFER_SVME;
-        /*
-         * Hide the 64-bit features from 32-bit guests.  SCE has
-         * vendor-dependent behaviour.
-         */
-        if ( is_pv_32bit_domain(currd) )
-            *val &= ~(EFER_LME | EFER_LMA |
-                      (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL
-                       ? EFER_SCE : 0));
+        *val = guest_efer(currd);
         return X86EMUL_OKAY;
 
     case MSR_K7_FID_VID_CTL:
@@ -1005,6 +1013,15 @@ static int write_msr(unsigned int reg, uint64_t val,
         curr->arch.pv.gs_base_user = val;
         return X86EMUL_OKAY;
 
+    case MSR_EFER:
+        /*
+         * Reject writes which change the value, but Linux depends on being
+         * able to write back the current value.
+         */
+        if ( val != guest_efer(currd) )
+            break;
+        return X86EMUL_OKAY;
+
     case MSR_K7_FID_VID_STATUS:
     case MSR_K7_FID_VID_CTL:
     case MSR_K8_PSTATE_LIMIT:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:58:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:58:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MXg-00081k-Vb; Sat, 22 Aug 2020 05:58:16 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MXe-00081b-Vj
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:15 +0000
X-Inumbo-ID: 35b6a4f1-1260-456b-8ebc-ff2d53d73b36
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 35b6a4f1-1260-456b-8ebc-ff2d53d73b36;
 Sat, 22 Aug 2020 05:58:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Z90UaIBaH8yG9mXVysGMWM0kzbVILpenh4mnIEviJo0=; b=bgwNO24LBjf1kmCIrFqdmfJzKC
 XehYrQ0bmc1KGwfaFzqHCqstJ5+zssXDfEWcZ97oOsG0XahH6M3i39d7HshUL6CCWA7WL1w6HtoHS
 qCi+sc5HrGyB+h29fxNRX2x1WvKnR0+rLJaolZMokz+JNp7O3Z8nVmSTszMhvghymdyw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXe-0001ia-81
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXe-0008So-7G
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/pv: handle reads to the PAT MSR
Message-Id: <E1k9MXe-0008So-7G@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:58:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ba28efb242341c35da30251943c352b6e00bf425
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Mon Aug 17 17:57:53 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    x86/pv: handle reads to the PAT MSR
    
    The value in the PAT MSR is part of the ABI between Xen and PV guests,
    and there's no reason to not allow a PV guest to read it.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/emul-priv-op.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index d1d16b4806..971ba9e58c 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -900,6 +900,10 @@ static int read_msr(unsigned int reg, uint64_t *val,
         *val = guest_efer(currd);
         return X86EMUL_OKAY;
 
+    case MSR_IA32_CR_PAT:
+        *val = XEN_MSR_PAT;
+        return X86EMUL_OKAY;
+
     case MSR_K7_FID_VID_CTL:
     case MSR_K7_FID_VID_STATUS:
     case MSR_K8_PSTATE_LIMIT:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:58:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:58:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MXr-00082i-10; Sat, 22 Aug 2020 05:58:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MXp-00082V-28
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:25 +0000
X-Inumbo-ID: 2f289abb-e173-4ba8-9c86-3421e39f1a17
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 2f289abb-e173-4ba8-9c86-3421e39f1a17;
 Sat, 22 Aug 2020 05:58:24 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=c4MRQ1Ap4tTg1d3iqYojYz9QEuP3w0K3VMEv9oA0h+8=; b=kBZe+dnlKE9cWOT71bSRkCS8KS
 tygx0SAjjyOlvAu5ATqK6nt0Fp1W7g4npE84HRgy1oMjOU3leVfzF/BsJYx7OVVW+/uXWSs+/MMVQ
 aeb+f9veshBRsNYsmF4AU+TQKrG0s359oxD9YsnpngnQfjUkOqDrMGjhAU/5uUc8AMpQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXo-0001ij-Av
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXo-0008TG-AE
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:24 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/pv: allow reading APIC_BASE MSR
Message-Id: <E1k9MXo-0008TG-AE@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:58:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a825751f633482c0634ebb7c7b7ba33acadcfe7b
Author:     Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Mon Aug 17 17:57:54 2020 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Aug 18 17:34:50 2020 +0100

    x86/pv: allow reading APIC_BASE MSR
    
    Linux PV guests will attempt to read the APIC_BASE MSR, so just report
    a default value to make Linux happy.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/emul-priv-op.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index 971ba9e58c..bcc1188f6a 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -872,6 +872,13 @@ static int read_msr(unsigned int reg, uint64_t *val,
 
     switch ( reg )
     {
+    case MSR_APIC_BASE:
+        /* Linux PV guests will attempt to read APIC_BASE. */
+        *val = APIC_BASE_ENABLE | APIC_DEFAULT_PHYS_BASE;
+        if ( !curr->vcpu_id )
+            *val |= APIC_BASE_BSP;
+        return X86EMUL_OKAY;
+
     case MSR_FS_BASE:
         if ( is_pv_32bit_domain(currd) )
             break;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:58:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:58:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MY1-00083d-2i; Sat, 22 Aug 2020 05:58:37 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MXz-00083S-Qh
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:35 +0000
X-Inumbo-ID: 025aaa30-d94d-492f-87d3-8466052d1d6c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 025aaa30-d94d-492f-87d3-8466052d1d6c;
 Sat, 22 Aug 2020 05:58:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=9OG3lE6Pq7v21fcOLsTaLraDVq5HYNqa1oDYNlwfV6Y=; b=qGRl4ky+iqLaOAoU89QOP8hO0W
 cBSkAY7fLj/R5k6KzDxt5KjlB4jH65TNANk9qMWhYjhapwWqAGJYuFjItR3EAabwRcIoa3uLpT9/s
 f1pdAR871iut3Z3Qky/e3RzWw8QiQNHGOcL3j05uxGQl561G1WmqtF+3hcsLlgPrUwhY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXy-0001iq-Ex
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MXy-0008Tg-DH
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:34 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86: move domain_cpu_policy_changed()
Message-Id: <E1k9MXy-0008Tg-DH@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:58:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 46a5f4fb5a973b10809d6d5438c1ddb419de5496
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 19 11:08:46 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 19 11:08:46 2020 +0200

    x86: move domain_cpu_policy_changed()
    
    This is in preparation of making the building of domctl.c conditional.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/domain.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++
 xen/arch/x86/domctl.c | 167 --------------------------------------------------
 2 files changed, 167 insertions(+), 167 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index d1ecc7b83b..00ef05b4af 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -294,6 +294,173 @@ void update_guest_memory_policy(struct vcpu *v,
     }
 }
 
+void domain_cpu_policy_changed(struct domain *d)
+{
+    const struct cpuid_policy *p = d->arch.cpuid;
+    struct vcpu *v;
+
+    if ( is_pv_domain(d) )
+    {
+        if ( ((levelling_caps & LCAP_1cd) == LCAP_1cd) )
+        {
+            uint64_t mask = cpuidmask_defaults._1cd;
+            uint32_t ecx = p->basic._1c;
+            uint32_t edx = p->basic._1d;
+
+            /*
+             * Must expose hosts HTT and X2APIC value so a guest using native
+             * CPUID can correctly interpret other leaves which cannot be
+             * masked.
+             */
+            if ( cpu_has_x2apic )
+                ecx |= cpufeat_mask(X86_FEATURE_X2APIC);
+            if ( cpu_has_htt )
+                edx |= cpufeat_mask(X86_FEATURE_HTT);
+
+            switch ( boot_cpu_data.x86_vendor )
+            {
+            case X86_VENDOR_INTEL:
+                /*
+                 * Intel masking MSRs are documented as AND masks.
+                 * Experimentally, they are applied after OSXSAVE and APIC
+                 * are fast-forwarded from real hardware state.
+                 */
+                mask &= ((uint64_t)edx << 32) | ecx;
+
+                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
+                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
+                else
+                    ecx = 0;
+                edx = cpufeat_mask(X86_FEATURE_APIC);
+
+                mask |= ((uint64_t)edx << 32) | ecx;
+                break;
+
+            case X86_VENDOR_AMD:
+            case X86_VENDOR_HYGON:
+                mask &= ((uint64_t)ecx << 32) | edx;
+
+                /*
+                 * AMD masking MSRs are documented as overrides.
+                 * Experimentally, fast-forwarding of the OSXSAVE and APIC
+                 * bits from real hardware state only occurs if the MSR has
+                 * the respective bits set.
+                 */
+                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
+                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
+                else
+                    ecx = 0;
+                edx = cpufeat_mask(X86_FEATURE_APIC);
+
+                /*
+                 * If the Hypervisor bit is set in the policy, we can also
+                 * forward it into real CPUID.
+                 */
+                if ( p->basic.hypervisor )
+                    ecx |= cpufeat_mask(X86_FEATURE_HYPERVISOR);
+
+                mask |= ((uint64_t)ecx << 32) | edx;
+                break;
+            }
+
+            d->arch.pv.cpuidmasks->_1cd = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_6c) == LCAP_6c) )
+        {
+            uint64_t mask = cpuidmask_defaults._6c;
+
+            if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
+                mask &= (~0ULL << 32) | p->basic.raw[6].c;
+
+            d->arch.pv.cpuidmasks->_6c = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_7ab0) == LCAP_7ab0) )
+        {
+            uint64_t mask = cpuidmask_defaults._7ab0;
+
+            /*
+             * Leaf 7[0].eax is max_subleaf, not a feature mask.  Take it
+             * wholesale from the policy, but clamp the features in 7[0].ebx
+             * per usual.
+             */
+            if ( boot_cpu_data.x86_vendor &
+                 (X86_VENDOR_AMD | X86_VENDOR_HYGON) )
+                mask = (((uint64_t)p->feat.max_subleaf << 32) |
+                        ((uint32_t)mask & p->feat._7b0));
+
+            d->arch.pv.cpuidmasks->_7ab0 = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_Da1) == LCAP_Da1) )
+        {
+            uint64_t mask = cpuidmask_defaults.Da1;
+            uint32_t eax = p->xstate.Da1;
+
+            if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
+                mask &= (~0ULL << 32) | eax;
+
+            d->arch.pv.cpuidmasks->Da1 = mask;
+        }
+
+        if ( ((levelling_caps & LCAP_e1cd) == LCAP_e1cd) )
+        {
+            uint64_t mask = cpuidmask_defaults.e1cd;
+            uint32_t ecx = p->extd.e1c;
+            uint32_t edx = p->extd.e1d;
+
+            /*
+             * Must expose hosts CMP_LEGACY value so a guest using native
+             * CPUID can correctly interpret other leaves which cannot be
+             * masked.
+             */
+            if ( cpu_has_cmp_legacy )
+                ecx |= cpufeat_mask(X86_FEATURE_CMP_LEGACY);
+
+            /*
+             * If not emulating AMD or Hygon, clear the duplicated features
+             * in e1d.
+             */
+            if ( !(p->x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) )
+                edx &= ~CPUID_COMMON_1D_FEATURES;
+
+            switch ( boot_cpu_data.x86_vendor )
+            {
+            case X86_VENDOR_INTEL:
+                mask &= ((uint64_t)edx << 32) | ecx;
+                break;
+
+            case X86_VENDOR_AMD:
+            case X86_VENDOR_HYGON:
+                mask &= ((uint64_t)ecx << 32) | edx;
+
+                /*
+                 * Fast-forward bits - Must be set in the masking MSR for
+                 * fast-forwarding to occur in hardware.
+                 */
+                ecx = 0;
+                edx = cpufeat_mask(X86_FEATURE_APIC);
+
+                mask |= ((uint64_t)ecx << 32) | edx;
+                break;
+            }
+
+            d->arch.pv.cpuidmasks->e1cd = mask;
+        }
+    }
+
+    for_each_vcpu ( d, v )
+    {
+        cpuid_policy_updated(v);
+
+        /* If PMU version is zero then the guest doesn't have VPMU */
+        if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
+             p->basic.pmu_version == 0 )
+            vpmu_destroy(v);
+    }
+}
+
 #ifndef CONFIG_BIGMEM
 /*
  * The hole may be at or above the 44-bit boundary, so we need to determine
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 6f2c69788d..7c644add92 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -49,173 +49,6 @@ static int gdbsx_guest_mem_io(domid_t domid, struct xen_domctl_gdbsx_memio *iop)
 }
 #endif
 
-void domain_cpu_policy_changed(struct domain *d)
-{
-    const struct cpuid_policy *p = d->arch.cpuid;
-    struct vcpu *v;
-
-    if ( is_pv_domain(d) )
-    {
-        if ( ((levelling_caps & LCAP_1cd) == LCAP_1cd) )
-        {
-            uint64_t mask = cpuidmask_defaults._1cd;
-            uint32_t ecx = p->basic._1c;
-            uint32_t edx = p->basic._1d;
-
-            /*
-             * Must expose hosts HTT and X2APIC value so a guest using native
-             * CPUID can correctly interpret other leaves which cannot be
-             * masked.
-             */
-            if ( cpu_has_x2apic )
-                ecx |= cpufeat_mask(X86_FEATURE_X2APIC);
-            if ( cpu_has_htt )
-                edx |= cpufeat_mask(X86_FEATURE_HTT);
-
-            switch ( boot_cpu_data.x86_vendor )
-            {
-            case X86_VENDOR_INTEL:
-                /*
-                 * Intel masking MSRs are documented as AND masks.
-                 * Experimentally, they are applied after OSXSAVE and APIC
-                 * are fast-forwarded from real hardware state.
-                 */
-                mask &= ((uint64_t)edx << 32) | ecx;
-
-                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
-                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
-                else
-                    ecx = 0;
-                edx = cpufeat_mask(X86_FEATURE_APIC);
-
-                mask |= ((uint64_t)edx << 32) | ecx;
-                break;
-
-            case X86_VENDOR_AMD:
-            case X86_VENDOR_HYGON:
-                mask &= ((uint64_t)ecx << 32) | edx;
-
-                /*
-                 * AMD masking MSRs are documented as overrides.
-                 * Experimentally, fast-forwarding of the OSXSAVE and APIC
-                 * bits from real hardware state only occurs if the MSR has
-                 * the respective bits set.
-                 */
-                if ( ecx & cpufeat_mask(X86_FEATURE_XSAVE) )
-                    ecx = cpufeat_mask(X86_FEATURE_OSXSAVE);
-                else
-                    ecx = 0;
-                edx = cpufeat_mask(X86_FEATURE_APIC);
-
-                /*
-                 * If the Hypervisor bit is set in the policy, we can also
-                 * forward it into real CPUID.
-                 */
-                if ( p->basic.hypervisor )
-                    ecx |= cpufeat_mask(X86_FEATURE_HYPERVISOR);
-
-                mask |= ((uint64_t)ecx << 32) | edx;
-                break;
-            }
-
-            d->arch.pv.cpuidmasks->_1cd = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_6c) == LCAP_6c) )
-        {
-            uint64_t mask = cpuidmask_defaults._6c;
-
-            if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
-                mask &= (~0ULL << 32) | p->basic.raw[6].c;
-
-            d->arch.pv.cpuidmasks->_6c = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_7ab0) == LCAP_7ab0) )
-        {
-            uint64_t mask = cpuidmask_defaults._7ab0;
-
-            /*
-             * Leaf 7[0].eax is max_subleaf, not a feature mask.  Take it
-             * wholesale from the policy, but clamp the features in 7[0].ebx
-             * per usual.
-             */
-            if ( boot_cpu_data.x86_vendor &
-                 (X86_VENDOR_AMD | X86_VENDOR_HYGON) )
-                mask = (((uint64_t)p->feat.max_subleaf << 32) |
-                        ((uint32_t)mask & p->feat._7b0));
-
-            d->arch.pv.cpuidmasks->_7ab0 = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_Da1) == LCAP_Da1) )
-        {
-            uint64_t mask = cpuidmask_defaults.Da1;
-            uint32_t eax = p->xstate.Da1;
-
-            if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
-                mask &= (~0ULL << 32) | eax;
-
-            d->arch.pv.cpuidmasks->Da1 = mask;
-        }
-
-        if ( ((levelling_caps & LCAP_e1cd) == LCAP_e1cd) )
-        {
-            uint64_t mask = cpuidmask_defaults.e1cd;
-            uint32_t ecx = p->extd.e1c;
-            uint32_t edx = p->extd.e1d;
-
-            /*
-             * Must expose hosts CMP_LEGACY value so a guest using native
-             * CPUID can correctly interpret other leaves which cannot be
-             * masked.
-             */
-            if ( cpu_has_cmp_legacy )
-                ecx |= cpufeat_mask(X86_FEATURE_CMP_LEGACY);
-
-            /*
-             * If not emulating AMD or Hygon, clear the duplicated features
-             * in e1d.
-             */
-            if ( !(p->x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) )
-                edx &= ~CPUID_COMMON_1D_FEATURES;
-
-            switch ( boot_cpu_data.x86_vendor )
-            {
-            case X86_VENDOR_INTEL:
-                mask &= ((uint64_t)edx << 32) | ecx;
-                break;
-
-            case X86_VENDOR_AMD:
-            case X86_VENDOR_HYGON:
-                mask &= ((uint64_t)ecx << 32) | edx;
-
-                /*
-                 * Fast-forward bits - Must be set in the masking MSR for
-                 * fast-forwarding to occur in hardware.
-                 */
-                ecx = 0;
-                edx = cpufeat_mask(X86_FEATURE_APIC);
-
-                mask |= ((uint64_t)ecx << 32) | edx;
-                break;
-            }
-
-            d->arch.pv.cpuidmasks->e1cd = mask;
-        }
-    }
-
-    for_each_vcpu ( d, v )
-    {
-        cpuid_policy_updated(v);
-
-        /* If PMU version is zero then the guest doesn't have VPMU */
-        if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
-             p->basic.pmu_version == 0 )
-            vpmu_destroy(v);
-    }
-}
-
 static int update_domain_cpu_policy(struct domain *d,
                                     xen_domctl_cpu_policy_t *xdpc)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:58:47 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:58:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MYB-00084u-4G; Sat, 22 Aug 2020 05:58:47 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MY9-00084j-Id
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:45 +0000
X-Inumbo-ID: 0a5d4a9b-6dc0-4ea7-9f64-9d7723e53076
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 0a5d4a9b-6dc0-4ea7-9f64-9d7723e53076;
 Sat, 22 Aug 2020 05:58:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=wnVRiJ/HObsyLtAkAHbxX3sqYzMB/x/hFSz0mCNRb/A=; b=TWAQxW0FMJXnBC8mZNMqHlqdWy
 VRBdZLDuwhdzkPT3bJtZUZD+ymiTPVn0GN69zNXjwgteZlmGboEPn/TDUmDuAOMxVrmXMeY8/fydw
 edT8ORvpFbl3hlnl0edtOIuXETL4QY08CVzoWFqmORKKEPpyHUQ27xSdhvrIGpazjSWY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MY8-0001iw-Ih
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MY8-0008UG-H8
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:44 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86: move cpu_{up,down}_helper()
Message-Id: <E1k9MY8-0008UG-H8@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:58:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit f9d67340b4aa254f64b40f2031720f61a33c2904
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 19 11:09:38 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Aug 19 11:09:38 2020 +0200

    x86: move cpu_{up,down}_helper()
    
    This is in preparation of making the building of sysctl.c conditional.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/smp.c    | 34 ++++++++++++++++++++++++++++++++++
 xen/arch/x86/sysctl.c | 33 ---------------------------------
 2 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c
index 6f1aaa2106..14aa355a6b 100644
--- a/xen/arch/x86/smp.c
+++ b/xen/arch/x86/smp.c
@@ -22,6 +22,7 @@
 #include <asm/hardirq.h>
 #include <asm/hpet.h>
 #include <asm/hvm/support.h>
+#include <asm/setup.h>
 #include <irq_vectors.h>
 #include <mach_apic.h>
 
@@ -396,3 +397,36 @@ void call_function_interrupt(struct cpu_user_regs *regs)
     perfc_incr(ipis);
     smp_call_function_interrupt();
 }
+
+long cpu_up_helper(void *data)
+{
+    unsigned int cpu = (unsigned long)data;
+    int ret = cpu_up(cpu);
+
+    /* Have one more go on EBUSY. */
+    if ( ret == -EBUSY )
+        ret = cpu_up(cpu);
+
+    if ( !ret && !opt_smt &&
+         cpu_data[cpu].compute_unit_id == INVALID_CUID &&
+         cpumask_weight(per_cpu(cpu_sibling_mask, cpu)) > 1 )
+    {
+        ret = cpu_down_helper(data);
+        if ( ret )
+            printk("Could not re-offline CPU%u (%d)\n", cpu, ret);
+        else
+            ret = -EPERM;
+    }
+
+    return ret;
+}
+
+long cpu_down_helper(void *data)
+{
+    int cpu = (unsigned long)data;
+    int ret = cpu_down(cpu);
+    /* Have one more go on EBUSY. */
+    if ( ret == -EBUSY )
+        ret = cpu_down(cpu);
+    return ret;
+}
diff --git a/xen/arch/x86/sysctl.c b/xen/arch/x86/sysctl.c
index b0cb1b57e7..aff52a13f3 100644
--- a/xen/arch/x86/sysctl.c
+++ b/xen/arch/x86/sysctl.c
@@ -79,39 +79,6 @@ static void l3_cache_get(void *arg)
         l3_info->size = info.size / 1024; /* in KB unit */
 }
 
-long cpu_up_helper(void *data)
-{
-    unsigned int cpu = (unsigned long)data;
-    int ret = cpu_up(cpu);
-
-    /* Have one more go on EBUSY. */
-    if ( ret == -EBUSY )
-        ret = cpu_up(cpu);
-
-    if ( !ret && !opt_smt &&
-         cpu_data[cpu].compute_unit_id == INVALID_CUID &&
-         cpumask_weight(per_cpu(cpu_sibling_mask, cpu)) > 1 )
-    {
-        ret = cpu_down_helper(data);
-        if ( ret )
-            printk("Could not re-offline CPU%u (%d)\n", cpu, ret);
-        else
-            ret = -EPERM;
-    }
-
-    return ret;
-}
-
-long cpu_down_helper(void *data)
-{
-    int cpu = (unsigned long)data;
-    int ret = cpu_down(cpu);
-    /* Have one more go on EBUSY. */
-    if ( ret == -EBUSY )
-        ret = cpu_down(cpu);
-    return ret;
-}
-
 static long smt_up_down_helper(void *data)
 {
     bool up = (bool)data;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:58:56 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:58:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MYK-00085y-7d; Sat, 22 Aug 2020 05:58:56 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MYJ-00085s-E3
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:55 +0000
X-Inumbo-ID: 1024e56b-fd1e-4049-8f99-dfdbfcb808ac
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 1024e56b-fd1e-4049-8f99-dfdbfcb808ac;
 Sat, 22 Aug 2020 05:58:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=N7XoqU0D7O8fAEqlmmLt9pO52YfIpPQi44GRCnbPDmU=; b=AAEhX2vGlO268/L0AiA+Qzy7tH
 IxPUA1maUk7r0SkYB4dtvaP7O8mVLWFhrWaw9FM7e7VHXKvsN2FZpiiQACt9xjZxko1hJXdsbI9GO
 LoU2dWjjYbn6GWiZwWx+RIjhdCti97zq1Xnmbje82ORY+sCd+hgKasFLdygjbmi2tcF4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MYI-0001j3-MB
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MYI-0008Uh-Kt
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:58:54 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] arm: Add Neoverse N1 processor identification
Message-Id: <E1k9MYI-0008Uh-Kt@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:58:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 3b418b33265402aab0cb1bf2b745a25724bae2d8
Author:     Bertrand Marquis <bertrand.marquis@arm.com>
AuthorDate: Tue Aug 18 14:47:38 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Thu Aug 20 10:19:30 2020 +0100

    arm: Add Neoverse N1 processor identification
    
    Add MIDR and CPU part numbers for Neoverse N1
    
    Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/include/asm-arm/processor.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index aa642e3ab2..3ca67f8157 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -58,6 +58,7 @@
 #define ARM_CPU_PART_CORTEX_A73     0xD09
 #define ARM_CPU_PART_CORTEX_A75     0xD0A
 #define ARM_CPU_PART_CORTEX_A76     0xD0B
+#define ARM_CPU_PART_NEOVERSE_N1    0xD0C
 
 #define MIDR_CORTEX_A12 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A12)
 #define MIDR_CORTEX_A17 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A17)
@@ -68,6 +69,7 @@
 #define MIDR_CORTEX_A73 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A73)
 #define MIDR_CORTEX_A75 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A75)
 #define MIDR_CORTEX_A76 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76)
+#define MIDR_NEOVERSE_N1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N1)
 
 /* MPIDR Multiprocessor Affinity Register */
 #define _MPIDR_UP           (30)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Sat Aug 22 05:59:06 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 22 Aug 2020 05:59:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1k9MYU-000879-9F; Sat, 22 Aug 2020 05:59:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hlYE=CA=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1k9MYT-000871-H3
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:59:05 +0000
X-Inumbo-ID: 957c45ce-f479-4ec2-b514-deee8a414940
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 957c45ce-f479-4ec2-b514-deee8a414940;
 Sat, 22 Aug 2020 05:59:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=W2hWJ7/z7Qihd3OrCTvv+cwjkg3l1O/4kqzhrKt4OHw=; b=kJ6uc6uZBmaUh467EZgPL+/MCQ
 SB467V8z39ZrOo4COG4Io1jA7Sk2msQ6oyY04OYPqUXZObWGXVadc0b+D30j8toR5Bz7SdZDO7+cB
 kEW3bT/o3mrAi3OBrAeMacsmaeoEOvvdWUCTqIcBy0UYaJQbPOiOmiT3qy5TDJlgv/Tc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MYS-0001jQ-P5
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:59:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1k9MYS-00005K-OP
 for xen-changelog@lists.xenproject.org; Sat, 22 Aug 2020 05:59:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] xen/arm: Enable CPU Erratum 1165522 for Neoverse
Message-Id: <E1k9MYS-00005K-OP@xenbits.xenproject.org>
Date: Sat, 22 Aug 2020 05:59:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 858c0be8c2fa4125a0fa0acaa03ae730e5c7cb3c
Author:     Bertrand Marquis <bertrand.marquis@arm.com>
AuthorDate: Tue Aug 18 14:47:39 2020 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Thu Aug 20 10:19:50 2020 +0100

    xen/arm: Enable CPU Erratum 1165522 for Neoverse
    
    Enable CPU erratum of Speculative AT on the Neoverse N1 processor
    versions r0p0 to r2p0.
    Also Fix Cortex A76 Erratum string which had a wrong errata number.
    
    Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/cpuerrata.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 0248893de0..6c09017515 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -476,9 +476,15 @@ static const struct arm_cpu_capabilities arm_errata[] = {
         .matches = has_ssbd_mitigation,
     },
 #endif
+    {
+        /* Neoverse r0p0 - r2p0 */
+        .desc = "ARM erratum 1165522",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_RANGE(MIDR_NEOVERSE_N1, 0, 2 << MIDR_VARIANT_SHIFT),
+    },
     {
         /* Cortex-A76 r0p0 - r2p0 */
-        .desc = "ARM erratum 116522",
+        .desc = "ARM erratum 1165522",
         .capability = ARM64_WORKAROUND_AT_SPECULATE,
         MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT),
     },
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Aug 24 13:22:12 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 24 Aug 2020 13:22:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kACQJ-00028p-Lj; Mon, 24 Aug 2020 13:22:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=yGLb=CC=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kACQI-00028g-5o
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:22:06 +0000
X-Inumbo-ID: 76ae4ed3-2f3b-4026-983b-5d47c3c6e433
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 76ae4ed3-2f3b-4026-983b-5d47c3c6e433;
 Mon, 24 Aug 2020 13:22:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=hshhIBRHqvxUK2QyF6bd/6yMVrKXBdb386ekUl1XbfU=; b=FGrxYZV9ElRRaoYy0oayUu3SZR
 CMHlzJONe+BgIKOKSZIcNhcpwx9N++6KuVxXXnirB9+b8JvQ6HXGQobVcVz8e/wdwk1I8KPKlyqk7
 B/nLsRa2cdoRj6NQj8KS9z1cuSKIGP1/he6MIZyKXEetigopjBdTYkRdGXFFvRYBuMEE=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kACQG-0002iG-TG
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:22:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kACQG-0002A5-SI
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:22:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] MAINTAINERS: Add Roger Pau Monné as x86 maintainer
Message-Id: <E1kACQG-0002A5-SI@xenbits.xenproject.org>
Date: Mon, 24 Aug 2020 13:22:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ca7c88e82dcb478b157dd180e16ce79079282644
Author:     George Dunlap <george.dunlap@citrix.com>
AuthorDate: Fri Aug 21 15:32:01 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Aug 24 14:11:50 2020 +0100

    MAINTAINERS: Add Roger Pau Monné as x86 maintainer
    
    Signed-off-by: George Dunlap <george.dunlap@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger.pau@citrix.com>
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 33fe51324e..978fc2fe72 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -521,8 +521,8 @@ F:	docs/misc/vtpm-platforms.txt
 X86 ARCHITECTURE
 M:	Jan Beulich <jbeulich@suse.com>
 M:	Andrew Cooper <andrew.cooper3@citrix.com>
+M:	Roger Pau Monné <roger.pau@citrix.com>
 R:	Wei Liu <wl@xen.org>
-R:	Roger Pau Monné <roger.pau@citrix.com>
 S:	Supported
 L:	xen-devel@lists.xenproject.org
 F:	xen/arch/x86/
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Aug 24 13:44:11 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 24 Aug 2020 13:44:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAClc-00043S-Si; Mon, 24 Aug 2020 13:44:08 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=yGLb=CC=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAClc-00043N-2z
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:08 +0000
X-Inumbo-ID: 7dc7ff7e-2e90-474c-9164-c17071ad6bcb
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 7dc7ff7e-2e90-474c-9164-c17071ad6bcb;
 Mon, 24 Aug 2020 13:44:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=WwK4CyIch+W+YUtFrWv0Tefm0wuPS1VBO4irkWyefGo=; b=6DcmI0pPveQl5cd2VDgVBg55M0
 u3NJ5Csp/wW3w4HPJkPsaXAXXjyhw3tenzOsYkvTHIiTsnIdnNwZfy6Far+lSvaJ4uUDijAZh/fmt
 Bif+gPqaAvk3i5DUrje6lfWgaG/mX/+6SxgY3Awex8AM3c/CEb6LkInR1kH/KGYDnKDY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAClZ-000397-9o
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAClZ-0003dM-6m
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/vpic: fix vpic_elcr_mask macro parameter usage
Message-Id: <E1kAClZ-0003dM-6m@xenbits.xenproject.org>
Date: Mon, 24 Aug 2020 13:44:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 888dd66ea65688f2257ed01d509087fc3a97dcae
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Mon Aug 24 15:35:49 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:35:49 2020 +0200

    x86/vpic: fix vpic_elcr_mask macro parameter usage
    
    vpic_elcr_mask wasn't using the v parameter, and instead worked
    because in the context of the callers v would be vpic. Fix this by
    correctly using the parameter. While there also remove the unneeded
    casts to uint8_t and the ending semicolon.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/vpic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index 61f4b6784c..936c7b27c6 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -41,7 +41,7 @@
 #define vpic_lock(v)   spin_lock(__vpic_lock(v))
 #define vpic_unlock(v) spin_unlock(__vpic_lock(v))
 #define vpic_is_locked(v) spin_is_locked(__vpic_lock(v))
-#define vpic_elcr_mask(v) (vpic->is_master ? (uint8_t)0xf8 : (uint8_t)0xde);
+#define vpic_elcr_mask(v) ((v)->is_master ? 0xf8 : 0xde)
 
 /* Return the highest priority found in mask. Return 8 if none. */
 #define VPIC_PRIO_NONE 8
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Aug 24 13:44:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 24 Aug 2020 13:44:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAClk-00044U-UJ; Mon, 24 Aug 2020 13:44:16 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=yGLb=CC=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAClk-00044N-79
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:16 +0000
X-Inumbo-ID: a91863ab-1d54-462b-a650-a009289d0f63
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id a91863ab-1d54-462b-a650-a009289d0f63;
 Mon, 24 Aug 2020 13:44:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=0axJhNmwmKOE5V4hahtlPEM9kngDcdSCsIOiblTKHYQ=; b=kG4TMURPMAI/K+MVsVhAdZOlbs
 1hxjldiod4Bx54kNzODr/LF9BLFu64ixg/OrfFUkO9kAJxd12T+ZN4v+Wh2kkbKKAEkLAJ0NcBElB
 yBnmU2Kg6Qr4HkhbIg01ORj8Q4Cq0eP21/2BqZvd+fdmKi0Cy3P6/Pk+w9XTHxKCaQso=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAClj-00039D-DC
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAClj-0003eE-Bu
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/vpic: rename irq to pin in vpic_ioport_write
Message-Id: <E1kAClj-0003eE-Bu@xenbits.xenproject.org>
Date: Mon, 24 Aug 2020 13:44:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e8f9d219657d28d3403660f70156c2a20cbbb4bb
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Mon Aug 24 15:36:44 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:36:44 2020 +0200

    x86/vpic: rename irq to pin in vpic_ioport_write
    
    The irq variable is wrongly named, as it's used to store the pin on
    the 8259 chip, but not the global irq value. While renaming reduce
    it's scope and make it unsigned.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/vpic.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index 936c7b27c6..feb1db2ee3 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -184,7 +184,7 @@ static int vpic_intack(struct hvm_hw_vpic *vpic)
 static void vpic_ioport_write(
     struct hvm_hw_vpic *vpic, uint32_t addr, uint32_t val)
 {
-    int priority, cmd, irq;
+    int priority, cmd;
     uint8_t mask, unmasked = 0;
 
     vpic_lock(vpic);
@@ -230,6 +230,8 @@ static void vpic_ioport_write(
         }
         else
         {
+            unsigned int pin;
+
             /* OCW2 */
             cmd = val >> 5;
             switch ( cmd )
@@ -246,22 +248,22 @@ static void vpic_ioport_write(
                 priority = vpic_get_priority(vpic, mask);
                 if ( priority == VPIC_PRIO_NONE )
                     break;
-                irq = (priority + vpic->priority_add) & 7;
-                vpic->isr &= ~(1 << irq);
+                pin = (priority + vpic->priority_add) & 7;
+                vpic->isr &= ~(1 << pin);
                 if ( cmd == 5 )
-                    vpic->priority_add = (irq + 1) & 7;
+                    vpic->priority_add = (pin + 1) & 7;
                 break;
             case 3: /* Specific EOI                */
             case 7: /* Specific EOI & Rotate       */
-                irq = val & 7;
-                vpic->isr &= ~(1 << irq);
+                pin = val & 7;
+                vpic->isr &= ~(1 << pin);
                 if ( cmd == 7 )
-                    vpic->priority_add = (irq + 1) & 7;
+                    vpic->priority_add = (pin + 1) & 7;
                 /* Release lock and EOI the physical interrupt (if any). */
                 vpic_update_int_output(vpic);
                 vpic_unlock(vpic);
                 hvm_dpci_eoi(current->domain,
-                             hvm_isa_irq_to_gsi((addr >> 7) ? (irq|8) : irq),
+                             hvm_isa_irq_to_gsi((addr >> 7) ? (pin | 8) : pin),
                              NULL);
                 return; /* bail immediately */
             case 6: /* Set Priority                */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Aug 24 13:44:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 24 Aug 2020 13:44:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAClu-00045j-Vq; Mon, 24 Aug 2020 13:44:26 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=yGLb=CC=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAClu-00045a-E5
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:26 +0000
X-Inumbo-ID: fd15b587-b6da-4859-b24a-b805b02ba284
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id fd15b587-b6da-4859-b24a-b805b02ba284;
 Mon, 24 Aug 2020 13:44:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=IQr5FtnXSjJOx+KXO9eZKMfIJ8rxdA1xAVnGPCrJJ1I=; b=1yePUne85p+EILA1sRoQONVYgH
 k4fU7ojKpofMcRssLJMGYOc/kE8QFdYCN+0A66CSNpc6e4bfg7R3/mr+f06NmDiGa/x+N8mxQNKVa
 qhbGa62h+gYARF2EfylqWnWPqFcHIQNdC1JWC0llZoce6Mt2ZHZmvpkiqimlo6VPTGp8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAClt-00039P-GU
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAClt-0003ex-FQ
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: convert set_gpfn_from_mfn() to a function
Message-Id: <E1kAClt-0003ex-FQ@xenbits.xenproject.org>
Date: Mon, 24 Aug 2020 13:44:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c297c9453375892284810f0dc46d408865f9998b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 24 15:38:03 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:38:03 2020 +0200

    x86: convert set_gpfn_from_mfn() to a function
    
    It is already a little too heavy for a macro, and more logic is about to
    get added to it.
    
    This also allows reducing the scope of compat_machine_to_phys_mapping.
    
    Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_64/mm.c | 16 ++++++++++++++++
 xen/include/asm-x86/mm.h | 16 ++--------------
 2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 102079a801..227eba911e 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -40,6 +40,8 @@ EMIT_FILE;
 #include <asm/mem_sharing.h>
 #include <public/memory.h>
 
+#define compat_machine_to_phys_mapping ((unsigned int *)RDWR_COMPAT_MPT_VIRT_START)
+
 unsigned int __read_mostly m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
 
 l2_pgentry_t *compat_idle_pg_table_l2;
@@ -1454,6 +1456,20 @@ destroy_frametable:
     return ret;
 }
 
+void set_gpfn_from_mfn(unsigned long mfn, unsigned long pfn)
+{
+    const struct domain *d = page_get_owner(mfn_to_page(_mfn(mfn)));
+    unsigned long entry = (d && (d == dom_cow)) ? SHARED_M2P_ENTRY : pfn;
+
+    if ( unlikely(!machine_to_phys_mapping_valid) )
+        return;
+
+    if ( mfn < (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 )
+        compat_machine_to_phys_mapping[mfn] = entry;
+
+    machine_to_phys_mapping[mfn] = entry;
+}
+
 #include "compat/mm.c"
 
 /*
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index 7e74996053..89a55592c4 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -494,25 +494,13 @@ extern paddr_t mem_hotplug;
 #define SHARED_M2P_ENTRY         (~0UL - 1UL)
 #define SHARED_M2P(_e)           ((_e) == SHARED_M2P_ENTRY)
 
-#define compat_machine_to_phys_mapping ((unsigned int *)RDWR_COMPAT_MPT_VIRT_START)
-#define _set_gpfn_from_mfn(mfn, pfn) ({                        \
-    struct domain *d = page_get_owner(mfn_to_page(_mfn(mfn))); \
-    unsigned long entry = (d && (d == dom_cow)) ?              \
-        SHARED_M2P_ENTRY : (pfn);                              \
-    ((void)((mfn) >= (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 || \
-            (compat_machine_to_phys_mapping[(mfn)] = (unsigned int)(entry))), \
-     machine_to_phys_mapping[(mfn)] = (entry));                \
-    })
-
 /*
  * Disable some users of set_gpfn_from_mfn() (e.g., free_heap_pages()) until
  * the machine_to_phys_mapping is actually set up.
  */
 extern bool machine_to_phys_mapping_valid;
-#define set_gpfn_from_mfn(mfn, pfn) do {        \
-    if ( machine_to_phys_mapping_valid )        \
-        _set_gpfn_from_mfn(mfn, pfn);           \
-} while (0)
+
+void set_gpfn_from_mfn(unsigned long mfn, unsigned long pfn);
 
 extern struct rangeset *mmio_ro_ranges;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Aug 24 13:44:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 24 Aug 2020 13:44:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kACm5-00046h-1B; Mon, 24 Aug 2020 13:44:37 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=yGLb=CC=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kACm4-00046b-FZ
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:36 +0000
X-Inumbo-ID: 5b63d0c8-0dd6-4a97-a680-a5a5d0d71479
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5b63d0c8-0dd6-4a97-a680-a5a5d0d71479;
 Mon, 24 Aug 2020 13:44:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=xFennTuFWYUpL+u6wq3GulZqnyl6rMrNGnoofeQ1DOg=; b=bzmY1cRSa/66zs4ZGBadR7/9kC
 0iSy3eGDCkqAZ1N5jNUisEMCCmV9AvY5ntDONFWKYiClFzCBx63wwmvpzAY0LhTv82dJxazItJi/h
 YCW+oDRp133XseXOJeEiTlj4MS+uu9jLcZQM4zznDBNkjlRgtfWa0ktCgYAVMVgwh7Mc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kACm3-00039X-Jd
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kACm3-0003fn-IY
 for xen-changelog@lists.xenproject.org; Mon, 24 Aug 2020 13:44:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/PV: also check kernel endianness when building Dom0
Message-Id: <E1kACm3-0003fn-IY@xenbits.xenproject.org>
Date: Mon, 24 Aug 2020 13:44:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 347384331ee0eee22a4dc10f805847e658e523ac
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 24 15:38:48 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:38:48 2020 +0200

    x86/PV: also check kernel endianness when building Dom0
    
    While big endian x86 images are pretty unlikely to appear, merely
    logging endianness isn't of much use.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/dom0_build.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 171519e285..d79503d6a9 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -288,7 +288,8 @@ int __init dom0_construct_pv(struct domain *d,
                              module_t *initrd,
                              char *cmdline)
 {
-    int i, rc, compatible, order, machine;
+    int i, rc, order, machine;
+    bool compatible;
     struct cpu_user_regs *regs;
     unsigned long pfn, mfn;
     unsigned long nr_pages;
@@ -358,7 +359,7 @@ int __init dom0_construct_pv(struct domain *d,
     /* compatibility check */
     printk(" Xen  kernel: 64-bit, lsb%s\n",
            IS_ENABLED(CONFIG_PV32) ? ", compat32" : "");
-    compatible = 0;
+    compatible = false;
     machine = elf_uval(&elf, elf.ehdr, e_machine);
 
 #ifdef CONFIG_PV32
@@ -374,13 +375,16 @@ int __init dom0_construct_pv(struct domain *d,
                 return rc;
             }
 
-            compatible = 1;
+            compatible = true;
         }
     }
 #endif
 
     if ( elf_64bit(&elf) && machine == EM_X86_64 )
-        compatible = 1;
+        compatible = true;
+
+    if ( elf_msb(&elf) )
+        compatible = false;
 
     printk(" Dom0 kernel: %s-bit%s, %s, paddr %#" PRIx64 " -> %#" PRIx64 "\n",
            elf_64bit(&elf) ? "64" : elf_32bit(&elf) ? "32" : "??",
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:33:12 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:33:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAawb-0000fR-IZ; Tue, 25 Aug 2020 15:33:05 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAawZ-0000fM-UE
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:04 +0000
X-Inumbo-ID: 9d5ea265-caf7-4411-857d-7b5128b1a689
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 9d5ea265-caf7-4411-857d-7b5128b1a689;
 Tue, 25 Aug 2020 15:33:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=+FO6qkDn/NellYy8/RAmuYmIQZMm0fYvLA22D24Q4vY=; b=M0sgMa+KWnMVZf7V2XNIDj95bv
 /7KfgoWXhTbTgOsUtV8lTOsLTUdLuNYWEeijA0DtuOfSQo1P9GHe+QTpXoEzfAlFZutDoC6yf9TG+
 ZjEBexTmKOp+qyZL2PfXy59Xa4YSqgjmbE9JJEbMk+bin1U/dPuLB2m3ezkMtcEW13G0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAawY-0001LR-Mp
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAawY-0003mf-L3
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] MAINTAINERS: Add Roger Pau Monné as x86 maintainer
Message-Id: <E1kAawY-0003mf-L3@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ca7c88e82dcb478b157dd180e16ce79079282644
Author:     George Dunlap <george.dunlap@citrix.com>
AuthorDate: Fri Aug 21 15:32:01 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Aug 24 14:11:50 2020 +0100

    MAINTAINERS: Add Roger Pau Monné as x86 maintainer
    
    Signed-off-by: George Dunlap <george.dunlap@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger.pau@citrix.com>
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 33fe51324e..978fc2fe72 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -521,8 +521,8 @@ F:	docs/misc/vtpm-platforms.txt
 X86 ARCHITECTURE
 M:	Jan Beulich <jbeulich@suse.com>
 M:	Andrew Cooper <andrew.cooper3@citrix.com>
+M:	Roger Pau Monné <roger.pau@citrix.com>
 R:	Wei Liu <wl@xen.org>
-R:	Roger Pau Monné <roger.pau@citrix.com>
 S:	Supported
 L:	xen-devel@lists.xenproject.org
 F:	xen/arch/x86/
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:33:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:33:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAawl-0000fx-KP; Tue, 25 Aug 2020 15:33:15 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAawj-0000fp-S1
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:13 +0000
X-Inumbo-ID: 65abba85-f799-49d9-8f92-ccd1c11c5105
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 65abba85-f799-49d9-8f92-ccd1c11c5105;
 Tue, 25 Aug 2020 15:33:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=FrVnP6M8016XdhbV7jjpeIAVoevuTMWvmlMT18W+fEY=; b=Nj8HDgfxcE5rMRSMWB99y3QxPq
 18gqFJEWc4T2uxi1Ci+G7Tao0tr7zvjYeINhmIo6JTz3ogaiBxZi4d9VfaPUvTgihBI1mvIag3loB
 sGncS1SbdUZycdAAOOYrxg2uPnJhF8nyyuJ2XEtNmGzvvSaQTD7gpMkg8vB2o00kTjhk=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAawi-0001La-Pe
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAawi-0003nQ-Ow
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/vpic: fix vpic_elcr_mask macro parameter usage
Message-Id: <E1kAawi-0003nQ-Ow@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 888dd66ea65688f2257ed01d509087fc3a97dcae
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Mon Aug 24 15:35:49 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:35:49 2020 +0200

    x86/vpic: fix vpic_elcr_mask macro parameter usage
    
    vpic_elcr_mask wasn't using the v parameter, and instead worked
    because in the context of the callers v would be vpic. Fix this by
    correctly using the parameter. While there also remove the unneeded
    casts to uint8_t and the ending semicolon.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/vpic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index 61f4b6784c..936c7b27c6 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -41,7 +41,7 @@
 #define vpic_lock(v)   spin_lock(__vpic_lock(v))
 #define vpic_unlock(v) spin_unlock(__vpic_lock(v))
 #define vpic_is_locked(v) spin_is_locked(__vpic_lock(v))
-#define vpic_elcr_mask(v) (vpic->is_master ? (uint8_t)0xf8 : (uint8_t)0xde);
+#define vpic_elcr_mask(v) ((v)->is_master ? 0xf8 : 0xde)
 
 /* Return the highest priority found in mask. Return 8 if none. */
 #define VPIC_PRIO_NONE 8
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:33:24 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:33:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAawu-0000h0-M0; Tue, 25 Aug 2020 15:33:24 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAawt-0000gt-Na
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:23 +0000
X-Inumbo-ID: 899b561e-2f41-41e7-8388-cd8190947ca3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 899b561e-2f41-41e7-8388-cd8190947ca3;
 Tue, 25 Aug 2020 15:33:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=TGHBV7zqsJCIIXKNMcEu1/YMrGXZ+5hAwMpES+aHzmI=; b=npNuGVZ595Und1hToEAoRubwBW
 RUsKduy4I/PVGaC9M39e+wS/BYnWwOTBxjeAARKFWho0A5aaXBlXHAQ8GbSFuGZAP/lVmn7dUA1Ef
 pgkddToVk1/ft4S83hjcQL3i6Qda/XzO1mIlpxFAiLcNjVsO/vWJaaxUsqxJXXVfaapg=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAaws-0001Lj-SV
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAaws-0003o8-Rj
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/vpic: rename irq to pin in vpic_ioport_write
Message-Id: <E1kAaws-0003o8-Rj@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e8f9d219657d28d3403660f70156c2a20cbbb4bb
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Mon Aug 24 15:36:44 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:36:44 2020 +0200

    x86/vpic: rename irq to pin in vpic_ioport_write
    
    The irq variable is wrongly named, as it's used to store the pin on
    the 8259 chip, but not the global irq value. While renaming reduce
    it's scope and make it unsigned.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/vpic.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index 936c7b27c6..feb1db2ee3 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -184,7 +184,7 @@ static int vpic_intack(struct hvm_hw_vpic *vpic)
 static void vpic_ioport_write(
     struct hvm_hw_vpic *vpic, uint32_t addr, uint32_t val)
 {
-    int priority, cmd, irq;
+    int priority, cmd;
     uint8_t mask, unmasked = 0;
 
     vpic_lock(vpic);
@@ -230,6 +230,8 @@ static void vpic_ioport_write(
         }
         else
         {
+            unsigned int pin;
+
             /* OCW2 */
             cmd = val >> 5;
             switch ( cmd )
@@ -246,22 +248,22 @@ static void vpic_ioport_write(
                 priority = vpic_get_priority(vpic, mask);
                 if ( priority == VPIC_PRIO_NONE )
                     break;
-                irq = (priority + vpic->priority_add) & 7;
-                vpic->isr &= ~(1 << irq);
+                pin = (priority + vpic->priority_add) & 7;
+                vpic->isr &= ~(1 << pin);
                 if ( cmd == 5 )
-                    vpic->priority_add = (irq + 1) & 7;
+                    vpic->priority_add = (pin + 1) & 7;
                 break;
             case 3: /* Specific EOI                */
             case 7: /* Specific EOI & Rotate       */
-                irq = val & 7;
-                vpic->isr &= ~(1 << irq);
+                pin = val & 7;
+                vpic->isr &= ~(1 << pin);
                 if ( cmd == 7 )
-                    vpic->priority_add = (irq + 1) & 7;
+                    vpic->priority_add = (pin + 1) & 7;
                 /* Release lock and EOI the physical interrupt (if any). */
                 vpic_update_int_output(vpic);
                 vpic_unlock(vpic);
                 hvm_dpci_eoi(current->domain,
-                             hvm_isa_irq_to_gsi((addr >> 7) ? (irq|8) : irq),
+                             hvm_isa_irq_to_gsi((addr >> 7) ? (pin | 8) : pin),
                              NULL);
                 return; /* bail immediately */
             case 6: /* Set Priority                */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:33:34 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:33:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAax4-0000iz-NW; Tue, 25 Aug 2020 15:33:34 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAax3-0000ik-ME
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:33 +0000
X-Inumbo-ID: 4abf7a00-0e2f-4cfc-a671-435b599da99c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 4abf7a00-0e2f-4cfc-a671-435b599da99c;
 Tue, 25 Aug 2020 15:33:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=w15eDoRNViWf+jNK/wobpsEyrF5Q5jr/9F3WyZreBx4=; b=trmgw6Bbg3fjRzY1DN7p6uxYNN
 WNGLeY4UdnjGJBuQSXyUPHs+atcUR4wuYD1q4nKuLWEyjrupZ4zM/MwGyjtYQ5fbsghQsJeCBcupq
 xVg8VZHuCjkXsHwz2374KyrcogaFpPIMEA+OovFOq8GJteVLUpdYFcYCJluYnRKFx9PQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAax2-0001MH-Vn
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAax2-0003oo-Um
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:32 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86: convert set_gpfn_from_mfn() to a function
Message-Id: <E1kAax2-0003oo-Um@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:33:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c297c9453375892284810f0dc46d408865f9998b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 24 15:38:03 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:38:03 2020 +0200

    x86: convert set_gpfn_from_mfn() to a function
    
    It is already a little too heavy for a macro, and more logic is about to
    get added to it.
    
    This also allows reducing the scope of compat_machine_to_phys_mapping.
    
    Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_64/mm.c | 16 ++++++++++++++++
 xen/include/asm-x86/mm.h | 16 ++--------------
 2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 102079a801..227eba911e 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -40,6 +40,8 @@ EMIT_FILE;
 #include <asm/mem_sharing.h>
 #include <public/memory.h>
 
+#define compat_machine_to_phys_mapping ((unsigned int *)RDWR_COMPAT_MPT_VIRT_START)
+
 unsigned int __read_mostly m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
 
 l2_pgentry_t *compat_idle_pg_table_l2;
@@ -1454,6 +1456,20 @@ destroy_frametable:
     return ret;
 }
 
+void set_gpfn_from_mfn(unsigned long mfn, unsigned long pfn)
+{
+    const struct domain *d = page_get_owner(mfn_to_page(_mfn(mfn)));
+    unsigned long entry = (d && (d == dom_cow)) ? SHARED_M2P_ENTRY : pfn;
+
+    if ( unlikely(!machine_to_phys_mapping_valid) )
+        return;
+
+    if ( mfn < (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 )
+        compat_machine_to_phys_mapping[mfn] = entry;
+
+    machine_to_phys_mapping[mfn] = entry;
+}
+
 #include "compat/mm.c"
 
 /*
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index 7e74996053..89a55592c4 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -494,25 +494,13 @@ extern paddr_t mem_hotplug;
 #define SHARED_M2P_ENTRY         (~0UL - 1UL)
 #define SHARED_M2P(_e)           ((_e) == SHARED_M2P_ENTRY)
 
-#define compat_machine_to_phys_mapping ((unsigned int *)RDWR_COMPAT_MPT_VIRT_START)
-#define _set_gpfn_from_mfn(mfn, pfn) ({                        \
-    struct domain *d = page_get_owner(mfn_to_page(_mfn(mfn))); \
-    unsigned long entry = (d && (d == dom_cow)) ?              \
-        SHARED_M2P_ENTRY : (pfn);                              \
-    ((void)((mfn) >= (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 || \
-            (compat_machine_to_phys_mapping[(mfn)] = (unsigned int)(entry))), \
-     machine_to_phys_mapping[(mfn)] = (entry));                \
-    })
-
 /*
  * Disable some users of set_gpfn_from_mfn() (e.g., free_heap_pages()) until
  * the machine_to_phys_mapping is actually set up.
  */
 extern bool machine_to_phys_mapping_valid;
-#define set_gpfn_from_mfn(mfn, pfn) do {        \
-    if ( machine_to_phys_mapping_valid )        \
-        _set_gpfn_from_mfn(mfn, pfn);           \
-} while (0)
+
+void set_gpfn_from_mfn(unsigned long mfn, unsigned long pfn);
 
 extern struct rangeset *mmio_ro_ranges;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:33:44 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:33:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAaxE-0000k3-PC; Tue, 25 Aug 2020 15:33:44 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAaxD-0000jt-O0
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:43 +0000
X-Inumbo-ID: d263b448-fa3c-4b33-b1cf-86f53a9aedac
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id d263b448-fa3c-4b33-b1cf-86f53a9aedac;
 Tue, 25 Aug 2020 15:33:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=HqfDqbIc29RS4EwkgBhH8nfoJGWIoghdikz71M44xUA=; b=SE47WqQw8W3eQiAoMIbUSpmbiO
 vZciOGx3T767BVfRu1dFIwbu9nXLLfASwqwWOswRxlTDHVGqayySUO34nJ6STQ9jwgqdtxOVSswTe
 4wxp4vN/A+xBsoTf8axWmrnBLGD7QNZcXo6CK95aV/YDpicW2Rkd4ajY2NC1gbVnePIQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAaxD-0001MT-2S
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAaxD-0003pT-1b
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:33:43 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/PV: also check kernel endianness when building Dom0
Message-Id: <E1kAaxD-0003pT-1b@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:33:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 347384331ee0eee22a4dc10f805847e658e523ac
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Aug 24 15:38:48 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Aug 24 15:38:48 2020 +0200

    x86/PV: also check kernel endianness when building Dom0
    
    While big endian x86 images are pretty unlikely to appear, merely
    logging endianness isn't of much use.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pv/dom0_build.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 171519e285..d79503d6a9 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -288,7 +288,8 @@ int __init dom0_construct_pv(struct domain *d,
                              module_t *initrd,
                              char *cmdline)
 {
-    int i, rc, compatible, order, machine;
+    int i, rc, order, machine;
+    bool compatible;
     struct cpu_user_regs *regs;
     unsigned long pfn, mfn;
     unsigned long nr_pages;
@@ -358,7 +359,7 @@ int __init dom0_construct_pv(struct domain *d,
     /* compatibility check */
     printk(" Xen  kernel: 64-bit, lsb%s\n",
            IS_ENABLED(CONFIG_PV32) ? ", compat32" : "");
-    compatible = 0;
+    compatible = false;
     machine = elf_uval(&elf, elf.ehdr, e_machine);
 
 #ifdef CONFIG_PV32
@@ -374,13 +375,16 @@ int __init dom0_construct_pv(struct domain *d,
                 return rc;
             }
 
-            compatible = 1;
+            compatible = true;
         }
     }
 #endif
 
     if ( elf_64bit(&elf) && machine == EM_X86_64 )
-        compatible = 1;
+        compatible = true;
+
+    if ( elf_msb(&elf) )
+        compatible = false;
 
     printk(" Dom0 kernel: %s-bit%s, %s, paddr %#" PRIx64 " -> %#" PRIx64 "\n",
            elf_64bit(&elf) ? "64" : elf_32bit(&elf) ? "32" : "??",
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:55:10 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:55:10 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAbHv-0002cL-Vx; Tue, 25 Aug 2020 15:55:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAbHv-0002cG-8H
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:07 +0000
X-Inumbo-ID: bb7eb70d-aa59-40f9-b066-45505b1cdd84
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id bb7eb70d-aa59-40f9-b066-45505b1cdd84;
 Tue, 25 Aug 2020 15:55:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Rp4Ft6GUHzAnD3BAYT19gS625yMnvXmtok4Aq3HpilU=; b=o3z5jEnn3X2ZZtU6U7TFj/j/PT
 XhtGA1E2PIdW+60vdB/Baqp0EdXt+qOpSBtnMFX57RNtkmonqPufIuQZt45HBFRAKptafT65sOPDp
 ZhlrwGgQtToebVpPjlMY/MgIRwHhIZWBra0vSnFKdjJL0wNigy8Jyb/2QVCMCStBXY9U=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAbHs-0001mV-Rb
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAbHs-0005GN-Q3
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/EFI: sanitize build logic
Message-Id: <E1kAbHs-0005GN-Q3@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:55:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit de94e8b4f996517182f627300a0f8a709472c635
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Aug 25 17:43:52 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Aug 25 17:43:52 2020 +0200

    x86/EFI: sanitize build logic
    
    With changes done over time and as far as linking goes, the only special
    things about building with EFI support enabled are
    - the need for the dummy relocations object (for xen.gz uniformly in all
      build stages, for xen.efi in stage 1),
    - the special efi/buildid.o file, which can't be made part of
      efi/built_in.o, due to the extra linker options required for it.
    All other efi/*.o can be consumed from the built_in*.o files.
    
    In efi/Makefile, besides moving relocs-dummy.o to "extra", also properly
    split between obj-y and obj-bin-y.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile     | 31 ++++++++++++++++---------------
 xen/arch/x86/efi/Makefile |  5 +++--
 2 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index b388861679..7d89467dc9 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -113,28 +113,35 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 		{ echo "No Multiboot2 header found" >&2; false; }
 	mv $(TMP) $(TARGET)
 
+# Check if the compiler supports the MS ABI.
+export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
+# Check if the linker supports PE.
+XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
+EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
 
 ifeq ($(CONFIG_LTO),y)
 # Gather all LTO objects together
 prelink_lto.o: $(ALL_OBJS)
 	$(LD_LTO) -r -o $@ $^
 
-prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/compat.o
-	$(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi_lto.o: $(ALL_OBJS)
+	$(LD_LTO) -r -o $@ $^
 
 # Link it with all the binary objects
-prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o
+prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o efi/boot.init.o
+prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 else
-prelink.o: $(ALL_OBJS)
+prelink.o: $(ALL_OBJS) $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi.o: $(ALL_OBJS)
+	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
@@ -171,12 +178,6 @@ EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
 EFI_LDFLAGS += --major-os-version=2 --minor-os-version=0
 EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0
 
-# Check if the compiler supports the MS ABI.
-export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
-# Check if the linker supports PE.
-XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
-CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
-
 $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
 $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
 
@@ -223,8 +224,8 @@ $(TARGET).efi: FORCE
 	echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) disabled'
 endif
 
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: ;
+efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
+efi/buildid.o efi/relocs-dummy.o: ;
 
 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h
 	$(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $<
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 3e4c395b75..4b2b010a80 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -14,6 +14,7 @@ $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
 $(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
-obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o
-extra-$(XEN_BUILD_EFI) += buildid.o
+obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ))
+obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ))
+extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o
 nocov-$(XEN_BUILD_EFI) += stub.o
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:55:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:55:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAbI5-0002cy-1G; Tue, 25 Aug 2020 15:55:17 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAbI4-0002ct-9w
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:16 +0000
X-Inumbo-ID: fce1f75c-b542-40e0-9462-636723365f70
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id fce1f75c-b542-40e0-9462-636723365f70;
 Tue, 25 Aug 2020 15:55:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=G27GowifTBrbCKKCrejqSbrpHJq1QKIeqW7uVtHrYuk=; b=yuKhD3eV1sTNXG9GQMke+8qJSr
 u7V8t0I6hqCkwNbdJJ/W9ynRWfrU9GiTssi3OZ1zbcouMAz2iHtDKwofi/buadtf3Jciq1ta7dz7Z
 flK59e3mArIXDEo5/Dh6RujaAIsAK+xOli80LQGrv1r+umRN+9d+nPHd+1wAarzA2lD8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAbI2-0001mf-V4
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAbI2-0005H3-UJ
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: don't maintain compat M2P when !PV32
Message-Id: <E1kAbI2-0005H3-UJ@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:55:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 13795767298d5fffcb636069877785c8e344ac07
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Aug 25 17:46:27 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Aug 25 17:46:27 2020 +0200

    x86: don't maintain compat M2P when !PV32
    
    It's effectively unused in this case (as well as when "pv=no-32").
    
    While touching their definitions anyway, also adjust section placement
    of m2p_compat_vstart and compat_idle_pg_table_l2. Similarly, while
    putting init_xen_pae_l2_slots() inside #ifdef, also move it to a PV-only
    source file.
    
    Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/domain.c           |  2 +
 xen/arch/x86/mm.c               |  7 ----
 xen/arch/x86/pv/mm.c            |  9 ++++
 xen/arch/x86/x86_64/compat/mm.c |  6 +++
 xen/arch/x86/x86_64/mm.c        | 91 ++++++++++++++++++++++++++---------------
 xen/include/asm-x86/config.h    | 11 ++++-
 xen/include/asm-x86/domain.h    |  2 +
 xen/include/asm-x86/mm.h        |  4 ++
 8 files changed, 92 insertions(+), 40 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 00ef05b4af..66975d5f2c 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -764,8 +764,10 @@ int arch_domain_create(struct domain *d,
     }
     d->arch.emulation_flags = emflags;
 
+#ifdef CONFIG_PV32
     HYPERVISOR_COMPAT_VIRT_START(d) =
         is_pv_domain(d) ? __HYPERVISOR_COMPAT_VIRT_START : ~0u;
+#endif
 
     if ( (rc = paging_domain_init(d)) != 0 )
         goto fail;
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 638f6bf580..35ec0e11f6 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1427,13 +1427,6 @@ static bool pae_xen_mappings_check(const struct domain *d,
     return true;
 }
 
-void init_xen_pae_l2_slots(l2_pgentry_t *l2t, const struct domain *d)
-{
-    memcpy(&l2t[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
-           compat_idle_pg_table_l2,
-           COMPAT_L2_PAGETABLE_XEN_SLOTS(d) * sizeof(*l2t));
-}
-
 static int promote_l2_table(struct page_info *page, unsigned long type)
 {
     struct domain *d = page_get_owner(page);
diff --git a/xen/arch/x86/pv/mm.c b/xen/arch/x86/pv/mm.c
index 5d4cd00941..14cb0f2d4e 100644
--- a/xen/arch/x86/pv/mm.c
+++ b/xen/arch/x86/pv/mm.c
@@ -128,6 +128,15 @@ bool pv_map_ldt_shadow_page(unsigned int offset)
     return true;
 }
 
+#ifdef CONFIG_PV32
+void init_xen_pae_l2_slots(l2_pgentry_t *l2t, const struct domain *d)
+{
+    memcpy(&l2t[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
+           compat_idle_pg_table_l2,
+           COMPAT_L2_PAGETABLE_XEN_SLOTS(d) * sizeof(*l2t));
+}
+#endif
+
 /*
  * Local variables:
  * mode: C
diff --git a/xen/arch/x86/x86_64/compat/mm.c b/xen/arch/x86/x86_64/compat/mm.c
index d4c6be3032..febdaa1977 100644
--- a/xen/arch/x86/x86_64/compat/mm.c
+++ b/xen/arch/x86/x86_64/compat/mm.c
@@ -103,6 +103,9 @@ int compat_arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             .max_mfn = MACH2PHYS_COMPAT_NR_ENTRIES(d) - 1
         };
 
+        if ( !opt_pv32 )
+            return -EOPNOTSUPP;
+
         if ( copy_to_guest(arg, &mapping, 1) )
             rc = -EFAULT;
 
@@ -115,6 +118,9 @@ int compat_arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         unsigned long limit;
         compat_pfn_t last_mfn;
 
+        if ( !opt_pv32 )
+            return -EOPNOTSUPP;
+
         if ( copy_from_guest(&xmml, arg, 1) )
             return -EFAULT;
 
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 227eba911e..29048d34dc 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -34,17 +34,30 @@ EMIT_FILE;
 #include <asm/fixmap.h>
 #include <asm/hypercall.h>
 #include <asm/msr.h>
+#include <asm/pv/domain.h>
 #include <asm/setup.h>
 #include <asm/numa.h>
 #include <asm/mem_paging.h>
 #include <asm/mem_sharing.h>
 #include <public/memory.h>
 
+#ifdef CONFIG_PV32
+
 #define compat_machine_to_phys_mapping ((unsigned int *)RDWR_COMPAT_MPT_VIRT_START)
 
-unsigned int __read_mostly m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
+unsigned int __initdata m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
+
+l2_pgentry_t *__read_mostly compat_idle_pg_table_l2;
+
+#else /* !CONFIG_PV32 */
+
+/*
+ * Declare the symbol such that (dead) code referencing it can be built
+ * without a lot of #ifdef-ary (relying on DCE by the compiler).
+ */
+extern unsigned int compat_machine_to_phys_mapping[];
 
-l2_pgentry_t *compat_idle_pg_table_l2;
+#endif /* CONFIG_PV32 */
 
 void *do_page_walk(struct vcpu *v, unsigned long addr)
 {
@@ -220,7 +233,8 @@ static void destroy_compat_m2p_mapping(struct mem_hotadd_info *info)
 {
     unsigned long i, smap = info->spfn, emap = info->spfn;
 
-    if ( smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
+    if ( !opt_pv32 ||
+         smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
         return;
 
     if ( emap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
@@ -328,7 +342,8 @@ static int setup_compat_m2p_table(struct mem_hotadd_info *info)
      * Notice: For hot-added memory, only range below m2p_compat_vstart
      * will be filled up (assuming memory is discontinous when booting).
      */
-    if   ((smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2)) )
+    if ( !opt_pv32 ||
+         (smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2)) )
         return 0;
 
     if ( epfn > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
@@ -611,17 +626,24 @@ void __init paging_init(void)
 #undef MFN
 
     /* Create user-accessible L2 directory to map the MPT for compat guests. */
-    if ( (l2_ro_mpt = alloc_xen_pagetable()) == NULL )
-        goto nomem;
-    compat_idle_pg_table_l2 = l2_ro_mpt;
-    clear_page(l2_ro_mpt);
-    /* Allocate and map the compatibility mode machine-to-phys table. */
-    mpt_size = (mpt_size >> 1) + (1UL << (L2_PAGETABLE_SHIFT - 1));
-    if ( mpt_size > RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START )
-        mpt_size = RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START;
-    mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL);
-    if ( (m2p_compat_vstart + mpt_size) < MACH2PHYS_COMPAT_VIRT_END )
-        m2p_compat_vstart = MACH2PHYS_COMPAT_VIRT_END - mpt_size;
+    if ( opt_pv32 )
+    {
+        if ( (l2_ro_mpt = alloc_xen_pagetable()) == NULL )
+            goto nomem;
+        compat_idle_pg_table_l2 = l2_ro_mpt;
+        clear_page(l2_ro_mpt);
+
+        /* Allocate and map the compatibility mode machine-to-phys table. */
+        mpt_size = (mpt_size >> 1) + (1UL << (L2_PAGETABLE_SHIFT - 1));
+        if ( mpt_size > RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START )
+            mpt_size = RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START;
+        mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL);
+        if ( (m2p_compat_vstart + mpt_size) < MACH2PHYS_COMPAT_VIRT_END )
+            m2p_compat_vstart = MACH2PHYS_COMPAT_VIRT_END - mpt_size;
+    }
+    else
+        mpt_size = 0;
+
 #define MFN(x) (((x) << L2_PAGETABLE_SHIFT) / sizeof(unsigned int))
 #define CNT ((sizeof(*frame_table) & -sizeof(*frame_table)) / \
              sizeof(*compat_machine_to_phys_mapping))
@@ -847,23 +869,24 @@ void __init subarch_init_memory(void)
                 mfn_to_page(_mfn(m2p_start_mfn + i)), SHARE_ro);
     }
 
-    for ( v  = RDWR_COMPAT_MPT_VIRT_START;
-          v != RDWR_COMPAT_MPT_VIRT_END;
-          v += 1 << L2_PAGETABLE_SHIFT )
-    {
-        l3e = l3e_from_l4e(idle_pg_table[l4_table_offset(v)],
-                           l3_table_offset(v));
-        if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) )
-            continue;
-        l2e = l2e_from_l3e(l3e, l2_table_offset(v));
-        if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) )
-            continue;
-        m2p_start_mfn = l2e_get_pfn(l2e);
+    if ( opt_pv32 )
+        for ( v  = RDWR_COMPAT_MPT_VIRT_START;
+              v != RDWR_COMPAT_MPT_VIRT_END;
+              v += 1 << L2_PAGETABLE_SHIFT )
+        {
+            l3e = l3e_from_l4e(idle_pg_table[l4_table_offset(v)],
+                               l3_table_offset(v));
+            if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) )
+                continue;
+            l2e = l2e_from_l3e(l3e, l2_table_offset(v));
+            if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) )
+                continue;
+            m2p_start_mfn = l2e_get_pfn(l2e);
 
-        for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
-            share_xen_page_with_privileged_guests(
-                mfn_to_page(_mfn(m2p_start_mfn + i)), SHARE_ro);
-    }
+            for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
+                share_xen_page_with_privileged_guests(
+                    mfn_to_page(_mfn(m2p_start_mfn + i)), SHARE_ro);
+        }
 
     /* Mark all of direct map NX if hardware supports it. */
     if ( !cpu_has_nx )
@@ -935,6 +958,9 @@ long subarch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         break;
 
     case XENMEM_machphys_compat_mfn_list:
+        if ( !opt_pv32 )
+            return -EOPNOTSUPP;
+
         if ( copy_from_guest(&xmml, arg, 1) )
             return -EFAULT;
 
@@ -1464,7 +1490,8 @@ void set_gpfn_from_mfn(unsigned long mfn, unsigned long pfn)
     if ( unlikely(!machine_to_phys_mapping_valid) )
         return;
 
-    if ( mfn < (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 )
+    if ( opt_pv32 &&
+         mfn < (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 )
         compat_machine_to_phys_mapping[mfn] = entry;
 
     machine_to_phys_mapping[mfn] = entry;
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 665e9cc31d..eb25fc4758 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -142,7 +142,7 @@ extern unsigned char boot_edid_info[128];
  *  0xffff82c000000000 - 0xffff82cfffffffff [64GB,  2^36 bytes, PML4:261]
  *    vmap()/ioremap()/fixmap area.
  *  0xffff82d000000000 - 0xffff82d03fffffff [1GB,   2^30 bytes, PML4:261]
- *    Compatibility machine-to-phys translation table.
+ *    Compatibility machine-to-phys translation table (CONFIG_PV32).
  *  0xffff82d040000000 - 0xffff82d07fffffff [1GB,   2^30 bytes, PML4:261]
  *    Xen text, static data, bss.
 #ifndef CONFIG_BIGMEM
@@ -246,9 +246,18 @@ extern unsigned char boot_edid_info[128];
 
 #ifndef __ASSEMBLY__
 
+#ifdef CONFIG_PV32
+
 /* This is not a fixed value, just a lower limit. */
 #define __HYPERVISOR_COMPAT_VIRT_START 0xF5800000
 #define HYPERVISOR_COMPAT_VIRT_START(d) ((d)->arch.hv_compat_vstart)
+
+#else /* !CONFIG_PV32 */
+
+#define HYPERVISOR_COMPAT_VIRT_START(d) ((void)(d), 0)
+
+#endif /* CONFIG_PV32 */
+
 #define MACH2PHYS_COMPAT_VIRT_START    HYPERVISOR_COMPAT_VIRT_START
 #define MACH2PHYS_COMPAT_VIRT_END      0xFFE00000
 #define MACH2PHYS_COMPAT_NR_ENTRIES(d) \
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 635335634d..5fb347a94c 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -307,7 +307,9 @@ struct arch_domain
 {
     struct page_info *perdomain_l3_pg;
 
+#ifdef CONFIG_PV32
     unsigned int hv_compat_vstart;
+#endif
 
     /* Maximum physical-address bitwidth supported by this guest. */
     unsigned int physaddr_bitsize;
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index 89a55592c4..632ece1cee 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -42,8 +42,12 @@
 #define _PGT_validated    PG_shift(6)
 #define PGT_validated     PG_mask(1, 6)
  /* PAE only: is this an L2 page directory containing Xen-private mappings? */
+#ifdef CONFIG_PV32
 #define _PGT_pae_xen_l2   PG_shift(7)
 #define PGT_pae_xen_l2    PG_mask(1, 7)
+#else
+#define PGT_pae_xen_l2    0
+#endif
 /* Has this page been *partially* validated for use as its current type? */
 #define _PGT_partial      PG_shift(8)
 #define PGT_partial       PG_mask(1, 8)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Aug 25 15:55:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 25 Aug 2020 15:55:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kAbIF-0002eJ-4c; Tue, 25 Aug 2020 15:55:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=WUC6=CD=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kAbIE-0002e9-83
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:26 +0000
X-Inumbo-ID: 688aed18-500a-404d-9f8c-71d9ef9654e7
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 688aed18-500a-404d-9f8c-71d9ef9654e7;
 Tue, 25 Aug 2020 15:55:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=ICgKAWQtM4umz6gGZGvkv23dQVUodx+UK1VUOfKQ0BE=; b=SNfDnghVuhcuMcuGRtwFqmwsd3
 m7nno54IScLRqgBNMidEmB0x/PDytSM8CW4UQ4P8Shja/PjRQ22QntNEGjBLGMb/7PoyH26dhVndZ
 uJCBMbuZosliKGlZyHBeh0U7ZdwCf9dYx3euwKB5Pl5NIZJQGJ43jNYJnidztT9eSkd4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAbID-0001mp-2c
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kAbID-0005HT-10
 for xen-changelog@lists.xenproject.org; Tue, 25 Aug 2020 15:55:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] make better use of mfn local variable in
 free_heap_pages()
Message-Id: <E1kAbID-0005HT-10@xenbits.xenproject.org>
Date: Tue, 25 Aug 2020 15:55:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7a8d8bde9820387c3e168182b99fd9761c223fff
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Aug 25 17:47:27 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Aug 25 17:47:27 2020 +0200

    make better use of mfn local variable in free_heap_pages()
    
    Besides the one use that there is in the function (of the value
    calculated at function entry), there are two more places where the
    redundant page-to-address conversion can be avoided.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
    Reviewed-by: Wei Liu <wl@xen.org>
---
 xen/common/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 10b7aeca48..4e86d79935 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1380,7 +1380,7 @@ static void free_heap_pages(
 {
     unsigned long mask;
     mfn_t mfn = page_to_mfn(pg);
-    unsigned int i, node = phys_to_nid(page_to_maddr(pg)), tainted = 0;
+    unsigned int i, node = phys_to_nid(mfn_to_maddr(mfn)), tainted = 0;
     unsigned int zone = page_to_zone(pg);
 
     ASSERT(order <= MAX_ORDER);
@@ -1417,7 +1417,7 @@ static void free_heap_pages(
         default:
             printk(XENLOG_ERR
                    "pg[%u] MFN %"PRI_mfn" c=%#lx o=%u v=%#lx t=%#x\n",
-                   i, mfn_x(page_to_mfn(pg + i)),
+                   i, mfn_x(mfn) + i,
                    pg[i].count_info, pg[i].v.free.order,
                    pg[i].u.free.val, pg[i].tlbflush_timestamp);
             BUG();
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Aug 26 20:33:10 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 26 Aug 2020 20:33:10 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kB26T-0007KY-I2; Wed, 26 Aug 2020 20:33:05 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=3NZJ=CE=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kB26S-0007KT-HA
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:04 +0000
X-Inumbo-ID: fd6aea7c-883a-410e-b35f-e1d415f16739
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id fd6aea7c-883a-410e-b35f-e1d415f16739;
 Wed, 26 Aug 2020 20:33:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=LUViSpN+szVntNuYZAarSo/IU9yttv1O9pWxr0T9IIo=; b=vZ+yu46MutlBp8xZjhHuyHBMEF
 5dkR+JRbQy/v8BwH/VXRDoKJoBXnkd/qCjCCs/i2U7xjzONY4YYAOQtDib2Sa9Q5zge2czHMsjP6l
 R8KvTw4LZOsxoDT9LiopjAHkJb1wdxc78N4I1fia+AfeIlJObYPh83ENO2K51yqYHQZQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kB26Q-0004NT-J9
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kB26Q-0008Ai-I8
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86/EFI: sanitize build logic
Message-Id: <E1kB26Q-0008Ai-I8@xenbits.xenproject.org>
Date: Wed, 26 Aug 2020 20:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit de94e8b4f996517182f627300a0f8a709472c635
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Aug 25 17:43:52 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Aug 25 17:43:52 2020 +0200

    x86/EFI: sanitize build logic
    
    With changes done over time and as far as linking goes, the only special
    things about building with EFI support enabled are
    - the need for the dummy relocations object (for xen.gz uniformly in all
      build stages, for xen.efi in stage 1),
    - the special efi/buildid.o file, which can't be made part of
      efi/built_in.o, due to the extra linker options required for it.
    All other efi/*.o can be consumed from the built_in*.o files.
    
    In efi/Makefile, besides moving relocs-dummy.o to "extra", also properly
    split between obj-y and obj-bin-y.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile     | 31 ++++++++++++++++---------------
 xen/arch/x86/efi/Makefile |  5 +++--
 2 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index b388861679..7d89467dc9 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -113,28 +113,35 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 		{ echo "No Multiboot2 header found" >&2; false; }
 	mv $(TMP) $(TARGET)
 
+# Check if the compiler supports the MS ABI.
+export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
+# Check if the linker supports PE.
+XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
+EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
 
 ifeq ($(CONFIG_LTO),y)
 # Gather all LTO objects together
 prelink_lto.o: $(ALL_OBJS)
 	$(LD_LTO) -r -o $@ $^
 
-prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/compat.o
-	$(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi_lto.o: $(ALL_OBJS)
+	$(LD_LTO) -r -o $@ $^
 
 # Link it with all the binary objects
-prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o
+prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o efi/boot.init.o
+prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 else
-prelink.o: $(ALL_OBJS)
+prelink.o: $(ALL_OBJS) $(EFI_OBJS-y)
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 
-prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi.o: $(ALL_OBJS)
+	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 endif
 
 $(TARGET)-syms: prelink.o xen.lds
@@ -171,12 +178,6 @@ EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION)
 EFI_LDFLAGS += --major-os-version=2 --minor-os-version=0
 EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0
 
-# Check if the compiler supports the MS ABI.
-export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
-# Check if the linker supports PE.
-XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
-CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
-
 $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
 $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
 
@@ -223,8 +224,8 @@ $(TARGET).efi: FORCE
 	echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) disabled'
 endif
 
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
-efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.o: ;
+efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
+efi/buildid.o efi/relocs-dummy.o: ;
 
 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h
 	$(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $<
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 3e4c395b75..4b2b010a80 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -14,6 +14,7 @@ $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
 $(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
-obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o
-extra-$(XEN_BUILD_EFI) += buildid.o
+obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ))
+obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ))
+extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o
 nocov-$(XEN_BUILD_EFI) += stub.o
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Aug 26 20:33:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 26 Aug 2020 20:33:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kB26e-0007LD-Jj; Wed, 26 Aug 2020 20:33:16 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=3NZJ=CE=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kB26d-0007L5-RX
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:15 +0000
X-Inumbo-ID: 6d6d818a-c934-4fdd-9e2c-3b27d048a100
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 6d6d818a-c934-4fdd-9e2c-3b27d048a100;
 Wed, 26 Aug 2020 20:33:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=ypqiIAyGfyNQeTagZpfoJkemLgW43pxvjm5huNE/sJg=; b=gitxnlUR3G/2/g1qDRkY18U0eK
 pbzkcc8yN4dkKIagG+9GUjyhvyAaa+6eczQ9LmUZiJNEVzGfINpmsNgW6vTy9S2u1v1yzIDU2DGXd
 qsplLwr/V0o5KoXQCXIrK8fDNI6lzwkfJyOXB2//SNxYucjew8l9sPJcRAWmJZOUZRrk=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kB26a-0004Ng-Na
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kB26a-0008BV-Lt
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] x86: don't maintain compat M2P when !PV32
Message-Id: <E1kB26a-0008BV-Lt@xenbits.xenproject.org>
Date: Wed, 26 Aug 2020 20:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 13795767298d5fffcb636069877785c8e344ac07
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Aug 25 17:46:27 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Aug 25 17:46:27 2020 +0200

    x86: don't maintain compat M2P when !PV32
    
    It's effectively unused in this case (as well as when "pv=no-32").
    
    While touching their definitions anyway, also adjust section placement
    of m2p_compat_vstart and compat_idle_pg_table_l2. Similarly, while
    putting init_xen_pae_l2_slots() inside #ifdef, also move it to a PV-only
    source file.
    
    Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/domain.c           |  2 +
 xen/arch/x86/mm.c               |  7 ----
 xen/arch/x86/pv/mm.c            |  9 ++++
 xen/arch/x86/x86_64/compat/mm.c |  6 +++
 xen/arch/x86/x86_64/mm.c        | 91 ++++++++++++++++++++++++++---------------
 xen/include/asm-x86/config.h    | 11 ++++-
 xen/include/asm-x86/domain.h    |  2 +
 xen/include/asm-x86/mm.h        |  4 ++
 8 files changed, 92 insertions(+), 40 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 00ef05b4af..66975d5f2c 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -764,8 +764,10 @@ int arch_domain_create(struct domain *d,
     }
     d->arch.emulation_flags = emflags;
 
+#ifdef CONFIG_PV32
     HYPERVISOR_COMPAT_VIRT_START(d) =
         is_pv_domain(d) ? __HYPERVISOR_COMPAT_VIRT_START : ~0u;
+#endif
 
     if ( (rc = paging_domain_init(d)) != 0 )
         goto fail;
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 638f6bf580..35ec0e11f6 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1427,13 +1427,6 @@ static bool pae_xen_mappings_check(const struct domain *d,
     return true;
 }
 
-void init_xen_pae_l2_slots(l2_pgentry_t *l2t, const struct domain *d)
-{
-    memcpy(&l2t[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
-           compat_idle_pg_table_l2,
-           COMPAT_L2_PAGETABLE_XEN_SLOTS(d) * sizeof(*l2t));
-}
-
 static int promote_l2_table(struct page_info *page, unsigned long type)
 {
     struct domain *d = page_get_owner(page);
diff --git a/xen/arch/x86/pv/mm.c b/xen/arch/x86/pv/mm.c
index 5d4cd00941..14cb0f2d4e 100644
--- a/xen/arch/x86/pv/mm.c
+++ b/xen/arch/x86/pv/mm.c
@@ -128,6 +128,15 @@ bool pv_map_ldt_shadow_page(unsigned int offset)
     return true;
 }
 
+#ifdef CONFIG_PV32
+void init_xen_pae_l2_slots(l2_pgentry_t *l2t, const struct domain *d)
+{
+    memcpy(&l2t[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
+           compat_idle_pg_table_l2,
+           COMPAT_L2_PAGETABLE_XEN_SLOTS(d) * sizeof(*l2t));
+}
+#endif
+
 /*
  * Local variables:
  * mode: C
diff --git a/xen/arch/x86/x86_64/compat/mm.c b/xen/arch/x86/x86_64/compat/mm.c
index d4c6be3032..febdaa1977 100644
--- a/xen/arch/x86/x86_64/compat/mm.c
+++ b/xen/arch/x86/x86_64/compat/mm.c
@@ -103,6 +103,9 @@ int compat_arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             .max_mfn = MACH2PHYS_COMPAT_NR_ENTRIES(d) - 1
         };
 
+        if ( !opt_pv32 )
+            return -EOPNOTSUPP;
+
         if ( copy_to_guest(arg, &mapping, 1) )
             rc = -EFAULT;
 
@@ -115,6 +118,9 @@ int compat_arch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         unsigned long limit;
         compat_pfn_t last_mfn;
 
+        if ( !opt_pv32 )
+            return -EOPNOTSUPP;
+
         if ( copy_from_guest(&xmml, arg, 1) )
             return -EFAULT;
 
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 227eba911e..29048d34dc 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -34,17 +34,30 @@ EMIT_FILE;
 #include <asm/fixmap.h>
 #include <asm/hypercall.h>
 #include <asm/msr.h>
+#include <asm/pv/domain.h>
 #include <asm/setup.h>
 #include <asm/numa.h>
 #include <asm/mem_paging.h>
 #include <asm/mem_sharing.h>
 #include <public/memory.h>
 
+#ifdef CONFIG_PV32
+
 #define compat_machine_to_phys_mapping ((unsigned int *)RDWR_COMPAT_MPT_VIRT_START)
 
-unsigned int __read_mostly m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
+unsigned int __initdata m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
+
+l2_pgentry_t *__read_mostly compat_idle_pg_table_l2;
+
+#else /* !CONFIG_PV32 */
+
+/*
+ * Declare the symbol such that (dead) code referencing it can be built
+ * without a lot of #ifdef-ary (relying on DCE by the compiler).
+ */
+extern unsigned int compat_machine_to_phys_mapping[];
 
-l2_pgentry_t *compat_idle_pg_table_l2;
+#endif /* CONFIG_PV32 */
 
 void *do_page_walk(struct vcpu *v, unsigned long addr)
 {
@@ -220,7 +233,8 @@ static void destroy_compat_m2p_mapping(struct mem_hotadd_info *info)
 {
     unsigned long i, smap = info->spfn, emap = info->spfn;
 
-    if ( smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
+    if ( !opt_pv32 ||
+         smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
         return;
 
     if ( emap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
@@ -328,7 +342,8 @@ static int setup_compat_m2p_table(struct mem_hotadd_info *info)
      * Notice: For hot-added memory, only range below m2p_compat_vstart
      * will be filled up (assuming memory is discontinous when booting).
      */
-    if   ((smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2)) )
+    if ( !opt_pv32 ||
+         (smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2)) )
         return 0;
 
     if ( epfn > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) )
@@ -611,17 +626,24 @@ void __init paging_init(void)
 #undef MFN
 
     /* Create user-accessible L2 directory to map the MPT for compat guests. */
-    if ( (l2_ro_mpt = alloc_xen_pagetable()) == NULL )
-        goto nomem;
-    compat_idle_pg_table_l2 = l2_ro_mpt;
-    clear_page(l2_ro_mpt);
-    /* Allocate and map the compatibility mode machine-to-phys table. */
-    mpt_size = (mpt_size >> 1) + (1UL << (L2_PAGETABLE_SHIFT - 1));
-    if ( mpt_size > RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START )
-        mpt_size = RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START;
-    mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL);
-    if ( (m2p_compat_vstart + mpt_size) < MACH2PHYS_COMPAT_VIRT_END )
-        m2p_compat_vstart = MACH2PHYS_COMPAT_VIRT_END - mpt_size;
+    if ( opt_pv32 )
+    {
+        if ( (l2_ro_mpt = alloc_xen_pagetable()) == NULL )
+            goto nomem;
+        compat_idle_pg_table_l2 = l2_ro_mpt;
+        clear_page(l2_ro_mpt);
+
+        /* Allocate and map the compatibility mode machine-to-phys table. */
+        mpt_size = (mpt_size >> 1) + (1UL << (L2_PAGETABLE_SHIFT - 1));
+        if ( mpt_size > RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START )
+            mpt_size = RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START;
+        mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL);
+        if ( (m2p_compat_vstart + mpt_size) < MACH2PHYS_COMPAT_VIRT_END )
+            m2p_compat_vstart = MACH2PHYS_COMPAT_VIRT_END - mpt_size;
+    }
+    else
+        mpt_size = 0;
+
 #define MFN(x) (((x) << L2_PAGETABLE_SHIFT) / sizeof(unsigned int))
 #define CNT ((sizeof(*frame_table) & -sizeof(*frame_table)) / \
              sizeof(*compat_machine_to_phys_mapping))
@@ -847,23 +869,24 @@ void __init subarch_init_memory(void)
                 mfn_to_page(_mfn(m2p_start_mfn + i)), SHARE_ro);
     }
 
-    for ( v  = RDWR_COMPAT_MPT_VIRT_START;
-          v != RDWR_COMPAT_MPT_VIRT_END;
-          v += 1 << L2_PAGETABLE_SHIFT )
-    {
-        l3e = l3e_from_l4e(idle_pg_table[l4_table_offset(v)],
-                           l3_table_offset(v));
-        if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) )
-            continue;
-        l2e = l2e_from_l3e(l3e, l2_table_offset(v));
-        if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) )
-            continue;
-        m2p_start_mfn = l2e_get_pfn(l2e);
+    if ( opt_pv32 )
+        for ( v  = RDWR_COMPAT_MPT_VIRT_START;
+              v != RDWR_COMPAT_MPT_VIRT_END;
+              v += 1 << L2_PAGETABLE_SHIFT )
+        {
+            l3e = l3e_from_l4e(idle_pg_table[l4_table_offset(v)],
+                               l3_table_offset(v));
+            if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) )
+                continue;
+            l2e = l2e_from_l3e(l3e, l2_table_offset(v));
+            if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) )
+                continue;
+            m2p_start_mfn = l2e_get_pfn(l2e);
 
-        for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
-            share_xen_page_with_privileged_guests(
-                mfn_to_page(_mfn(m2p_start_mfn + i)), SHARE_ro);
-    }
+            for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
+                share_xen_page_with_privileged_guests(
+                    mfn_to_page(_mfn(m2p_start_mfn + i)), SHARE_ro);
+        }
 
     /* Mark all of direct map NX if hardware supports it. */
     if ( !cpu_has_nx )
@@ -935,6 +958,9 @@ long subarch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         break;
 
     case XENMEM_machphys_compat_mfn_list:
+        if ( !opt_pv32 )
+            return -EOPNOTSUPP;
+
         if ( copy_from_guest(&xmml, arg, 1) )
             return -EFAULT;
 
@@ -1464,7 +1490,8 @@ void set_gpfn_from_mfn(unsigned long mfn, unsigned long pfn)
     if ( unlikely(!machine_to_phys_mapping_valid) )
         return;
 
-    if ( mfn < (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 )
+    if ( opt_pv32 &&
+         mfn < (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) / 4 )
         compat_machine_to_phys_mapping[mfn] = entry;
 
     machine_to_phys_mapping[mfn] = entry;
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 665e9cc31d..eb25fc4758 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -142,7 +142,7 @@ extern unsigned char boot_edid_info[128];
  *  0xffff82c000000000 - 0xffff82cfffffffff [64GB,  2^36 bytes, PML4:261]
  *    vmap()/ioremap()/fixmap area.
  *  0xffff82d000000000 - 0xffff82d03fffffff [1GB,   2^30 bytes, PML4:261]
- *    Compatibility machine-to-phys translation table.
+ *    Compatibility machine-to-phys translation table (CONFIG_PV32).
  *  0xffff82d040000000 - 0xffff82d07fffffff [1GB,   2^30 bytes, PML4:261]
  *    Xen text, static data, bss.
 #ifndef CONFIG_BIGMEM
@@ -246,9 +246,18 @@ extern unsigned char boot_edid_info[128];
 
 #ifndef __ASSEMBLY__
 
+#ifdef CONFIG_PV32
+
 /* This is not a fixed value, just a lower limit. */
 #define __HYPERVISOR_COMPAT_VIRT_START 0xF5800000
 #define HYPERVISOR_COMPAT_VIRT_START(d) ((d)->arch.hv_compat_vstart)
+
+#else /* !CONFIG_PV32 */
+
+#define HYPERVISOR_COMPAT_VIRT_START(d) ((void)(d), 0)
+
+#endif /* CONFIG_PV32 */
+
 #define MACH2PHYS_COMPAT_VIRT_START    HYPERVISOR_COMPAT_VIRT_START
 #define MACH2PHYS_COMPAT_VIRT_END      0xFFE00000
 #define MACH2PHYS_COMPAT_NR_ENTRIES(d) \
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 635335634d..5fb347a94c 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -307,7 +307,9 @@ struct arch_domain
 {
     struct page_info *perdomain_l3_pg;
 
+#ifdef CONFIG_PV32
     unsigned int hv_compat_vstart;
+#endif
 
     /* Maximum physical-address bitwidth supported by this guest. */
     unsigned int physaddr_bitsize;
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index 89a55592c4..632ece1cee 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -42,8 +42,12 @@
 #define _PGT_validated    PG_shift(6)
 #define PGT_validated     PG_mask(1, 6)
  /* PAE only: is this an L2 page directory containing Xen-private mappings? */
+#ifdef CONFIG_PV32
 #define _PGT_pae_xen_l2   PG_shift(7)
 #define PGT_pae_xen_l2    PG_mask(1, 7)
+#else
+#define PGT_pae_xen_l2    0
+#endif
 /* Has this page been *partially* validated for use as its current type? */
 #define _PGT_partial      PG_shift(8)
 #define PGT_partial       PG_mask(1, 8)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Aug 26 20:33:24 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 26 Aug 2020 20:33:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kB26m-0007MT-LH; Wed, 26 Aug 2020 20:33:24 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=3NZJ=CE=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kB26m-0007MO-2y
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:24 +0000
X-Inumbo-ID: 57206ec8-2862-41c5-853a-15e0c8b281d4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 57206ec8-2862-41c5-853a-15e0c8b281d4;
 Wed, 26 Aug 2020 20:33:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=98jbk67NWo9tb4r88ghuo9bD92AsRgv4xy7g3cPhsMs=; b=y8FP0AdL61E8NW0vTSRaykWS4E
 cHjPVnRcQGmBfjRp0iiRItLW9qX+sEyCv7biu9VVVJK9ZrVe2ptIqGDOwZyaq/Kd2pE6HcuJ3CE1j
 05B5vIAvMVVN9exLhwm5m97A3i/BxH1+bH5/I5YKqoRVkg81mZLNUSRn6Dmq5JaFO+KM=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kB26k-0004OY-RV
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kB26k-0008CB-Po
 for xen-changelog@lists.xenproject.org; Wed, 26 Aug 2020 20:33:22 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen master] make better use of mfn local variable in
 free_heap_pages()
Message-Id: <E1kB26k-0008CB-Po@xenbits.xenproject.org>
Date: Wed, 26 Aug 2020 20:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 7a8d8bde9820387c3e168182b99fd9761c223fff
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Aug 25 17:47:27 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Aug 25 17:47:27 2020 +0200

    make better use of mfn local variable in free_heap_pages()
    
    Besides the one use that there is in the function (of the value
    calculated at function entry), there are two more places where the
    redundant page-to-address conversion can be avoided.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
    Reviewed-by: Wei Liu <wl@xen.org>
---
 xen/common/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 10b7aeca48..4e86d79935 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1380,7 +1380,7 @@ static void free_heap_pages(
 {
     unsigned long mask;
     mfn_t mfn = page_to_mfn(pg);
-    unsigned int i, node = phys_to_nid(page_to_maddr(pg)), tainted = 0;
+    unsigned int i, node = phys_to_nid(mfn_to_maddr(mfn)), tainted = 0;
     unsigned int zone = page_to_zone(pg);
 
     ASSERT(order <= MAX_ORDER);
@@ -1417,7 +1417,7 @@ static void free_heap_pages(
         default:
             printk(XENLOG_ERR
                    "pg[%u] MFN %"PRI_mfn" c=%#lx o=%u v=%#lx t=%#x\n",
-                   i, mfn_x(page_to_mfn(pg + i)),
+                   i, mfn_x(mfn) + i,
                    pg[i].count_info, pg[i].v.free.order,
                    pg[i].u.free.val, pg[i].tlbflush_timestamp);
             BUG();
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 07:55:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 07:55:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBCkV-00074b-Rq; Thu, 27 Aug 2020 07:55:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBCkV-00074W-Bu
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:07 +0000
X-Inumbo-ID: 47ae0043-5220-4958-af67-32cad2c512c3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 47ae0043-5220-4958-af67-32cad2c512c3;
 Thu, 27 Aug 2020 07:55:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=W8hx7XNBkA5KaQzW6GmMWQVO2lxItQ9CoS2fmNuwZHw=; b=T70M0QpsIgY5VQU3+yOxd9rgEI
 NbwhLR9KzWXTq0HUq7V0BV1Y+n1O9RYZ8Qhyj/eDJc3V6bh0Pl4QFHOoDwwwsyEXccT5FtoNkl5/D
 yQ0hO34C7o1ZUARhwXmV5EomJ4QBF2iBDQS9DtaByKerVu0FdpKqJLu5LCfgOV11WdCY=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkS-00084U-PB
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkS-0002jm-MC
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] build: also check for empty .bss.* in .o -> .init.o
 conversion
Message-Id: <E1kBCkS-0002jm-MC@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 07:55:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 8856a914bffd56c018a794c06d4abb6018aa958d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Aug 27 09:46:55 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Aug 27 09:46:55 2020 +0200

    build: also check for empty .bss.* in .o -> .init.o conversion
    
    We're gaining such sections, and like .text.* and .data.* they shouldn't
    be present in objects subject to automatic to-init conversion. Oddly
    enough for quite some time we did have an instance breaking this rule,
    which gets fixed at this occasion, by breaking out the EFI boot
    allocator functions into its own translation unit.
    
    Fixes: c5b9805bc1f7 ("efi: create new early memory allocator")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/Makefile              |  2 +-
 xen/Rules.mk              |  2 +-
 xen/arch/arm/efi/Makefile |  2 +-
 xen/arch/x86/efi/Makefile |  2 +-
 xen/common/efi/boot.c     | 53 +----------------------------------------------
 xen/common/efi/ebmalloc.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 xen/common/efi/efi.h      |  6 ++++++
 7 files changed, 63 insertions(+), 56 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index a87bb225dc..bf0c804d43 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -355,7 +355,7 @@ $(TARGET): delete-unfresh-files
 	$(MAKE) -C tools
 	$(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
 	[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
-	[ -e arch/$(TARGET_ARCH)/efi ] && for f in boot.c runtime.c compat.c efi.h;\
+	[ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch]); \
 		do test -r arch/$(TARGET_ARCH)/efi/$$f || \
 		   ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \
 		done; \
diff --git a/xen/Rules.mk b/xen/Rules.mk
index e90a03d116..891c94e6ad 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -188,7 +188,7 @@ define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
         .*.local) ;; \
-        .text|.text.*|.data|.data.*|.bss) \
+        .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
             exit $$(expr $$idx + 1);; \
diff --git a/xen/arch/arm/efi/Makefile b/xen/arch/arm/efi/Makefile
index e3ff2c3f28..662892babd 100644
--- a/xen/arch/arm/efi/Makefile
+++ b/xen/arch/arm/efi/Makefile
@@ -1,4 +1,4 @@
 CFLAGS-y += -fshort-wchar
 
-obj-y +=  boot.init.o runtime.o
+obj-y += boot.init.o ebmalloc.o runtime.o
 obj-$(CONFIG_ACPI) +=  efi-dom0.init.o
diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index 4b2b010a80..770438a029 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -8,7 +8,7 @@ cmd_objcopy_o_ihex = $(OBJCOPY) -I ihex -O binary $< $@
 
 boot.init.o: buildid.o
 
-EFIOBJ := boot.init.o compat.o runtime.o
+EFIOBJ := boot.init.o ebmalloc.o compat.o runtime.o
 
 $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
 $(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 5a520bf21d..4022a672c9 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -112,7 +112,6 @@ static CHAR16 *FormatDec(UINT64 Val, CHAR16 *Buffer);
 static CHAR16 *FormatHex(UINT64 Val, UINTN Width, CHAR16 *Buffer);
 static void  DisplayUint(UINT64 Val, INTN Width);
 static CHAR16 *wstrcpy(CHAR16 *d, const CHAR16 *s);
-static void noreturn blexit(const CHAR16 *str);
 static void PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode);
 static char *get_value(const struct file *cfg, const char *section,
                               const char *item);
@@ -155,56 +154,6 @@ static CHAR16 __initdata newline[] = L"\r\n";
 #define PrintStr(s) StdOut->OutputString(StdOut, s)
 #define PrintErr(s) StdErr->OutputString(StdErr, s)
 
-#ifdef CONFIG_ARM
-/*
- * TODO: Enable EFI boot allocator on ARM.
- * This code can be common for x86 and ARM.
- * Things TODO on ARM before enabling ebmalloc:
- *   - estimate required EBMALLOC_SIZE value,
- *   - where (in which section) ebmalloc_mem[] should live; if in
- *     .bss.page_aligned, as it is right now, then whole BSS zeroing
- *     have to be disabled in xen/arch/arm/arm64/head.S; though BSS
- *     should be initialized somehow before use of variables living there,
- *   - use ebmalloc() in ARM/common EFI boot code,
- *   - call free_ebmalloc_unused_mem() somewhere in init code.
- */
-#define EBMALLOC_SIZE	MB(0)
-#else
-#define EBMALLOC_SIZE	MB(1)
-#endif
-
-static char __section(".bss.page_aligned") __aligned(PAGE_SIZE)
-    ebmalloc_mem[EBMALLOC_SIZE];
-static unsigned long __initdata ebmalloc_allocated;
-
-/* EFI boot allocator. */
-static void __init __maybe_unused *ebmalloc(size_t size)
-{
-    void *ptr = ebmalloc_mem + ebmalloc_allocated;
-
-    ebmalloc_allocated += ROUNDUP(size, sizeof(void *));
-
-    if ( ebmalloc_allocated > sizeof(ebmalloc_mem) )
-        blexit(L"Out of static memory\r\n");
-
-    return ptr;
-}
-
-static void __init __maybe_unused free_ebmalloc_unused_mem(void)
-{
-#if 0 /* FIXME: Putting a hole in the BSS breaks the IOMMU mappings for dom0. */
-    unsigned long start, end;
-
-    start = (unsigned long)ebmalloc_mem + PAGE_ALIGN(ebmalloc_allocated);
-    end = (unsigned long)ebmalloc_mem + sizeof(ebmalloc_mem);
-
-    destroy_xen_mappings(start, end);
-    init_xenheap_pages(__pa(start), __pa(end));
-
-    printk(XENLOG_INFO "Freed %lukB unused BSS memory\n", (end - start) >> 10);
-#endif
-}
-
 /*
  * Include architecture specific implementation here, which references the
  * static globals defined above.
@@ -321,7 +270,7 @@ static bool __init match_guid(const EFI_GUID *guid1, const EFI_GUID *guid2)
            !memcmp(guid1->Data4, guid2->Data4, sizeof(guid1->Data4));
 }
 
-static void __init noreturn blexit(const CHAR16 *str)
+void __init noreturn blexit(const CHAR16 *str)
 {
     if ( str )
         PrintStr((CHAR16 *)str);
diff --git a/xen/common/efi/ebmalloc.c b/xen/common/efi/ebmalloc.c
new file mode 100644
index 0000000000..c65dbd946f
--- /dev/null
+++ b/xen/common/efi/ebmalloc.c
@@ -0,0 +1,52 @@
+#include "efi.h"
+#include <xen/init.h>
+
+#ifdef CONFIG_ARM
+/*
+ * TODO: Enable EFI boot allocator on ARM.
+ * This code can be common for x86 and ARM.
+ * Things TODO on ARM before enabling ebmalloc:
+ *   - estimate required EBMALLOC_SIZE value,
+ *   - where (in which section) ebmalloc_mem[] should live; if in
+ *     .bss.page_aligned, as it is right now, then whole BSS zeroing
+ *     have to be disabled in xen/arch/arm/arm64/head.S; though BSS
+ *     should be initialized somehow before use of variables living there,
+ *   - use ebmalloc() in ARM/common EFI boot code,
+ *   - call free_ebmalloc_unused_mem() somewhere in init code.
+ */
+#define EBMALLOC_SIZE	MB(0)
+#else
+#define EBMALLOC_SIZE	MB(1)
+#endif
+
+static char __section(".bss.page_aligned") __aligned(PAGE_SIZE)
+    ebmalloc_mem[EBMALLOC_SIZE];
+static unsigned long __initdata ebmalloc_allocated;
+
+/* EFI boot allocator. */
+void __init *ebmalloc(size_t size)
+{
+    void *ptr = ebmalloc_mem + ebmalloc_allocated;
+
+    ebmalloc_allocated += ROUNDUP(size, sizeof(void *));
+
+    if ( ebmalloc_allocated > sizeof(ebmalloc_mem) )
+        blexit(L"Out of static memory\r\n");
+
+    return ptr;
+}
+
+void __init free_ebmalloc_unused_mem(void)
+{
+#if 0 /* FIXME: Putting a hole in the BSS breaks the IOMMU mappings for dom0. */
+    unsigned long start, end;
+
+    start = (unsigned long)ebmalloc_mem + PAGE_ALIGN(ebmalloc_allocated);
+    end = (unsigned long)ebmalloc_mem + sizeof(ebmalloc_mem);
+
+    destroy_xen_mappings(start, end);
+    init_xenheap_pages(__pa(start), __pa(end));
+
+    printk(XENLOG_INFO "Freed %lukB unused BSS memory\n", (end - start) >> 10);
+#endif
+}
diff --git a/xen/common/efi/efi.h b/xen/common/efi/efi.h
index 2e38d05f3d..4845d84913 100644
--- a/xen/common/efi/efi.h
+++ b/xen/common/efi/efi.h
@@ -40,4 +40,10 @@ extern UINT64 efi_boot_max_var_store_size, efi_boot_remain_var_store_size,
 extern UINT64 efi_apple_properties_addr;
 extern UINTN efi_apple_properties_len;
 
+void noreturn blexit(const CHAR16 *str);
+
 const CHAR16 *wmemchr(const CHAR16 *s, CHAR16 c, UINTN n);
+
+/* EFI boot allocator. */
+void *ebmalloc(size_t size);
+void free_ebmalloc_unused_mem(void);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 07:55:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 07:55:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBCke-00075J-V1; Thu, 27 Aug 2020 07:55:16 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBCkd-00075C-Nt
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:15 +0000
X-Inumbo-ID: 51cb7fdb-eda1-4ca6-ba48-357f3ccf9fcd
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 51cb7fdb-eda1-4ca6-ba48-357f3ccf9fcd;
 Thu, 27 Aug 2020 07:55:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=vA5yYuhN/H5FBEYSMaul0BURJIx6id6+CN5yTX1dkag=; b=UuBV9OO57W5LCTsqaRJbclfu53
 bdRRwtzVnr5N19C6GKXrGMmvB0vWGS8w0L1Lq09M558FfvpC2vm6F1K4Jwl3L9EsUc8FQmg7o80nU
 deDi/PS68bloxMyNT4SP477ykdTuZA0WA9/2iPlHdtGL3/bjivmk+42TKngUKV0HPC5U=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkc-00084b-SA
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkc-0002kQ-RG
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: don't build with EFI support in shim-exclusive mode
Message-Id: <E1kBCkc-0002kQ-RG@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 07:55:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit de58ea464fb6db4b78102edc8ac4598d4eebe6c5
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Aug 27 09:51:07 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Aug 27 09:51:07 2020 +0200

    x86: don't build with EFI support in shim-exclusive mode
    
    There's no need for xen.efi at all, and there's also no need for EFI
    support in xen.gz since the shim runs in PVH mode, i.e. without any
    firmware (and hence by implication also without EFI one).
    
    The slightly odd looking use of $(space) is to ensure the new ifneq()
    evaluates consistently between "build" and "install" invocations of
    make.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 7d89467dc9..93e6dcdc70 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -80,7 +80,9 @@ x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h
 
 efi-y := $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \
                       -O $(BASEDIR)/include/xen/compile.h ]; then \
-                         echo '$(TARGET).efi'; fi)
+                         echo '$(TARGET).efi'; fi) \
+         $(space)
+efi-$(CONFIG_PV_SHIM_EXCLUSIVE) :=
 
 ifneq ($(build_id_linker),)
 notes_phdrs = --notes
@@ -113,11 +115,13 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 		{ echo "No Multiboot2 header found" >&2; false; }
 	mv $(TMP) $(TARGET)
 
+ifneq ($(efi-y),)
 # Check if the compiler supports the MS ABI.
 export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
 # Check if the linker supports PE.
 XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
 CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+endif
 
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
 EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 07:55:28 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 07:55:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBCkq-00076b-0g; Thu, 27 Aug 2020 07:55:28 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBCko-00076P-UA
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:26 +0000
X-Inumbo-ID: 61cd0c16-e119-4de4-9f3d-989343bc8843
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 61cd0c16-e119-4de4-9f3d-989343bc8843;
 Thu, 27 Aug 2020 07:55:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=5Z0FA+n1fAKNUddWhbLZ+kQAHdArUUsdV3h5UTUtaFk=; b=uPa3qH6cMCbz7BMyAOWbxyRYfW
 jDmnFABy1rFAJK4UBwCw2avuX7NdxC4+VbxdJgu83q+tWA2/tkbMH7nDNHEA+PvMKXH4NxHut7Y9/
 yCQrkKg4/bv1iOobg/Tpobf7hNWSbRLzAdJo1Zqm21rYKrNPEEiKUr3eednRHEC6H2a8=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkm-00084l-Vw
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkm-0002ko-UG
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:24 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] bitmap: move to/from xenctl_bitmap conversion helpers
Message-Id: <E1kBCkm-0002ko-UG@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 07:55:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a1568878df7d914853ba8c712aaa2315cd33ed3c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Aug 27 09:52:01 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Aug 27 09:52:01 2020 +0200

    bitmap: move to/from xenctl_bitmap conversion helpers
    
    A subsequent change will exclude domctl.c from getting built for a
    particular configuration, yet the two functions get used from elsewhere.
    
    While moving the code
    - drop unmotivated uses of min_t(),
    - fix style violations in the moved code,
    - xfree() as early as possible.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/common/bitmap.c      | 87 ++++++++++++++++++++++++++++++++++++++++++++++++
 xen/common/domctl.c      | 85 ----------------------------------------------
 xen/include/xen/bitmap.h |  7 ++++
 xen/include/xen/domain.h |  3 --
 4 files changed, 94 insertions(+), 88 deletions(-)

diff --git a/xen/common/bitmap.c b/xen/common/bitmap.c
index 88768bf8bc..b7aa2db7c7 100644
--- a/xen/common/bitmap.c
+++ b/xen/common/bitmap.c
@@ -9,6 +9,8 @@
 #include <xen/errno.h>
 #include <xen/bitmap.h>
 #include <xen/bitops.h>
+#include <xen/cpumask.h>
+#include <xen/guest_access.h>
 #include <asm/byteorder.h>
 
 /*
@@ -384,3 +386,88 @@ void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits)
 }
 
 #endif
+
+int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
+                            const unsigned long *bitmap, unsigned int nbits)
+{
+    unsigned int guest_bytes, copy_bytes, i;
+    uint8_t zero = 0;
+    int err = 0;
+    uint8_t *bytemap = xmalloc_array(uint8_t, (nbits + 7) / 8);
+
+    if ( !bytemap )
+        return -ENOMEM;
+
+    guest_bytes = (xenctl_bitmap->nr_bits + 7) / 8;
+    copy_bytes  = min(guest_bytes, (nbits + 7) / 8);
+
+    bitmap_long_to_byte(bytemap, bitmap, nbits);
+
+    if ( copy_bytes &&
+         copy_to_guest(xenctl_bitmap->bitmap, bytemap, copy_bytes) )
+        err = -EFAULT;
+
+    xfree(bytemap);
+
+    for ( i = copy_bytes; !err && i < guest_bytes; i++ )
+        if ( copy_to_guest_offset(xenctl_bitmap->bitmap, i, &zero, 1) )
+            err = -EFAULT;
+
+    return err;
+}
+
+int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
+                            const struct xenctl_bitmap *xenctl_bitmap,
+                            unsigned int nbits)
+{
+    unsigned int guest_bytes, copy_bytes;
+    int err = 0;
+    uint8_t *bytemap = xzalloc_array(uint8_t, (nbits + 7) / 8);
+
+    if ( !bytemap )
+        return -ENOMEM;
+
+    guest_bytes = (xenctl_bitmap->nr_bits + 7) / 8;
+    copy_bytes  = min(guest_bytes, (nbits + 7) / 8);
+
+    if ( copy_bytes )
+    {
+        if ( copy_from_guest(bytemap, xenctl_bitmap->bitmap, copy_bytes) )
+            err = -EFAULT;
+        if ( (xenctl_bitmap->nr_bits & 7) && (guest_bytes == copy_bytes) )
+            bytemap[guest_bytes - 1] &= ~(0xff << (xenctl_bitmap->nr_bits & 7));
+    }
+
+    if ( !err )
+        bitmap_byte_to_long(bitmap, bytemap, nbits);
+
+    xfree(bytemap);
+
+    return err;
+}
+
+int cpumask_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_cpumap,
+                             const cpumask_t *cpumask)
+{
+    return bitmap_to_xenctl_bitmap(xenctl_cpumap, cpumask_bits(cpumask),
+                                   nr_cpu_ids);
+}
+
+int xenctl_bitmap_to_cpumask(cpumask_var_t *cpumask,
+                             const struct xenctl_bitmap *xenctl_cpumap)
+{
+    int err = 0;
+
+    if ( alloc_cpumask_var(cpumask) )
+    {
+        err = xenctl_bitmap_to_bitmap(cpumask_bits(*cpumask), xenctl_cpumap,
+                                      nr_cpu_ids);
+        /* In case of error, cleanup is up to us, as the caller won't care! */
+        if ( err )
+            free_cpumask_var(*cpumask);
+    }
+    else
+        err = -ENOMEM;
+
+    return err;
+}
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 20ef8399bd..5ac6e9c5ca 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -34,91 +34,6 @@
 
 static DEFINE_SPINLOCK(domctl_lock);
 
-static int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
-                                   const unsigned long *bitmap,
-                                   unsigned int nbits)
-{
-    unsigned int guest_bytes, copy_bytes, i;
-    uint8_t zero = 0;
-    int err = 0;
-    uint8_t *bytemap = xmalloc_array(uint8_t, (nbits + 7) / 8);
-
-    if ( !bytemap )
-        return -ENOMEM;
-
-    guest_bytes = (xenctl_bitmap->nr_bits + 7) / 8;
-    copy_bytes  = min_t(unsigned int, guest_bytes, (nbits + 7) / 8);
-
-    bitmap_long_to_byte(bytemap, bitmap, nbits);
-
-    if ( copy_bytes != 0 )
-        if ( copy_to_guest(xenctl_bitmap->bitmap, bytemap, copy_bytes) )
-            err = -EFAULT;
-
-    for ( i = copy_bytes; !err && i < guest_bytes; i++ )
-        if ( copy_to_guest_offset(xenctl_bitmap->bitmap, i, &zero, 1) )
-            err = -EFAULT;
-
-    xfree(bytemap);
-
-    return err;
-}
-
-int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
-                            const struct xenctl_bitmap *xenctl_bitmap,
-                            unsigned int nbits)
-{
-    unsigned int guest_bytes, copy_bytes;
-    int err = 0;
-    uint8_t *bytemap = xzalloc_array(uint8_t, (nbits + 7) / 8);
-
-    if ( !bytemap )
-        return -ENOMEM;
-
-    guest_bytes = (xenctl_bitmap->nr_bits + 7) / 8;
-    copy_bytes  = min_t(unsigned int, guest_bytes, (nbits + 7) / 8);
-
-    if ( copy_bytes != 0 )
-    {
-        if ( copy_from_guest(bytemap, xenctl_bitmap->bitmap, copy_bytes) )
-            err = -EFAULT;
-        if ( (xenctl_bitmap->nr_bits & 7) && (guest_bytes == copy_bytes) )
-            bytemap[guest_bytes-1] &= ~(0xff << (xenctl_bitmap->nr_bits & 7));
-    }
-
-    if ( !err )
-        bitmap_byte_to_long(bitmap, bytemap, nbits);
-
-    xfree(bytemap);
-
-    return err;
-}
-
-int cpumask_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_cpumap,
-                             const cpumask_t *cpumask)
-{
-    return bitmap_to_xenctl_bitmap(xenctl_cpumap, cpumask_bits(cpumask),
-                                   nr_cpu_ids);
-}
-
-int xenctl_bitmap_to_cpumask(cpumask_var_t *cpumask,
-                             const struct xenctl_bitmap *xenctl_cpumap)
-{
-    int err = 0;
-
-    if ( alloc_cpumask_var(cpumask) ) {
-        err = xenctl_bitmap_to_bitmap(cpumask_bits(*cpumask), xenctl_cpumap,
-                                      nr_cpu_ids);
-        /* In case of error, cleanup is up to us, as the caller won't care! */
-        if ( err )
-            free_cpumask_var(*cpumask);
-    }
-    else
-        err = -ENOMEM;
-
-    return err;
-}
-
 static int nodemask_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_nodemap,
                                      const nodemask_t *nodemask)
 {
diff --git a/xen/include/xen/bitmap.h b/xen/include/xen/bitmap.h
index c44e009f8c..634a259645 100644
--- a/xen/include/xen/bitmap.h
+++ b/xen/include/xen/bitmap.h
@@ -273,6 +273,13 @@ static inline void bitmap_clear(unsigned long *map, unsigned int start,
 void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, int nbits);
 void bitmap_byte_to_long(unsigned long *lp, const uint8_t *bp, int nbits);
 
+struct xenctl_bitmap;
+int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
+                            const struct xenctl_bitmap *xenctl_bitmap,
+                            unsigned int nbits);
+int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
+                            const unsigned long *bitmap, unsigned int nbits);
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __XEN_BITMAP_H */
diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h
index 7e51d361de..1cb205d977 100644
--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -27,9 +27,6 @@ struct xen_domctl_getdomaininfo;
 void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info);
 void arch_get_domain_info(const struct domain *d,
                           struct xen_domctl_getdomaininfo *info);
-int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
-                            const struct xenctl_bitmap *xenctl_bitmap,
-                            unsigned int nbits);
 
 /*
  * Arch-specifics.
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 07:55:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 07:55:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBCkz-00077Z-2O; Thu, 27 Aug 2020 07:55:37 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBCky-00077T-65
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:36 +0000
X-Inumbo-ID: 89cf98b8-3bf1-4703-b92e-89deacf053c2
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 89cf98b8-3bf1-4703-b92e-89deacf053c2;
 Thu, 27 Aug 2020 07:55:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=/A6Ex6aXUBsfaBSSnvynCQ6ay9horhOCbwV5ZPe1/qY=; b=O89bHQPpbT2t0bvBJnV+D4Lgr8
 u4EVc8EUfz8a7OjCxoNeIKIaF0scmYa0PVVlWrbBNZRqZmJVDwGgbs/oYq6ePPqma223PctYgS9gb
 GborUSK/MdxpARobQncjokHhAms0MU9iDv3iYFs0H0uBtdtRxRQjJyf2fmmBejSa3jkc=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkx-00085Z-2n
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCkx-0002lE-1v
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: don't include domctl and alike in shim-exclusive
 builds
Message-Id: <E1kBCkx-0002lE-1v@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 07:55:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 8b5b49ceb3d9aaf87776584fdf0926fa6f39eb2d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Aug 27 09:52:45 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Aug 27 09:52:45 2020 +0200

    x86: don't include domctl and alike in shim-exclusive builds
    
    There is no need for platform-wide, system-wide, or per-domain control
    in this case. Hence avoid including this dead code in the build.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/Makefile        | 10 +++++++---
 xen/arch/x86/mm/paging.c     |  9 ++++++++-
 xen/arch/x86/pv/hypercall.c  |  6 ++++++
 xen/common/Makefile          |  9 ++++++---
 xen/include/asm-x86/paging.h | 11 +++++++++++
 xen/include/xen/domain.h     |  4 ++++
 6 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 93e6dcdc70..1073e454b1 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -23,7 +23,6 @@ obj-$(CONFIG_GDBSX) += debug.o
 obj-y += delay.o
 obj-y += desc.o
 obj-bin-y += dmi_scan.init.o
-obj-y += domctl.o
 obj-y += domain.o
 obj-bin-y += dom0_build.init.o
 obj-y += domain_page.o
@@ -51,7 +50,6 @@ obj-y += numa.o
 obj-y += pci.o
 obj-y += percpu.o
 obj-y += physdev.o x86_64/physdev.o
-obj-y += platform_hypercall.o x86_64/platform_hypercall.o
 obj-y += psr.o
 obj-y += setup.o
 obj-y += shutdown.o
@@ -60,7 +58,6 @@ obj-y += smpboot.o
 obj-y += spec_ctrl.o
 obj-y += srat.o
 obj-y += string.o
-obj-y += sysctl.o
 obj-y += time.o
 obj-y += trace.o
 obj-y += traps.o
@@ -71,6 +68,13 @@ obj-$(CONFIG_TBOOT) += tboot.o
 obj-y += hpet.o
 obj-y += vm_event.o
 obj-y += xstate.o
+
+ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)
+obj-y += domctl.o
+obj-y += platform_hypercall.o x86_64/platform_hypercall.o
+obj-y += sysctl.o
+endif
+
 extra-y += asm-macros.i
 
 ifneq ($(CONFIG_HVM),y)
diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 7c265fb5f3..695372783d 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -47,6 +47,8 @@
 /* Per-CPU variable for enforcing the lock ordering */
 DEFINE_PER_CPU(int, mm_lock_level);
 
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
+
 /************************************************/
 /*              LOG DIRTY SUPPORT               */
 /************************************************/
@@ -628,6 +630,8 @@ void paging_log_dirty_init(struct domain *d, const struct log_dirty_ops *ops)
     d->arch.paging.log_dirty.ops = ops;
 }
 
+#endif /* CONFIG_PV_SHIM_EXCLUSIVE */
+
 /************************************************/
 /*           CODE FOR PAGING SUPPORT            */
 /************************************************/
@@ -667,7 +671,7 @@ void paging_vcpu_init(struct vcpu *v)
         shadow_vcpu_init(v);
 }
 
-
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
 int paging_domctl(struct domain *d, struct xen_domctl_shadow_op *sc,
                   XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl,
                   bool_t resuming)
@@ -788,6 +792,7 @@ long paging_domctl_continuation(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
 
     return ret;
 }
+#endif /* CONFIG_PV_SHIM_EXCLUSIVE */
 
 /* Call when destroying a domain */
 int paging_teardown(struct domain *d)
@@ -803,10 +808,12 @@ int paging_teardown(struct domain *d)
     if ( preempted )
         return -ERESTART;
 
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
     /* clean up log dirty resources. */
     rc = paging_free_log_dirty_bitmap(d, 0);
     if ( rc == -ERESTART )
         return rc;
+#endif
 
     /* Move populate-on-demand cache back to domain_list for destruction */
     rc = p2m_pod_empty_cache(d);
diff --git a/xen/arch/x86/pv/hypercall.c b/xen/arch/x86/pv/hypercall.c
index 53a52360fa..20795b4b57 100644
--- a/xen/arch/x86/pv/hypercall.c
+++ b/xen/arch/x86/pv/hypercall.c
@@ -42,7 +42,9 @@ const hypercall_table_t pv_hypercall_table[] = {
     COMPAT_CALL(set_callbacks),
     HYPERCALL(fpu_taskswitch),
     HYPERCALL(sched_op_compat),
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
     COMPAT_CALL(platform_op),
+#endif
     HYPERCALL(set_debugreg),
     HYPERCALL(get_debugreg),
     COMPAT_CALL(update_descriptor),
@@ -72,8 +74,10 @@ const hypercall_table_t pv_hypercall_table[] = {
 #endif
     HYPERCALL(event_channel_op),
     COMPAT_CALL(physdev_op),
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
     HYPERCALL(sysctl),
     HYPERCALL(domctl),
+#endif
 #ifdef CONFIG_KEXEC
     COMPAT_CALL(kexec_op),
 #endif
@@ -89,7 +93,9 @@ const hypercall_table_t pv_hypercall_table[] = {
     HYPERCALL(hypfs_op),
 #endif
     HYPERCALL(mca),
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
     HYPERCALL(arch_1),
+#endif
 };
 
 #undef do_arch_1
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 06881d023c..b3b60a1ba2 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -6,7 +6,6 @@ obj-$(CONFIG_CORE_PARKING) += core_parking.o
 obj-y += cpu.o
 obj-$(CONFIG_DEBUG_TRACE) += debugtrace.o
 obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
-obj-y += domctl.o
 obj-y += domain.o
 obj-y += event_2l.o
 obj-y += event_channel.o
@@ -26,7 +25,6 @@ obj-$(CONFIG_NEEDS_LIST_SORT) += list_sort.o
 obj-$(CONFIG_LIVEPATCH) += livepatch.o livepatch_elf.o
 obj-$(CONFIG_MEM_ACCESS) += mem_access.o
 obj-y += memory.o
-obj-y += monitor.o
 obj-y += multicall.o
 obj-y += notifier.o
 obj-y += page_alloc.o
@@ -47,7 +45,6 @@ obj-y += spinlock.o
 obj-y += stop_machine.o
 obj-y += string.o
 obj-y += symbols.o
-obj-y += sysctl.o
 obj-y += tasklet.o
 obj-y += time.o
 obj-y += timer.o
@@ -66,6 +63,12 @@ obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma lzo unlzo un
 
 obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o)
 
+ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)
+obj-y += domctl.o
+obj-y += monitor.o
+obj-y += sysctl.o
+endif
+
 extra-y := symbols-dummy.o
 
 obj-$(CONFIG_COVERAGE) += coverage/
diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h
index f53575f3d9..b803efa7b5 100644
--- a/xen/include/asm-x86/paging.h
+++ b/xen/include/asm-x86/paging.h
@@ -154,6 +154,8 @@ struct paging_mode {
 /*****************************************************************************
  * Log dirty code */
 
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
+
 /* get the dirty bitmap for a specific range of pfns */
 void paging_log_dirty_range(struct domain *d,
                             unsigned long begin_pfn,
@@ -202,6 +204,15 @@ struct sh_dirty_vram {
     s_time_t last_dirty;
 };
 
+#else /* !CONFIG_PV_SHIM_EXCLUSIVE */
+
+static inline void paging_log_dirty_init(struct domain *d,
+                                         const struct log_dirty_ops *ops) {}
+static inline void paging_mark_dirty(struct domain *d, mfn_t gmfn) {}
+static inline void paging_mark_pfn_dirty(struct domain *d, pfn_t pfn) {}
+
+#endif /* CONFIG_PV_SHIM_EXCLUSIVE */
+
 /*****************************************************************************
  * Entry points into the paging-assistance code */
 
diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h
index 1cb205d977..cde0d9c7fe 100644
--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -125,6 +125,10 @@ struct vnuma_info {
     struct xen_vmemrange *vmemrange;
 };
 
+#ifndef CONFIG_PV_SHIM_EXCLUSIVE
 void vnuma_destroy(struct vnuma_info *vnuma);
+#else
+static inline void vnuma_destroy(struct vnuma_info *vnuma) { ASSERT(!vnuma); }
+#endif
 
 #endif /* __XEN_DOMAIN_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 07:55:47 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 07:55:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBCl9-000795-4E; Thu, 27 Aug 2020 07:55:47 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBCl8-00078v-BJ
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:46 +0000
X-Inumbo-ID: 43cc2794-b030-4347-814f-bf329980fd47
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 43cc2794-b030-4347-814f-bf329980fd47;
 Thu, 27 Aug 2020 07:55:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Um/2my3hh0VzkJeYdNvZCbcJ2OM4lCpNTEUD7nnyFM8=; b=UaSgQV4Geb0lsLGGLXpTANAoXz
 JrtLs7NOjC7qWfHs3bzp7xcSLJEVusDWlsEUyKWOvaep6zy+PjfZ0JHxT+lUGe7IMTaa9QCBZZBAE
 1ij5f58TWYpq/gxY/EURVfsvmvdiOq2cjiZ0Dx//lVIgywyObTn4iOCbMSBIculQeIgU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCl7-00085j-5m
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBCl7-0002lc-4u
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 07:55:45 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: use constant flags for section .init.rodata
Message-Id: <E1kBCl7-0002lc-4u@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 07:55:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d2770047a277ccdc7924fb99d1b051eeb0d5a90f
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Thu Aug 27 09:53:46 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Aug 27 09:53:46 2020 +0200

    x86: use constant flags for section .init.rodata
    
    LLVM 11 complains with:
    
    <instantiation>:1:1: error: changed section flags for .init.rodata, expected: 0x2
    .pushsection .init.rodata
    ^
    <instantiation>:30:9: note: while in macro instantiation
            entrypoint 0
            ^
    entry.S:979:9: note: while in macro instantiation
            .rept 256
            ^
    
    And:
    
    entry.S:1015:9: error: changed section flags for .init.rodata, expected: 0x2
            .section .init.rodata
            ^
    
    Fix it by explicitly using the same flags and type in all the
    instances.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/x86_64/entry.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index 8b57a00040..1e880eb9f6 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -967,7 +967,7 @@ GLOBAL(trap_nop)
 GLOBAL(autogen_entrypoints)
         /* pop into the .init.rodata section and record an entry point. */
         .macro entrypoint ent
-        .pushsection .init.rodata
+        .pushsection .init.rodata, "a", @progbits
         .quad \ent
         .popsection
         .endm
@@ -1012,5 +1012,5 @@ autogen_stubs: /* Automatically generated stubs. */
         vec = vec + 1
         .endr
 
-        .section .init.rodata
+        .section .init.rodata, "a", @progbits
         .size autogen_entrypoints, . - autogen_entrypoints
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 09:44:12 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 09:44:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBERz-0000ex-OW; Thu, 27 Aug 2020 09:44:07 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBERx-0000er-TC
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 09:44:05 +0000
X-Inumbo-ID: f1defe44-5f2d-4523-9287-d718f7c92ebe
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id f1defe44-5f2d-4523-9287-d718f7c92ebe;
 Thu, 27 Aug 2020 09:44:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=6SpH5dH9G5ax5JdyNsVZOc4Wg8dOz9lzDXTXwXnJB9g=; b=mZhCu0Sx0lp6ZdZCa7FfFlWN/B
 YXsQlkAtFXdOSaZpydaPECZkMzmR7YDiigOOWmZl0D6sT5U6jfoKt/ktZhep0zhx7AYJKcENGP3pY
 e1Rbe3R6Hz12JuRFVaNlroj2Jd6JxJG12stIpKI+BV+bKvgRxst7jXjpoE/QWTGsp7Cs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBERw-0002Rh-U4
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 09:44:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBERw-0000pM-SZ
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 09:44:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] MAINTAINERS: Update my email address
Message-Id: <E1kBERw-0000pM-SZ@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 09:44:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 86c076f06526e410c3d23af5e5d48511ae204508
Author:     Ian Jackson <iwj@xenproject.org>
AuthorDate: Wed Aug 26 15:47:19 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 09:33:02 2020 +0000

    MAINTAINERS: Update my email address
    
    I am changing my email address.  (My affiliation to Citrix remains
    unchanged.)  See
       https://xenbits.xen.org/people/iwj/2020/email-transition.txt
    for a signed confirmation with full details.
    
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 MAINTAINERS | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 978fc2fe72..ffe2310294 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -353,7 +353,7 @@ F:	xen/arch/x86/machine_kexec.c
 F:	xen/arch/x86/x86_64/kexec_reloc.S
 
 LIBXENLIGHT
-M:	Ian Jackson <ian.jackson@eu.citrix.com>
+M:	Ian Jackson <iwj@xenproject.org>
 M:	Wei Liu <wl@xen.org>
 M:	Anthony PERARD <anthony.perard@citrix.com>
 S:	Supported
@@ -413,7 +413,7 @@ S:	Supported
 F:	tools/python
 
 QEMU-DM
-M:	Ian Jackson <ian.jackson@eu.citrix.com>
+M:	Ian Jackson <iwj@xenproject.org>
 S:	Supported
 T:	git https://xenbits.xenproject.org/git-http/qemu-xen-traditional.git
 
@@ -465,7 +465,7 @@ F:	xen/arch/arm/tee/
 F:	xen/include/asm-arm/tee
 
 TOOLSTACK
-M:	Ian Jackson <ian.jackson@eu.citrix.com>
+M:	Ian Jackson <iwj@xenproject.org>
 M:	Wei Liu <wl@xen.org>
 S:	Supported
 F:	autogen.sh
@@ -602,7 +602,7 @@ F:	docs/misc/xsm-flask.txt
 THE REST
 M:	Andrew Cooper <andrew.cooper3@citrix.com>
 M:	George Dunlap <george.dunlap@citrix.com>
-M:	Ian Jackson <ian.jackson@eu.citrix.com>
+M:	Ian Jackson <iwj@xenproject.org>
 M:	Jan Beulich <jbeulich@suse.com>
 M:	Julien Grall <julien@xen.org>
 M:	Stefano Stabellini <sstabellini@kernel.org>
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:00:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:00:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEhT-0002SZ-F4; Thu, 27 Aug 2020 10:00:07 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEhS-0002Op-1h
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:06 +0000
X-Inumbo-ID: 765114b1-0700-4e6d-b98f-61b751cbb67f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 765114b1-0700-4e6d-b98f-61b751cbb67f;
 Thu, 27 Aug 2020 10:00:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=qGavTE/x7hjzuBs6siIe9K6h/5lvJfZuyt2FU/dxYrQ=; b=5p3RMA1sKmRtyIlIRfK0Yo03oj
 f3d5gqAighME0bzRwWqMAOD2KMXnIsKFE/M6QFCG7quovSIE3dF+J0GDOyz7iaqdEZd7C8uRPlSX1
 M0qw5We5FiM1WNaOfRYTKB4S2LkSdBFjPhPa9uqhBYajzDxdugKFT0OqdNajoxBAF67M=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEhR-0002r6-7f
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEhR-0001rg-6L
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/firmware: Fix typo in uninstall target
Message-Id: <E1kBEhR-0001rg-6L@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:00:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit a623841b85bde261d0627676c7cff7745f107f3c
Author:     Hubert Jasudowicz <hubert.jasudowicz@cert.pl>
AuthorDate: Tue Aug 18 21:29:48 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 09:35:35 2020 +0000

    tools/firmware: Fix typo in uninstall target
    
    When ipxe.bin is missing, make uninstall will fail due to
    wrong switch (-r) passed to rm command. Replace it with -f.
    
    Signed-off-by: Hubert Jasudowicz <hubert.jasudowicz@cert.pl>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/firmware/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 809a5fd025..1f27117794 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -72,7 +72,7 @@ ifeq ($(CONFIG_OVMF),y)
 	rm -f $(INST_DIR)/ovmf.bin
 endif
 ifeq ($(CONFIG_IPXE),y)
-	rm -r $(INST_DIR)/ipxe.bin
+	rm -f $(INST_DIR)/ipxe.bin
 endif
 ifeq ($(CONFIG_PV_SHIM),y)
 	rm -f $(INST_DIR)/xen-shim
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:00:17 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:00:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEhd-0002Tv-Gi; Thu, 27 Aug 2020 10:00:17 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEhc-0002Tk-9J
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:16 +0000
X-Inumbo-ID: e55a98e4-a46e-4b02-8026-e7d94ab4fbcf
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id e55a98e4-a46e-4b02-8026-e7d94ab4fbcf;
 Thu, 27 Aug 2020 10:00:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=pc1QLD/COlD1pzhGzxFcHimgPCy9JLgULR7UJW1cKNY=; b=ltsyoYzIHTnXFtnj11+6mur6ps
 7ODDmzyqx64e9oiWw2/ZdTjJY2eYswkiPce/lVQstTpHZe2/LXCiHuejoQFBQKOXWz4nNYH2BB1Y8
 Oda7KeX558qoDzuGnp6XV42FK6JW8n+U8b/Sm1m1IQ6uiMCzHnPCusmoA2yDI3SN4pgA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEhb-0002rG-Bq
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEhb-0001sp-9i
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] libxl: workaround gcc 10.2 maybe-uninitialized warning
Message-Id: <E1kBEhb-0001sp-9i@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:00:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d25cc3ec93ebda030349045d2c7fa14ffde07ed7
Author:     Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
AuthorDate: Wed Aug 19 04:00:35 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 09:36:39 2020 +0000

    libxl: workaround gcc 10.2 maybe-uninitialized warning
    
    It seems xlu_pci_parse_bdf has a state machine that is too complex for
    gcc to understand. The build fails with:
    
        libxlu_pci.c: In function 'xlu_pci_parse_bdf':
        libxlu_pci.c:32:18: error: 'func' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           32 |     pcidev->func = func;
              |     ~~~~~~~~~~~~~^~~~~~
        libxlu_pci.c:51:29: note: 'func' was declared here
           51 |     unsigned dom, bus, dev, func, vslot = 0;
              |                             ^~~~
        libxlu_pci.c:31:17: error: 'dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           31 |     pcidev->dev = dev;
              |     ~~~~~~~~~~~~^~~~~
        libxlu_pci.c:51:24: note: 'dev' was declared here
           51 |     unsigned dom, bus, dev, func, vslot = 0;
              |                        ^~~
        libxlu_pci.c:30:17: error: 'bus' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           30 |     pcidev->bus = bus;
              |     ~~~~~~~~~~~~^~~~~
        libxlu_pci.c:51:19: note: 'bus' was declared here
           51 |     unsigned dom, bus, dev, func, vslot = 0;
              |                   ^~~
        libxlu_pci.c:29:20: error: 'dom' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           29 |     pcidev->domain = domain;
              |     ~~~~~~~~~~~~~~~^~~~~~~~
        libxlu_pci.c:51:14: note: 'dom' was declared here
           51 |     unsigned dom, bus, dev, func, vslot = 0;
              |              ^~~
        cc1: all warnings being treated as errors
    
    Workaround it by setting the initial value to invalid value (0xffffffff)
    and then assert on each value being set. This way we mute the gcc
    warning, while still detecting bugs in the parse code.
    
    Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxlu_pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxlu_pci.c b/tools/libxl/libxlu_pci.c
index 7947687661..e2709c5f89 100644
--- a/tools/libxl/libxlu_pci.c
+++ b/tools/libxl/libxlu_pci.c
@@ -45,10 +45,11 @@ static int pcidev_struct_fill(libxl_device_pci *pcidev, unsigned int domain,
 #define STATE_TYPE      9
 #define STATE_RDM_STRATEGY      10
 #define STATE_RESERVE_POLICY    11
+#define INVALID         0xffffffff
 int xlu_pci_parse_bdf(XLU_Config *cfg, libxl_device_pci *pcidev, const char *str)
 {
     unsigned state = STATE_DOMAIN;
-    unsigned dom, bus, dev, func, vslot = 0;
+    unsigned dom = INVALID, bus = INVALID, dev = INVALID, func = INVALID, vslot = 0;
     char *buf2, *tok, *ptr, *end, *optkey = NULL;
 
     if ( NULL == (buf2 = ptr = strdup(str)) )
@@ -170,6 +171,8 @@ int xlu_pci_parse_bdf(XLU_Config *cfg, libxl_device_pci *pcidev, const char *str
     if ( tok != ptr || state != STATE_TERMINAL )
         goto parse_error;
 
+    assert(dom != INVALID && bus != INVALID && dev != INVALID && func != INVALID);
+
     /* Just a pretty way to fill in the values */
     pcidev_struct_fill(pcidev, dom, bus, dev, func, vslot << 3);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:00:27 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:00:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEhn-0002VU-ID; Thu, 27 Aug 2020 10:00:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEhm-0002VG-AA
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:26 +0000
X-Inumbo-ID: 963af7bc-6e20-4fbd-be64-0920c9f92b9b
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 963af7bc-6e20-4fbd-be64-0920c9f92b9b;
 Thu, 27 Aug 2020 10:00:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=SE3sEbqwKQUOtZ0rw+b894RLFhOnD3nvy4Xg6UM6/Tg=; b=QWahrSkFW22oweBJzyRZJFp/10
 tlb946fORx1SVclsTSvU9shoG3VBhU3WuNK6Wj5llJfcoi8+36Cg1/yfP96vGc8HdPWegoRcHLLiw
 LnWW+elbhGlznJBdhx9NDgFMhVRHEhiZR6YSDN85ttDo+tSKLfVMonGjFCoF25hzgeww=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEhl-0002rP-FA
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEhl-0001tY-Dv
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:00:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] libxl: fix -Werror=stringop-truncation in
 libxl__prepare_sockaddr_un
Message-Id: <E1kBEhl-0001tY-Dv@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:00:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit fff1b7f50e75ad9535c86f3fcf425b4945c50a1c
Author:     Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
AuthorDate: Wed Aug 19 04:00:36 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 09:38:47 2020 +0000

    libxl: fix -Werror=stringop-truncation in libxl__prepare_sockaddr_un
    
    In file included from /usr/include/string.h:495,
                     from libxl_internal.h:38,
                     from libxl_utils.c:20:
    In function 'strncpy',
        inlined from 'libxl__prepare_sockaddr_un' at libxl_utils.c:1262:5:
    /usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 108 equals destination size [-Werror=stringop-truncation]
      106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    
    Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl_utils.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
index f360f5e228..b039143b8a 100644
--- a/tools/libxl/libxl_utils.c
+++ b/tools/libxl/libxl_utils.c
@@ -1252,14 +1252,14 @@ int libxl__prepare_sockaddr_un(libxl__gc *gc,
                                struct sockaddr_un *un, const char *path,
                                const char *what)
 {
-    if (sizeof(un->sun_path) <= strlen(path)) {
+    if (sizeof(un->sun_path) - 1 <= strlen(path)) {
         LOG(ERROR, "UNIX socket path '%s' is too long for %s", path, what);
-        LOG(DEBUG, "Path must be less than %zu bytes", sizeof(un->sun_path));
+        LOG(DEBUG, "Path must be less than %zu bytes", sizeof(un->sun_path) - 1);
         return ERROR_INVAL;
     }
     memset(un, 0, sizeof(struct sockaddr_un));
     un->sun_family = AF_UNIX;
-    strncpy(un->sun_path, path, sizeof(un->sun_path));
+    strncpy(un->sun_path, path, sizeof(un->sun_path) - 1);
     return 0;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:11:09 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:11:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEs6-0003P4-Dk; Thu, 27 Aug 2020 10:11:06 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEs5-0003Oz-H7
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:05 +0000
X-Inumbo-ID: cdcaa4ad-59e3-4ee5-908f-653acf94d56c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id cdcaa4ad-59e3-4ee5-908f-653acf94d56c;
 Thu, 27 Aug 2020 10:11:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=RydPSF/RewT9p2EOMG6y+cP5F2bdF4jOsD/hCz6uBYw=; b=MX0+0drbDIt2TscQ5gD7e71dMt
 roynf3jNJKNGcC9blj6JHQrkAtkQBYhT2bclx/tkg62K3IYn+0mVuA6uNs3TQ7+g3Yv6oQ1Ew3I9H
 yCCi3TRNceiD8ffVfg+kKUDY63mVnrsesqZ3iqLaelJ5VZAREXhmzF1Sw6+34qrU50/w=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEs4-00034m-Dc
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEs4-0002fj-B8
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] public/io/netif: specify MTU override node
Message-Id: <E1kBEs4-0002fj-B8@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:11:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit f9d25fa3faf66bcd4265fe01f23c5fd724e27601
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:01:55 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:03:54 2020 +0000

    public/io/netif: specify MTU override node
    
    There is currently no documentation to state what MTU a frontend should
    adertise to its network stack. It has however long been assumed that the
    default value of 1500 is correct.
    
    This patch specifies a mechanism to allow the tools to set the MTU via a
    xenstore node in the frontend area and states that the absence of that node
    means the frontend should assume an MTU of 1500 octets.
    
    NOTE: The Windows PV frontend has used an MTU sampled from the xenstore
          node specified in this patch.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 docs/misc/xenstore-paths.pandoc |  3 +++
 xen/include/public/io/netif.h   | 12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/docs/misc/xenstore-paths.pandoc b/docs/misc/xenstore-paths.pandoc
index 766e8008dc..5cd5c8a3b9 100644
--- a/docs/misc/xenstore-paths.pandoc
+++ b/docs/misc/xenstore-paths.pandoc
@@ -298,6 +298,9 @@ A virtual keyboard device frontend. Described by
 A virtual network device frontend. Described by
 [xen/include/public/io/netif.h][NETIF]
 
+NOTE: ~/device/vif/$DEVID/mtu can be used to inform the frontend of an
+      increased MTU. (The default MTU is 1500 octets).
+
 #### ~/device/vscsi/$DEVID/* []
 
 A virtual scsi device frontend. Described by
diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h
index 9fcf91a2fe..00dd258712 100644
--- a/xen/include/public/io/netif.h
+++ b/xen/include/public/io/netif.h
@@ -204,6 +204,18 @@
  * present).
  */
 
+/*
+ * MTU
+ * ===
+ *
+ * The toolstack may set a value of MTU for the frontend by setting the
+ * /local/domain/<domid>/device/vif/<vif>/mtu node with the MTU value in
+ * octets. If this node is absent the frontend should assume an MTU value
+ * of 1500 octets. A frontend is also at liberty to ignore this value so
+ * it is only suitable for informing the frontend that a packet payload
+ * >1500 octets is permitted.
+ */
+
 /*
  * Hash types
  * ==========
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:11:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:11:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEsG-0003Pk-Fe; Thu, 27 Aug 2020 10:11:16 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEsF-0003Pe-B5
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:15 +0000
X-Inumbo-ID: 43d5dd9f-ace4-4afd-9617-08b5171be4e1
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 43d5dd9f-ace4-4afd-9617-08b5171be4e1;
 Thu, 27 Aug 2020 10:11:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=oYdryN3xbA59y3pQf/SnfeJSNun37AFfFCw7/fWBtzk=; b=fo4EO78FTUNaLfGuSM7l7quSpX
 Y5ok4O63wSYAf+++hSyWrpCJ+vOZsfw4qtfrY/Trv8zwHL+DIYDIXYLJyZzG/T39nWmNfhqFr2K1f
 NOnzwVC2ii4txgttqRmbdLnROa2mWgGMfBGLegWvV/QFL/NYtls+9VVE+hkvpg/BTm40=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsE-00034s-Hg
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsE-0002h8-Fk
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:14 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/hotplug/Linux: re-factor add_to_bridge() in
 xen-network-common.sh
Message-Id: <E1kBEsE-0002h8-Fk@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:11:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 70fea87a3a595632cd0a17a8388a43b95cbe7af7
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:01:56 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:04:04 2020 +0000

    tools/hotplug/Linux: re-factor add_to_bridge() in xen-network-common.sh
    
    Remove duplication of 'ip link set dev'. It is perfectly fine to call it
    even if the device has already been added to the bridge.
    
    NOTE: This patch also adds code to write a debug log entry if the device
          was already on the bridge.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/hotplug/Linux/xen-network-common.sh | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/tools/hotplug/Linux/xen-network-common.sh b/tools/hotplug/Linux/xen-network-common.sh
index 8dd3a62068..ec3bd4ec4a 100644
--- a/tools/hotplug/Linux/xen-network-common.sh
+++ b/tools/hotplug/Linux/xen-network-common.sh
@@ -126,16 +126,18 @@ add_to_bridge () {
     local bridge=$1
     local dev=$2
 
-    # Don't add $dev to $bridge if it's already on a bridge.
-    if [ -e "/sys/class/net/${bridge}/brif/${dev}" ]; then
-	ip link set dev ${dev} up || true
-	return
-    fi
-    if which brctl >&/dev/null; then
-        brctl addif ${bridge} ${dev}
+    # Don't add $dev to $bridge if it's already on the bridge.
+    if [ ! -e "/sys/class/net/${bridge}/brif/${dev}" ]; then
+        log debug "adding $dev to bridge $bridge"
+        if which brctl >&/dev/null; then
+            brctl addif ${bridge} ${dev}
+        else
+            ip link set ${dev} master ${bridge}
+        fi
     else
-        ip link set ${dev} master ${bridge}
+        log debug "$dev already on bridge $bridge"
     fi
+
     ip link set dev ${dev} up
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:11:26 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:11:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEsQ-0003Qy-HX; Thu, 27 Aug 2020 10:11:26 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEsP-0003Qq-G6
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:25 +0000
X-Inumbo-ID: 23ad1842-53f7-46c4-b469-de06dd4b07a8
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 23ad1842-53f7-46c4-b469-de06dd4b07a8;
 Thu, 27 Aug 2020 10:11:24 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=lWzOPONBZtyQnlKKrDL0NehC/jJ3R+l3+RN7JscEWgM=; b=R2G6GeSN6l2IX9sTxU1oh+jMwx
 71ZoAysvxj2bws1VVCKywbd3k3fuAqcKqy2X2h4PVtbdURC+GxcHftLFbT0icHpGTw6oVtuRu7Unf
 80qwTLJfWFla8Od/qVQjXJg9S0fEuNo0SfY8WbxqZEUm58mMCzPfxJHffHdr92AIdtPs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsO-00036e-LE
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsO-0002hx-Jz
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:24 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/hotplug/Linux: add remove_from_bridge()
Message-Id: <E1kBEsO-0002hx-Jz@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:11:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit bb13d936d2500f303c8fbf9420da9ed340818294
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:01:57 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:04:10 2020 +0000

    tools/hotplug/Linux: add remove_from_bridge()
    
    This patch adds a remove_from_bridge() function into xen-network-common.sh
    to partner with the existing add_to_bridge() function. The vif-bridge
    script is then modified to use it.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/hotplug/Linux/vif-bridge            |  7 +------
 tools/hotplug/Linux/xen-network-common.sh | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
index e722090ca8..c3e409926d 100644
--- a/tools/hotplug/Linux/vif-bridge
+++ b/tools/hotplug/Linux/vif-bridge
@@ -84,12 +84,7 @@ case "$command" in
         ;;
 
     offline)
-        if which brctl >&/dev/null; then
-            do_without_error brctl delif "$bridge" "$dev"
-        else
-            do_without_error ip link set "$dev" nomaster
-        fi
-        do_without_error ifconfig "$dev" down
+        remove_from_bridge "$bridge" "$dev"
         ;;
 
     add)
diff --git a/tools/hotplug/Linux/xen-network-common.sh b/tools/hotplug/Linux/xen-network-common.sh
index ec3bd4ec4a..6a0904361f 100644
--- a/tools/hotplug/Linux/xen-network-common.sh
+++ b/tools/hotplug/Linux/xen-network-common.sh
@@ -141,6 +141,25 @@ add_to_bridge () {
     ip link set dev ${dev} up
 }
 
+remove_from_bridge () {
+    local bridge=$1
+    local dev=$2
+
+    do_without_error ip link set dev ${dev} down
+
+    # Don't remove $dev from $bridge if it's not on the bridge.
+    if [ -e "/sys/class/net/${bridge}/brif/${dev}" ]; then
+        log debug "removing $dev from bridge $bridge"
+        if which brctl >&/dev/null; then
+            do_without_error brctl delif ${bridge} ${dev}
+        else
+            do_without_error ip link set ${dev} nomaster
+        fi
+    else
+        log debug "$dev not on bridge $bridge"
+    fi
+}
+
 # Usage: set_mtu bridge dev
 set_mtu () {
     local bridge=$1
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:11:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:11:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEsa-0003SS-VF; Thu, 27 Aug 2020 10:11:36 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEsZ-0003S7-Jz
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:35 +0000
X-Inumbo-ID: 07c56f8b-7d67-4aee-a512-9ee520a6a44f
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 07c56f8b-7d67-4aee-a512-9ee520a6a44f;
 Thu, 27 Aug 2020 10:11:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=a7MyF0PPkV+qrrF9R3Z3yISzxhZQlHDDAxOY4HaYXG0=; b=d5Inbgu9tqNopz/q9LqOuxPZig
 SxlvkFe4uXG2nrJttbEe4Emd650GxYWMJuwutapTuZwpXXRNmA6okG0XatN9amfzqZ9GOjNLv22lM
 Bslh/tizTsBjW0Jm9xY494y268VKn/n9dc3lys3YNzLDM4PT9LM7ta1H2pSuSvvtldOQ=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsY-00036o-P1
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsY-0002ib-NQ
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:34 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/hotplug/Linux: remove code duplication in
 vif-bridge
Message-Id: <E1kBEsY-0002ib-NQ@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:11:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit b51715f02bf916c9cd6740b1047ba4396d85bbb0
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:01:58 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:04:14 2020 +0000

    tools/hotplug/Linux: remove code duplication in vif-bridge
    
    The 'add' and 'online' cases do exactly the same thing so have 'add' simply
    fall through to 'online'.
    
    NOTE: This patch also adds in the missing 'remove' case, which falls though
          to 'offline'. (The former is passed for 'tap' devices, the latter for
          'vif' devices).
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/hotplug/Linux/vif-bridge | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
index c3e409926d..e1d7c49788 100644
--- a/tools/hotplug/Linux/vif-bridge
+++ b/tools/hotplug/Linux/vif-bridge
@@ -77,21 +77,18 @@ then
 fi
 
 case "$command" in
+    add)
+        ;&
     online)
         setup_virtual_bridge_port "$dev"
         set_mtu "$bridge" "$dev"
         add_to_bridge "$bridge" "$dev"
         ;;
-
+    remove)
+        ;&
     offline)
         remove_from_bridge "$bridge" "$dev"
         ;;
-
-    add)
-        setup_virtual_bridge_port "$dev"
-        set_mtu "$bridge" "$dev"
-        add_to_bridge "$bridge" "$dev"
-        ;;
 esac
 
 handle_iptable
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:11:48 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:11:48 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEsm-0003Up-38; Thu, 27 Aug 2020 10:11:48 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEsk-0003UX-0F
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:46 +0000
X-Inumbo-ID: e48cbeb6-537c-45f1-b13a-4d95b50c7c9e
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id e48cbeb6-537c-45f1-b13a-4d95b50c7c9e;
 Thu, 27 Aug 2020 10:11:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=+zXVdlsArdTcX3yA3CdWE4DBUo6ZVzuXDXHDPBszd8c=; b=kIfNh8dK4yHo08Fqv0mYih/qc9
 4A9IAvTs2SFW+rdfh3ZJMoRsQnbduFPh6DMSHWOuPMtBpl+Z5JJsd1UJM9LD0PLnWXIjE+NR8Hyc5
 HAAKSdMbEgHZxXIw04HoXjIdy3GksII+ijFZ7yZQ7FBVILA7oSdTd0ZLjd9JsgSnq14k=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsi-00037c-Sk
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEsi-0002jP-RD
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:44 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] libxl: wire the libxl_device_nic 'mtu' value into
 xenstore
Message-Id: <E1kBEsi-0002jP-RD@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:11:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 22cdff931d1239156dea74d8b4a50e91e44c5817
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:01:59 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:04:17 2020 +0000

    libxl: wire the libxl_device_nic 'mtu' value into xenstore
    
    Currently the 'mtu' field of libxl_device_nic objects is effectively ignored:
    It is set by libxl__device_nic_setdefault() to a slightly odd default value of
    1492 but otherwise ignored.
    
    This patch changes the default value to a more conventional 1500 and modifies
    libxl__set_xenstore_nic() to write the value into an 'mtu' node in the
    xenstore backend area (if it is a non-default value), as well as a read-only
    node of the same name in the frontend area.
    
    The backend node is used to set the value of 'mtu' in
    libxl__nic_from_xenstore(), when retrieving the configuration.
    
    NOTE: There is currently no way to set a non-default value of 'mtu', hence
          the backend node is never written. This, however, will be addressed
          by a subsequent patch.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/libxl/libxl_nic.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
index 07880b39e1..0e5d120ae9 100644
--- a/tools/libxl/libxl_nic.c
+++ b/tools/libxl/libxl_nic.c
@@ -53,13 +53,15 @@ int libxl_mac_to_device_nic(libxl_ctx *ctx, uint32_t domid,
     return rc;
 }
 
+#define LIBXL_DEVICE_NIC_MTU_DEFAULT 1500
+
 static int libxl__device_nic_setdefault(libxl__gc *gc, uint32_t domid,
                                         libxl_device_nic *nic, bool hotplug)
 {
     int rc;
 
     if (!nic->mtu)
-        nic->mtu = 1492;
+        nic->mtu = LIBXL_DEVICE_NIC_MTU_DEFAULT;
     if (!nic->model) {
         nic->model = strdup("rtl8139");
         if (!nic->model) return ERROR_NOMEM;
@@ -223,6 +225,11 @@ static int libxl__set_xenstore_nic(libxl__gc *gc, uint32_t domid,
                             nic->rate_interval_usecs));
     }
 
+    if (nic->mtu != LIBXL_DEVICE_NIC_MTU_DEFAULT) {
+        flexarray_append(back, "mtu");
+        flexarray_append(back, GCSPRINTF("%u", nic->mtu));
+    }
+    
     flexarray_append(back, "bridge");
     flexarray_append(back, libxl__strdup(gc, nic->bridge));
     flexarray_append(back, "handle");
@@ -237,6 +244,9 @@ static int libxl__set_xenstore_nic(libxl__gc *gc, uint32_t domid,
     flexarray_append(front, GCSPRINTF(
                                     LIBXL_MAC_FMT, LIBXL_MAC_BYTES(nic->mac)));
 
+    flexarray_append(ro_front, "mtu");
+    flexarray_append(ro_front, GCSPRINTF("%u", nic->mtu));
+
     return 0;
 }
 
@@ -275,7 +285,20 @@ static int libxl__nic_from_xenstore(libxl__gc *gc, const char *libxl_path,
     rc = libxl__backendpath_parse_domid(gc, tmp, &nic->backend_domid);
     if (rc) goto out;
 
-    /* nic->mtu = */
+    rc = libxl__xs_read_checked(gc, XBT_NULL,
+                                GCSPRINTF("%s/mtu", libxl_path), &tmp);
+    if (rc) goto out;
+    if (tmp) {
+        char *endptr;
+
+        nic->mtu = strtol(tmp, &endptr, 10);
+        if (*endptr != '\0') {
+            rc = ERROR_INVAL;
+            goto out;
+        }
+    } else {
+        nic->mtu = LIBXL_DEVICE_NIC_MTU_DEFAULT;
+    }
 
     rc = libxl__xs_read_checked(gc, XBT_NULL,
                                 GCSPRINTF("%s/mac", libxl_path), &tmp);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:11:57 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:11:57 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEsv-0003WF-53; Thu, 27 Aug 2020 10:11:57 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEst-0003W0-SJ
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:55 +0000
X-Inumbo-ID: 17856b47-0fb1-47a3-85ce-c3e34f3a87a8
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 17856b47-0fb1-47a3-85ce-c3e34f3a87a8;
 Thu, 27 Aug 2020 10:11:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=fJkpEw2JK3EaVMIm8q+ohTx2rYZi+g3AC799r+YsjXQ=; b=CvQTryEezZ4td5qcS7sHNYs2AT
 yuBSIzOgWC5WKl4sxftyPtTuZiAIkIie46r9MeEWCQzQt4sfy0nLjVBq+wBeItdIAJn3xHLQyHOrN
 OKUQ86IOEfdJqPl3C2WkrIGb/zWm7sGH/YRmOxN0ptTrgazCvcQa76dfDiEnHUCJHBc4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEst-00037o-0h
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:55 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEss-0002k5-Up
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:11:54 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools/hotplug/Linux: modify set_mtu() to optionally use
 a configured value...
Message-Id: <E1kBEss-0002k5-Up@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:11:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit c7c6de0cb9b00efc203790743ef8c37ba113d3ee
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:02:00 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:04:21 2020 +0000

    tools/hotplug/Linux: modify set_mtu() to optionally use a configured value...
    
    ...and also inform the frontend.
    
    The set_mtu() function in xen-network-common.sh currently sets the backend
    vif MTU to match that of the bridge.
    
    A prior patch added code into libxl such that a tools-configured 'mtu' value
    may be present in the xenstore backend area. If the node is present in
    xenstore then it should be authoritative. Hence set_mtu() is modified to only
    read the MTU of the bridge if it is not present.
    
    The function is also modified to write whatever value it applies to the
    backend vif into the xenstore frontend area where is may then be used to
    configure the frontend network stack.
    
    NOTE: There is also a small modification replacing '$mtu' with '${mtu}'
          for style consistency.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/hotplug/Linux/vif-bridge            |  2 +-
 tools/hotplug/Linux/xen-network-common.sh | 28 ++++++++++++++++++++++++++--
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
index e1d7c49788..b99cc82a21 100644
--- a/tools/hotplug/Linux/vif-bridge
+++ b/tools/hotplug/Linux/vif-bridge
@@ -81,7 +81,7 @@ case "$command" in
         ;&
     online)
         setup_virtual_bridge_port "$dev"
-        set_mtu "$bridge" "$dev"
+        set_mtu "$bridge" "$dev" "$type_if"
         add_to_bridge "$bridge" "$dev"
         ;;
     remove)
diff --git a/tools/hotplug/Linux/xen-network-common.sh b/tools/hotplug/Linux/xen-network-common.sh
index 6a0904361f..82ee70aab4 100644
--- a/tools/hotplug/Linux/xen-network-common.sh
+++ b/tools/hotplug/Linux/xen-network-common.sh
@@ -164,9 +164,33 @@ remove_from_bridge () {
 set_mtu () {
     local bridge=$1
     local dev=$2
-    mtu="`ip link show dev ${bridge}| awk '/mtu/ { print $5 }'`"
+    local type_if=$3
+
+    XENBUS_PATH="${XENBUS_PATH:?}"
+
+    local mtu=$(xenstore_read_default "$XENBUS_PATH/mtu" "")
+    if [ -z "$mtu" ]
+    then
+        mtu="`ip link show dev ${bridge}| awk '/mtu/ { print $5 }'`"
+        if [ -n "$mtu" ]
+        then
+            log debug "$bridge MTU is $mtu"
+        fi
+    fi
     if [ -n "$mtu" ] && [ "$mtu" -gt 0 ]
     then
-            ip link set dev ${dev} mtu $mtu || :
+        log debug "setting $dev MTU to $mtu"
+        ip link set dev ${dev} mtu ${mtu} || :
+
+        if [ ${type_if} = vif ]
+        then
+            local dev_=${dev#vif}
+            local domid=${dev_%.*}
+            local devid=${dev_#*.}
+
+            local FRONTEND_PATH="/local/domain/$domid/device/vif/$devid"
+
+            xenstore_write "$FRONTEND_PATH/mtu" ${mtu}
+        fi
     fi
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:12:06 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:12:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEt4-0003Xy-7D; Thu, 27 Aug 2020 10:12:06 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEt4-0003Xs-00
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:12:06 +0000
X-Inumbo-ID: 168401af-2c44-4277-90fa-40e825d3607c
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 168401af-2c44-4277-90fa-40e825d3607c;
 Thu, 27 Aug 2020 10:12:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=c0mBKfXgZnd7DO52LK09agOHCFb563elajtPZu7Udh8=; b=twX2POw5tGPg9vy01V3sXTIyCC
 Tvckn/Juoaf6mZc81Wh9rallgY3ggupFh3ZPjEq3mEirvsw0ANvaCN2q8T0jL18LUKOXRsV8CDp+u
 tnjIiFkB14nYq4zwZbddlUAnrkVFvKv5FaL4op6EN4fC7oGgAfyiVNfT/LeV5ii1woRI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEt3-000389-3r
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:12:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEt3-0002l9-34
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:12:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] xl: add 'mtu' option to network configuration
Message-Id: <E1kBEt3-0002l9-34@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:12:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 812c8e01dbb352b93ae93d24cd0df7dee139c290
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:02:01 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:04:25 2020 +0000

    xl: add 'mtu' option to network configuration
    
    This patch adds code to parse a value for MTU from the network configuration
    if it is present. The documentation in xl-network-configuration.5.pod is
    also modified accordingly.
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 docs/man/xl-network-configuration.5.pod | 6 ++++++
 tools/xl/xl_cmdtable.c                  | 2 +-
 tools/xl/xl_parse.c                     | 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/docs/man/xl-network-configuration.5.pod b/docs/man/xl-network-configuration.5.pod
index 0ac24c4a18..af058d4d3c 100644
--- a/docs/man/xl-network-configuration.5.pod
+++ b/docs/man/xl-network-configuration.5.pod
@@ -249,3 +249,9 @@ on the underlying netback implementation.
 Specifies the devid manually instead of letting xl choose the lowest index available.
 
 NOTE: This should not be set unless you have a reason to.
+
+=head2 mtu
+
+Specifies the MTU (i.e. the maximum size of an IP payload, exclusing headers). The
+default value is 1500 but, if the VIF is attached to a bridge, it will be set to match
+unless overridden by this parameter.
diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c
index 08335394e5..2b8e1b321a 100644
--- a/tools/xl/xl_cmdtable.c
+++ b/tools/xl/xl_cmdtable.c
@@ -338,7 +338,7 @@ struct cmd_spec cmd_table[] = {
       "Create a new virtual network device",
       "<Domain> [type=<type>] [mac=<mac>] [bridge=<bridge>] "
       "[ip=<ip>] [script=<script>] [backend=<BackDomain>] [vifname=<name>] "
-      "[rate=<rate>] [model=<model>] [accel=<accel>]",
+      "[rate=<rate>] [model=<model>] [accel=<accel>] [mtu=<mtu>]",
     },
     { "network-list",
       &main_networklist, 0, 0,
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 61b4ef7b7e..cae8eb679c 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -563,6 +563,8 @@ int parse_nic_config(libxl_device_nic *nic, XLU_Config **config, char *token)
         fprintf(stderr, "the accel parameter for vifs is currently not supported\n");
     } else if (MATCH_OPTION("devid", token, oparg)) {
         nic->devid = parse_ulong(oparg);
+    } else if (MATCH_OPTION("mtu", token, oparg)) {
+        nic->mtu = parse_ulong(oparg);
     } else {
         fprintf(stderr, "unrecognized argument `%s'\n", token);
         return 1;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 10:12:18 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 10:12:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBEtF-0003Zl-9J; Thu, 27 Aug 2020 10:12:17 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBEtE-0003ZX-3e
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:12:16 +0000
X-Inumbo-ID: e85a737e-f93b-45ae-a5a3-e108d4b11ea4
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id e85a737e-f93b-45ae-a5a3-e108d4b11ea4;
 Thu, 27 Aug 2020 10:12:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=ILVuycvMNiRQqSnlHmSUk41i9cYowniP/F+l0zszrok=; b=nud55uZAUFOT6ec4pH3lG0QcoG
 NThuvYSmEtKSElzfiZU6317jJE/xQibShFmsRUa4/Rz3BfhPq2Yqs6P2EVZa9ZORJrHh9JK+oO6nf
 MKT4Xd4YcWiVPzbSf+3NWa3RiARfBlL6NprDSWdRVMR1WvBOr57hFH+hkBrEOdr/Ig8Y=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEtD-00038H-7S
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:12:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBEtD-0002nh-65
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 10:12:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] remove netchannel2 hotplug script... ancient history
Message-Id: <E1kBEtD-0002nh-65@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 10:12:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 484fca9569f03fbcb0fa5704f59164f95b0a8fcb
Author:     Paul Durrant <pdurrant@amazon.com>
AuthorDate: Tue Aug 11 09:02:02 2020 +0100
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 10:04:28 2020 +0000

    remove netchannel2 hotplug script... ancient history
    
    configuration is not parsed by libxl so there is no reason for the hotplug
    script to exist
    
    Signed-off-by: Paul Durrant <pdurrant@amazon.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/hotplug/Linux/Makefile |  1 -
 tools/hotplug/Linux/vif2     | 54 --------------------------------------------
 2 files changed, 55 deletions(-)

diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index 3a90990594..0b1d111d7e 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -6,7 +6,6 @@ XEN_SCRIPTS = vif-bridge
 XEN_SCRIPTS += vif-route
 XEN_SCRIPTS += vif-nat
 XEN_SCRIPTS += vif-openvswitch
-XEN_SCRIPTS += vif2
 XEN_SCRIPTS += vif-setup
 XEN_SCRIPTS-$(CONFIG_LIBNL) += remus-netbuf-setup
 XEN_SCRIPTS += block
diff --git a/tools/hotplug/Linux/vif2 b/tools/hotplug/Linux/vif2
deleted file mode 100644
index 5bd555c6f0..0000000000
--- a/tools/hotplug/Linux/vif2
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-dir=$(dirname "$0")
-. "$dir/xen-hotplug-common.sh"
-. "$dir/xen-network-common.sh"
-
-bridge=$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")
-if [ -z "$bridge" ]
-    then
-    if which brctl >&/dev/null; then
-        nr_bridges=$(($(brctl show | cut -f 1 | grep -v "^$" | wc -l) - 1))
-    else
-        nr_bridges=$(bridge link | wc -l)
-    fi
-    if [ "$nr_bridges" != 1 ]
-	then
-	fatal "no bridge specified, and don't know which one to use ($nr_bridges found)"
-    fi
-    if which brctl >&/dev/null; then
-        bridge=$(brctl show | cut -d "
-" -f 2 | cut -f 1)
-    else
-        bridge=$(bridge link | cut -d" " -f6)
-    fi
-fi
-
-command="$1"
-shift
-
-case "$command" in
-    "online")
-	if [ "$bridge" != "-" ]
-	    then
-	    setup_virtual_bridge_port "$vif"
-	    add_to_bridge "$bridge" "$vif"
-	else
-	    # Just let the normal udev rules for interfaces handle it.
-	    true
-	fi
-	success
-	;;
-
-    "add")
-	success
-	;;
-
-    "remove")
-	;;
-
-    *)
-	echo "Unknown command: $command"
-	echo 'Valid commands are: add, remove, online'
-	exit 1
-esac
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 11:22:14 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 11:22:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBFyq-0003O1-8f; Thu, 27 Aug 2020 11:22:08 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBFyo-0003Nw-Q9
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 11:22:06 +0000
X-Inumbo-ID: 5c3943f5-d571-42fa-b4f5-0e84842390db
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5c3943f5-d571-42fa-b4f5-0e84842390db;
 Thu, 27 Aug 2020 11:22:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=PB10HBvxItOe6ZADrF2oXyieyqa6BON3p9O+pJseriU=; b=UuahvzZI+aNR6s8G9DX3HJHhs6
 BakvWDzZBskjG/1vHPjViBj+eaadSJ1txCeFU6MvTDGoLs25Hx3T24dkfy79XCnr0+8PM2gIbVu1S
 XkWbw1HfVDVr9x5ZbFhN3r2/1udRu/XPI5Wn1y3VMDxSbGDUmYroeWkhMB13nW/RPK9k=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBFyn-0004e9-5j
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 11:22:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBFyn-00077o-4L
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 11:22:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] gitignore: ignore ebmalloc.c soft link
Message-Id: <E1kBFyn-00077o-4L@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 11:22:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 70c52c46bca89de00f04aa9294e14d11a2adff80
Author:     Wei Liu <wl@xen.org>
AuthorDate: Thu Aug 27 10:48:38 2020 +0000
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 11:11:05 2020 +0000

    gitignore: ignore ebmalloc.c soft link
    
    A previous commit split ebmalloc to its own translation unit but forgot
    to modify gitignore.
    
    Fixes: 8856a914bffd ("build: also check for empty .bss.* in .o -> .init.o conversion")
    Signed-off-by: Wei Liu <wl@xen.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 36ce2ea104..0f03518f91 100644
--- a/.gitignore
+++ b/.gitignore
@@ -296,6 +296,7 @@ xen/arch/*/xen.lds
 xen/arch/*/asm-offsets.s
 xen/arch/*/efi/boot.c
 xen/arch/*/efi/compat.c
+xen/arch/*/efi/ebmalloc.c
 xen/arch/*/efi/efi.h
 xen/arch/*/efi/runtime.c
 xen/common/config_data.S
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 11:55:16 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 11:55:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBGUq-0007If-1X; Thu, 27 Aug 2020 11:55:12 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBGUp-0007I6-3K
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 11:55:11 +0000
X-Inumbo-ID: 181b2388-e6b4-4507-8053-fc14699ad2e3
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 181b2388-e6b4-4507-8053-fc14699ad2e3;
 Thu, 27 Aug 2020 11:55:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Ny3aJfmoV6jBgOwyVy7ajQI1y+jCOGFpPJST/oC4anE=; b=IF/VQxuHJSYuYm3dtB6rh/ScA6
 RDBTHwSPE4HkMfDe9ocgI/2AGKCTD+AppJhvAu5QELzM1DDAQwHVFtDqbEwstVxwaJvxD6c/i/ZFx
 A2l+mrenqi5+dgLBxfrd3DiXEVnzOYJoZQyFnui1TprPwUT0kN5dVq8Oe1h1m2s4rFYE=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBGUj-0005Lo-5h
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 11:55:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBGUj-0000eu-4R
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 11:55:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86: Begin to introduce support for MSR_ARCH_CAPS
Message-Id: <E1kBGUj-0000eu-4R@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 11:55:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e32605b07ef2e01c9d05da9b2d5d7b8f9a5c7c1b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 10 16:25:40 2018 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Aug 27 12:48:46 2020 +0100

    x86: Begin to introduce support for MSR_ARCH_CAPS
    
    ... including serialisation/deserialisation logic and unit tests.
    
    There is no current way to configure this MSR correctly for guests.
    The toolstack side this logic needs building, which is far easier to
    do with it in place.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 tools/tests/cpu-policy/test-cpu-policy.c    |  5 +++++
 xen/arch/x86/msr.c                          |  6 ++++--
 xen/include/public/arch-x86/cpufeatureset.h |  2 +-
 xen/include/xen/lib/x86/msr.h               | 24 +++++++++++++++++++++++-
 xen/lib/x86/msr.c                           |  2 ++
 5 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/tools/tests/cpu-policy/test-cpu-policy.c b/tools/tests/cpu-policy/test-cpu-policy.c
index 7ba9707236..0fa209f1ea 100644
--- a/tools/tests/cpu-policy/test-cpu-policy.c
+++ b/tools/tests/cpu-policy/test-cpu-policy.c
@@ -374,6 +374,11 @@ static void test_msr_deserialise_failure(void)
             .msr = { .idx = 0xce, .val = ~0ull },
             .rc = -EOVERFLOW,
         },
+        {
+            .name = "truncated val",
+            .msr = { .idx = 0x10a, .val = ~0ull },
+            .rc = -EOVERFLOW,
+        },
     };
 
     printf("Testing MSR deserialise failure:\n");
diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c
index ca4307e19f..c3862033eb 100644
--- a/xen/arch/x86/msr.c
+++ b/xen/arch/x86/msr.c
@@ -220,8 +220,10 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t *val)
         break;
 
     case MSR_ARCH_CAPABILITIES:
-        /* Not implemented yet. */
-        goto gp_fault;
+        if ( !cp->feat.arch_caps )
+            goto gp_fault;
+        *val = mp->arch_caps.raw;
+        break;
 
     case MSR_INTEL_MISC_FEATURES_ENABLES:
         *val = msrs->misc_features_enables.raw;
diff --git a/xen/include/public/arch-x86/cpufeatureset.h b/xen/include/public/arch-x86/cpufeatureset.h
index ce3deaa5c7..fc733e64f6 100644
--- a/xen/include/public/arch-x86/cpufeatureset.h
+++ b/xen/include/public/arch-x86/cpufeatureset.h
@@ -268,7 +268,7 @@ XEN_CPUFEATURE(CET_IBT,       9*32+20) /*   CET - Indirect Branch Tracking */
 XEN_CPUFEATURE(IBRSB,         9*32+26) /*A  IBRS and IBPB support (used by Intel) */
 XEN_CPUFEATURE(STIBP,         9*32+27) /*A  STIBP */
 XEN_CPUFEATURE(L1D_FLUSH,     9*32+28) /*S  MSR_FLUSH_CMD and L1D flush. */
-XEN_CPUFEATURE(ARCH_CAPS,     9*32+29) /*   IA32_ARCH_CAPABILITIES MSR */
+XEN_CPUFEATURE(ARCH_CAPS,     9*32+29) /*a  IA32_ARCH_CAPABILITIES MSR */
 XEN_CPUFEATURE(CORE_CAPS,     9*32+30) /*   IA32_CORE_CAPABILITIES MSR */
 XEN_CPUFEATURE(SSBD,          9*32+31) /*A  MSR_SPEC_CTRL.SSBD available */
 
diff --git a/xen/include/xen/lib/x86/msr.h b/xen/include/xen/lib/x86/msr.h
index 203c713320..48ba4a59c0 100644
--- a/xen/include/xen/lib/x86/msr.h
+++ b/xen/include/xen/lib/x86/msr.h
@@ -3,7 +3,7 @@
 #define XEN_LIB_X86_MSR_H
 
 /* Maximum number of MSRs written when serialising msr_policy. */
-#define MSR_MAX_SERIALISED_ENTRIES 1
+#define MSR_MAX_SERIALISED_ENTRIES 2
 
 /* MSR policy object for shared per-domain MSRs */
 struct msr_policy
@@ -23,6 +23,28 @@ struct msr_policy
             bool cpuid_faulting:1;
         };
     } platform_info;
+
+    /*
+     * 0x0000010a - MSR_ARCH_CAPABILITIES
+     *
+     * This is an Intel-only MSR, which provides miscellaneous enumeration,
+     * including those which indicate that microarchitectrual sidechannels are
+     * fixed in hardware.
+     */
+    union {
+        uint32_t raw;
+        struct {
+            bool rdcl_no:1;
+            bool ibrs_all:1;
+            bool rsba:1;
+            bool skip_l1dfl:1;
+            bool ssb_no:1;
+            bool mds_no:1;
+            bool if_pschange_mc_no:1;
+            bool tsx_ctrl:1;
+            bool taa_no:1;
+        };
+    } arch_caps;
 };
 
 #ifdef __XEN__
diff --git a/xen/lib/x86/msr.c b/xen/lib/x86/msr.c
index 171abf7008..7d71e92a38 100644
--- a/xen/lib/x86/msr.c
+++ b/xen/lib/x86/msr.c
@@ -39,6 +39,7 @@ int x86_msr_copy_to_buffer(const struct msr_policy *p,
     })
 
     COPY_MSR(MSR_INTEL_PLATFORM_INFO, p->platform_info.raw);
+    COPY_MSR(MSR_ARCH_CAPABILITIES,   p->arch_caps.raw);
 
 #undef COPY_MSR
 
@@ -99,6 +100,7 @@ int x86_msr_copy_from_buffer(struct msr_policy *p,
 })
 
         case MSR_INTEL_PLATFORM_INFO: ASSIGN(platform_info.raw); break;
+        case MSR_ARCH_CAPABILITIES:   ASSIGN(arch_caps.raw);     break;
 
 #undef ASSIGN
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:11:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHgJ-0005tT-Ux; Thu, 27 Aug 2020 13:11:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHgI-0005tO-ID
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:06 +0000
X-Inumbo-ID: 45f0d839-62b1-4117-a14b-db462d0cbb2a
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 45f0d839-62b1-4117-a14b-db462d0cbb2a;
 Thu, 27 Aug 2020 13:11:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=S22h+sQyQyoBulREyGr2kNHZeZj1Nu5D+2JRWuLPSig=; b=q9luQ7qEg6Kq4ISYJDKUO6DJIs
 +lKAtPFW/nqsWF1e5FdWzcr07RnEI/lFGhjZw0oeyL4MOfkfTNeD5gIUPBuESiaAJzWG1oRUuVQnQ
 X76X9XfYP+3GwHUvCQ/TPDaom8+fSTGB6Z6FgrppAL1B38F6ONYkQZtabJfyDl0w8xms=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgH-0006wO-3X
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgH-0006CP-2h
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] stubdom: add stubdom/mini-os.mk for Xen paths used by
 Mini-OS
Message-Id: <E1kBHgH-0006CP-2h@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:11:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 314d8cc0d87e04dd81eb9970709e71c50fef7b14
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:10 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    stubdom: add stubdom/mini-os.mk for Xen paths used by Mini-OS
    
    stubdom/mini-os.mk should contain paths used by Mini-OS when built as
    stubdom.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 stubdom/mini-os.mk | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/stubdom/mini-os.mk b/stubdom/mini-os.mk
new file mode 100644
index 0000000000..32528bb91f
--- /dev/null
+++ b/stubdom/mini-os.mk
@@ -0,0 +1,17 @@
+# Included by Mini-OS stubdom builds to set variables depending on Xen
+# internal paths.
+#
+# Input variables are:
+# XEN_ROOT
+# MINIOS_TARGET_ARCH
+
+XENSTORE_CPPFLAGS = -isystem $(XEN_ROOT)/tools/xenstore/include
+TOOLCORE_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore
+TOOLLOG_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog
+EVTCHN_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn
+GNTTAB_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab
+CALL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call
+FOREIGNMEMORY_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory
+DEVICEMODEL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel
+CTRL_PATH = $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)
+GUEST_PATH = $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:11:19 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHgV-0005uB-0H; Thu, 27 Aug 2020 13:11:19 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHgT-0005u5-Ca
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:17 +0000
X-Inumbo-ID: f27efe17-60ac-4986-8681-941720c197b2
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id f27efe17-60ac-4986-8681-941720c197b2;
 Thu, 27 Aug 2020 13:11:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Q1povuWJqYUL+A8mXTLjxFtte13X6Uu1xza18WSeV0Y=; b=j6lXSN0LMi3Z30J6QIcl/O4Za0
 Ytio0jX5S8KH2d8EYbDDxKGxGlGkmEx0rWl8sJ0ya8AnMzLx7prmlHeRvyOUHGZuuAS0SaBP/rj06
 ccWpUMa/vwqCdI4ccm0Nq3zR2ijegDRv1Z/7aMs9Ymzmj2H2JfGX/lwIhGequlv12DJo=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgR-0006wV-6o
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgR-0006DN-5s
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools: switch XEN_LIBXEN* make variables to lower case
 (XEN_libxen*)
Message-Id: <E1kBHgR-0006DN-5s@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:11:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 725ef89164e38349c9e6210f720e0cdc0c52e69e
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:11 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    tools: switch XEN_LIBXEN* make variables to lower case (XEN_libxen*)
    
    In order to harmonize names of library related make variables switch
    XEN_LIBXEN* names to XEN_libxen*, as all other related variables (e.g.
    CFLAGS_libxen*, SHDEPS_libxen*, ...) already use this pattern.
    
    Rename XEN_LIBXC to XEN_libxenctrl, XEN_XENSTORE to XEN_libxenstore,
    XEN_XENLIGHT to XEN_libxenlight, XEN_XLUTIL to XEN_libxlutil, and
    XEN_LIBVCHAN to XEN_libxenvchan for the same reason.
    
    Introduce XEN_libxenguest with the same value as XEN_libxenctrl.
    
    No functional change.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/Rules.mk                    | 120 +++++++++++++++++++-------------------
 tools/golang/xenlight/Makefile    |   4 +-
 tools/libs/call/Makefile          |   2 +-
 tools/libs/devicemodel/Makefile   |   2 +-
 tools/libs/evtchn/Makefile        |   2 +-
 tools/libs/foreignmemory/Makefile |   2 +-
 tools/libs/gnttab/Makefile        |   2 +-
 tools/libs/hypfs/Makefile         |   2 +-
 tools/libs/toolcore/Makefile      |   2 +-
 tools/libs/toollog/Makefile       |   2 +-
 tools/libvchan/Makefile           |   2 +-
 tools/libxc/Makefile              |   2 +-
 tools/xenstat/libxenstat/Makefile |   2 +-
 tools/xenstore/Makefile           |   2 +-
 14 files changed, 75 insertions(+), 73 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 5ed5664bf7..b42e50ebf6 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -12,21 +12,23 @@ INSTALL = $(XEN_ROOT)/tools/cross-install
 LDFLAGS += $(PREPEND_LDFLAGS_XEN_TOOLS)
 
 XEN_INCLUDE        = $(XEN_ROOT)/tools/include
-XEN_LIBXENTOOLCORE  = $(XEN_ROOT)/tools/libs/toolcore
-XEN_LIBXENTOOLLOG  = $(XEN_ROOT)/tools/libs/toollog
-XEN_LIBXENEVTCHN   = $(XEN_ROOT)/tools/libs/evtchn
-XEN_LIBXENGNTTAB   = $(XEN_ROOT)/tools/libs/gnttab
-XEN_LIBXENCALL     = $(XEN_ROOT)/tools/libs/call
-XEN_LIBXENFOREIGNMEMORY = $(XEN_ROOT)/tools/libs/foreignmemory
-XEN_LIBXENDEVICEMODEL = $(XEN_ROOT)/tools/libs/devicemodel
-XEN_LIBXENHYPFS    = $(XEN_ROOT)/tools/libs/hypfs
-XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
-XEN_XENLIGHT       = $(XEN_ROOT)/tools/libxl
+XEN_libxentoolcore = $(XEN_ROOT)/tools/libs/toolcore
+XEN_libxentoollog  = $(XEN_ROOT)/tools/libs/toollog
+XEN_libxenevtchn   = $(XEN_ROOT)/tools/libs/evtchn
+XEN_libxengnttab   = $(XEN_ROOT)/tools/libs/gnttab
+XEN_libxencall     = $(XEN_ROOT)/tools/libs/call
+XEN_libxenforeignmemory = $(XEN_ROOT)/tools/libs/foreignmemory
+XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel
+XEN_libxenhypfs    = $(XEN_ROOT)/tools/libs/hypfs
+XEN_libxenctrl     = $(XEN_ROOT)/tools/libxc
+# Currently libxenguest lives in the same directory as libxenctrl
+XEN_libxenguest    = $(XEN_libxenctrl)
+XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
 # Currently libxlutil lives in the same directory as libxenlight
-XEN_XLUTIL         = $(XEN_XENLIGHT)
-XEN_XENSTORE       = $(XEN_ROOT)/tools/xenstore
-XEN_LIBXENSTAT     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
-XEN_LIBVCHAN       = $(XEN_ROOT)/tools/libvchan
+XEN_libxlutil      = $(XEN_libxenlight)
+XEN_libxenstore    = $(XEN_ROOT)/tools/xenstore
+XEN_libxenstat     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
+XEN_libxenvchan    = $(XEN_ROOT)/tools/libvchan
 
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
@@ -97,75 +99,75 @@ endif
 # Consumers of libfoo should not directly use $(SHDEPS_libfoo) or
 # $(SHLIB_libfoo)
 
-CFLAGS_libxentoollog = -I$(XEN_LIBXENTOOLLOG)/include $(CFLAGS_xeninclude)
+CFLAGS_libxentoollog = -I$(XEN_libxentoollog)/include $(CFLAGS_xeninclude)
 SHDEPS_libxentoollog =
-LDLIBS_libxentoollog = $(SHDEPS_libxentoollog) $(XEN_LIBXENTOOLLOG)/libxentoollog$(libextension)
-SHLIB_libxentoollog  = $(SHDEPS_libxentoollog) -Wl,-rpath-link=$(XEN_LIBXENTOOLLOG)
+LDLIBS_libxentoollog = $(SHDEPS_libxentoollog) $(XEN_libxentoollog)/libxentoollog$(libextension)
+SHLIB_libxentoollog  = $(SHDEPS_libxentoollog) -Wl,-rpath-link=$(XEN_libxentoollog)
 
-CFLAGS_libxentoolcore = -I$(XEN_LIBXENTOOLCORE)/include $(CFLAGS_xeninclude)
+CFLAGS_libxentoolcore = -I$(XEN_libxentoolcore)/include $(CFLAGS_xeninclude)
 SHDEPS_libxentoolcore =
-LDLIBS_libxentoolcore = $(SHDEPS_libxentoolcore) $(XEN_LIBXENTOOLCORE)/libxentoolcore$(libextension)
-SHLIB_libxentoolcore  = $(SHDEPS_libxentoolcore) -Wl,-rpath-link=$(XEN_LIBXENTOOLCORE)
+LDLIBS_libxentoolcore = $(SHDEPS_libxentoolcore) $(XEN_libxentoolcore)/libxentoolcore$(libextension)
+SHLIB_libxentoolcore  = $(SHDEPS_libxentoolcore) -Wl,-rpath-link=$(XEN_libxentoolcore)
 
-CFLAGS_libxenevtchn = -I$(XEN_LIBXENEVTCHN)/include $(CFLAGS_xeninclude)
+CFLAGS_libxenevtchn = -I$(XEN_libxenevtchn)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenevtchn = $(SHLIB_libxentoolcore)
-LDLIBS_libxenevtchn = $(SHDEPS_libxenevtchn) $(XEN_LIBXENEVTCHN)/libxenevtchn$(libextension)
-SHLIB_libxenevtchn  = $(SHDEPS_libxenevtchn) -Wl,-rpath-link=$(XEN_LIBXENEVTCHN)
+LDLIBS_libxenevtchn = $(SHDEPS_libxenevtchn) $(XEN_libxenevtchn)/libxenevtchn$(libextension)
+SHLIB_libxenevtchn  = $(SHDEPS_libxenevtchn) -Wl,-rpath-link=$(XEN_libxenevtchn)
 
-CFLAGS_libxengnttab = -I$(XEN_LIBXENGNTTAB)/include $(CFLAGS_xeninclude)
+CFLAGS_libxengnttab = -I$(XEN_libxengnttab)/include $(CFLAGS_xeninclude)
 SHDEPS_libxengnttab = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore)
-LDLIBS_libxengnttab = $(SHDEPS_libxengnttab) $(XEN_LIBXENGNTTAB)/libxengnttab$(libextension)
-SHLIB_libxengnttab  = $(SHDEPS_libxengnttab) -Wl,-rpath-link=$(XEN_LIBXENGNTTAB)
+LDLIBS_libxengnttab = $(SHDEPS_libxengnttab) $(XEN_libxengnttab)/libxengnttab$(libextension)
+SHLIB_libxengnttab  = $(SHDEPS_libxengnttab) -Wl,-rpath-link=$(XEN_libxengnttab)
 
-CFLAGS_libxencall = -I$(XEN_LIBXENCALL)/include $(CFLAGS_xeninclude)
+CFLAGS_libxencall = -I$(XEN_libxencall)/include $(CFLAGS_xeninclude)
 SHDEPS_libxencall = $(SHLIB_libxentoolcore)
-LDLIBS_libxencall = $(SHDEPS_libxencall) $(XEN_LIBXENCALL)/libxencall$(libextension)
-SHLIB_libxencall  = $(SHDEPS_libxencall) -Wl,-rpath-link=$(XEN_LIBXENCALL)
+LDLIBS_libxencall = $(SHDEPS_libxencall) $(XEN_libxencall)/libxencall$(libextension)
+SHLIB_libxencall  = $(SHDEPS_libxencall) -Wl,-rpath-link=$(XEN_libxencall)
 
-CFLAGS_libxenforeignmemory = -I$(XEN_LIBXENFOREIGNMEMORY)/include $(CFLAGS_xeninclude)
+CFLAGS_libxenforeignmemory = -I$(XEN_libxenforeignmemory)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenforeignmemory = $(SHLIB_libxentoolcore)
-LDLIBS_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) $(XEN_LIBXENFOREIGNMEMORY)/libxenforeignmemory$(libextension)
-SHLIB_libxenforeignmemory  = $(SHDEPS_libxenforeignmemory) -Wl,-rpath-link=$(XEN_LIBXENFOREIGNMEMORY)
+LDLIBS_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) $(XEN_libxenforeignmemory)/libxenforeignmemory$(libextension)
+SHLIB_libxenforeignmemory  = $(SHDEPS_libxenforeignmemory) -Wl,-rpath-link=$(XEN_libxenforeignmemory)
 
-CFLAGS_libxendevicemodel = -I$(XEN_LIBXENDEVICEMODEL)/include $(CFLAGS_xeninclude)
+CFLAGS_libxendevicemodel = -I$(XEN_libxendevicemodel)/include $(CFLAGS_xeninclude)
 SHDEPS_libxendevicemodel = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall)
-LDLIBS_libxendevicemodel = $(SHDEPS_libxendevicemodel) $(XEN_LIBXENDEVICEMODEL)/libxendevicemodel$(libextension)
-SHLIB_libxendevicemodel  = $(SHDEPS_libxendevicemodel) -Wl,-rpath-link=$(XEN_LIBXENDEVICEMODEL)
+LDLIBS_libxendevicemodel = $(SHDEPS_libxendevicemodel) $(XEN_libxendevicemodel)/libxendevicemodel$(libextension)
+SHLIB_libxendevicemodel  = $(SHDEPS_libxendevicemodel) -Wl,-rpath-link=$(XEN_libxendevicemodel)
 
-CFLAGS_libxenhypfs = -I$(XEN_LIBXENHYPFS)/include $(CFLAGS_xeninclude)
+CFLAGS_libxenhypfs = -I$(XEN_libxenhypfs)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenhypfs = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall)
-LDLIBS_libxenhypfs = $(SHDEPS_libxenhypfs) $(XEN_LIBXENHYPFS)/libxenhypfs$(libextension)
-SHLIB_libxenhypfs  = $(SHDEPS_libxenhypfs) -Wl,-rpath-link=$(XEN_LIBXENHYPFS)
+LDLIBS_libxenhypfs = $(SHDEPS_libxenhypfs) $(XEN_libxenhypfs)/libxenhypfs$(libextension)
+SHLIB_libxenhypfs  = $(SHDEPS_libxenhypfs) -Wl,-rpath-link=$(XEN_libxenhypfs)
 
 # code which compiles against libxenctrl get __XEN_TOOLS__ and
 # therefore sees the unstable hypercall interfaces.
-CFLAGS_libxenctrl = -I$(XEN_LIBXC)/include $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) $(CFLAGS_xeninclude) -D__XEN_TOOLS__
+CFLAGS_libxenctrl = -I$(XEN_libxenctrl)/include $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) $(CFLAGS_xeninclude) -D__XEN_TOOLS__
 SHDEPS_libxenctrl = $(SHLIB_libxentoollog) $(SHLIB_libxenevtchn) $(SHLIB_libxengnttab) $(SHLIB_libxencall) $(SHLIB_libxenforeignmemory) $(SHLIB_libxendevicemodel)
-LDLIBS_libxenctrl = $(SHDEPS_libxenctrl) $(XEN_LIBXC)/libxenctrl$(libextension)
-SHLIB_libxenctrl  = $(SHDEPS_libxenctrl) -Wl,-rpath-link=$(XEN_LIBXC)
+LDLIBS_libxenctrl = $(SHDEPS_libxenctrl) $(XEN_libxenctrl)/libxenctrl$(libextension)
+SHLIB_libxenctrl  = $(SHDEPS_libxenctrl) -Wl,-rpath-link=$(XEN_libxenctrl)
 
-CFLAGS_libxenguest = -I$(XEN_LIBXC)/include $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory) $(CFLAGS_xeninclude)
+CFLAGS_libxenguest = -I$(XEN_libxenguest)/include $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory) $(CFLAGS_xeninclude)
 SHDEPS_libxenguest = $(SHLIB_libxenevtchn)
-LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_LIBXC)/libxenguest$(libextension)
-SHLIB_libxenguest  = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_LIBXC)
+LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_libxenguest)/libxenguest$(libextension)
+SHLIB_libxenguest  = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_libxenguest)
 
-CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude)
+CFLAGS_libxenstore = -I$(XEN_libxenstore)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenstore = $(SHLIB_libxentoolcore)
-LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_XENSTORE)/libxenstore$(libextension)
-SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_XENSTORE)
+LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_libxenstore)/libxenstore$(libextension)
+SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_libxenstore)
 ifeq ($(CONFIG_Linux),y)
 LDLIBS_libxenstore += -ldl
 endif
 
-CFLAGS_libxenstat  = -I$(XEN_LIBXENSTAT)
+CFLAGS_libxenstat  = -I$(XEN_libxenstat)
 SHDEPS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
-LDLIBS_libxenstat  = $(SHDEPS_libxenstat) $(XEN_LIBXENSTAT)/libxenstat$(libextension)
-SHLIB_libxenstat   = $(SHDEPS_libxenstat) -Wl,-rpath-link=$(XEN_LIBXENSTAT)
+LDLIBS_libxenstat  = $(SHDEPS_libxenstat) $(XEN_libxenstat)/libxenstat$(libextension)
+SHLIB_libxenstat   = $(SHDEPS_libxenstat) -Wl,-rpath-link=$(XEN_libxenstat)
 
-CFLAGS_libxenvchan = -I$(XEN_LIBVCHAN) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
+CFLAGS_libxenvchan = -I$(XEN_libxenvchan) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
 SHDEPS_libxenvchan = $(SHLIB_libxentoollog) $(SHLIB_libxenstore) $(SHLIB_libxenevtchn) $(SHLIB_libxengnttab)
-LDLIBS_libxenvchan = $(SHDEPS_libxenvchan) $(XEN_LIBVCHAN)/libxenvchan$(libextension)
-SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN)
+LDLIBS_libxenvchan = $(SHDEPS_libxenvchan) $(XEN_libxenvchan)/libxenvchan$(libextension)
+SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_libxenvchan)
 
 ifeq ($(debug),y)
 # Disable optimizations
@@ -176,15 +178,15 @@ else
 CFLAGS += -O2 -fomit-frame-pointer
 endif
 
-CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
+CFLAGS_libxenlight = -I$(XEN_libxenlight) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
 SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libxenhypfs)
-LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_XENLIGHT)/libxenlight$(libextension)
-SHLIB_libxenlight  = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_XENLIGHT)
+LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_libxenlight)/libxenlight$(libextension)
+SHLIB_libxenlight  = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_libxenlight)
 
-CFLAGS_libxlutil = -I$(XEN_XLUTIL)
+CFLAGS_libxlutil = -I$(XEN_libxlutil)
 SHDEPS_libxlutil = $(SHLIB_libxenlight)
-LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_XLUTIL)/libxlutil$(libextension)
-SHLIB_libxlutil  = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_XLUTIL)
+LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_libxlutil)/libxlutil$(libextension)
+SHLIB_libxlutil  = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_libxlutil)
 
 CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
 
diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile
index eac9dbf12a..a83fff7573 100644
--- a/tools/golang/xenlight/Makefile
+++ b/tools/golang/xenlight/Makefile
@@ -30,11 +30,11 @@ idl-gen: $(GOXL_GEN_FILES)
 #
 # NB that because the users of this library need to be able to
 # recompile the library from source, it needs to include '-lxenlight'
-# in the LDFLAGS; and thus we need to add -L$(XEN_XENLIGHT) here
+# in the LDFLAGS; and thus we need to add -L$(XEN_libxenlight) here
 # so that it can find the actual library.
 .PHONY: build
 build: xenlight.go $(GOXL_GEN_FILES)
-	CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_XENLIGHT) -L$(XEN_LIBXENTOOLLOG)" $(GO) build -x
+	CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_libxenlight) -L$(XEN_libxentoollog)" $(GO) build -x
 
 .PHONY: install
 install: build
diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile
index 7f6dc3fcbd..7994b411fa 100644
--- a/tools/libs/call/Makefile
+++ b/tools/libs/call/Makefile
@@ -15,5 +15,5 @@ SRCS-$(CONFIG_MiniOS)  += minios.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENCALL)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxencall)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
index 61bfa35273..d9d1d1b850 100644
--- a/tools/libs/devicemodel/Makefile
+++ b/tools/libs/devicemodel/Makefile
@@ -15,5 +15,5 @@ SRCS-$(CONFIG_MiniOS)  += compat.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENDEVICEMODEL)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxendevicemodel)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile
index 9206f622ef..d7aa4d402f 100644
--- a/tools/libs/evtchn/Makefile
+++ b/tools/libs/evtchn/Makefile
@@ -15,4 +15,4 @@ SRCS-$(CONFIG_MiniOS)  += minios.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENEVTCHN)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenevtchn)/include
diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile
index 28f1bddc96..823989681d 100644
--- a/tools/libs/foreignmemory/Makefile
+++ b/tools/libs/foreignmemory/Makefile
@@ -15,5 +15,5 @@ SRCS-$(CONFIG_MiniOS)  += minios.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENFOREIGNMEMORY)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenforeignmemory)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile
index 2da8fbbb7f..c0fffdac71 100644
--- a/tools/libs/gnttab/Makefile
+++ b/tools/libs/gnttab/Makefile
@@ -17,5 +17,5 @@ SRCS-$(CONFIG_NetBSD)  += gnttab_unimp.c gntshr_unimp.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENGNTTAB)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxengnttab)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
diff --git a/tools/libs/hypfs/Makefile b/tools/libs/hypfs/Makefile
index 06dd449929..b4c41f6189 100644
--- a/tools/libs/hypfs/Makefile
+++ b/tools/libs/hypfs/Makefile
@@ -12,5 +12,5 @@ SRCS-y                 += core.c
 
 include ../libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENHYPFS)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenhypfs)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile
index 9c5a92d93f..85ff2b26fd 100644
--- a/tools/libs/toolcore/Makefile
+++ b/tools/libs/toolcore/Makefile
@@ -10,7 +10,7 @@ SRCS-y	+= handlereg.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENTOOLCORE)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxentoolcore)/include
 
 $(LIB_OBJS): $(AUTOINCS)
 $(PIC_OBJS): $(AUTOINCS)
diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile
index 9156e5d08e..2d3ae4e627 100644
--- a/tools/libs/toollog/Makefile
+++ b/tools/libs/toollog/Makefile
@@ -10,4 +10,4 @@ SRCS-y	+= xtl_logger_stdio.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENTOOLLOG)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxentoollog)/include
diff --git a/tools/libvchan/Makefile b/tools/libvchan/Makefile
index d99a6137e1..a5441162a0 100644
--- a/tools/libvchan/Makefile
+++ b/tools/libvchan/Makefile
@@ -35,7 +35,7 @@ endif
 PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBVCHAN)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenvchan)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
 
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 955cd5ab18..c1e41a8ee9 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -168,7 +168,7 @@ endif
 PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXC)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenctrl)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
 
diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile
index ab980852da..b5e623b155 100644
--- a/tools/xenstat/libxenstat/Makefile
+++ b/tools/xenstat/libxenstat/Makefile
@@ -50,7 +50,7 @@ endif
 PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENSTAT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenstat)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 
 .PHONY: all
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 445e9911b2..0a64ac1571 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -128,7 +128,7 @@ endif
 PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_XENSTORE)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenstore)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:11:28 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:11:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHge-0005vH-1q; Thu, 27 Aug 2020 13:11:28 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHgc-0005v6-Cy
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:26 +0000
X-Inumbo-ID: 0975af69-94dc-4011-b0af-b9c090a81afa
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 0975af69-94dc-4011-b0af-b9c090a81afa;
 Thu, 27 Aug 2020 13:11:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=8DBicJSwDtUpIJzzO6xq+altNtm+MwtgaAgVB3eOYHM=; b=Z653sHhSf6PxrOuUJdI9ppLz6D
 t5G7aBGQuj6uSG4mQWoWsS+8to1h+grYiIBtaH5rIUClA0BPAbSvtPB+0rZglINqAG1hmnB4p1L2k
 LU+xpby1Gb1JrpwLL70YC5PWEV3y0h6KGDI5vVPx2APRzvL9uxsGQzXkyuC+nM7YbE0M=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgb-0006yG-Ae
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgb-0006Ed-91
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:25 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools: add a copy of library headers in tools/include
Message-Id: <E1kBHgb-0006Ed-91@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:11:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit bc44e2fb3199ecd8461bbdd093806f76ee61776a
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:11 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    tools: add a copy of library headers in tools/include
    
    The headers.chk target in tools/Rules.mk tries to compile all headers
    stand alone for testing them not to include any internal header.
    
    Unfortunately the headers tested against are not complete, as any
    header for a Xen library is not included in the include path of the
    test compile run, resulting in a failure in case any of the tested
    headers in including an official Xen library header.
    
    Fix that by copying the official headers located in
    tools/libs/*/include to tools/include.
    
    In order to support libraries with header name other than xen<lib>.h
    or with multiple headers add a LIBHEADER make variable a lib specific
    Makefile can set in that case.
    
    Move the headers.chk target from Rules.mk to libs.mk as it is used
    for libraries in tools/libs only.
    
    Add NO_HEADERS_CHK variable to skip checking headers as this will be
    needed e.g. for libxenctrl.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 .gitignore         |  1 +
 tools/Rules.mk     |  8 --------
 tools/libs/libs.mk | 26 +++++++++++++++++++++++---
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0f03518f91..823f4743dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -188,6 +188,7 @@ tools/hotplug/Linux/xendomains
 tools/hotplug/NetBSD/rc.d/xencommons
 tools/hotplug/NetBSD/rc.d/xendriverdomain
 tools/include/acpi
+tools/include/*.h
 tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
diff --git a/tools/Rules.mk b/tools/Rules.mk
index b42e50ebf6..5d699cfd39 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -225,14 +225,6 @@ INSTALL_PYTHON_PROG = \
 %.opic: %.S
 	$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) $(CFLAGS.opic) -fPIC -c -o $@ $< $(APPEND_CFLAGS)
 
-headers.chk:
-	for i in $(filter %.h,$^); do \
-	    $(CC) -x c -ansi -Wall -Werror $(CFLAGS_xeninclude) \
-	          -S -o /dev/null $$i || exit 1; \
-	    echo $$i; \
-	done >$@.new
-	mv $@.new $@
-
 subdirs-all subdirs-clean subdirs-install subdirs-distclean subdirs-uninstall: .phony
 	@set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
 		$(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index 8027ae7400..8045c00e9a 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -34,6 +34,10 @@ endif
 
 PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 
+LIBHEADER ?= xen$(LIBNAME).h
+LIBHEADERS = $(foreach h, $(LIBHEADER), include/$(h))
+LIBHEADERSGLOB = $(foreach h, $(LIBHEADER), $(XEN_ROOT)/tools/include/$(h))
+
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 
@@ -47,7 +51,22 @@ build:
 .PHONY: libs
 libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
-headers.chk: $(wildcard include/*.h) $(AUTOINCS)
+ifneq ($(NO_HEADERS_CHK),y)
+headers.chk:
+	for i in $(filter %.h,$^); do \
+	    $(CC) -x c -ansi -Wall -Werror $(CFLAGS_xeninclude) \
+	          -S -o /dev/null $$i || exit 1; \
+	    echo $$i; \
+	done >$@.new
+	mv $@.new $@
+else
+.PHONY: headers.chk
+endif
+
+headers.chk: $(LIBHEADERSGLOB) $(AUTOINCS)
+
+$(LIBHEADERSGLOB): $(LIBHEADERS)
+	for i in $(realpath $(LIBHEADERS)); do ln -sf $$i $(XEN_ROOT)/tools/include; done
 
 libxen$(LIBNAME).a: $(LIB_OBJS)
 	$(AR) rc $@ $^
@@ -68,13 +87,13 @@ install: build
 	$(INSTALL_DATA) libxen$(LIBNAME).a $(DESTDIR)$(libdir)
 	$(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxen$(LIBNAME).so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR) $(DESTDIR)$(libdir)/libxen$(LIBNAME).so
-	$(INSTALL_DATA) include/xen$(LIBNAME).h $(DESTDIR)$(includedir)
+	for i in $(LIBHEADERS); do $(INSTALL_DATA) $$i $(DESTDIR)$(includedir); done
 	$(INSTALL_DATA) xen$(LIBNAME).pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: uninstall
 uninstall:
 	rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xen$(LIBNAME).pc
-	rm -f $(DESTDIR)$(includedir)/xen$(LIBNAME).h
+	for i in $(LIBHEADER); do rm -f $(DESTDIR)$(includedir)/$(LIBHEADER); done
 	rm -f $(DESTDIR)$(libdir)/libxen$(LIBNAME).so
 	rm -f $(DESTDIR)$(libdir)/libxen$(LIBNAME).so.$(MAJOR)
 	rm -f $(DESTDIR)$(libdir)/libxen$(LIBNAME).so.$(MAJOR).$(MINOR)
@@ -90,6 +109,7 @@ clean:
 	rm -f libxen$(LIBNAME).so.$(MAJOR).$(MINOR) libxen$(LIBNAME).so.$(MAJOR)
 	rm -f headers.chk
 	rm -f xen$(LIBNAME).pc
+	rm -f $(LIBHEADERSGLOB)
 
 .PHONY: distclean
 distclean: clean
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:11:37 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:11:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHgn-0005wX-4k; Thu, 27 Aug 2020 13:11:37 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHgm-0005wL-4q
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:36 +0000
X-Inumbo-ID: 2b1fc53c-14d3-464a-96fe-6f41a0ecd725
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 2b1fc53c-14d3-464a-96fe-6f41a0ecd725;
 Thu, 27 Aug 2020 13:11:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=RYa7eiGPaKoi7yUVuiaD9sBwoBz3lgomOmRtxSaHPYM=; b=rI/tvAQKnOgfX0pJoiE1DWXQ9H
 4aAH0ZtezlrtKIByMr3o+zxW10VfYIuD1XiHNBP2tEIm+1hO2TJXNLUFkC/+iOCHO2lBobk0Hk923
 v/DQBubNGzQpEQ4CYQW9omXC5WdRrmwxj8FXkl1n5bs3+eufqEmfihRvGYYuddEmzhp4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgl-0006yR-EC
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgl-0006FO-Cg
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:35 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools: don't call make recursively from libs.mk
Message-Id: <E1kBHgl-0006FO-Cg@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:11:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 097b6fe1df89a0506a4feb1379ba5d9d14ec3a3b
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:11 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    tools: don't call make recursively from libs.mk
    
    During build of a xen library make is called again via libs.mk. This is
    not necessary as the same can be achieved by a simple dependency.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/libs/libs.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index 8045c00e9a..764f5441e2 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -45,8 +45,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 all: build
 
 .PHONY: build
-build:
-	$(MAKE) libs
+build: libs
 
 .PHONY: libs
 libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:11:48 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:11:48 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHgy-0005y2-6G; Thu, 27 Aug 2020 13:11:48 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHgw-0005xM-MQ
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:46 +0000
X-Inumbo-ID: 8f261b4a-4dcd-47c3-ad48-a3ffd7cd77dd
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 8f261b4a-4dcd-47c3-ad48-a3ffd7cd77dd;
 Thu, 27 Aug 2020 13:11:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=bdjcLNehHMzhKLIIGGuxdcM/0Hwsipf9ZH7WCPotyaE=; b=FcfyXIIQgzIX10a6dOn0SfodVA
 B+s8Zf+j1xZq7B3OaHcSGFvLL0qYGlP5RDmNKcJtBnwPkvOCiQ6jMZ6YX2qJMIyG3cYGfkPqfXtlQ
 YGVqdDjW8pCfJ5oR8I5eaMfNkic3xRX1gR04MJbaA5vI84+YHWfvLwbXJ3EBKzCm5Jr0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgv-0006zF-Hp
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHgv-0006G1-Gv
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:45 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools: define ROUNDUP() in
 tools/include/xen-tools/libs.h
Message-Id: <E1kBHgv-0006G1-Gv@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:11:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 09bf2917046f78a5f0b42da771602bb4ef5dcc09
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:11 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    tools: define ROUNDUP() in tools/include/xen-tools/libs.h
    
    Today there are multiple copies of the ROUNDUP() macro in various
    sources and headers. Define it once in tools/include/xen-tools/libs.h.
    
    Using xen-tools/libs.h enables removing copies of MIN() and MAX(), too.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/console/daemon/io.c        | 6 +-----
 tools/include/xen-tools/libs.h   | 4 ++++
 tools/libs/call/buffer.c         | 3 +--
 tools/libs/foreignmemory/linux.c | 3 +--
 tools/libs/gnttab/private.h      | 3 ---
 tools/libxc/xg_private.h         | 1 -
 tools/libxl/libxl_internal.h     | 3 ---
 tools/xenstore/xenstored_core.c  | 2 --
 8 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index a43c57edad..4af27ffc5d 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -49,9 +49,7 @@
 #include <sys/ioctl.h>
 #include <libutil.h>
 #endif
-
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#include <xen-tools/libs.h>
 
 /* Each 10 bits takes ~ 3 digits, plus one, plus one for nul terminator. */
 #define MAX_STRLEN(x) ((sizeof(x) * CHAR_BIT + CHAR_BIT-1) / 10 * 3 + 2)
@@ -80,8 +78,6 @@ static struct pollfd  *fds;
 static unsigned int current_array_size;
 static unsigned int nr_fds;
 
-#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
-
 struct buffer {
 	char *data;
 	size_t consumed;
diff --git a/tools/include/xen-tools/libs.h b/tools/include/xen-tools/libs.h
index cc7dfc8c64..a16e0c3807 100644
--- a/tools/include/xen-tools/libs.h
+++ b/tools/include/xen-tools/libs.h
@@ -59,4 +59,8 @@
     })
 #endif
 
+#ifndef ROUNDUP
+#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
+#endif
+
 #endif	/* __XEN_TOOLS_LIBS__ */
diff --git a/tools/libs/call/buffer.c b/tools/libs/call/buffer.c
index 0b6af2db60..085674d882 100644
--- a/tools/libs/call/buffer.c
+++ b/tools/libs/call/buffer.c
@@ -16,14 +16,13 @@
 #include <errno.h>
 #include <string.h>
 #include <pthread.h>
+#include <xen-tools/libs.h>
 
 #include "private.h"
 
 #define DBGPRINTF(_m...) \
     xtl_log(xcall->logger, XTL_DEBUG, -1, "xencall:buffer", _m)
 
-#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
-
 pthread_mutex_t cache_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void cache_lock(xencall_handle *xcall)
diff --git a/tools/libs/foreignmemory/linux.c b/tools/libs/foreignmemory/linux.c
index 8daa5828e3..fe73d5ab72 100644
--- a/tools/libs/foreignmemory/linux.c
+++ b/tools/libs/foreignmemory/linux.c
@@ -25,11 +25,10 @@
 
 #include <sys/mman.h>
 #include <sys/ioctl.h>
+#include <xen-tools/libs.h>
 
 #include "private.h"
 
-#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
-
 #ifndef O_CLOEXEC
 #define O_CLOEXEC 0
 #endif
diff --git a/tools/libs/gnttab/private.h b/tools/libs/gnttab/private.h
index c5e23639b1..eb6a6abe54 100644
--- a/tools/libs/gnttab/private.h
+++ b/tools/libs/gnttab/private.h
@@ -5,9 +5,6 @@
 #include <xentoolcore_internal.h>
 #include <xengnttab.h>
 
-/* Set of macros/defines used by both Linux and FreeBSD */
-#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
-
 #define GTERROR(_l, _f...) xtl_log(_l, XTL_ERROR, errno, "gnttab", _f)
 #define GSERROR(_l, _f...) xtl_log(_l, XTL_ERROR, errno, "gntshr", _f)
 
diff --git a/tools/libxc/xg_private.h b/tools/libxc/xg_private.h
index f0a4b2c616..40b5baecde 100644
--- a/tools/libxc/xg_private.h
+++ b/tools/libxc/xg_private.h
@@ -95,7 +95,6 @@ typedef uint64_t x86_pgentry_t;
 #define PAGE_SIZE_X86           (1UL << PAGE_SHIFT_X86)
 #define PAGE_MASK_X86           (~(PAGE_SIZE_X86-1))
 
-#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 #define NRPAGES(x) (ROUNDUP(x, PAGE_SHIFT) >> PAGE_SHIFT)
 
 
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 94a23179d3..c63d0686fd 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -132,9 +132,6 @@
 #define MB(_mb)     (_AC(_mb, ULL) << 20)
 #define GB(_gb)     (_AC(_gb, ULL) << 30)
 
-#define ROUNDUP(_val, _order)                                           \
-    (((unsigned long)(_val)+(1UL<<(_order))-1) & ~((1UL<<(_order))-1))
-
 #define DIV_ROUNDUP(n, d) (((n) + (d) - 1) / (d))
 
 #define MASK_EXTR(v, m) (((v) & (m)) / ((m) & -(m)))
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 7bd959f28b..9700772d40 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -73,8 +73,6 @@ static unsigned int nr_fds;
 static int sock = -1;
 static int ro_sock = -1;
 
-#define ROUNDUP(_x, _w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
-
 static bool verbose = false;
 LIST_HEAD(connections);
 int tracefd = -1;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:11:58 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:11:58 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHh8-0005z4-7l; Thu, 27 Aug 2020 13:11:58 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHh6-0005yu-UX
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:56 +0000
X-Inumbo-ID: ada728ec-408a-4d0c-b323-bf6f7a2ebfca
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ada728ec-408a-4d0c-b323-bf6f7a2ebfca;
 Thu, 27 Aug 2020 13:11:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=VctpCQtP6V+I0gri3JO68zMGNRM1mhb7YdhMAT5LSK0=; b=k8cAiSJPWKm0CCAdEiDpNH+1Jy
 5Bc/E/Lqq4BjNtt7G4MBdiwYy6mJQnZVHuTHOa+B1tfXIzNRcvkv2wbNLedE3brCs698G+fKJjrCx
 Px9hKN3tUUVTOdlHsa3hOMnMll3w7ymxbfNGnxQ1i7ely4LzxeMDQWkYcJPiMsIFRZfU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHh5-0006zR-LI
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:55 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHh5-0006Gb-KH
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:11:55 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools: generate most contents of library make variables
Message-Id: <E1kBHh5-0006Gb-KH@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:11:55 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ded08cdfa72bb1555a2beb5c4300dedb1f830358
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:11 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    tools: generate most contents of library make variables
    
    Library related make variables (CFLAGS_lib*, SHDEPS_lib*, LDLIBS_lib*
    and SHLIB_lib*) mostly have a common pattern for their values. Generate
    most of this content automatically by adding a new per-library variable
    defining on which other libraries a lib is depending. Those definitions
    are put into an own file in order to make it possible to include it
    from various Makefiles, especially for stubdom.
    
    This in turn makes it possible to drop the USELIB variable from each
    library Makefile.
    
    The LIBNAME variable can be dropped, too, as it can be derived from the
    directory name the library is residing in.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/Rules.mk                    | 59 ++++++++-------------------------------
 tools/libs/call/Makefile          |  2 --
 tools/libs/devicemodel/Makefile   |  2 --
 tools/libs/evtchn/Makefile        |  2 --
 tools/libs/foreignmemory/Makefile |  2 --
 tools/libs/gnttab/Makefile        |  2 --
 tools/libs/hypfs/Makefile         |  2 --
 tools/libs/libs.mk                |  8 +++---
 tools/libs/toolcore/Makefile      |  1 -
 tools/libs/toollog/Makefile       |  1 -
 tools/libs/uselibs.mk             | 18 ++++++++++++
 11 files changed, 34 insertions(+), 65 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 5d699cfd39..7e019a8a65 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -12,14 +12,9 @@ INSTALL = $(XEN_ROOT)/tools/cross-install
 LDFLAGS += $(PREPEND_LDFLAGS_XEN_TOOLS)
 
 XEN_INCLUDE        = $(XEN_ROOT)/tools/include
-XEN_libxentoolcore = $(XEN_ROOT)/tools/libs/toolcore
-XEN_libxentoollog  = $(XEN_ROOT)/tools/libs/toollog
-XEN_libxenevtchn   = $(XEN_ROOT)/tools/libs/evtchn
-XEN_libxengnttab   = $(XEN_ROOT)/tools/libs/gnttab
-XEN_libxencall     = $(XEN_ROOT)/tools/libs/call
-XEN_libxenforeignmemory = $(XEN_ROOT)/tools/libs/foreignmemory
-XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel
-XEN_libxenhypfs    = $(XEN_ROOT)/tools/libs/hypfs
+
+include $(XEN_ROOT)/tools/libs/uselibs.mk
+
 XEN_libxenctrl     = $(XEN_ROOT)/tools/libxc
 # Currently libxenguest lives in the same directory as libxenctrl
 XEN_libxenguest    = $(XEN_libxenctrl)
@@ -99,45 +94,15 @@ endif
 # Consumers of libfoo should not directly use $(SHDEPS_libfoo) or
 # $(SHLIB_libfoo)
 
-CFLAGS_libxentoollog = -I$(XEN_libxentoollog)/include $(CFLAGS_xeninclude)
-SHDEPS_libxentoollog =
-LDLIBS_libxentoollog = $(SHDEPS_libxentoollog) $(XEN_libxentoollog)/libxentoollog$(libextension)
-SHLIB_libxentoollog  = $(SHDEPS_libxentoollog) -Wl,-rpath-link=$(XEN_libxentoollog)
-
-CFLAGS_libxentoolcore = -I$(XEN_libxentoolcore)/include $(CFLAGS_xeninclude)
-SHDEPS_libxentoolcore =
-LDLIBS_libxentoolcore = $(SHDEPS_libxentoolcore) $(XEN_libxentoolcore)/libxentoolcore$(libextension)
-SHLIB_libxentoolcore  = $(SHDEPS_libxentoolcore) -Wl,-rpath-link=$(XEN_libxentoolcore)
-
-CFLAGS_libxenevtchn = -I$(XEN_libxenevtchn)/include $(CFLAGS_xeninclude)
-SHDEPS_libxenevtchn = $(SHLIB_libxentoolcore)
-LDLIBS_libxenevtchn = $(SHDEPS_libxenevtchn) $(XEN_libxenevtchn)/libxenevtchn$(libextension)
-SHLIB_libxenevtchn  = $(SHDEPS_libxenevtchn) -Wl,-rpath-link=$(XEN_libxenevtchn)
-
-CFLAGS_libxengnttab = -I$(XEN_libxengnttab)/include $(CFLAGS_xeninclude)
-SHDEPS_libxengnttab = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore)
-LDLIBS_libxengnttab = $(SHDEPS_libxengnttab) $(XEN_libxengnttab)/libxengnttab$(libextension)
-SHLIB_libxengnttab  = $(SHDEPS_libxengnttab) -Wl,-rpath-link=$(XEN_libxengnttab)
-
-CFLAGS_libxencall = -I$(XEN_libxencall)/include $(CFLAGS_xeninclude)
-SHDEPS_libxencall = $(SHLIB_libxentoolcore)
-LDLIBS_libxencall = $(SHDEPS_libxencall) $(XEN_libxencall)/libxencall$(libextension)
-SHLIB_libxencall  = $(SHDEPS_libxencall) -Wl,-rpath-link=$(XEN_libxencall)
-
-CFLAGS_libxenforeignmemory = -I$(XEN_libxenforeignmemory)/include $(CFLAGS_xeninclude)
-SHDEPS_libxenforeignmemory = $(SHLIB_libxentoolcore)
-LDLIBS_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) $(XEN_libxenforeignmemory)/libxenforeignmemory$(libextension)
-SHLIB_libxenforeignmemory  = $(SHDEPS_libxenforeignmemory) -Wl,-rpath-link=$(XEN_libxenforeignmemory)
-
-CFLAGS_libxendevicemodel = -I$(XEN_libxendevicemodel)/include $(CFLAGS_xeninclude)
-SHDEPS_libxendevicemodel = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall)
-LDLIBS_libxendevicemodel = $(SHDEPS_libxendevicemodel) $(XEN_libxendevicemodel)/libxendevicemodel$(libextension)
-SHLIB_libxendevicemodel  = $(SHDEPS_libxendevicemodel) -Wl,-rpath-link=$(XEN_libxendevicemodel)
-
-CFLAGS_libxenhypfs = -I$(XEN_libxenhypfs)/include $(CFLAGS_xeninclude)
-SHDEPS_libxenhypfs = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall)
-LDLIBS_libxenhypfs = $(SHDEPS_libxenhypfs) $(XEN_libxenhypfs)/libxenhypfs$(libextension)
-SHLIB_libxenhypfs  = $(SHDEPS_libxenhypfs) -Wl,-rpath-link=$(XEN_libxenhypfs)
+define LIB_defs =
+ XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)
+ CFLAGS_libxen$(1) = -I$$(XEN_libxen$(1))/include $$(CFLAGS_xeninclude)
+ SHDEPS_libxen$(1) = $$(foreach use,$$(USELIBS_$(1)),$$(SHLIB_libxen$$(use)))
+ LDLIBS_libxen$(1) = $$(SHDEPS_libxen$(1)) $$(XEN_libxen$(1))/libxen$(1)$$(libextension)
+ SHLIB_libxen$(1) = $$(SHDEPS_libxen$(1)) -Wl,-rpath-link=$$(XEN_libxen$(1))
+endef
+
+$(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(lib))))
 
 # code which compiles against libxenctrl get __XEN_TOOLS__ and
 # therefore sees the unstable hypercall interfaces.
diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile
index 7994b411fa..81c7478efd 100644
--- a/tools/libs/call/Makefile
+++ b/tools/libs/call/Makefile
@@ -3,8 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
 MINOR    = 2
-LIBNAME  := call
-USELIBS  := toollog toolcore
 
 SRCS-y                 += core.c buffer.c
 SRCS-$(CONFIG_Linux)   += linux.c
diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
index d9d1d1b850..42417958f2 100644
--- a/tools/libs/devicemodel/Makefile
+++ b/tools/libs/devicemodel/Makefile
@@ -3,8 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
 MINOR    = 3
-LIBNAME  := devicemodel
-USELIBS  := toollog toolcore call
 
 SRCS-y                 += core.c
 SRCS-$(CONFIG_Linux)   += linux.c
diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile
index d7aa4d402f..aec76641e8 100644
--- a/tools/libs/evtchn/Makefile
+++ b/tools/libs/evtchn/Makefile
@@ -3,8 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
 MINOR    = 1
-LIBNAME  := evtchn
-USELIBS  := toollog toolcore
 
 SRCS-y                 += core.c
 SRCS-$(CONFIG_Linux)   += linux.c
diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile
index 823989681d..cf444d3c1a 100644
--- a/tools/libs/foreignmemory/Makefile
+++ b/tools/libs/foreignmemory/Makefile
@@ -3,8 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
 MINOR    = 3
-LIBNAME  := foreignmemory
-USELIBS  := toollog toolcore
 
 SRCS-y                 += core.c
 SRCS-$(CONFIG_Linux)   += linux.c
diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile
index c0fffdac71..d8d4d55e27 100644
--- a/tools/libs/gnttab/Makefile
+++ b/tools/libs/gnttab/Makefile
@@ -3,8 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
 MINOR    = 2
-LIBNAME  := gnttab
-USELIBS  := toollog toolcore
 
 SRCS-GNTTAB            += gnttab_core.c
 SRCS-GNTSHR            += gntshr_core.c
diff --git a/tools/libs/hypfs/Makefile b/tools/libs/hypfs/Makefile
index b4c41f6189..668d68853f 100644
--- a/tools/libs/hypfs/Makefile
+++ b/tools/libs/hypfs/Makefile
@@ -3,8 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
 MINOR    = 0
-LIBNAME  := hypfs
-USELIBS  := toollog toolcore call
 
 APPEND_LDFLAGS += -lz
 
diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index 764f5441e2..19efc5e743 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -1,18 +1,18 @@
 # Common Makefile for building a lib.
 #
 # Variables taken as input:
-#   LIBNAME: name of lib to build, will be prepended with "libxen"
 #   MAJOR:   major version of lib
 #   MINOR:   minor version of lib
-#   USELIBS: xen libs to use (e.g. "toolcore toollog")
+
+LIBNAME := $(notdir $(CURDIR))
 
 SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map
 
 CFLAGS   += -Werror -Wmissing-prototypes
 CFLAGS   += -I./include $(CFLAGS_xeninclude)
-CFLAGS   += $(foreach lib, $(USELIBS), $(CFLAGS_libxen$(lib)))
+CFLAGS   += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib)))
 
-LDUSELIBS = $(foreach lib, $(USELIBS), $(LDLIBS_libxen$(lib)))
+LDUSELIBS = $(foreach lib, $(USELIBS_$(LIBNAME)), $(LDLIBS_libxen$(lib)))
 
 LIB_OBJS := $(SRCS-y:.c=.o)
 PIC_OBJS := $(SRCS-y:.c=.opic)
diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile
index 85ff2b26fd..34b08a4236 100644
--- a/tools/libs/toolcore/Makefile
+++ b/tools/libs/toolcore/Makefile
@@ -3,7 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR	= 1
 MINOR	= 0
-LIBNAME  := toolcore
 AUTOINCS := include/_xentoolcore_list.h
 
 SRCS-y	+= handlereg.c
diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile
index 2d3ae4e627..3f986835d6 100644
--- a/tools/libs/toollog/Makefile
+++ b/tools/libs/toollog/Makefile
@@ -3,7 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR	= 1
 MINOR	= 0
-LIBNAME  := toollog
 
 SRCS-y	+= xtl_core.c
 SRCS-y	+= xtl_logger_stdio.c
diff --git a/tools/libs/uselibs.mk b/tools/libs/uselibs.mk
new file mode 100644
index 0000000000..db73fe314e
--- /dev/null
+++ b/tools/libs/uselibs.mk
@@ -0,0 +1,18 @@
+# Libraries below tools/libs/ and their dependencies
+
+LIBS_LIBS += toolcore
+USELIBS_toolcore :=
+LIBS_LIBS += toollog
+USELIBS_toollog :=
+LIBS_LIBS += evtchn
+USELIBS_evtchn := toollog toolcore
+LIBS_LIBS += gnttab
+USELIBS_gnttab := toollog toolcore
+LIBS_LIBS += call
+USELIBS_call := toollog toolcore
+LIBS_LIBS += foreignmemory
+USELIBS_foreignmemory := toollog toolcore
+LIBS_LIBS += devicemodel
+USELIBS_devicemodel := toollog toolcore call
+LIBS_LIBS += hypfs
+USELIBS_hypfs := toollog toolcore call
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:12:08 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:12:08 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHhI-000606-9R; Thu, 27 Aug 2020 13:12:08 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHhG-0005zw-Sy
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:12:06 +0000
X-Inumbo-ID: 124a0209-ffbd-48ce-a96d-89675b7a2b02
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 124a0209-ffbd-48ce-a96d-89675b7a2b02;
 Thu, 27 Aug 2020 13:12:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=EiKfrFV70Arj+dLimNs96uLrRri6+yLzFFouOqd4894=; b=6kQzdT//0sYMFw+Fi9aflBfFH2
 lvEOkSL3SdA1p3hKF3APLvZXQERQKxiTo8ON+gU/nSFtiJyIOluJkNABzXwjzQPOO3t/pnhiCz27I
 46YDSyy37aMSTARJ00JePOxbR0ww2KF4hY2nAQZPk/tNPuweG5yreWlMmfYR4w9KjqM0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHhF-0006zm-OF
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:12:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHhF-0006IC-NX
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:12:05 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] stubdom: add correct dependencies for Xen libraries
Message-Id: <E1kBHhF-0006IC-NX@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:12:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit ddb2934a914df26762c45f0b114fa358a045e0ee
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:11 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    stubdom: add correct dependencies for Xen libraries
    
    The stubdom Makefile is missing several dependencies between Xen
    libraries. Add them.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 stubdom/Makefile | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index af8cde41b9..a95212e363 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -23,6 +23,13 @@ endif
 
 -include $(XEN_ROOT)/config/Stubdom.mk
 
+include $(XEN_ROOT)/tools/libs/uselibs.mk
+
+define LIB_deps =
+ LIBDEPS_$(1) = $$(foreach use,$$(USELIBS_$(1)),libxen$$(use))
+endef
+$(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_deps,$(lib))))
+
 GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH)
 ifeq ($(XEN_TARGET_ARCH),x86_32)
 GNU_TARGET_ARCH:=i686
@@ -387,6 +394,7 @@ $(TARGETS_MINIOS): mini-os-%:
 
 .PHONY: libxentoolcore
 libxentoolcore: libs-$(XEN_TARGET_ARCH)/toolcore/libxentoolcore.a
+libs-$(XEN_TARGET_ARCH)/toolcore/libxentoolcore.a: $(LIBDEPS_toolcore)
 libs-$(XEN_TARGET_ARCH)/toolcore/libxentoolcore.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/toolcore
 
@@ -396,6 +404,7 @@ libs-$(XEN_TARGET_ARCH)/toolcore/libxentoolcore.a: mk-headers-$(XEN_TARGET_ARCH)
 
 .PHONY: libxentoollog
 libxentoollog: libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a
+libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a: $(LIBDEPS_toollog)
 libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/toollog
 
@@ -405,6 +414,7 @@ libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a: mk-headers-$(XEN_TARGET_ARCH) $
 
 .PHONY: libxenevtchn
 libxenevtchn: libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a
+libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: $(LIBDEPS_evtchn)
 libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/evtchn
 
@@ -414,6 +424,7 @@ libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: mk-headers-$(XEN_TARGET_ARCH) $(N
 
 .PHONY: libxengnttab
 libxengnttab: libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a
+libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: $(LIBDEPS_gnttab)
 libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/gnttab
 
@@ -423,6 +434,7 @@ libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: mk-headers-$(XEN_TARGET_ARCH) $(N
 
 .PHONY: libxencall
 libxencall: libs-$(XEN_TARGET_ARCH)/call/libxencall.a
+libs-$(XEN_TARGET_ARCH)/call/libxencall.a: $(LIBDEPS_call)
 libs-$(XEN_TARGET_ARCH)/call/libxencall.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/call
 
@@ -432,6 +444,7 @@ libs-$(XEN_TARGET_ARCH)/call/libxencall.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLI
 
 .PHONY: libxenforeignmemory
 libxenforeignmemory: libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a
+libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: $(LIBDEPS_foreignmemory)
 libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/foreignmemory
 
@@ -441,6 +454,7 @@ libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: mk-headers-$(XEN_TA
 
 .PHONY: libxendevicemodel
 libxendevicemodel: libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a
+libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: $(LIBDEPS_devicemodel)
 libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/devicemodel
 
@@ -450,7 +464,7 @@ libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: mk-headers-$(XEN_TARGET
 
 .PHONY: libxc
 libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a
-libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: mk-headers-$(XEN_TARGET_ARCH) libxentoolcore libxentoollog libxenevtchn libxengnttab libxencall libxenforeignmemory libxendevicemodel cross-zlib
+libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: mk-headers-$(XEN_TARGET_ARCH) libxentoollog libxenevtchn libxengnttab libxencall libxenforeignmemory libxendevicemodel cross-zlib
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libxc-$(XEN_TARGET_ARCH)
 
  libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:12:18 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:12:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBHhS-00061J-CZ; Thu, 27 Aug 2020 13:12:18 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBHhR-00061A-1b
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:12:17 +0000
X-Inumbo-ID: 150d82d1-19af-468e-ac8c-5db297f4441e
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 150d82d1-19af-468e-ac8c-5db297f4441e;
 Thu, 27 Aug 2020 13:12:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=Ly8wN5wBDfSAAsB/EtQfbEo0nD9H4pVPC142Lhy+Huc=; b=EhEzyVMeZyJwi0+wsQh4skmW/7
 9iv160FSOEsMoSw04wdEjXkKE8jyrNdsz6DuxEMyCgJf8ETMGHk0Sh4EfNGRaqX4BuFW4sIA8v1hO
 NOyrmv5ViJ6GWvIs3HR/3GJ1RvSsYUbfZz0oLG49SZxzSL5XNUysuSaVwBy2aB0vyzM4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHhP-0006zs-SD
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:12:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBHhP-0006Jg-QJ
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:12:15 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] stubdom: simplify building xen libraries for stubdoms
Message-Id: <E1kBHhP-0006Jg-QJ@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:12:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 0de9cbf9cfeedbd2a2e4719a2faa6084f0fcbb52
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:12 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 12:59:46 2020 +0000

    stubdom: simplify building xen libraries for stubdoms
    
    The pattern for building a Xen library with sources under tools/libs
    is always the same. Simplify stubdom/Makefile by defining a callable
    make program for those libraries.
    
    Even if not needed right now add the possibility for defining
    additional dependencies for a library.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 stubdom/Makefile | 120 +++++++++++--------------------------------------------
 1 file changed, 24 insertions(+), 96 deletions(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index a95212e363..4fd86dd44b 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -327,6 +327,16 @@ ioemu/linkfarm.stamp:
 	touch ioemu/linkfarm.stamp
 endif
 
+#######
+# libraries under tools/libs
+#######
+
+STUB_LIBS := toolcore toollog evtchn gnttab call foreignmemory devicemodel
+
+#######
+# common handling
+#######
+
 define do_links
   mkdir -p $(dir $@)include
   cd $(dir $@); \
@@ -337,26 +347,21 @@ define do_links
   touch $@
 endef
 
-libs-$(XEN_TARGET_ARCH)/toolcore/stamp: $(XEN_ROOT)/tools/libs/toolcore/Makefile
-	$(do_links)
-
-libs-$(XEN_TARGET_ARCH)/toollog/stamp: $(XEN_ROOT)/tools/libs/toollog/Makefile
-	$(do_links)
+define BUILD_lib
+ .PHONY: libxen$(1) clean-libxen$(1)
+ libxen$(1): libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a
+ libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: $$(LIBDEPS_$(1)) $$(LIBDEP_$(1))
+ libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: mk-headers-$$(XEN_TARGET_ARCH) $$(NEWLIB_STAMPFILE)
+	CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libs-$$(XEN_TARGET_ARCH)/$(1)
 
-libs-$(XEN_TARGET_ARCH)/evtchn/stamp: $(XEN_ROOT)/tools/libs/evtchn/Makefile
-	$(do_links)
+ clean-libxen$(1):
+	[ ! -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile ] || $$(MAKE) DESTDIR= -C libs-$$(XEN_TARGET_ARCH)/$(1) clean
 
-libs-$(XEN_TARGET_ARCH)/gnttab/stamp: $(XEN_ROOT)/tools/libs/gnttab/Makefile
-	$(do_links)
-
-libs-$(XEN_TARGET_ARCH)/call/stamp: $(XEN_ROOT)/tools/libs/call/Makefile
-	$(do_links)
-
-libs-$(XEN_TARGET_ARCH)/foreignmemory/stamp: $(XEN_ROOT)/tools/libs/foreignmemory/Makefile
-	$(do_links)
+ libs-$$(XEN_TARGET_ARCH)/$(1)/stamp: $$(XEN_ROOT)/tools/libs/$(1)/Makefile
+	$$(do_links)
+endef
 
-libs-$(XEN_TARGET_ARCH)/devicemodel/stamp: $(XEN_ROOT)/tools/libs/devicemodel/Makefile
-	$(do_links)
+$(foreach lib,$(STUB_LIBS),$(eval $(call BUILD_lib,$(lib))))
 
 libxc-$(XEN_TARGET_ARCH)/stamp: $(XEN_ROOT)/tools/libxc/Makefile
 	$(do_links)
@@ -364,8 +369,7 @@ libxc-$(XEN_TARGET_ARCH)/stamp: $(XEN_ROOT)/tools/libxc/Makefile
 xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile
 	$(do_links)
 
-LINK_LIBS_DIRS := toolcore toollog evtchn gnttab call foreignmemory devicemodel
-LINK_DIRS := libxc-$(XEN_TARGET_ARCH) xenstore $(foreach dir,$(LINK_LIBS_DIRS),libs-$(XEN_TARGET_ARCH)/$(dir))
+LINK_DIRS := libxc-$(XEN_TARGET_ARCH) xenstore $(foreach dir,$(STUB_LIBS),libs-$(XEN_TARGET_ARCH)/$(dir))
 LINK_STAMPS := $(foreach dir,$(LINK_DIRS),$(dir)/stamp)
 
 mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET) $(LINK_STAMPS)
@@ -388,76 +392,6 @@ $(TARGETS_MINIOS): mini-os-%:
                 mkdir -p $@/$$i ; \
 	done
 
-#######
-# libxentoolcore
-#######
-
-.PHONY: libxentoolcore
-libxentoolcore: libs-$(XEN_TARGET_ARCH)/toolcore/libxentoolcore.a
-libs-$(XEN_TARGET_ARCH)/toolcore/libxentoolcore.a: $(LIBDEPS_toolcore)
-libs-$(XEN_TARGET_ARCH)/toolcore/libxentoolcore.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/toolcore
-
-#######
-# libxentoollog
-#######
-
-.PHONY: libxentoollog
-libxentoollog: libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a
-libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a: $(LIBDEPS_toollog)
-libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/toollog
-
-#######
-# libxenevtchn
-#######
-
-.PHONY: libxenevtchn
-libxenevtchn: libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a
-libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: $(LIBDEPS_evtchn)
-libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/evtchn
-
-#######
-# libxengnttab
-#######
-
-.PHONY: libxengnttab
-libxengnttab: libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a
-libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: $(LIBDEPS_gnttab)
-libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/gnttab
-
-#######
-# libxencall
-#######
-
-.PHONY: libxencall
-libxencall: libs-$(XEN_TARGET_ARCH)/call/libxencall.a
-libs-$(XEN_TARGET_ARCH)/call/libxencall.a: $(LIBDEPS_call)
-libs-$(XEN_TARGET_ARCH)/call/libxencall.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/call
-
-#######
-# libxenforeignmemory
-#######
-
-.PHONY: libxenforeignmemory
-libxenforeignmemory: libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a
-libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: $(LIBDEPS_foreignmemory)
-libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/foreignmemory
-
-#######
-# libxendevicemodel
-#######
-
-.PHONY: libxendevicemodel
-libxendevicemodel: libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a
-libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: $(LIBDEPS_devicemodel)
-libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/devicemodel
-
 #######
 # libxc
 #######
@@ -672,6 +606,7 @@ uninstall-vtpmmgr:
 
 # Only clean the libxc/ioemu/mini-os part
 .PHONY: clean
+clean: $(foreach lib,$(STUB_LIBS),clean-libxen$(lib))
 clean:
 	rm -fr mini-os-$(XEN_TARGET_ARCH)-ioemu
 	rm -fr mini-os-$(XEN_TARGET_ARCH)-c
@@ -688,13 +623,6 @@ clean:
 	rm -f $(STUBDOMPATH)
 	rm -f *-minios-config.mk
 	rm -fr pkg-config
-	[ ! -e libs-$(XEN_TARGET_ARCH)/toolcore/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/toolcore clean
-	[ ! -e libs-$(XEN_TARGET_ARCH)/toollog/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/toollog clean
-	[ ! -e libs-$(XEN_TARGET_ARCH)/evtchn/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/evtchn clean
-	[ ! -e libs-$(XEN_TARGET_ARCH)/gnttab/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/gnttab clean
-	[ ! -e libs-$(XEN_TARGET_ARCH)/call/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/call clean
-	[ ! -e libs-$(XEN_TARGET_ARCH)/foreignmemory/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/foreignmemory clean
-	[ ! -e libs-$(XEN_TARGET_ARCH)/devicemodel/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/devicemodel clean
 	[ ! -e libxc-$(XEN_TARGET_ARCH)/Makefile ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean
 	-[ ! -d ioemu ] || $(MAKE) DESTDIR= -C ioemu clean
 	-[ ! -d xenstore ] || $(MAKE) DESTDIR= -C xenstore clean
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:44:08 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:44:08 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBICD-0000HT-72; Thu, 27 Aug 2020 13:44:05 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBICC-0000HO-3P
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:04 +0000
X-Inumbo-ID: a81b14a3-a653-4aef-b27f-22447f076d22
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id a81b14a3-a653-4aef-b27f-22447f076d22;
 Thu, 27 Aug 2020 13:44:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=4ASRf5itNPgJZbx3txXQS6gZBRF2G3vJm5BHliTay6A=; b=DE+V3br3ZTPOwD6lTCEKvWKBut
 sYxne4JdPMRNyj1I/sGzBV2Widr4sEJZ7fjJfAxSwJPyKsArWT9slp9l2Puo4k/5jEyIHCNI+HkB1
 JyM9hJqTSfNbJGADnjWg9eh9euhkdfAv6aWcJ4oaY9YpAi4iOQwDlRtJUtQ+2T3BCp3E=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICA-0007dH-Te
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICA-0008OU-SE
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:02 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [mini-os master] mini-os: console.c: Rename static variable from buf
 to __print_buf
Message-Id: <E1kBICA-0008OU-SE@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 816701f213678809c48713037d6e1bd459f2927c
Author:     Costin Lupu <costin.lupu@cs.pub.ro>
AuthorDate: Tue Aug 18 16:44:06 2020 +0300
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 13:38:34 2020 +0000

    mini-os: console.c: Rename static variable from buf to __print_buf
    
    lwip soure code also has a static variable called 'buf' in ip_frag.c. This can
    get confusing when inspecting the binary (e.g. with objdump or something
    similar). Therefore this patch renames the 'buf' variable used by print()
    function to '__print_buf'.
    
    Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 console/console.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/console/console.c b/console/console.c
index 9ddae9d..af1a6dd 100644
--- a/console/console.c
+++ b/console/console.c
@@ -122,21 +122,21 @@ void console_print(struct consfront_dev *dev, char *data, int length)
 
 void print(int direct, const char *fmt, va_list args)
 {
-    static char   buf[1024];
+    static char __print_buf[1024];
     
-    (void)vsnprintf(buf, sizeof(buf), fmt, args);
+    (void)vsnprintf(__print_buf, sizeof(__print_buf), fmt, args);
 
     if(direct)
     {
-        (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf);
+        (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(__print_buf), __print_buf);
         return;
     } else {
 #ifndef CONFIG_USE_XEN_CONSOLE
     if(!console_initialised)
 #endif    
-            (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf);
+            (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(__print_buf), __print_buf);
         
-        console_print(NULL, buf, strlen(buf));
+        console_print(NULL, __print_buf, strlen(__print_buf));
     }
 }
 
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:44:15 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:44:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBICN-0000I2-8p; Thu, 27 Aug 2020 13:44:15 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBICM-0000Ht-B4
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:14 +0000
X-Inumbo-ID: 7804ac83-9d1d-45cc-a015-2f3fc8e42f1e
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 7804ac83-9d1d-45cc-a015-2f3fc8e42f1e;
 Thu, 27 Aug 2020 13:44:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=zSAo426BO7rVV5gmSpf2AHBN0e3LrwSiKmlKliqIzIU=; b=EtnOkdEI/AM64hOMLtronYWxa2
 cCRq7uWrMU95oG4dkpA6ZARFbgFSmbG4VWP5Y2TC/eNYMOajxVm2aQgR/SuguA/D4FeqMtytXx8NS
 49O53yF2l/OdRjJXOfuQLnZM7NNEHgbUZ2HozcXFDYdFNiQbpSQ9W3qO1EHID5dOszGs=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICL-0007dQ-1N
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICK-0008PT-Vq
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:12 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [mini-os master] mini-os: netfront: Read netmask and gateway from
 Xenstore
Message-Id: <E1kBICK-0008PT-Vq@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 1b8ed31f4ce4001f1525aabb69c4903b58802b90
Author:     Costin Lupu <costin.lupu@cs.pub.ro>
AuthorDate: Wed Aug 19 15:49:00 2020 +0300
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 13:39:00 2020 +0000

    mini-os: netfront: Read netmask and gateway from Xenstore
    
    When providing the IP address via the config file, one can also add the
    netmask and gateway address, e.g. "ip=192.168.0.2 255.255.255.0
    192.168.0.1", which will be further published to Xenstore. This patch adds
    support for reading the netmask and gateway values.
    
    Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 include/netfront.h |  2 +-
 lwip-net.c         | 32 ++++++++++++++++++++++----------
 netfront.c         | 34 +++++++++++++++++++++++++++++-----
 3 files changed, 52 insertions(+), 16 deletions(-)

diff --git a/include/netfront.h b/include/netfront.h
index 1164d50..bc3080e 100644
--- a/include/netfront.h
+++ b/include/netfront.h
@@ -7,7 +7,7 @@ struct netfront_dev *init_netfront(char *nodename,
                                    void (*netif_rx)(unsigned char *data,
                                                     int len, void* arg),
                                    unsigned char rawmac[6],
-                                   char **ip);
+                                   char **ip, char **mask, char **gw);
 void netfront_xmit(struct netfront_dev *dev, unsigned char* data,int len);
 void shutdown_netfront(struct netfront_dev *dev);
 void suspend_netfront(void);
diff --git a/lwip-net.c b/lwip-net.c
index 449b70f..80d1c8f 100644
--- a/lwip-net.c
+++ b/lwip-net.c
@@ -343,22 +343,34 @@ void start_networking(void)
   struct ip_addr ipaddr = { htonl(IF_IPADDR) };
   struct ip_addr netmask = { htonl(IF_NETMASK) };
   struct ip_addr gw = { 0 };
-  char *ip = NULL;
+  char *ip = NULL, *netmask_str = NULL, *gw_str = NULL;
 
   tprintk("Waiting for network.\n");
 
-  dev = init_netfront(NULL, NULL, rawmac, &ip);
+  dev = init_netfront(NULL, NULL, rawmac, &ip, &netmask_str, &gw_str);
   
   if (ip) {
     ipaddr.addr = inet_addr(ip);
-    if (IN_CLASSA(ntohl(ipaddr.addr)))
-      netmask.addr = htonl(IN_CLASSA_NET);
-    else if (IN_CLASSB(ntohl(ipaddr.addr)))
-      netmask.addr = htonl(IN_CLASSB_NET);
-    else if (IN_CLASSC(ntohl(ipaddr.addr)))
-      netmask.addr = htonl(IN_CLASSC_NET);
-    else
-      tprintk("Strange IP %s, leaving netmask to 0.\n", ip);
+    free(ip);
+
+    if (netmask_str) {
+        netmask.addr = inet_addr(netmask_str);
+        free(netmask_str);
+    } else {
+        if (IN_CLASSA(ntohl(ipaddr.addr)))
+            netmask.addr = htonl(IN_CLASSA_NET);
+        else if (IN_CLASSB(ntohl(ipaddr.addr)))
+            netmask.addr = htonl(IN_CLASSB_NET);
+        else if (IN_CLASSC(ntohl(ipaddr.addr)))
+            netmask.addr = htonl(IN_CLASSC_NET);
+        else
+            tprintk("Strange IP %s, leaving netmask to 0.\n", ip);
+    }
+
+    if (gw_str) {
+        gw.addr = inet_addr(gw_str);
+        free(gw_str);
+    }
   }
   tprintk("IP %x netmask %x gateway %x.\n",
           ntohl(ipaddr.addr), ntohl(netmask.addr), ntohl(gw.addr));
diff --git a/netfront.c b/netfront.c
index 66f2bbc..58eb55e 100644
--- a/netfront.c
+++ b/netfront.c
@@ -71,6 +71,8 @@ struct netfront_dev_list {
     struct netfront_dev *dev;
     unsigned char rawmac[6];
     char *ip;
+    char *mask;
+    char *gw;
 
     int refcount;
 
@@ -81,7 +83,7 @@ static struct netfront_dev_list *dev_list = NULL;
 
 void init_rx_buffers(struct netfront_dev *dev);
 static struct netfront_dev *_init_netfront(struct netfront_dev *dev,
-                                           unsigned char rawmac[6], char **ip);
+                                           unsigned char rawmac[6], char **ip, char **mask, char **gw);
 static void _shutdown_netfront(struct netfront_dev *dev);
 void netfront_set_rx_handler(struct netfront_dev *dev,
                              void (*thenetif_rx)(unsigned char *data, int len,
@@ -301,7 +303,7 @@ struct netfront_dev *init_netfront(char *_nodename,
                                    void (*thenetif_rx)(unsigned char* data,
                                                        int len, void* arg),
                                    unsigned char rawmac[6],
-                                   char **ip)
+                                   char **ip, char **mask, char **gw)
 {
     char nodename[256];
     struct netfront_dev *dev;
@@ -344,7 +346,7 @@ struct netfront_dev *init_netfront(char *_nodename,
     ldev = malloc(sizeof(struct netfront_dev_list));
     memset(ldev, 0, sizeof(struct netfront_dev_list));
 
-    if (_init_netfront(dev, ldev->rawmac, &(ldev->ip))) {
+    if (_init_netfront(dev, ldev->rawmac, &(ldev->ip), &(ldev->mask), &(ldev->gw))) {
         ldev->dev = dev;
         ldev->refcount = 1;
         ldev->next = NULL;
@@ -374,6 +376,10 @@ out:
 	}
     if (ip)
         *ip = strdup(ldev->ip);
+    if (mask)
+        *mask = strdup(ldev->mask);
+    if (gw)
+        *gw = strdup(ldev->gw);
 
 err:
     return dev;
@@ -381,7 +387,7 @@ err:
 
 static struct netfront_dev *_init_netfront(struct netfront_dev *dev,
 					   unsigned char rawmac[6],
-					   char **ip)
+					   char **ip, char **mask, char **gw)
 {
     xenbus_transaction_t xbt;
     char* err = NULL;
@@ -518,8 +524,26 @@ done:
         }
 
         if (ip) {
+            char *p;
+
             snprintf(path, sizeof(path), "%s/ip", dev->backend);
             xenbus_read(XBT_NIL, path, ip);
+
+            if (mask) {
+                p = strchr(*ip, ' ');
+                if (p) {
+                    *p++ = '\0';
+                    *mask = p;
+
+                    if (gw) {
+                        p = strchr(p, ' ');
+                        if (p) {
+                            *p++ = '\0';
+                            *gw = p;
+                        }
+                    }
+                }
+            }
         }
     }
 
@@ -676,7 +700,7 @@ void resume_netfront(void)
     struct netfront_dev_list *list;
 
     for (list = dev_list; list != NULL; list = list->next)
-        _init_netfront(list->dev, NULL, NULL);
+        _init_netfront(list->dev, NULL, NULL, NULL, NULL);
 }
 
 void init_rx_buffers(struct netfront_dev *dev)
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:44:25 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:44:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBICX-0000JG-AP; Thu, 27 Aug 2020 13:44:25 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBICW-0000J2-3H
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:24 +0000
X-Inumbo-ID: a3440681-a937-4b8f-9e84-3d69ab00ef80
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id a3440681-a937-4b8f-9e84-3d69ab00ef80;
 Thu, 27 Aug 2020 13:44:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=CCX72krKHPpp/qiUmHpiKwaaR9SpMIh/0bffbMm5o5s=; b=Ely1Prxl9kQ+hqy1K0VLbZ6G34
 tIxv9zCGPmPktX/rs/MunzzFnYr7MXg8SbvAFBhCy8Rv1FOnRq7vTyHYNxepaoSO0+qnyhvg0GjtB
 7lFmZR/ZtGFz3WwJ5fsbDwYC+VzhG5+D/2NNTMgFp0qzn2aYzSo6WylR3fxgFCORPeMI=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICV-0007dX-4G
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICV-0008Q3-3V
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [mini-os master] mini-os: Use a single start_info_ptr variable
Message-Id: <E1kBICV-0008Q3-3V@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:44:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 5fe88e7ce9492a7a93cf21196658cca91621f4a2
Author:     Costin Lupu <costin.lupu@cs.pub.ro>
AuthorDate: Wed Aug 19 18:45:36 2020 +0300
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 13:39:20 2020 +0000

    mini-os: Use a single start_info_ptr variable
    
    The second definition of the `start_info_ptr` variable was introduced by commit
    e05eb0 which was part of a series trying to add suspend/resume support to
    mini-os. This patch removes the second definition by reverting some changes of
    the mentioned commit and of commit 892b66.
    
    However the logic in shutdown.c is still left in an inconsistent state because
    it still doesn't work for ARM. The solution should be part of a future patch.
    
    Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 arch/x86/setup.c   | 4 ++--
 include/kernel.h   | 2 +-
 include/shutdown.h | 2 +-
 kernel.c           | 4 ++--
 shutdown.c         | 8 ++++----
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/x86/setup.c b/arch/x86/setup.c
index 4fd8e39..64b22c5 100644
--- a/arch/x86/setup.c
+++ b/arch/x86/setup.c
@@ -45,7 +45,7 @@ union start_info_union start_info_union;
 /*
  * This pointer holds a reference to the copy of the start_info struct.
  */
-static start_info_t *start_info_ptr;
+start_info_t *start_info_ptr;
 
 /*
  * Shared page for communicating with the hypervisor.
@@ -221,7 +221,7 @@ arch_init(void *par)
 #endif
 	start_info_ptr = (start_info_t *)par;
 
-	start_kernel((start_info_t *)par);
+	start_kernel();
 }
 
 void arch_pre_suspend(void)
diff --git a/include/kernel.h b/include/kernel.h
index 742abf5..161d757 100644
--- a/include/kernel.h
+++ b/include/kernel.h
@@ -4,7 +4,7 @@
 #define MAX_CMDLINE_SIZE 1024
 extern char cmdline[MAX_CMDLINE_SIZE];
 
-void start_kernel(void* par);
+void start_kernel(void);
 void pre_suspend(void);
 void post_suspend(int canceled);
 void do_exit(void) __attribute__((noreturn));
diff --git a/include/shutdown.h b/include/shutdown.h
index 88993cb..ba71aeb 100644
--- a/include/shutdown.h
+++ b/include/shutdown.h
@@ -3,7 +3,7 @@
 
 #include <mini-os/hypervisor.h>
 
-void init_shutdown(start_info_t *si);
+void init_shutdown(void);
 void fini_shutdown(void);
 void kernel_suspend(void);
 
diff --git a/kernel.c b/kernel.c
index 301273d..1f97d8d 100644
--- a/kernel.c
+++ b/kernel.c
@@ -77,7 +77,7 @@ __attribute__((weak)) int app_main(void *p)
     return 0;
 }
 
-void start_kernel(void* par)
+void start_kernel(void)
 {
     /* Set up events. */
     init_events();
@@ -107,7 +107,7 @@ void start_kernel(void* par)
 
 #ifdef CONFIG_XENBUS
     /* Init shutdown thread */
-    init_shutdown((start_info_t *)par);
+    init_shutdown();
 #endif
 
     /* Call (possibly overridden) app_main() */
diff --git a/shutdown.c b/shutdown.c
index 4c0b13c..0854670 100644
--- a/shutdown.c
+++ b/shutdown.c
@@ -46,7 +46,7 @@
 #include <mini-os/xmalloc.h>
 
 
-static start_info_t *start_info_ptr;
+extern start_info_t *start_info_ptr;
 
 #ifdef CONFIG_XENBUS
 static const char *path = "control/shutdown";
@@ -111,10 +111,8 @@ static void shutdown_thread(void *p)
     }
 }
 
-void init_shutdown(start_info_t *si)
+void init_shutdown(void)
 {
-    start_info_ptr = si;
-
     end_shutdown_thread = 0;
     create_thread("shutdown", shutdown_thread, NULL);
 }
@@ -145,6 +143,8 @@ void kernel_suspend(void)
     /*
      * This hypercall returns 1 if the suspend
      * was cancelled and 0 if resuming in a new domain
+     *
+     * TODO Fix this for ARM
      */
     rc = HYPERVISOR_suspend(virt_to_mfn(start_info_ptr));
 
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Aug 27 13:44:35 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 27 Aug 2020 13:44:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBICh-0000Kh-CE; Thu, 27 Aug 2020 13:44:35 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eDg+=CF=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBICg-0000KZ-0x
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:34 +0000
X-Inumbo-ID: 857a5392-ed67-49fd-8b08-6d811ae83459
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 857a5392-ed67-49fd-8b08-6d811ae83459;
 Thu, 27 Aug 2020 13:44:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=RKBBIFe2zqQex1B3S3E2L2VRvyV5+MzUahbcXF4qmq0=; b=DIuBH0ENDdZN4A0OygJ0kV5u41
 4zQr8A09wXhmnDaKH3V6TuUS1GgPdOmep66EVYZXSDDCim34p8lcbOOZedaGVaGpaELU4TRf5x+eH
 VUwPmnutAyCJsmvjUvMJTGMr1m+XepPzjCpVsN60Ld7cpixj5UoFh8jigTNtRq46hoqU=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICf-0007dj-7m
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBICf-0008Rd-6O
 for xen-changelog@lists.xenproject.org; Thu, 27 Aug 2020 13:44:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [mini-os master] mini-os: Add suspend stubs for ARM
Message-Id: <E1kBICf-0008Rd-6O@xenbits.xenproject.org>
Date: Thu, 27 Aug 2020 13:44:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 6f458950bc266c541d9699a283ad15614e401417
Author:     Costin Lupu <costin.lupu@cs.pub.ro>
AuthorDate: Wed Aug 19 19:41:08 2020 +0300
Commit:     Wei Liu <wl@xen.org>
CommitDate: Thu Aug 27 13:39:36 2020 +0000

    mini-os: Add suspend stubs for ARM
    
    This patch introduces the missing suspend-related stubs for ARM. It also
    introduces the new arch_suspend() function in order to keep the logic in
    kernel_suspend() arch independent.
    
    Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 arch/arm/setup.c | 15 +++++++++++++++
 arch/x86/setup.c |  9 +++++++++
 include/x86/os.h |  1 +
 shutdown.c       | 10 +---------
 4 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/arch/arm/setup.c b/arch/arm/setup.c
index b65023c..3d112fa 100644
--- a/arch/arm/setup.c
+++ b/arch/arm/setup.c
@@ -53,6 +53,21 @@ arch_fini(void)
 {
 }
 
+void arch_pre_suspend(void)
+{
+}
+
+int arch_suspend(void)
+{
+    printk("Suspend not supported on ARM. Aborting.");
+    do_exit();
+    return 1;
+}
+
+void arch_post_suspend(int canceled)
+{
+}
+
 void
 arch_do_exit(void)
 {
diff --git a/arch/x86/setup.c b/arch/x86/setup.c
index 64b22c5..1ec68d3 100644
--- a/arch/x86/setup.c
+++ b/arch/x86/setup.c
@@ -249,6 +249,15 @@ void arch_pre_suspend(void)
     arch_mm_pre_suspend();
 }
 
+int arch_suspend(void)
+{
+    /*
+     * This hypercall returns 1 if the suspend
+     * was cancelled and 0 if resuming in a new domain
+     */
+    return HYPERVISOR_suspend(virt_to_mfn(start_info_ptr));
+}
+
 void arch_post_suspend(int canceled)
 {
 #if CONFIG_PARAVIRT
diff --git a/include/x86/os.h b/include/x86/os.h
index 46a824d..ee34d78 100644
--- a/include/x86/os.h
+++ b/include/x86/os.h
@@ -73,6 +73,7 @@ void xen_callback_vector(void);
 #endif
 
 void arch_pre_suspend(void);
+int  arch_suspend(void);
 void arch_post_suspend(int canceled);
 void arch_fini(void);
 
diff --git a/shutdown.c b/shutdown.c
index 0854670..bb2c6f1 100644
--- a/shutdown.c
+++ b/shutdown.c
@@ -46,8 +46,6 @@
 #include <mini-os/xmalloc.h>
 
 
-extern start_info_t *start_info_ptr;
-
 #ifdef CONFIG_XENBUS
 static const char *path = "control/shutdown";
 static const char *token = "control/shutdown";
@@ -140,13 +138,7 @@ void kernel_suspend(void)
     pre_suspend();
     arch_pre_suspend();
 
-    /*
-     * This hypercall returns 1 if the suspend
-     * was cancelled and 0 if resuming in a new domain
-     *
-     * TODO Fix this for ARM
-     */
-    rc = HYPERVISOR_suspend(virt_to_mfn(start_info_ptr));
+    rc = arch_suspend();
 
     arch_post_suspend(rc);
     post_suspend(rc);
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Aug 28 07:22:12 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 28 Aug 2020 07:22:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBYi6-00033P-AW; Fri, 28 Aug 2020 07:22:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jo+u=CG=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBYi5-00033K-RA
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 07:22:05 +0000
X-Inumbo-ID: 32373c64-3887-4820-9194-6337a03a6464
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 32373c64-3887-4820-9194-6337a03a6464;
 Fri, 28 Aug 2020 07:22:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=ua5wvgoZWZ/F7X8KwfLjaiZSH9okYvTidAgjb2F26L0=; b=pCkwMQn+zvC7QXRY8GxGb48RBP
 epKescNhYCF0Ako6gk6kk6E3NWbS14Hu+5Pg8lPpH2GUvPNOUhQEwvB0YGn16a1I9WdNwAXAOz2fH
 qu3CA+g1dy6NCt6pUGcwOdKJxwhMe8/oZkFNWDmnf91K5YHaTrTKfRPqwpg71/wLTfbA=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBYi4-0003fr-M1
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 07:22:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBYi4-0000Fw-JI
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 07:22:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] stubdom/grub: update init_netfront() call for mini-os
Message-Id: <E1kBYi4-0000Fw-JI@xenbits.xenproject.org>
Date: Fri, 28 Aug 2020 07:22:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 8d990807ec2cde3061222a5ed2df62aba78bace9
Author:     Costin Lupu <costin.lupu@cs.pub.ro>
AuthorDate: Fri Aug 28 09:17:44 2020 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Aug 28 09:17:44 2020 +0200

    stubdom/grub: update init_netfront() call for mini-os
    
    This patch updates the call of init_netfront() function according to its
    recently updated declaration which can also include parameters for gateway
    and netmask addresses. While we are here, the patch also removes passing
    the ip parameter because (a) it is not used anywhere and (b) it wastes
    memory since it would reference a dynamically allocated string.
    
    Reported-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 stubdom/grub/mini-os.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 4fc052a255..b33dbf02fb 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -291,8 +291,6 @@ struct netfront_dev *net_dev;
 int
 minios_probe (struct nic *nic)
 {
-    char *ip;
-
     if (net_dev)
         return 1;
 
@@ -300,7 +298,7 @@ minios_probe (struct nic *nic)
     grub_memset ((char *) arptable, 0,
                  MAX_ARP * sizeof (struct arptable_t));
 
-    net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, &ip);
+    net_dev = init_netfront(NULL, (void*) -1, nic->node_addr, NULL, NULL, NULL);
     if (!net_dev)
         return 0;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Aug 28 08:55:07 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 28 Aug 2020 08:55:07 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBaA3-0003iZ-Sj; Fri, 28 Aug 2020 08:55:03 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jo+u=CG=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBaA2-0003iU-LI
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 08:55:02 +0000
X-Inumbo-ID: c8a425e5-8b63-4693-8280-fec0eb264ef7
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id c8a425e5-8b63-4693-8280-fec0eb264ef7;
 Fri, 28 Aug 2020 08:55:01 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=bQqW8+7K5wdY7ZiYMi8SxlFWBeZWb+/8KgXkWc522KY=; b=vmzhYBvRi+42fo053Hba9p9TBR
 eVx68/nmXCUp3bRhyGGB63lh+qy8NJpLzjX5AGbNeDKrqDx6VjMDJHpiS0QAFvbFROUMNBxTcB+s7
 w39wNBDRWegQDljGfdvi0qhpNTU26ISVLBYY05RjeugTdDy/A1z2N5MPl5bfHCO/qPMw=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBaA1-000677-ON
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 08:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBaA1-0005ws-NM
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 08:55:01 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [mini-os master] mini-os: Fix outdated init_netfront() calls
Message-Id: <E1kBaA1-0005ws-NM@xenbits.xenproject.org>
Date: Fri, 28 Aug 2020 08:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit 6d8cc92c91cb1e7d9d2fd4cdb1500ac3b361a5ad
Author:     Costin Lupu <costin.lupu@cs.pub.ro>
AuthorDate: Thu Aug 27 19:45:36 2020 +0300
Commit:     Wei Liu <wl@xen.org>
CommitDate: Fri Aug 28 08:43:37 2020 +0000

    mini-os: Fix outdated init_netfront() calls
    
    Commit 1b8ed31f changed the init_netfront() declaration. This patch fixes a
    couple of calls that were overlooked for that initial commit.
    
    Reported-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 netfront.c | 2 +-
 test.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/netfront.c b/netfront.c
index 58eb55e..205484b 100644
--- a/netfront.c
+++ b/netfront.c
@@ -576,7 +576,7 @@ error:
 int netfront_tap_open(char *nodename) {
     struct netfront_dev *dev;
 
-    dev = init_netfront(nodename, NETIF_SELECT_RX, NULL, NULL);
+    dev = init_netfront(nodename, NETIF_SELECT_RX, NULL, NULL, NULL, NULL);
     if (!dev) {
 	printk("TAP open failed\n");
 	errno = EIO;
diff --git a/test.c b/test.c
index 42a2666..2e5f7f9 100644
--- a/test.c
+++ b/test.c
@@ -91,7 +91,7 @@ static struct semaphore net_sem = __SEMAPHORE_INITIALIZER(net_sem, 0);
 
 static void netfront_thread(void *p)
 {
-    net_dev = init_netfront(NULL, NULL, NULL, NULL);
+    net_dev = init_netfront(NULL, NULL, NULL, NULL, NULL, NULL);
     up(&net_sem);
 }
 #endif
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Aug 28 09:11:13 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 28 Aug 2020 09:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kBaPc-0005ZY-Sf; Fri, 28 Aug 2020 09:11:08 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=jo+u=CG=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kBaPa-0005ZT-SD
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 09:11:06 +0000
X-Inumbo-ID: f86258a9-131e-41c2-a6f7-548f56bb8a03
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id f86258a9-131e-41c2-a6f7-548f56bb8a03;
 Fri, 28 Aug 2020 09:11:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=sMolTGOGHjmVDnm5h1I69nVRTq5WR7ZNOVhe8uraz9s=; b=yRzyD/sfZzHliPjIfATQav7fLP
 QTPcrHfY8i+oxm1BBT1hH89xgZm0NHPqfOVc86HkDkMb8eWzTAEENRT7beJnePur2LTjqE5XOiYhZ
 G0bU93hGLKAbRxxSt3Nl1rPnXjJ2OPJcalvdlBsyjXhxrrkSfNbOatCCzNi8gzaLP20Y=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBaPY-0006Uh-Bu
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 09:11:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kBaPY-00077R-8d
 for xen-changelog@lists.xenproject.org; Fri, 28 Aug 2020 09:11:04 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] tools: tweak tools/libs/libs.mk for being able to
 support libxenctrl
Message-Id: <E1kBaPY-00077R-8d@xenbits.xenproject.org>
Date: Fri, 28 Aug 2020 09:11:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit d400dc5729e4e132d61c2e7df57d81aaed762044
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Sun Aug 23 10:00:12 2020 +0200
Commit:     Wei Liu <wl@xen.org>
CommitDate: Fri Aug 28 09:02:13 2020 +0000

    tools: tweak tools/libs/libs.mk for being able to support libxenctrl
    
    tools/libs/libs.mk needs to be modified for being able to support
    building libxenctrl, as the pkg-config file of that library is not
    following the same conventions as those of the other libraries.
    
    So add support for specifying PKG_CONFIG before including libs.mk.
    
    In order to make life easier for unstable libraries like libxenctrl
    set MAJOR and MINOR automatically to the Xen-version and 0 when not
    specified. This removes the need to bump the versions of unstable
    libraries when switching to a new Xen version.
    
    As all libraries built via libs.mk require a map file generate a dummy
    one in case there is none existing. This again will help avoiding the
    need to bump the libarary version in the map file of an unstable
    library in case it is exporting all symbols.
    
    The clean target is missing the removal of _paths.h.
    
    Finally drop the foreach loop when setting PKG_CONFIG_LOCAL, as there
    is always only one element in PKG_CONFIG.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Wei Liu <wl@xen.org>
---
 tools/libs/libs.mk | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index 19efc5e743..8b1ca2aa62 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -1,10 +1,13 @@
 # Common Makefile for building a lib.
 #
 # Variables taken as input:
-#   MAJOR:   major version of lib
-#   MINOR:   minor version of lib
+#   PKG_CONFIG: name of pkg-config file (xen$(LIBNAME).pc if empty)
+#   MAJOR:   major version of lib (Xen version if empty)
+#   MINOR:   minor version of lib (0 if empty)
 
 LIBNAME := $(notdir $(CURDIR))
+MAJOR ?= $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile)
+MINOR ?= 0
 
 SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map
 
@@ -22,7 +25,7 @@ ifneq ($(nosharedlibs),y)
 LIB += libxen$(LIBNAME).so
 endif
 
-PKG_CONFIG := xen$(LIBNAME).pc
+PKG_CONFIG ?= xen$(LIBNAME).pc
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
@@ -32,7 +35,7 @@ $(PKG_CONFIG_INST): PKG_CONFIG_INCDIR = $(includedir)
 $(PKG_CONFIG_INST): PKG_CONFIG_LIBDIR = $(libdir)
 endif
 
-PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
+PKG_CONFIG_LOCAL := $(PKG_CONFIG_DIR)/$(PKG_CONFIG)
 
 LIBHEADER ?= xen$(LIBNAME).h
 LIBHEADERS = $(foreach h, $(LIBHEADER), include/$(h))
@@ -45,7 +48,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 all: build
 
 .PHONY: build
-build: libs
+build: libs libxen$(LIBNAME).map
 
 .PHONY: libs
 libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
@@ -64,6 +67,9 @@ endif
 
 headers.chk: $(LIBHEADERSGLOB) $(AUTOINCS)
 
+libxen$(LIBNAME).map:
+	echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >$@
+
 $(LIBHEADERSGLOB): $(LIBHEADERS)
 	for i in $(realpath $(LIBHEADERS)); do ln -sf $$i $(XEN_ROOT)/tools/include; done
 
@@ -87,7 +93,7 @@ install: build
 	$(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxen$(LIBNAME).so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR) $(DESTDIR)$(libdir)/libxen$(LIBNAME).so
 	for i in $(LIBHEADERS); do $(INSTALL_DATA) $$i $(DESTDIR)$(includedir); done
-	$(INSTALL_DATA) xen$(LIBNAME).pc $(DESTDIR)$(PKG_INSTALLDIR)
+	$(INSTALL_DATA) $(PKG_CONFIG) $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: uninstall
 uninstall:
@@ -107,8 +113,9 @@ clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f libxen$(LIBNAME).so.$(MAJOR).$(MINOR) libxen$(LIBNAME).so.$(MAJOR)
 	rm -f headers.chk
-	rm -f xen$(LIBNAME).pc
+	rm -f $(PKG_CONFIG)
 	rm -f $(LIBHEADERSGLOB)
+	rm -f _paths.h
 
 .PHONY: distclean
 distclean: clean
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Aug 31 13:55:33 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 31 Aug 2020 13:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kCkHQ-0004kP-8h; Mon, 31 Aug 2020 13:55:28 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=0tOV=CJ=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kCkHP-0004jS-1z
 for xen-changelog@lists.xenproject.org; Mon, 31 Aug 2020 13:55:27 +0000
X-Inumbo-ID: e361e70d-602c-4d34-8f6d-f66e1c258dde
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id e361e70d-602c-4d34-8f6d-f66e1c258dde;
 Mon, 31 Aug 2020 13:55:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=y+CACPuj5MZzn8Yx2IP3nrxWqlcHshjeRmyD59b6WxM=; b=J0cRV/pHgsckDFZZwpC262ls0a
 hsy+LKlGOa3gL6XgPl6SPSpIgcIB4/K0OF/NLDixawvJ2g60Yr7vD/o4WGN+zCBWBCMRZtBrPE9wj
 rSlfZVAuSnKf2utlLFYX8OD1arKHNrMGkJIH3ZaOEKozmhuP3Bmg4JlSjZ8oJnWiKn+4=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kCkHL-0007Y7-BA
 for xen-changelog@lists.xenproject.org; Mon, 31 Aug 2020 13:55:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kCkHL-0001cU-8i
 for xen-changelog@lists.xenproject.org; Mon, 31 Aug 2020 13:55:23 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/intel: Expose MSR_ARCH_CAPS to dom0
Message-Id: <E1kCkHL-0001cU-8i@xenbits.xenproject.org>
Date: Mon, 31 Aug 2020 13:55:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit e46474278a0e87e2b32ad5dd5fc20e8d2cb0688b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 10 16:25:40 2018 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Aug 31 13:43:26 2020 +0100

    x86/intel: Expose MSR_ARCH_CAPS to dom0
    
    The overhead of (the lack of) MDS_NO alone has been measured at 30% on some
    workloads.  While we're not in a position yet to offer MSR_ARCH_CAPS generally
    to guests, dom0 doesn't migrate, so we can pass a subset of hardware values
    straight through.
    
    This will cause PVH dom0's not to use KPTI by default, and all dom0's not to
    use VERW flushing by default, and to use eIBRS in preference to retpoline on
    recent Intel CPUs.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpuid.c |  8 ++++++++
 xen/arch/x86/msr.c   | 16 ++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 63a03ef1e5..4b424fac95 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -719,6 +719,14 @@ int init_domain_cpuid_policy(struct domain *d)
     if ( d->disable_migrate )
         p->extd.itsc = cpu_has_itsc;
 
+    /*
+     * Expose the "hardware speculation behaviour" bits of ARCH_CAPS to dom0,
+     * so dom0 can turn off workarounds as appropriate.  Temporary, until the
+     * domain policy logic gains a better understanding of MSRs.
+     */
+    if ( is_hardware_domain(d) && boot_cpu_has(X86_FEATURE_ARCH_CAPS) )
+        p->feat.arch_caps = true;
+
     d->arch.cpuid = p;
 
     recalculate_cpuid_policy(d);
diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c
index c3862033eb..a478b91f23 100644
--- a/xen/arch/x86/msr.c
+++ b/xen/arch/x86/msr.c
@@ -130,6 +130,22 @@ int init_domain_msr_policy(struct domain *d)
     if ( !opt_dom0_cpuid_faulting && is_control_domain(d) && is_pv_domain(d) )
         mp->platform_info.cpuid_faulting = false;
 
+    /*
+     * Expose the "hardware speculation behaviour" bits of ARCH_CAPS to dom0,
+     * so dom0 can turn off workarounds as appropriate.  Temporary, until the
+     * domain policy logic gains a better understanding of MSRs.
+     */
+    if ( is_hardware_domain(d) && boot_cpu_has(X86_FEATURE_ARCH_CAPS) )
+    {
+        uint64_t val;
+
+        rdmsrl(MSR_ARCH_CAPABILITIES, val);
+
+        mp->arch_caps.raw = val &
+            (ARCH_CAPS_RDCL_NO | ARCH_CAPS_IBRS_ALL | ARCH_CAPS_RSBA |
+             ARCH_CAPS_SSB_NO | ARCH_CAPS_MDS_NO | ARCH_CAPS_TAA_NO);
+    }
+
     d->arch.msr = mp;
 
     return 0;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Aug 31 13:55:35 2020
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 31 Aug 2020 13:55:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1kCkHX-0004kw-AC; Mon, 31 Aug 2020 13:55:35 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=0tOV=CJ=eu.citrix.com=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1kCkHW-0004kq-Qh
 for xen-changelog@lists.xenproject.org; Mon, 31 Aug 2020 13:55:34 +0000
X-Inumbo-ID: e49e2a59-4197-4f8c-9ef8-d95db5004536
Received: from mail.xenproject.org (unknown [104.130.215.37])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id e49e2a59-4197-4f8c-9ef8-d95db5004536;
 Mon, 31 Aug 2020 13:55:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
 s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
 bh=c1qJ4Z8u234MuGtmkIGvGrvQZ31BVGVNOqC01SZ1njk=; b=rMy6ceYz9Bf5qcmraJktDjICAx
 3o5m/k1o/9JbQYRINzoFcAT8vvOPVQky3VrpE+qP7tERPlJeuFdQYLFLcUgE4L86Y+47TMFKgqpLI
 GG3Rpz93qAxszlEnG/5ChR0AhL2qpuPZGZgEwBxGnBY0pS5OojubCl7AcG1RRLWSUpb0=;
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kCkHV-0007YA-Ph
 for xen-changelog@lists.xenproject.org; Mon, 31 Aug 2020 13:55:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1kCkHV-0001ln-MK
 for xen-changelog@lists.xenproject.org; Mon, 31 Aug 2020 13:55:33 +0000
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Subject: [xen staging] x86/pv: Fix multiple bugs with SEGBASE_GS_USER_SEL
Message-Id: <E1kCkHV-0001ln-MK@xenbits.xenproject.org>
Date: Mon, 31 Aug 2020 13:55:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Reply-To: xen-devel@lists.xenproject.org
Errors-To: xen-changelog-bounces@lists.xenproject.org
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>

commit afe018e041ec112d90a8b4e6ed607d22aa06f280
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 12:18:42 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Aug 31 14:21:46 2020 +0100

    x86/pv: Fix multiple bugs with SEGBASE_GS_USER_SEL
    
    The logic takes the segment selector unmodified from guest context.  This
    allowed the guest to load DPL0 descriptors into %gs.  Fix up the RPL for
    non-NUL selectors to be 3.
    
    Xen's context switch logic skips saving the inactive %gs base, as it cannot be
    modified by the guest behind Xen's back.  This depends on Xen caching updates
    to the inactive base, which is was missing from this path.
    
    The consequence is that, following SEGBASE_GS_USER_SEL, the next context
    switch will restore the stale inactive %gs base, and corrupt vcpu state.
    
    Rework the hypercall to update the cached idea of gs_base_user, and fix the
    behaviour in the case of the AMD NUL selector bug to always zero the segment
    base.
    
    Reported-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/x86_64/mm.c | 57 +++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 47 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 29048d34dc..28bc98f8f2 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -1059,17 +1059,54 @@ long do_set_segment_base(unsigned int which, unsigned long base)
         break;
 
     case SEGBASE_GS_USER_SEL:
-        __asm__ __volatile__ (
-            "     swapgs              \n"
-            "1:   movl %k0,%%gs       \n"
-            "    "safe_swapgs"        \n"
-            ".section .fixup,\"ax\"   \n"
-            "2:   xorl %k0,%k0        \n"
-            "     jmp  1b             \n"
-            ".previous                \n"
-            _ASM_EXTABLE(1b, 2b)
-            : "+r" (base) );
+    {
+        unsigned int sel = (uint16_t)base;
+
+        /*
+         * We wish to update the user %gs from the GDT/LDT.  Currently, the
+         * guest kernel's GS_BASE is in context.
+         */
+        asm volatile ( "swapgs" );
+
+        if ( sel > 3 )
+            /* Fix up RPL for non-NUL selectors. */
+            sel |= 3;
+        else if ( boot_cpu_data.x86_vendor &
+                  (X86_VENDOR_AMD | X86_VENDOR_HYGON) )
+            /* Work around NUL segment behaviour on AMD hardware. */
+            asm volatile ( "mov %[sel], %%gs"
+                           :: [sel] "r" (FLAT_USER_DS32) );
+
+        /*
+         * Load the chosen selector, with fault handling.
+         *
+         * Errors ought to fail the hypercall, but that was never built in
+         * originally, and Linux will BUG() if this call fails.
+         *
+         * NUL the selector in the case of an error.  This too needs to deal
+         * with the AMD NUL segment behaviour, but it is already a slowpath in
+         * #GP context so perform the flat load unconditionally to avoid
+         * complicated logic.
+         *
+         * Anyone wanting to check for errors from this hypercall should
+         * re-read %gs and compare against the input.
+         */
+        asm volatile ( "1: mov %[sel], %%gs\n\t"
+                       ".section .fixup, \"ax\", @progbits\n\t"
+                       "2: mov %k[flat], %%gs\n\t"
+                       "   xor %[sel], %[sel]\n\t"
+                       "   jmp 1b\n\t"
+                       ".previous\n\t"
+                       _ASM_EXTABLE(1b, 2b)
+                       : [sel] "+r" (sel)
+                       : [flat] "r" (FLAT_USER_DS32) );
+
+        /* Update the cache of the inactive base, as read from the GDT/LDT. */
+        v->arch.pv.gs_base_user = rdgsbase();
+
+        asm volatile ( safe_swapgs );
         break;
+    }
 
     default:
         ret = -EINVAL;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


