xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH 3/5] x86/build: restrict contents of asm-offsets.h when !HVM / !PV
Date: Wed, 25 Nov 2020 09:49:54 +0100	[thread overview]
Message-ID: <d41ce371-262f-747a-9f6d-e5ab85a93aa5@suse.com> (raw)
In-Reply-To: <46d83c92-0b06-fc09-4832-7a7d7935d5c2@suse.com>

This file has a long dependencies list (through asm-offsets.[cs]) and a
long list of dependents. IOW if any of the former changes, all of the
latter will be rebuilt, even if there's no actual change to the
generated file. Therefore avoid producing symbols we don't actually
need, depending on configuration.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/x86_64/asm-offsets.c
+++ b/xen/arch/x86/x86_64/asm-offsets.c
@@ -84,6 +84,7 @@ void __dummy__(void)
     DEFINE(_VGCF_syscall_disables_events,  _VGCF_syscall_disables_events);
     BLANK();
 
+#ifdef CONFIG_HVM
     OFFSET(VCPU_svm_vmcb_pa, struct vcpu, arch.hvm.svm.vmcb_pa);
     OFFSET(VCPU_svm_vmcb, struct vcpu, arch.hvm.svm.vmcb);
     BLANK();
@@ -99,6 +100,7 @@ void __dummy__(void)
     OFFSET(VCPU_nhvm_p2m, struct vcpu, arch.hvm.nvcpu.nv_p2m);
     OFFSET(VCPU_nsvm_hap_enabled, struct vcpu, arch.hvm.nvcpu.u.nsvm.ns_hap_enabled);
     BLANK();
+#endif
 
 #ifdef CONFIG_PV
     OFFSET(DOMAIN_is_32bit_pv, struct domain, arch.pv.is_32bit);
@@ -128,6 +130,7 @@ void __dummy__(void)
     DEFINE(CPUINFO_sizeof, sizeof(struct cpu_info));
     BLANK();
 
+#ifdef CONFIG_PV
     OFFSET(TRAPINFO_eip, struct trap_info, address);
     OFFSET(TRAPINFO_cs, struct trap_info, cs);
     OFFSET(TRAPINFO_flags, struct trap_info, flags);
@@ -139,6 +142,7 @@ void __dummy__(void)
     OFFSET(TRAPBOUNCE_cs, struct trap_bounce, cs);
     OFFSET(TRAPBOUNCE_eip, struct trap_bounce, eip);
     BLANK();
+#endif
 
     OFFSET(VCPUMSR_spec_ctrl_raw, struct vcpu_msrs, spec_ctrl.raw);
     BLANK();



  parent reply	other threads:[~2020-11-25  8:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25  8:42 [PATCH 0/5] x86: asm-offsets.h and !PV32 adjustments Jan Beulich
2020-11-25  8:45 ` [PATCH 1/5] x86/build: limit rebuilding of asm-offsets.h Jan Beulich
2020-12-28 12:00   ` Roger Pau Monné
2021-01-04 13:46     ` Jan Beulich
2020-11-25  8:49 ` [PATCH 2/5] x86/build: limit #include-ing by asm-offsets.c Jan Beulich
2020-12-28 12:54   ` Roger Pau Monné
2021-01-04 13:48     ` Jan Beulich
2020-11-25  8:49 ` Jan Beulich [this message]
2020-12-28 13:07   ` [PATCH 3/5] x86/build: restrict contents of asm-offsets.h when !HVM / !PV Roger Pau Monné
2020-11-25  8:50 ` [PATCH 4/5] x86: hypercall vector is unused when !PV32 Jan Beulich
2020-12-28 13:37   ` Roger Pau Monné
2020-11-25  8:51 ` [PATCH 5/5] x86: don't build unused entry code " Jan Beulich
2020-12-28 15:30   ` Roger Pau Monné
2021-01-04 13:56     ` Jan Beulich
2021-01-04 15:53       ` Roger Pau Monné
2021-01-04 16:11         ` Jan Beulich
2021-04-01  7:51         ` Ping: " Jan Beulich
2021-04-01 14:01   ` Roger Pau Monné
2021-04-01 14:20     ` Jan Beulich
2021-04-06  9:52     ` Jan Beulich
2021-04-01 14:31   ` Andrew Cooper
2021-04-01 14:37     ` Jan Beulich
2021-04-06 17:34       ` Andrew Cooper
2021-04-07  7:54         ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d41ce371-262f-747a-9f6d-e5ab85a93aa5@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).