Skip to content
  1. Jan 18, 2022
    • Thomas Huth's avatar
      scripts/arch-run: Mark migration tests as SKIP if ncat is not available · 2176d963
      Thomas Huth authored
      Instead of failing the tests, we should rather skip them if ncat is
      not available.
      While we're at it, also mention ncat in the README.md file as a
      requirement for the migration tests.
      
      Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
      
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20211221092130.444225-1-thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2176d963
    • Manali Shukla's avatar
      x86: nSVM: Check #OF exception handling in L2 · af13008d
      Manali Shukla authored
      
      
      Add coverage for OF exception handling in L2 when only L2 OF
      exception handler is registered.
      
      OF exception generated using instrumented code and it is handled
      by L2 OF exception handler.
      
      Signed-off-by: default avatarManali Shukla <manali.shukla@amd.com>
      Message-Id: <20211229062201.26269-4-manali.shukla@amd.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      af13008d
    • Manali Shukla's avatar
      x86: nSVM: Check #BP exception handling in L2 · c8e16d20
      Manali Shukla authored
      
      
      Add coverage for BP exception handling in L2 when only L2 BP
      exception handler is registered
      
      BP exception is generated using int3 instruction and it is handled
      by L2 BP exception handler.
      
      Signed-off-by: default avatarManali Shukla <manali.shukla@amd.com>
      Message-Id: <20211229062201.26269-3-manali.shukla@amd.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c8e16d20
    • Manali Shukla's avatar
      x86: nSVM: Check #NM exception handling in L2 · 5c92f156
      Manali Shukla authored
      
      
      Add coverage for NM exception handling in L2 when only L2 NM
      exception handler is registered
      
      Verifies 3 different conditions for which #NM is generated and
      handled in L2
      1) CR0.TS is set - #NM is generated and handled in L2 exception
         handler
      2) CR0.TS is cleared and CR0.EM is set - #NM is generated and
         handled in L2 exception handler
      3) CR0.TS and CR0.EM are cleared - #NM is not generated
      
      Signed-off-by: default avatarManali Shukla <manali.shukla@amd.com>
      Message-Id: <20211229062201.26269-2-manali.shukla@amd.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      5c92f156
    • Barzen, Benjamin's avatar
      ACPI: fix ACPI RSDP located before 0xF0000 is not found · 7480de8c
      Barzen, Benjamin authored
      
      
      From e107317d029b5298c88701b4bcc93bc64e28384b Mon Sep 17 00:00:00 2001
      From: bbarzen <bbarzen@amazon.com>
      Date: Wed, 29 Dec 2021 12:50:14 +0100
      Subject: [PATCH] ACPI: fix ACPI RSDP located before 0xF0000 is not found
      
      The function find_acpi_table_addr locates the ACPI RSDP by searching the
      BIOS read only memory space. The official ACPI specification states that
      this space goes from 0xE0000 to 0xFFFFF. The function currently starts
      searching at 0xF0000. Any RSDP located before that address can
      subsequently not be found.
      
      Change the start address of the search to 0xE0000.
      
      Singed-off-by: default avatarBenjamin Barzen <bbarzen@amazon.de>
      Message-Id: <6DFC2BF8-5CAC-410C-9A36-36E92FFC7817@amazon.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7480de8c
    • Zhenzhong Duan's avatar
      x86: Assign a canonical address before execute invpcid · fb0e760a
      Zhenzhong Duan authored
      
      
      Accidently we see pcid test failed as INVPCID_DESC[127:64] is
      uninitialized before execute invpcid.
      
      According to Intel spec: "#GP If INVPCID_TYPE is 0 and the linear
      address in INVPCID_DESC[127:64] is not canonical."
      
      By zeroing the whole invpcid_desc structure, ensure the address
      canonical and reserved bit zero in desc.
      
      Also change invpcid_desc to be clearly 128bit in size no matter
      in 64bit or 32bit mode to match the description in spec.
      
      Fixes: b44d84da ("Add PCID/INVPCID test")
      Suggested-by: default avatarSean Christopherson <seanjc@google.com>
      Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@intel.com>
      Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220117084618.442906-1-zhenzhong.duan@intel.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fb0e760a
    • Aaron Lewis's avatar
      x86: Align L2's stacks · 342db9a1
      Aaron Lewis authored
      
      
      Setting the stack to PAGE_SIZE - 1 sets the stack to being 1-byte
      aligned, which fails in usermode with alignment checks enabled (ie: with
      flags cr0.am set and eflags.ac set).  This was causing an #AC in
      usermode.c when preparing to call the callback in run_in_user().
      Aligning the stack fixes the issue.
      
      For the purposes of fixing the #AC in usermode.c the stack has to be
      aligned to at least an 8-byte boundary.  Setting it to a page aligned
      boundary ensures any stack alignment requirements are met as x86_64
      stacks generally want to be 16-byte aligned.
      
      Signed-off-by: default avatarAaron Lewis <aaronlewis@google.com>
      Message-Id: <20211214011823.3277011-3-aaronlewis@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      342db9a1
    • Aaron Lewis's avatar
      x86: Fix a #GP from occurring in usermode library's exception handlers · 663f9e44
      Aaron Lewis authored
      
      
      When handling an exception in usermode.c the exception handler #GPs when
      executing IRET to return from the exception handler.  This happens
      because the stack segment selector does not have the same privilege
      level as the return code segment selector.  Set the stack segment
      selector to match the code segment selector's privilege level to fix the
      issue.
      
      This problem has been disguised in kvm-unit-tests because a #GP
      exception handler has been registered with run_in_user() for the tests
      that are currently using this feature.  With a #GP exception handler
      registered, the first exception will be processed then #GP on the
      IRET. The IRET from the second #GP will then succeed, and the subsequent
      lngjmp() will restore RSP to a sane value.  But if no #GP handler is
      installed, e.g. if a test wants to handle only #ACs, the #GP on the
      initial IRET will be fatal.
      
      This is only a problem in 64-bit mode because 64-bit mode
      unconditionally pops SS:RSP  (SDM vol 3, 6.14.3 "IRET in IA-32e Mode").
      In 32-bit mode SS:RSP is not popped because there is no privilege level
      change when executing IRET at the end of the #GP handler.
      
      Signed-off-by: default avatarAaron Lewis <aaronlewis@google.com>
      Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20211214011823.3277011-2-aaronlewis@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      663f9e44
  2. Dec 23, 2021
  3. Dec 14, 2021
  4. Dec 09, 2021
  5. Dec 07, 2021
  6. Nov 26, 2021
Loading