17 Mar, 2016

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "One of the largest releases for KVM... Hardly any generic
    changes, but lots of architecture-specific updates.

    ARM:
    - VHE support so that we can run the kernel at EL2 on ARMv8.1 systems
    - PMU support for guests
    - 32bit world switch rewritten in C
    - various optimizations to the vgic save/restore code.

    PPC:
    - enabled KVM-VFIO integration ("VFIO device")
    - optimizations to speed up IPIs between vcpus
    - in-kernel handling of IOMMU hypercalls
    - support for dynamic DMA windows (DDW).

    s390:
    - provide the floating point registers via sync regs;
    - separated instruction vs. data accesses
    - dirty log improvements for huge guests
    - bugfixes and documentation improvements.

    x86:
    - Hyper-V VMBus hypercall userspace exit
    - alternative implementation of lowest-priority interrupts using
    vector hashing (for better VT-d posted interrupt support)
    - fixed guest debugging with nested virtualizations
    - improved interrupt tracking in the in-kernel IOAPIC
    - generic infrastructure for tracking writes to guest
    memory - currently its only use is to speedup the legacy shadow
    paging (pre-EPT) case, but in the future it will be used for
    virtual GPUs as well
    - much cleanup (LAPIC, kvmclock, MMU, PIT), including ubsan fixes"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (217 commits)
    KVM: x86: remove eager_fpu field of struct kvm_vcpu_arch
    KVM: x86: disable MPX if host did not enable MPX XSAVE features
    arm64: KVM: vgic-v3: Only wipe LRs on vcpu exit
    arm64: KVM: vgic-v3: Reset LRs at boot time
    arm64: KVM: vgic-v3: Do not save an LR known to be empty
    arm64: KVM: vgic-v3: Save maintenance interrupt state only if required
    arm64: KVM: vgic-v3: Avoid accessing ICH registers
    KVM: arm/arm64: vgic-v2: Make GICD_SGIR quicker to hit
    KVM: arm/arm64: vgic-v2: Only wipe LRs on vcpu exit
    KVM: arm/arm64: vgic-v2: Reset LRs at boot time
    KVM: arm/arm64: vgic-v2: Do not save an LR known to be empty
    KVM: arm/arm64: vgic-v2: Move GICH_ELRSR saving to its own function
    KVM: arm/arm64: vgic-v2: Save maintenance interrupt state only if required
    KVM: arm/arm64: vgic-v2: Avoid accessing GICH registers
    KVM: s390: allocate only one DMA page per VM
    KVM: s390: enable STFLE interpretation only if enabled for the guest
    KVM: s390: wake up when the VCPU cpu timer expires
    KVM: s390: step the VCPU timer while in enabled wait
    KVM: s390: protect VCPU cpu timer with a seqcount
    KVM: s390: step VCPU cpu timer during kvm_run ioctl
    ...

    Linus Torvalds
     

10 Mar, 2016

1 commit

  • Yes, all of these are needed. :) This is admittedly a bit odd, but
    kvm-unit-tests access.flat tests this if you run it with "-cpu host"
    and of course ept=0.

    KVM runs the guest with CR0.WP=1, so it must handle supervisor writes
    specially when pte.u=1/pte.w=0/CR0.WP=0. Such writes cause a fault
    when U=1 and W=0 in the SPTE, but they must succeed because CR0.WP=0.
    When KVM gets the fault, it sets U=0 and W=1 in the shadow PTE and
    restarts execution. This will still cause a user write to fault, while
    supervisor writes will succeed. User reads will fault spuriously now,
    and KVM will then flip U and W again in the SPTE (U=1, W=0). User reads
    will be enabled and supervisor writes disabled, going back to the
    originary situation where supervisor writes fault spuriously.

    When SMEP is in effect, however, U=0 will enable kernel execution of
    this page. To avoid this, KVM also sets NX=1 in the shadow PTE together
    with U=0. If the guest has not enabled NX, the result is a continuous
    stream of page faults due to the NX bit being reserved.

    The fix is to force EFER.NX=1 even if the CPU is taking care of the EFER
    switch. (All machines with SMEP have the CPU_LOAD_IA32_EFER vm-entry
    control, so they do not use user-return notifiers for EFER---if they did,
    EFER.NX would be forced to the same value as the host).

    There is another bug in the reserved bit check, which I've split to a
    separate patch for easier application to stable kernels.

    Cc: stable@vger.kernel.org
    Cc: Andy Lutomirski
    Reviewed-by: Xiao Guangrong
    Fixes: f6577a5fa15d82217ca73c74cd2dcbc0f6c781dd
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     

