[libvirt] [PATCH v3 0/5] libxl: PVHv2 support

Jim Fehlig jfehlig at suse.com
Wed Oct 3 21:52:50 UTC 2018


On 10/2/18 7:05 PM, Jim Fehlig wrote:
> On 10/2/18 3:38 PM, Jim Fehlig wrote:
>> On 9/30/18 8:15 PM, Marek Marczykowski-Górecki wrote:
>>> This is a respin of my old PVHv1 patch[1], converted to PVHv2.
>>> Should the code use "PVH" name (as libxl does internally), or "PVHv2" as in
>>> many places in Xen documentation? I've chosen the former, but want to confirm
>>> it.
>>
>> "PVH".
>>
>>>
>>> Also, not sure about VIR_DOMAIN_OSTYPE_XENPVH (as discussed on PVHv1 patch) -
>>> while it will be messy in many cases, there is
>>> libxl_domain_build_info.u.{hvm,pv,pvh} which would be good to not mess up.
>>> Also, PVHv2 needs different kernel features than PV (CONFIG_XEN_PVH vs
>>> CONFIG_XEN_PV), so keeping the same VIR_DOMAIN_OSTYPE_XEN could be
>>> confusing.
>>
>> These are good reasons for going with VIR_DOMAIN_OSTYPE_XENPVH. Another is it 
>> avoids the STREQ(def->os.machine, "xenpvh"), which I think others will find 
>> appealing.
>>
>>> On the other hand, libxl_domain_build_info.u.pv is used in very few places (one
>>> section of libxlMakeDomBuildInfo), so guarding u.hvm access with
>>> VIR_DOMAIN_OSTYPE_HVM may be enough.
>>> For now I've reused VIR_DOMAIN_OSTYPE_XEN - in the driver itself, most of
>>> the code is the same as for PV.
>>
>> I'll reiterate my rationalization for using VIR_DOMAIN_OSTYPE_XEN for both and 
>> differentiating them with os.machine: both PV and PVH are OS types that have 
>> been modified to run on Xen.
>>
>> I'd still like to get some opinions from other maintainers on this. Anyone 
>> care to share their thoughts on which approach best models PVH?
> 
> I've been thinking about this more and AFAIK on the qemu side the machine 
> attribute models a chipset, e.g.
> 
> <type arch='x86_64' machine='pc-i440fx'>hvm</type>
> <type arch='x86_64' machine='pc-q35'>hvm</type>
> 
> Is it a stretch to refer to PV and PVH as chipsets? If so, my position on the 
> fence in now leaning towards VIR_DOMAIN_OSTYPE_XENPVH :-/

We had a bit more discussion on IRC today and generally concluded 
VIR_DOMAIN_OSTYPE_XEN and os.machine="xenpvh" is the better approach to model 
PVH. Some of the rational for the conclusion (in addition to items already 
mentioned above) was based on info in the related Xen wiki [0] which includes

- PVH is described under the "Enhancements to PV:" section
- PVH is described as "fully PV kernel mode, running with paravirtualized
   disk and network, paravirtualized interrupts and timers, no emulated
   devices of any kind (and thus no qemu), no BIOS or legacy boot - but
   instead of requiring PV MMU, it uses the HVM hardware extensions to
   virtualize the pagetables, as well as system calls and other privileged
   operations". So PVH is the result of the evolution of PV, a PV++ or
   PVImproved if you will.
- Once PVH is mature and well established, the community plans to remove
   non-PVH support from the Linux kernel. IOW the long-term plan is for
   PVH to become the new PV.

Regards,
Jim

[0] https://wiki.xenproject.org/wiki/Understanding_the_Virtualization_Spectrum




More information about the libvir-list mailing list