mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Andrew Cooper <amc96@srcf.net>,
	xen-devel@lists.xenproject.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Cc: peterz@infradead.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 1/2] xen: make HYPERVISOR_get_debugreg() always_inline
Date: Thu, 25 Nov 2021 16:04:11 +0100	[thread overview]
Message-ID: <c4a1657b-2904-0d10-3a95-07b84062eb52@suse.com> (raw)
In-Reply-To: <3c922d47-9eab-5150-f4c6-3db40a77599a@srcf.net>


[-- Attachment #1.1.1: Type: text/plain, Size: 1465 bytes --]

On 25.11.21 16:00, Andrew Cooper wrote:
> On 25/11/2021 09:20, Juergen Gross wrote:
>> HYPERVISOR_get_debugreg() is being called from noinstr code, so it
>> should be attributed "always_inline".
>>
>> Fixes: f4afb713e5c3a4419ba ("x86/xen: Make get_debugreg() noinstr")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>   arch/x86/include/asm/xen/hypercall.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
>> index 0575f5863b7f..28ca1119606b 100644
>> --- a/arch/x86/include/asm/xen/hypercall.h
>> +++ b/arch/x86/include/asm/xen/hypercall.h
>> @@ -287,7 +287,7 @@ HYPERVISOR_set_debugreg(int reg, unsigned long value)
>>   	return _hypercall2(int, set_debugreg, reg, value);
>>   }
>>   
>> -static inline unsigned long
>> +static __always_inline unsigned long
>>   HYPERVISOR_get_debugreg(int reg)
>>   {
>>   	return _hypercall1(unsigned long, get_debugreg, reg);
> 
> All this is going to do is push the error one step further in.
> 
> Next, objtool will complain that hypercall_page isn't noinstr.

I don't think so:

.pushsection .noinstr.text, "ax"
         .balign PAGE_SIZE
SYM_CODE_START(hypercall_page)
         .rept (PAGE_SIZE / 32)
                 UNWIND_HINT_FUNC
                 .skip 31, 0x90
                 ret
         .endr


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2021-11-25 15:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25  9:20 [PATCH 0/2] xen: make debugreg accessors always_inline Juergen Gross
2021-11-25  9:20 ` [PATCH 1/2] xen: make HYPERVISOR_get_debugreg() always_inline Juergen Gross
2021-11-25 15:00   ` Andrew Cooper
2021-11-25 15:04     ` Juergen Gross [this message]
2021-11-25 15:41       ` Andrew Cooper
2021-11-25  9:20 ` [PATCH 2/2] xen: make HYPERVISOR_set_debugreg() always_inline Juergen Gross
2021-11-25 15:39 ` [PATCH 0/2] xen: make debugreg accessors always_inline Boris Ostrovsky
2021-11-26 15:16 ` Boris Ostrovsky

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=c4a1657b-2904-0d10-3a95-07b84062eb52@suse.com \
    --to=jgross@suse.com \
    --cc=amc96@srcf.net \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sstabellini@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®