[Xen-devel] [xen-4.5-testing test] 114423: tolerable FAIL - PUSHED

2017-10-13 Thread osstest service owner
flight 114423 xen-4.5-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114423/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds 7 xen-boot fail REGR. vs. 114263 Tests which did not

[Xen-devel] [xen-4.6-testing test] 114422: regressions - FAIL

2017-10-13 Thread osstest service owner
flight 114422 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114422/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-4 48 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 114097

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-13 Thread Stefano Stabellini
On Fri, 13 Oct 2017, Jan Beulich wrote: > >>> On 13.10.17 at 13:13, wrote: > > To Jan, Andrew, Stefano and Anthony, > > > > what do you think about allowing QEMU to build the entire guest ACPI > > and letting SeaBIOS to load it? ACPI builder code in hvmloader is > >

[Xen-devel] [xen-4.7-testing test] 114420: regressions - FAIL

2017-10-13 Thread osstest service owner
flight 114420 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114420/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-2 48 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 114072 Regressions

Re: [Xen-devel] [PATCH] x86: convert x86_platform_ops to timespec64

2017-10-13 Thread Boris Ostrovsky
On 10/13/2017 02:37 PM, Arnd Bergmann wrote: > The x86 platform operations are fairly isolated, so we can > change them from using timespec to timespec64. I checked that > All the users and callers are safe, and there is only one > critical function that is broken beyond 2106: > >

[Xen-devel] Please Welcome Stefano Stabellini as new Security Team Member

2017-10-13 Thread Lars Kurth
Dear Community members, I am pleased to announce that Stefano Stabellini has been nominated and voted to become a new member of the Xen Project security team. The vote was unanimous with all security team members voting in favour of Stefano's membership. Stefano has made significant

[Xen-devel] [PATCH] x86: convert x86_platform_ops to timespec64

2017-10-13 Thread Arnd Bergmann
The x86 platform operations are fairly isolated, so we can change them from using timespec to timespec64. I checked that All the users and callers are safe, and there is only one critical function that is broken beyond 2106: pvclock_read_wallclock() uses a 32-bit number of seconds since the epoch

[Xen-devel] [PATCH for-4.10 2/2] tools/libxc: Fix various code smells in send_memory_live()

2017-10-13 Thread Andrew Cooper
* Don't zero ctx->save.stats; it is already zeroed * No need for x as it duplicates ctx->save.stats.iteration * Defer setting dirty_count until the bitmap has been filled to match the behaviour of XEN_DOMCTL_SHADOW_OP_CLEAN * Drop spurious blank line Signed-off-by: Andrew Cooper

[Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-13 Thread Andrew Cooper
c/s 4d69b3495 "Introduce migration precopy policy" uses bogus reasoning to justify passing precopy_stats by value. Under no circumstances can the precopy callback ever be executing in a separate address space. Switch the callback to passing by pointer which is far more efficient, and drop the

Re: [Xen-devel] [PATCH v2] x86/hvm: Add MSR old value

2017-10-13 Thread Razvan Cojocaru
On 10/13/2017 07:26 PM, Tamas K Lengyel wrote: > On Fri, Oct 13, 2017 at 9:50 AM, Jan Beulich wrote: > On 13.10.17 at 14:50, wrote: >>> This patch adds the old value param and the onchangeonly option >>> to the VM_EVENT_REASON_MOV_TO_MSR event. >>>

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Julien Grall
Hi, Sorry for the top-posting. Bhupinder, can you give a look? Cheers, On 13/10/17 16:06, Jan Beulich wrote: On 13.10.17 at 16:35, wrote: Hi Jan, On 13/10/17 15:03, Jan Beulich wrote: On 13.10.17 at 15:03, wrote: On 13/10/17 13:32, Jan

Re: [Xen-devel] [PATCH v2] x86/hvm: Add MSR old value

2017-10-13 Thread Tamas K Lengyel
On Fri, Oct 13, 2017 at 9:50 AM, Jan Beulich wrote: On 13.10.17 at 14:50, wrote: >> This patch adds the old value param and the onchangeonly option >> to the VM_EVENT_REASON_MOV_TO_MSR event. >> >> The param was added to the vm_event_mov_to_msr

Re: [Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string

2017-10-13 Thread Ian Jackson
Andrew Cooper writes ("Re: [Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string"): > On 13/10/17 14:01, Ian Jackson wrote: > > Instead, what we have actually done so far, is annotate when a pointer > > parameter *may* be NULL, and, in that case, what that means: > > This is

Re: [Xen-devel] [PATCH 2/2] x86/boot: rename send_chr to print_err

2017-10-13 Thread Andrew Cooper
On 13/10/17 17:07, Doug Goldstein wrote: > On 10/13/17 2:40 AM, Jan Beulich wrote: > On 12.10.17 at 22:56, wrote: >>> On 12/10/2017 21:50, Doug Goldstein wrote: From: David Esler The send_chr function sends an entire C-string

Re: [Xen-devel] [PATCH 2/2] x86/boot: rename send_chr to print_err

2017-10-13 Thread Doug Goldstein
On 10/13/17 2:40 AM, Jan Beulich wrote: On 12.10.17 at 22:56, wrote: >> On 12/10/2017 21:50, Doug Goldstein wrote: >>> From: David Esler >>> >>> The send_chr function sends an entire C-string and not one character and >>> doesn't

Re: [Xen-devel] [PATCH v7 08/16] x86: implement set value flow for MBA

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 10:41, wrote: > @@ -274,16 +280,18 @@ static enum psr_feat_type psr_type_to_feat_type(enum > psr_type type) > return feat_type; > } > > -static bool psr_check_cbm(unsigned int cbm_len, unsigned long cbm) > +/* Implementation of allocation

Re: [Xen-devel] [PATCH v2] x86/hvm: Add MSR old value

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 14:50, wrote: > This patch adds the old value param and the onchangeonly option > to the VM_EVENT_REASON_MOV_TO_MSR event. > > The param was added to the vm_event_mov_to_msr struct and to the > hvm_monitor_msr function. Finally I've changed the bool_t

Re: [Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string

2017-10-13 Thread Andrew Cooper
On 13/10/17 14:01, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH for-4.10] libxl: handle NULL in > libxl__enum_from_string"): >> I agree they shouldn't be called with NULL. We should guard against >> error (here or the libxl_*_type_from_string) or annotate the input can't >> be NULL. > I mean,

Re: [Xen-devel] [PATCH v3 6/6] x86/msr: handle VMX MSRs with guest_rd/wrmsr()

2017-10-13 Thread Andrew Cooper
On 13/10/17 13:35, Sergey Dyasli wrote: > diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c > index a22e3dfaf2..2527fdd1d1 100644 > --- a/xen/arch/x86/msr.c > +++ b/xen/arch/x86/msr.c > @@ -426,6 +426,13 @@ int init_vcpu_msr_policy(struct vcpu *v) > return 0; > } > > +#define

Re: [Xen-devel] [PATCH v3 5/6] x86/msr: update domain policy on CPUID policy changes

2017-10-13 Thread Andrew Cooper
On 13/10/17 13:35, Sergey Dyasli wrote: > Availability of some MSRs depends on certain CPUID bits. Add function > recalculate_domain_msr_policy() which updates availability of per-domain > MSRs based on current domain's CPUID policy. This function is called > when CPUID policy is changed from a

Re: [Xen-devel] [PATCH v3 2/6] x86/msr: add VMX MSRs into struct msr_domain_policy

2017-10-13 Thread Andrew Cooper
On 13/10/17 13:35, Sergey Dyasli wrote: > @@ -210,6 +375,255 @@ struct msr_domain_policy > bool available; /* This MSR is non-architectural */ > bool cpuid_faulting; > } plaform_info; > + > +/* 0x0480 MSR_IA32_VMX_BASIC */ > +struct { > +bool available;

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 16:35, wrote: > Hi Jan, > > On 13/10/17 15:03, Jan Beulich wrote: > On 13.10.17 at 15:03, wrote: >>> On 13/10/17 13:32, Jan Beulich wrote: >>> On 13.10.17 at 14:19, wrote: > On 13/10/17

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Julien Grall
Hi Jan, On 13/10/17 15:03, Jan Beulich wrote: On 13.10.17 at 15:03, wrote: On 13/10/17 13:32, Jan Beulich wrote: On 13.10.17 at 14:19, wrote: On 13/10/17 13:08, Jan Beulich wrote: On 13.10.17 at 12:44,

Re: [Xen-devel] [PATCH v1] x86/hvm: Add MSR old value

2017-10-13 Thread Tamas K Lengyel
On Fri, Oct 13, 2017 at 6:17 AM, Jan Beulich wrote: On 13.10.17 at 12:36, wrote: >> On 13.10.2017 13:29, Jan Beulich wrote: +__set_bit(index + sizeof(struct monitor_msr_bitmap), bitmap); >>> >>> I think you miss "* 8" here - a bit

Re: [Xen-devel] [PATCH v7 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-13 Thread Daniel De Graaf
On 10/13/2017 04:40 AM, Yi Sun wrote: This patch renames PSR sysctl/domctl interfaces and related xsm policy to make them be general for all resource allocation features but not only for CAT. Then, we can resuse the interfaces for all allocation features. Basically, it changes 'psr_cat_op' to

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 15:03, wrote: > On 13/10/17 13:32, Jan Beulich wrote: > On 13.10.17 at 14:19, wrote: >>> On 13/10/17 13:08, Jan Beulich wrote: >>> On 13.10.17 at 12:44, wrote: > In

Re: [Xen-devel] [PATCH 27/27 v12] arm/xen: vpl011: Correct the logic for asserting/de-asserting SBSA UART TX interrupt

2017-10-13 Thread Dave Martin
On Fri, Oct 13, 2017 at 04:10:31PM +0530, Bhupinder Thakur wrote: > This patch fixes the issue observed when pl011 patches were tested on > the junos hardware by Andre/Julien. It was observed that when large > output is generated such as on running 'find /', output was getting > truncated

Re: [Xen-devel] [PATCH v5] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 15:00, wrote: > On Vi, 2017-10-13 at 03:51 -0600, Jan Beulich wrote: >> > >> > >> > +BUILD_BUG_ON(sizeof(struct >> > xen_hvm_altp2m_set_mem_access_multi) < >> > + sizeof(struct >> >

[Xen-devel] [qemu-mainline test] 114409: regressions - FAIL

2017-10-13 Thread osstest service owner
flight 114409 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/114409/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvh-amd 12 guest-start fail REGR. vs. 114042

[Xen-devel] [OSSTEST PATCH] Bump HostDiskRoot to 20G

2017-10-13 Thread Wei Liu
Windows tests consume quite a bit more disk space under /root. Signed-off-by: Wei Liu --- Osstest.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest.pm b/Osstest.pm index a78728c..34b5b6d 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -94,7 +94,7 @@

[Xen-devel] [OSSTEST PATCH] HostDiskRoot: bump to 20G

2017-10-13 Thread Ian Jackson
Some of our Windows guests have more RAM now, and some of them have big ISOs too. The guest memory ends up in /root as a save image, and the ISO ends up there too. Double the size of / to 20G. That will probably do for now and is unlikely to break anything. Signed-off-by: Ian Jackson

[Xen-devel] [PATCH v2] x86/vpt: guarantee the return value of pt_update_irq() set in vIRR or PIR

2017-10-13 Thread Chao Gao
pt_update_irq() is expected to return the vector number of periodic timer interrupt, which should be set in vIRR of vlapic or in PIR. Otherwise it would trigger the assertion in vmx_intr_assist(), please seeing https://lists.xenproject.org/archives/html/xen-devel/2017-10/msg00915.html. But it

Re: [Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string

2017-10-13 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string"): > I agree they shouldn't be called with NULL. We should guard against > error (here or the libxl_*_type_from_string) or annotate the input can't > be NULL. I mean, who calls any libxl_*_from_string with

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Julien Grall
Hi, On 13/10/17 13:32, Jan Beulich wrote: On 13.10.17 at 14:19, wrote: On 13/10/17 13:08, Jan Beulich wrote: On 13.10.17 at 12:44, wrote: In libxl__device_vuart_add vuart_gfn is getting stored as a hex value:

Re: [Xen-devel] [PATCH v5] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-13 Thread Petre Ovidiu PIRCALABU
On Vi, 2017-10-13 at 03:51 -0600, Jan Beulich wrote: > >  > > > > +BUILD_BUG_ON(sizeof(struct > > xen_hvm_altp2m_set_mem_access_multi) < > > + sizeof(struct > > compat_hvm_altp2m_set_mem_access_multi)); > What good does this do? > Sorry, I don't understand how

Re: [Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string

2017-10-13 Thread Wei Liu
On Fri, Oct 13, 2017 at 01:46:57PM +0100, Ian Jackson wrote: > Wei Liu writes ("[PATCH for-4.10] libxl: handle NULL in > libxl__enum_from_string"): > > Discovered by Coverity. > > But. Surely it is very wrong > > > @@ -1017,7 +1017,7 @@ int libxl_get_max_nodes(libxl_ctx *ctx) > > int

[Xen-devel] [xen-unstable-smoke test] 114460: tolerable all pass - PUSHED

2017-10-13 Thread osstest service owner
flight 114460 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114460/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl

[Xen-devel] [PATCH v2] x86/hvm: Add MSR old value

2017-10-13 Thread Alexandru Isaila
This patch adds the old value param and the onchangeonly option to the VM_EVENT_REASON_MOV_TO_MSR event. The param was added to the vm_event_mov_to_msr struct and to the hvm_monitor_msr function. Finally I've changed the bool_t param to a bool for the hvm_msr_write_intercept function.

Re: [Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string

2017-10-13 Thread Ian Jackson
Wei Liu writes ("[PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string"): > Discovered by Coverity. But. Surely it is very wrong > @@ -1017,7 +1017,7 @@ int libxl_get_max_nodes(libxl_ctx *ctx) > int libxl__enum_from_string(const libxl_enum_string_table *t, >

[Xen-devel] [PATCH v3 3/6] x86/msr: read VMX MSRs values into Raw policy

2017-10-13 Thread Sergey Dyasli
Add calculate_raw_vmx_policy() which fills Raw policy with H/W values of VMX MSRs. Host policy will contain a copy of these values. Signed-off-by: Sergey Dyasli --- xen/arch/x86/msr.c | 77 ++ 1 file changed, 77

[Xen-devel] [PATCH v3 4/6] x86/msr: add VMX MSRs into HVM_max domain policy

2017-10-13 Thread Sergey Dyasli
Currently, when nested virt is enabled, the set of L1 VMX features is fixed and calculated by nvmx_msr_read_intercept() as an intersection between the full set of Xen's supported L1 VMX features, the set of actual H/W features and, for MSR_IA32_VMX_EPT_VPID_CAP, the set of features that Xen uses.

[Xen-devel] [PATCH v3 0/6] VMX MSRs policy for Nested Virt: part 1

2017-10-13 Thread Sergey Dyasli
The end goal of having VMX MSRs policy is to be able to manage L1 VMX features. This patch series is the first part of this work. There is no functional change to what L1 sees in VMX MSRs at this point. But each domain will have a policy object which allows to sensibly query what VMX features the

[Xen-devel] [PATCH v3 6/6] x86/msr: handle VMX MSRs with guest_rd/wrmsr()

2017-10-13 Thread Sergey Dyasli
Now that each domain has a correct view of VMX MSRs in it's per-domain MSR policy, it's possible to handle guest's RD/WRMSR with the new handlers. Do it and remove the old nvmx_msr_read_intercept() and associated bits. There is no functional change to what a guest sees in VMX MSRs.

[Xen-devel] [PATCH v3 1/6] x86/msr: add Raw and Host domain policies

2017-10-13 Thread Sergey Dyasli
Raw policy contains the actual values from H/W MSRs. PLATFORM_INFO msr needs to be read again because probe_intel_cpuid_faulting() records the presence of X86_FEATURE_CPUID_FAULTING but not the presence of msr itself (if cpuid faulting is not available). Host policy might have certain features

[Xen-devel] [PATCH v3 2/6] x86/msr: add VMX MSRs into struct msr_domain_policy

2017-10-13 Thread Sergey Dyasli
New definitions provide a convenient way of accessing contents of VMX MSRs: every bit value is accessible by its name and there is a "raw" 64-bit msr value. Bit names match existing Xen's definitions as close as possible. Signed-off-by: Sergey Dyasli ---

[Xen-devel] [PATCH v3 5/6] x86/msr: update domain policy on CPUID policy changes

2017-10-13 Thread Sergey Dyasli
Availability of some MSRs depends on certain CPUID bits. Add function recalculate_domain_msr_policy() which updates availability of per-domain MSRs based on current domain's CPUID policy. This function is called when CPUID policy is changed from a toolstack. Add

[Xen-devel] [linux-4.9 test] 114402: regressions - FAIL

2017-10-13 Thread osstest service owner
flight 114402 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/114402/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl broken in 114321 test-armhf-armhf-xl-rtds

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 14:19, wrote: > On 13/10/17 13:08, Jan Beulich wrote: > On 13.10.17 at 12:44, wrote: >>> In libxl__device_vuart_add vuart_gfn is getting stored as a hex value: >>> flexarray_append(ro_front,

Re: [Xen-devel] [PATCH 2/3] x86/pvh: use max_pdx to calculate the paging memory usage

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 12:44, wrote: > On Fri, Oct 13, 2017 at 08:59:29AM +, Jan Beulich wrote: >> >>> On 13.10.17 at 10:49, wrote: >> On 29.09.17 at 13:25, wrote: >> >> nr_pages doesn't take into account holes or MMIO regions,

Re: [Xen-devel] [PATCH v6 09/11] vpci/msi: add MSI handlers

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 13:17, wrote: > On Tue, Oct 10, 2017 at 11:35:26AM +, Roger Pau Monné wrote: >> On Wed, Oct 04, 2017 at 08:34:13AM +, Jan Beulich wrote: >> > >>> On 19.09.17 at 17:29, wrote: >> > > +static void vpci_msi_enable(const struct

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Andrew Cooper
On 13/10/17 13:08, Jan Beulich wrote: On 13.10.17 at 12:44, wrote: >> In libxl__device_vuart_add vuart_gfn is getting stored as a hex value: >> >>> flexarray_append(ro_front, GCSPRINTF("%"PRI_xen_pfn, state->vuart_gfn)); >> However, xenstore reads this value as a

Re: [Xen-devel] [PATCH v1] x86/hvm: Add MSR old value

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 12:36, wrote: > On 13.10.2017 13:29, Jan Beulich wrote: >>> +__set_bit(index + sizeof(struct monitor_msr_bitmap), bitmap); >> >> I think you miss "* 8" here - a bit position plus sizeof() doesn't >> produce any useful value. >> >> But what's

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 13:13, wrote: > To Jan, Andrew, Stefano and Anthony, > > what do you think about allowing QEMU to build the entire guest ACPI > and letting SeaBIOS to load it? ACPI builder code in hvmloader is > still there and just bypassed in this case. Well, if

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 12:44, wrote: > In libxl__device_vuart_add vuart_gfn is getting stored as a hex value: > >> flexarray_append(ro_front, GCSPRINTF("%"PRI_xen_pfn, state->vuart_gfn)); > > However, xenstore reads this value as a decimal value and tries to map the >

Re: [Xen-devel] preparations for 4.9.1 and 4.7.4

2017-10-13 Thread Lars Kurth
Jan, I had sent the mail an hour after I ran the scripts (had a meeting in between). I will look into the issue with XSA 226 On commits c7783d9c26fc191862d9883da22387340b1fab18 & d6aad635097d901b96df650e87f04687c9fb7bd2: I have to look into why these didn’t get picked up. Maybe there is a bug

Re: [Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Wei Liu
On Fri, Oct 13, 2017 at 04:14:32PM +0530, Bhupinder Thakur wrote: > In libxl__device_vuart_add vuart_gfn is getting stored as a hex value: > > > flexarray_append(ro_front, GCSPRINTF("%"PRI_xen_pfn, state->vuart_gfn)); > > However, xenstore reads this value as a decimal value and tries to map the

[Xen-devel] [PATCH for-4.10] libxl: handle NULL in libxl__enum_from_string

2017-10-13 Thread Wei Liu
Discovered by Coverity. Signed-off-by: Wei Liu --- Cc: Ian Jackson --- tools/libxl/libxl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c index

Re: [Xen-devel] [PATCH v6 09/11] vpci/msi: add MSI handlers

2017-10-13 Thread Roger Pau Monné
On Tue, Oct 10, 2017 at 11:35:26AM +, Roger Pau Monné wrote: > On Wed, Oct 04, 2017 at 08:34:13AM +, Jan Beulich wrote: > > >>> On 19.09.17 at 17:29, wrote: > > > +static void vpci_msi_enable(const struct pci_dev *pdev, struct vpci_msi > > > *msi, > > > +

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-13 Thread Haozhong Zhang
On 10/13/17 10:44 +0200, Igor Mammedov wrote: > On Fri, 13 Oct 2017 15:53:26 +0800 > Haozhong Zhang wrote: > > > On 10/12/17 17:45 +0200, Paolo Bonzini wrote: > > > On 12/10/2017 14:45, Haozhong Zhang wrote: > > > > Basically, QEMU builds two ROMs for guest,

[Xen-devel] [PATCH v1 1/2] tools/libs/evtchn: Add support for restricting a handle

2017-10-13 Thread Ross Lagerwall
Implement support for restricting evtchn handles to a particular domain on Linux by calling the IOCTL_EVTCHN_RESTRICT_DOMID ioctl (support added in Linux v4.8). Signed-off-by: Ross Lagerwall --- tools/include/xen-sys/Linux/evtchn.h | 15 +++

[Xen-devel] [PATCH v2 2/2] xentoolcore_restrict_all: Implement for libxenevtchn

2017-10-13 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- tools/Rules.mk| 2 +- tools/libs/evtchn/Makefile| 4 ++-- tools/libs/evtchn/core.c | 13 + tools/libs/evtchn/private.h | 3 +++

Re: [Xen-devel] [PATCH 2/3] x86/pvh: use max_pdx to calculate the paging memory usage

2017-10-13 Thread Roger Pau Monné
On Fri, Oct 13, 2017 at 08:59:29AM +, Jan Beulich wrote: > >>> On 13.10.17 at 10:49, wrote: > On 29.09.17 at 13:25, wrote: > >> nr_pages doesn't take into account holes or MMIO regions, and > >> underestimates the amount of memory needed for

[Xen-devel] libxl: vpl011: Fix hex to dec conversion of vuart_gfn in libxl__device_vuart_add

2017-10-13 Thread Bhupinder Thakur
In libxl__device_vuart_add vuart_gfn is getting stored as a hex value: > flexarray_append(ro_front, GCSPRINTF("%"PRI_xen_pfn, state->vuart_gfn)); However, xenstore reads this value as a decimal value and tries to map the wrong address and fails. Introduced a new format string "PRIu_xen_pfn"

Re: [Xen-devel] [PATCH 3/8] xen: defer call to xen_restrict until just before os_setup_post

2017-10-13 Thread Ian Jackson
Ross Lagerwall writes ("Re: [PATCH 3/8] xen: defer call to xen_restrict until just before os_setup_post"): > This works for normally starting a VM but doesn't seem to work when > resuming/migrating. > > Here is the order of selected operations when starting a VM normally: > VNC server

[Xen-devel] [PATCH 27/27 v12] arm/xen: vpl011: Correct the logic for asserting/de-asserting SBSA UART TX interrupt

2017-10-13 Thread Bhupinder Thakur
This patch fixes the issue observed when pl011 patches were tested on the junos hardware by Andre/Julien. It was observed that when large output is generated such as on running 'find /', output was getting truncated intermittently due to OUT ring buffer getting full. This issue was due to the

[Xen-devel] [PATCH 26/27 v12] arm/xen: vpl011: Fix the slow early console SBSA UART output

2017-10-13 Thread Bhupinder Thakur
The early console output uses pl011_early_write() to write data. This function waits for BUSY bit to get cleared before writing the next byte. In the SBSA UART emulation logic, the BUSY bit was set as soon one byte was written in the FIFO and it remained set until the FIFO was emptied. This meant

Re: [Xen-devel] [PATCH v7 05/16] x86: implement data structure and CPU init flow for MBA

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 10:40, wrote: > @@ -319,11 +340,13 @@ static bool cat_init_feature(const struct cpuid_leaf > *regs, > feat->cos_max = (feat->cos_max - 1) >> 1; > > /* We reserve cos=0 as default cbm (all bits within cbm_len are 1). > */ > -

Re: [Xen-devel] [PATCH v4 11/12] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-13 Thread George Dunlap
On 10/12/2017 04:38 PM, Jan Beulich wrote: On 11.10.17 at 19:52, wrote: >> The Intel manual claims that, "If [certain CPUID bits] are set, the >> processor deprecates FCS and FDS, and the field is saved as h"; >> but experimentally it would be more accurate to

Re: [Xen-devel] [PATCH v1] x86/hvm: Add MSR old value

2017-10-13 Thread Razvan Cojocaru
On 13.10.2017 13:29, Jan Beulich wrote: +__set_bit(index + sizeof(struct monitor_msr_bitmap), bitmap); I think you miss "* 8" here - a bit position plus sizeof() doesn't produce any useful value. But what's worse - having read till the end of the patch I don't see you change any

Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak

2017-10-13 Thread George Dunlap
On 10/13/2017 11:31 AM, Jan Beulich wrote: On 13.10.17 at 12:23, wrote: >> On 10/13/2017 10:20 AM, Jan Beulich wrote: >> On 13.10.17 at 11:10, wrote: On 10/13/2017 10:06 AM, Jan Beulich wrote: On 13.10.17 at 11:00,

Re: [Xen-devel] [PATCH] libxl: dm_restrict: DEFINE_USERLOOKUP_HELPER returned a pointer to an auto

2017-10-13 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH] libxl: dm_restrict: DEFINE_USERLOOKUP_HELPER returned a pointer to an auto"): > On Fri, Oct 13, 2017 at 11:25:59AM +0100, Ian Jackson wrote: > > When I converted the previous open-coded user lookup functionality > > into DEFINE_USERLOOKUP_HELPER, I moved the struct

Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 12:23, wrote: > On 10/13/2017 10:20 AM, Jan Beulich wrote: > On 13.10.17 at 11:10, wrote: >>> On 10/13/2017 10:06 AM, Jan Beulich wrote: >>> On 13.10.17 at 11:00, wrote: > ---

Re: [Xen-devel] [PATCH v1] x86/hvm: Add MSR old value

2017-10-13 Thread Jan Beulich
>>> On 12.10.17 at 11:10, wrote: > --- a/xen/arch/x86/hvm/monitor.c > +++ b/xen/arch/x86/hvm/monitor.c > @@ -74,16 +74,19 @@ bool hvm_monitor_emul_unimplemented(void) > monitor_traps(curr, true, ) == 1; > } > > -void hvm_monitor_msr(unsigned int msr, uint64_t

Re: [Xen-devel] [PATCH] libxl: dm_restrict: DEFINE_USERLOOKUP_HELPER returned a pointer to an auto

2017-10-13 Thread Wei Liu
On Fri, Oct 13, 2017 at 11:25:59AM +0100, Ian Jackson wrote: > When I converted the previous open-coded user lookup functionality > into DEFINE_USERLOOKUP_HELPER, I moved the struct passwd buffer into > the function generated by the macro. This is wrong because that > buffer is used by

[Xen-devel] [PATCH] libxl: dm_restrict: DEFINE_USERLOOKUP_HELPER returned a pointer to an auto

2017-10-13 Thread Ian Jackson
When I converted the previous open-coded user lookup functionality into DEFINE_USERLOOKUP_HELPER, I moved the struct passwd buffer into the function generated by the macro. This is wrong because that buffer is used by get{pw,gr}* for its return value, so the helper function would contrive to

Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak

2017-10-13 Thread George Dunlap
On 10/13/2017 10:20 AM, Jan Beulich wrote: On 13.10.17 at 11:10, wrote: >> On 10/13/2017 10:06 AM, Jan Beulich wrote: >> On 13.10.17 at 11:00, wrote: --- a/tools/fuzz/x86_instruction_emulator/afl-harness.c +++

Re: [Xen-devel] [PATCH 1/2] x86/boot: fix early error display

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 11:51, wrote: > On 12/10/17 21:55, Andrew Cooper wrote: >> On 12/10/2017 21:50, Doug Goldstein wrote: >>> From: David Esler >>> >>> In 9180f5365524 a change was made to the send_chr function to take in >>> C-strings and print

Re: [Xen-devel] [PATCH v4 10/12] fuzz/x86_emulate: Add --rerun option to try to track down instability

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 11:43, wrote: > On 10/12/2017 04:24 PM, Jan Beulich wrote: > On 11.10.17 at 19:52, wrote: >>> +if ( memcmp([0].regs, [1].regs, sizeof(state[0].regs)) >>> ) >>> +{ >>> +printf("registers

Re: [Xen-devel] [PATCH v4 08/12] fuzz/x86_emulate: Move all state into fuzz_state

2017-10-13 Thread George Dunlap
On 10/13/2017 10:54 AM, Jan Beulich wrote: On 13.10.17 at 11:22, wrote: >> On 10/12/2017 04:16 PM, Jan Beulich wrote: >> On 11.10.17 at 19:52, wrote: @@ -761,12 +757,11 @@ static void disable_hooks(struct x86_emulate_ctxt

Re: [Xen-devel] [PATCH v4 08/12] fuzz/x86_emulate: Move all state into fuzz_state

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 11:22, wrote: > On 10/12/2017 04:16 PM, Jan Beulich wrote: > On 11.10.17 at 19:52, wrote: >>> @@ -761,12 +757,11 @@ static void disable_hooks(struct x86_emulate_ctxt >>> *ctxt) >>> static void sanitize_input(struct

Re: [Xen-devel] [PATCH 1/2] x86/boot: fix early error display

2017-10-13 Thread Julien Grall
Hi Andrew, On 12/10/17 21:55, Andrew Cooper wrote: On 12/10/2017 21:50, Doug Goldstein wrote: From: David Esler In 9180f5365524 a change was made to the send_chr function to take in C-strings and print out a character at a time until a NULL was encountered. However

Re: [Xen-devel] [PATCH v5] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-13 Thread Jan Beulich
>>> On 11.10.17 at 18:26, wrote: > @@ -4568,6 +4571,32 @@ static int do_altp2m_op( > a.u.set_mem_access.view); > break; > > +case HVMOP_altp2m_set_mem_access_multi: > +if ( a.u.set_mem_access_multi.pad || > +

Re: [Xen-devel] [PATCH for 4.10 0/3] XSA-243 followup

2017-10-13 Thread Julien Grall
Hi Andrew, On 12/10/17 14:54, Andrew Cooper wrote: The important change here is in patch 3, which is intended to remove the correct-but-dangerous-looking construction of linear pagetables slots for shadowed guests. Release-acked-by: Julien Grall Cheers, Andrew

Re: [Xen-devel] [PATCH v4 10/12] fuzz/x86_emulate: Add --rerun option to try to track down instability

2017-10-13 Thread George Dunlap
On 10/12/2017 04:24 PM, Jan Beulich wrote: On 11.10.17 at 19:52, wrote: >> @@ -884,20 +891,146 @@ int LLVMFuzzerInitialize(int *argc, char ***argv) >> return 0; >> } >> >> -int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size) >> +static void

Re: [Xen-devel] [PATCH 0/3] x86: adjustments to page table updates

2017-10-13 Thread Julien Grall
Hi Jan, On 12/10/17 10:38, Jan Beulich wrote: The first two patches are bug fixes and hence candidates for 4.10. The 3rd is mostly cleanup, and hence intended only for after 4.10. 1: request page table page-in for the correct domain 2: fix do_update_va_mapping_otherdomain() wrt translated

Re: [Xen-devel] [PATCH] x86/vpt: fix a bug in pt_update_irq()

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 10:14, wrote: > On Fri, Oct 13, 2017 at 02:25:38AM -0600, Jan Beulich wrote: > On 09.10.17 at 23:32, wrote: >>> +{ >>> +if ( unlikely(vec < 16) ) >>> +return false; >>> + >>> +if ( hvm_funcs.sync_pir_to_irr ) >>> +

Re: [Xen-devel] [PATCH v4 08/12] fuzz/x86_emulate: Move all state into fuzz_state

2017-10-13 Thread George Dunlap
On 10/12/2017 04:16 PM, Jan Beulich wrote: On 11.10.17 at 19:52, wrote: >> --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c >> +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c >> @@ -22,34 +22,31 @@ >> >> #define SEG_NUM x86_seg_none >> >> -/* Layout

Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 11:10, wrote: > On 10/13/2017 10:06 AM, Jan Beulich wrote: > On 13.10.17 at 11:00, wrote: >>> --- a/tools/fuzz/x86_instruction_emulator/afl-harness.c >>> +++ b/tools/fuzz/x86_instruction_emulator/afl-harness.c >>> @@

Re: [Xen-devel] ARM32 - build-issues with xen/arm: vpl011: Add a new vuart node in the xenstore

2017-10-13 Thread Bhupinder Thakur
On 13 October 2017 at 00:34, Andrew Cooper wrote: > On 12/10/17 19:54, Bhupinder Thakur wrote: >> On 5 October 2017 at 15:07, Wei Liu wrote: >>> On Wed, Oct 04, 2017 at 09:58:32PM -0400, Konrad Rzeszutek Wilk wrote: I get this when compiling

Re: [Xen-devel] [PATCH] x86/vpt: fix a bug in pt_update_irq()

2017-10-13 Thread Chao Gao
On Fri, Oct 13, 2017 at 02:25:38AM -0600, Jan Beulich wrote: On 09.10.17 at 23:32, wrote: > >First of all - please use a better subject. If someone finds another >bug in this function in, say, half a year's time, how will we tell apart >the two patches from looking at

Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak

2017-10-13 Thread George Dunlap
On 10/13/2017 10:06 AM, Jan Beulich wrote: On 13.10.17 at 11:00, wrote: >> Changeset introduced "batch mode" to afl-harness, which allowed > > With (part of) the commit hash and the title inserted here and ... This should be `2b1cde7783` BTW. -George

Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak

2017-10-13 Thread George Dunlap
On 10/13/2017 10:06 AM, Jan Beulich wrote: On 13.10.17 at 11:00, wrote: >> Changeset introduced "batch mode" to afl-harness, which allowed > > With (part of) the commit hash and the title inserted here and ... Gah. :-) > >> ---

Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak

2017-10-13 Thread Jan Beulich
>>> On 13.10.17 at 11:00, wrote: > Changeset introduced "batch mode" to afl-harness, which allowed With (part of) the commit hash and the title inserted here and ... > --- a/tools/fuzz/x86_instruction_emulator/afl-harness.c > +++

Re: [Xen-devel] [PATCH 3/8] xen: defer call to xen_restrict until just before os_setup_post

2017-10-13 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of > Andrew Cooper > Sent: 13 October 2017 10:00 > To: Ross Lagerwall ; Ian Jackson > ; qemu-de...@nongnu.org > Cc: Anthony Perard

[Xen-devel] [PATCH v7 16/16] docs: add MBA description in docs

2017-10-13 Thread Yi Sun
This patch adds MBA description in related documents. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné

[Xen-devel] [PATCH v7 06/16] x86: implement get hw info flow for MBA

2017-10-13 Thread Yi Sun
This patch implements get HW info flow for MBA including its callback function and sysctl interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew

[Xen-devel] [PATCH v7 07/16] x86: implement get value interface for MBA

2017-10-13 Thread Yi Sun
This patch implements get value domctl interface for MBA. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Andrew Cooper CC: Jan Beulich CC: Wei

[Xen-devel] [PATCH v7 08/16] x86: implement set value flow for MBA

2017-10-13 Thread Yi Sun
This patch implements set value flow for MBA including its callback function and domctl interface. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné

[Xen-devel] [PATCH v7 01/16] docs: create Memory Bandwidth Allocation (MBA) feature document

2017-10-13 Thread Yi Sun
This patch creates MBA feature document in doc/features/. It describes key points to implement MBA which is described in details in Intel SDM "Introduction to Memory Bandwidth Allocation". Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC:

[Xen-devel] [PATCH v7 13/16] tools: rename 'xc_psr_cat_type' to 'xc_psr_type'

2017-10-13 Thread Yi Sun
This patch renames 'xc_psr_cat_type' to 'xc_psr_type' so that the structure name is common for all allocation features. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Chao Peng Reviewed-by: Roger Pau Monné

  1   2   >