09 Mar, 2016

1 commit


04 Mar, 2016

1 commit


03 Mar, 2016

2 commits

  • kvm_lpage_info->write_count is used to detect if the large page mapping
    for the gfn on the specified level is allowed, rename it to disallow_lpage
    to reflect its purpose, also we rename has_wrprotected_page() to
    mmu_gfn_lpage_is_disallowed() to make the code more clearer

    Later we will extend this mechanism for page tracking: if the gfn is
    tracked then large mapping for that gfn on any level is not allowed.
    The new name is more straightforward

    Reviewed-by: Paolo Bonzini
    Signed-off-by: Xiao Guangrong
    Signed-off-by: Paolo Bonzini

    Xiao Guangrong
     
  • …lus/powerpc into HEAD

    The highlights are:

    * Enable VFIO device on PowerPC, from David Gibson
    * Optimizations to speed up IPIs between vcpus in HV KVM,
    from Suresh Warrier (who is also Suresh E. Warrier)
    * In-kernel handling of IOMMU hypercalls, and support for dynamic DMA
    windows (DDW), from Alexey Kardashevskiy.

    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

    Paolo Bonzini
     

02 Mar, 2016

1 commit

  • The existing KVM_CREATE_SPAPR_TCE only supports 32bit windows which is not
    enough for directly mapped windows as the guest can get more than 4GB.

    This adds KVM_CREATE_SPAPR_TCE_64 ioctl and advertises it
    via KVM_CAP_SPAPR_TCE_64 capability. The table size is checked against
    the locked memory limit.

    Since 64bit windows are to support Dynamic DMA windows (DDW), let's add
    @bus_offset and @page_shift which are also required by DDW.

    Signed-off-by: Alexey Kardashevskiy
    Signed-off-by: Paul Mackerras

    Alexey Kardashevskiy
     

01 Mar, 2016

3 commits

  • To configure the virtual PMUv3 overflow interrupt number, we use the
    vcpu kvm_device ioctl, encapsulating the KVM_ARM_VCPU_PMU_V3_IRQ
    attribute within the KVM_ARM_VCPU_PMU_V3_CTRL group.

    After configuring the PMUv3, call the vcpu ioctl with attribute
    KVM_ARM_VCPU_PMU_V3_INIT to initialize the PMUv3.

    Signed-off-by: Shannon Zhao
    Acked-by: Peter Maydell
    Reviewed-by: Andrew Jones
    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Shannon Zhao
     
  • In some cases it needs to get/set attributes specific to a vcpu and so
    needs something else than ONE_REG.

    Let's copy the KVM_DEVICE approach, and define the respective ioctls
    for the vcpu file descriptor.

    Signed-off-by: Shannon Zhao
    Reviewed-by: Andrew Jones
    Acked-by: Peter Maydell
    Signed-off-by: Marc Zyngier

    Shannon Zhao
     
  • To support guest PMUv3, use one bit of the VCPU INIT feature array.
    Initialize the PMU when initialzing the vcpu with that bit and PMU
    overflow interrupt set.

    Signed-off-by: Shannon Zhao
    Acked-by: Peter Maydell
    Reviewed-by: Andrew Jones
    Signed-off-by: Marc Zyngier

    Shannon Zhao
     

17 Feb, 2016

1 commit

  • The patch implements KVM_EXIT_HYPERV userspace exit
    functionality for Hyper-V VMBus hypercalls:
    HV_X64_HCALL_POST_MESSAGE, HV_X64_HCALL_SIGNAL_EVENT.

    Changes v3:
    * use vcpu->arch.complete_userspace_io to setup hypercall
    result

    Changes v2:
    * use KVM_EXIT_HYPERV for hypercalls

    Signed-off-by: Andrey Smetanin
    Reviewed-by: Roman Kagan
    CC: Gleb Natapov
    CC: Paolo Bonzini
    CC: Joerg Roedel
    CC: "K. Y. Srinivasan"
    CC: Haiyang Zhang
    CC: Roman Kagan
    CC: Denis V. Lunev
    CC: qemu-devel@nongnu.org
    Signed-off-by: Paolo Bonzini

    Andrey Smetanin
     

16 Feb, 2016

1 commit

  • This adds real and virtual mode handlers for the H_PUT_TCE_INDIRECT and
    H_STUFF_TCE hypercalls for user space emulated devices such as IBMVIO
    devices or emulated PCI. These calls allow adding multiple entries
    (up to 512) into the TCE table in one call which saves time on
    transition between kernel and user space.

    The current implementation of kvmppc_h_stuff_tce() allows it to be
    executed in both real and virtual modes so there is one helper.
    The kvmppc_rm_h_put_tce_indirect() needs to translate the guest address
    to the host address and since the translation is different, there are
    2 helpers - one for each mode.

    This implements the KVM_CAP_PPC_MULTITCE capability. When present,
    the kernel will try handling H_PUT_TCE_INDIRECT and H_STUFF_TCE if these
    are enabled by the userspace via KVM_CAP_PPC_ENABLE_HCALL.
    If they can not be handled by the kernel, they are passed on to
    the user space. The user space still has to have an implementation
    for these.

    Both HV and PR-syle KVM are supported.

    Signed-off-by: Alexey Kardashevskiy
    Reviewed-by: David Gibson
    Signed-off-by: Paul Mackerras

    Alexey Kardashevskiy
     

10 Feb, 2016

3 commits


26 Jan, 2016

1 commit


16 Dec, 2015

1 commit

  • While the userspace interface requests the maximum size the gmap code
    expects to get a maximum address.

    This error resulted in bigger page tables than necessary for some guest
    sizes, e.g. a 2GB guest used 3 levels instead of 2.

    At the same time we introduce KVM_S390_NO_MEM_LIMIT, which allows in a
    bright future that a guest spans the complete 64 bit address space.

    We also switch to TASK_MAX_SIZE for the initial memory size, this is a
    cosmetic change as the previous size also resulted in a 4 level pagetable
    creation.

    Reported-by: David Hildenbrand
    Reviewed-by: Cornelia Huck
    Signed-off-by: Dominik Dingel
    Signed-off-by: Christian Borntraeger

    Dominik Dingel
     

26 Nov, 2015

