License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2008-06-28 01:58:02 +08:00
|
|
|
#ifndef ASM_KVM_CACHE_REGS_H
|
|
|
|
#define ASM_KVM_CACHE_REGS_H
|
|
|
|
|
2018-12-04 05:52:54 +08:00
|
|
|
#include <linux/kvm_host.h>
|
|
|
|
|
2023-03-22 09:37:31 +08:00
|
|
|
#define KVM_POSSIBLE_CR0_GUEST_BITS (X86_CR0_TS | X86_CR0_WP)
|
2010-01-21 21:31:51 +08:00
|
|
|
#define KVM_POSSIBLE_CR4_GUEST_BITS \
|
|
|
|
(X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \
|
2020-09-30 12:16:59 +08:00
|
|
|
| X86_CR4_OSXMMEXCPT | X86_CR4_PGE | X86_CR4_TSD | X86_CR4_FSGSBASE)
|
2010-01-21 21:31:51 +08:00
|
|
|
|
2021-11-08 20:43:58 +08:00
|
|
|
#define X86_CR0_PDPTR_BITS (X86_CR0_CD | X86_CR0_NW | X86_CR0_PG)
|
2021-11-08 20:43:56 +08:00
|
|
|
#define X86_CR4_TLBFLUSH_BITS (X86_CR4_PGE | X86_CR4_PCIDE | X86_CR4_PAE | X86_CR4_SMEP)
|
2021-11-08 20:43:57 +08:00
|
|
|
#define X86_CR4_PDPTR_BITS (X86_CR4_PGE | X86_CR4_PSE | X86_CR4_PAE | X86_CR4_SMEP)
|
2021-11-08 20:43:56 +08:00
|
|
|
|
2021-11-08 20:43:58 +08:00
|
|
|
static_assert(!(KVM_POSSIBLE_CR0_GUEST_BITS & X86_CR0_PDPTR_BITS));
|
|
|
|
|
2019-05-01 01:36:17 +08:00
|
|
|
#define BUILD_KVM_GPR_ACCESSORS(lname, uname) \
|
|
|
|
static __always_inline unsigned long kvm_##lname##_read(struct kvm_vcpu *vcpu)\
|
|
|
|
{ \
|
|
|
|
return vcpu->arch.regs[VCPU_REGS_##uname]; \
|
|
|
|
} \
|
|
|
|
static __always_inline void kvm_##lname##_write(struct kvm_vcpu *vcpu, \
|
|
|
|
unsigned long val) \
|
|
|
|
{ \
|
|
|
|
vcpu->arch.regs[VCPU_REGS_##uname] = val; \
|
|
|
|
}
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(rax, RAX)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(rbx, RBX)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(rcx, RCX)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(rdx, RDX)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(rbp, RBP)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(rsi, RSI)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(rdi, RDI)
|
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r8, R8)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r9, R9)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r10, R10)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r11, R11)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r12, R12)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r13, R13)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r14, R14)
|
|
|
|
BUILD_KVM_GPR_ACCESSORS(r15, R15)
|
|
|
|
#endif
|
|
|
|
|
2021-11-26 20:00:15 +08:00
|
|
|
/*
|
|
|
|
* avail dirty
|
|
|
|
* 0 0 register in VMCS/VMCB
|
|
|
|
* 0 1 *INVALID*
|
|
|
|
* 1 0 register in vcpu->arch
|
|
|
|
* 1 1 register in vcpu->arch, needs to be stored back
|
|
|
|
*/
|
2021-01-23 07:50:48 +08:00
|
|
|
static inline bool kvm_register_is_available(struct kvm_vcpu *vcpu,
|
|
|
|
enum kvm_reg reg)
|
|
|
|
{
|
|
|
|
return test_bit(reg, (unsigned long *)&vcpu->arch.regs_avail);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool kvm_register_is_dirty(struct kvm_vcpu *vcpu,
|
|
|
|
enum kvm_reg reg)
|
|
|
|
{
|
|
|
|
return test_bit(reg, (unsigned long *)&vcpu->arch.regs_dirty);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void kvm_register_mark_available(struct kvm_vcpu *vcpu,
|
|
|
|
enum kvm_reg reg)
|
|
|
|
{
|
|
|
|
__set_bit(reg, (unsigned long *)&vcpu->arch.regs_avail);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void kvm_register_mark_dirty(struct kvm_vcpu *vcpu,
|
|
|
|
enum kvm_reg reg)
|
|
|
|
{
|
|
|
|
__set_bit(reg, (unsigned long *)&vcpu->arch.regs_avail);
|
|
|
|
__set_bit(reg, (unsigned long *)&vcpu->arch.regs_dirty);
|
|
|
|
}
|
|
|
|
|
2022-12-13 14:09:06 +08:00
|
|
|
/*
|
|
|
|
* kvm_register_test_and_mark_available() is a special snowflake that uses an
|
|
|
|
* arch bitop directly to avoid the explicit instrumentation that comes with
|
|
|
|
* the generic bitops. This allows code that cannot be instrumented (noinstr
|
|
|
|
* functions), e.g. the low level VM-Enter/VM-Exit paths, to cache registers.
|
|
|
|
*/
|
|
|
|
static __always_inline bool kvm_register_test_and_mark_available(struct kvm_vcpu *vcpu,
|
|
|
|
enum kvm_reg reg)
|
|
|
|
{
|
|
|
|
return arch___test_and_set_bit(reg, (unsigned long *)&vcpu->arch.regs_avail);
|
|
|
|
}
|
|
|
|
|
2021-04-22 10:21:28 +08:00
|
|
|
/*
|
|
|
|
* The "raw" register helpers are only for cases where the full 64 bits of a
|
|
|
|
* register are read/written irrespective of current vCPU mode. In other words,
|
|
|
|
* odds are good you shouldn't be using the raw variants.
|
|
|
|
*/
|
|
|
|
static inline unsigned long kvm_register_read_raw(struct kvm_vcpu *vcpu, int reg)
|
2008-06-28 01:58:02 +08:00
|
|
|
{
|
2019-09-28 05:45:20 +08:00
|
|
|
if (WARN_ON_ONCE((unsigned int)reg >= NR_VCPU_REGS))
|
|
|
|
return 0;
|
|
|
|
|
2019-09-28 05:45:22 +08:00
|
|
|
if (!kvm_register_is_available(vcpu, reg))
|
2021-01-15 11:27:56 +08:00
|
|
|
static_call(kvm_x86_cache_reg)(vcpu, reg);
|
2008-06-28 01:58:02 +08:00
|
|
|
|
|
|
|
return vcpu->arch.regs[reg];
|
|
|
|
}
|
|
|
|
|
2021-04-22 10:21:28 +08:00
|
|
|
static inline void kvm_register_write_raw(struct kvm_vcpu *vcpu, int reg,
|
|
|
|
unsigned long val)
|
2008-06-28 01:58:02 +08:00
|
|
|
{
|
2019-09-28 05:45:20 +08:00
|
|
|
if (WARN_ON_ONCE((unsigned int)reg >= NR_VCPU_REGS))
|
|
|
|
return;
|
|
|
|
|
2008-06-28 01:58:02 +08:00
|
|
|
vcpu->arch.regs[reg] = val;
|
2019-09-28 05:45:22 +08:00
|
|
|
kvm_register_mark_dirty(vcpu, reg);
|
2008-06-28 01:58:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline unsigned long kvm_rip_read(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
2021-04-22 10:21:28 +08:00
|
|
|
return kvm_register_read_raw(vcpu, VCPU_REGS_RIP);
|
2008-06-28 01:58:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void kvm_rip_write(struct kvm_vcpu *vcpu, unsigned long val)
|
|
|
|
{
|
2021-04-22 10:21:28 +08:00
|
|
|
kvm_register_write_raw(vcpu, VCPU_REGS_RIP, val);
|
2008-06-28 01:58:02 +08:00
|
|
|
}
|
|
|
|
|
2019-05-01 04:07:26 +08:00
|
|
|
static inline unsigned long kvm_rsp_read(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
2021-04-22 10:21:28 +08:00
|
|
|
return kvm_register_read_raw(vcpu, VCPU_REGS_RSP);
|
2019-05-01 04:07:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void kvm_rsp_write(struct kvm_vcpu *vcpu, unsigned long val)
|
|
|
|
{
|
2021-04-22 10:21:28 +08:00
|
|
|
kvm_register_write_raw(vcpu, VCPU_REGS_RSP, val);
|
2019-05-01 04:07:26 +08:00
|
|
|
}
|
|
|
|
|
2009-06-01 03:58:47 +08:00
|
|
|
static inline u64 kvm_pdptr_read(struct kvm_vcpu *vcpu, int index)
|
|
|
|
{
|
2010-05-04 18:00:55 +08:00
|
|
|
might_sleep(); /* on svm */
|
|
|
|
|
2019-09-28 05:45:22 +08:00
|
|
|
if (!kvm_register_is_available(vcpu, VCPU_EXREG_PDPTR))
|
2021-01-15 11:27:56 +08:00
|
|
|
static_call(kvm_x86_cache_reg)(vcpu, VCPU_EXREG_PDPTR);
|
2009-06-01 03:58:47 +08:00
|
|
|
|
2010-09-10 23:30:57 +08:00
|
|
|
return vcpu->arch.walk_mmu->pdptrs[index];
|
2009-06-01 03:58:47 +08:00
|
|
|
}
|
|
|
|
|
2021-06-07 17:02:02 +08:00
|
|
|
static inline void kvm_pdptr_write(struct kvm_vcpu *vcpu, int index, u64 value)
|
|
|
|
{
|
|
|
|
vcpu->arch.walk_mmu->pdptrs[index] = value;
|
|
|
|
}
|
|
|
|
|
2009-12-30 00:07:30 +08:00
|
|
|
static inline ulong kvm_read_cr0_bits(struct kvm_vcpu *vcpu, ulong mask)
|
|
|
|
{
|
2010-01-21 21:31:51 +08:00
|
|
|
ulong tmask = mask & KVM_POSSIBLE_CR0_GUEST_BITS;
|
2020-05-02 12:32:31 +08:00
|
|
|
if ((tmask & vcpu->arch.cr0_guest_owned_bits) &&
|
|
|
|
!kvm_register_is_available(vcpu, VCPU_EXREG_CR0))
|
2021-01-15 11:27:56 +08:00
|
|
|
static_call(kvm_x86_cache_reg)(vcpu, VCPU_EXREG_CR0);
|
2009-12-30 00:07:30 +08:00
|
|
|
return vcpu->arch.cr0 & mask;
|
|
|
|
}
|
|
|
|
|
2023-03-22 12:58:21 +08:00
|
|
|
static __always_inline bool kvm_is_cr0_bit_set(struct kvm_vcpu *vcpu,
|
|
|
|
unsigned long cr0_bit)
|
|
|
|
{
|
|
|
|
BUILD_BUG_ON(!is_power_of_2(cr0_bit));
|
|
|
|
|
|
|
|
return !!kvm_read_cr0_bits(vcpu, cr0_bit);
|
|
|
|
}
|
|
|
|
|
2009-12-30 00:07:30 +08:00
|
|
|
static inline ulong kvm_read_cr0(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
|
|
|
return kvm_read_cr0_bits(vcpu, ~0UL);
|
|
|
|
}
|
|
|
|
|
2009-12-07 18:16:48 +08:00
|
|
|
static inline ulong kvm_read_cr4_bits(struct kvm_vcpu *vcpu, ulong mask)
|
|
|
|
{
|
2010-01-21 21:31:51 +08:00
|
|
|
ulong tmask = mask & KVM_POSSIBLE_CR4_GUEST_BITS;
|
2020-05-02 12:32:30 +08:00
|
|
|
if ((tmask & vcpu->arch.cr4_guest_owned_bits) &&
|
|
|
|
!kvm_register_is_available(vcpu, VCPU_EXREG_CR4))
|
2021-01-15 11:27:56 +08:00
|
|
|
static_call(kvm_x86_cache_reg)(vcpu, VCPU_EXREG_CR4);
|
2009-12-07 18:16:48 +08:00
|
|
|
return vcpu->arch.cr4 & mask;
|
|
|
|
}
|
|
|
|
|
2023-03-22 12:58:21 +08:00
|
|
|
static __always_inline bool kvm_is_cr4_bit_set(struct kvm_vcpu *vcpu,
|
|
|
|
unsigned long cr4_bit)
|
|
|
|
{
|
|
|
|
BUILD_BUG_ON(!is_power_of_2(cr4_bit));
|
|
|
|
|
|
|
|
return !!kvm_read_cr4_bits(vcpu, cr4_bit);
|
|
|
|
}
|
|
|
|
|
2010-12-05 23:30:00 +08:00
|
|
|
static inline ulong kvm_read_cr3(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
2019-09-28 05:45:22 +08:00
|
|
|
if (!kvm_register_is_available(vcpu, VCPU_EXREG_CR3))
|
2021-01-15 11:27:56 +08:00
|
|
|
static_call(kvm_x86_cache_reg)(vcpu, VCPU_EXREG_CR3);
|
2010-12-05 23:30:00 +08:00
|
|
|
return vcpu->arch.cr3;
|
|
|
|
}
|
|
|
|
|
2009-12-07 18:16:48 +08:00
|
|
|
static inline ulong kvm_read_cr4(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
|
|
|
return kvm_read_cr4_bits(vcpu, ~0UL);
|
|
|
|
}
|
|
|
|
|
2010-06-10 11:27:12 +08:00
|
|
|
static inline u64 kvm_read_edx_eax(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
2019-05-01 01:36:17 +08:00
|
|
|
return (kvm_rax_read(vcpu) & -1u)
|
|
|
|
| ((u64)(kvm_rdx_read(vcpu) & -1u) << 32);
|
2010-06-10 11:27:12 +08:00
|
|
|
}
|
|
|
|
|
2010-11-30 00:51:47 +08:00
|
|
|
static inline void enter_guest_mode(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
|
|
|
vcpu->arch.hflags |= HF_GUEST_MASK;
|
2021-06-10 02:03:39 +08:00
|
|
|
vcpu->stat.guest_mode = 1;
|
2010-11-30 00:51:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void leave_guest_mode(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
|
|
|
vcpu->arch.hflags &= ~HF_GUEST_MASK;
|
KVM: nVMX: Do not load EOI-exitmap while running L2
When L1 IOAPIC redirection-table is written, a request of
KVM_REQ_SCAN_IOAPIC is set on all vCPUs. This is done such that
all vCPUs will now recalc their IOAPIC handled vectors and load
it to their EOI-exitmap.
However, it could be that one of the vCPUs is currently running
L2. In this case, load_eoi_exitmap() will be called which would
write to vmcs02->eoi_exit_bitmap, which is wrong because
vmcs02->eoi_exit_bitmap should always be equal to
vmcs12->eoi_exit_bitmap. Furthermore, at this point
KVM_REQ_SCAN_IOAPIC was already consumed and therefore we will
never update vmcs01->eoi_exit_bitmap. This could lead to remote_irr
of some IOAPIC level-triggered entry to remain set forever.
Fix this issue by delaying the load of EOI-exitmap to when vCPU
is running L1.
One may wonder why not just delay entire KVM_REQ_SCAN_IOAPIC
processing to when vCPU is running L1. This is done in order to handle
correctly the case where LAPIC & IO-APIC of L1 is pass-throughed into
L2. In this case, vmcs12->virtual_interrupt_delivery should be 0. In
current nVMX implementation, that results in
vmcs02->virtual_interrupt_delivery to also be 0. Thus,
vmcs02->eoi_exit_bitmap is not used. Therefore, every L2 EOI cause
a #VMExit into L0 (either on MSR_WRITE to x2APIC MSR or
APIC_ACCESS/APIC_WRITE/EPT_MISCONFIG to APIC MMIO page).
In order for such L2 EOI to be broadcasted, if needed, from LAPIC
to IO-APIC, vcpu->arch.ioapic_handled_vectors must be updated
while L2 is running. Therefore, patch makes sure to delay only the
loading of EOI-exitmap but not the update of
vcpu->arch.ioapic_handled_vectors.
Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-03-21 08:50:31 +08:00
|
|
|
|
|
|
|
if (vcpu->arch.load_eoi_exitmap_pending) {
|
|
|
|
vcpu->arch.load_eoi_exitmap_pending = false;
|
|
|
|
kvm_make_request(KVM_REQ_LOAD_EOI_EXITMAP, vcpu);
|
|
|
|
}
|
2021-06-10 02:03:39 +08:00
|
|
|
|
|
|
|
vcpu->stat.guest_mode = 0;
|
2010-11-30 00:51:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool is_guest_mode(struct kvm_vcpu *vcpu)
|
|
|
|
{
|
|
|
|
return vcpu->arch.hflags & HF_GUEST_MASK;
|
|
|
|
}
|
|
|
|
|
2008-06-28 01:58:02 +08:00
|
|
|
#endif
|