lkml.org 
[lkml]   [2015]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2 1/2] KVM: nVMX: enhance allocate/free_vpid to handle shadow vpid
    From
    Date
    On 9/15/15 8:54 PM, Paolo Bonzini wrote:
    >
    > On 15/09/2015 12:30, Wanpeng Li wrote:
    >> + if (!nested) {
    >> + vpid = find_first_zero_bit(vmx_vpid_bitmap, VMX_NR_VPIDS);
    >> + if (vpid < VMX_NR_VPIDS) {
    >> vmx->vpid = vpid;
    >> __set_bit(vpid, vmx_vpid_bitmap);
    >> + }
    >> + } else {
    >> + vpid = find_first_zero_bit(vmx_vpid_bitmap, VMX_NR_VPIDS);
    >> + if (vpid < VMX_NR_VPIDS) {
    >> + vmx->nested.vpid02 = vpid;
    >> + __set_bit(vpid, vmx_vpid_bitmap);
    >> + }
    > Messy indentation, and a lot of duplicate code. Can you instead have
    > (which I think was Jan's suggestion too):
    >
    > static int allocate_vpid(void);
    > static void free_vpid(int vpid);

    I see, done in v3.

    >
    > That said, I like the simple solution to the "too many VPIDs for each L1
    > VCPU" processor.

    Thanks. :-)

    Regards,
    Wanpeng Li



    \
     
     \ /
      Last update: 2015-09-16 06:21    [W:3.362 / U:0.872 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site