3 commits

  • At some call sites of rmap_get_first() and rmap_get_next(), BUG_ON is
    placed right after the call to detect unrelated sptes which must not be
    found in the reverse-mapping list.

    Move this check in rmap_get_first/next() so that all call sites, not
    just the users of the for_each_rmap_spte() macro, will be checked the
    same way.

    One thing to keep in mind is that kvm_mmu_unlink_parents() also uses
    rmap_get_first() to handle parent sptes. The change will not break it
    because parent sptes are present, at least until drop_parent_pte()
    actually unlinks them, and not mmio-sptes.

    Signed-off-by: Takuya Yoshikawa
    Signed-off-by: Paolo Bonzini

    Takuya Yoshikawa
     
  • A new vcpu exit is introduced to notify the userspace of the
    changes in Hyper-V SynIC configuration triggered by guest writing to the
    corresponding MSRs.

    Changes v4:
    * exit into userspace only if guest writes into SynIC MSR's

    Changes v3:
    * added KVM_EXIT_HYPERV types and structs notes into docs

    Signed-off-by: Andrey Smetanin
    Reviewed-by: Roman Kagan
    Signed-off-by: Denis V. Lunev
    CC: Gleb Natapov
    CC: Paolo Bonzini
    CC: Roman Kagan
    CC: Denis V. Lunev
    CC: qemu-devel@nongnu.org
    Signed-off-by: Paolo Bonzini

    Andrey Smetanin
     
  • SynIC (synthetic interrupt controller) is a lapic extension,
    which is controlled via MSRs and maintains for each vCPU
    - 16 synthetic interrupt "lines" (SINT's); each can be configured to
    trigger a specific interrupt vector optionally with auto-EOI
    semantics
    - a message page in the guest memory with 16 256-byte per-SINT message
    slots
    - an event flag page in the guest memory with 16 2048-bit per-SINT
    event flag areas

    The host triggers a SINT whenever it delivers a new message to the
    corresponding slot or flips an event flag bit in the corresponding area.
    The guest informs the host that it can try delivering a message by
    explicitly asserting EOI in lapic or writing to End-Of-Message (EOM)
    MSR.

    The userspace (qemu) triggers interrupts and receives EOM notifications
    via irqfd with resampler; for that, a GSI is allocated for each
    configured SINT, and irq_routing api is extended to support GSI-SINT
    mapping.

    Changes v4:
    * added activation of SynIC by vcpu KVM_ENABLE_CAP
    * added per SynIC active flag
    * added deactivation of APICv upon SynIC activation

    Changes v3:
    * added KVM_CAP_HYPERV_SYNIC and KVM_IRQ_ROUTING_HV_SINT notes into
    docs

    Changes v2:
    * do not use posted interrupts for Hyper-V SynIC AutoEOI vectors
    * add Hyper-V SynIC vectors into EOI exit bitmap
    * Hyper-V SyniIC SINT msr write logic simplified

    Signed-off-by: Andrey Smetanin
    Reviewed-by: Roman Kagan
    Signed-off-by: Denis V. Lunev
    CC: Gleb Natapov
    CC: Paolo Bonzini
    CC: Roman Kagan
    CC: Denis V. Lunev
    CC: qemu-devel@nongnu.org
    Signed-off-by: Paolo Bonzini

    Andrey Smetanin
     

06 Nov, 2015

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "First batch of KVM changes for 4.4.

    s390:
    A bunch of fixes and optimizations for interrupt and time handling.

    PPC:
    Mostly bug fixes.

    ARM:
    No big features, but many small fixes and prerequisites including:

    - a number of fixes for the arch-timer

    - introducing proper level-triggered semantics for the arch-timers

    - a series of patches to synchronously halt a guest (prerequisite
    for IRQ forwarding)

    - some tracepoint improvements

    - a tweak for the EL2 panic handlers

    - some more VGIC cleanups getting rid of redundant state

    x86:
    Quite a few changes:

    - support for VT-d posted interrupts (i.e. PCI devices can inject
    interrupts directly into vCPUs). This introduces a new
    component (in virt/lib/) that connects VFIO and KVM together.
    The same infrastructure will be used for ARM interrupt
    forwarding as well.

    - more Hyper-V features, though the main one Hyper-V synthetic
    interrupt controller will have to wait for 4.5. These will let
    KVM expose Hyper-V devices.

    - nested virtualization now supports VPID (same as PCID but for
    vCPUs) which makes it quite a bit faster

    - for future hardware that supports NVDIMM, there is support for
    clflushopt, clwb, pcommit

    - support for "split irqchip", i.e. LAPIC in kernel +
    IOAPIC/PIC/PIT in userspace, which reduces the attack surface of
    the hypervisor

    - obligatory smattering of SMM fixes

    - on the guest side, stable scheduler clock support was rewritten
    to not require help from the hypervisor"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (123 commits)
    KVM: VMX: Fix commit which broke PML
    KVM: x86: obey KVM_X86_QUIRK_CD_NW_CLEARED in kvm_set_cr0()
    KVM: x86: allow RSM from 64-bit mode
    KVM: VMX: fix SMEP and SMAP without EPT
    KVM: x86: move kvm_set_irq_inatomic to legacy device assignment
    KVM: device assignment: remove pointless #ifdefs
    KVM: x86: merge kvm_arch_set_irq with kvm_set_msi_inatomic
    KVM: x86: zero apic_arb_prio on reset
    drivers/hv: share Hyper-V SynIC constants with userspace
    KVM: x86: handle SMBASE as physical address in RSM
    KVM: x86: add read_phys to x86_emulate_ops
    KVM: x86: removing unused variable
    KVM: don't pointlessly leave KVM_COMPAT=y in non-KVM configs
    KVM: arm/arm64: Merge vgic_set_lr() and vgic_sync_lr_elrsr()
    KVM: arm/arm64: Clean up vgic_retire_lr() and surroundings
    KVM: arm/arm64: Optimize away redundant LR tracking
    KVM: s390: use simple switch statement as multiplexer
    KVM: s390: drop useless newline in debugging data
    KVM: s390: SCA must not cross page boundaries
    KVM: arm: Do not indent the arguments of DECLARE_BITMAP
    ...

    Linus Torvalds
     

04 Nov, 2015

1 commit


23 Oct, 2015

2 commits

  • Correct some old mistakes in the API documentation:

    1. VCPU is identified by index (using kvm_get_vcpu() function), but
    "cpu id" can be mistaken for affinity ID.
    2. Some error codes are wrong.

    [ Slightly tweaked some grammer and did some s/CPU index/vcpu_index/
    in the descriptions. -Christoffer ]

    Signed-off-by: Pavel Fedin
    Signed-off-by: Christoffer Dall

    Pavel Fedin
     
  • Forwarded physical interrupts on arm/arm64 is a tricky concept and the
    way we deal with them is not apparently easy to understand by reading
    various specs.

    Therefore, add a proper documentation file explaining the flow and
    rationale of the behavior of the vgic.

    Some of this text was contributed by Marc Zyngier and edited by me.
    Omissions and errors are all mine.

    Signed-off-by: Christoffer Dall

    Christoffer Dall
     

12 Oct, 2015

1 commit


01 Oct, 2015

6 commits

  • This patch updates the Posted-Interrupts Descriptor when vCPU
    is blocked.

    pre-block:
    - Add the vCPU to the blocked per-CPU list
    - Set 'NV' to POSTED_INTR_WAKEUP_VECTOR

    post-block:
    - Remove the vCPU from the per-CPU list

    Signed-off-by: Feng Wu
    [Concentrate invocation of pre/post-block hooks to vcpu_block. - Paolo]
    Signed-off-by: Paolo Bonzini

    Feng Wu
     
  • Cc: Gleb Natapov
    Cc: Paolo Bonzini
    Signed-off-by: Jason Wang
    Signed-off-by: Paolo Bonzini

    Jason Wang
     
  • In order to enable userspace PIC support, the userspace PIC needs to
    be able to inject local interrupts even when the APICs are in the
    kernel.

    KVM_INTERRUPT now supports sending local interrupts to an APIC when
    APICs are in the kernel.

    The ready_for_interrupt_request flag is now only set when the CPU/APIC
    will immediately accept and inject an interrupt (i.e. APIC has not
    masked the PIC).

    When the PIC wishes to initiate an INTA cycle with, say, CPU0, it
    kicks CPU0 out of the guest, and renedezvous with CPU0 once it arrives
    in userspace.

    When the CPU/APIC unmasks the PIC, a KVM_EXIT_IRQ_WINDOW_OPEN is
    triggered, so that userspace has a chance to inject a PIC interrupt
    if it had been pending.

    Overall, this design can lead to a small number of spurious userspace
    renedezvous. In particular, whenever the PIC transistions from low to
    high while it is masked and whenever the PIC becomes unmasked while
    it is low.

    Note: this does not buffer more than one local interrupt in the
    kernel, so the VMM needs to enter the guest in order to complete
    interrupt injection before injecting an additional interrupt.

    Compiles for x86.

    Can pass the KVM Unit Tests.

    Signed-off-by: Steve Rutherford
    Signed-off-by: Paolo Bonzini

    Steve Rutherford
     
  • In order to support a userspace IOAPIC interacting with an in kernel
    APIC, the EOI exit bitmaps need to be configurable.

    If the IOAPIC is in userspace (i.e. the irqchip has been split), the
    EOI exit bitmaps will be set whenever the GSI Routes are configured.
    In particular, for the low MSI routes are reservable for userspace
    IOAPICs. For these MSI routes, the EOI Exit bit corresponding to the
    destination vector of the route will be set for the destination VCPU.

    The intention is for the userspace IOAPICs to use the reservable MSI
    routes to inject interrupts into the guest.

    This is a slight abuse of the notion of an MSI Route, given that MSIs
    classically bypass the IOAPIC. It might be worthwhile to add an
    additional route type to improve clarity.

    Compile tested for Intel x86.

    Signed-off-by: Steve Rutherford
    Signed-off-by: Paolo Bonzini

    Steve Rutherford
     
  • Adds KVM_EXIT_IOAPIC_EOI which allows the kernel to EOI
    level-triggered IOAPIC interrupts.

    Uses a per VCPU exit bitmap to decide whether or not the IOAPIC needs
    to be informed (which is identical to the EOI_EXIT_BITMAP field used
    by modern x86 processors, but can also be used to elide kvm IOAPIC EOI
    exits on older processors).

    [Note: A prototype using ResampleFDs found that decoupling the EOI
    from the VCPU's thread made it possible for the VCPU to not see a
    recent EOI after reentering the guest. This does not match real
    hardware.]

    Compile tested for Intel x86.

    Signed-off-by: Steve Rutherford
    Signed-off-by: Paolo Bonzini

    Steve Rutherford
     
  • First patch in a series which enables the relocation of the
    PIC/IOAPIC to userspace.

    Adds capability KVM_CAP_SPLIT_IRQCHIP;

    KVM_CAP_SPLIT_IRQCHIP enables the construction of LAPICs without the
    rest of the irqchip.

    Compile tested for x86.

    Signed-off-by: Steve Rutherford
    Suggested-by: Andrew Honig
    Signed-off-by: Paolo Bonzini

    Steve Rutherford
     

23 Aug, 2015

1 commit


23 Jul, 2015

1 commit

  • Sending of notification is done by exiting vcpu to user space
    if KVM_REQ_HV_CRASH is enabled for vcpu. At exit to user space
    the kvm_run structure contains system_event with type
    KVM_SYSTEM_EVENT_CRASH to notify about guest crash occurred.

    Signed-off-by: Andrey Smetanin
    Signed-off-by: Denis V. Lunev
    Reviewed-by: Peter Hornyack
    CC: Paolo Bonzini
    CC: Gleb Natapov
    Signed-off-by: Paolo Bonzini

    Andrey Smetanin
     

21 Jul, 2015

4 commits

  • Finally advertise the KVM capability for SET_GUEST_DEBUG. Once arm
    support is added this check can be moved to the common
    kvm_vm_ioctl_check_extension() code.

    Signed-off-by: Alex Bennée
    Acked-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Alex Bennée
     
  • This adds support for SW breakpoints inserted by userspace.

    We do this by trapping all guest software debug exceptions to the
    hypervisor (MDCR_EL2.TDE). The exit handler sets an exit reason of
    KVM_EXIT_DEBUG with the kvm_debug_exit_arch structure holding the
    exception syndrome information.

    It will be up to userspace to extract the PC (via GET_ONE_REG) and
    determine if the debug event was for a breakpoint it inserted. If not
    userspace will need to re-inject the correct exception restart the
    hypervisor to deliver the debug exception to the guest.

    Any other guest software debug exception (e.g. single step or HW
    assisted breakpoints) will cause an error and the VM to be killed. This
    is addressed by later patches which add support for the other debug
    types.

    Signed-off-by: Alex Bennée
    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Alex Bennée
     
  • This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
    ioctl. Any unsupported flag will return -EINVAL. For now, only
    KVM_GUESTDBG_ENABLE is supported, although it won't have any effects.

    Signed-off-by: Alex Bennée .
    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Alex Bennée
     
  • Bring into line with the comments for the other structures and their
    KVM_EXIT_* cases. Also update api.txt to reflect use in kvm_run
    documentation.

    Signed-off-by: Alex Bennée
    Reviewed-by: David Hildenbrand
    Reviewed-by: Andrew Jones
    Acked-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Alex Bennée
     

05 Jun, 2015

3 commits

  • Follow up to commit e194bbdf362ba7d53cfd23ba24f1a7c90ef69a74.

    Suggested-by: Bandan Das
    Suggested-by: Alex Williamson
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     
  • This is now very simple to do. The only interesting part is a simple
    trick to find the right memslot in gfn_to_rmap, retrieving the address
    space from the spte role word. The same trick is used in the auditing
    code.

    The comment on top of union kvm_mmu_page_role has been stale forever,
    so remove it. Speaking of stale code, remove pad_for_nice_hex_output
    too: it was splitting the "access" bitfield across two bytes and thus
    had effectively turned into pad_for_ugly_hex_output.

    Reviewed-by: Radim Krčmář
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     
  • Only two ioctls have to be modified; the address space id is
    placed in the higher 16 bits of their slot id argument.

    As of this patch, no architecture defines more than one
    address space; x86 will be the first.

    Reviewed-by: Radim Krčmář
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini