Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1666147
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 2/4] xen: add sysfs node for guest type |
| Date | 2017-06-14 21:00 +0200 |
| Message-ID | <tSlGh-od-1@gated-at.bofh.it> (permalink) |
| References | <tSkhb-85J-5@gated-at.bofh.it> <tSkhc-85J-33@gated-at.bofh.it> <tSkAx-8cx-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On 14/06/17 19:43, Boris Ostrovsky wrote:
>
>> --- a/Documentation/ABI/testing/sysfs-hypervisor-pmu
>> +++ b/Documentation/ABI/testing/sysfs-hypervisor-xen
>> @@ -1,8 +1,19 @@
>> +What: /sys/hypervisor/guest_type
>> +Date: May 2017
>> +KernelVersion: 4.13
>> +Contact: xen-devel@lists.xenproject.org
>> +Description: If running under Xen:
>> + Type of guest:
>> + "Xen": standard guest type on arm
>> + "HVM": fully virtualized guest (x86)
>> + "PV": paravirtualized guest (x86)
>> + "PVH": fully virtualized guest without legacy emulation (x86)
>> +
>>
>
>
>
>>
>> +static ssize_t guest_type_show(struct hyp_sysfs_attr *attr, char *buffer)
>> +{
>> + const char *type = "???";
>> +
>> + switch (xen_domain_type) {
>> + case XEN_NATIVE:
>> + /* ARM only. */
>> + type = "Xen";
>> + break;
>> + case XEN_PV_DOMAIN:
>> + type = "PV";
>> + break;
>> + case XEN_HVM_DOMAIN:
>> + type = xen_pvh_domain() ? "PVH" : "HVM";
>> + break;
>> + }
>
> I think we should return -EINVAL for unknown type. Or document "???" in
> the ABI document.
Hmm, okay. Are you fine with the attached patch?
Juergen
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/4] xen: add xen sysfs nodes Juergen Gross <jgross@suse.com> - 2017-06-14 19:30 +0200
[PATCH v4 2/4] xen: add sysfs node for guest type Juergen Gross <jgross@suse.com> - 2017-06-14 19:30 +0200
Re: [PATCH v4 2/4] xen: add sysfs node for guest type Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-14 19:50 +0200
Re: [PATCH v4 2/4] xen: add sysfs node for guest type Juergen Gross <jgross@suse.com> - 2017-06-14 21:00 +0200
Re: [PATCH v4 2/4] xen: add sysfs node for guest type Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-14 21:00 +0200
csiph-web