diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-10-07 18:16:57 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-13 10:47:49 +0200 |
commit | 773ab6cb16b34272dc7eb8171824924c38dbeb90 (patch) | |
tree | 2391e8e768ad205c994719dfa4da3520e71dd337 /target/i386 | |
parent | 02310f3a91470575a103857222d3a6e8acea338e (diff) | |
download | qemu-773ab6cb16b34272dc7eb8171824924c38dbeb90.zip qemu-773ab6cb16b34272dc7eb8171824924c38dbeb90.tar.gz qemu-773ab6cb16b34272dc7eb8171824924c38dbeb90.tar.bz2 |
target/i386/kvm: Restrict SEV stubs to x86 architecture
SEV is x86-specific, no need to add its stub to other
architectures. Move the stub file to target/i386/kvm/.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211007161716.453984-5-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386')
-rw-r--r-- | target/i386/kvm/meson.build | 2 | ||||
-rw-r--r-- | target/i386/kvm/sev-stub.c | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/target/i386/kvm/meson.build b/target/i386/kvm/meson.build index b1c7695..736df8b 100644 --- a/target/i386/kvm/meson.build +++ b/target/i386/kvm/meson.build @@ -7,6 +7,8 @@ i386_softmmu_kvm_ss.add(files( 'kvm-cpu.c', )) +i386_softmmu_kvm_ss.add(when: 'CONFIG_SEV', if_false: files('sev-stub.c')) + i386_softmmu_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c')) i386_softmmu_ss.add_all(when: 'CONFIG_KVM', if_true: i386_softmmu_kvm_ss) diff --git a/target/i386/kvm/sev-stub.c b/target/i386/kvm/sev-stub.c new file mode 100644 index 0000000..9587d1b --- /dev/null +++ b/target/i386/kvm/sev-stub.c @@ -0,0 +1,22 @@ +/* + * QEMU SEV stub + * + * Copyright Advanced Micro Devices 2018 + * + * Authors: + * Brijesh Singh <brijesh.singh@amd.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "sysemu/sev.h" + +int sev_kvm_init(ConfidentialGuestSupport *cgs, Error **errp) +{ + /* If we get here, cgs must be some non-SEV thing */ + return 0; +} |