diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-05-23 10:05:27 +0200 |
|---|---|---|
| committer | Jan Beulich <jbeulich@suse.com> | 2013-05-23 10:05:27 +0200 |
| commit | 9b3db6d948f33043049d78029ef99baf5855d69e (patch) | |
| tree | f8a672859e1a1d62d1aeb2a077298689583a51a6 /tools/lib/sys_string.h | |
| parent | dd6967ce98556d1a5f04c513a6cdde52d7d988ee (diff) | |
| download | xen-9b3db6d948f33043049d78029ef99baf5855d69e.tar.gz xen-9b3db6d948f33043049d78029ef99baf5855d69e.tar.bz2 xen-9b3db6d948f33043049d78029ef99baf5855d69e.zip | |
x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests
For details on the hypercall please see commit
c58ae69360ccf2495a19bf4ca107e21cf873c75b (VCPUOP_register_vcpu_info) and
the c/s 23143 (git commit 6b063a4a6f44245a727aa04ef76408b2e00af9c7)
(x86: move pv-only members of struct vcpu to struct pv_vcpu)
that introduced the regression.
The current code allows the PVHVM guest to make this hypercall.
But for PVHVM guest it always returns -EINVAL (-22) for Xen 4.2
and above. Xen 4.1 and earlier worked.
The reason is that the check in map_vcpu_info would fail
at:
if ( v->arch.vcpu_info_mfn != INVALID_MFN )
The reason is that the vcpu_info_mfn for PVHVM guests ends up by
defualt with the value of zero (introduced by c/s 23143).
The code in vcpu_initialise which initialized vcpu_info_mfn to a
valid value (INVALID_MFN), would never be called for PVHVM:
if ( is_hvm_domain(d) )
{
rc = hvm_vcpu_initialise(v);
goto done;
}
v->arch.pv_vcpu.vcpu_info_mfn = INVALID_MFN;
while previously it would be:
v->arch.vcpu_info_mfn = INVALID_MFN;
[right at the start of the function in Xen 4.1]
This fixes the problem with Linux advertising this error:
register_vcpu_info failed: err=-22
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
x86: call unmap_vcpu_info() regardless of guest type
This fixes a regression from 63753b3e ("x86: allow
VCPUOP_register_vcpu_info to work again on PVHVM guests").
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
master commit: 63753b3e0dc56efb1acf94fa46f3fee7bc59281c
master date: 2013-04-17 11:35:38 +0200
master commit: 9626d1c1fafe2da5af6e59478c9e9db6d03144df
master date: 2013-05-02 09:29:36 +0200
Diffstat (limited to 'tools/lib/sys_string.h')
0 files changed, 0 insertions, 0 deletions
