[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH 2/2] viridian: allow vCPU hotplug for Windows VMs
> -----Original Message----- > From: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx> > Sent: 08 January 2021 00:47 > To: xen-devel@xxxxxxxxxxxxxxxxxxxx > Cc: paul@xxxxxxx; wl@xxxxxxx; iwj@xxxxxxxxxxxxxx; anthony.perard@xxxxxxxxxx; > andrew.cooper3@xxxxxxxxxx; george.dunlap@xxxxxxxxxx; jbeulich@xxxxxxxx; > julien@xxxxxxx; > sstabellini@xxxxxxxxxx; roger.pau@xxxxxxxxxx; Igor Druzhinin > <igor.druzhinin@xxxxxxxxxx> > Subject: [PATCH 2/2] viridian: allow vCPU hotplug for Windows VMs > > If Viridian extensions are enabled, Windows wouldn't currently allow > a hotplugged vCPU to be brought up dynamically. We need to expose a special > bit to let the guest know we allow it. It appears we can just start exposing > it without worrying too much about compatibility - see relevant QEMU > discussion here: > > https://patchwork.kernel.org/project/qemu-devel/patch/1455364815-19586-1-git-send-email- > den@xxxxxxxxxx/ I don't think that discussion really confirmed it was safe... just that empirically it appeared to be so. I think we should err on the side of caution and have this behind a feature flag (but I'm happy for it to default to on). Paul > > Signed-off-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx> > --- > xen/arch/x86/hvm/viridian/viridian.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/x86/hvm/viridian/viridian.c > b/xen/arch/x86/hvm/viridian/viridian.c > index ae1ea86..76e8291 100644 > --- a/xen/arch/x86/hvm/viridian/viridian.c > +++ b/xen/arch/x86/hvm/viridian/viridian.c > @@ -76,6 +76,7 @@ typedef union _HV_CRASH_CTL_REG_CONTENTS > } HV_CRASH_CTL_REG_CONTENTS; > > /* Viridian CPUID leaf 3, Hypervisor Feature Indication */ > +#define CPUID3D_CPU_DYNAMIC_PARTITIONING (1 << 3) > #define CPUID3D_CRASH_MSRS (1 << 10) > #define CPUID3D_SINT_POLLING (1 << 17) > > @@ -179,8 +180,11 @@ void cpuid_viridian_leaves(const struct vcpu *v, > uint32_t leaf, > res->a = u.lo; > res->b = u.hi; > > + /* Expose ability to bring up VPs dynamically - allows vCPU hotplug > */ > + res->d = CPUID3D_CPU_DYNAMIC_PARTITIONING; > + > if ( viridian_feature_mask(d) & HVMPV_crash_ctl ) > - res->d = CPUID3D_CRASH_MSRS; > + res->d |= CPUID3D_CRASH_MSRS; > if ( viridian_feature_mask(d) & HVMPV_synic ) > res->d |= CPUID3D_SINT_POLLING; > > -- > 2.7.4
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |