Re: [PATCH v3 40/75] x86/sev-es: Compile early handler code into kernel image

2020-06-11 Thread Joerg Roedel
On Thu, Jun 04, 2020 at 05:19:53PM +0200, Borislav Petkov wrote: > On Thu, Jun 04, 2020 at 01:54:13PM +0200, Joerg Roedel wrote: > > It is not only the trace-point, this would also eliminate exception > > handling in case the MSR access triggers a #GP. The "Unhandled MSR > > read/write" messages

Re: [PATCH v3 40/75] x86/sev-es: Compile early handler code into kernel image

2020-06-04 Thread Borislav Petkov
On Thu, Jun 04, 2020 at 01:54:13PM +0200, Joerg Roedel wrote: > It is not only the trace-point, this would also eliminate exception > handling in case the MSR access triggers a #GP. The "Unhandled MSR > read/write" messages would turn into a "General Protection Fault" > message. But the early

Re: [PATCH v3 40/75] x86/sev-es: Compile early handler code into kernel image

2020-06-04 Thread Joerg Roedel
On Wed, May 20, 2020 at 11:14:15AM +0200, Borislav Petkov wrote: > On Tue, Apr 28, 2020 at 05:16:50PM +0200, Joerg Roedel wrote: > > +static inline u64 sev_es_rd_ghcb_msr(void) > > +{ > > + return native_read_msr(MSR_AMD64_SEV_ES_GHCB); > > +} > > + > > +static inline void sev_es_wr_ghcb_msr(u64

Re: [PATCH v3 40/75] x86/sev-es: Compile early handler code into kernel image

2020-05-20 Thread Borislav Petkov
On Tue, Apr 28, 2020 at 05:16:50PM +0200, Joerg Roedel wrote: > +static inline u64 sev_es_rd_ghcb_msr(void) > +{ > + return native_read_msr(MSR_AMD64_SEV_ES_GHCB); > +} > + > +static inline void sev_es_wr_ghcb_msr(u64 val) > +{ > + u32 low, high; > + > + low = (u32)(val); > + high

[PATCH v3 40/75] x86/sev-es: Compile early handler code into kernel image

2020-04-28 Thread Joerg Roedel
From: Joerg Roedel Setup sev-es.c and include the code from the pre-decompression stage to also build it into the image of the running kernel. Temporarily add __maybe_unused annotations to avoid build warnings until the functions get used. Signed-off-by: Joerg Roedel ---