1. 14 3月, 2018 2 次提交
    • B
      sev/i386: register the guest memory range which may contain encrypted data · 2b308e44
      Brijesh Singh 提交于
      When SEV is enabled, the hardware encryption engine uses a tweak such
      that the two identical plaintext at different location will have a
      different ciphertexts. So swapping or moving a ciphertexts of two guest
      pages will not result in plaintexts being swapped. Hence relocating
      a physical backing pages of the SEV guest will require some additional
      steps in KVM driver. The KVM_MEMORY_ENCRYPT_{UN,}REG_REGION ioctl can be
      used to register/unregister the guest memory region which may contain the
      encrypted data. KVM driver will internally handle the relocating physical
      backing pages of registered memory regions.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2b308e44
    • B
      sev/i386: add command to initialize the memory encryption context · d8575c6c
      Brijesh Singh 提交于
      When memory encryption is enabled, KVM_SEV_INIT command is used to
      initialize the platform. The command loads the SEV related persistent
      data from non-volatile storage and initializes the platform context.
      This command should be first issued before invoking any other guest
      commands provided by the SEV firmware.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d8575c6c
  2. 31 7月, 2017 1 次提交
  3. 21 12月, 2016 1 次提交
    • T
      Move target-* CPU file into a target/ folder · fcf5ef2a
      Thomas Huth 提交于
      We've currently got 18 architectures in QEMU, and thus 18 target-xxx
      folders in the root folder of the QEMU source tree. More architectures
      (e.g. RISC-V, AVR) are likely to be included soon, too, so the main
      folder of the QEMU sources slowly gets quite overcrowded with the
      target-xxx folders.
      To disburden the main folder a little bit, let's move the target-xxx
      folders into a dedicated target/ folder, so that target-xxx/ simply
      becomes target/xxx/ instead.
      
      Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part]
      Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part]
      Acked-by: Michael Walle <michael@walle.cc> [lm32 part]
      Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part]
      Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part]
      Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part]
      Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part]
      Acked-by: Richard Henderson <rth@twiddle.net> [alpha part]
      Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part]
      Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part]
      Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [cris&microblaze part]
      Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fcf5ef2a
  4. 12 8月, 2016 1 次提交
  5. 22 7月, 2016 3 次提交
    • P
      kvm-irqchip: x86: add msi route notify fn · e1d4fb2d
      Peter Xu 提交于
      One more IEC notifier is added to let msi routes know about the IEC
      changes. When interrupt invalidation happens, all registered msi routes
      will be updated for all PCI devices.
      
      Since both vfio and vhost are possible gsi route consumers, this patch
      will go one step further to keep them safe in split irqchip mode and
      when irqfd is enabled.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      [move trace-events lines into target-i386/trace-events]
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      e1d4fb2d
    • P
      kvm-irqchip: i386: add hook for add/remove virq · 38d87493
      Peter Xu 提交于
      Adding two hooks to be notified when adding/removing msi routes. There
      are two kinds of MSI routes:
      
      - in kvm_irqchip_add_irq_route(): before assigning IRQFD. Used by
        vhost, vfio, etc.
      
      - in kvm_irqchip_send_msi(): when sending direct MSI message, if
        direct MSI not allowed, we will first create one MSI route entry
        in the kernel, then trigger it.
      
      This patch only hooks the first one (irqfd case). We do not need to
      take care for the 2nd one, since it's only used by QEMU userspace
      (kvm-apic) and the messages will always do in-time translation when
      triggered. While we need to note them down for the 1st one, so that we
      can notify the kernel when cache invalidation happens.
      
      Also, we do not hook IOAPIC msi routes (we have explicit notifier for
      IOAPIC to keep its cache updated). We only need to care about irqfd
      users.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      38d87493
    • P
      intel_iommu: add support for split irqchip · 8b5ed7df
      Peter Xu 提交于
      In split irqchip mode, IOAPIC is working in user space, only update
      kernel irq routes when entry changed. When IR is enabled, we directly
      update the kernel with translated messages. It works just like a kernel
      cache for the remapping entries.
      
      Since KVM irqfd is using kernel gsi routes to deliver interrupts, as
      long as we can support split irqchip, we will support irqfd as
      well. Also, since kernel gsi routes will cache translated interrupts,
      irqfd delivery will not suffer from any performance impact due to IR.
      
      And, since we supported irqfd, vhost devices will be able to work
      seamlessly with IR now. Logically this should contain both vhost-net and
      vhost-user case.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      [move trace-events lines into target-i386/trace-events]
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      8b5ed7df